:root {
  /* Public page uses the published screhub sand palette and reading roles. */
  --canvas: #f5efdf;
  --paper: #fffaf0;
  --ink: #3c352a;
  --muted: #6b604f;
  --line: #ded4bd;
  --line-strong: #cfc2a7;
  --control-line: #8a7c62;
  --accent: #725e3b;
  --accent-strong: #5c492c;
  --accent-soft: #e8dcc2;
  --concept: #684451;
  --concept-mark: #9b6b7e;
  --practice: #455a43;
  --practice-mark: #6d8066;
  --practice-tint: #eff3ec;
  --caution-mark: #947c4d;
  --caution-tint: #f8f2e7;
  --wash: linear-gradient(114deg, #faf5e9 0%, #f5efdf 48%, #efe4cd 100%);
  --card-wash: linear-gradient(112deg, #fffaf0 4%, #f7efdf 53%, #ebdcc0 100%);
  --sans: 'Segoe UI Variable', 'Segoe UI', Arial, sans-serif;
  --display: Georgia, 'Times New Roman', serif;
  color-scheme: light;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-block-start: 18px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.56 var(--sans); }
p, h1, h2, h3, ol, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--accent-soft); }
.wrap { width: min(1140px, calc(100% - 88px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: 9px; left: 12px; padding: 9px 14px; background: var(--paper); transform: translateY(-165%); }
.skip-link:focus { transform: none; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 73px; }
.brand, .masthead nav, .nav-login, .button-primary, .text-link { display: inline-flex; align-items: center; }
.brand { gap: 12px; min-width: 0; }
.brand img { width: auto; height: 42px; flex: none; }
.brand-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-copy strong { font: 650 23px/1.1 'Segoe UI', Arial, sans-serif; letter-spacing: -.8px; }
.brand-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.masthead nav { gap: 7px; font-size: 15px; font-weight: 600; }
.section-link, .nav-login { display: inline-flex; align-items: center; min-height: 44px; border-radius: 6px; }
.section-link { padding: 6px 10px; color: var(--accent-strong); }
.section-link:hover, .nav-login:hover { background: var(--accent-soft); }
.nav-login { gap: 12px; margin-inline-start: 6px; padding: 7px 15px; border: 1px solid var(--control-line); color: var(--accent-strong); }

.cover { background: var(--wash); border-bottom: 1px solid var(--line); }
.cover-inner { display: grid; grid-template-columns: minmax(0, 1fr) clamp(266px, 30vw, 380px); align-items: center; gap: clamp(27px, 4.5vw, 64px); padding-block: clamp(35px, 3.9vw, 57px); }
.section-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.cover h1 { margin-top: 10px; font: 400 clamp(47px, 4.55vw, 67px)/1.09 var(--display); letter-spacing: -.037em; }
.cover h1 span { display: block; }
.cover h1 em { color: var(--accent-strong); font-weight: 400; }
.cover-intro { max-width: 52ch; margin-top: 18px; font-size: clamp(17px, 1.32vw, 19px); line-height: 1.55; }
.cover-actions, .entry-actions { display: flex; gap: 7px 19px; align-items: center; flex-wrap: wrap; }
.cover-actions { margin-top: 22px; }
.button-primary { justify-content: space-between; min-height: 45px; gap: 18px; padding: 9px 16px; border: 1px solid var(--accent-strong); border-radius: 6px; background: var(--accent); color: var(--paper); font: 600 16px/1.44 var(--sans); }
.button-primary:hover { background: var(--accent-strong); }
.text-link { gap: 8px; min-height: 44px; color: var(--accent-strong); font: 600 15px/1.45 var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2px; }

.cover-portrait { width: 100%; justify-self: end; }
.cover-portrait img { width: 100%; }
.board-drawing figcaption { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.editorial { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); column-gap: clamp(34px, 5.5vw, 80px); padding-block: clamp(35px, 4.4vw, 67px); }
.course { grid-template-areas: 'intro steps' 'exam steps'; grid-template-rows: auto 1fr; row-gap: 19px; }
.course .section-intro { grid-area: intro; }
.course-routes { margin: 15px 0 0; }
.course-routes > div { padding-block: 11px 0; }
.course-routes > div + div { margin-top: 12px; border-top: 1px solid var(--line); }
.course-routes dt { color: var(--accent-strong); font: 650 18px/1.4 var(--sans); }
.course-routes dd { margin: 4px 0 0; max-width: 47ch; color: var(--muted); }
.course-example { grid-area: steps; align-self: start; }
.course-example > h3 { font: 600 clamp(22px, 2vw, 29px)/1.22 var(--sans); letter-spacing: -.02em; }
.course-example > p { margin: 9px 0 15px; max-width: 55ch; color: var(--muted); }
.section-intro h2, .board-copy h2, .entry h2 { margin-top: 5px; font: 600 clamp(28px, 2.65vw, 39px)/1.17 var(--sans); letter-spacing: -.03em; }
.section-intro > p:not(.section-label), .board-copy > p:not(.section-label) { max-width: 45ch; margin-top: 13px; color: var(--muted); font-size: 16px; }
.concept-term { font-weight: 600; color: var(--concept); text-decoration: underline; text-decoration-color: var(--concept-mark); text-underline-offset: .18em; }
.course-steps, .practice-chart { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.course-steps { padding: 3px 22px 4px 52px; }
.course-steps li { padding: 13px 0 14px 4px; }
.course-steps li + li { border-top: 1px solid var(--line); }
.course-steps li::marker { color: var(--accent-strong); font-size: 16px; font-weight: 650; }
.course-steps h3 { font: 650 18px/1.42 var(--sans); }
.course-steps p { max-width: 60ch; margin-top: 4px; color: var(--muted); }
.course-steps .correction { margin-top: 7px; padding: 5px 10px; border-inline-start: 2px solid var(--caution-mark); background: var(--caution-tint); color: var(--ink); }
.exam-note { grid-area: exam; align-self: start; max-width: 43ch; padding-top: 11px; border-top: 1px solid var(--line); }
.exam-note strong { font-size: 15px; font-weight: 650; }
.exam-note p { margin-top: 2px; color: var(--muted); font-size: 15px; }

@media (width > 760px) {
  .course {
    grid-template-areas:
      'label label'
      'title steps'
      'summary steps'
      'routes steps'
      'exam steps';
    grid-template-rows: auto auto auto auto 1fr;
    row-gap: 0;
  }
  .course .section-intro { display: contents; }
  .course .section-label { grid-area: label; margin-bottom: 5px; }
  .course .section-intro > h2 { grid-area: title; margin-top: 0; }
  .course .section-intro > p:not(.section-label) { grid-area: summary; }
  .course-routes { grid-area: routes; }
  .course .exam-note { margin-top: 19px; }
}

.together { background: var(--paper); border-block: 1px solid var(--line); }
.board-inner { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: center; gap: clamp(38px, 6vw, 84px); padding-block: clamp(32px, 3.6vw, 56px); }
.board-copy { grid-column: 2; grid-row: 1; }
.board-drawing { grid-column: 1; grid-row: 1; }
.board-drawing img { width: min(100%, 420px); margin-inline: auto; }
.board-drawing figcaption { text-align: center; }

.practice { align-items: center; }
.practice-chart { min-width: 0; padding: 17px 21px 14px; }
.practice-chart figcaption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; }
.practice-chart figcaption strong { font: 650 20px/1.35 var(--sans); }
.practice-chart figcaption span { color: var(--muted); font-size: 13px; }
.practice-metric { margin-top: 15px; }
.practice-metric h3 { margin: 0 0 5px; font: 600 16px/1.4 var(--sans); }
.practice-metric h3 small { margin-inline-start: 4px; color: var(--muted); font: 400 13px/1.4 var(--sans); }
.practice-metric svg { display: block; width: 100%; }
.practice-metric svg text { text-anchor: middle; fill: var(--ink); font: 600 16px var(--sans); font-variant-numeric: tabular-nums; }
.metric-baseline { stroke: var(--line); }
.response-bar rect { fill: var(--control-line); }
.response-bar.latest rect { fill: var(--accent-strong); }
.accuracy-line, .accuracy-point circle { stroke: var(--practice); stroke-width: 2; }
.accuracy-point circle { fill: var(--paper); }
.accuracy-point.latest circle { fill: var(--practice); }
.period-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); color: var(--muted); font-size: 13px; line-height: 1.4; text-align: center; }
.practice-comparison { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.48; }
.practice-comparison strong { color: var(--ink); font-weight: 600; }

.entry { border-block: 1px solid var(--line); background: var(--card-wash); }
.entry-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding-block: clamp(23px, 2.8vw, 42px); }
.entry h2 { margin: 0; font-size: clamp(25px, 2.1vw, 31px); }
.entry p { max-width: 55ch; margin-top: 7px; color: var(--muted); }
.entry-actions { justify-content: flex-end; flex-shrink: 0; }
.footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-block: 17px; color: var(--muted); font-size: 13px; }
.footer-wordmark { color: var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.8px; }
.footer > span:last-child { margin-left: auto; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }
  .cover-inner { gap: 28px; }
  .editorial { column-gap: 32px; }
  .board-inner { gap: 30px; }
  .entry-actions { flex-direction: column; gap: 0; }
}
@media (max-width: 760px) {
  .wrap { width: min(615px, calc(100% - 36px)); }
  .masthead-inner { min-height: 65px; }
  .masthead .section-link { display: none; }
  .brand { gap: 8px; }
  .brand img { height: 34px; }
  .brand-copy strong { font-size: 21px; }
  .brand-copy small { font-size: 10px; }
  .cover-inner { grid-template-columns: minmax(0, 1fr); padding-block: 27px 23px; gap: 14px; }
  .cover h1 { font-size: clamp(41px, 7.4vw, 54px); }
  .cover-intro { margin-top: 12px; font-size: 17px; }
  .cover-actions { margin-top: 15px; }
  .cover-portrait { width: min(100%, 300px); justify-self: center; }
  .board-drawing figcaption { font-size: 13px; }
  .editorial { grid-template-columns: minmax(0, 1fr); padding-block: 31px; }
  .course { grid-template-areas: 'intro' 'steps' 'exam'; gap: 15px; }
  .section-intro h2, .board-copy h2 { font-size: clamp(26px, 5vw, 32px); }
  .section-intro > p:not(.section-label), .board-copy > p:not(.section-label) { margin-top: 9px; }
  .course-steps { padding: 2px 15px 3px 39px; }
  .course-steps li { padding: 11px 0 12px 2px; }
  .exam-note { border: 0; padding: 0; }
  .board-inner { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 26px; }
  .board-copy, .board-drawing { grid-column: auto; grid-row: auto; }
  .board-drawing img { width: min(100%, 340px); }
  .practice { gap: 16px; }
  .practice-chart { padding: 14px; }
  .entry-inner { flex-direction: column; align-items: flex-start; gap: 13px; }
  .entry-actions { flex-direction: row; justify-content: flex-start; gap: 3px 14px; }
}
@media (max-width: 395px) {
  .wrap { width: calc(100% - 32px); }
  .cover h1 em { white-space: nowrap; }
  .nav-login { padding-inline: 12px; }
  .cover-actions { column-gap: 13px; }
  .button-primary { padding-inline: 12px; gap: 10px; }
  .text-link { font-size: 14px; gap: 5px; }
  .footer > span:last-child { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
