/* Metis Whole Child Learning Impact Portal. Brand: Metis teal, navy and sunrise orange; Poppins and Inter. */
:root {
  color-scheme: light;
  --teal: #1699a8;
  --teal-deep: #0e6e7a;
  --teal-tint: #e3f3f5;
  --teal-wash: #f1f9fa;
  --navy: #203969;
  --navy-dark: #172b52;
  --slate: #2b5672;
  --orange: #f06e20;
  --orange-deep: #a8430b;
  --orange-tint: #fef3e5;
  --cream: #fef6ed;
  --ink: #18213a;
  --muted: #5b6478;
  --line: #e2e8ee;
  --line-strong: #cbd5df;
  --canvas: #f4f7f9;
  --surface: #ffffff;
  --good: #11703a; --good-bg: #e6f4ea;
  --warn: #8a5300; --warn-bg: #fff3d4;
  --bad: #ad2a22; --bad-bg: #fce8e6;
  --wait: #2b5672; --wait-bg: #e8eef6;
  --ns-track: #e3f3f5;
  --ns-fill: #1699a8;
  --map-off: #eef1f4;
  --radius: 16px;
  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--body); color: var(--ink); background: var(--canvas); font-feature-settings: "tnum" 1, "cv11" 1; }
img { max-width: 100%; }
a { color: var(--teal-deep); }
h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 600; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 600; margin-bottom: 6px; }
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
small { font-size: 0.55em; color: var(--muted); font-weight: 500; margin-left: 2px; }
:focus-visible { outline: 3px solid rgba(22, 153, 168, 0.6); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: grid; gap: 6px; text-decoration: none; padding: 0 8px 4px; }
.brand img { display: block; width: 112px; height: auto; }
.brand-sub { font: 600 12.5px/1.2 var(--body); color: var(--muted); letter-spacing: 0.01em; }
#nav { display: grid; gap: 2px; }
.nav-stage { display: flex; align-items: center; gap: 9px; margin: 14px 0 4px; padding: 0 8px; font: 600 11.5px/1 var(--body); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.nav-letter { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font: 700 14px/1 var(--display); text-transform: lowercase; letter-spacing: 0; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav-link.sub { padding-left: 41px; font-size: 14px; }
.nav-link:hover { background: var(--canvas); }
.nav-link.on { background: var(--teal-tint); color: var(--teal-deep); font-weight: 650; box-shadow: inset 3px 0 0 var(--teal); }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--orange-tint); color: var(--orange-deep); font: 700 12px/22px var(--body); text-align: center; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.data-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.disclaimer { font-size: 12px; color: var(--muted); margin: 0; }

.main { min-width: 0; padding: 0 32px 56px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 0; background: rgba(244, 247, 249, 0.92); backdrop-filter: blur(6px); }
.topbar-title { font: 600 14px/1.2 var(--display); color: var(--navy); }
.menu-btn { display: none; border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.role-box { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.role-box select { font: 600 14px var(--body); color: var(--navy); }
.role-hint { max-width: 300px; font-size: 12px; line-height: 1.3; }
@media (max-width: 1500px) { .role-hint { display: none; } }
.proto-strip { margin: 0 0 22px; padding: 10px 14px; background: var(--cream); border-left: 4px solid var(--orange); border-radius: 0 10px 10px 0; font-size: 13px; color: #5a3b1f; }
#view { outline: none; max-width: 1240px; }
.scrim { display: none; }

/* ---------- common pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.page-head { margin: 4px 0 20px; }
.eyebrow { font: 650 12px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 6px; }
.lede { font-size: 16px; color: var(--muted); max-width: 72ch; margin-top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.section-title { font-size: 16px; margin: 0 0 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-col > .card { margin-bottom: 20px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-value { font: 600 28px/1.15 var(--display); color: var(--navy); margin: 4px 0 2px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 9px; border-radius: 999px; font: 650 12px/1.6 var(--body); white-space: nowrap; }
.chip.ok { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.wait { background: var(--wait-bg); color: var(--wait); }
.check-sum { display: flex; gap: 6px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 14px/1.2 var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.small { padding: 6px 10px; font-size: 12.5px; }
.text-link { color: var(--teal-deep); font-weight: 600; text-underline-offset: 3px; font-size: 14px; }
.as-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; font-family: var(--body); }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--bad-bg); color: var(--bad); }
.pill { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 6px 14px; font: 600 13px var(--body); color: var(--ink); cursor: pointer; }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin: 10px 0; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.info { background: var(--wait-bg); color: var(--slate); }
.ticks { margin: 6px 0 0; padding-left: 20px; }
.ticks li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; margin: 6px -4px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
tbody th { font-weight: 600; color: var(--ink); }
.issue-list { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 320px; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #fff 0%, #fff 55%, var(--teal-wash) 100%); padding: 28px 28px 22px; }
.hero h1 { font-size: 38px; line-height: 1.1; letter-spacing: -0.025em; max-width: 24ch; }

/* ---------- overview ---------- */
.ripple { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; margin-bottom: 26px; }
.ripple-step { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); }
.ripple-step:nth-child(1) { background: #fff; }
.ripple-step:nth-child(3) { background: var(--teal-wash); }
.ripple-step:nth-child(5) { background: var(--teal-tint); border-color: #cfe9ed; }
.ripple-k { font: 650 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-deep); }
.ripple-v { font: 600 34px/1.1 var(--display); color: var(--navy); margin: 6px 0 4px; }
.ripple-s { font-size: 13.5px; color: var(--muted); }
.ripple-arrow { align-self: center; color: var(--teal); font-size: 22px; font-weight: 700; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin: 0; padding: 18px; transition: border-color 0.15s, transform 0.15s; }
.tile:hover { border-color: var(--teal); transform: translateY(-2px); }
.tile-name { font: 650 13px var(--body); color: var(--teal-deep); }
.tile-big { font: 600 30px/1.15 var(--display); color: var(--navy); margin: 8px 0 2px; }
.tile-line { font-size: 14px; }
.tile-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tile-job { font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.tile-job:not(:empty) { margin-top: 14px; }
.side .card { padding: 18px 20px; }
.side h2 { font-size: 16px; margin-bottom: 10px; }
.prompt-mini { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.prompt-mini:hover { color: var(--teal-deep); }
.prompt-mini .sev { margin-right: 8px; }
.side .text-link { display: inline-block; margin-top: 10px; }
.trust-meter { height: 10px; border-radius: 999px; background: var(--teal-tint); overflow: hidden; margin: 4px 0 10px; }
.trust-meter span { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.trust-line { font-size: 14px; }
.sev { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 11.5px/1.6 var(--body); text-transform: uppercase; letter-spacing: 0.05em; }
.sev.decide { background: var(--orange-tint); color: var(--orange-deep); }
.sev.watch { background: var(--wait-bg); color: var(--slate); }

/* ---------- charts ---------- */
.chart { width: 100%; max-width: 980px; height: auto; display: block; margin-top: 6px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11.5px var(--body); }
.chart .lab { fill: var(--ink); font: 13px var(--body); }
.chart .val { fill: var(--muted); font: 600 12.5px var(--body); }
.chart .hit { fill: transparent; }
.chart .db-row:hover .hit, .chart .db-row:focus .hit { fill: var(--teal-wash); }
.chart .db-row { outline: none; }
.s-metis { stroke: var(--teal); fill: var(--teal); }
.s-partner { stroke: var(--orange); fill: var(--orange); }
.chart .stem { stroke-width: 2.5; stroke-opacity: 0.5; }
.chart .hollow { fill: #fff; stroke-width: 2; }
.chart .solid { stroke: #fff; stroke-width: 2; }
.legend { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 0; }
.key { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: -8px; vertical-align: middle; }
.key.s-metis { background: var(--teal); }
.key.s-partner { background: var(--orange); }
.key.hollow-key { border: 2px solid var(--muted); background: #fff; }
.key.solid-key { background: var(--muted); }
.bars { display: grid; gap: 10px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 76px; gap: 12px; align-items: center; font-size: 13.5px; outline: none; }
.bar-row:focus .bar-fill, .bar-row:hover .bar-fill { filter: brightness(0.9); }
.bar-track { position: relative; height: 12px; background: var(--teal-tint); border-radius: 6px; }
.bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--teal); }
.bar-fill.warn-fill { background: var(--orange); }
.bar-target { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--navy); }
.bar-val { font-weight: 650; color: var(--ink); white-space: nowrap; }

/* ---------- programmes ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--navy); border-bottom-color: var(--teal); }
.sprints { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sprints li { padding: 12px 14px; border-radius: 12px; background: var(--canvas); display: grid; gap: 2px; }
.sprints li.done { background: var(--teal-tint); }
.sprints li.now { background: var(--navy); color: #fff; }
.sprint-n { font-size: 12px; font-weight: 650; opacity: 0.8; }
.sprint-name { font: 600 16px var(--display); }
.sprint-when { font-size: 12.5px; opacity: 0.8; }
.fellow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.fellow { border-radius: 10px; padding: 9px 10px; display: grid; gap: 2px; outline: none; }
.fellow.ok { background: var(--good-bg); }
.fellow.warn { background: var(--warn-bg); }
.fellow.bad { background: var(--bad-bg); }
.fellow:focus, .fellow:hover { box-shadow: inset 0 0 0 2px var(--navy); }
.fellow-code { font: 600 15px var(--display); color: var(--navy); }
.fellow-status { font-size: 11.5px; color: var(--ink); }
table.heat td.cell { text-align: center; font-weight: 700; border: 3px solid #fff; border-radius: 8px; min-width: 76px; }
table.heat tbody th { min-width: 220px; }
table.heat tbody th .chip { margin-top: 4px; }
.stage-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; }
.stage-track { display: grid; gap: 8px; margin-top: 8px; }
.st-row { display: grid; grid-template-columns: 150px repeat(4, 1fr); gap: 6px; align-items: center; font-size: 13px; }
.st-school { font-weight: 600; }
.st-step { text-align: center; padding: 6px 4px; border-radius: 8px; background: var(--canvas); color: var(--muted); }
.st-step.on { background: var(--teal-tint); color: var(--teal-deep); }
.st-step.cur { background: var(--teal); color: #fff; font-weight: 650; }
.pilots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pilot { margin: 0; }
.pilot-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.pilot-stages { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pilot-stages li { font-size: 11.5px; text-align: center; padding: 5px 2px; border-radius: 6px; background: var(--canvas); color: var(--muted); }
.pilot-stages li.done { background: var(--teal-tint); color: var(--teal-deep); }
.pilot-stages li.now { background: var(--teal); color: #fff; font-weight: 650; }
.pilot-result { font-size: 15px; }
.follow { background: var(--canvas); border-radius: 12px; padding: 16px; align-self: start; }
.notice { border-style: dashed; }

/* ---------- voices ---------- */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.voice { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.voice blockquote { margin: 0; font: 500 17px/1.45 var(--display); color: var(--navy); }
.voice blockquote::before { content: "\201C"; display: block; font: 700 40px/0.6 var(--display); color: var(--teal); margin: 8px 0 6px; }
.voice figcaption { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.voice-tags { display: inline-flex; gap: 4px; }

/* ---------- design map ---------- */
.stage-mark { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.stage-letter { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--teal); color: #fff; font: 700 30px/1 var(--display); }
.stage-name { font: 600 20px/1.2 var(--display); color: var(--navy); }
.stage-q { font-size: 14px; color: var(--muted); }
.hmw { margin: 0 0 14px; padding: 16px 18px; border-radius: 12px; background: var(--teal-wash); font: 500 20px/1.4 var(--display); color: var(--navy); }
.hmw span { color: var(--teal-deep); font-weight: 700; }
.insights { padding-left: 20px; margin: 0; }
.insights li { margin-bottom: 6px; }
.objectives { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.objective { background: var(--canvas); border-radius: 12px; padding: 14px 16px; }
.objective h3 { margin: 0 0 4px; }
.objective p { margin: 0; font-size: 14px; color: var(--muted); }
.chain { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.chain-step { flex: 1 1 170px; background: var(--teal-wash); border-radius: 12px; padding: 12px 14px; }
.chain-step:last-of-type { background: var(--navy); }
.chain-step:last-of-type .chain-k, .chain-step:last-of-type p { color: #fff; }
.chain-k { font: 600 15px var(--display); color: var(--navy); margin-bottom: 4px; }
.chain-step p { margin: 0; font-size: 13.5px; color: var(--muted); }
.chain-arrow { align-self: center; color: var(--teal); font-weight: 700; }

/* ---------- add data and review ---------- */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ds-card { text-align: left; cursor: pointer; display: grid; gap: 6px; margin: 0; font: inherit; }
.ds-card:hover { border-color: var(--teal); }
.ds-prog { font: 650 12px var(--body); text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal-deep); }
.ds-name { font: 600 17px/1.3 var(--display); color: var(--navy); }
.ds-meta { font-size: 13px; color: var(--muted); }
.guard { background: var(--cream); border-color: #f6dcc0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid label, .dlg-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); }
.span-2 { grid-column: 1 / -1; }
input[type="text"], input[type="number"], input[type="date"], select, textarea { font: 400 14px var(--body); color: var(--ink); padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; width: 100%; }
.role-box select { width: auto; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(22, 153, 168, 0.35); border-color: var(--teal); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.form-msg { font-size: 13px; color: var(--bad); }
.file-btn { cursor: pointer; }
.submit-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.submit-bar label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.submit-bar .grow { flex: 1 1 260px; }
.subs { display: grid; gap: 0; }
.sub-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sub-status { display: grid; justify-items: end; gap: 6px; align-content: start; }
.sub-note { background: var(--cream); padding: 8px 12px; border-radius: 8px; font-size: 13.5px; margin: 8px 0; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-bottom: 4px; }
.prompt { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.prompt.decide { border-left: 4px solid var(--orange); }
.prompt.watch { border-left: 4px solid var(--slate); }
.prompt-top { display: flex; justify-content: space-between; align-items: center; }
.evidence { font-size: 14px; }
.rule { font-size: 13.5px; color: var(--muted); background: var(--canvas); padding: 8px 10px; border-radius: 8px; }
.options ul { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; }
.prompt .btn { align-self: start; margin-top: auto; }
.prompts + .card { margin-top: 20px; }

/* ---------- partner report ---------- */
.report-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.sentences { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 10px; }
.sentence { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sentence p:first-of-type { font-size: 15.5px; }
.report-voices .voice { background: var(--teal-wash); border-radius: 12px; padding: 4px 16px 14px; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.dash-head .note { margin: 0; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.stat.stat-row { flex-direction: row; justify-content: space-between; align-items: center; }
.stat-label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.stat-value { font: 600 30px/1.05 var(--display); color: var(--navy); }
.stat-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mini-stack, .seg-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; outline-offset: 3px; }
.mini-stack .solid, .seg-bar .v { background: var(--teal); }
.mini-stack .est { background: repeating-linear-gradient(45deg, #cfe9ed 0 4px, #a9d8df 4px 8px); }
.seg-bar .w { background: #9db1c6; }
.seg-bar .r { background: var(--bad); }
.mini-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.mini-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-tint); }
.mini-dots i.on { background: var(--teal); }
.mini-cols { display: flex; align-items: end; gap: 10px; height: 54px; }
.mini-col { display: grid; justify-items: center; align-content: end; gap: 3px; font-size: 11px; color: var(--muted); height: 100%; outline-offset: 2px; }
.mini-col span { width: 22px; background: var(--teal); border-radius: 4px 4px 0 0; }
.ring { flex: none; }
.ring-track { fill: none; stroke: var(--teal-tint); }
.ring-fill { fill: none; stroke: var(--teal); stroke-linecap: round; }
.ring-text { font: 700 15px var(--body); fill: var(--navy); }
.picto-side .ring-text { font-size: 21px; }

.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.dcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dcard h2 { font-size: 16px; margin: 0; }
.dcard .more { font-size: 13px; font-weight: 600; white-space: nowrap; text-underline-offset: 3px; }
.dsub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.dbody { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.lg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chart .fun-title { font: 600 14px var(--display); fill: var(--navy); }
.chart .fun-stage { font: 12px var(--body); fill: var(--muted); }
.chart .fun-link { opacity: 0.13; }
.chart .fun-val { font: 700 15px var(--body); fill: var(--ink); }
.chart g[tabindex] { outline: none; }
.chart g[tabindex]:hover rect, .chart g[tabindex]:focus rect { filter: brightness(0.92); }
.chart .ref { stroke: #9aa4b2; stroke-width: 1; stroke-dasharray: 4 4; }
.chart .quad { font: 600 12px var(--body); fill: var(--teal-deep); }
.chart .ax-title { font: 600 12px var(--body); fill: var(--muted); }
.chart .bub { stroke: #fff; stroke-width: 2; fill-opacity: 0.9; }
.chart .bub-g:hover .bub, .chart .bub-g:focus .bub { fill-opacity: 1; stroke: var(--navy); }
.chart .bub-lab { font: 700 12px var(--body); fill: var(--ink); }
.chart.map { max-width: 470px; margin: 0 auto; }
.chart .cty-shape { stroke: #8a99a8; stroke-width: 0.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; outline: none; transition: filter 0.15s; }
.chart .cty-shape.on { stroke: #fff; stroke-width: 1.2; }
.chart .cty-shape.on:hover, .chart .cty-shape.on:focus { filter: brightness(0.88); stroke: var(--navy); stroke-width: 2; }
.chart .cty-shape:not(.on):hover { fill: #dfe5eb !important; stroke: var(--slate); stroke-width: 1.2; }
.chart .ken-outline { fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart .map-lab { font: 650 11.5px var(--body); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.chart .map-leader { stroke: var(--navy); stroke-width: 1; }
.chart .map-pin { fill: var(--navy); stroke: #fff; stroke-width: 1; }
.map-src { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.chart .col-bar { fill: var(--teal); }
.chart .cap { font: 700 13px var(--body); fill: var(--ink); }
.chart .col-lab { font: 12px var(--body); fill: var(--muted); }
.chart .band-a { fill: var(--teal-tint); }
.chart .band-b { fill: #eef1f4; }
.chart .band-c { fill: #e1e6ec; }
.chart .bul-band { font: 11.5px var(--body); fill: var(--muted); }
.chart .bul-bar { fill: var(--navy); outline: none; }
.chart .bul-target { stroke: var(--navy); stroke-width: 3; }
.chart .bul-prev { fill: var(--slate); outline: none; }
.chart .bul-lab { font: 600 11.5px var(--body); fill: var(--muted); }
.bullet-wrap { display: grid; gap: 4px; }
.bullet-big { font: 600 15px var(--body); color: var(--muted); }
.bullet-big span { font: 600 30px/1 var(--display); color: var(--navy); margin-right: 4px; }
.wf { display: grid; grid-template-columns: repeat(8, 32px); gap: 5px; margin: 4px 0; }
.wf-cell, .wf-key { display: inline-grid; place-items: center; border-radius: 7px; font: 700 13px var(--body); outline: none; }
.wf-cell { width: 32px; height: 32px; }
.wf-cell:hover, .wf-cell:focus { box-shadow: 0 0 0 2px var(--navy); }
.wf-key { width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }
.wf-ok { background: #0ca30c; color: #fff; }
.wf-warn { background: #fab219; color: #3b2a00; }
.wf-bad { background: #ec835a; color: #3b1a0a; }
.picto-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 18px; align-items: center; }
.picto-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 9px; outline-offset: 3px; }
.picto-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.picto-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.picto-dots i.half { opacity: 0.4; }
.picto-n { font-weight: 700; text-align: right; }
.picto-side { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); }
.chart .lad-stage { font: 650 11px var(--body); fill: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.chart .lad-rest { stroke: #e2e8ee; stroke-width: 3; stroke-linecap: round; }
.chart .lad-tick { fill: #cbd5df; }
.chart .lad-track { stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
.chart .lad-dot { fill: var(--teal); stroke: #fff; stroke-width: 2; outline: none; }
.chart .lad-dot.pending { fill: #fff; stroke: var(--teal); stroke-dasharray: 3 3; }
.chart .lad-name { font: 600 13px var(--body); fill: var(--ink); }
.chart .lad-n { font: 700 12.5px var(--body); fill: var(--muted); }
table.heat.compact td.cell { min-width: 44px; padding: 7px 4px; font-size: 13px; }
table.heat.compact tbody th { min-width: 0; font-size: 13px; white-space: nowrap; }
table.heat.compact th .chip { font-size: 11px; }
.more-link { margin-top: 12px; }
.spot { margin: 0; }
.spot blockquote { margin: 0 0 12px; font: 500 20px/1.45 var(--display); color: var(--navy); }
.spot blockquote::before { content: "\201C"; display: block; font: 700 46px/0.6 var(--display); color: var(--teal); margin: 6px 0 8px; }
.spot figcaption { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
@media (max-width: 1280px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-5, .span-7 { grid-column: span 12; }
  .span-4 { grid-column: span 6; }
  .span-8 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .dash > * { grid-column: span 12; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picto-wrap { grid-template-columns: 1fr; }
  .picto-row { grid-template-columns: 104px minmax(0, 1fr) 36px; }
}

/* ---------- round two: teacher check-in, tables, county profile, history ---------- */
.checkin-wrap { max-width: 780px; }
.lang-toggle { display: flex; gap: 8px; margin: -6px 0 14px; }
.checkin { display: grid; gap: 18px; }
.ci-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ci-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkin label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.checkin legend { font-size: 14px; font-weight: 600; }
.checkin fieldset { display: block; padding: 12px 14px 14px; }
.checkin input[type="text"], .checkin input[type="number"], .checkin select, .checkin textarea { font-size: 16px; padding: 11px 12px; }
.ci-narrow { max-width: 300px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.checkin label.choice { display: inline-flex; gap: 0; font-weight: 500; position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(22, 153, 168, 0.6); outline-offset: 2px; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.checkin-done h2 { color: var(--good); }
.data-table { margin-top: 10px; }
.data-table summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--teal-deep); width: max-content; }
.data-table table { font-size: 13px; }
.county-detail { margin-top: 10px; padding: 12px 14px; background: var(--canvas); border-radius: 12px; font-size: 13.5px; }
.county-detail h3 { margin: 0 0 6px; }
.county-list { margin: 0; padding-left: 18px; }
.county-list li { margin-bottom: 4px; }
.chart .cty-shape.on { cursor: pointer; }
.chart .cty-shape.sel { stroke: var(--navy); stroke-width: 2.4; }
.history { list-style: none; margin: 8px 0 10px; padding: 0 0 0 12px; display: grid; gap: 4px; font-size: 13px; border-left: 2px solid var(--teal-tint); }
.h-date { font-weight: 650; color: var(--navy); margin-right: 8px; }
.tr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 24px; }
.tr-col h3 { margin: 0 0 8px; font-size: 14px; }
.tr-ring { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.bar-fill.slate-fill { background: var(--slate); }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) {
  .tr-grid { grid-template-columns: 1fr; }
  .ci-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ci-grid { grid-template-columns: 1fr; }
}

/* ---------- outcome progress rows ---------- */
.prog { display: grid; gap: 2px; margin-top: 2px; }
.prog-row, .prog-axis { display: grid; grid-template-columns: 32px minmax(0, 1fr) 72px; column-gap: 12px; }
.prog-row { grid-template-areas: "badge name val" "badge track delta"; align-items: center; row-gap: 4px; padding: 10px 10px; margin: 0 -10px; border-radius: 12px; outline: none; transition: background 0.15s; }
.prog-row:hover, .prog-row:focus-visible { background: var(--canvas); }
.prog-axis { grid-template-areas: ". ticks ."; }
.prog-ticks { grid-area: ticks; position: relative; height: 16px; }
.prog-ticks span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.prog-badge { grid-area: badge; align-self: center; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font: 700 15px/1 var(--display); color: var(--navy); background: color-mix(in srgb, var(--c) 18%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 50%, #fff); }
.prog-name { grid-area: name; font-weight: 600; font-size: 14px; color: var(--ink); }
.prog-val { grid-area: val; justify-self: end; font: 600 22px/1 var(--display); color: var(--navy); }
.prog-delta { grid-area: delta; justify-self: end; padding: 2px 9px; border-radius: 999px; font: 700 12px/1.45 var(--body); white-space: nowrap; }
.prog-delta.up { background: var(--good-bg); color: var(--good); }
.prog-delta.down { background: var(--bad-bg); color: var(--bad); }
.prog-track { grid-area: track; position: relative; height: 22px; background-image: linear-gradient(to right, #e3e8ed 1px, transparent 1px); background-position: 0 0; }
.prog-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 999px; background: #eef2f5; }
.prog-range { position: absolute; top: 50%; height: 12px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 25%, #fff), var(--c)); transform: translateY(-50%); transform-origin: left center; animation: prog-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay) both; }
.prog-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.prog-dot.start { width: 14px; height: 14px; background: #fff; box-shadow: inset 0 0 0 3px var(--c); }
.prog-dot.mid { width: 6px; height: 6px; background: #fff; }
.prog-dot.end { width: 20px; height: 20px; background: var(--c); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(16, 24, 40, 0.25); animation: prog-pop 0.45s ease-out calc(var(--delay) + 0.7s) both; }
.prog-target { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--navy); }
.prog-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.prog-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key-dot { display: inline-block; border-radius: 50%; }
.key-dot.start { width: 12px; height: 12px; box-shadow: inset 0 0 0 3px var(--slate); }
.key-dot.mid { width: 12px; height: 12px; background: var(--slate); box-shadow: inset 0 0 0 3px var(--slate), inset 0 0 0 6px #fff; }
.key-dot.end { width: 14px; height: 14px; background: var(--slate); }
.key-target { display: inline-block; height: 14px; border-left: 2px dashed var(--navy); }
@keyframes prog-grow { from { transform: translateY(-50%) scaleX(0); } to { transform: translateY(-50%) scaleX(1); } }
@keyframes prog-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .prog-range, .prog-dot.end { animation: none; } }

/* ---------- round three: children, captions, live data, one dashboard per person ---------- */
/* Children: one figure per lesson in ten. Lit figures take the outcome colour; unlit ones stay pale. */
.kid { display: block; width: 100%; height: auto; overflow: visible; }
.kid circle, .kid rect { fill: #dde4ea; transition: fill 0.2s; }
.kid .k-arms path { fill: none; stroke: #dde4ea; stroke-width: 2.8; stroke-linecap: round; transition: stroke 0.2s; }
.kid .k-acc { fill: #fff; stroke: #dde4ea; stroke-width: 1.3; stroke-linejoin: round; }
.kid .k-spine { fill: none; stroke: #dde4ea; stroke-width: 1.2; }
.kid.lit circle, .kid.lit rect { fill: var(--c, var(--teal)); }
.kid.lit .k-arms path { stroke: var(--c, var(--teal)); }
.kid.lit .k-acc { fill: #fff; stroke: var(--c, var(--teal)); }
.kid.lit .k-spine { stroke: var(--c, var(--teal)); }
.kids { display: grid; gap: 2px; }
.kid-row { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) 86px; grid-template-areas: "name line val"; align-items: center; gap: 14px; padding: 8px 10px; margin: 0 -10px; border-radius: 14px; outline: none; transition: background 0.15s; }
.kid-row[data-action] { cursor: pointer; }
.kid-row:hover, .kid-row:focus-visible { background: color-mix(in srgb, var(--c) 9%, #fff); }
.kid-row:focus-visible { box-shadow: inset 0 0 0 2px var(--c); }
.kid-name { grid-area: name; display: flex; align-items: center; gap: 10px; font: 600 14.5px/1.2 var(--display); color: var(--navy); }
.kid-name small { display: block; margin: 2px 0 0; font: 500 12px/1.2 var(--body); color: var(--muted); }
.kid-badge { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--c) 15%, #fff); }
.kid-badge .kid { width: 17px; }
.kid-line { grid-area: line; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-width: 380px; align-items: end; }
.kid-row.belonging .kid-line { gap: 0; }
.kid-slot { position: relative; display: block; transform-origin: 50% 100%; animation: kid-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.35) both; animation-delay: calc(var(--row, 0) * 110ms + var(--i, 0) * 45ms); }
.kid-slot .kid { max-width: 28px; margin: 0 auto; }
.kid-row:hover .kid-slot .kid.lit, .kid-row:focus-visible .kid-slot .kid.lit { animation: kid-wave 0.6s ease-in-out; animation-delay: calc(var(--i, 0) * 40ms); }
.kid-slot.new::after { content: "\2726"; position: absolute; top: -9px; right: -2px; font-size: 12px; line-height: 1; color: #f5a400; text-shadow: 0 0 2px #fff, 0 0 2px #fff; animation: kid-spark 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 150ms); }
.kid-val { grid-area: val; display: grid; justify-items: end; gap: 4px; }
.kid-val b { font: 600 24px/1 var(--display); color: var(--navy); white-space: nowrap; }
.kid-val b i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.kid-delta { padding: 2px 9px; border-radius: 999px; font: 700 12px/1.45 var(--body); white-space: nowrap; }
.kid-delta.up { background: var(--good-bg); color: var(--good); }
.kid-delta.down { background: var(--bad-bg); color: var(--bad); }
.kid-pct { font: 650 12.5px var(--body); color: var(--muted); }
.kid-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.kid-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.kid-key { display: inline-block; width: 11px; --c: var(--teal); }
.spark { font-style: normal; color: #f5a400; font-size: 13px; }
.kid-card .dbody { justify-content: flex-start; }
.dstack { display: grid; gap: 16px; align-content: stretch; min-width: 0; }
.dstack > .dcard { grid-column: auto; }
.dbody > .btn { align-self: flex-start; }
.target-bar { position: relative; height: 10px; margin: 4px 0 2px; border-radius: 999px; background: var(--teal-tint); }
.target-bar span { display: block; height: 100%; border-radius: 999px; background: var(--orange); transform-origin: left center; animation: grow-x 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.target-bar i { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--navy); }
table.heat.compact tbody th .chip { display: flex; width: max-content; margin-top: 4px; }
.ns-kid, .voice-kid { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--c) 15%, #fff); vertical-align: middle; }
.ns-kid .kid, .voice-kid .kid { width: 12px; }
thead th .ns-kid { width: 28px; height: 28px; }
.prog-badge .kid { width: 15px; }
@keyframes kid-pop { from { opacity: 0; transform: translateY(8px) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes kid-wave { 0%, 100% { transform: none; } 40% { transform: translateY(-4px) rotate(-4deg); } 70% { transform: translateY(-1px) rotate(3deg); } }
@keyframes kid-spark { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.75) rotate(20deg); } }

/* Cards: short meta line on top, one Metis caption underneath */
.dmeta { font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 3px 0 12px; }
.dcap { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding-top: 11px; border-top: 1px dashed var(--line-strong); font: italic 500 13px/1.4 var(--display); color: var(--teal-deep); }
.cap-mark { flex: none; width: 15px; height: 15px; fill: var(--orange); }
.dcard[data-card], .stat[data-card] { position: relative; }

/* Live data */
.live { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--good-bg); color: var(--good); font: 650 12.5px/1.2 var(--body); white-space: nowrap; transition: background 0.3s, color 0.3s; }
.live.flash { background: var(--orange-tint); color: var(--orange-deep); }
.live-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #0ca30c; animation: live-ping 2s ease-out infinite; }
.dcard h2 .live-dot { margin-right: 8px; vertical-align: 2px; }
.dcard.updated, .stat.updated { animation: card-pulse 1.3s ease-out 2; border-color: var(--orange); }
.dcard.updated::after, .stat.updated::after { content: "Updated"; position: absolute; top: -10px; right: 14px; padding: 2px 9px; border-radius: 999px; background: var(--orange); color: #fff; font: 700 11px/1.5 var(--body); box-shadow: 0 2px 6px rgba(240, 110, 32, 0.35); animation: chip-in 0.3s ease-out both; }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.5); } 80%, 100% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } }
@keyframes card-pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 110, 32, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(240, 110, 32, 0); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Charts that draw themselves in */
.ring-fill { animation: ring-draw 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .fun-bar { transform-box: fill-box; transform-origin: center; animation: grow-x 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .col-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .bub, .chart .lad-dot { transform-box: fill-box; transform-origin: center; animation: pop-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.wf-cell, .picto-dots i { animation: pop-in 0.35s ease-out both; animation-delay: calc(var(--i, 0) * 22ms); }
.bar-fill { transform-origin: left center; animation: grow-x 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes ring-draw { from { stroke-dashoffset: var(--len, 0); } to { stroke-dashoffset: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }

/* Just in */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.feed li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.35; animation: chip-in 0.4s ease-out both; }
.feed li:nth-child(2) { animation-delay: 60ms; } .feed li:nth-child(3) { animation-delay: 120ms; } .feed li:nth-child(4) { animation-delay: 180ms; } .feed li:nth-child(n+5) { animation-delay: 240ms; }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--slate); }
.feed-ok .feed-dot { background: #0ca30c; }
.feed-bad .feed-dot { background: #ec835a; }
.feed-wait .feed-dot { background: #fab219; }
.feed-dec .feed-dot { background: var(--navy); }
.feed-voice .feed-dot { background: var(--teal); }

/* Programme view: to-do list */
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--canvas); font-size: 14px; }
.todo-box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--line-strong); background: #fff; }
.todo-bad { box-shadow: inset 4px 0 0 #ec835a; }
.todo-warn { box-shadow: inset 4px 0 0 #fab219; }
.todo-wait { box-shadow: inset 4px 0 0 var(--slate); }

/* Data trust view */
.queue, .held, .ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.queue li:last-child { border-bottom: 0; }
.held { gap: 10px; }
.held li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13.5px; }
.stack-bar { display: flex; gap: 3px; height: 24px; border-radius: 8px; overflow: hidden; margin-top: 4px; }
.stack-bar span { outline-offset: -2px; transform-origin: left center; animation: grow-x 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.sb-ok { background: var(--teal); }
.sb-warn { background: #fab219; }
.sb-bad { background: #ec835a; }
.trust-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 16px; font: 600 36px/1 var(--display); color: var(--navy); }
.trust-big > span:last-child { font: 500 13px/1.3 var(--body); color: var(--muted); }

/* My classroom */
.hello-card { background: linear-gradient(115deg, var(--cream), #fff 62%); }
.hello { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.hello-kids { display: flex; gap: 6px; align-items: end; }
.hello-kids span { display: block; width: 36px; animation: kid-bob 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.22s); }
.hello-lead { font: 500 18px/1.4 var(--display); color: var(--navy); margin-bottom: 6px; }
.hello .btn { margin-top: 6px; }
.time-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; }
.time-big { font: 600 48px/1 var(--display); color: var(--navy); }
.time-big > span:last-child { display: block; margin-top: 8px; font: 500 13px/1.3 var(--body); color: var(--muted); }
.time-card > .small { grid-column: 2; text-align: center; max-width: 120px; }
.ideas { gap: 12px; }
.ideas li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.idea-q { font: 700 30px/0.9 var(--display); color: var(--teal); }
.report-card { background: linear-gradient(115deg, var(--teal-wash), #fff 70%); }
@keyframes kid-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-5px); } }

@media (max-width: 640px) {
  .kid-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "line line"; row-gap: 8px; }
  .kid-line { max-width: none; }
  .hello { grid-template-columns: 1fr; gap: 14px; }
  .time-card { grid-template-columns: 1fr; }
  .time-card > .small { grid-column: auto; text-align: left; max-width: none; }
  .queue li { grid-template-columns: 1fr; }
  .live-text-long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kid-slot, .kid-slot.new::after, .hello-kids span, .ring-fill, .chart .fun-bar, .chart .col-bar, .chart .bub, .chart .lad-dot, .wf-cell, .picto-dots i, .bar-fill, .stack-bar span, .feed li, .live-dot, .dcard.updated, .stat.updated { animation: none !important; }
}

/* ---------- round five: analytics dashboard design ---------- */
:root { --canvas: #eef2f6; --card-line: #dde3ea; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { fill: currentColor; stroke: none; }

/* Shell: dark navy sidebar that collapses to an icon rail */
.app { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { background: #142a4f; border-right: 0; color: #c9d3e2; padding: 14px 12px 16px; gap: 10px; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; min-width: 0; }
.brand .brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.brand-text { display: grid; gap: 3px; min-width: 0; }
.brand-text img { display: block; width: 92px; height: auto; filter: brightness(0) invert(1); }
.brand-sub { color: #93a3bb; font-size: 11.5px; }
.rail-btn { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; background: transparent; color: #c9d3e2; cursor: pointer; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail-btn .ico { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 0.2s; }
.nav-stage { color: #8496b3; margin: 12px 0 3px; padding: 0 6px; }
.nav-letter { width: 22px; height: 22px; font-size: 13px; }
.nav-link { justify-content: flex-start; gap: 11px; padding: 8px 10px; color: #dbe3ee; font-size: 14px; font-weight: 500; }
.nav-link .ico { opacity: 0.8; }
.nav-link.sub { padding-left: 10px; font-size: 13.5px; }
.nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-link.on { background: rgba(22, 153, 168, 0.24); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #3cc0cf; }
.nav-link.on .ico { opacity: 1; }
.nl-text { flex: 1; min-width: 0; }
.nav-link .badge { background: var(--orange); color: #fff; }
.side-foot { border-top-color: rgba(255, 255, 255, 0.12); }
.side-foot .btn.small { background: transparent; color: #dbe3ee; border-color: rgba(255, 255, 255, 0.25); }
.side-foot .text-link { color: #8fd8e0; }
.side-foot .disclaimer { color: #93a3bb; }
@media (min-width: 901px) {
  body.rail .app { grid-template-columns: 68px minmax(0, 1fr); }
  body.rail .sidebar { padding: 14px 8px; align-items: center; overflow-x: hidden; }
  body.rail .side-top { flex-direction: column; gap: 10px; padding: 2px 0 10px; width: 100%; }
  body.rail .brand-text, body.rail .nav-stage-name, body.rail .side-foot { display: none; }
  body.rail .rail-btn .ico { transform: none; }
  body.rail #nav { width: 100%; }
  body.rail .nav-stage { justify-content: center; margin: 8px 0 2px; padding: 0; }
  body.rail .nav-letter { width: 18px; height: 18px; font-size: 11px; }
  body.rail .nav-link { position: relative; justify-content: center; padding: 10px 0; }
  body.rail .nav-link .ico { width: 20px; height: 20px; }
  body.rail .nl-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.rail .nav-link .badge { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
}

/* White top bar and slim prototype notice, full bleed */
.topbar { margin: 0 -32px; padding: 10px 32px; background: #fff; border-bottom: 1px solid var(--card-line); backdrop-filter: none; }
.proto-strip { margin: 0 -32px 22px; padding: 7px 32px; border-left: 0; border-radius: 0; border-bottom: 1px solid #f3dcc2; font-size: 12.5px; }
body[data-page="overview"] .proto-strip { margin-bottom: 0; }
body[data-page="overview"] #view { max-width: none; }

/* Page bar: title, actions and tabs */
.pagebar { margin: 0 -32px 20px; padding: 18px 32px 0; background: #fff; border-bottom: 1px solid var(--card-line); }
.pb-inner, .dash-wrap { max-width: 1560px; }
.pb-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 20px; flex-wrap: wrap; }
.pb-top .eyebrow { margin-bottom: 4px; }
.pb-top h1 { font-size: 26px; }
.pb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-actions .btn .ico { width: 16px; height: 16px; }
.btn.outline { border-color: var(--teal); color: var(--teal-deep); background: #fff; }
.btn.outline:hover { background: var(--teal-wash); }
.btn.primary { background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.dtabs { display: flex; gap: 2px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.dtab { padding: 11px 14px 10px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 650 12px/1 var(--body); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.dtab:hover { color: var(--navy); }
.dtab.on { color: var(--teal-deep); border-bottom-color: var(--teal); }

/* Compact photo banner with the role intro */
.role-banner { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 210px; margin-bottom: 16px; border-radius: 12px; background: var(--navy); }
.rh-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; animation: hero-zoom 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.role-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 42, 79, 0.95) 0%, rgba(20, 42, 79, 0.86) 42%, rgba(20, 42, 79, 0.35) 78%, rgba(20, 42, 79, 0.15) 100%); }
.rh-credit { position: absolute; top: 10px; right: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(20, 42, 79, 0.55); color: #fff; font-size: 11px; font-weight: 600; }
.rb-text { max-width: 760px; padding: 24px 28px; color: #fff; }
.rb-intro { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: #e4eaf3; }
.rh-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rh-points li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 10px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 600; animation: chip-in 0.4s ease-out both; }
.rh-points li:nth-child(2) { animation-delay: 80ms; } .rh-points li:nth-child(3) { animation-delay: 160ms; }
.rh-points .kid { width: 10px; flex: none; }
.rh-points .kid.lit circle, .rh-points .kid.lit rect { fill: color-mix(in srgb, var(--c) 55%, #fff); }
.rh-points .kid.lit .k-arms path { stroke: color-mix(in srgb, var(--c) 55%, #fff); }
.rh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.role-banner .note { margin: 0; color: #d3dbe8; }
.role-banner .note a { color: #fff; font-weight: 600; }
.rb-hook { padding: 0; border: 0; background: none; color: #8fd8e0; font: 500 13px/1.4 var(--body); text-align: left; cursor: pointer; }
.rb-hook b { color: #fff; font-weight: 700; }
.rb-hook:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* About this portal (its own tab) */
.about-band { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px 30px; padding: 26px 28px 22px; border-radius: 12px; background: radial-gradient(circle at 100% 0, rgba(22, 153, 168, 0.35), transparent 45%), var(--navy); color: #fff; animation: chip-in 0.5s ease-out both; }
.about-band .eyebrow { color: #8fd8e0; }
.about-band h2 { margin: 2px 0 10px; font-size: 24px; line-height: 1.25; color: #fff; }
.about-band p { margin: 0; color: #d3dbe8; font-size: 14.5px; line-height: 1.55; }
.ab-why { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.ab-why li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; align-items: start; }
.ab-why strong { display: block; margin-bottom: 2px; font: 600 14.5px/1.3 var(--display); color: #fff; }
.ab-why span:not(.ab-icon) { display: block; font-size: 13px; line-height: 1.45; color: #c3cee0; }
.ab-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff; }
.ab-icon .kid { width: 15px; }
.ab-icon.letter { background: var(--teal); color: #fff; font: 700 18px/1 var(--display); }
.ab-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 34px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.ab-stat b { display: block; font: 600 28px/1 var(--display); color: #fff; }
.ab-stat > span { display: block; margin-top: 4px; font-size: 12px; color: #a9b7cc; }
.about-band .ab-src { margin-left: auto; max-width: 280px; font-size: 11.5px; line-height: 1.4; color: #93a3bb; }

/* Score summary tiles and cards */
.stat { border-radius: 10px; border-color: var(--card-line); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.dcard { border-radius: 10px; border-color: var(--card-line); padding: 15px 18px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.dcard-head { align-items: center; }
.dcard h2 { font: 600 15px/1.3 var(--display); color: var(--ink); }
.kebab { display: grid; place-items: center; width: 30px; height: 30px; flex: none; margin: -5px -9px -5px 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.kebab:hover, .kebab[aria-expanded="true"] { background: var(--canvas); color: var(--navy); }
.kebab.big { width: 38px; height: 38px; margin: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.dmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 12px; font-size: 12px; font-weight: 500; color: var(--muted); }
.dmeta span { display: inline-flex; align-items: center; gap: 5px; }
.dmeta .ico { width: 13px; height: 13px; stroke-width: 1.9; }
.dcap { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; }
.cap-mark { width: 13px; height: 13px; }
.lg-top { margin: 0 0 4px; }
.lg-ic { font-size: 11px; font-weight: 800; color: var(--ink); margin-right: -2px; }

/* Map: full row with a ranking beside it */
.map-grid { display: grid; gap: 6px; }
.map-rank { display: none; }
.map-rank h3 { margin: 4px 0 6px; font-size: 13.5px; }
@media (min-width: 901px) {
  .span-12 .map-grid { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 32px; align-items: center; }
  .span-12 .map-rank { display: block; margin-top: 14px; }
}

/* Pop-up menu */
.menu { position: absolute; z-index: 75; min-width: 210px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18); animation: chip-in 0.15s ease-out both; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: 500 13.5px var(--body); text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--teal-wash); outline: none; }
.menu button .ico { width: 16px; height: 16px; color: var(--muted); }
.menu button.danger { color: var(--bad); }
.menu button.danger .ico { color: var(--bad); }

/* Add a card */
dialog.wide { width: min(880px, calc(100% - 32px)); }
.ac-head { display: flex; justify-content: space-between; align-items: center; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-height: 62vh; margin-top: 12px; padding: 2px; overflow: auto; }
.ac-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.ac-item:hover { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.ac-item .glyph { grid-row: span 2; width: 48px; height: 48px; padding: 4px; border-radius: 10px; background: var(--teal-wash); }
.ac-item strong { display: block; font: 600 14px/1.3 var(--display); color: var(--navy); }
.ac-item small { display: block; margin: 3px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); font-weight: 400; }
.ac-item em { grid-column: 2; font-style: normal; font-size: 12px; font-weight: 700; color: var(--teal-deep); }
.ac-item.on { cursor: default; background: var(--canvas); box-shadow: none; border-color: var(--line); }
.ac-item.on em { color: var(--muted); }
.glyph .gl-t { fill: none; stroke: #cfe3e7; stroke-width: 5; stroke-linecap: round; }
.glyph .gl-f { fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; }
.glyph .gl-s { fill: var(--teal); }
.glyph .gl-o { fill: #9fd2d9; }
.glyph .gl-h { fill: #ec835a; }
.glyph .gl-l { fill: none; stroke: var(--navy); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.glyph .gl-d { fill: none; stroke: #9aa8b8; stroke-width: 1.6; stroke-dasharray: 3 3; }

/* Gauge */
.gauge-card .dbody { justify-content: center; }
.gauge-wrap { display: grid; justify-items: center; gap: 6px; }
.chart.gauge { max-width: 320px; margin: 0 auto; }
.chart .g-track { fill: none; stroke: #e6ebf0; stroke-linecap: round; }
.chart .g-fill { fill: none; stroke-linecap: round; outline: none; animation: ring-draw 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .g-val { font: 600 50px/1 var(--display); fill: var(--navy); }
.chart .g-unit { font-size: 22px; font-weight: 600; fill: var(--muted); }
.chart .g-lab { font: 500 12.5px var(--body); fill: var(--muted); }
.chart .g-end { font: 500 11px var(--body); fill: var(--muted); }
.chart .g-tick { stroke: var(--navy); stroke-width: 3; stroke-linecap: round; }
.chart .g-tlab { font: 700 11px var(--body); fill: var(--navy); }
.chart .g-base { fill: #fff; stroke: var(--navy); stroke-width: 2.5; outline: none; }
.g-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--muted); }

/* Donut */
.chart.donut { max-width: 340px; margin: 0 auto; }
.chart .dn-ring { animation: dn-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .dn-seg { fill: none; outline: none; transition: stroke-width 0.15s; cursor: default; }
.chart .dn-seg:hover, .chart .dn-seg:focus { stroke-width: 34px; }
.chart .dn-total { font: 600 40px/1 var(--display); fill: var(--navy); }
.chart .dn-sub { font: 500 12.5px var(--body); fill: var(--muted); }
.chart .dn-pct { font: 700 13px var(--body); fill: var(--ink); }
.chart .dn-n { font: 500 11.5px var(--body); fill: var(--muted); }
@keyframes dn-in { from { opacity: 0; transform: rotate(-50deg) scale(0.9); } to { opacity: 1; transform: none; } }

/* Stacked bars */
.chart .sb-seg { outline: none; transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.chart .sb-col:hover .sb-seg { filter: brightness(0.93); }
.chart .sb-total { font: 700 12px var(--body); fill: var(--ink); }
.chart .sb-lab { font: 500 11.5px var(--body); fill: var(--muted); }

/* Priority map */
.chart .pm-frame { fill: none; stroke: #c9d2dc; }
.chart .pm-hot { fill: rgba(236, 131, 90, 0.13); }
.chart .pm-split { stroke: #aeb9c6; stroke-dasharray: 4 4; }
.chart .pm-q { font: 700 10.5px var(--body); letter-spacing: 0.08em; fill: #8a96a6; }
.chart .pm-q.hot { fill: var(--orange-deep); }
.chart .pm-ax { font: 500 11px var(--body); fill: var(--muted); }
.chart .pm-ax.strong { font-weight: 650; fill: var(--ink); }
.chart .pm-pt { outline: none; }
.chart .pm-dot { stroke: #fff; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: pop-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.chart .pm-dot.cool { fill: var(--teal); }
.chart .pm-dot.hot { fill: #ec835a; }
.chart .pm-pt:hover .pm-dot, .chart .pm-pt:focus .pm-dot { stroke: var(--navy); }
.chart .pm-lab { font: 600 11.5px var(--body); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }

@media (max-width: 1100px) {
  .about-band { grid-template-columns: 1fr; }
  .ab-why { margin-top: 0; }
}
@media (max-width: 900px) {
  .topbar, .proto-strip, .pagebar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .pb-top h1 { font-size: 22px; }
  .rb-text { padding: 20px; }
  .role-banner::before { background: linear-gradient(90deg, rgba(20, 42, 79, 0.95), rgba(20, 42, 79, 0.8)); }
}
@media (max-width: 640px) {
  .ab-why { grid-template-columns: 1fr; }
  .about-band { padding: 20px 18px 18px; }
  .about-band h2 { font-size: 20px; }
  .about-band .ab-src { margin-left: 0; max-width: none; }
  .pb-actions .btn { padding: 8px 12px; font-size: 13px; }
}
@keyframes hero-zoom { from { transform: scale(1.07); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .rh-bg, .rh-points li, .about-band, .chart .g-fill, .chart .dn-ring, .chart .sb-seg, .chart .pm-dot, .menu { animation: none !important; } }

/* ---------- overlays ---------- */
#tip { position: fixed; z-index: 70; max-width: 300px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; pointer-events: none; box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; border-radius: 16px; padding: 24px; width: min(520px, calc(100% - 32px)); box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25); }
dialog::backdrop { background: rgba(24, 33, 58, 0.45); }
.dlg-form { display: grid; gap: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
  .role-hint { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 284px; z-index: 50; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 0 0 40px rgba(16, 24, 40, 0.2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(24, 33, 58, 0.4); z-index: 45; }
  .menu-btn { display: inline-grid; place-items: center; }
  .main { padding: 0 16px 40px; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .ripple { grid-template-columns: 1fr; }
  .ripple-arrow { transform: rotate(90deg); justify-self: center; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 30px; }
  h1 { font-size: 26px; }
  .card { padding: 18px; }
  .sprints { grid-template-columns: repeat(2, 1fr); }
  .st-row { grid-template-columns: 1fr 1fr; }
  .st-school { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: minmax(90px, 130px) 1fr 64px; }
  .topbar-title { display: none; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 23px; }
  .role-box label { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- print (partner report) ---------- */
@media print {
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .no-print, .scrim, #tip, #toast { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  .proto-strip { border: 1px solid #ddd; }
  .card { box-shadow: none; break-inside: avoid; border-color: #ddd; }
}
