:root {
  --ink: #15231f;
  --paper: #f3f0e7;
  --white: #fffdf8;
  --mint: #b8f2cf;
  --green: #0d6b4d;
  --lime: #d9f06b;
  --orange: #e66a36;
  --red: #b33a32;
  --line: #c8c4b8;
  --muted: #65716b;
  --shadow: 0 18px 50px rgba(21, 35, 31, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.masthead { position: sticky; top: 0; z-index: 20; min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 10px clamp(18px, 4vw, 64px); color: white; background: var(--ink); border-bottom: 1px solid #30443d; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; width: max-content; }
.brand-mark { width: 42px; height: 48px; display: grid; place-content: center; line-height: .72; font-family: Georgia, serif; font-size: 22px; color: var(--ink); background: var(--lime); border-radius: 2px 12px 2px 2px; }
.brand strong, .brand small { display: block; }.brand small { margin-top: 3px; color: #b9c5c0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 6px; padding: 5px; background: #24362f; border-radius: 999px; }
.nav-button { border: 0; padding: 9px 18px; color: #cdd6d2; background: transparent; border-radius: 999px; cursor: pointer; }
.nav-button.active { color: var(--ink); background: var(--mint); }
.score-strip { justify-self: end; display: flex; gap: 18px; font-size: .78rem; color: #bdc8c4; }.score-strip b { color: white; font-size: 1rem; }
main { width: min(1480px, 100%); margin: auto; padding: 0 clamp(18px, 4vw, 64px) 72px; }
.view { animation: appear .3s ease both; }.view:not(.active) { display: none; }
.hero { max-width: 900px; padding: clamp(48px, 8vw, 104px) 0 42px; }.hero.compact { padding-bottom: 26px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }h1 { margin-bottom: 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 7vw, 6.7rem); font-weight: 500; line-height: .92; letter-spacing: -.055em; }h2 { font-size: clamp(1.45rem, 2vw, 2.1rem); }h3 { font-size: 1.25rem; }
.hero > p:last-child { max-width: 720px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.65; }
.practice-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }.practice-toolbar label { font-weight: 750; }.practice-toolbar select { min-width: 210px; padding: 12px 38px 12px 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; }.practice-toolbar .button { margin-left: auto; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid transparent; border-radius: 7px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }.button:hover { transform: translateY(-1px); }.button.primary { color: white; background: var(--green); box-shadow: 0 8px 20px rgba(13,107,77,.18); }.button.secondary { color: var(--ink); background: var(--mint); }.button.ghost { color: var(--ink); background: transparent; border-color: var(--line); }.button.danger { color: var(--red); background: transparent; border-color: #d9a7a3; }
.exercise-card { padding: clamp(18px, 3vw, 42px); background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.exercise-head { display: flex; justify-content: space-between; gap: 30px; }.exercise-head > div { max-width: 850px; }.exercise-head h2 { margin: 18px 0 10px; }.exercise-head p { color: var(--muted); line-height: 1.6; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }.badge { padding: 6px 9px; color: #385049; background: #e8ebe7; border-radius: 5px; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.badge.strong { color: var(--ink); background: var(--lime); }.question-number { flex: none; color: #86918c; font: 700 2rem/1 Georgia,serif; }
.given-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 1px; margin: 28px 0 16px; background: var(--line); border: 1px solid var(--line); }.given { min-height: 88px; padding: 16px; background: var(--paper); }.given span { display: block; color: var(--muted); font-size: .74rem; }.given strong { display: block; margin-top: 7px; font-size: 1.15rem; }
.notice { padding: 12px 15px; color: #5c4911; background: #fff1b9; border-left: 4px solid #c89c13; line-height: 1.5; }
.chart-actions { display: flex; gap: 10px; margin: 24px 0 14px; }
.chart-frame { position: relative; margin: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 10px; }.chart-frame img { display: block; width: 100%; height: auto; }.chart-frame figcaption { padding: 10px 14px; color: var(--muted); background: var(--paper); font-size: .76rem; }.chart-frame svg { position: absolute; inset: 0 0 auto 0; width: 100%; height: calc(100% - 38px); overflow: visible; pointer-events: none; }.chart-frame polyline { fill: none; stroke: var(--orange); stroke-width: .7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 1px white); }.chart-frame circle { fill: var(--lime); stroke: var(--ink); stroke-width: .35; vector-effect: non-scaling-stroke; }.chart-frame text { fill: var(--ink); font: 700 3.2px/1 sans-serif; paint-order: stroke; stroke: white; stroke-width: .7px; }
#answer-form { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }.form-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }.form-heading h3 { margin-bottom: 0; }.form-heading > p { color: var(--muted); font-size: .85rem; }
.answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }.field { position: relative; padding: 12px 12px 9px; background: #f7f5ef; border: 1px solid var(--line); border-radius: 8px; }.field label { display: block; min-height: 34px; color: #3e4d47; font-size: .78rem; font-weight: 700; }.input-row { display: flex; align-items: center; gap: 8px; }.field input { min-width: 0; width: 100%; padding: 10px; color: var(--ink); background: white; border: 1px solid #aeb7b2; border-radius: 5px; }.unit { min-width: max-content; color: var(--muted); font-size: .76rem; }.field-feedback { min-height: 18px; margin: 6px 0 0; font-size: .72rem; }.field.correct { border-color: var(--green); background: #e8f5ed; }.field.close { border-color: #b58100; background: #fff5d4; }.field.incorrect { border-color: var(--red); background: #fbe8e6; }.form-actions { display: flex; gap: 10px; }
.results { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }.result-summary { margin-bottom: 24px; padding: 18px 20px; background: var(--ink); color: white; border-radius: 8px; font-weight: 700; }.worked-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }.worked-grid ol { padding-left: 22px; }.worked-grid li { margin: 12px 0; line-height: 1.55; }.worked-grid aside { padding: 24px; background: var(--mint); border-radius: 10px; }.small { color: #4b5e57; font-size: .8rem; line-height: 1.55; }
.standards-panel { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 26px; border: 1px solid var(--line); }.standards-panel > div { padding: 28px; border-right: 1px solid var(--line); }.standards-panel > div:last-child { border: 0; }.standards-panel h2 { margin: 12px 0 8px; font-size: 1.2rem; }.standards-panel p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }.section-index { color: var(--orange); font: 700 1.5rem/1 Georgia,serif; }
.reference-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }.reference-card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }.reference-card h2 { margin: 13px 0 7px; }.reference-card p { color: var(--muted); font-size: .84rem; line-height: 1.55; }.reference-card a { font-size: .8rem; font-weight: 750; }.archive-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0; color: white; background: #475a52; border-radius: 12px; overflow: hidden; }.archive-panel > div { padding: 28px; background: var(--ink); }.archive-panel .eyebrow { color: var(--lime); }.archive-panel p:last-child { color: #c6d0cc; line-height: 1.6; }.sources { margin: 26px 0; padding: 20px 24px; background: #e7e3d8; border-left: 4px solid var(--orange); }.sources p { margin: 8px 0; line-height: 1.5; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px clamp(18px, 4vw, 64px); color: #b9c5c0; background: var(--ink); font-size: .78rem; }footer p { margin: 0; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
@media (max-width: 900px) { .masthead { grid-template-columns: 1fr auto; }.score-strip { display: none; }.given-grid { grid-template-columns: repeat(2,1fr); }.answer-grid { grid-template-columns: repeat(2,1fr); }.worked-grid, .standards-panel { grid-template-columns: 1fr; }.standards-panel > div { border-right: 0; border-bottom: 1px solid var(--line); }.reference-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .masthead { position: static; grid-template-columns: 1fr; }.brand { margin: auto; }.masthead nav { justify-self: center; }.hero { padding-top: 50px; }.practice-toolbar { align-items: stretch; flex-direction: column; }.practice-toolbar .button { margin-left: 0; }.exercise-head { display: block; }.question-number { display: block; margin-top: 12px; }.given-grid, .answer-grid, .reference-grid, .archive-panel { grid-template-columns: 1fr; }.chart-actions, .form-actions { flex-direction: column; }.form-heading { display: block; }.worked-grid { gap: 20px; } footer { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .masthead, .hero, .practice-toolbar, .no-print, #answer-form, .results, .standards-panel, footer, .notice { display: none !important; } body, main { background: white; } main { width: 100%; padding: 0; }.exercise-card { padding: 0; border: 0; box-shadow: none; }.exercise-head { margin-bottom: 12px; }.chart-frame { break-inside: avoid; }.chart-frame svg { display: none; } }
