/* Daily breaks. Warm paper ground, white panels without borders, near-black primary, forest green and gold for state. Light only: an ops
   desk in daylight. System fonts only, so the browser fetches nothing from outside the machine. */
:root {
  --ground: #fbfaf9; --side: #f2eee6; --surface: #ffffff; --surface-2: #f7f4ee; --hover: #f5f1ea; --active: #e9e3d8;
  --ink: #14110c; --ink-2: #332e25; --muted: #5f5749; --line: #efebe3; --rule: #e6e0d5; --line-strong: #d6cebf;
  --primary: #221f1a; --primary-hover: #14110c;
  --accent: #2f4a33; --accent-hover: #243a28; --accent-tint: #e3ece1; --accent-ink: #2f4a33;
  --gold: #d9a520; --gold-tint: #f3dc9e; --gold-ink: #6b4b0b;
  --ok: #2f6b3a; --ok-bg: #e2eedf; --warn: #7d570c; --warn-bg: #f8ebc8; --bad: #9e2a1c; --bad-bg: #f6e0da; --bad-line: #e3b7b1;
  --info: #3f5568; --info-bg: #e8ecef; --mute: #5f5749; --mute-bg: #eeeae1;
  --warn-wash: #fdf7e6; --bad-wash: #fcf0ec; --ease: cubic-bezier(.16, 1, .3, 1);
  /* text on solid fills: white on forest, ok green, red and near-black; near-black on gold (7.3:1; gold ink on gold is only 3.6:1) */
  --on-solid: #ffffff; --on-gold: var(--primary);
  /* the top bar: solid forest green, white text, a gold marker on the open tab and on focus */
  --bar: var(--accent); --bar-ink: var(--on-solid); --bar-muted: var(--accent-tint); --bar-hover: var(--accent-hover); --bar-mark: var(--gold);
  /* solid state fills: needs you, with others, closed, rebooked wrong or past window, all breaks, anything else */
  --s-you: var(--gold); --s-others: var(--accent); --s-closed: var(--ok); --s-bad: var(--bad); --s-breaks: var(--primary); --s-mute: var(--active);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --code: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --r: 10px; --rc: 9px;
  --lift: 0 -1px 0 0 rgba(0, 0, 0, .22) inset, 0 2px 6px 0 rgba(0, 0, 0, .18);
  color-scheme: light;
}
* { box-sizing: border-box }
html { scrollbar-color: #cfc7b8 transparent; -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; caret-color: var(--accent) }
::selection { background: var(--accent-tint); color: var(--ink) }
a { color: var(--accent-ink); text-underline-offset: 3px }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px }
h1, h2 { margin: 0; text-wrap: balance; font-weight: 650 }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em }
h2 { font-size: 16.5px }
h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600 }
p { margin: 0 }
dl, dd { margin: 0 }
table, .kpi b, .figure, time, .num { font-variant-numeric: tabular-nums }
code { font-family: var(--code); font-size: 13px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.meta, .sub { color: var(--muted); font-size: 13.5px }
.sub { display: block }
.none { display: inline-block; width: 8px; height: 2px; background: var(--line-strong); vertical-align: middle }

/* shell: banner, one top bar with the product, its scope and the eight screens */
.banner { margin: 0; padding: 6px 16px; background: var(--gold); color: var(--on-gold); font-size: 13.5px; font-weight: 600; text-align: center }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 28px; background: var(--bar); color: var(--bar-ink) }
.top :focus-visible, .banner :focus-visible { outline-color: var(--bar-mark) }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--bar-ink); text-decoration: none }
.brand svg { width: 22px; height: 18px; fill: none; stroke-width: 1.8 }
.brand svg rect:first-child { stroke: var(--gold) }
.brand svg rect:last-child { stroke: var(--bar-ink); fill: var(--bar) }
.brand b { font-size: 16px; font-weight: 700; letter-spacing: -0.01em }
.brand span { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint); border-radius: 999px; padding: 2px 9px }
.scope { color: var(--muted); font-size: 13.5px }
.top .scope { color: var(--bar-muted) }
.top nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto }
.who { display: flex; align-items: center; gap: 4px; color: var(--bar-muted); font-size: 13.5px }
.top .btn.ghost { color: var(--bar-ink) }
.top .btn.ghost:hover { background: var(--bar-hover) }
.login { max-width: 360px }
.login form { display: grid; gap: 12px }
.login label { display: grid; gap: 4px }
.top nav a { padding: 6px 12px; border-radius: var(--r); color: var(--bar-ink); text-decoration: none; font-size: 14.5px; white-space: nowrap; transition: background-color .15s ease }
.top nav a:hover { background: var(--bar-hover) }
.top nav a[aria-current] { background: linear-gradient(var(--bar-mark), var(--bar-mark)) 50% 100% / calc(100% - 24px) 3px no-repeat, var(--bar-hover); color: var(--bar-ink); font-weight: 600 }
.content { display: flex; flex-direction: column; gap: 18px; padding: 20px 28px 48px; max-width: 1320px; margin: 0 auto }

/* title row */
.ph { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px }
.ph > div:first-child { display: grid; gap: 4px; min-width: 0 }
.ph .sub { font-size: 14.5px; max-width: 72ch }
.crumb { display: flex; gap: 8px; color: var(--muted); font-size: 14px; min-width: 0 }
.crumb a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.crumb a:hover { color: var(--ink); text-decoration: underline }
.crumb a[aria-current] { color: var(--ink); font-weight: 600 }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.actions form, .acts form { display: inline-flex; gap: 6px; margin: 0 }
.figure { font-size: 24px; font-weight: 600 }

/* the day clock: every cutoff of the morning on one line, now in gold */
.clock { display: flex; margin: 0; padding: 16px 20px 14px; list-style: none; background: var(--surface); border-radius: var(--r); overflow-x: auto; scrollbar-width: thin }
.clock li { position: relative; flex: 1 1 0; min-width: 104px; display: grid; gap: 1px; padding: 18px 12px 0 0; font-size: 13px; color: var(--muted) }
.clock li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 3px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 0 100% no-repeat, var(--rule) }
.clock li::after { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong) }
.clock li.past::before { background-size: 100% 100%; animation: fill-line .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms) }
.clock li.past::after { background: var(--accent); box-shadow: none }
.clock li b { font-size: 15px; font-weight: 600; color: var(--ink-2) }
.clock li.past b { color: var(--muted); font-weight: 500 }
.clock li.now { color: var(--ink) }
.clock li.now b { color: var(--gold-ink) }
.clock li.now::after { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); animation: pulse 2s ease-out infinite }
.clock li.now + li b { color: var(--ink); font-weight: 700 }
.clock li.now + li span { color: var(--ink-2); font-weight: 600 }
.clock li.now + li::after { box-shadow: inset 0 0 0 3px var(--accent) }

/* five numbers in one strip, each one opens the list behind it */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; background: var(--surface); border-radius: var(--r); padding: 16px 20px }
.kpi { display: grid; gap: 2px; align-content: start; min-width: 0; padding-left: 20px; box-shadow: inset 1px 0 0 var(--rule); color: var(--ink); text-decoration: none }
.kpi:first-child { padding-left: 0; box-shadow: none }
.kpi b { font-size: 24px; font-weight: 500; line-height: 1.25; justify-self: start; border-bottom: 1px dashed var(--line-strong) }
.kpi b small { font-size: 15px; color: var(--muted) }
.kpi span { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted) }
.kpi { border-radius: 6px; transition: transform .2s cubic-bezier(.16, 1, .3, 1) }
.kpi:hover { transform: translateY(-2px) }
.kpi:hover b { border-bottom-color: var(--ink) }
.kpi.hot b { color: var(--warn); font-weight: 650 }
/* each number wears its state as a solid icon chip: breaks near-black, needs you gold, with others forest, closed ok green */
.kpi { --k: var(--s-breaks); --k-ink: var(--on-solid) }
.kpi[href*="needs"] { --k: var(--s-you); --k-ink: var(--on-gold) }
.kpi[href*="others"] { --k: var(--s-others) }
.kpi[href*="closed"] { --k: var(--s-closed) }
.kpi span .ico { width: 22px; height: 22px; padding: 4px; border-radius: 6px; background: var(--k); color: var(--k-ink) }

/* panels: a tone step from the ground, no border, no shadow */
.card { background: var(--surface); border-radius: var(--r); padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px }
.card.bad { background: var(--bad-bg) }
.ch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px }
.ch h2 { margin-right: auto }
.label { font-size: 13.5px; font-weight: 600; color: var(--ink-2) }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start }
.records, .compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start }
.callout { background: var(--info-bg); border-radius: var(--r); padding: 12px 14px; font-size: 14.5px }
.callout.ok { background: var(--ok-bg) }
.callout.bad { background: var(--bad-bg) }
.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px }

/* tables: rules and alignment, figures right-aligned */
.tw { overflow-x: auto; border-radius: var(--r); background: var(--surface) }
.card .tw { margin: 0 -4px }
table.t { width: 100%; border-collapse: collapse; font-size: 14px }
.t th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 9px 12px; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--rule) }
.t td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top }
.t .num { text-align: right; white-space: nowrap }
.t td.empty { color: var(--muted); padding: 20px 12px }
.t td.acts { text-align: right; white-space: nowrap }
.t td.acts > * + * { margin-left: 6px }
.t td.detail span { display: inline-block; margin-right: 10px; color: var(--ink-2); font-size: 13px }
a.name { font-weight: 600; text-decoration: none }
a.name:hover { text-decoration: underline }

/* every value links to the line it came from */
a.src { color: inherit; text-decoration: underline dashed var(--line-strong); text-underline-offset: 4px }
a.src:hover { text-decoration-color: var(--ink) }

/* key-value lists; a differing field is marked where it sits */
.kv { display: grid; gap: 6px }
.kv > div { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; padding: 2px 6px; margin: 0 -6px; border-radius: 6px }
.kv dt { color: var(--muted); font-size: 14px }
.kv dd { font-size: 14.5px; min-width: 0; overflow-wrap: anywhere }
.kv > div.diff { background: var(--warn-bg) }
.records .kv + .kv { padding-top: 10px; border-top: 1px solid var(--line) }

/* pills */
.pill { display: inline-flex; flex: none; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 20px; white-space: nowrap; background: var(--s-mute); color: var(--ink-2) }
.pill.ok { background: var(--s-closed); color: var(--on-solid) }
.pill.warn { background: var(--s-you); color: var(--on-gold) }
.pill.bad { background: var(--s-bad); color: var(--on-solid) }
.pill.info { background: var(--s-others); color: var(--on-solid) }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--rc); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .15s ease }
.btn:hover { background: var(--hover) }
.btn.pri { background: var(--accent); color: var(--on-solid); box-shadow: var(--lift); font-weight: 600 }
.btn.pri:hover { background: var(--accent-hover) }
.btn.ghost { background: transparent; box-shadow: none; color: var(--accent-ink) }
.btn.danger { color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line) }
.btn.danger:hover { background: var(--bad-bg) }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13.5px }
.btn[disabled] { opacity: .5; cursor: not-allowed }
@media (pointer: coarse) { .btn { min-height: 44px } .btn.sm { min-height: 40px } }

/* forms */
.decide, .upload { display: grid; gap: 12px }
.field { display: grid; gap: 5px; min-width: 0 }
.field label, .scope legend { font-size: 13.5px; font-weight: 500 }
.field input, .field textarea, .daypick input, .note textarea { width: 100%; min-height: 38px; border: 1px solid var(--line-strong); border-radius: var(--rc); background: var(--surface); padding: 6px 10px; font-size: 14.5px }
.field textarea, .note textarea { line-height: 1.55; resize: vertical }
.field input:focus, .field textarea:focus, .note textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-tint); outline-offset: 0 }
.field small { color: var(--muted); font-size: 13px }
.field small.need { color: var(--bad) }
.field textarea[aria-invalid="true"] { border-color: var(--bad) }
.scope { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; border: 0; font-size: 14.5px }
.scope legend { padding: 0; margin-bottom: 4px; width: 100% }
.daypick { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted) }
.daypick input { width: auto }

/* notices, set like a letter */
.note { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); max-width: 80ch }
.note:first-of-type { border-top: 0; padding-top: 0 }
.note .to { font-size: 13.5px; color: var(--muted) }
.note .subj { font-weight: 650 }
.note .body { white-space: pre-line; color: var(--ink-2) }
.note textarea.copy { background: var(--surface-2); font-family: var(--code); font-size: 13px }
.note time { font-weight: 650; color: var(--warn) }
.held { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line) }

/* Today: the status line and the files line */
.status, .filesline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14.5px }
.filesline a { font-weight: 600 }

/* breaks filters: a neutral pill on the one chosen */
.filters { display: flex; flex-wrap: wrap; gap: 2px; background: var(--side); padding: 3px; border-radius: var(--r) }
.filters a { padding: 5px 12px; border-radius: var(--rc); color: var(--ink-2); text-decoration: none; font-size: 14px }
.filters a:hover { background: var(--active) }
.filters a[aria-current] { background: var(--surface); color: var(--ink); font-weight: 600 }

/* break detail: the facts strip and the differences */
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; background: var(--surface); border-radius: var(--r); padding: 14px 20px }
.facts > div { display: grid; gap: 2px; min-width: 0 }
.facts dt { font-size: 13px; color: var(--muted) }
.facts dd { font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px }
.diffs { display: flex; flex-wrap: wrap; gap: 6px }
.chip { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--s-you); color: var(--on-gold); font-size: 13px; font-weight: 500 }
details.history summary { cursor: pointer; font-weight: 600; font-size: 15px }
details.history[open] summary { margin-bottom: 4px }

/* log: rules in force */
.t.rules th { width: 200px; color: var(--muted); font-weight: 500; font-size: 13.5px; box-shadow: none; border-top: 1px solid var(--line) }
.t.rules tr:first-child th, .t.rules tr:first-child td { border-top: 0 }

/* history */
.tl { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px }
.tl li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; font-size: 14px }
.tl time { color: var(--muted); font-size: 13px }

/* a received file, every line numbered and linkable */
.lines { margin: 0; padding: 8px 0; list-style: none; background: var(--surface); border-radius: var(--r); overflow-x: auto; font-family: var(--code); font-size: 13px }
.lines li { display: grid; grid-template-columns: 56px max-content; gap: 14px; padding: 1px 16px; scroll-margin-top: 80px }
.lines li a { color: var(--muted); text-align: right; text-decoration: none }
.lines li code { white-space: pre }
.lines li:target { background: var(--gold-tint) }

/* Today: the dashboard grid, the state ring, the bars and the files strip */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch }
.viz .ch h2 { display: inline-flex; align-items: center; gap: 8px }
.viz .ch h2 a { color: var(--ink); text-decoration: underline dashed var(--line-strong); text-underline-offset: 5px }
.viz .ch h2 a:hover { text-decoration-color: var(--ink) }
.ringrow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px }
.ring { width: 140px; height: 140px; flex: none }
.ring circle { fill: none; stroke-width: 7 }
.ring .track { stroke: var(--line) }
.ring .seg { stroke: var(--mute); transform: rotate(-90deg); transform-origin: 50% 50%; animation: ring-in .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 140ms + 200ms) }
.ring .seg.warn { stroke: var(--s-you) }
.ring .seg.info { stroke: var(--s-others) }
.ring .seg.ok { stroke: var(--s-closed) }
.ring .rv { font-size: 18px; font-weight: 600; text-anchor: middle; fill: var(--ink); font-variant-numeric: tabular-nums }
.ring .rl { font-size: 8.5px; text-anchor: middle; fill: var(--muted) }
.legend { flex: 1 1 200px; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px }
.legend li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; font-size: 14px }
.legend a { color: var(--ink-2) }
.legend b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums }
.legend .meta { text-align: right; font-variant-numeric: tabular-nums }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute) }
.dot.warn { background: var(--s-you) }
.dot.info { background: var(--s-others) }
.dot.ok { background: var(--s-closed) }
.bars { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px }
.bars li { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px }
.bars li.empty { display: block; color: var(--muted) }
.bars .bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2) }
.bars b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums }
.bt { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden }
.bt i { display: block; height: 100%; width: var(--w, 0); border-radius: inherit; background: var(--s-others); transform-origin: left center; animation: grow .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 250ms) }
.money .bt i, .mbar .bt i { background: var(--gold) }
.segs { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none }
.segs li { flex: 1 1 0; height: 12px; border-radius: 3px; background: var(--bad-wash); box-shadow: inset 0 0 0 1px var(--bad-line); animation: pop .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 250ms) }
.segs li.in { background: var(--s-closed); box-shadow: none }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px }
.chip.ok { background: var(--s-closed); color: var(--on-solid) }
.chip.bad { background: var(--s-bad); color: var(--on-solid) }
.t tbody tr.hot td { background: var(--warn-wash) }

/* Files: one card per expected file, the state on the card */
.tiles { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px }
.tiles > .empty { background: var(--surface); border-radius: var(--r); padding: 20px; color: var(--muted) }
/* a solid band on the left carries the state: in ok green, held gold, missing red; the padding keeps the text where it was */
.ftile { --k: var(--line-strong); display: grid; align-content: start; gap: 2px; padding: 14px 16px 16px 12px; background: var(--surface); border-left: 4px solid var(--k); border-radius: var(--r) }
.ftile.in { --k: var(--s-closed) }
.ftile.held { --k: var(--s-you) }
.ftile.missing { --k: var(--s-bad) }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px }
.fhead .ico { width: 20px; height: 20px; color: var(--muted) }
.ftile.in .fhead .ico { color: var(--ok) }
.ftile.held .fhead .ico { color: var(--warn) }
.ftile.missing .fhead .ico { color: var(--bad) }
.ftile .cp { font-size: 15.5px; font-weight: 650 }
.fmeta { display: flex; gap: 22px; margin-top: 8px }
.fmeta dt { font-size: 12.5px; color: var(--muted) }
.fmeta dd { font-size: 14px; font-variant-numeric: tabular-nums }
.cols { display: flex; flex-wrap: wrap; gap: 6px }

/* Breaks: the cause as a pill with its family dot, money as a bar against the largest */
.tp { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 1px 9px 1px 8px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font-size: 12.5px; font-weight: 500; line-height: 20px; white-space: nowrap }
.tp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mute) }
.tp.alloc::before { background: var(--info) }
.tp.terms::before { background: var(--gold) }
.tp.unknown::before { background: var(--bad) }
.tp.fee::before { background: var(--accent) }
.mbar { display: inline-grid; justify-items: end; gap: 5px }
.mbar .bt { width: 96px; height: 4px }

/* Break: who appears wrong, the three records, the window in days */
.trio { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px }
.trio li:not(.link) { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap }
.trio li.agree { background: var(--s-closed); color: var(--on-solid) }
.trio li.wrong { background: var(--s-bad); color: var(--on-solid) }
.trio li.fills { background: var(--primary); color: var(--on-solid) }
.trio li.link { flex: 1 1 40px; min-width: 28px; height: 0; border-top: 2px solid var(--line-strong); transform-origin: left center; animation: grow .6s var(--ease) both; animation-delay: .3s }
.trio li.link.agree { border-top-color: var(--ok) }
.trio li.link.wrong { border-top: 2px dashed var(--bad) }
.mark { width: 18px; height: 18px }
.pill .ico { width: 14px; height: 14px; margin: 0 4px 0 -3px }
.segs.win { display: inline-flex; gap: 3px; margin-right: 8px }
.segs.win i { width: 16px; height: 8px; border-radius: 2px; background: var(--line-strong); animation: pop .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 200ms) }
.segs.win i.left { background: var(--accent) }
.segs.win i.left.last { background: var(--bad) }

/* Notices: the three stages, one card per notice, the hold draining */
.flow { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px }
.flow li { position: relative }
.flow li + li::before { content: ""; position: absolute; top: 50%; left: -16px; width: 12px; height: 2px; background: var(--line-strong) }
.flow a { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border-radius: var(--r); color: var(--ink); text-decoration: none }
.flow a span { font-size: 13.5px; color: var(--muted) }
.flow b { font-size: 24px; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums }
.flow .approved b { color: var(--gold-ink) }
.nsec { display: grid; gap: 12px; scroll-margin-top: 16px }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start }
.note.card, .note.card:first-of-type { padding: 16px 18px; border-top: 0; max-width: none }
.note.approved { box-shadow: inset 0 0 0 1px var(--gold-tint) }
.holdbar { display: grid; gap: 8px }
.drain { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden }
.drain i { display: block; height: 100%; width: var(--w, 0); border-radius: inherit; background: var(--gold); transition: width 1s linear }

/* AI proposals: labelled, on a dashed rule, so a proposal never reads as a finding */
.proposal { display: grid; gap: 8px; padding: 12px 14px; border-left: 3px dashed var(--info); background: var(--surface-2); border-radius: 0 6px 6px 0; font-size: 14.5px }
.proposal ul { margin: 0; padding-left: 18px; display: grid; gap: 4px }
.proposal h3 { margin: 0 auto 0 0 }
.ai .q { font-weight: 600 }

/* Motion: the page rises in once, lists in sequence; cards lift under the pointer; buttons press */
@keyframes rise { from { opacity: 0; transform: translateY(8px) } }
@keyframes pop { from { opacity: 0; transform: scaleY(.3) } }
@keyframes grow { from { transform: scaleX(0) } }
@keyframes fill-line { from { background-size: 0 100% } }
@keyframes ring-in { from { stroke-dasharray: 0 100 } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent) } 70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--gold) 0%, transparent) } }
.content > * { animation: rise .5s var(--ease) backwards }
.content > :nth-child(2) { animation-delay: 40ms }
.content > :nth-child(3) { animation-delay: 80ms }
.content > :nth-child(4) { animation-delay: 120ms }
.content > :nth-child(5) { animation-delay: 160ms }
.content > :nth-child(n+6) { animation-delay: 200ms }
.dash > *, .ftile, .note.card, .flow li, .records > .card { animation: rise .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms + 120ms) }
.dash > :nth-child(2) { --i: 1 }
.dash > :nth-child(3) { --i: 2 }
.dash > :nth-child(4) { --i: 3 }
.t tbody tr { animation: rise .4s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 14) * 30ms + 150ms) }
.ftile, .viz, .rec, .note.card:not(.draft), .flow a { transition: transform .25s var(--ease), box-shadow .25s ease }
.ftile:hover, .viz:hover, .rec:hover, .note.card:not(.draft):hover, .flow a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(20, 17, 12, .16) }
.btn { transition: background-color .15s ease, transform .12s var(--ease), box-shadow .15s ease }
.btn:active:not([disabled]) { transform: translateY(1px) scale(.98) }
.btn.pri:active:not([disabled]) { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .2) }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 720px) {
  .bars li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px }
  .bars .bt { grid-column: 1 / -1; grid-row: 2 }
  .trio li.link { min-width: 16px }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }
.still *, .still *::before, .still *::after { animation: none !important }
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .kpi:nth-child(3) { padding-left: 0; box-shadow: none }
  .records, .compare { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 720px) {
  .top, .content { padding-left: 16px; padding-right: 16px }
  .top nav { margin-left: 0; width: 100% }
  .kpis, .pair { grid-template-columns: minmax(0, 1fr) }
  .kpi { padding-left: 0; box-shadow: none }
  .clock li { min-width: 88px }
  .kv > div, .tl li { grid-template-columns: minmax(0, 1fr); gap: 2px }
}
