/* School Supply List — design system
   Brand palette from the schoolhouse logo: coral roof, orange walls, mint
   flag, cream door; warm ink for text. Charts use their own validated
   data palette (--viz-*), never the brand colors. */

:root {
  --c-coral: #ee5a4c;
  --c-coral-600: #d9473b;
  --c-coral-50: #fdecea;
  --c-orange: #ff9f43;
  --c-orange-50: #fff3e6;
  --c-mint: #4cc3ad;
  --c-mint-700: #23866f;
  --c-mint-50: #e3f6f1;
  --c-cream: #fff7ec;
  --c-ink: #2b1d17;
  --c-text: #3d302a;
  --c-muted: #7a6c64;
  --c-faint: #a99c94;
  --c-bg: #fffbf6;
  --c-surface: #ffffff;
  --c-border: #efe4d8;
  --c-border-strong: #e2d3c4;
  --c-success: #1f9d6b;
  --c-success-50: #e5f5ee;
  --c-warning: #c47a12;
  --c-warning-50: #fff4dd;
  --c-danger: #c8392f;
  --c-danger-50: #fdeceb;

  /* data palette (dataviz reference: status + one blue ramp) */
  --viz-good: #0ca30c;
  --viz-warning: #fab219;
  --viz-serious: #ec835a;
  --viz-critical: #d03b3b;
  --viz-neutral: #b9b1aa;
  --viz-empty: #7d736c;  /* link found, list empty: the darker neutral, beside "no list found" */
  --viz-450: #2a78d6;
  --viz-200: #9ec5f4;
  --viz-surface: #fcfcfb;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(43, 29, 23, .06);
  --shadow: 0 1px 2px rgba(43, 29, 23, .05), 0 8px 24px -12px rgba(43, 29, 23, .18);
  --shadow-lg: 0 24px 60px -24px rgba(43, 29, 23, .30);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-coral-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--c-muted); }
.faint { color: var(--c-faint); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.icon { display: inline-block; vertical-align: -.18em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- header ------------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 251, 246, .88);
  backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--c-border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--c-ink); font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span em { font-style: normal; color: var(--c-coral); }
.nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav a, .nav button.linkish {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
  color: var(--c-text); font-weight: 600; font-size: .94rem; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.linkish:hover { background: var(--c-orange-50); text-decoration: none; }
.nav a.active { background: var(--c-coral-50); color: var(--c-coral-600); }
.nav a.btn-primary { background: var(--c-coral); color: #fff; padding: 8px 16px; }
.nav a.btn-primary:hover { background: var(--c-coral-600); }
.nav .pill-count { background: var(--c-coral); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; line-height: 1.6; }
.nav form { margin: 0; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
         background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--c-border); border-radius: 10px; padding: 7px; cursor: pointer; color: var(--c-ink); }
}

/* --- buttons ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap;
  color: var(--c-ink); background: var(--c-surface); border-color: var(--c-border-strong);
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-sm); background: var(--c-cream); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-coral); color: #fff; border-color: var(--c-coral); box-shadow: 0 6px 16px -8px rgba(238, 90, 76, .8); }
.btn-primary:hover { background: var(--c-coral-600); border-color: var(--c-coral-600); }
.btn-mint { background: var(--c-mint-700); color: #fff; border-color: var(--c-mint-700); }
.btn-mint:hover { background: #1b6f5c; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--c-orange-50); box-shadow: none; }
.btn-danger { color: var(--c-danger); }
.btn-sm { padding: 7px 12px; font-size: .86rem; border-radius: 10px; }
.btn-lg { padding: 15px 24px; font-size: 1.02rem; border-radius: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* --- cards, badges --------------------------------------------------------------------- */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--c-border); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 18px 22px; }
.badge {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: var(--c-cream); color: var(--c-muted); border: 1px solid var(--c-border);
}
.badge-success { background: var(--c-success-50); color: var(--c-success); border-color: #c4ead9; }
.badge-warning { background: var(--c-warning-50); color: var(--c-warning); border-color: #f6dfaa; }
.badge-danger { background: var(--c-danger-50); color: var(--c-danger); border-color: #f5c9c5; }
.badge-mint { background: var(--c-mint-50); color: var(--c-mint-700); border-color: #c3ebe1; }
.badge-coral { background: var(--c-coral-50); color: var(--c-coral-600); border-color: #f8cbc5; }
.chip { display: inline-flex; align-items: center; gap: 6px; color: var(--c-muted); font-size: .9rem; }

/* --- forms ------------------------------------------------------------------------------ */
label { font-weight: 650; color: var(--c-ink); font-size: .92rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .help { color: var(--c-muted); font-size: .82rem; }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--c-danger); font-size: .85rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--c-ink); background: var(--c-surface); border: 1.5px solid var(--c-border-strong);
  border-radius: 12px; padding: 11px 14px; transition: border-color .15s ease, box-shadow .15s ease; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-coral); box-shadow: 0 0 0 4px rgba(238, 90, 76, .14); }
input[type=file] { font: inherit; font-size: .9rem; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--c-coral); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
.choice-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice-cards label { cursor: pointer; }
.choice-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius); background: var(--c-surface); transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c-cream); color: var(--c-coral); flex: none; }
.choice-card strong { display: block; color: var(--c-ink); }
.choice-card span { color: var(--c-muted); font-size: .84rem; font-weight: 500; }
.choice-card:has(input:checked) { border-color: var(--c-coral); background: var(--c-coral-50); box-shadow: 0 0 0 3px rgba(238, 90, 76, .12); }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1.5px solid var(--c-border-strong); border-radius: 12px; font-weight: 600; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--c-coral); background: var(--c-coral-50); }
.radio-list input { accent-color: var(--c-coral); }

/* --- messages ------------------------------------------------------------------------- */
.messages { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 10px; max-width: 380px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--c-ink); color: #fff;
         box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem; animation: toast-in .25s ease; }
.toast.error { background: var(--c-danger); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* --- hero / home ----------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px;
        background: radial-gradient(1100px 380px at 85% -10%, var(--c-orange-50), transparent 70%),
                    radial-gradient(800px 360px at -10% 110%, var(--c-mint-50), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 span { color: var(--c-coral); }
.hero .lead { font-size: 1.12rem; color: var(--c-muted); max-width: 560px; }
.hero-art { justify-self: end; width: 100%; max-width: 420px; filter: drop-shadow(0 30px 40px rgba(43, 29, 23, .12)); }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: .82rem; letter-spacing: .04em;
           text-transform: uppercase; color: var(--c-mint-700); background: var(--c-mint-50); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { display: none; } .hero { padding: 40px 0 48px; } }

.search-card { margin-top: 26px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 10px; box-shadow: var(--shadow-lg); }
.search-card form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; }
.search-card .q { grid-column: 1 / -1; }
.search-card input, .search-card select { border: 0; background: var(--c-cream); min-height: 52px; }
.search-card input:focus, .search-card select:focus { box-shadow: 0 0 0 3px rgba(238, 90, 76, .18); }
@media (max-width: 900px) { .search-card form { grid-template-columns: 1fr 1fr; } .search-card button { grid-column: 1 / -1; } }

.stats-strip { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; color: var(--c-muted); font-size: .92rem; }
.stats-strip strong { display: block; color: var(--c-ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }

.section { padding: 56px 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-title p { margin: 0; color: var(--c-muted); }
.steps { counter-reset: step; }
.step { position: relative; padding: 26px; }
.step .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; }
.step:nth-child(1) .ic { background: var(--c-coral-50); color: var(--c-coral); }
.step:nth-child(2) .ic { background: var(--c-orange-50); color: #d97a1c; }
.step:nth-child(3) .ic { background: var(--c-mint-50); color: var(--c-mint-700); }
.cta-band { background: var(--c-ink); color: #f6ece4; border-radius: var(--radius-lg); padding: 34px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #d6c8bf; }

/* --- school cards / results ----------------------------------------------------------------- */
.school-card { display: flex; gap: 16px; padding: 18px; align-items: flex-start; color: inherit; transition: transform .12s ease, box-shadow .15s ease, border-color .15s; }
.school-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c-border-strong); }
.school-avatar { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--c-orange-50); color: #d97a1c; font-weight: 800; }
.school-card h3 { margin: 0 0 4px; font-size: 1.04rem; }
.school-card .meta { display: flex; gap: 4px 14px; flex-wrap: wrap; color: var(--c-muted); font-size: .86rem; }
.school-card .meta .chip { white-space: nowrap; font-size: .86rem; }
.school-card .badge { white-space: nowrap; }
.school-card .status { margin-left: auto; }
.results { display: grid; gap: 12px; }
.filters { position: sticky; top: 88px; }
.layout-side { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.layout-main { grid-template-columns: minmax(0, 1fr) 300px; }
.layout-form { grid-template-columns: 420px minmax(0, 1fr); }
@media (max-width: 900px) { .layout-side, .layout-main, .layout-form { grid-template-columns: minmax(0, 1fr); } .filters, .side-card { position: static; } }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.empty { text-align: center; padding: 48px 24px; }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--c-cream); color: var(--c-coral); }

/* --- school page ------------------------------------------------------------------------- */
.school-hero { padding: 34px 0 26px; background: linear-gradient(180deg, var(--c-orange-50), transparent); border-bottom: 1px solid var(--c-border); }
.school-hero .facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--c-muted); font-size: .94rem; margin-top: 6px; }
.crumbs { font-size: .86rem; color: var(--c-muted); margin-bottom: 10px; }
.crumbs a { color: var(--c-muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 18px; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--c-muted); border: 1px solid var(--c-border); background: var(--c-surface); }
.tabs a:hover { text-decoration: none; border-color: var(--c-border-strong); }
.tabs a.active { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.tabs a .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-mint); margin-left: 6px; vertical-align: middle; }
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); border: 1px solid; margin-bottom: 18px; }
.banner p { margin: 0; }
.banner-info { background: var(--c-mint-50); border-color: #c3ebe1; color: #1c5f50; }
.banner-warn { background: var(--c-warning-50); border-color: #f6dfaa; color: #7a4d0b; }
.banner-note { background: var(--c-cream); border-color: var(--c-border); color: var(--c-text); }
.list-card { overflow: hidden; }
.list-card + .list-card { margin-top: 16px; }
.list-card .card-head { align-items: flex-start; }
.list-card .card-head .sub { color: var(--c-muted); font-size: .86rem; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.grade-block { border-top: 1px dashed var(--c-border); }
.grade-block.single summary { display: none; }
.grade-block.single .items { padding-top: 14px; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; font-size: .88rem; }
.jump a { padding: 5px 11px; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text); font-weight: 600; }
.jump a:hover { border-color: var(--c-coral); text-decoration: none; }
.list-card { scroll-margin-top: 90px; }
.grade-block summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; font-weight: 700; color: var(--c-ink); }
.grade-block summary::-webkit-details-marker { display: none; }
.grade-block summary .chev { transition: transform .15s; color: var(--c-faint); }
.grade-block[open] summary .chev { transform: rotate(90deg); }
.items { list-style: none; margin: 0; padding: 0 22px 16px; display: grid; gap: 2px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); column-gap: 24px; }
.items li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #f6efe7; }
.items input { margin-top: 3px; }
.items .qty { margin-left: auto; color: var(--c-muted); font-size: .86rem; font-weight: 600; white-space: nowrap; padding-left: 8px; }
.items .spec { display: block; color: var(--c-faint); font-size: .82rem; }
.items li.done span:first-of-type { text-decoration: line-through; color: var(--c-faint); }
.section-name { padding: 6px 22px 0; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c-mint-700); }
.notice { margin: 0 22px 16px; padding: 10px 14px; border-radius: 10px; background: var(--c-warning-50); color: #7a4d0b; font-size: .88rem; display: flex; gap: 8px; }
.side-card { position: sticky; top: 88px; }

/* --- tables --------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 750; padding: 10px 14px; border-bottom: 1px solid var(--c-border); background: var(--c-cream); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* --- item editor ------------------------------------------------------------------------ */
.item-rows { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1.1fr 2.2fr .8fr 1.6fr auto; gap: 8px; align-items: start; }
.item-row input { min-height: 42px; padding: 9px 12px; }
.item-row .del { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-muted); cursor: pointer; }
.item-row .del:hover { color: var(--c-danger); border-color: var(--c-danger); }
.item-row.removed { display: none; }
.item-head { display: grid; grid-template-columns: 1.1fr 2.2fr .8fr 1.6fr 42px; gap: 8px; font-size: .78rem; font-weight: 750; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 720px) { .item-row, .item-head { grid-template-columns: 1fr 1fr; } .item-head { display: none; } }
[data-kind-panel] { display: none; }
[data-kind-panel].show { display: block; }

/* --- console -------------------------------------------------------------------------- */
.console-bar { background: var(--c-ink); color: #f1e6dd; }
.console-bar .wrap { display: flex; gap: 6px; align-items: center; height: 54px; overflow-x: auto; }
.console-bar a { color: #d9cbc2; padding: 7px 12px; border-radius: 10px; font-weight: 650; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.console-bar a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.console-bar a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.console-bar .label { font-weight: 800; color: #fff; margin-right: 10px; display: inline-flex; gap: 8px; align-items: center; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tile { padding: 18px 20px; }
.tile .k { color: var(--c-muted); font-size: .84rem; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.tile .v { font-size: 1.9rem; font-weight: 800; color: var(--c-ink); letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .d { color: var(--c-muted); font-size: .82rem; }
.progress { height: 12px; background: var(--c-cream); border-radius: 999px; overflow: hidden; border: 1px solid var(--c-border); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-coral), var(--c-orange)); border-radius: 999px; transition: width .4s ease; }
/* investigate: filters and the selection toolbar stay at the top */
.sticky-tools { position: sticky; top: 68px; z-index: 15; display: grid; gap: 10px; padding: 10px 0; background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.filters-bar { padding: 14px 16px; }
.filters-grid { display: grid; gap: 10px; grid-template-columns: 1.4fr .9fr .7fr .9fr 1.2fr 1.1fr; }
.filters-grid input, .filters-grid select { min-height: 38px; padding: 7px 10px; font-size: .9rem; }
.filters-grid label { font-size: .78rem; }
.toolbar { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; padding: 10px 16px; }
.toolbar .per-page { width: auto; min-height: 34px; padding: 4px 8px; font-size: .88rem; }
.jump a.on { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
@media (max-width: 1000px) { .filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .sticky-tools { position: static; } .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.log { background: #1f1612; color: #e9ddd3; border-radius: var(--radius); padding: 16px 18px; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 460px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* charts */
.viz { background: var(--viz-surface); }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--c-text); }
.viz-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stackbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--viz-surface); }
.stackbar > span { display: block; height: 100%; min-width: 2px; }
.stackbar > span:first-child { border-radius: 4px 0 0 4px; }
.stackbar > span:last-child { border-radius: 0 4px 4px 0; }
.status-rows { display: grid; gap: 8px; margin-top: 16px; }
.status-row { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 10px; align-items: center; font-size: .9rem; }
.status-row .num { font-weight: 750; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.status-row .pct { color: var(--c-muted); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.columns { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 170px; padding: 0 2px; border-bottom: 1px solid var(--c-border-strong); }
.columns .col { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; cursor: default; }
.columns .col span { display: block; width: 100%; }
.columns .col span:first-child { border-radius: 4px 4px 0 0; }
.columns .col:hover span { filter: brightness(.92); }
.axis-x { display: flex; justify-content: space-between; color: var(--c-muted); font-size: .78rem; margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 1fr; }
.hbar-track { height: 8px; background: #f1ebe4; border-radius: 4px; overflow: hidden; min-width: 80px; }
.hbar-track > span { display: block; height: 100%; background: var(--viz-450); border-radius: 0 4px 4px 0; }
.viz-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--c-ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .8rem; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .1s; white-space: nowrap; }
.viz-tip.show { opacity: 1; }

/* --- footer -------------------------------------------------------------------------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--c-border); padding: 34px 0; color: var(--c-muted); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }

/* --- auth ---------------------------------------------------------------------------- */
.auth { max-width: 440px; margin: 56px auto; }
.auth .card { padding: 30px; }
.page { padding: 34px 0 10px; }

@media print {
  .site-header, .site-footer, .side-card, .no-print, .tabs, .messages { display: none !important; }
  .grade-block { break-inside: avoid; }
  body { background: #fff; }
}
