/* The single type scale for the app. Layout CSS deliberately contains no type sizes. */
:root {
  font-size: 100%;
  --type-label: .875rem;
  --type-body: 1rem;
  --type-reading: 1.125rem;
  --type-card: 1.375rem;
  --type-section: 1.75rem;
  --type-title: 3rem;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --muted: #5c6759;
}
body { font-size: var(--type-body); line-height: 1.6; }
.badge-card h3 { font-size: 1.25rem; line-height: 1.35; letter-spacing: -.02em; }
.badge-group-heading h3 { font-size: var(--type-card); }
.badge-kind, .badge-status, .badge-count, .badge-group-heading > span, .badge-note { font-size: var(--type-label); line-height: 1.6; }
.badge-kind { letter-spacing: .065em; font-weight: 650; }
.badge-total, .badge-intro, .badge-card p, .recap-badges > p { font-size: var(--type-body); line-height: 1.7; }
.badge-total { font-weight: 650; }
.badge-symbol { font-size: 1.875rem; }
.recap-badges h2 { font-size: 1.625rem; line-height: 1.25; }
p { line-height: 1.75; }
h1 { font-size: var(--type-title); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: var(--type-section); line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: var(--type-card); line-height: 1.3; letter-spacing: -.02em; }
/* Route changes focus headings for screen readers, without drawing a control outline. */
h1[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
.brand { font-size: 1.875rem; line-height: 1.2; letter-spacing: -.045em; }
.sidebar-note p { font-size: 1.375rem; line-height: 1.4; letter-spacing: -.02em; }
.avatar { font-size: var(--type-label); line-height: 1; }
.intro-badge { font-size: var(--type-label); line-height: 1.6; }
.featured-mission h2 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -.035em; }
.challenge h1 { font-size: 2.5rem; }
.mission-aside h3, .welcome-poster p { font-size: var(--type-card); line-height: 1.4; }
.review-row h3 { font-size: var(--type-body); line-height: 1.6; }
.case-file h3, dialog h2 { font-size: var(--type-section); }
.position-mark, .distorted .position-mark { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.04em; }
.progress-stats strong, .recap-stat-row strong { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.035em; }
.progress-stats strong > span, .recap-stat-row strong span { font-size: 1.25rem; line-height: 1.2; color: var(--muted); }
.source-kind { letter-spacing: .075em; }
.source-byline { line-height: 1.6; }
.small, .footer { line-height: 1.6; }

button, select { line-height: 1.5; }

/* Labels are supporting text, not miniature text. */
.eyebrow, .pill, .meta, .level-pill, .mission-topic,
.sidebar-label, .local-note, .no-pressure, .game-number,
.visual-caption, .library-status, .fiction-caption, .fiction-note,
.replay-note, .source-kind, .source-byline, .guidance-note,
.unscored, .step-count, .skill-status, .practiced-tag,
.select-label, .mission-select-label {
  font-size: var(--type-label);
  line-height: 1.6;
}
.eyebrow, .pill { letter-spacing: .075em; }
.small, .library-note, .footer, dialog .small { font-size: var(--type-label); }
.source-kind, .source-byline, .guidance-note, .no-pressure,
.library-status, .mission-topic, .fiction-note, .replay-note,
.unscored, .step-count, .comparison-arrow, .game-number,
.guest-label, .breadcrumb, .fiction-caption, .footer,
.scenario .eyebrow, .challenge > .eyebrow,
.concept-comparison > div > .eyebrow, .position-panel .eyebrow,
.mission-aside > .eyebrow, .dialog-top .eyebrow,
.section-title .eyebrow, .page-intro .eyebrow,
.practice-mission .eyebrow, .next-step .eyebrow,
.welcome-copy > .eyebrow, .library-mission-top .eyebrow {
  color: var(--muted);
}
.skill-status { color: #586747; }
.skill-status.practicing { color: #4c6034; }

/* Controls and navigation retain useful tap targets as the text grows. */
.button, .button.compact, .text-button, .text-link, .nav-link,
.help-link, select, .mission-select-label select,
.challenge-actions > .button, .challenge-actions > .text-button,
.review-row .button, .practice-mission .button, .next-step .button,
.recap-actions .button, .resume-strip .text-button,
.library-mission .text-button, .feedback-actions .text-button {
  font-size: var(--type-body);
  line-height: 1.5;
}
.button, .button.compact { min-height: 48px; padding: 13px 20px; gap: 14px; }
.text-button, .text-link, .help-link { min-height: 44px; }
.icon-button, .top-help { width: 44px; height: 44px; flex-shrink: 0; }
.top-help > .icon { width: 22px; height: 22px; }
select { min-height: 48px; }
.nav-link { min-height: 50px; }
.sidebar { overflow-y: auto; }
.brand-lockup {
  display: grid;
  gap: 0;
  margin-bottom: 32px;
  flex-shrink: 0;
}
.brand-lockup .brand { line-height: 1; }
.mobile-brand { display: none; }
.sidebar-label {
  max-width: none;
  margin: 0;
  padding-left: 0;
  white-space: nowrap;
  color: #bec8b7;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}
.sidebar-note > span { font-size: var(--type-label); }
.sidebar-bottom { padding: 20px 15px 0; }
.sidebar-bottom .sidebar-utility {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  font-family: var(--body);
  font-size: var(--type-body);
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  color: #c3cbbe;
}
.sidebar-utility > span { min-width: 0; }
.sidebar-bottom .sidebar-utility > .icon {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}
@media (min-width: 701px) {
  .sidebar .nav-link { gap: 12px; }
  .sidebar .nav-link > .icon { width: 20px; height: 20px; }
}
@media (min-width: 701px) and (max-width: 960px) {
  .sidebar { width: 205px; }
  .app-body { margin-left: 205px; }
}
.breadcrumb { font-size: var(--type-body); min-width: 0; }
.guest-label { font-size: var(--type-label); }
.topbar { gap: 16px; min-height: 87px; height: auto; padding-block: 16px; }

/* General reading, including home, onboarding, practice, and progress. */
.page-intro p, .lead, .welcome-copy > .lead,
.featured-mission p, .practice-mission p, .next-step p,
.review-row p, .game-card p, .practice-grid .game-card p,
.library-mission p, .bottom-note p, .resume-strip,
.welcome-steps p, .guidance-choice span, .skill-detail p,
.transfer-result p, .recap-wrap > .lead, dialog > p {
  font-size: var(--type-body);
  line-height: 1.75;
}
.featured-mission .mission-copy > p { max-width: 420px; }
.welcome-steps strong, .guidance-choice strong,
.guidance-field legend, .bottom-note strong,
.skill-row h3, .recap-skills strong, .transfer-result strong {
  font-size: var(--type-body);
  line-height: 1.6;
}
.game-card h3, .practice-grid .game-card h3 { font-size: var(--type-card); min-height: 0; margin: 0 0 8px; align-self: stretch; text-align: left; }
.game-card p, .practice-grid .game-card p { min-height: 0; margin-bottom: 24px; flex: 1; }
.game-card-bottom, .game-card-bottom > span,
.skill-row p, .recap-skills p, .progress-stats p,
.recap-stat-row > div > span, .mission-meta > span:first-child,
.practice-heading .small, .section-title > .small {
  font-size: var(--type-label);
  line-height: 1.65;
}
.library-mission-top { flex-wrap: wrap; }
.library-mission-top .eyebrow { font-size: var(--type-label); }
.library-mission h3 { font-size: 1.75rem; }
.library-status { margin-left: auto; }
.library-mission p { margin-bottom: 18px; }
.library-mission-top .mini-game-icon { width: 36px; height: 36px; }
.mission-tags, .mission-meta { flex-wrap: wrap; row-gap: 10px; }
.game-card-bottom { gap: 12px; }
.practiced-tag { position: static; margin: 0; text-align: right; }
.skill-row-top { flex-wrap: wrap; align-items: flex-start; }
.skill-row-top > div { min-width: 0; flex: 1; }
.skill-row h3 { max-width: none; }
.skill-status { max-width: none; }
.recap-wrap > .small { font-size: var(--type-label); }
.recap-skills > div { align-items: flex-start; }
.recap-skills > div > .icon { flex-shrink: 0; margin-top: 9px; }
.recap-actions { flex-wrap: wrap; }

/* Learning text uses the same reading size in both missions and all games. */
.challenge-context, .scenario p, .answer-group legend, .answer-option,
.concept-text, .concept-rule p, .feedback p, .hint-box p,
.source-text, .explanation p, .position-panel p {
  font-size: var(--type-reading);
  line-height: 1.75;
}
.challenge-context { margin-bottom: 26px; }
.scenario blockquote { font-size: 1.4375rem; line-height: 1.6; }
.scenario .eyebrow, .challenge > .eyebrow,
.concept-comparison > div > .eyebrow, .position-panel .eyebrow,
.mission-aside > .eyebrow, .case-heading, .dialog-top .eyebrow,
.section-title .eyebrow, .page-intro .eyebrow,
.practice-mission .eyebrow, .next-step .eyebrow,
.welcome-copy > .eyebrow {
  font-size: var(--type-label);
  line-height: 1.6;
  letter-spacing: .075em;
}
.answer-group legend { margin-bottom: 18px; }
.answer-option { padding: 18px 16px; gap: 14px; align-items: flex-start; }
.option-letter { font-size: var(--type-body); width: 30px; height: 30px; margin-top: 1px; }
.option-status { padding-top: 6px; }
.challenge-label { font-size: var(--type-body); flex-wrap: wrap; }
.feedback h3 { font-size: 1.375rem; }
.explanation strong { font-size: var(--type-body); }
.takeaway { font-size: var(--type-body); line-height: 1.75; }
.takeaway > .icon, .hint-box > .icon { margin-top: 5px; }
.challenge-actions { flex-wrap: wrap; align-items: center; }
.feedback-actions { flex-wrap: wrap; }
.source-tab { font-size: var(--type-body); min-height: 52px; min-width: 0; flex-basis: 0; }
.source-tab > span { font-size: var(--type-label); width: 26px; height: 26px; flex-shrink: 0; }
.case-heading { flex-wrap: wrap; gap: 8px; }
.case-heading > span { font-size: var(--type-label); }
.source-foot { font-size: var(--type-body); line-height: 1.7; align-items: flex-start; }
.source-foot > .icon { margin-top: 5px; }
.case-file article { min-height: 0; }
.concept-comparison h3, .position-panel h3 { font-size: 1.375rem; }
.comparison-arrow span,
.position-comparison .comparison-arrow span { font-size: var(--type-body); line-height: 1.7; }
.concept-comparison p { font-size: var(--type-reading); line-height: 1.75; }
.position-panel { min-width: 0; }
.position-mark, .distorted .position-mark { margin: 16px 0; }
.position-panel h3 { overflow-wrap: anywhere; }
.position-comparison { grid-template-columns: minmax(0,1fr) 88px minmax(0,1fr); gap: 16px; }
.mission-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 38px; }
.journey-item { gap: 12px; align-items: flex-start; }
.journey-item > span { width: 32px; height: 32px; font-size: var(--type-label); }
.journey-item strong { font-size: var(--type-body); line-height: 1.5; }
.journey-item small { font-size: var(--type-label); line-height: 1.6; }
.aside-insight p { font-size: 1.125rem; }
.mission-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.mission-top > .text-button { justify-self: start; font-size: var(--type-body); }
.mission-top > span:nth-child(2) { font-size: var(--type-label); letter-spacing: .075em; text-align: center; }
.mission-top .step-count { justify-self: end; }


/* Shared spacing and alignment, independent of content length. */
.highlight-text::after { left: 0; right: 0; }
.featured-mission { grid-template-columns: minmax(0,1fr) 370px; gap: 24px; padding: 32px; }
.mission-art { max-width: 370px; }
.mission-visual { padding-left: 0; }

.page-intro { margin-bottom: var(--space-4); }
.page-intro .eyebrow, .welcome-copy > .eyebrow { margin-bottom: var(--space-2); }
.page-intro p, .welcome-copy > .lead { margin-top: var(--space-2); }
.section-title, .practice-heading { align-items: end; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2); }
.game-grid, .mission-library-grid { gap: var(--space-3); }
.game-card, .practice-grid .game-card { display: flex; flex-direction: column; align-items: stretch; padding: var(--space-3); gap: 0; }
.game-card-top, .practice-grid .game-card-top { align-items: center; min-height: 44px; margin: 0 0 20px; gap: 12px; }
.game-icon { width: 44px; height: 44px; }
.button > .icon, .text-button > .icon, .text-link > .icon { width: 18px; height: 18px; }
.mini-game-icon > .icon { width: 20px; height: 20px; }
.game-card-bottom, .practice-grid .game-card-bottom { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 0; margin-top: auto; border-top: 1px solid var(--line); }
.game-card-bottom > span, .practice-grid .game-card-bottom > span { display: inline-flex; align-items: center; gap: 8px; }
.library-mission { padding: var(--space-3); }
.library-mission-top { gap: 12px; margin-bottom: 20px; }
.library-mission .text-button { padding-bottom: 0; }
.welcome-steps > div { align-items: flex-start; }
.welcome-steps .mini-game-icon { width: 36px; height: 36px; margin-top: 2px; }
.challenge-label { gap: 12px; }
.challenge-label .mini-game-icon { width: 36px; height: 36px; border-radius: 8px; }
.challenge-label .mini-game-icon > .icon { width: 20px; height: 20px; }
.journey-list::before { left: 16px; }
.journey-item small { color: var(--muted); }
.feedback-heading { align-items: flex-start; gap: 12px; }
.feedback-heading > .icon { width: 20px; height: 20px; margin-top: 4px; }
.hint-box, .concept-rule, .takeaway, .source-foot { gap: 12px; }
.hint-box > .icon, .concept-rule > .icon, .takeaway > .icon, .source-foot > .icon { width: 20px; height: 20px; margin-top: 5px; }
.option-status:empty { display: none; }
.option-status { flex-shrink: 0; }
.skill-row-top > .mini-game-icon { width: 36px; height: 36px; }
.skill-row-top > .icon { width: 20px; height: 20px; margin-top: 4px; }
.skill-row-top .skill-status { margin-top: 2px; }
.skill-detail { margin-left: 50px; }
.skill-practice-note { color: var(--muted); }
.skill-detail p + p { margin-top: 8px; }
.recap-skills > div { gap: 16px; }
.recap-skills .mini-game-icon { width: 36px; height: 36px; }
.recap-skills > div > div { flex: 1; min-width: 0; }
.recap-skills > div > .icon { width: 20px; height: 20px; margin: 4px 0 0 auto; }
.progress-stats > div { padding: 24px; }
.progress-stats p { max-width: none; }
.fiction-caption { margin: -16px 0 32px; }
dialog { padding: 32px; max-height: calc(100svh - 32px); overflow-y: auto; }
dialog label { font-size: var(--type-body); line-height: 1.6; }

@media (min-width: 1191px) {
  .position-panel > .eyebrow { min-height: 3.2em; }
  .position-panel h3 { min-height: 2.6em; }
}
@media (max-height: 820px) and (min-width: 701px) {
  .sidebar nav { margin-top: 0; }
  .sidebar-note { margin-top: 28px; padding-top: 22px; }
}
@media (max-width: 1190px) {
  .featured-mission { grid-template-columns: 1fr; }
  .mission-visual { display: none; }
  .featured-mission .mission-copy > p { max-width: 560px; }
  .welcome-layout { display: block; max-width: 760px; margin-inline: auto; }
  .welcome-poster { display: none; }
  .game-grid { grid-template-columns: 1fr; }

  .mission-library-grid { grid-template-columns: 1fr; }
  .mission-layout { display: block; max-width: 760px; }
  .mission-aside { display: none; }
  .welcome-steps { grid-template-columns: 1fr; }
  .welcome-steps > div { flex-direction: row; align-items: center; }
  .concept-comparison, .position-comparison { grid-template-columns: 1fr; gap: 16px; }
  .comparison-arrow, .position-comparison .comparison-arrow { flex-direction: row; gap: 16px; }
  .comparison-arrow > .icon { transform: rotate(90deg); }
}
@media (max-width: 960px) {
  .guest-label { display: none; }
  .sidebar-note { margin-inline: 0; }
  .brand { font-size: 1.625rem; }
  .sidebar-note p { font-size: 1.25rem; }
  .sidebar-bottom { padding-inline: 12px; }




  .game-card-bottom > span, .practice-grid .game-card-bottom > span { display: inline-flex; }

  .mission-select-label { min-width: 0; width: 100%; }
  .section-title > .small, .practice-heading .small { max-width: none; text-align: left; }
  .visual-caption { display: none; }
}
@media (max-width: 700px) {
  .sidebar { height: 82px; overflow: visible; }
  .brand-lockup { display: none; }
  .sidebar nav { margin-top: 0; }
  .nav-link { font-size: var(--type-label); min-height: 66px; padding: 9px; }
  .nav-link > .icon { width: 22px; height: 22px; }
  .app-body { padding-bottom: 82px; }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    min-height: 0;
    padding: 18px 20px;
    background: #202a22;
    color: #f4f6ee;
    border-color: #3b4539;
  }
  .topbar > .mobile-brand {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    width: max-content;
    margin: 0;
  }
  .topbar .sidebar-label { display: block; }
  .topbar .breadcrumb {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #c3cbbe;
    font-family: var(--body);
    font-size: var(--type-label);
    font-weight: 400;
    line-height: 1.5;
  }
  .topbar .guest { grid-column: 2; grid-row: 1; align-self: start; }
  .topbar .top-help { color: #c3cbbe; }
  .topbar .icon-button:hover { background: #303c2e; }
  .topbar .avatar { color: var(--ink); }
  .guest { gap: 4px; }
  .avatar { width: 34px; height: 34px; font-size: var(--type-label); }
  main { padding-inline: 20px; }
  .footer { font-size: var(--type-label); flex-direction: column; gap: 5px; padding-inline: 20px; }
  .footer > span:last-child { max-width: none; text-align: left; }
  .intro-badge { display: none; }
  .featured-mission, .library-mission { padding: 24px; }
  .featured-mission .mission-copy > p { max-width: none; }
  .mission-visual { display: none; }
  .mission-library .section-title > .small { max-width: none; }
  .section-title .text-link { font-size: var(--type-body); white-space: normal; }
  .section-title .eyebrow { font-size: var(--type-label); }
  .game-grid, .practice-grid, .mission-library-grid { gap: 16px; }

  .game-card h3, .practice-grid .game-card h3 { font-size: 1.375rem; }
  .game-card p, .practice-grid .game-card p { font-size: var(--type-body); }
  .bottom-note { align-items: flex-start; }
  .note-icon { margin-top: 5px; }
  .guidance-options { flex-direction: column; }
  .guidance-choice { padding: 17px; }
  .mission-top { grid-template-columns: 1fr auto; }
  .mission-top > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .mission-top .step-count { grid-column: 2; grid-row: 1; font-size: var(--type-label); }
  .mission-track { margin-bottom: 30px; }
  .unscored { margin-left: 0; }
  .scenario { padding: 22px 20px; }
  .scenario blockquote { font-size: 1.375rem; }
  .answer-option { padding: 18px 14px; gap: 10px; }
  .option-letter { width: 28px; height: 28px; }
  .challenge-actions { gap: 16px; }
  .challenge-actions > .button { flex-grow: 1; }
  .feedback { padding: 22px 19px; }
  .source-tabs { padding-inline: 8px; }
  .source-tab { flex-direction: column; font-size: var(--type-label); gap: 8px; min-height: 88px; padding: 12px 2px; }
  .source-tab > span { font-size: var(--type-label); }
  .case-file article { padding: 24px 20px; }
  .concept-comparison, .position-panel { padding: 24px; }
  .position-comparison { grid-template-columns: 1fr; gap: 16px; }
  .position-panel h3 { font-size: 1.375rem; }
  .position-panel p, .concept-comparison p { font-size: var(--type-reading); }
  .position-panel .eyebrow, .concept-comparison > div > .eyebrow { font-size: var(--type-label); }
  .position-comparison .comparison-arrow span { font-size: var(--type-body); }
  .skill-row-top { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 10px 12px; }
  .skill-row-top > .mini-game-icon { grid-column: 1; grid-row: 1; width: 36px; height: 36px; }
  .skill-row-top > div { grid-column: 2; grid-row: 1; }
  .skill-row-top > .skill-status { grid-column: 2; grid-row: 2; margin: 0; justify-self: start; }
  .skill-row-top > .icon { grid-column: 3; grid-row: 1; }
  .skill-row h3 { font-size: var(--type-body); max-width: none; }
  .skill-status { font-size: var(--type-label); max-width: none; }
  .progress-stats { grid-template-columns: 1fr; }
  .progress-stats > div { display: grid; grid-template-columns: 24px 70px minmax(0, 1fr); align-items: center; gap: 12px; padding: 20px; }
  .progress-stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stat-icon { margin: 0; }
  .progress-stats strong { font-size: 2rem; }
  .progress-stats p { font-size: var(--type-body); max-width: none; margin: 0; }
  :root { --type-title: 2.5rem; --type-section: 1.625rem; }
  .featured-mission h2, .challenge h1 { font-size: 2.125rem; }
  .library-mission h3 { font-size: var(--type-section); }
  .page-intro, .welcome-layout { padding-top: 0; }
  .section-title, .practice-heading { gap: 16px; margin: 24px 0 16px; }
  .section-title > .small { width: 100%; }
  .challenge-label .unscored { flex-basis: 100%; padding-left: 48px; margin-top: -8px; }
  .mission-layout { max-width: none; }
  .skill-detail { margin-left: 0; }
  .progress-stats > div { grid-template-columns: 24px 80px minmax(0,1fr); }
  .progress-stats strong { white-space: nowrap; }
  .recap-stat-row { gap: 16px; }
  .recap-stat-row > div { min-width: 0; }
  .recap-stat-row strong { font-size: 2rem; }
  .recap-stat-row strong span { font-size: 1.125rem; }
  .source-tabs .source-tab > .icon { display: none; }
  .source-tab { overflow-wrap: anywhere; }
  .fiction-caption { margin: -8px 0 24px; }

  .recap-stat-row > div > span { font-size: var(--type-label); padding-inline: 0; }
  .recap-actions { flex-direction: column; }
  dialog { padding: 24px; max-height: calc(100svh - 32px); overflow-y: auto; }
}

@media (max-width: 360px) {
  .topbar { column-gap: 8px; }
  .topbar .guest { gap: 0; }
}

/* Accounts share the same readable scale as missions and progress. */
.account-link,.account-sync,.account-panel input,.account-panel label,.account-tabs button{font-size:var(--type-body);line-height:1.6}
.account-sync{font-size:var(--type-label)}
.account-panel h2{font-size:1.5rem;line-height:1.3}
.account-panel h3{font-size:1.25rem}
.account-panel p,.account-intro>p,.account-promise p{font-size:var(--type-body);line-height:1.75}
.account-panel .small,.account-intro>.small{font-size:var(--type-label)}
.promise-number{font-size:1.75rem}
@media(max-width:700px){.account-intro h1{font-size:2.125rem}}

.account-next h2{font-size:var(--type-section);line-height:1.25}
.account-next p,.account-import summary{font-size:var(--type-body);line-height:1.75}
