@import url(/tokens.css);
/* Lesego dashboard look, U10b, Option 3 ("What changed": built for the second visit and the tenth; option 1's fixes underneath). Tokens only: every colour, size, radius and font comes from tokens.css
   (imported first, so the pages need no second link). No colour literal and no number of four or more digits in this file.
   Marks like "(M37)" name the red team finding a rule answers; the list is in CHANGES.md. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: var(--w-body) var(--fs-16)/var(--lh-body) var(--font-body); font-variant-numeric: tabular-nums lining-nums; -webkit-text-size-adjust: 100%; }
main { max-width: var(--page-max); margin: 0 auto; padding: var(--sp-4) var(--gutter-phone) var(--sp-6); }
@media (min-width: 900px) { main { padding-left: var(--gutter-desk); padding-right: var(--gutter-desk); } }
p { color: var(--ink-2); margin: 0 0 var(--sp-2); }
button { font: inherit; }
.top { padding: var(--sp-2) 0 var(--sp-1); }
/* the as-at line: the secondary ink at body size, one shape for a month, a range and days (M04, M07) */
.stamp { font-size: var(--fs-16); color: var(--ink-2); margin: 0; }
.stamp-note { font-size: var(--fs-14); color: var(--ink-2); margin: var(--sp-1) 0 0; max-width: var(--w-note); }
.printonly { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--w-strong); color: var(--ink); line-height: var(--lh-tight); }
h1 { font-size: var(--fs-24); margin: 0 0 var(--sp-2); }
h2 { font-size: var(--fs-20); margin: var(--sp-8) 0 var(--sp-3); }
h3 { font-size: var(--fs-16); margin: 0 0 var(--sp-2); }
h2:focus { outline: none; }
@media (min-width: 900px) { h1 { font-size: var(--fs-28); } }
.lead { font: var(--w-body) var(--fs-16)/var(--lh-body) var(--font-body); color: var(--ink); margin: 0 0 var(--sp-3); max-width: var(--w-note); }

/* buttons: one secondary, one primary, one text button. Disabled still reads at 4.5 to 1 (M03) */
.btn { height: var(--ctl-h); padding: 0 var(--sp-4); border: 1px solid var(--edge); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font-weight: var(--w-strong); cursor: pointer; }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn:disabled { background: var(--sunk); color: var(--ink-2); border-color: var(--edge); cursor: default; }
.linkbtn { min-height: var(--ctl-h); padding: 0 var(--sp-1); border: 0; background: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 560px) { .btn { height: var(--ctl-h-phone); } .linkbtn { min-height: var(--ctl-h-phone); } }
/* review R2 (30 Nov): the touch size follows the input, not the width, so a tablet, a turned phone and a foldable get 44 px controls too */
@media (pointer: coarse) { :root { --ctl-h: var(--ctl-h-phone); } .striptab summary, .whymove summary { padding: var(--sp-3) 0; min-height: var(--ctl-h-phone); box-sizing: border-box; } }
.btn:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* controls: a panel by tone, a joined segmented control on a sunk track with a real edge (M37) */
.controls { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); align-items: flex-end; background: var(--surface); padding: var(--sp-4); border-radius: var(--r-card); margin-top: var(--sp-3); }
.ctlrow, .ctlperiod { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); align-items: flex-end; min-width: 0; }
.stepper { display: flex; align-items: flex-end; gap: var(--sp-2); min-width: 0; }
.stepper .fld { flex: 1 1 auto; min-width: 0; }
.stepper select { width: 100%; min-width: 9rem; }
.stepper[hidden], .step[hidden], .chip[hidden] { display: none; }
.btn.step { flex: none; padding: 0 var(--sp-3); }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; }
.seg legend { font: var(--w-strong) var(--fs-12)/var(--lh-body) var(--font-body); color: var(--ink-2); padding: 0 0 var(--sp-1); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { position: relative; min-width: 0; text-align: center; justify-content: center; padding: 0 var(--sp-4); min-height: var(--ctl-h); display: inline-flex; align-items: center; cursor: pointer; background: var(--sunk); color: var(--ink-2); font-size: var(--fs-14); border: 1px solid var(--edge); }
.seg label:not(:first-of-type) { margin-left: -1px; }
.seg label:first-of-type { border-radius: var(--r-control) 0 0 var(--r-control); }
.seg label:last-of-type { border-radius: 0 var(--r-control) var(--r-control) 0; }
.seg input:checked + label { z-index: 1; background: var(--surface); color: var(--ink); font-weight: var(--w-strong); border-color: var(--ink); }
.seg input:checked + label::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--sp-1); background: var(--ink); }
.seg input:focus-visible + label, select:focus-visible, input[type=date]:focus-visible, input[type=email]:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fld { display: flex; flex-direction: column; font-size: var(--fs-12); font-weight: var(--w-strong); color: var(--ink-2); gap: var(--sp-1); }
.fld[hidden] { display: none; }
#cu-prov { max-width: 22rem; }
select, input[type=date], input[type=email] { font: var(--w-body) var(--fs-14) var(--font-body); height: var(--ctl-h); padding: 0 var(--sp-3); border: 1px solid var(--edge); border-radius: var(--r-control); background: var(--surface); color: var(--ink); box-shadow: none; }
#ask { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-top: var(--sp-3); }
#ask label { flex: 0 0 100%; }
#ask input[type=email] { flex: 1 1 14rem; min-width: 0; }
@media (max-width: 560px) {
  .seg label { min-height: var(--ctl-h-phone); padding: 0 var(--sp-3); }
  select, input[type=date], input[type=email] { height: var(--ctl-h-phone); }
  .seg { width: 100%; }
  /* Option 3, M25: Channel and Period share one row; the month, with Previous and Next, sits under them; the first headline figure is on the first screen */
  .controls { flex-direction: column; align-items: stretch; gap: var(--sp-2); padding: var(--sp-3); }
  .ctlrow { flex-wrap: nowrap; gap: var(--sp-2); }
  .ctlrow .seg { flex: 1 1 0; width: auto; }
  .ctlrow .seg label { padding: 0 var(--sp-1); font-size: var(--fs-13); }
  .ctlperiod { gap: var(--sp-2); }
  .ctlperiod .fld, .stepper { width: 100%; }
  .stepper select { min-width: 0; }
}

.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sp-4); align-items: start; } /* map card about 60 percent (Yann) */
.cucols[hidden] { display: none; }
.cucols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; margin-top: var(--sp-3); }
@media (max-width: 900px) { .cols, .cucols { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border-radius: var(--r-card); padding: var(--sp-4); min-width: 0; }
@media (max-width: 440px) { .card { padding: var(--sp-3); } main { padding: var(--sp-3) var(--gutter-phone) var(--sp-6); } }
.maphost { width: 100%; min-width: 0; }
.maphost svg { display: block; max-width: 100%; height: auto; }
.note:empty { display: none; }
.note { background: var(--sunk); border-radius: var(--r-control); padding: var(--sp-2) var(--sp-3); color: var(--ink); }
.metric { margin-bottom: var(--sp-2); }

svg.map .ln { font-family: var(--font-body); font-weight: 500; fill: var(--ink); }
svg.map .lv { font-family: var(--font-body); font-weight: 650; fill: var(--ink); }
svg.map .onc { fill: var(--on-ramp-dark); }
svg.map .hat .ln, svg.map .hat .lv { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; } /* a name over the hatch stays readable (M08) */
svg.map .lead { stroke: var(--ink); stroke-width: 0.9; }
svg.map .lead-dot { fill: var(--ink); }
svg.map .illus-bg { fill: var(--ink); }
svg.map .illus { font: var(--w-strong) var(--fs-12) var(--font-body); fill: var(--surface); }
svg.map .prov { transition: fill 200ms; }
svg.closeup .dots circle { fill: var(--ramp-4); fill-opacity: 0.55; stroke: var(--surface); stroke-width: 0.6; }
svg.closeup .dots.top circle { fill: var(--ramp-7); fill-opacity: 0.95; stroke: var(--surface); stroke-width: 1.4; }
svg.closeup .num { font-family: var(--font-body); font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

.legend { margin-top: var(--sp-3); }
.lg-list { list-style: none; margin: var(--sp-1) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.lg-list li { display: flex; align-items: center; gap: var(--sp-2); }
.sw { flex: none; width: var(--sz-swatch); height: var(--sz-swatch); } /* legend swatch: 18 px, set in CSS so it cannot shrink */

/* one note style: 14 px in the secondary ink, for every grey sentence on the page (M09) */
.cap, .pnote, .levtext, .levstep, .lg-head, .lg-list li, .kpi .kpi-basis, .kpi .kpi-change, .stripnote { font-size: var(--fs-14); line-height: var(--lh-body); color: var(--ink-2); }
.cap, .pnote, .lg-head { max-width: var(--w-note); }
.cap, .pnote, .stripnote { margin: var(--sp-2) 0 0; }
.stripnote { max-width: var(--w-note); }
.levtext, .levstep { max-width: var(--w-note); }

/* tables: rows divided by --line, head on a sunk band, totals over a strong rule */
.tscroll { overflow-x: auto; max-width: 100%; }
.dt { border-collapse: collapse; width: 100%; font-size: var(--fs-14); }
.dt .tcap { caption-side: top; text-align: left; font: var(--w-strong) var(--fs-13)/var(--lh-tight) var(--font-body); color: var(--ink); padding: 0 0 var(--sp-2); }
.dt th, .dt td { padding: var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.dt th.n, .dt td.n { text-align: right; white-space: nowrap; padding-left: var(--sp-6); }
.dt td.s { text-align: left; color: var(--ink-2); white-space: normal; padding-left: var(--sp-2); } /* a spanned cell that says why a figure is missing (M06) */
.dt thead th { font: var(--w-strong) var(--fs-12)/var(--lh-tight) var(--font-body); color: var(--ink-2); vertical-align: bottom; background: var(--sunk); border-bottom: 0; }
.dt thead th:first-child { border-radius: var(--r-control) 0 0 var(--r-control); }
.dt thead th:last-child { border-radius: 0 var(--r-control) var(--r-control) 0; }
.dt tbody th { font-weight: 500; }
.dt tbody tr:last-child th, .dt tbody tr:last-child td { border-bottom: 0; }
.dt tfoot th, .dt tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); border-bottom: 0; }
.dt tr.ours th, .dt tr.ours td { font-weight: 700; }
.dt tr.noaddr th { font-style: italic; }
.dt td.w { color: var(--ink-2); font-size: var(--fs-14); line-height: var(--lh-body); }
.sumtable { max-width: 40rem; }
/* the province table now sits in the narrower column: tighter figure columns so it never scrolls sideways */
.tablecard { padding-left: var(--sp-2); padding-right: var(--sp-2); }
.prov-table th.n, .prov-table td.n { padding: var(--sp-2) var(--sp-1) var(--sp-2) var(--sp-3); font-size: var(--fs-12); }
.prov-table tbody th, .prov-table tfoot th { font-size: var(--fs-13); }
.prov-table tbody th, .prov-table tfoot th { padding-right: var(--sp-2); }
.sumtable td.n { font-family: var(--font-display); }
/* Phase 4 (owner ruling 2): the drop rate and its range sit in the narrow province column; a figure is never cut or split over lines */
.droprate td.n, .droprate th.n { white-space: nowrap; padding-left: var(--sp-3); }
.droprate thead th.n { white-space: normal; }  /* the long head wraps; a figure under it never does */
.droprate td.n:nth-child(4) { font-size: var(--fs-12); }

/* headline row: large figures side by side, Shopify admin KPI-row style */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-4); }
@media (min-width: 561px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--sp-4); } }
.kpi { padding: var(--sp-4); }
.kpi p { margin: 0; }
.kpi-label { font: var(--w-strong) var(--fs-13)/var(--lh-tight) var(--font-body); color: var(--ink-2); }
.kpi .kpi-fig { margin-top: var(--sp-2); font: var(--w-strong) var(--fs-24)/var(--lh-tight) var(--font-display); color: var(--ink); white-space: nowrap; }
/* U11 E: a figure never breaks between digits; the whole-rand headline fits a phone tile at 20 px, not 24 */
@media (max-width: 560px) { .kpi .kpi-fig { font-size: var(--fs-20); } }
@media (min-width: 900px) { .kpi-fig { font-size: var(--fs-28); } }
.kpi .kpi-basis { margin-top: var(--sp-1); }

/* levels: flat bars on a track, bar length is the share of Dropped; the words sit beside on desktop, under on a phone */
.levcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
@media (min-width: 900px) { .levcard { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.levrow { margin: 0; }
.levhead { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; column-gap: var(--sp-3); }
.levname { font: var(--w-strong) var(--fs-14) var(--font-body); color: var(--ink); }
.levfig { font: var(--w-strong) var(--fs-16)/var(--lh-tight) var(--font-display); color: var(--ink); }
.levshare { font-size: var(--fs-14); color: var(--ink-2); min-width: 6.5rem; text-align: right; }
.levtrack { height: var(--sz-bar); margin-top: var(--sp-1); background: var(--lev-track); border-radius: var(--r-control); overflow: hidden; }
.levbar { height: 100%; background: var(--ink-3); border-radius: var(--r-control); border: 1px solid var(--lev-edge); }
.levrow[data-level=dropped] .levbar { background: var(--lev-dropped); }
.levrow[data-level=bought_anyway] .levbar { background: var(--lev-bought); }
.levrow[data-level=not_bought] .levbar { background: var(--lev-notbought); }
.levrow[data-level=recoverable] .levbar { background: var(--lev-recoverable); }
.levstep { margin: var(--sp-1) 0 var(--sp-2) var(--sp-3); }
.levbars .levrow + .levrow { margin-top: var(--sp-3); }
.levtext strong { color: var(--ink); font-weight: var(--w-strong); }
.carttable, .addrtable { max-width: 34rem; }
h3.sub { margin-top: var(--sp-4); }
@media (max-width: 560px) { .levshare { min-width: 0; } .levhead { grid-template-columns: 1fr auto; } .levshare { grid-column: 1 / -1; text-align: left; } }
/* a view with no levels: the card keeps its place and says which month holds them (M01, M40) */
.levempty { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.levempty p { margin: 0; color: var(--ink); max-width: var(--w-note); }

/* phone tables: no sideways scroll. Name plus at most three data columns; the rest open under the row.
   The row name is the button, so a reader hears it once and there is one tab stop per row (M48, M49). */
@media (max-width: 560px) {
  .dt th, .dt td { padding: var(--sp-2) var(--sp-1); }
  .dt th.n, .dt td.n { padding-left: var(--sp-3); }
  .dt tbody th[scope=row], .dt tfoot th[scope=row] { font-size: var(--fs-14); }
  .prov-table td.n { font-size: var(--fs-13); }
  .dt th.x, .dt td.x { display: none; }
  .dt thead th.n, .dt td.n { white-space: normal; }
  .dt.droprate td.n { white-space: nowrap; padding-left: var(--sp-3); } /* Phase 4: Drop rate and Range stay on one line each */
  .dt th[scope=row]:has(> .more) { padding: 0; }
  .dt .more { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); width: 100%; min-height: var(--ctl-h-phone); margin: 0; padding: var(--sp-2) var(--sp-1); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .dt .more::after { content: ''; flex: none; align-self: center; width: var(--sz-chevron); height: var(--sz-chevron); border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 150ms; }
  .dt .more[aria-expanded=true]::after { transform: rotate(225deg); }
  .dt tr.rowd td { background: var(--sunk); padding: var(--sp-2) var(--sp-3); }
  .rowd dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-14); }
  .rowd dt { color: var(--ink-2); }
  .rowd dd { margin: 0; text-align: right; font-weight: var(--w-strong); }
  .sumtable { max-width: none; }
}
@media (min-width: 561px) { .dt tr.rowd { display: none; } }
.sumcols, .levcols { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); align-items: start; }
.sumcols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.sumcols > .card.wide { grid-column: 1 / -1; }
.levcols { grid-template-columns: minmax(0, 1fr); }

.toplist { list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
.toplist li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; justify-content: center; width: var(--sz-badge); height: var(--sz-badge); border-radius: var(--r-pill); background: var(--ramp-7); color: var(--on-ramp-dark); font-weight: 700; font-size: var(--fs-13); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* read dates: one tap-open list under the as-at line, never a paragraph (M07) */
.readdates { margin: var(--sp-1) 0 0; }
.readdates summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-14); padding: var(--sp-2) 0; }
@media (max-width: 560px) { .readdates summary { padding: var(--sp-3) 0; } }
.readdates ul, .readdates-print { margin: 0 0 var(--sp-2); padding: 0 0 0 var(--sp-4); }
.readdates li, .readdates-print li { font-size: var(--fs-14); line-height: var(--lh-body); color: var(--ink-2); }
.readdates-print { display: none; }

/* #sheet wraps the page in a presentation table so its foot repeats on every printed sheet; on screen its parts are plain blocks. Child selectors only, so no data table is touched */
#sheet, #sheet > tbody, #sheet > tbody > tr, #sheet > tbody > tr > td, #sheet > tfoot, #sheet > tfoot > tr, #sheet > tfoot > tr > td { display: block; padding: 0; border: 0; }
/* the footer: the payload's own "prepared by" line, on every signed-in view (M02) */
#foot { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter-phone) var(--sp-12); }
@media (min-width: 900px) { #foot { padding-left: var(--gutter-desk); padding-right: var(--gutter-desk); } }
#foot:empty { display: none; }
#foot p { margin: 0; font-size: var(--fs-14); line-height: var(--lh-body); color: var(--ink-2); }
#foot .foot-asat { display: none; }

/* Print: A4 portrait at 10mm, white, panels flat, one column, nothing cut at the sheet edge, no heading left
   at the foot of a sheet, no table or card split where it fits on one. The controls do not print; the view line does.
   The as-at line and the footer repeat on every sheet (M15). */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: var(--surface); font-size: 10pt; }
  main { max-width: none; padding: 0; }
  .controls, .metric, #closeup .fld, #signout, .topline { display: none !important; }
  .printonly { display: block; color: var(--ink); font-size: 10pt; margin: var(--sp-1) 0 0; }
  .cols, .cucols, .levcols, .sumcols, .levcard, .kpis { display: block; }
  .card { border: 0; border-radius: 0; padding: 0; margin: 0 0 6mm; background: none; box-shadow: none; }
  h1 { font-size: 20pt; } h2 { font-size: 15pt; margin: 6mm 0 3mm; } h3 { font-size: 11.5pt; }
  h1, h2, h3, .lead, .dt caption, .tcap, .stamp { break-after: avoid; page-break-after: avoid; }
  section { break-before: auto; }
  /* review R4: no forced sheet break, so a one-line section is not alone on a sheet; a map card is kept whole and moves to the next sheet if it does not fit */
  .mapcard, .cuhost { break-inside: avoid; page-break-inside: avoid; }
  .tscroll { overflow: visible; }
  .dt { font-size: 9.5pt; } .dt thead th { font-size: 9pt; } .dt td.w, .pnote, .cap, p { font-size: 9.5pt; }
  .dt tr, .lg-list li, .toplist li { break-inside: avoid; page-break-inside: avoid; }
  .dt, .levcard, .kpi, .legend, .stale, .levrow, .levtext, .sumcols > .card, .levempty, .cap, .pnote { break-inside: avoid; page-break-inside: avoid; }
  .dt th.x, .dt td.x { display: table-cell; }
  .dt .more, .dt tr.rowd { display: none; }
  .maphost svg { max-width: 150mm; margin: 0 auto; }
  .note { background: none; padding: 0; }
  .readdates { display: none; }
  .readdates-print { display: block; }
  /* the footer is the foot of a table that wraps the page: a table footer repeats at the foot of every sheet and keeps its room (M15) */
  #sheet { display: table; width: 100%; }
  #sheet > tbody { display: table-row-group; }
  #sheet > tfoot { display: table-footer-group; }
  #sheet > tbody > tr, #sheet > tfoot > tr { display: table-row; }
  #sheet > tbody > tr > td, #sheet > tfoot > tr > td { display: table-cell; }
  #foot { display: block; max-width: none; margin: 0; padding: 2mm 0 0; border-top: 1px solid var(--line-strong); }
  #foot p { font-size: 9pt; color: var(--ink); }
  #foot .foot-asat { display: block; }
  * { transition: none !important; box-shadow: none !important; }
}

/* sign-in: the dashboard's own header, card, input and button; tokens only (U11 M10) */
.signin { max-width: var(--w-form); margin-top: var(--sp-3); }
.signin .lead { font-weight: var(--w-strong); }
.signin .acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
.signin .hint { margin: var(--sp-2) 0 0; color: var(--ink-2); font-size: var(--fs-14); }

/* loading and no-read states */
.skel td { height: 1.4em; }
.nr { margin: var(--sp-3) 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-6); font-size: var(--fs-14); }
.nr dt { font-weight: 500; } .nr dd { margin: 0; color: var(--ink-2); }
.noread-msg { color: var(--ink); font-size: var(--fs-16); margin: 0; max-width: var(--w-note); } /* the message in full ink at 16 px (M32) */
/* sign-out: a quiet text button, alone at the end of the top line (M46); the eyebrow that repeated the title is gone (M52) */
.topline { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); margin: 0 0 var(--sp-1); }
#signout { min-height: var(--ctl-h); padding: 0 var(--sp-1); border: 0; background: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: right; }
#signout:disabled { color: var(--ink-2); cursor: default; text-decoration: none; }
@media (max-width: 560px) { #signout { min-height: var(--ctl-h-phone); } }
#retry { margin-top: var(--sp-1); }

/* out of date: an amber panel, no dismiss; the word at the period-label size, only the days line red */
.stale:not(:empty) { margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-4); background: var(--stale-bg); border: 1px solid var(--stale-line); border-radius: var(--r-card); }
.stale-word { font: var(--w-body) var(--fs-16)/var(--lh-body) var(--font-body); color: var(--stale-ink); margin: 0; }
.stale-days { font: var(--w-body) var(--fs-16)/var(--lh-body) var(--font-body); color: var(--red); margin: 0; }

/* 404: the header and a way back (M35) */
.back { display: inline-flex; align-items: center; min-height: var(--ctl-h-phone); margin-top: var(--sp-2); color: var(--ink); }

/* Narrow phone and 200 percent zoom, below 360 px: one tile per row, the figure never cut, the segments stacked,
   and every table read as label and value pairs so nothing hides behind a scroller (M28). The cells already carry
   their column name in data-label; the head row moves out of sight and stays in the page for a screen reader. */
@media (max-width: 359px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi .kpi-fig { font-size: var(--fs-narrow-fig); }
  .controls { gap: var(--sp-3); }
  .ctlrow { flex-direction: column; flex-wrap: wrap; }
  .ctlrow .seg { width: 100%; flex: none; }
  .ctlrow .seg label { font-size: var(--fs-14); padding: 0 var(--sp-3); }
  .stepper { flex-wrap: wrap; }
  .stepper .fld { flex: 1 0 100%; order: -1; }
  .btn.step { flex: 1 1 0; }
  .controls > .seg, .controls > .fld { width: 100%; }
  .seg { grid-auto-flow: row; grid-auto-columns: auto; }
  .seg label:not(:first-of-type) { margin-left: 0; margin-top: -1px; }
  .seg label:first-of-type { border-radius: var(--r-control) var(--r-control) 0 0; }
  .seg label:last-of-type { border-radius: 0 0 var(--r-control) var(--r-control); }
  .fld select, .fld input { width: 100%; min-width: 0; }
  .tablecard { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .levshare { grid-column: 1 / -1; text-align: left; }
  .levhead { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-1); }
  .levfig { overflow-wrap: anywhere; }
  .tscroll { overflow: visible; }
  .stamp { overflow-wrap: anywhere; }
}
/* a table that cannot fit its figures at this width reads as label and value pairs, with no scroller (M28) */
@media (max-width: 560px) {
  .dt.stk, .dt.stk tbody, .dt.stk tfoot, .dt.stk tr, .dt.stk th, .dt.stk td { display: block; }
  .dt.stk thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dt.stk tr { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
  .dt.stk tbody tr:last-child { border-bottom: 0; }
  .dt.stk tfoot tr { border-top: 2px solid var(--line-strong); }
  .dt.stk th, .dt.stk td { border: 0; padding: var(--sp-1) 0; }
  .dt.stk th[scope=row] { font-weight: var(--w-strong); }
  .dt.stk td { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: var(--sp-3); text-align: right; white-space: normal; }
  .dt.stk td::before { content: attr(data-label); text-align: left; color: var(--ink-2); font-weight: var(--w-body); flex: 0 1 auto; min-width: 0; margin-right: auto; }
  .dt.stk td.s::before { content: none; }
  .dt.stk td.s { text-align: left; }
  .dt.stk th.x, .dt.stk td.x { display: flex; }
  .dt.stk td.n, .dt.stk th.n { padding-left: 0; }
  .stk.prov-table td.n, .stk.prov-table th.n { padding: var(--sp-1) 0; font-size: var(--fs-14); }
}

/* ---------------------------------------------------------------------------------------------------------------
   Option 3, "What changed". Everything below is new. Tokens only; marks like (M24) name the red team finding.
   --------------------------------------------------------------------------------------------------------------- */

/* the as-at line and the "Not final" chip beside it (M05) */
.stamprow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.chip { display: inline-flex; align-items: center; min-height: var(--chip-h); padding: 0 var(--sp-chip); border: 1px solid var(--edge); border-radius: var(--r-pill); background: var(--sunk); color: var(--ink); font: var(--w-strong) var(--fs-chip)/var(--lh-tight) var(--font-body); }

/* the Latest block: a small table above the headline row (M24, M04) */
.latest { margin-top: var(--sp-3); }
.latestcard h2 { margin: 0 0 var(--sp-2); }
.latesttable { max-width: none; }
.latesttable > tbody > tr > th { width: var(--w-latest-head); font-weight: var(--w-strong); color: var(--ink); padding-left: 0; white-space: nowrap; }
.latesttable > tbody > tr > td { padding-right: 0; }
.latesttable .minitable { max-width: 36rem; }
.latesttable .minitable thead th { background: none; padding-top: 0; }
.latesttable .minitable td, .latesttable .minitable th { padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.latesttable .minitable tbody tr:last-child th, .latesttable .minitable tbody tr:last-child td { border-bottom: 0; }
/* Phase 4 (owner ruling 7): one line on the phone, tap to open the rest. The summary is the phone's one line; the heading is the desktop's. */
.latestsum { display: none; }
.latestfold > summary { list-style: none; }
.latestfold > summary::-webkit-details-marker { display: none; }
/* Phase 4 review R1 (30 Nov): the Latest table needs about 36 rem beside its label column, so it stacks up to 640 px, wider than the phone fold, and never pokes past its card or scrolls the page sideways */
@media (max-width: 640px) {
  .latesttable > tbody > tr > th, .latesttable > tbody > tr > td { display: block; width: auto; padding-left: 0; padding-right: 0; border-bottom: 0; }
  .latesttable > tbody > tr > th { padding-bottom: 0; color: var(--ink-2); font-size: var(--fs-13); }
  .latesttable > tbody > tr { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: baseline; border-bottom: 1px solid var(--line); padding: var(--sp-1) 0; }
  .latesttable > tbody > tr.lt-moved { grid-template-columns: minmax(0, 1fr); }
  .latesttable > tbody > tr > td, .latesttable > tbody > tr > th { font-size: var(--fs-13); }
  .latesttable > tbody > tr { grid-template-columns: 6rem minmax(0, 1fr); }
  .latesttable > tbody > tr > th { white-space: normal; padding-right: var(--sp-2); }
  .latesttable .minitable thead th { font-size: var(--fs-13); color: var(--ink-2); }
  .latesttable .minitable td, .latesttable .minitable th { padding-top: 2px; padding-bottom: 2px; }
  .latesttable > tbody > tr:last-child { border-bottom: 0; }
  .latesttable .minitable th, .latesttable .minitable td { font-size: var(--fs-13); }
  .latesttable .minitable td.n { padding-left: var(--sp-2); }
}
@media (max-width: 560px) {
  .latest { margin-top: var(--sp-2); }
  .latestcard h2 { font-size: var(--fs-16); margin-bottom: var(--sp-1); }
  .latestsum { display: block; cursor: pointer; font: var(--w-strong) var(--fs-16)/var(--lh-body) var(--font-body); color: var(--ink); padding: var(--sp-3) 0; min-height: var(--ctl-h-phone); box-sizing: border-box; }
  .latestsum::after { content: ' \25B8'; color: var(--ink-2); }
  .latestfold[open] > .latestsum::after { content: ' \25BE'; }
  .latestfold > h2 { display: none; }
  main h2 { margin-top: var(--sp-4); }
  .latestcard h2 { margin-top: 0; }
  .stepper .fld > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the select keeps its label for a screen reader; the row reads Previous, month, Next */
}

/* tap-open parts: Read dates, Earlier months, the month table, why a month can still move */
.striptab summary, .whymove summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-14); padding: var(--sp-2) 0; }
.whymove summary { color: var(--ink); font-weight: var(--w-strong); }
@media (max-width: 560px) { .striptab summary, .whymove summary { padding: var(--sp-3) 0; } }
.whycard { margin-top: var(--sp-4); padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.whymove p { max-width: var(--w-note); }

/* change lines under the headline figures: words, no colour, no arrow (M10) */
.kpi .kpi-change { margin-top: var(--sp-1); }
.kpi .kpi-change + .kpi-change { margin-top: 0; }

/* the month strip (M11, M34): one brown, zero baseline, the open month hatched, a gap where there is no figure */
.stripcard { margin: 0 0 var(--sp-4); }
.stripcard h3 { margin: 0 0 var(--sp-1); }
.stripbox { width: 100%; min-width: 0; margin-top: var(--sp-2); }
svg.strip { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
svg.strip .zero { stroke: var(--strip-base); stroke-width: 1; }
svg.strip .hit { fill: none; pointer-events: all; }
svg.strip .ring { fill: none; stroke: none; }
svg.strip .mcol { cursor: pointer; outline: none; }
svg.strip .mcol.inert { cursor: default; }
svg.strip .mcol:focus-visible .ring { stroke: var(--focus); stroke-width: 2; }
svg.strip .mcol:not(.part) .bar { fill: var(--strip-other); }
svg.strip .mcol.chosen:not(.part) .bar { fill: var(--strip-chosen); }
svg.strip .mcol.part .bar { stroke: var(--strip-other); stroke-width: 1; }
svg.strip .mcol.part.chosen .bar { stroke: var(--strip-chosen); }
svg.strip .gapbox { fill: none; stroke: var(--strip-gap); stroke-width: 1; stroke-dasharray: 3 2; }
svg.strip text { font-family: var(--font-body); font-size: var(--fs-12); fill: var(--ink-2); }
svg.strip .mv { font-size: var(--fs-13); font-weight: var(--w-strong); fill: var(--ink); }
svg.strip .mcol.chosen .mi { fill: var(--ink); font-weight: var(--w-strong); }
svg.strip .my { fill: var(--ink-2); }
svg.strip .mg { fill: var(--ink-2); }
.hat-bg { fill: var(--surface); }
.hat-ln { stroke: var(--strip-other); stroke-width: 2; }
.hat-ln-on { stroke: var(--strip-chosen); stroke-width: 2; }
.ks-chosen { fill: var(--strip-chosen); }
.ks-other { fill: var(--strip-other); }
.ks-part { stroke: var(--strip-other); stroke-width: 1; }
.ks-gap { fill: none; stroke: var(--strip-gap); stroke-dasharray: 3 2; }
.stripkey { margin-top: var(--sp-2); }
.striptable { max-width: none; }
.striptab { margin-top: var(--sp-1); }

/* empty cards keep their place and offer the month that has something (M40, M01) */
.offer { margin-top: var(--sp-3); }

/* levels as one walk on one scale; the three estimates carry a tag, never a hatch: hatch is for a part period only (spec; owner, 30 Nov, P4 row 8) */
.levtag { display: inline-block; margin-left: var(--sp-2); padding: 0 var(--sp-2); border: 1px solid var(--edge); border-radius: var(--r-pill); color: var(--ink-2); font: var(--w-body) var(--fs-12)/var(--lh-body) var(--font-body); vertical-align: 1px; }

/* print: every tap-open part prints open; the new cards do not split */
@media print {
  details::details-content { content-visibility: visible; height: auto; }
  .latestcard, .stripcard, .whycard, .latesttable tr, .stripkey { break-inside: avoid; page-break-inside: avoid; }
  .stripcard, .latestcard { margin-bottom: 4mm; }
  #printbtn, .stepper { display: none !important; }
  .latestsum { display: none !important; }
  /* the headline row prints two across so all four figures fit the first sheet with the Latest block (option 3 look-and-fix) */
  .kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6mm; }
  .cap { break-before: avoid; page-break-before: avoid; } /* a note stays with the table above it: no sheet holds one caption alone */
  main .btn { display: none !important; } /* the Show [month] buttons do nothing on paper */
  .card { break-inside: avoid; page-break-inside: avoid; } /* a card with its table and note moves whole to the next sheet */
  .chip { border-color: var(--ink); background: none; }
  svg.strip { max-width: 100%; }
}
@media (max-width: 560px) {
  /* the month table: name plus three figure columns must fit a 390 phone without a scroller (M11) */
  .striptable th[scope=row], .striptable td.n, .striptable th.n { font-size: var(--fs-13); }
  .striptable td.n, .striptable th.n { padding-left: var(--sp-1); padding-right: 0; }
  .stripcard { padding-left: var(--sp-2); padding-right: var(--sp-2); }
}
@media (max-width: 359px) {
  /* 195 px wide phone (200 percent zoom): label above value, so no value pokes past the card (option 3 look-and-fix) */
  .latesttable > tbody > tr { grid-template-columns: minmax(0, 1fr); }
  .latesttable > tbody > tr > th { padding-bottom: var(--sp-1); }
}
@media (max-width: 560px) {
  /* a figure of eleven characters or more takes the full row, so it is never cut by its tile (largest payload) */
  .kpis > .kpi-long { grid-column: 1 / -1; }
  .kpi-long .kpi-fig { white-space: normal; overflow-wrap: anywhere; }
}

/* Phase 4 (owner's pick, rows 10 and 13): the walk, and the returns group under it. Group row, indented channel rows, a rule above the difference and a heavier one above ours.
   Sources: option 2 CHANGES row 3 (M18, M30, M45); the 16 Nov ruling that sums written in sentences become small tables. */
.walkhead { margin: 0 0 var(--sp-2); }
.dt tr.grp th { font: var(--w-strong) var(--fs-13)/var(--lh-tight) var(--font-body); color: var(--ink-2); border-bottom: 0; padding-bottom: 0; text-align: left; }
.dt tr.ind th { padding-left: var(--sp-6); font-weight: var(--w-body); color: var(--ink-2); }
.dt tr.tot th, .dt tr.tot td { border-top: 1px solid var(--line-strong); font-weight: 700; color: var(--ink); }
.dt tr.fin th, .dt tr.fin td { border-top: 2px solid var(--line-strong); border-bottom: 0; font-weight: 700; color: var(--ink); }
.retgroup { margin-top: var(--sp-4); }
.retcard h3 { margin: 0 0 var(--sp-2); }
.retcard .dt { max-width: 40rem; }

/* Phase 4 look-and-fix: a month name and its read date stay on one line in the Latest table on a phone */
.minitable tbody th, .minitable tbody td:first-of-type { white-space: nowrap; }
