/* DNEP Topic Assessment Tracker stylesheet (Styles.html, Tracker 3.2), unchanged, so the web app looks the same. */

/* DNEP Topic Assessment Tracker — same look as the DNEP demo: navy sidebar, light work area, cyan/amber accents. */
:root {
  --navy: #14306B; --navy-2: #1d3f85; --cyan: #1BA9DB; --amber: #F5AF19;
  --bg: #f3f6fb; --surface: #ffffff; --ink: #142140; --muted: #5b6785; --line: #dde3ef; --soft: #e9eef8;
  --good: #1f9d6b; --warn: #d98a00; --bad: #d14b4b; --good-bg: #dff3ea; --warn-bg: #fdf0d3; --bad-bg: #f9e0e0;
  --side-ink: #e8eefc;
  --font-display: "Fira Sans Condensed", "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Fira Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-data: "Fira Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1426; --surface: #152038; --ink: #e9eefb; --muted: #9aa8c7; --line: #26345a; --soft: #1c2a4a;
    --good-bg: #123a2c; --warn-bg: #3b2e10; --bad-bg: #3d1c1f; --navy: #0b1a3d; --navy-2: #2c5bb8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1426; --surface: #152038; --ink: #e9eefb; --muted: #9aa8c7; --line: #26345a; --soft: #1c2a4a;
  --good-bg: #123a2c; --warn-bg: #3b2e10; --bad-bg: #3d1c1f; --navy: #0b1a3d; --navy-2: #2c5bb8; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: .005em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--navy-2); }

/* shell */
.app { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.mark { display: flex; align-items: center; gap: 10px; padding: 0 6px 6px; }
.mark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2px; font-family: var(--font-display); font-weight: 700; line-height: .9; font-size: 20px; }
.mark-grid span:nth-child(1) { color: var(--cyan); } .mark-grid span:nth-child(2), .mark-grid span:nth-child(3) { color: #fff; } .mark-grid span:nth-child(4) { color: var(--amber); }
.mark-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: #fff; line-height: 1.15; }
.side .tool { font-size: 12px; opacity: .8; padding: 0 6px 14px; }
.nav a, .nav button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--side-ink); font-size: 14.5px; cursor: pointer; }
.nav a.on, .nav button.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--amber); }
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.08); }
.nav .dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; opacity: .6; }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; opacity: .6; padding: 12px 10px 4px; }
.nav .cl { font-size: 13.5px; padding: 6px 10px; }
.side .who { overflow-wrap: anywhere; margin-top: auto; font-size: 13px; opacity: .85; padding: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.main { padding: 24px 28px 40px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.topbar h1 { font-size: 28px; }
.sub { color: var(--muted); font-size: 14px; }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--cyan); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #1b1b1b; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-width: 0; }
.panel h2 { font-size: 18px; margin-bottom: 10px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--soft); color: var(--ink); }
.note { font-size: 12.5px; color: var(--muted); }
.note .flag, .flag { color: var(--warn); font-weight: 600; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec-h h2 { font-size: 20px; margin: 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
input[type=text], input[type=number], input[type=email], select, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 9px; font-size: 14px; }

/* home: class cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; border-top: 4px solid var(--cyan); }
.ccard h3 { font-size: 21px; }
.ccard .big { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.track { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; background: var(--cyan); }

/* class progress page (as the demo's class page) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.gdist { display: flex; align-items: flex-end; gap: 6px; height: 62px; margin-top: 2px; }
.gdist div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.gdist i { display: block; width: 100%; border-radius: 3px 3px 0 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.topic { border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 18px minmax(170px, 1.3fr) minmax(0, 1.4fr) 48px minmax(120px, 1fr); gap: 10px; align-items: center; padding: 9px 2px; }
.topic summary::-webkit-details-marker { display: none; }
.chev { color: var(--muted); transition: transform .15s; display: inline-block; }
.topic[open] summary .chev { transform: rotate(90deg); }
.topic .tn { font-weight: 600; }
.topic .tn small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.mbar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; display: block; }
.mbar i { display: block; height: 100%; background: var(--cyan); border-radius: 99px; }
.pc { font-family: var(--font-data); font-size: 13px; text-align: right; }
.subs { padding: 2px 0 12px 28px; display: flex; flex-direction: column; gap: 6px; }
.sub-r { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(0, 1.4fr) 48px minmax(120px, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.sub-r .mbar { height: 7px; }
.sub-r .mbar i { background: var(--navy-2); opacity: .8; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.st-table td.g, .st-table th.g { text-align: center; font-family: var(--font-data); }
.tcell { min-width: 78px; }
.tcell .v { font-family: var(--font-data); font-size: 12px; }
.tcell .mbar { height: 5px; margin-top: 3px; }
.tcell.low .v { color: var(--warn); font-weight: 600; }
.tcell.none .v { color: var(--muted); }
.st-row button { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.st-row.open button .chev { transform: rotate(90deg); }
.st-detail td { background: var(--bg); white-space: normal; padding: 10px 14px 14px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 24px; }
.dgrid h4 { margin: 0 0 4px; font-size: 13.5px; display: flex; justify-content: space-between; }
.dgrid .sub-r { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 40px; font-size: 12.5px; }
.mist { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 8px; }
.mist .hd { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.mist .lost { font-family: var(--font-data); font-size: 12px; padding: 1px 7px; border-radius: 999px; color: #fff; white-space: nowrap; }

/* tests by term */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { all: unset; cursor: pointer; padding: 8px 14px; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--ink); border-color: var(--amber); font-weight: 600; }
.ttable td .t { font-weight: 600; white-space: normal; }
.ttable td .t small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ttable td { vertical-align: middle; }
.ttable tr.now td { background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* mark entry */
.qinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.qinfo div { padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 13px; }
.mark-table td input { width: 46px; padding: 5px 4px; text-align: center; font-family: var(--font-data); font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.mark-table td input.abs { background: var(--soft); color: var(--muted); }
.mark-table td input.over { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.mark-table td input.mp { width: 38px; }
.mark-table th .mx { display: block; font-family: var(--font-data); font-weight: 400; font-size: 11px; }
.mark-table th .sk { display: block; font-weight: 400; font-size: 10.5px; max-width: 90px; white-space: normal; line-height: 1.2; }
.mark-table td.tot { font-family: var(--font-data); font-weight: 500; }
.mark-table tr.left td { opacity: .5; }
.setup { display: flex; flex-direction: column; gap: 8px; }
.setup .qrow-e { display: grid; grid-template-columns: 70px 80px minmax(160px, 1fr) minmax(160px, 1.4fr) 32px; gap: 8px; align-items: center; }
.setup .qrow-e input { width: 100%; }
.setup .hd { font-size: 12px; color: var(--muted); font-weight: 600; }
.saving { font-size: 12.5px; color: var(--muted); }

/* feedback stickers: 2 x 3 per A4 page, as the demo */
.sheet { margin: 6px auto 0; background: #fff; color: #142140; width: min(100%, 794px); padding: 18px; border-radius: 4px; box-shadow: 0 6px 24px rgba(20,48,107,.15); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stk { border: 1.5px solid #c9d3e8; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; font-size: 11.5px; line-height: 1.35; min-height: 0; break-inside: avoid; }
.stk-top { background: linear-gradient(90deg, #0d1f47, #14306B); color: #fff; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; }
.stk-top img { height: 38px; width: auto; display: block; border-radius: 4px; }
.stk-top .tt { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; flex: 1; min-width: 0; }
.stk-top .tt .sch { display: block; font-family: var(--font-body); font-weight: 400; font-size: 9.5px; opacity: .85; }
.ovl { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10.5px; background: #eef2f9; border-radius: 6px; padding: 3px 7px; }
.ovl .rag { font-size: 9.5px; padding: 1px 7px; }
.stk-top .dt { font-family: var(--font-data); font-size: 10px; opacity: .85; }
.stk-body { padding: 8px 10px 9px; display: flex; flex-direction: column; gap: 6px; }
.stk-id { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.stk-id .nm { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.stk-id .cl { font-size: 10.5px; color: #5b6785; }
.stk-mid { display: grid; grid-template-columns: minmax(0,1fr) 92px; gap: 8px; align-items: start; }
.score { display: flex; align-items: center; gap: 8px; }
.score b { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.rag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; }
.rag.Green { background: #1B998B; } .rag.Yellow { background: #F4A93F; color: #3a2600; } .rag.Red { background: #c0392b; }
.fb { font-size: 10.5px; color: #33405f; margin-top: 4px; }
.qs { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.qrow { display: grid; grid-template-columns: minmax(0,1fr) 46px 30px; gap: 6px; align-items: center; font-size: 10.5px; }
.qrow .qn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .tr { height: 6px; background: #e7ecf5; border-radius: 9px; overflow: hidden; }
.qrow .tr i { display: block; height: 100%; border-radius: 9px; }
.qrow .m { font-family: var(--font-data); font-size: 10px; text-align: right; }
.donut { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.donut svg { width: 84px; height: 84px; }
.donut .cap { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: #5b6785; font-weight: 600; text-align: center; }
.dleg { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; font-size: 8.5px; color: #33405f; margin-top: 2px; }
.dleg i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; }
.next { border-top: 1px solid #e3e8f3; padding-top: 5px; }
.lbl2 { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: #5b6785; font-weight: 700; }
.focus { font-size: 10.5px; }
.mpres { font-size: 10px; color: #33405f; }
.cmt { display: flex; gap: 6px; align-items: flex-end; font-size: 9.5px; color: #8a96b3; }
.cmt span.line { flex: 1; border-bottom: 1px dotted #9fb0d3; height: 12px; }
.brandline { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 10.5px; color: #5b6785; }

/* first-run sync */
.modal { position: fixed; inset: 0; background: rgba(10,20,45,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.mbox { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 22px 24px; width: min(640px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.mbox h2 { font-size: 22px; } .mbox p { margin: 0; }
.clist { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; }
.track.big { height: 10px; }
.slog { margin: 0; padding-left: 22px; font-size: 13px; max-height: 240px; overflow: auto; }
.slog li.ok::marker { color: var(--good); } .slog li.w { color: var(--warn); }
.steps.small { gap: 10px; } .steps.small .st { font-size: 15px; } .steps.small div { font-size: 14px; }

/* how to use */
.steps { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 14px; }
.steps li { padding-left: 4px; }
.steps li::marker { font-family: var(--font-display); font-weight: 700; color: var(--navy-2); }
.steps .st { font-family: var(--font-display); font-size: 16px; display: block; margin-bottom: 2px; }
.steps div { color: var(--ink); font-size: 14.5px; max-width: 75ch; }

/* printable mark sheet */
.paper { background: #fff; color: #142140; width: min(100%, 794px); margin: 0 auto; padding: 22px 24px; border-radius: 4px; box-shadow: 0 6px 24px rgba(20,48,107,.15); }
.paper h2 { font-size: 18px; color: #14306B; }
.paper table th, .paper table td { border: 1px solid #c9d3e8; color: #142140; text-align: center; padding: 6px 4px; font-size: 12px; }
.paper table td:first-child, .paper table th:first-child { text-align: left; min-width: 170px; }
.paper .ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.paper .ph img { height: 40px; }

@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; }
  .side .tool, .side .who, .nav .grp, .nav .cl { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a, .nav button { width: auto; }
  .main { padding: 18px 16px 32px; }
  .sheet { grid-template-columns: 1fr; }
  .topic summary { grid-template-columns: 18px minmax(0, 1fr) 48px; }
  .topic summary .mbar, .topic summary .note { display: none; }
  .sub-r { grid-template-columns: minmax(0, 1fr) 48px; }
  .sub-r .mbar, .sub-r .note { display: none; }
  .setup .qrow-e { grid-template-columns: 60px 70px minmax(0, 1fr) 32px; }
  .setup .qrow-e .lo { display: none; }
}

/* class settings */
.setgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 12px; }
.setbox { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.setbox h3 { font-size: 15px; }
.setbox label { font-size: 13px; color: var(--muted); }
.setbox textarea { width: 100%; }
.rad { display: flex; gap: 6px; align-items: center; color: var(--ink) !important; font-size: 14px !important; }
.plist { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; }
.pchip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.pchip button { border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.pchip button:hover { color: var(--bad); background: var(--bad-bg); }
.impbox { background: var(--soft); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
input[type=search], input[type=date] { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 9px; font-size: 14px; }

/* where the test comes from + choosing another one */
.srcbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; background: var(--soft); border-radius: 8px; padding: 8px 12px; }
.ttable td .note { display: block; margin-top: 2px; }
.pklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; }
.pk { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
.pk:hover { border-color: var(--cyan); } .pk.on { border-color: var(--navy-2); box-shadow: inset 3px 0 0 var(--amber); }

/* results report */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.rhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 3px solid var(--navy); padding-bottom: 10px; }
.rhead h2 { font-size: 24px; } .rhead img { height: 44px; }
.rsec h3 { font-size: 17px; margin-bottom: 2px; }
.rsec .note { margin-bottom: 8px; }
.hb, .sb { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 104px; gap: 10px; align-items: center; padding: 3px 0; font-size: 13px; }
.sb { grid-template-columns: minmax(120px, 230px) minmax(0, 1fr); }
.hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl small { color: var(--muted); margin-left: 6px; }
.ht { position: relative; height: 14px; background: var(--soft); border-radius: 0 4px 4px 0; }
.ht i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.ht em { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--muted); opacity: .6; }
.hv { font-variant-numeric: tabular-nums; font-weight: 600; } .hv .bl { font-weight: 400; color: var(--muted); font-size: 12px; }
.st { display: flex; gap: 2px; height: 18px; }
.st i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; color: #fff; font-weight: 600; }
.st i:first-child { border-radius: 4px 0 0 4px; } .st i:last-child { border-radius: 0 4px 4px 0; }
.leg { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.heat th { font-weight: 600; color: var(--muted); font-size: 11px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 4px; }
.heat td { text-align: center; padding: 3px 6px; min-width: 38px; font-variant-numeric: tabular-nums; border-radius: 3px; }
.heat td:first-child { text-align: left; white-space: nowrap; min-width: 140px; }
.hGreen { background: #d4efe9; color: #0d5c53; } .hYellow { background: #fdecc8; color: #7a4d00; } .hRed { background: #f6d5d1; color: #8e2a1f; } .hA { background: var(--soft); color: var(--muted); }
.hist { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; align-items: end; max-width: 520px; margin: 4px 0 12px; }
.hist div { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; }
.hist i { width: 100%; background: var(--navy-2); border-radius: 4px 4px 0 0; }
.hist small { color: var(--muted); }
table.rank td, table.rank th { padding: 4px 8px; font-size: 13px; }

/* set change */
.slgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; margin-top: 10px; }
.sl label { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 500; }
.sl input[type=range] { width: 100%; accent-color: var(--navy-2); }
table.sizes { margin-top: 10px; max-width: 560px; }
table.sizes td.over { color: var(--bad); font-weight: 700; }
.nsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ns h3 { font-size: 17px; border-bottom: 2px solid var(--navy); padding-bottom: 3px; }
.ns ol { margin: 6px 0 0; padding-left: 22px; font-size: 13px; }
.ns .up { color: var(--good); font-weight: 600; font-size: 12px; } .ns .dn { color: var(--bad); font-weight: 600; font-size: 12px; }
.mark-table.sct { max-width: 620px; }
.printonly { display: none; }
.prow { flex-wrap: nowrap; } .prow input[type=text] { min-width: 0; }
#picker:empty { display: none; }

@media print {
  @page { size: A4; margin: 8mm; }
  body { background: #fff; }
  .app { display: block; }
  .side, .noprint, .toast { display: none !important; }
  .main { padding: 0; gap: 0; }
  .sheet { box-shadow: none; padding: 0; width: 100%; break-after: page; gap: 4mm; grid-template-columns: 1fr 1fr !important; grid-auto-rows: 90mm; }
  .sheet .brandline { display: none; }
  .stk { height: 90mm; }
  .stk-mid { grid-template-columns: minmax(0,1fr) 84px; }
  .sheet:last-child { break-after: auto; }
  .paper { box-shadow: none; width: 100%; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report { border: 0; padding: 0; gap: 10px; }
  .rsec { break-inside: avoid; } .rsec.brk { break-before: page; break-inside: auto; } .rhead + .rsec.brk { break-before: auto; }
  .hb, .sb { break-inside: avoid; }
  .heat { font-size: 10px; } .heat td { padding: 1px 3px; min-width: 26px; }
  details.panel:not([open]) { display: none; }
  .scroll { overflow: visible !important; }
  body.print-sheets .main > *:not(#scbody), body.print-sheets #scbody > *:not(.printonly) { display: none !important; }
  body.print-sheets .printonly { display: block !important; }
  .pgbrk { break-after: page; }
  .newsets .ns { break-inside: avoid; }
}

/* v3: class picker, pupil page, dashboard, settings, preparing */
.clpick { margin: 2px 4px 6px; padding: 7px 9px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
.clpick option { color: #142140; }
.pname { display: inline-flex; align-items: center; gap: 4px; }
.chevb { all: unset; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.chevb:hover { background: var(--soft); }
.pname a { color: var(--ink); font-weight: 500; text-decoration: none; }
.pname a:hover { color: var(--navy-2); text-decoration: underline; }
.pill.grade { background: var(--navy); color: #fff; font-weight: 700; min-width: 26px; justify-content: center; }
.pill.lv-Developing { background: var(--bad-bg); color: var(--bad); } .pill.lv-Secure { background: var(--warn-bg); color: var(--warn); } .pill.lv-Mastery { background: var(--good-bg); color: var(--good); }
.pill.big { font-size: 20px; padding: 4px 14px; font-weight: 700; align-self: flex-start; }
.kpi b.big { font-size: 36px; }
.pchart { width: 100%; height: auto; display: block; }
.pchart .cl { font-size: 11px; fill: var(--muted); font-family: var(--font-data); }
.pchart .cx { font-size: 10.5px; fill: var(--muted); }
.pchart .cav { stroke: var(--ink); stroke-width: 2.5; }
.pchart .grid { stroke: var(--line); stroke-dasharray: 3 3; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
ul.sk { margin: 0; padding-left: 18px; font-size: 14px; } ul.sk li { margin: 5px 0; }
.slips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.slip { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; break-inside: avoid; }
.slip .url { font-family: var(--font-data); font-size: 11.5px; word-break: break-all; padding: 6px 8px; background: var(--soft); border-radius: 6px; }
.dbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--soft); }
.dbar i { display: block; min-width: 4px; }
.dleg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.dleg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.cmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.concern { font-size: 13px; padding: 7px 10px; border-radius: 8px; background: var(--bad-bg); }
.concern a { color: var(--bad); }
.up { color: var(--good); font-weight: 600; font-size: 13px; } .down { color: var(--bad); font-weight: 600; font-size: 13px; }
.psteps { margin: 12px 0; padding-left: 0; list-style: none; font-size: 14px; display: flex; flex-direction: column; gap: 7px; }
.psteps li { padding-left: 26px; position: relative; }
.psteps li::before { position: absolute; left: 0; top: 0; width: 18px; text-align: center; }
.psteps li.ok::before { content: "✓"; color: var(--good); font-weight: 700; }
.psteps li.w::before { content: "!"; color: var(--warn); font-weight: 700; }
.psteps li.now::before { content: ""; width: 12px; height: 12px; top: 3px; left: 2px; border: 2px solid var(--cyan); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.loading .spin { width: 22px; height: 22px; margin: 0 auto 12px; border: 3px solid var(--cyan); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.loading .note { display: block; margin-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .clpick { width: 100%; margin: 4px 0; } .slips { grid-template-columns: 1fr; } }
@media print { .slips { grid-template-columns: 1fr 1fr; } .slip { border-color: #999; } }


/* segmented switch */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; font-size: 13.5px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--navy); color: #fff; }
/* v3.1: tests from documents, PLC forms, exam stickers */
.mbox.wide { width: min(860px, 96vw); max-height: 92vh; overflow: auto; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; }
.drop:hover, .drop.over { border-color: var(--cyan); background: var(--soft); }
.warnbox { background: var(--warn-bg); color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.ptable.xq input { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.ptable.xq input.need { border-color: var(--warn); background: var(--warn-bg); }
.xform { display: flex; flex-direction: column; gap: 12px; }
.xform > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.xform input[type=text], .xform select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.xchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.xchips label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.xchips label:has(input:checked) { border-color: var(--navy-2); background: var(--soft); }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 5px 0; }
.sheet.x4 { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
.stk.x4s { min-height: 128mm; }
.x4mid { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; }
.x4d { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.xd { width: 100%; text-align: center; } .xd svg { width: 84px; height: 84px; }
.xd .cap { font-size: 10px; font-weight: 600; color: var(--muted); }
.dleg2 { display: flex; justify-content: center; gap: 6px; font-size: 9.5px; } .dleg2 i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 2px; }
.tlist { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.trow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 10px; gap: 6px; align-items: center; font-size: 10.5px; line-height: 1.25; }
.trow .m { font-family: var(--font-data); color: var(--muted); }
.rd { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rd.G { background: #1B998B; } .rd.A { background: #F4A93F; } .rd.R { background: #c0392b; }
.cf { width: 7px; height: 7px; border-radius: 50%; display: inline-block; outline: 1.5px solid #fff; box-shadow: 0 0 0 1px #9aa8c7; }
.cf.G { background: #1B998B; } .cf.A { background: #F4A93F; } .cf.R { background: #c0392b; }
.x4fb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
@media print { .sheet.x4 { grid-template-columns: 1fr 1fr !important; grid-auto-rows: 136mm !important; } .stk.x4s { height: 136mm; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

