/* Learning platform design system.
   One stylesheet for every site the generator builds. A site sets --brand and
   --accent in its page head; everything else is shared, so a fix here lands on
   every course at once. Light and dark are both first-class. */

:root {
  --brand: #2D6BC4;
  --accent: #047857;
  --ink: #0F172A;
  --body: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --page: #F8FAFC;
  --card: #FFFFFF;
  --tint: #EFF6FF;
  --accent-tint: color-mix(in srgb, var(--accent) 10%, var(--card));
  --good: #047857;
  --good-tint: #ECFDF5;
  --bad: #B91C1C;
  --bad-tint: #FEF2F2;
  --warn: #92400E;
  --warn-tint: #FEF3C7;
  --focus: #F59E0B;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 900px;
  --wide: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F1F5F9;
    --body: #CBD5E1;
    --muted: #94A3B8;
    --line: #1E293B;
    --line-strong: #334155;
    --page: #0B1120;
    --card: #111827;
    --tint: #172036;
    --good: #34D399;
    --good-tint: #0B2A20;
    --bad: #F87171;
    --bad-tint: #2D1414;
    --warn: #FCD34D;
    --warn-tint: #2B2108;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F1F5F9; --body: #CBD5E1; --muted: #94A3B8; --line: #1E293B; --line-strong: #334155;
  --page: #0B1120; --card: #111827; --tint: #172036; --good: #34D399; --good-tint: #0B2A20;
  --bad: #F87171; --bad-tint: #2D1414; --warn: #FCD34D; --warn-tint: #2B2108; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: 1.4rem; margin-top: 0.2em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
strong { color: var(--ink); }
code { font-family: var(--mono); font-size: 0.92em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 4px; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li + li { margin-top: 0.3em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

math { font-size: 1.05em; }
.math-display { overflow-x: auto; padding: 0.5em 0; margin: 0 0 1em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* Header ---------------------------------------------------------------- */
.site-header { background: var(--brand); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 6px; max-width: var(--wide); }
.brand { color: #fff; font-weight: 750; font-size: 1.15rem; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background:
  linear-gradient(to top, #fff 0 30%, transparent 30%) 2px 100% / 4px 100% no-repeat,
  linear-gradient(to top, #fff 0 70%, transparent 70%) 9px 100% / 4px 100% no-repeat,
  linear-gradient(to top, #fff 0 50%, transparent 50%) 16px 100% / 4px 100% no-repeat;
  border-bottom: 2px solid #fff; }
.progress-chip { color: #fff; text-decoration: none; font-size: 0.85rem; display: inline-flex; gap: 8px; background: rgba(255, 255, 255, 0.16); padding: 4px 10px; border-radius: 999px; }
.chip-streak::before { content: "\00b7  "; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding-top: 2px; padding-bottom: 8px; overflow-x: auto; max-width: var(--wide); scrollbar-width: none; }
.site-nav li + li { margin-top: 0; }
.site-nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; white-space: nowrap; font-weight: 600; font-size: 0.95rem; display: block; opacity: 0.92; }
.site-nav a:hover { background: rgba(255, 255, 255, 0.14); opacity: 1; }
.site-nav a[aria-current="page"] { background: #fff; color: var(--brand); opacity: 1; }
/* On an umbrella site the course's name leads its section row, set off from the
   sections by a thin rule so it reads as "where you are", not one more tab. */
.site-nav .nav-course { display: flex; align-items: center; }
.site-nav .nav-course a { font-weight: 800; }
.site-nav .nav-course::after { content: ""; width: 1px; height: 1.2em; background: rgba(255, 255, 255, 0.35); margin-left: 6px; }

/* Breadcrumbs, heads ------------------------------------------------------ */
.crumbs ol { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.crumbs li + li { margin-top: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.76rem; font-weight: 700; color: var(--accent); margin: 0 0 6px; }
.page-head { margin-bottom: 26px; }
.page-meta { color: var(--muted); font-size: 0.95rem; }
.lede { font-size: 1.12rem; color: var(--ink); }
.source-note { color: var(--muted); font-size: 0.88rem; }

/* Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 650; font-size: 0.95rem; padding: 9px 16px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--brand); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* Home -------------------------------------------------------------------- */
.hero { padding: 18px 0 8px; }
.hero h1 { max-width: 760px; }
.hero p { font-size: 1.1rem; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.exam-chip { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 8px 14px; border-radius: 8px; font-size: 0.95rem; }
.exam-days { color: var(--accent); font-weight: 700; }
.section { margin: 40px 0; }
.section.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 720px) { .section.split { grid-template-columns: 1fr; } }

.unit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.unit-list li + li { margin-top: 0; }
.unit-link { display: grid; grid-template-columns: 88px 1fr; gap: 2px 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.unit-link:hover { border-color: var(--accent); }
.unit-num { grid-row: span 3; font-weight: 800; color: var(--accent); font-size: 0.95rem; padding-top: 2px; }
.unit-title { color: var(--ink); font-weight: 700; font-size: 1.08rem; }
.unit-meta { color: var(--muted); font-size: 0.9rem; }
.meter { display: block; height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s; }
@media (max-width: 560px) { .unit-link { grid-template-columns: 1fr; } .unit-num { grid-row: auto; } }

.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.card-grid li + li { margin-top: 0; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cols-4, .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr; } }
.card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.card a:hover { border-color: var(--accent); }
.card-kicker { font-size: 0.78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.card-title { color: var(--ink); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.card-text { color: var(--body); font-size: 0.93rem; }
/* Umbrella home: one card per course, each in its course's own accent. */
.course-grid .card a { border-top: 4px solid var(--accent); gap: 8px; }
.course-grid .card-title { font-size: 1.2rem; }
.course-counts { margin-top: auto; padding-top: 4px; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.course-status { display: block; margin-top: 6px; color: var(--warn); font-weight: 700; font-size: 0.85rem; }
/* A unit College Board does not test: said plainly, near the top of the page. */
.not-assessed { margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--warn); background: var(--warn-tint); color: var(--ink); font-weight: 600; border-radius: 0 6px 6px 0; }

/* Unit and topic lists ------------------------------------------------------ */
.topic-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.topic-list li + li { margin-top: 0; border-top: 1px solid var(--line); }
.topic-row > a, .topic-row.is-pending { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 16px; text-decoration: none; }
.topic-row > a:hover { background: var(--tint); }
.topic-num { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.topic-title { color: var(--ink); font-weight: 600; }
.topic-row.is-pending .topic-title { color: var(--muted); font-weight: 500; }
.topic-state { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.topic-state[data-state="solid"] { color: var(--good); font-weight: 700; }
.topic-state[data-state="progress"] { color: var(--brand); font-weight: 600; }
.link-list { padding-left: 1.2em; }

/* Lessons ----------------------------------------------------------------- */
.lesson .block { margin: 0 0 28px; }
.block-text h2 { margin-top: 36px; }
.predict, .example, .sort, .check, .lab-embed, .practice-embed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.predict { border-top: 4px solid var(--brand); }
.example { border-top: 4px solid var(--accent); }
.example-title { font-size: 1.15rem; display: flex; flex-direction: column; gap: 2px; }
.example-problem { padding-bottom: 6px; border-bottom: 1px dashed var(--line-strong); margin-bottom: 12px; }
.steps { margin-bottom: 8px; }
.steps .step { padding-left: 4px; }
.example-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.example-answer { background: var(--accent-tint); padding: 10px 14px; border-radius: 8px; }
.example-answer p:last-child { margin: 0; }
.callout { border-left: 4px solid var(--brand); background: var(--tint); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-label { font-weight: 800; color: var(--ink); margin-bottom: 4px; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; }
.callout-mistake { border-color: var(--bad); background: var(--bad-tint); }
.callout-exam { border-color: var(--accent); background: var(--accent-tint); }
.callout-vocab { border-color: var(--warn); background: var(--warn-tint); }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; min-width: 50%; background: var(--card); font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; color: var(--ink); padding-bottom: 6px; }
th, td { border: 1px solid var(--line-strong); padding: 7px 12px; text-align: left; }
thead th { background: var(--tint); color: var(--ink); }
tbody th { color: var(--ink); font-weight: 600; }
td { text-align: left; }
td.num, .two-way td, .dist-table td, .statement td, .reg-output td { text-align: right; }
.total-row th, .total-row td { font-weight: 700; background: var(--tint); }
.chart-block { margin: 0 0 1em; }
.chart-title { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.chart-caption { font-size: 0.9rem; color: var(--muted); }
.chart { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis, .chart .tick { stroke: var(--muted); stroke-width: 1.2; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick-label { fill: var(--body); font: 13px var(--sans); }
.chart .tick-label.z { fill: var(--muted); font-size: 11px; }
.chart .axis-title { fill: var(--ink); font: 600 13px var(--sans); }
.chart .bar { fill: var(--accent); fill-opacity: 0.85; stroke: var(--card); stroke-width: 1; }
.chart .dot { fill: var(--accent); }
.chart .outlier { fill: var(--card); stroke: var(--bad); stroke-width: 2; }
.chart .box { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 2; }
.chart .whisker, .chart .median { stroke: var(--ink); stroke-width: 2; }
.chart .median { stroke: var(--accent); stroke-width: 3; }
.chart .curve { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.chart .area { fill: var(--accent); fill-opacity: 0.35; }
.chart .fit { stroke: var(--brand); stroke-width: 2.5; }
.alignment { margin: 28px 0; color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); padding-top: 12px; }
.alignment summary { cursor: pointer; font-weight: 600; }
.pager { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.pager a { display: block; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.pager a[rel="next"], .pager a:last-child:not(:first-child) { text-align: right; }
.pager-dir { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager a { text-align: left !important; } }
.lab-more { font-size: 0.92rem; margin: 10px 0 0; }

/* Items ------------------------------------------------------------------ */
.check h2 { font-size: 1.2rem; }
.item { padding: 16px 0; border-top: 1px solid var(--line); }
.check .item:first-of-type { border-top: 0; padding-top: 4px; }
.item-stem { color: var(--ink); }
.item-stem p:last-child { margin-bottom: 10px; }
.item-num { float: left; font-weight: 800; color: var(--accent); margin-right: 8px; }
.item-hint { font-size: 0.9rem; color: var(--muted); }
.choices { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.choices li + li { margin-top: 0; }
.choice { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; width: 100%; text-align: left; font: inherit; color: var(--body); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 9px; padding: 10px 12px; cursor: pointer; min-height: 44px; }
.choice:hover:not(:disabled) { border-color: var(--brand); background: var(--tint); }
.choice .letter { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--ink); font-weight: 800; font-size: 0.85rem; }
.choice[aria-pressed="true"] { border-color: var(--brand); }
.choice.is-right { border-color: var(--good); background: var(--good-tint); }
.choice.is-right .letter { background: var(--good); color: #fff; }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-tint); }
.choice.is-wrong .letter { background: var(--bad); color: #fff; }
.choice:disabled { cursor: default; }
.choice-text p { margin: 0; }
.feedback:empty { display: none; }
.feedback { border-radius: 9px; padding: 12px 14px; margin-top: 6px; font-size: 0.97rem; }
.feedback.is-right { background: var(--good-tint); border: 1px solid var(--good); }
.feedback.is-wrong { background: var(--bad-tint); border: 1px solid var(--bad); }
.feedback.is-info { background: var(--tint); border: 1px solid var(--line-strong); }
.feedback p:last-child { margin-bottom: 0; }
.verdict { font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.try-again { font-weight: 600; color: var(--muted); }
.why + .why { margin-top: 6px; }
.numeric { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.numeric-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.numeric-input { font: inherit; width: 9em; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--ink); }
.numeric-input.is-right { border-color: var(--good); }
.numeric-input.is-wrong { border-color: var(--bad); }
.solution { margin-top: 8px; }
.solution summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.solution-steps { margin: 8px 0 0; }
.solution-steps li { margin-bottom: 6px; }

/* Sort ------------------------------------------------------------------- */
.sort-bins { display: grid; grid-template-columns: repeat(var(--bins), 1fr); gap: 10px; margin-bottom: 12px; }
@media (max-width: 560px) { .sort-bins { grid-template-columns: 1fr; } }
.sort-bin { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 10px; min-height: 90px; cursor: pointer; background: var(--page); }
.has-selection .sort-bin { border-color: var(--brand); background: var(--tint); }
.sort-bin-name { font-weight: 800; color: var(--ink); margin: 0 0 6px; font-size: 0.92rem; }
.sort-bin-cards { display: flex; flex-direction: column; gap: 6px; }
.sort-cards { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.sort-cards li + li { margin-top: 0; }
.sort-card { font: inherit; font-size: 0.93rem; text-align: left; background: var(--card); color: var(--ink); border: 1.5px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; cursor: pointer; width: 100%; }
.sort-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.sort-card.is-right { border-color: var(--good); background: var(--good-tint); }
.sort-card.is-wrong { border-color: var(--bad); background: var(--bad-tint); }
.sort-cards .sort-card { width: auto; }

/* Practice, daily, test --------------------------------------------------- */
.practice { margin-top: 10px; }
.practice-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.practice-pick { font: inherit; font-weight: 600; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); max-width: 100%; }
.practice-tally { font-size: 0.9rem; color: var(--muted); margin: 0; }
.practice-stage .item { border-top: 0; }
.practice-full { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.daily { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.daily-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.daily-date { font-weight: 700; color: var(--ink); margin: 0; }
.daily-marks { display: flex; gap: 6px; }
.mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; background: var(--page); border: 1.5px solid var(--line-strong); color: var(--muted); }
.mark.is-right { background: var(--good); border-color: var(--good); color: #fff; }
.mark.is-wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.daily-count { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.daily-summary { text-align: center; padding: 20px 0; }
.daily-score { font-size: 2.6rem; font-weight: 800; color: var(--ink); margin: 0; }
.daily-streak { color: var(--accent); font-weight: 700; }
.test-start { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.test-clock { position: sticky; top: 0; z-index: 2; background: var(--ink); color: var(--card); padding: 8px 14px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; }
.test-list { padding-left: 1.4em; }
.test-q { padding: 14px 0; border-bottom: 1px solid var(--line); }
.test-q.is-right { border-left: 4px solid var(--good); padding-left: 10px; }
.test-q.is-wrong { border-left: 4px solid var(--bad); padding-left: 10px; }
.mastery-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.mastery-cell { min-width: 48px; text-align: center; padding: 6px 8px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; background: var(--page); border: 1.5px solid var(--line-strong); color: var(--muted); }
.mastery-cell.is-started { border-color: var(--warn); color: var(--warn); }
.mastery-cell.is-progress { border-color: var(--brand); color: var(--brand); }
.mastery-cell.is-solid { background: var(--good); border-color: var(--good); color: #fff; }

/* Exam and FRQ ------------------------------------------------------------ */
.frq-types li { margin-bottom: 8px; }
.frq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.frq-parts { list-style: none; padding: 0; }
.frq-parts > li { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.frq-label { font-weight: 800; color: var(--accent); margin: 0 0 4px; }
.rubric-ex { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 3px; }
.frq-response-label { display: block; font-size: 0.85rem; color: var(--muted); margin: 8px 0; }
.frq-response { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 0.97rem; padding: 10px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--page); color: var(--ink); resize: vertical; }
.rubric { margin-top: 8px; background: var(--page); border-radius: 8px; padding: 10px 12px; }
.rubric summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.rubric-list { list-style: none; padding: 0; margin: 10px 0; }
.rubric-list li + li { margin-top: 10px; }
.rubric-list label { display: grid; grid-template-columns: 22px 64px 1fr; gap: 8px; align-items: baseline; }
.rubric-points { font-weight: 800; color: var(--accent); font-size: 0.85rem; }
.sample { border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.frq-score { font-size: 1.1rem; margin-top: 16px; }

/* Labs -------------------------------------------------------------------- */
.lab { margin: 6px 0 10px; }
.lab-full { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.lab-embed .lab-grid { grid-template-columns: 1fr; }
@media (max-width: 860px) { .lab-grid { grid-template-columns: minmax(0, 1fr); } }
.lab-grid > * { min-width: 0; }
.lab-canvas { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.lab-canvas svg { width: 100%; height: auto; display: block; touch-action: none; }
.lab-panel { display: flex; flex-direction: column; gap: 12px; }
.lab-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.lab-row label { font-weight: 650; color: var(--ink); font-size: 0.93rem; }
.lab-row output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.lab-row input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.lab-row select, .lab-row input[type="number"], .lab-row input[type="text"] { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); grid-column: 1 / -1; width: 100%; min-width: 0; }
.lab-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.readouts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.readout { background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.readout-label { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.readout-value { display: block; font-size: 1.15rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.lab-note { font-size: 0.92rem; background: var(--tint); border-radius: 8px; padding: 10px 12px; margin: 0; }
.lab-note.is-right { background: var(--good-tint); }
.lab-note.is-wrong { background: var(--bad-tint); }
.lab-error { color: var(--bad); }
.svg-text { fill: var(--body); font: 13px var(--sans); }
.svg-label { fill: var(--ink); font: 700 13px var(--sans); }
.svg-axis { stroke: var(--muted); stroke-width: 1.2; }
.svg-grid { stroke: var(--line); stroke-width: 1; }
.svg-curve { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.svg-area { fill: var(--accent); fill-opacity: 0.35; }
.svg-bar { fill: var(--accent); fill-opacity: 0.8; }
.svg-bar-alt { fill: var(--brand); fill-opacity: 0.75; }
.svg-dot { fill: var(--accent); }
.svg-dot-alt { fill: var(--brand); }
.svg-line { stroke: var(--brand); stroke-width: 2.5; }
.svg-line-accent { stroke: var(--accent); stroke-width: 2.5; }
.svg-hit { stroke: var(--good); stroke-width: 3; }
.svg-miss { stroke: var(--bad); stroke-width: 3; }
.svg-truth { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
.svg-handle { fill: var(--card); stroke: var(--accent); stroke-width: 3; cursor: grab; }
.svg-resid { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 3 3; }
.svg-square { fill: var(--bad); fill-opacity: 0.12; stroke: var(--bad); stroke-width: 1; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 22px 0 30px; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0 0 6px; }
.footer-links a { color: var(--body); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .pager, .practice, .lab, .example-controls, .btn { display: none !important; }
  .steps .step, .example-answer { display: list-item !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
}

/* Trainer labs ------------------------------------------------------------ */
.scope-card, .describe-qs { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.scope-text { color: var(--ink); font-size: 1.02rem; }
.scope-q { margin: 12px 0; }
.scope-q-label { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.scope-q .btn[aria-pressed="true"] { border-color: var(--brand); background: var(--tint); }
.scope-q .btn.is-right { border-color: var(--good); background: var(--good-tint); }
.scope-q .btn.is-wrong { border-color: var(--bad); background: var(--bad-tint); }
.scope-grid { margin-top: 10px; font-size: 0.9rem; width: 100%; }
.scope-grid td { text-align: center; }
.scope-grid td.is-here { background: var(--accent); color: #fff; font-weight: 700; }
.dist-table table { font-size: 0.82rem; }
.dist-table td, .dist-table th { padding: 4px 7px; }
.dist-table tfoot td, .dist-table tfoot th { background: var(--tint); font-weight: 700; }
@media (max-width: 560px) {
  .site-nav ul { flex-wrap: wrap; overflow-x: visible; gap: 2px; }
  .site-nav a { padding: 5px 9px; font-size: 0.9rem; }
}

.unit-part { margin: 18px 0 8px; font-size: 1.05rem; color: var(--accent); }
.statement td.pct { color: var(--muted); font-size: 0.85rem; text-align: left; }
.statement .line-sub th, .statement .line-sub td { font-weight: 700; border-top: 2px solid var(--line-strong); }
.statement .line-total th, .statement .line-total td { font-weight: 800; background: var(--accent-tint); border-top: 3px double var(--ink); }
.decision td { text-align: center; }
.mini-num { width: 4em; font: inherit; padding: 4px 6px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); text-align: center; }
