:root {
  --font-scale: 1;
  --pm-navy-950: #07172b;
  --pm-navy-900: #0b2341;
  --pm-navy-800: #12345b;
  --pm-navy-700: #1b466f;
  --pm-orange-600: #c86816;
  --pm-orange-500: #df7a1f;
  --pm-orange-100: #fff0df;
  --pm-canvas: #f3f5f7;
  --pm-surface: #ffffff;
  --pm-ink: #172536;
  --pm-muted: #617083;
  --pm-line: #dce2e8;
  --pm-success: #177257;
  --pm-danger: #ad3b3b;
  --pm-shadow: 0 18px 50px rgba(7, 23, 43, 0.10);
  --pm-radius: 1rem;
  --bs-body-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: calc(18px * var(--font-scale));
}

[data-bs-theme="dark"] {
  --pm-canvas: #0d1724;
  --pm-surface: #132235;
  --pm-ink: #edf3f9;
  --pm-muted: #aab8c7;
  --pm-line: #2a3a4d;
  --pm-orange-100: #3a2819;
  --pm-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --bs-body-bg: var(--pm-canvas);
  --bs-body-color: var(--pm-ink);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--pm-canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--pm-canvas);
  color: var(--pm-ink);
  font-size: 1rem;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

button,
a,
input {
  font: inherit;
}

button,
[role="button"] {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(223, 122, 31, 0.48) !important;
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.workspace {
  min-height: 100vh;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 4.5rem;
  align-items: center;
  gap: .55rem .75rem;
  border-bottom: 1px solid var(--pm-line);
  background: color-mix(in srgb, var(--pm-canvas) 92%, transparent);
  padding: .55rem .85rem;
  backdrop-filter: blur(16px);
}

.mobile-brand {
  grid-column: 1;
  grid-row: 1;
  min-height: 3rem;
  border: 0;
  background: transparent;
  color: var(--pm-navy-900);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .04em;
}

[data-bs-theme="dark"] .mobile-brand {
  color: white;
}

.mobile-brand span {
  color: var(--pm-orange-600);
}

.mode-switch {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  padding: .22rem;
  border: 1px solid var(--pm-line);
  border-radius: .65rem;
  background: var(--pm-surface);
}

.mode-switch[hidden] {
  display: none !important;
}

.mode-switch button {
  min-height: 3rem;
  flex: 1;
  border: 0;
  border-radius: .48rem;
  background: transparent;
  color: var(--pm-muted);
  padding: .35rem .55rem;
  font-size: .84rem;
  font-weight: 800;
}

.mode-switch button.active {
  background: var(--pm-navy-900);
  color: white;
}

.topbar-menu {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.menu-trigger {
  display: flex;
  min-width: 3rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid var(--pm-line);
  border-radius: .62rem;
  background: var(--pm-surface);
  padding: .45rem .65rem;
  color: var(--pm-ink);
  font-size: .83rem;
  font-weight: 850;
}

.menu-trigger svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  width: min(calc(100vw - 1.5rem), 22rem);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  border: 1px solid var(--pm-line);
  border-radius: .85rem;
  background: var(--pm-surface);
  padding: .9rem;
  box-shadow: var(--pm-shadow);
}

.account-menu-heading {
  padding: .1rem .1rem .75rem;
}

.account-menu-heading span,
.account-menu-heading strong {
  display: block;
}

.account-menu-heading span,
.account-menu-profile span {
  color: var(--pm-muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-menu-heading strong {
  margin-top: .12rem;
  color: var(--pm-ink);
  font-size: .95rem;
}

.account-menu-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  border-block: 1px solid var(--pm-line);
  padding: .8rem .1rem;
}

.account-menu-profile strong {
  display: block;
  overflow: hidden;
  margin-top: .18rem;
  color: var(--pm-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-profile button,
.account-menu-actions button,
.account-menu-logout {
  min-height: 3rem;
  border: 1px solid var(--pm-line);
  border-radius: .58rem;
  background: transparent;
  color: var(--pm-ink);
  font-size: .8rem;
  font-weight: 850;
}

.account-menu-profile button {
  padding-inline: .7rem;
  color: var(--pm-navy-700);
}

[data-bs-theme="dark"] .account-menu-profile button {
  color: #d5e5f5;
}

.account-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding-block: .75rem;
}

.account-menu-actions button {
  display: grid;
  align-content: center;
  padding: .5rem;
  text-align: left;
}

.account-menu-actions span,
.account-menu-actions strong {
  display: block;
}

.account-menu-actions span {
  color: var(--pm-muted);
  font-size: .68rem;
}

.account-menu-actions strong {
  margin-top: .08rem;
  font-size: .82rem;
}

.account-menu-logout {
  width: 100%;
  border-color: color-mix(in srgb, var(--pm-danger) 40%, var(--pm-line));
  color: var(--pm-danger);
}

.app-content {
  width: 100%;
}

.page-wrap {
  width: min(100% - 1.5rem, 76rem);
  margin-inline: auto;
  padding-block: 1.6rem 3rem;
}

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--pm-orange-600);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.page-heading {
  margin-bottom: 1.6rem;
}

.page-heading h1,
.welcome-copy h1,
.module-hero h1,
.result-hero h1 {
  margin: 0;
  color: var(--pm-ink);
  font-size: clamp(2rem, 9vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.page-heading > p:last-child,
.welcome-copy > p:last-child {
  max-width: 47rem;
  margin: .85rem 0 0;
  color: var(--pm-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.welcome-row {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.mode-chip {
  justify-self: start;
  border-left: 4px solid var(--pm-orange-500);
  padding: .4rem 0 .4rem .85rem;
}

.mode-chip span,
.mode-chip strong,
.mode-chip small {
  display: block;
}

.mode-chip span {
  color: var(--pm-muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.mode-chip strong {
  margin-top: .15rem;
  color: var(--pm-ink);
  font-size: 1rem;
}

.mode-chip small {
  margin-top: .15rem;
  color: var(--pm-muted);
  font-size: .76rem;
}

.focus-card {
  overflow: hidden;
  border-radius: 1.15rem;
  background: var(--pm-navy-900);
  color: white;
  box-shadow: var(--pm-shadow);
}

.focus-main {
  position: relative;
  padding: 1.55rem 1.25rem;
}

.focus-kicker {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #ffc183;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.focus-main h2 {
  margin: .8rem 0 .45rem;
  font-size: clamp(1.7rem, 8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
}

.focus-main > p {
  margin: 0 0 1.2rem;
  color: #c7d2df;
  font-size: .98rem;
}

.focus-metrics {
  display: grid;
  background: rgba(2, 12, 25, .3);
  padding: .55rem 1.1rem 1rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: .7rem;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  padding: .85rem .15rem;
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-row svg {
  width: 1.4rem;
  color: var(--pm-orange-500);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.metric-row span,
.metric-row strong {
  display: block;
}

.metric-row span {
  color: #aab9ca;
  font-size: .82rem;
}

.metric-row strong {
  color: white;
  font-size: 1rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: .65rem;
  padding: .65rem 1rem;
  font-size: .94rem;
  font-weight: 850;
  text-decoration: none;
}

.primary-action {
  border: 1px solid var(--pm-orange-500);
  background: var(--pm-orange-500);
  color: #1c2733;
}

.primary-action:hover {
  border-color: #ee8b32;
  background: #ee8b32;
  color: #111b25;
}

.secondary-action {
  border: 1px solid var(--pm-line);
  background: var(--pm-surface);
  color: var(--pm-ink);
}

.primary-action:disabled,
.secondary-action:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.dashboard-grid,
.result-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.app-panel {
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius);
  background: var(--pm-surface);
  padding: 1.2rem;
  box-shadow: 0 8px 25px rgba(7, 23, 43, .04);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}

.app-panel h2,
.section-title h2,
.group-title h2 {
  margin: 0;
  color: var(--pm-ink);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
}

.app-panel > p {
  color: var(--pm-muted);
  font-size: .96rem;
}

.soft-chip {
  white-space: nowrap;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pm-muted) 12%, transparent);
  padding: .38rem .6rem;
  color: var(--pm-muted);
  font-size: .78rem;
  font-weight: 850;
}

.diagnostic-visual {
  display: grid;
  grid-template-columns: 6.8rem 1fr;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  border-radius: .75rem;
  background: color-mix(in srgb, var(--pm-muted) 8%, transparent);
  padding: 1rem;
}

.baseline-bars {
  display: flex;
  height: 4.25rem;
  align-items: flex-end;
  gap: .35rem;
}

.baseline-bars span {
  width: .7rem;
  min-height: .35rem;
  border-radius: .2rem .2rem 0 0;
  background: var(--pm-orange-500);
}

.diagnostic-visual strong,
.diagnostic-visual small {
  display: block;
}

.diagnostic-visual strong {
  color: var(--pm-ink);
  font-size: .94rem;
  line-height: 1.4;
}

.diagnostic-visual small {
  margin-top: .25rem;
  color: var(--pm-muted);
  font-size: .82rem;
}

.weak-list {
  display: grid;
  gap: .15rem;
  margin-top: .7rem;
}

.weak-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 3.9rem;
  align-items: center;
  gap: .75rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--pm-line);
  background: transparent;
  padding: .65rem .15rem;
  color: var(--pm-ink);
  text-align: left;
}

.weak-item strong,
.weak-item small {
  display: block;
}

.weak-item strong {
  font-size: .96rem;
}

.weak-item small {
  color: var(--pm-muted);
  font-size: .82rem;
}

.module-dot {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: .65rem;
  background: var(--pm-navy-900);
  color: white;
  font-size: .78rem;
  font-weight: 900;
}

.module-dot.orange {
  background: var(--pm-orange-100);
  color: var(--pm-orange-600);
}

.phase-card {
  margin-top: 1rem;
}

.phase-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}

.phase-list span {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: .5rem;
  color: var(--pm-muted);
  font-size: .82rem;
  font-weight: 750;
}

.phase-list b {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--pm-line);
  border-radius: 50%;
  background: var(--pm-surface);
  font-size: .78rem;
}

.phase-list .active {
  color: var(--pm-ink);
}

.phase-list .active b {
  border-color: var(--pm-orange-500);
  background: var(--pm-orange-500);
  color: #182432;
}

.result-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--pm-success) 35%, var(--pm-line));
  border-radius: .8rem;
  background: color-mix(in srgb, var(--pm-success) 8%, var(--pm-surface));
  padding: .8rem;
}

.result-banner-icon {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--pm-success);
  color: white;
  font-weight: 900;
}

.result-banner strong,
.result-banner span {
  display: block;
}

.result-banner span {
  color: var(--pm-muted);
  font-size: .84rem;
}

.topic-group {
  margin-top: 2rem;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
  border-bottom: 1px solid var(--pm-line);
  padding-bottom: .65rem;
}

.group-title span {
  color: var(--pm-muted);
  font-size: .8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.topic-grid {
  display: grid;
  gap: .8rem;
}

.topic-card {
  position: relative;
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pm-line);
  border-radius: .9rem;
  background: var(--pm-surface);
  padding: 1.15rem;
  color: var(--pm-ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.topic-card::before,
.module-hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: .28rem;
  background: var(--pm-navy-700);
  content: "";
}

.topic-card.orange::before,
.module-hero.orange::before {
  background: var(--pm-orange-500);
}

.topic-card.blue::before,
.module-hero.blue::before {
  background: #3477a9;
}

.topic-card.green::before,
.module-hero.green::before {
  background: #43856d;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pm-shadow);
}

.topic-card-top,
.topic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topic-number,
.topic-percent {
  font-size: .78rem;
  font-weight: 900;
}

.topic-number {
  color: var(--pm-orange-600);
}

.topic-percent {
  color: var(--pm-muted);
}

.topic-card h3 {
  margin: 1rem 0 .45rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.topic-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 1rem;
  color: var(--pm-muted);
  font-size: .92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.progress-track {
  width: 100%;
  height: .42rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pm-muted) 15%, transparent);
}

.progress-track > span,
.progress-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pm-orange-500);
}

.topic-card-footer {
  margin-top: auto;
  padding-top: .9rem;
  color: var(--pm-muted);
  font-size: .8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.back-button {
  min-height: 2.8rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--pm-navy-700);
  font-size: .9rem;
  font-weight: 850;
}

[data-bs-theme="dark"] .back-button {
  color: #8fc6f0;
}

.module-hero {
  position: relative;
  display: grid;
  gap: 1rem;
  overflow: hidden;
  margin-top: .8rem;
  border-radius: 1rem;
  background: var(--pm-navy-900);
  padding: 1.4rem 1.2rem;
  color: white;
}

.module-number-large {
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: .8rem;
  font-size: .82rem;
  font-weight: 900;
}

.module-hero h1 {
  color: white;
  font-size: clamp(1.75rem, 8vw, 2.8rem);
}

.module-hero p:not(.eyebrow) {
  margin: .6rem 0 0;
  color: #c3cedb;
  font-size: .94rem;
}

.module-score strong,
.module-score span {
  display: inline;
}

.module-score strong {
  font-size: 1.7rem;
}

.module-score span {
  margin-left: .3rem;
  color: #9aabbe;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.module-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.objective-list {
  display: grid;
  gap: .65rem;
  margin: 1rem 0 1.8rem;
  padding: 0;
  list-style: none;
}

.objective-list li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: .55rem;
  color: var(--pm-muted);
  font-size: .95rem;
}

.objective-list li::before {
  color: var(--pm-success);
  content: "✓";
  font-weight: 900;
}

.concept-preview {
  display: grid;
  gap: .55rem;
  margin-top: .9rem;
}

.concept-preview article {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .65rem;
  border: 1px solid var(--pm-line);
  border-radius: .7rem;
  padding: .8rem;
}

.concept-preview article > span {
  color: var(--pm-orange-600);
  font-size: .8rem;
  font-weight: 900;
}

.concept-preview strong,
.concept-preview small {
  display: block;
}

.concept-preview strong {
  font-size: .94rem;
}

.concept-preview small {
  margin-top: .25rem;
  color: var(--pm-muted);
  font-size: .78rem;
}

.module-action-card {
  border-radius: 1rem;
  background: var(--pm-navy-900);
  padding: 1.3rem;
  color: white;
  box-shadow: var(--pm-shadow);
}

.module-action-card h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.module-action-card > p:not(.eyebrow) {
  color: #bbc7d5;
  font-size: .92rem;
}

.module-action-card > small {
  display: block;
  margin-top: .8rem;
  color: #a8b7c7;
  font-size: .78rem;
}

.session-page,
.exam-runner {
  min-height: calc(100vh - 4rem);
  background: color-mix(in srgb, var(--pm-muted) 5%, var(--pm-canvas));
}

.session-header,
.exam-bar {
  position: sticky;
  top: 4rem;
  z-index: 1010;
  display: grid;
  align-items: center;
  gap: .65rem;
  border-bottom: 1px solid var(--pm-line);
  background: var(--pm-surface);
  padding: .65rem .75rem;
}

.session-header {
  grid-template-columns: 3rem 1fr;
}

.session-close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--pm-line);
  border-radius: 50%;
  background: var(--pm-surface);
  color: var(--pm-muted);
  font-size: 1.4rem;
}

.session-header strong,
.session-header small {
  display: block;
}

.session-header strong {
  font-size: .94rem;
}

.session-header small {
  color: var(--pm-muted);
  font-size: .78rem;
}

.session-progress {
  grid-column: 1 / -1;
}

.session-stage {
  width: min(100% - 1rem, 52rem);
  margin-inline: auto;
  padding-block: 1rem 4rem;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .6rem;
  color: var(--pm-muted);
  font-size: .8rem;
  font-weight: 800;
}

.session-meta b {
  border-radius: .4rem;
  background: var(--pm-navy-900);
  padding: .28rem .45rem;
  color: white;
  font-size: .78rem;
}

.session-meta em {
  margin-left: auto;
  font-style: normal;
  text-transform: uppercase;
}

.learning-card,
.exam-question-card {
  border: 1px solid var(--pm-line);
  border-radius: 1rem;
  background: var(--pm-surface);
  padding: 1.2rem;
  box-shadow: var(--pm-shadow);
}

.learning-card {
  min-height: 29rem;
}

.learning-card h1,
.exam-question-card h1 {
  margin: 0;
  color: var(--pm-ink);
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.recall-space {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.3rem;
  border: 1px dashed var(--pm-line);
  border-radius: .8rem;
  background: color-mix(in srgb, var(--pm-muted) 4%, var(--pm-surface));
  padding: 1.2rem;
  color: var(--pm-muted);
  text-align: center;
}

.revealed-answer {
  margin-top: 1.2rem;
}

.revealed-answer ul {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.revealed-answer li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: .5rem;
  color: var(--pm-muted);
  font-size: .96rem;
}

.revealed-answer li::before {
  color: var(--pm-success);
  content: "✓";
  font-weight: 900;
}

.trap-box {
  display: grid;
  gap: .2rem;
  margin: 1rem 0;
  border-left: 4px solid var(--pm-orange-500);
  background: var(--pm-orange-100);
  padding: .8rem;
  color: color-mix(in srgb, var(--pm-ink) 75%, var(--pm-orange-600));
  font-size: .9rem;
}

.source-line {
  color: var(--pm-muted);
  font-size: .78rem;
}

.rating-row {
  display: grid;
  gap: .55rem;
  margin-top: 1.2rem;
  border-top: 1px solid var(--pm-line);
  padding-top: 1rem;
}

.rating-row > span {
  color: var(--pm-muted);
  font-size: .82rem;
}

.rating-row button {
  min-height: 3rem;
  border: 1px solid var(--pm-line);
  border-radius: .6rem;
  background: var(--pm-surface);
  color: var(--pm-ink);
  font-size: .9rem;
  font-weight: 850;
}

.rating-row button.solid {
  border-color: var(--pm-navy-900);
  background: var(--pm-navy-900);
  color: white;
}

.answer-options {
  display: grid;
  gap: .65rem;
  margin-top: 1.4rem;
}

.answer-option {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  min-height: 3.6rem;
  align-items: center;
  gap: .65rem;
  width: 100%;
  border: 1px solid var(--pm-line);
  border-radius: .7rem;
  background: var(--pm-surface);
  padding: .65rem .75rem;
  color: var(--pm-ink);
  text-align: left;
  font-size: .94rem;
}

.answer-option > span {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid var(--pm-line);
  border-radius: .5rem;
  color: var(--pm-muted);
  font-size: .82rem;
  font-weight: 900;
}

.answer-option:hover,
.answer-option.selected {
  border-color: var(--pm-navy-700);
  background: color-mix(in srgb, var(--pm-navy-700) 7%, var(--pm-surface));
}

.answer-option.selected > span {
  border-color: var(--pm-navy-900);
  background: var(--pm-navy-900);
  color: white;
}

.answer-option.right {
  border-color: color-mix(in srgb, var(--pm-success) 55%, var(--pm-line));
  background: color-mix(in srgb, var(--pm-success) 8%, var(--pm-surface));
}

.answer-option.wrong {
  border-color: color-mix(in srgb, var(--pm-danger) 55%, var(--pm-line));
  background: color-mix(in srgb, var(--pm-danger) 8%, var(--pm-surface));
}

.order-list {
  display: grid;
  gap: .55rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.order-row {
  display: grid;
  grid-template-columns: 2.3rem 1fr auto;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--pm-line);
  border-radius: .7rem;
  background: var(--pm-surface);
  padding: .55rem;
  cursor: grab;
}

.order-row.dragging {
  opacity: .45;
}

.order-index {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: .45rem;
  background: var(--pm-navy-900);
  color: white;
  font-size: .8rem;
  font-weight: 900;
}

.order-label {
  font-size: .92rem;
  line-height: 1.4;
}

.order-controls {
  display: flex;
  gap: .3rem;
}

.order-controls button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--pm-line);
  border-radius: .5rem;
  background: color-mix(in srgb, var(--pm-muted) 6%, var(--pm-surface));
  color: var(--pm-ink);
  font-weight: 900;
}

.order-controls button:disabled {
  opacity: .3;
}

.feedback-box {
  margin-top: 1rem;
  border-radius: .75rem;
  padding: 1rem;
}

.feedback-box.correct {
  border: 1px solid color-mix(in srgb, var(--pm-success) 40%, var(--pm-line));
  background: color-mix(in srgb, var(--pm-success) 8%, var(--pm-surface));
}

.feedback-box.incorrect {
  border: 1px solid color-mix(in srgb, var(--pm-orange-600) 35%, var(--pm-line));
  background: color-mix(in srgb, var(--pm-orange-500) 7%, var(--pm-surface));
}

.feedback-box p {
  color: var(--pm-muted);
  font-size: .94rem;
}

.exam-hero {
  display: grid;
  gap: 1.5rem;
  overflow: hidden;
  border-radius: 1.15rem;
  background: var(--pm-navy-900);
  padding: 1.5rem 1.2rem;
  color: white;
}

.exam-hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 11vw, 4.2rem);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.exam-hero h1 span {
  color: var(--pm-orange-500);
}

.exam-hero p:not(.eyebrow) {
  color: #bdc9d6;
  font-size: .94rem;
}

.exam-facts {
  display: grid;
}

.exam-fact {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .55rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  padding: .8rem 0;
}

.exam-fact b,
.exam-fact small {
  display: block;
}

.exam-fact b {
  font-size: .95rem;
}

.exam-fact small {
  color: #9db0c4;
  font-size: .78rem;
}

.exam-fact > span {
  color: var(--pm-orange-500);
  font-size: 1.3rem;
}

.exam-rules {
  margin-top: 1rem;
}

.exam-rules ul {
  padding-left: 1.15rem;
  color: var(--pm-muted);
  font-size: .92rem;
  line-height: 1.8;
}

.exam-bar {
  grid-template-columns: 1fr auto;
}

.exam-bar-title {
  display: none;
}

.exam-timer {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  border-radius: .6rem;
  background: color-mix(in srgb, var(--pm-muted) 12%, var(--pm-surface));
  padding: .45rem .7rem;
  color: var(--pm-ink);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 900;
}

.exam-timer.critical {
  background: color-mix(in srgb, var(--pm-danger) 10%, var(--pm-surface));
  color: var(--pm-danger);
}

.submit-exam {
  min-height: 2.8rem;
  border: 1px solid var(--pm-orange-500);
  border-radius: .6rem;
  background: var(--pm-orange-500);
  padding: .45rem .8rem;
  color: #172536;
  font-size: .86rem;
  font-weight: 900;
}

.exam-layout {
  display: grid;
  gap: .7rem;
  padding: .7rem;
}

.question-map {
  border: 1px solid var(--pm-line);
  border-radius: .8rem;
  background: var(--pm-surface);
  padding: .75rem;
}

.question-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .55rem;
}

.question-map-head strong {
  font-size: .92rem;
}

.question-map-head span {
  color: var(--pm-muted);
  font-size: .78rem;
  text-transform: uppercase;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(2.75rem, 1fr));
  gap: .3rem;
  overflow-x: auto;
  padding: .15rem .1rem .35rem;
}

.question-grid button {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--pm-line);
  border-radius: .45rem;
  background: var(--pm-surface);
  color: var(--pm-muted);
  font-size: .78rem;
  font-weight: 850;
}

.question-grid button.answered {
  border-color: var(--pm-navy-700);
  background: var(--pm-navy-900);
  color: white;
}

.question-grid button.current {
  outline: 3px solid var(--pm-orange-500);
  outline-offset: 1px;
}

.question-grid button.flagged::after {
  position: absolute;
  top: .18rem;
  right: .18rem;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--pm-orange-500);
  content: "";
}

.exam-question-card {
  min-height: 36rem;
}

.exam-question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1rem;
  color: var(--pm-muted);
  font-size: .8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.exam-question-meta em {
  color: var(--pm-orange-600);
  font-style: normal;
}

.flag-button {
  min-height: 2.7rem;
  margin-left: auto;
  border: 1px solid var(--pm-line);
  border-radius: .55rem;
  background: var(--pm-surface);
  padding: .35rem .6rem;
  color: var(--pm-muted);
  font-size: .8rem;
  font-weight: 850;
}

.flag-button.active {
  border-color: var(--pm-orange-500);
  background: var(--pm-orange-100);
  color: var(--pm-orange-600);
}

.question-hint {
  margin: .55rem 0 0;
  color: var(--pm-muted);
  font-size: .84rem;
}

.exam-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--pm-line);
  padding-top: 1rem;
}

.exam-nav button {
  min-height: 3rem;
  border: 0;
  background: transparent;
  color: var(--pm-navy-700);
  font-size: .85rem;
  font-weight: 850;
}

[data-bs-theme="dark"] .exam-nav button {
  color: #8fc6f0;
}

.exam-nav button:disabled {
  opacity: .35;
}

.save-state {
  color: var(--pm-muted);
  font-size: .78rem;
  text-align: center;
}

.save-state.error {
  color: var(--pm-danger);
  font-weight: 850;
}

.order-confirm {
  min-height: 3rem;
  margin-top: .7rem;
  border: 1px solid var(--pm-navy-700);
  border-radius: .6rem;
  background: var(--pm-surface);
  padding: .55rem .8rem;
  color: var(--pm-navy-700);
  font-size: .86rem;
  font-weight: 850;
}

.result-hero {
  border-radius: 1.1rem;
  background: var(--pm-navy-900);
  padding: 1.5rem 1rem;
  color: white;
  text-align: center;
}

.result-hero h1 {
  margin-top: 1rem;
  color: white;
  font-size: 1.8rem;
}

.result-hero > p:last-child {
  color: #adbdcd;
  font-size: .86rem;
}

.score-circle {
  display: grid;
  width: 9rem;
  height: 9rem;
  margin: 1rem auto 0;
  place-content: center;
  border: .55rem solid var(--pm-orange-500);
  border-radius: 50%;
}

.score-circle strong,
.score-circle span {
  display: block;
}

.score-circle strong {
  font-size: 2.2rem;
}

.score-circle span {
  color: #afbdcc;
  font-size: .78rem;
}

.breakdown-list {
  display: grid;
  gap: .9rem;
  margin-top: 1rem;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}

.breakdown-head strong {
  font-size: .86rem;
}

.breakdown-head small {
  color: var(--pm-muted);
}

.loading-state,
.fatal-state {
  display: grid;
  min-height: calc(100vh - 9rem);
  place-content: center;
  padding: 1.5rem;
  text-align: center;
}

.loading-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  place-items: center;
  border: 1px solid var(--pm-line);
  color: var(--pm-orange-600);
  font-weight: 900;
}

.loading-state h1,
.fatal-state h1 {
  font-size: 1.5rem;
}

.loading-state p,
.fatal-state p {
  color: var(--pm-muted);
}

.mobile-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--pm-line);
  background: var(--pm-surface);
  padding: .35rem max(.4rem, env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.4rem, env(safe-area-inset-left));
  box-shadow: 0 -8px 24px rgba(7, 23, 43, .08);
}

.mobile-nav button {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: .15rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--pm-muted);
  font-size: .78rem;
  font-weight: 850;
}

.mobile-nav button.active {
  background: color-mix(in srgb, var(--pm-orange-500) 9%, transparent);
  color: var(--pm-orange-600);
}

.mobile-nav svg,
.desktop-sidebar svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.toast {
  background: var(--pm-navy-900);
  color: white;
}

.auth-mode .desktop-sidebar,
.auth-mode .app-topbar,
.auth-mode .mobile-nav {
  display: none !important;
}

.auth-mode .workspace {
  min-height: 100vh;
  margin-left: 0 !important;
  padding-bottom: 0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  background: var(--pm-navy-950);
}

.auth-intro,
.auth-card {
  padding: 1.4rem 1rem;
}

.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.auth-intro h1 {
  max-width: 12ch;
  margin: .3rem 0 .8rem;
  color: white;
  font-size: clamp(2.45rem, 12vw, 4.8rem);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.auth-intro > p:not(.eyebrow) {
  max-width: 38rem;
  color: #bdcad8;
}

.auth-brand {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-self: flex-start;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, .75);
}

.auth-brand span,
.auth-brand b {
  padding: .35rem .55rem;
  font-size: .8rem;
}

.auth-brand b {
  background: var(--pm-orange-500);
  color: var(--pm-navy-950);
}

.privacy-list {
  display: grid;
  gap: .7rem;
  max-width: 38rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.privacy-list li {
  border-left: 3px solid var(--pm-orange-500);
  padding-left: .75rem;
  color: #b9c7d6;
  font-size: .9rem;
}

.privacy-list b {
  color: white;
}

.auth-card {
  align-self: stretch;
  background: var(--pm-surface);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  border-radius: .75rem;
  background: color-mix(in srgb, var(--pm-muted) 9%, transparent);
  padding: .25rem;
}

.auth-tabs button {
  min-height: 3rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--pm-muted);
  font-size: .85rem;
  font-weight: 850;
}

.auth-tabs button.active {
  background: var(--pm-navy-900);
  color: white;
}

.auth-card-body {
  padding-block: 1.5rem;
}

.auth-card-body h2 {
  margin: 0;
  color: var(--pm-ink);
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  font-weight: 850;
  line-height: 1.08;
}

.auth-card-body > p:not(.eyebrow) {
  color: var(--pm-muted);
}

.auth-card-body > label,
.credential-preview label {
  display: block;
  margin-top: .9rem;
  color: var(--pm-ink);
  font-size: .82rem;
  font-weight: 850;
}

.auth-card-body input,
.credential-preview input {
  width: 100%;
  min-height: 3.2rem;
  margin-top: .3rem;
  border: 1px solid var(--pm-line);
  border-radius: .65rem;
  background: var(--pm-surface);
  padding: .65rem .75rem;
  color: var(--pm-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.credential-preview {
  margin-top: .9rem;
  border: 1px solid var(--pm-line);
  border-radius: .8rem;
  background: color-mix(in srgb, var(--pm-muted) 5%, var(--pm-surface));
  padding: .1rem .9rem 1rem;
}

.credential-guidance {
  margin: .75rem 0 0;
  color: var(--pm-muted);
  font-size: .78rem;
}

.auth-actions {
  display: grid;
  gap: .55rem;
  margin-top: .8rem;
}

.dice-button {
  display: flex;
  min-height: 4.2rem;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  margin-top: 1.2rem;
  border: 1px solid var(--pm-orange-500);
  border-radius: .75rem;
  background: var(--pm-orange-100);
  color: var(--pm-ink);
  font-weight: 900;
}

.dice-button span {
  color: var(--pm-orange-600);
  font-size: 1.7rem;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem;
  border-top: 1px solid var(--pm-line);
  padding-top: 1rem;
  color: var(--pm-muted);
  font-size: .78rem;
}

.auth-foot a {
  color: var(--pm-navy-700);
  font-weight: 850;
}

.receipt-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--pm-navy-950);
  padding: 1rem;
}

.receipt-card {
  width: min(100%, 35rem);
  border-radius: 1rem;
  background: var(--pm-surface);
  padding: 1.2rem;
  box-shadow: var(--pm-shadow);
}

.receipt-check {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--pm-success);
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.receipt-card h1 {
  margin: 0;
  color: var(--pm-ink);
  font-size: clamp(2rem, 9vw, 3.2rem);
  line-height: 1.06;
}

.receipt-card > p:not(.eyebrow) {
  color: var(--pm-muted);
}

.receipt-class {
  border-left: 3px solid var(--pm-orange-500);
  padding-left: .65rem;
  font-size: .86rem;
}

.credential-receipt {
  display: grid;
  gap: .6rem;
  margin: 1rem 0;
}

.credential-receipt > div {
  overflow-wrap: anywhere;
  border: 1px solid var(--pm-line);
  border-radius: .65rem;
  padding: .75rem;
}

.credential-receipt span,
.credential-receipt strong {
  display: block;
}

.credential-receipt span {
  color: var(--pm-muted);
  font-size: .78rem;
  text-transform: uppercase;
}

.credential-receipt strong {
  margin-top: .2rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.receipt-confirm {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: .55rem;
  margin: 1rem 0;
  color: var(--pm-muted);
  font-size: .88rem;
}

.receipt-confirm input {
  width: 1.3rem;
  height: 1.3rem;
}

.legacy-banner {
  display: grid;
  gap: .75rem;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--pm-orange-500) 45%, var(--pm-line));
  border-radius: .8rem;
  background: var(--pm-orange-100);
  padding: .8rem;
}

.legacy-banner strong,
.legacy-banner span {
  display: block;
}

.legacy-banner span {
  color: var(--pm-muted);
  font-size: .84rem;
}

.legacy-banner > div:last-child {
  display: flex;
  gap: .45rem;
}

.legacy-banner button {
  min-height: 3rem;
  flex: 1;
  border: 1px solid var(--pm-line);
  border-radius: .55rem;
  background: var(--pm-surface);
  color: var(--pm-ink);
  font-size: .82rem;
  font-weight: 850;
}

.legacy-banner button:last-child {
  border-color: var(--pm-navy-900);
  background: var(--pm-navy-900);
  color: white;
}

.traffic-panel {
  margin-top: 1rem;
}

.local-only-chip {
  border-radius: 999px;
  background: color-mix(in srgb, var(--pm-success) 10%, var(--pm-surface));
  padding: .35rem .6rem;
  color: var(--pm-success);
  font-size: .78rem;
  font-weight: 850;
}

.traffic-totals {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .32rem .55rem;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill i,
.traffic-light {
  display: inline-block;
  width: .72rem;
  height: .72rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-green {
  background: color-mix(in srgb, var(--pm-success) 12%, var(--pm-surface));
  color: var(--pm-success);
}

.status-green i,
.traffic-light.status-green {
  background: var(--pm-success);
}

.status-yellow {
  background: color-mix(in srgb, #b77900 13%, var(--pm-surface));
  color: #8a5b00;
}

.status-yellow i,
.traffic-light.status-yellow {
  background: #b77900;
}

.status-red {
  background: color-mix(in srgb, var(--pm-danger) 11%, var(--pm-surface));
  color: var(--pm-danger);
}

.status-red i,
.traffic-light.status-red {
  background: var(--pm-danger);
}

.traffic-grid {
  display: grid;
  gap: .45rem;
}

.traffic-topic {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 4rem;
  align-items: center;
  gap: .7rem;
  width: 100%;
  border: 1px solid var(--pm-line);
  border-radius: .7rem;
  background: var(--pm-surface);
  padding: .65rem .75rem;
  color: var(--pm-ink);
  text-align: left;
}

.traffic-topic strong,
.traffic-topic small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-topic small {
  color: var(--pm-muted);
  font-size: .78rem;
}

.traffic-topic > b {
  font-size: .78rem;
}

.module-score .status-pill {
  display: flex;
  margin-top: .35rem;
}

@media (min-width: 576px) {
  .app-topbar {
    grid-template-columns: auto minmax(12rem, 19rem) auto;
  }

  .mode-switch {
    grid-column: 2;
    grid-row: 1;
  }

  .page-wrap {
    width: min(100% - 2.5rem, 76rem);
    padding-block: 2.2rem 4rem;
  }

  .welcome-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .mode-chip {
    justify-self: end;
  }

  .focus-main,
  .app-panel,
  .learning-card,
  .exam-question-card {
    padding: 1.6rem;
  }

  .rating-row {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-hero {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
}

@media (min-width: 768px) {
  :root {
    font-size: calc(19px * var(--font-scale));
  }

  .focus-card {
    display: grid;
    grid-template-columns: 1.35fr .85fr;
  }

  .focus-main {
    padding: 2.2rem;
  }

  .focus-metrics {
    align-content: center;
    padding: 1.2rem;
  }

  .dashboard-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-card {
    display: grid;
    grid-template-columns: .75fr 1.25fr;
    align-items: center;
    gap: 1.5rem;
  }

  .phase-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
  }

  .module-layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
    align-items: start;
  }

  .module-action-card {
    position: sticky;
    top: 5.2rem;
  }

  .session-header {
    grid-template-columns: 3rem auto 1fr;
    padding-inline: 4vw;
  }

  .session-progress {
    grid-column: auto;
  }

  .exam-hero {
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    padding: 3rem;
  }

  .exam-rules {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    align-items: center;
    gap: 1.4rem;
  }

  .exam-layout {
    grid-template-columns: 13rem minmax(0, 52rem);
    justify-content: center;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
  }

  .question-map {
    position: sticky;
    top: 8.5rem;
  }

  .question-grid {
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }

  .question-grid button {
    width: auto;
    aspect-ratio: 1;
    height: auto;
  }
}

@media (min-width: 992px) {
  .workspace {
    margin-left: 16.5rem;
    padding-bottom: 0;
  }

  .app-topbar {
    min-height: 4.5rem;
    grid-template-columns: 1fr minmax(12rem, 19rem) 1fr;
    padding-inline: 1.7rem;
  }

  .topbar-menu {
    grid-column: 3;
  }

  .desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: 16.5rem;
    flex-direction: column;
    background: var(--pm-navy-950);
    color: white;
    padding: 1.6rem 1.15rem 1.2rem;
  }

  .brand-lockup {
    display: flex;
    align-items: center;
    gap: .7rem;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
    padding: 0 .35rem 1.5rem;
    color: white;
    text-decoration: none;
  }

  .brand-mark {
    display: grid;
    grid-template-columns: repeat(2, 2rem);
    height: 2.4rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
  }

  .brand-mark b {
    display: grid;
    place-items: center;
    font-size: .78rem;
  }

  .brand-mark b:last-child {
    background: var(--pm-orange-500);
    color: var(--pm-navy-950);
  }

  .brand-lockup strong,
  .brand-lockup small {
    display: block;
  }

  .brand-lockup strong {
    font-size: .88rem;
  }

  .brand-lockup small {
    color: #aab8c9;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .side-nav {
    display: grid;
    gap: .4rem;
    margin-top: 1.6rem;
  }

  .side-nav button {
    display: flex;
    min-height: 3.1rem;
    align-items: center;
    gap: .75rem;
    width: 100%;
    border: 0;
    border-radius: .65rem;
    background: transparent;
    padding: .65rem .8rem;
    color: #aebccd;
    text-align: left;
    font-size: .9rem;
    font-weight: 750;
  }

  .side-nav button:hover,
  .side-nav button.active {
    background: rgba(255, 255, 255, .09);
    color: white;
  }

  .side-nav button.active {
    box-shadow: inset 3px 0 var(--pm-orange-500);
  }

  .sidebar-progress {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .11);
    padding: 1.2rem .35rem;
  }

  .progress-ring {
    display: grid;
    width: 3.3rem;
    height: 3.3rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--pm-orange-500) var(--progress-angle, 0deg), rgba(255, 255, 255, .13) 0);
    position: relative;
  }

  .progress-ring::before {
    position: absolute;
    inset: .32rem;
    border-radius: 50%;
    background: var(--pm-navy-950);
    content: "";
  }

  .progress-ring span {
    z-index: 1;
    font-size: .78rem;
    font-weight: 900;
  }

  .sidebar-progress strong,
  .sidebar-progress small {
    display: block;
  }

  .sidebar-progress strong {
    font-size: .78rem;
  }

  .sidebar-progress small {
    color: #91a2b5;
    font-size: .78rem;
  }

  .source-note {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding-inline: .35rem;
    color: #9fb0c4;
    font-size: .78rem;
  }

  .source-note svg {
    width: 1.2rem;
    color: var(--pm-orange-500);
  }

  .source-note small {
    display: block;
    color: #788a9e;
  }

  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .session-header,
  .exam-bar {
    top: 4.5rem;
  }

  .exam-bar {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 1.4rem;
  }

  .exam-bar-title {
    display: block;
  }

  .exam-bar-title strong,
  .exam-bar-title small {
    display: block;
  }

  .exam-bar-title small {
    color: var(--pm-muted);
    font-size: .78rem;
  }

  .submit-exam {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 576px) {
  .auth-intro,
  .auth-card {
    padding: 2rem;
  }

  .auth-actions {
    grid-template-columns: 1fr 1.2fr;
  }

  .legacy-banner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .traffic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-card {
    padding: 2rem;
  }
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.15fr) minmax(25rem, .85fr);
  }

  .auth-intro,
  .auth-card {
    padding: clamp(2rem, 5vw, 5rem);
  }

  .auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .traffic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
