:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, .86);
  --surface-solid: #ffffff;
  --surface-1: #f2f2f7;
  --surface-2: #e5e5ea;
  --outline: rgba(60, 60, 67, .18);
  --outline-strong: rgba(60, 60, 67, .32);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --primary: #007aff;
  --primary-ink: #ffffff;
  --primary-soft: rgba(0, 122, 255, .12);
  --secondary: #34c759;
  --secondary-soft: rgba(52, 199, 89, .14);
  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .05);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: rgba(28, 28, 30, .82);
  --surface-solid: #1c1c1e;
  --surface-1: #2c2c2e;
  --surface-2: #3a3a3c;
  --outline: rgba(235, 235, 245, .16);
  --outline-strong: rgba(235, 235, 245, .30);
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --primary: #0a84ff;
  --primary-ink: #ffffff;
  --primary-soft: rgba(10, 132, 255, .20);
  --secondary: #30d158;
  --secondary-soft: rgba(48, 209, 88, .18);
  --success: #30d158;
  --warning: #ff9f0a;
  --danger: #ff453a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .20);
  --shadow-2: 0 18px 54px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #fbfbfd 0%, var(--bg) 48%, #ececf1 100%);
  color: var(--ink);
  font: 14px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 650;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}

button:hover {
  transform: translateY(-.5px);
  box-shadow: var(--shadow-1);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 52%, transparent);
  outline-offset: 3px;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(242, 242, 247, .92);
  color: var(--ink);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
}

.app-shell:has(.focus-workspace) {
  min-height: 100svh;
  padding-block: 14px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  box-shadow: var(--shadow-1);
}

.brand h1 {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.brand p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

.account-actions span {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.segmented-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: var(--pill);
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--surface-solid) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--shadow-1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.segmented-nav button {
  min-width: 96px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--pill);
  box-shadow: none;
}

.segmented-nav button:hover {
  transform: none;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: none;
}

.segmented-nav button.active {
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.simple-account {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 0;
}

.simple-account span {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-account .sync-state {
  color: var(--primary);
}

.simple-account .subtle-button {
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  box-shadow: none;
}

.subtle-button,
.secondary,
.mini-button,
.tonal-button {
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
  color: var(--ink);
  border-color: var(--outline);
}

.filled-button,
.primary-mini {
  background: var(--primary);
  color: var(--primary-ink);
}

.tonal-button,
.mini-button.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--outline));
}

.text-button {
  min-height: 44px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.text-button:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.workspace {
  display: grid;
  gap: 34px;
}

.study-home {
  width: min(680px, 100%);
  display: grid;
  gap: 18px;
  margin: clamp(18px, 7vh, 72px) auto 0;
}

.current-study-card {
  display: grid;
  gap: 30px;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--outline);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.study-copy {
  display: grid;
  gap: 10px;
}

.study-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ready-label {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.path-kicker {
  color: var(--primary);
  font-size: 15px;
  font-weight: 780;
}

.study-copy h2 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05;
}

.study-copy p {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
}

.understanding-card {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 22px;
  border: 1px solid var(--outline);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-1) 72%, var(--surface-solid));
}

.understanding-card > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.understanding-card strong {
  font-size: clamp(48px, 8vw, 68px);
  line-height: .95;
}

.understanding-card span {
  color: var(--ink);
  font-size: 18px;
}

.understanding-card small {
  color: var(--muted);
  font-size: 15px;
}

.readiness-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--outline) 46%, transparent);
}

.readiness-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.inline-notice {
  margin-top: -12px;
}

.study-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.study-actions button {
  min-height: 56px;
  padding: 0 28px;
}

.view-shell {
  width: min(1040px, 100%);
  display: grid;
  gap: 18px;
  margin: 22px auto 0;
}

.view-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 0 4px;
}

.view-heading h2 {
  margin-top: 4px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}

.view-heading p {
  max-width: 64ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 17px;
}

.path-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.path-card {
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-1);
}

.path-select-button {
  all: unset;
  display: grid;
  gap: 12px;
  cursor: pointer;
}

.path-select-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 4px;
  border-radius: 18px;
}

.path-card:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
}

.path-card.active {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--outline));
  background: color-mix(in srgb, var(--primary-soft) 52%, var(--surface-solid));
}

.path-card.locked {
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

.path-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.path-card-top small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.path-card-top b {
  padding: 5px 10px;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface-1) 70%, var(--surface-solid));
  color: var(--muted);
  font-size: 12px;
}

.path-card.active .path-card-top b {
  background: var(--primary);
  color: var(--primary-ink);
}

.path-card strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.04;
}

.path-code {
  width: fit-content;
  padding: 6px 10px;
  border-radius: var(--pill);
  background: var(--surface-1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.path-card p {
  color: var(--muted);
  font-weight: 560;
}

.path-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.path-price {
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
}

.path-schedule-link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.path-schedule-link:hover {
  text-decoration: underline;
}

.quiet-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.section-heading.compact {
  align-items: center;
}

.section-heading h3 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.06;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.compact-history {
  max-height: 280px;
  overflow: auto;
}

.compact-history .history-row {
  min-height: 54px;
  padding: 10px 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

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

.compact-history .history-row strong {
  font-size: 20px;
}

.retention-panel,
.quiz-panel,
.review-panel,
.evidence-panel,
.result-panel {
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-actions,
.panel-actions,
.quiz-top,
.quiz-footer,
.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--outline) 62%, transparent);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--secondary);
}

.metric {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--outline) 78%, transparent);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  overflow-wrap: anywhere;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.metric small,
.panel-heading p,
.history-row small,
.auth-copy p,
.missed-card p,
.evidence-callout p {
  color: var(--muted);
}

.muted-metric strong {
  color: var(--muted);
}

.retention-panel {
  display: grid;
  gap: 16px;
}

.retention-panel {
  padding: 20px;
}

.panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.panel-heading h3 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.05;
}

.panel-heading > div:not(.panel-actions) {
  display: grid;
  gap: 5px;
}

.history-list,
.missed-list,
.signal-list,
.review-list {
  display: grid;
  gap: 10px;
}

.attempts-list {
  gap: 8px;
}

.signal-row b {
  color: var(--secondary);
  font-size: 28px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.domain-progress {
  display: block;
  width: min(420px, 100%);
  height: 7px;
  overflow: hidden;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--outline) 62%, transparent);
}

.domain-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--secondary);
}

.retention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.retention-grid .metric {
  min-height: 88px;
  padding: 14px;
}

.retention-grid .metric strong {
  font-size: 28px;
}

.weekly-summary,
.ai-card,
.ai-tutor {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--outline));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-soft) 44%, var(--surface));
}

.ai-text,
.ai-tutor {
  color: var(--ink);
  line-height: 1.5;
}

.muted-ai {
  background: var(--surface-1);
  border-color: var(--outline);
  color: var(--muted);
}

.history-row,
.signal-row,
.review-item,
.empty-state {
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-1) 76%, var(--surface-solid));
}

.history-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.history-row span {
  display: grid;
  gap: 2px;
}

.history-row strong {
  font-size: 24px;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
  font-size: 17px;
}

.quiz-mount {
  width: min(980px, 100%);
  display: grid;
  gap: 16px;
  margin: 0 auto;
}

.quiz-topbar {
  min-height: 60px;
  margin-bottom: 12px;
  box-shadow: none;
}

.quiz-topbar .brand {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.quiz-topbar .brand img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.quiz-topbar .brand h1 {
  font-size: 18px;
}

.quiz-topbar .brand p {
  display: none;
}

.focus-workspace {
  width: min(1040px, 100%);
  min-height: calc(100svh - 120px);
  display: grid;
  align-content: center;
  margin: 0 auto;
}

.quiz-panel,
.result-panel,
.review-panel,
.evidence-panel {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 42px);
}

.focus-workspace .quiz-panel {
  gap: 14px;
  padding: clamp(18px, 3vw, 32px);
}

.review-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.focus-workspace .quiz-panel,
.focus-workspace .result-panel {
  box-shadow: var(--shadow-2);
}

.quiz-top,
.quiz-footer {
  justify-content: space-between;
}

.quiz-top span,
.topic-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--pill);
  background: var(--surface-1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.quiz-panel h3 {
  max-width: 950px;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.16;
}

.focus-workspace .quiz-panel h3 {
  max-width: 900px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.16;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.choice-button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border-color: var(--outline);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-1) 78%, var(--surface-solid));
  color: var(--ink);
  line-height: 1.3;
  text-align: left;
  white-space: normal;
}

.choice-button b {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--outline);
  border-radius: 50%;
  background: var(--surface);
}

.choice-button.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.choice-button:disabled {
  opacity: 1;
}

.choice-button.is-correct {
  border-color: color-mix(in srgb, var(--success) 58%, var(--outline));
  background: color-mix(in srgb, var(--success) 14%, var(--surface-solid));
}

.choice-button.is-correct b {
  border-color: color-mix(in srgb, var(--success) 52%, var(--outline));
  background: var(--success);
  color: #ffffff;
}

.choice-button.is-wrong {
  border-color: color-mix(in srgb, var(--danger) 58%, var(--outline));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-solid));
}

.choice-button.is-wrong b {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--outline));
  background: var(--danger);
  color: #ffffff;
}

.question-feedback {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: var(--surface-1);
}

.question-feedback.correct {
  border-color: color-mix(in srgb, var(--success) 32%, var(--outline));
  background: color-mix(in srgb, var(--success) 10%, var(--surface-solid));
}

.question-feedback.wrong {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--outline));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-solid));
}

.question-feedback strong {
  color: var(--ink);
  font-size: 17px;
}

.question-feedback p {
  color: var(--muted);
  font-size: 14px;
}

.result-panel h3 {
  color: var(--secondary);
  font-size: clamp(68px, 12vw, 128px);
  line-height: .86;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.signal-row span {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.evidence-columns h4,
.evidence-panel > section h4,
.missed-card h4 {
  margin: 0;
}

.evidence-callout {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--outline));
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
}

.evidence-callout h4 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.evidence-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr);
  gap: 16px;
}

.evidence-list {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
}

.evidence-list li + li {
  margin-top: 6px;
}

.missed-card {
  display: grid;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--outline);
}

.missed-card:last-child {
  border-bottom: 0;
}

.missed-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.missed-top time {
  color: var(--muted);
  font-weight: 760;
}

.missed-card h4 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.12;
}

.answer-compare {
  display: grid;
  gap: 12px;
}

.answer-compare div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.answer-card.wrong-answer {
  border-color: color-mix(in srgb, var(--danger) 26%, var(--outline));
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.answer-card.correct-answer {
  border-color: color-mix(in srgb, var(--success) 28%, var(--outline));
  background: color-mix(in srgb, var(--success) 9%, transparent);
}

.answer-compare span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wrong-answer span {
  color: var(--danger);
}

.correct-answer span {
  color: color-mix(in srgb, var(--success) 78%, var(--ink));
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
}

.loading-card,
.loading-panel {
  min-width: min(420px, calc(100vw - 32px));
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--outline) 70%, transparent);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.loading-panel {
  min-width: 0;
  min-height: 180px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.loading-card h1,
.loading-panel h3 {
  margin-bottom: 4px;
}

.loading-card p,
.loading-panel p {
  color: var(--muted);
}

.loading-mark {
  width: 42px;
  height: 42px;
  border: 4px solid color-mix(in srgb, var(--primary) 16%, var(--outline));
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.error-text {
  color: var(--danger);
}

.notice-text {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--outline));
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: color-mix(in srgb, var(--primary) 72%, var(--ink));
}

.auth-shell {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(360px, 400px);
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 7vw, 84px);
  padding: clamp(24px, 7vw, 88px);
  background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 52%, #eeeef3 100%);
}

.auth-intro {
  width: min(560px, 100%);
  display: grid;
  gap: 24px;
}

.auth-panel {
  width: min(400px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.auth-brand {
  grid-template-columns: 46px 1fr;
  align-items: center;
}

.auth-brand img {
  width: 46px;
  height: 46px;
}

.auth-copy {
  display: grid;
  gap: 8px;
}

.auth-copy h2 {
  font-size: 30px;
  line-height: 1.05;
}

.auth-hero-copy {
  display: grid;
  gap: 12px;
}

.auth-hero-copy h2 {
  max-width: 12ch;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-hero-copy p:not(.eyebrow) {
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.45;
}

.auth-path-card {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--outline);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.auth-path-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-path-card strong {
  max-width: 24ch;
  font-size: 22px;
  line-height: 1.08;
}

.auth-path-card p {
  color: var(--muted);
}

.auth-path-list {
  display: grid;
  gap: 8px;
}

.auth-path-list span {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--outline) 76%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--ink);
  font-weight: 700;
}

.auth-path-list b {
  min-width: 48px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sso-button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: var(--pill);
  background: #fff;
  color: #1f1f1f;
  font-family: Roboto, var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  box-shadow: none;
}

.sso-button:hover {
  transform: none;
  background: #f8fafd;
  box-shadow: none;
}

.sso-button:active {
  background: #f1f3f4;
}

.sso-button .google-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.sso-button .google-mark svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sso-button > span:last-child {
  text-align: center;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--outline);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-hint {
  color: var(--muted);
  font-size: 12px;
}

.auth-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 14px;
  }

  .simple-header,
  .view-heading,
  .path-catalog,
  .evidence-columns {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .simple-account {
    justify-content: start;
  }

  .path-catalog,
  .retention-grid,
  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .auth-intro,
  .auth-panel {
    width: 100%;
  }

  .auth-hero-copy h2 {
    max-width: 14ch;
  }
}

@media (max-width: 820px) {
  .auth-shell {
    min-height: 100svh;
    align-content: start;
    justify-items: center;
    gap: 22px;
    padding: max(20px, env(safe-area-inset-top)) 18px 28px;
  }

  .auth-intro {
    max-width: 430px;
    gap: 18px;
  }

  .auth-brand {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .auth-brand img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }

  .auth-brand p,
  .auth-hero-copy .eyebrow {
    display: none;
  }

  .auth-hero-copy {
    gap: 8px;
  }

  .auth-hero-copy h2 {
    max-width: 10ch;
    font-size: clamp(42px, 12vw, 58px);
    line-height: .98;
  }

  .auth-hero-copy p:not(.eyebrow) {
    max-width: 20ch;
    font-size: 22px;
    line-height: 1.25;
  }

  .auth-path-card {
    display: none;
  }

  .auth-panel {
    width: min(430px, 100%);
    gap: 14px;
    padding: 22px;
    border-radius: 26px;
  }

  .auth-copy {
    gap: 6px;
  }

  .auth-copy h2 {
    font-size: 34px;
  }

  .auth-copy p {
    font-size: 16px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 22px 20px calc(96px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: grid;
    padding: 12px;
  }

  .simple-header {
    position: fixed;
    z-index: 20;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 16px;
    min-height: 0;
    margin: 0;
    justify-content: center;
    pointer-events: none;
  }

  .segmented-nav {
    width: min(360px, 100%);
    padding: 5px;
    border-radius: var(--pill);
    background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08);
    pointer-events: auto;
  }

  .segmented-nav button {
    min-width: 0;
    flex: 1;
    min-height: 48px;
    padding: 0 10px;
    font-size: 15px;
  }

  .simple-account {
    display: none;
  }

  .account-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    justify-content: stretch;
  }

  .account-actions span {
    max-width: none;
  }

  .brand {
    grid-template-columns: 38px 1fr;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand p {
    display: none;
  }

  .study-home {
    width: 100%;
    margin-top: 8px;
  }

  .current-study-card {
    gap: 22px;
    padding: 18px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .path-kicker {
    font-size: 15px;
  }

  .study-copy {
    gap: 8px;
  }

  .study-copy h2 {
    max-width: 11ch;
    font-size: clamp(40px, 12vw, 52px);
    line-height: 1;
  }

  .study-copy p {
    max-width: 22ch;
    font-size: 19px;
    line-height: 1.28;
  }

  .understanding-card {
    gap: 12px;
    padding: 18px 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .understanding-card strong {
    font-size: 58px;
  }

  .understanding-card span {
    font-size: 16px;
  }

  .understanding-card small {
    max-width: 24ch;
    font-size: 15px;
    line-height: 1.35;
  }

  .readiness-track {
    height: 7px;
    background: color-mix(in srgb, var(--outline) 48%, transparent);
  }

  .study-actions {
    gap: 10px;
    padding-top: 4px;
  }

  .study-actions .filled-button {
    width: 100%;
    min-height: 58px;
    border-radius: 17px;
  }

  .study-actions .text-button {
    width: fit-content;
    min-height: 36px;
    margin-inline: auto;
  }

  .view-shell {
    margin-top: 4px;
  }

  .library-view {
    gap: 14px;
  }

  .library-view .view-heading {
    gap: 6px;
    padding: 4px 0 0;
  }

  .library-view .view-heading h2 {
    max-width: none;
    font-size: clamp(34px, 10vw, 44px);
  }

  .library-view .view-heading p {
    max-width: 28ch;
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.32;
  }

  .history-view {
    gap: 14px;
  }

  .history-view .view-heading {
    gap: 10px;
    padding: 4px 0 0;
  }

  .history-view .view-heading h2 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .history-view .view-heading p {
    margin-top: 4px;
    font-size: 16px;
  }

  .history-view .view-heading .mini-button {
    width: fit-content;
    min-height: 38px;
    padding: 0 4px;
    border-color: transparent;
    background: transparent;
    color: var(--primary);
  }

  .quiz-mount {
    width: 100%;
    margin: 0;
  }

  .review-panel {
    gap: 14px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .review-panel .panel-heading {
    gap: 10px;
    padding: 4px 0 0;
  }

  .review-panel .panel-heading h3 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .review-panel .panel-heading .secondary {
    width: fit-content;
    min-height: 38px;
    padding: 0 4px;
    border-color: transparent;
    background: transparent;
    color: var(--primary);
  }

  .missed-list {
    gap: 0;
  }

  .missed-card {
    gap: 12px;
    padding: 20px 0;
  }

  .missed-card h4 {
    font-size: clamp(24px, 7vw, 34px);
  }

  .missed-top {
    align-items: baseline;
  }

  .answer-compare {
    gap: 10px;
  }

  .path-catalog {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .path-card {
    min-height: 0;
    gap: 8px;
    padding: 16px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .path-card:hover {
    transform: none;
    background: transparent;
    box-shadow: none;
  }

  .path-card.active {
    border-color: var(--outline);
    background: transparent;
  }

  .path-select-button {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 16px;
  }

  .path-card-top {
    display: contents;
  }

  .path-card-top small,
  .path-card p {
    display: none;
  }

  .path-card-top b {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 6px 10px;
  }

  .path-card strong {
    grid-column: 1;
    font-size: 22px;
    line-height: 1.1;
  }

  .path-code {
    grid-column: 1;
    width: fit-content;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
  }

  .path-card-meta {
    justify-content: flex-start;
    gap: 14px;
    padding-top: 0;
  }

  .path-price,
  .path-schedule-link {
    font-size: 13px;
  }

  .hero-actions,
  .study-actions,
  .panel-actions,
  .quiz-footer,
  .section-heading,
  .retention-grid,
  .evidence-grid,
  .answer-compare,
  .choice-grid,
  .signal-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .quiet-panel {
    padding: 16px;
    border-radius: 22px;
  }

}
