/* Owen's portal. Benny's stylesheet (SIDPeople.Web/wwwroot/css/benny.css) cut down to what the portal uses, in
   Owen's blue. Phone first: one column and a tab bar along the bottom; from 760px the tabs move to a sidebar.
   System fonts on purpose - no web-font host sees anyone's IP address (CSP is 'self'). */
:root {
  --bg: #EEF1F5; --surface: #FFFFFF; --sunk: #F5F7FA; --line: #D8DEE7;
  --fg: #172233; --muted: #5A677A;
  --brand: #24477A; --brand-ink: #FFFFFF; --brand-soft: #DDE6F3;
  --sun-soft: #FCEFD3;
  --ok: #2E7D4F; --ok-soft: #DDF1E4; --warn: #9A6200; --warn-soft: #FBEBCB; --bad: #B23A30; --bad-soft: #F8DEDA;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E141D; --surface: #161F2B; --sunk: #111923; --line: #283546;
    --fg: #E3EAF3; --muted: #93A2B6;
    --brand: #7FA6E6; --brand-ink: #0B1420; --brand-soft: #1C2C44;
    --sun-soft: #3A2F17;
    --ok: #6FCB92; --ok-soft: #173226; --warn: #E9B45A; --warn-soft: #352915; --bad: #F08A7E; --bad-soft: #3A1E1B;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--f-body); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
code { font-family: var(--f-mono); font-size: .9em; background: var(--sunk); padding: 0 3px; border-radius: 4px; }

/* ---- shell ---- */
.app { display: flex; min-height: 100dvh; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 17px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--sun-soft); color: var(--warn);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.top-right { display: flex; align-items: center; gap: 12px; }
.top-out { margin: 0; }
.demo { margin: 0 16px 8px; padding: 6px 10px; border-radius: 8px; background: var(--sun-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.screen { flex: 1; padding: 4px 16px calc(96px + env(safe-area-inset-bottom, 0px)); max-width: 1100px; width: 100%; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabbar a {
  display: grid; justify-items: center; gap: 2px; padding: 6px 0; text-decoration: none;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.tabbar [aria-current="page"] { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; }

@media (min-width: 760px) {
  .tabbar, .top-out { display: none; }
  .side {
    display: flex; flex-direction: column; gap: 2px; width: 220px; flex: none;
    position: sticky; top: 0; height: 100dvh;
    background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px;
  }
  .side .brand { padding: 0 8px 18px; }
  .side a, .side button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
    border: 0; background: none; text-align: left; cursor: pointer; text-decoration: none;
    color: var(--fg); font-weight: 500; width: 100%;
  }
  .side a:hover, .side button:hover { background: var(--sunk); }
  .side [aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
  .side svg { width: 18px; height: 18px; }
  .side-out { margin-top: auto; }
  .top .brand { visibility: hidden; }
  .top { padding: 20px 32px 8px; }
  .demo { margin: 0 32px 8px; }
  .screen { padding: 6px 32px 48px; }
}

/* ---- content ---- */
.stack { display: grid; gap: 14px; }
.title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 0; text-wrap: balance; }
.sub { color: var(--muted); margin: 2px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.hint.center { text-align: center; }
.back { font-size: 14px; font-weight: 600; text-decoration: none; }
.back::before { content: "\2039  "; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h2 { margin: 0; font-size: 16px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.card h2 a { text-decoration: none; }
.card p { margin: 0; }
.goal { overflow-wrap: anywhere; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.bad-text { color: var(--bad); font-weight: 600; }
.muted-inline { color: var(--muted); font-weight: 400; font-size: 13px; }
.nowrap { white-space: nowrap; }

/* Projects: one card per project, Off Track ones edged in red */
.projects { display: grid; gap: 10px; }
@media (min-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }
.tile { text-decoration: none; color: var(--fg); gap: 6px; }
.tile:hover { border-color: var(--brand); }
.tile.off { border-left: 4px solid var(--bad); }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tile-title { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.tile .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }

/* lists: one row per item, text left, due date right */
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.card > h2 + .row { border-top: 0; padding-top: 0; }
.row > div { min-width: 0; }
.row .t { font-weight: 600; overflow-wrap: anywhere; }
.row .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.row-end { display: grid; justify-items: end; gap: 4px; flex: none; font-size: 14px; }
.row.done .t { font-weight: 500; color: var(--muted); }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0; }
.people { overflow-wrap: anywhere; }
.examples { margin: 0; padding-left: 20px; }
.examples li { margin: 4px 0; }

/* ---- forms (sign-in) ---- */
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
input, select {
  width: 100%; min-width: 0; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 12px; font-size: 16px; /* 16px stops iOS zooming into the field */
}
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.btn {
  display: inline-block; border: 0; border-radius: 9px; padding: 12px 18px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 15px; text-align: center;
}
.btn:hover { filter: brightness(1.06); }
.link { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }
.note { background: var(--sun-soft); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note a { color: inherit; font-weight: 600; }

/* ---- sign-in ---- */
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.big-brand { font-size: 30px; }
.big-brand .mark { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
.login .btn { width: 100%; }
.center-link { display: block; text-align: center; margin-top: 4px; width: 100%; }
input.pin { font-family: var(--f-mono); font-size: 24px; letter-spacing: .5em; text-align: center; }
.version { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; font-variant-numeric: tabular-nums; }

/* ---- the Traction-sheet tables (George 18-Nov-2026): Milestone / Owner / Due / On Track-Off Track / Done ----
   Plain and compact on a computer; under 640px each line stacks, with the column name beside each value. */
.sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 7px 8px; border-top: 1px solid var(--line); }
.sheet thead th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sheet td:first-child { overflow-wrap: anywhere; }
.sheet td .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sheet .ref { color: var(--muted); font-weight: 600; margin-right: 2px; }
.sheet .c { text-align: center; }
.sheet tr.done td { color: var(--muted); }
.sheet tr.late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--line); border-radius: 5px; font-size: 13px; font-weight: 700; }
.tick.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
@media (max-width: 639px) {
  .sheet thead { display: none; }
  .sheet, .sheet tbody, .sheet tr, .sheet td { display: block; width: 100%; }
  .sheet tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .sheet tbody tr:first-child { border-top: 0; padding-top: 0; }
  .sheet td { border: 0; padding: 2px 0; }
  .sheet td:first-child { font-weight: 600; padding-bottom: 4px; }
  .sheet td:not(:first-child) { display: flex; gap: 8px; align-items: center; font-size: 13px; }
  .sheet td:not(:first-child)::before { content: attr(data-label); color: var(--muted); min-width: 64px; }
  .sheet td.c { text-align: left; }
  .sheet tr.late td:first-child { box-shadow: none; }
  .sheet tr.late { box-shadow: inset 3px 0 0 var(--bad); padding-left: 10px; }
}

/* ---- stage 2: forms, Change boxes, history ---- */
.form { display: grid; gap: 12px; }
.pair, .trio { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 480px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .trio { grid-template-columns: 2fr 1fr 1fr; }
}
.field label > input, .field label > select, .field label > textarea { display: block; margin-top: 5px; font-weight: 400; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; padding: 0; }
input.upper { text-transform: uppercase; }
textarea.box { width: 100%; min-width: 0; min-height: 90px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
               padding: 11px 12px; font-size: 16px; resize: vertical; }
textarea.box:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.ghost { background: var(--sunk); color: var(--fg); border: 1px solid var(--line); }
.btn svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.err { color: var(--bad); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.note.ok-note { background: var(--ok-soft); color: var(--ok); }
.screen > .note { margin-bottom: 12px; }
.hint.quiet { margin: 0; }
.new-project { justify-self: start; }
.stack > .btn { justify-self: start; }
details.change { margin-top: 6px; }
details.change > summary { font-weight: 600; color: var(--brand); }
details.change[open] { background: var(--sunk); border-radius: 8px; padding: 6px 10px 10px; }
details.change form { margin-top: 8px; }
details.change.add { margin-top: 12px; }
.track-form { display: grid; gap: 10px; }
.choice { display: flex; gap: 20px; flex-wrap: wrap; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: 14px; }
.history li:first-child { border-top: 0; padding-top: 0; }
.history .s { font-size: 12px; color: var(--muted); }

/* ---- Company Goals ---- */
.card h3 { margin: 8px 0 4px; font-size: 14px; font-weight: 600; }
.card h3.q { color: var(--muted); }
.big-line { font-size: 18px; font-weight: 600; }
.list, .values { margin: 0; padding-left: 20px; }
.list li, .values li { margin: 4px 0; overflow-wrap: anywhere; }
.values b { display: block; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
details.older { border-top: 1px solid var(--line); padding-top: 6px; }
.leaders { border: 1px dashed var(--brand); }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: right; }
.grid th[scope="row"], .grid thead th:first-child { text-align: left; font-weight: 600; }
.grid thead th { border-top: 0; color: var(--muted); font-size: 12px; }

/* ---- the fixed-asset register (from Benny) ---- */
a.row { text-decoration: none; color: inherit; }
.grow { flex: 1; }
.asset-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--sunk); flex: none; }
.asset-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.asset-photo { display: grid; gap: 6px; align-content: start; min-width: 0; }
.asset-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sunk); display: block; }
.asset-photo .doc { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: var(--sunk); color: var(--muted); font-size: 13px; }
.asset-photo form { margin: 0; }
.asset-photo .btn.small { width: 100%; }
.photo-add { margin: 0; }

/* ---- demo ---- */
.demo-bar { background: var(--sun-soft); color: var(--warn); font-size: 13px; font-weight: 600; text-align: center; padding: 4px 8px; }

/* ---- Ask Owen (Benny's Ask SID chat, cut down) ---- */
.ask-chat { display: grid; gap: 8px; min-height: 220px; max-height: 60vh; overflow-y: auto; align-content: start; }
.ask-msg { padding: 8px 12px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-bot { background: var(--sunk); border: 1px solid var(--line); justify-self: start; }
.ask-me { background: var(--brand); color: var(--brand-ink); justify-self: end; }
.ask-wait { color: var(--muted); }
.ask-table { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; overflow-x: auto; }
.ask-table figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ask-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ask-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 3px 6px 3px 0; }
.ask-table td { padding: 4px 6px 4px 0; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-chips form { margin: 0; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; min-width: 0; }
.ask-form .btn { flex: none; }
#ask-new { margin: 0; }

/* ---- 1.0.0.4: people who are not staff, remove and undo ---- */
details.newp { margin: -4px 0 0; }
details.newp > summary { font-weight: 600; }
details.newp[open] { display: grid; gap: 10px; }
form.remove { margin: 8px 0 0; }
form.inline { display: inline; margin: 0; }
.sheet td form.inline { display: block; margin-top: 4px; }
details.removed { margin-top: 10px; }
details.removed ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
details.removed li { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
details.removed .s { font-size: 12px; margin: 0 6px; }
details.card > summary { font-size: 15px; color: var(--brand); }
details.card form { margin-top: 10px; }

/* ---- 1.0.0.6: filters, Who's holding what, Help, footer ---- */
.filter { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip-gap { width: 6px; }
.filter input[type="search"] { padding: 9px 12px; }
.who-section { margin: 6px 0 -4px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.who-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 400; color: var(--muted); }
.who-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.who-lines li { display: grid; gap: 2px; padding: 8px 0 8px 10px; border-top: 1px solid var(--line); border-left: 3px solid transparent; overflow-wrap: anywhere; }
.who-lines li.late { border-left-color: var(--bad); }
.who-lines .s { font-size: 13px; color: var(--muted); }
.who-lines .ref { color: var(--muted); font-weight: 600; margin-right: 2px; }
.help .card p + p, .help .card ul + p, .help .card p + ul { margin-top: 8px; }
.foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tabbar a { min-width: 0; }

/* ---- Cash flow (1.0.0.8). One chart, one scale; colours are the marks', text stays in ink. ---- */
:root { --c-in: #2a78d6; --c-fc: #86b6ef; --c-out: #eb6834; --c-fo: #f4b196; --c-avail: #1baf7a; }
@media (prefers-color-scheme: dark) { :root { --c-in: #3987e5; --c-fc: #1c5cab; --c-out: #d95926; --c-fo: #8a3c1c; --c-avail: #199e70; } }
a.chip { text-decoration: none; }
.chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cash-tiles { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cash-tiles { grid-template-columns: repeat(3, 1fr); } }
.cash-tile { gap: 2px; }
.cash-tile.off { border-left: 4px solid var(--bad); }
.cash-tile .k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cash-tile .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cash-tile .s { font-size: 13px; color: var(--muted); }
.cash-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.cash-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.cash-legend .ln { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--fg); margin-right: 6px; vertical-align: middle; }
.cash-legend .ln.l-avail { border-top-color: var(--c-avail); }
.cash-legend .ln.l-known { border-top: 2px dashed var(--c-avail); }
.cash-legend .c-in { background: var(--c-in); } .cash-legend .c-fc { background: var(--c-fc); } .cash-legend .c-out { background: var(--c-out); } .cash-legend .c-fo { background: var(--c-fo); }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.cash-chart { display: block; width: 100%; min-width: 620px; height: auto; }
.cash-chart .grid { stroke: var(--line); stroke-width: 1; }
.cash-chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.cash-chart .min { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 2 4; }
.cash-chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.cash-chart .cmark { fill: var(--fg); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.cash-chart .hit { fill: transparent; }
.cash-chart g:hover .hit { fill: var(--sunk); }
.cash-chart .c-in { fill: var(--c-in); } .cash-chart .c-fc { fill: var(--c-fc); } .cash-chart .c-out { fill: var(--c-out); } .cash-chart .c-fo { fill: var(--c-fo); }
.cash-chart polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cash-chart .l-close { stroke: var(--fg); } .cash-chart .l-avail { stroke: var(--c-avail); }
.cash-chart .l-known { stroke: var(--c-avail); stroke-width: 1.5; stroke-dasharray: 5 4; }
.cash-chart .p-close { fill: var(--fg); stroke: var(--surface); stroke-width: 2; }
.cash-chart .p-avail { fill: var(--c-avail); stroke: var(--surface); stroke-width: 2; }
.cash-table { border-collapse: collapse; width: 100%; min-width: 520px; font-variant-numeric: tabular-nums; font-size: 14px; }
.cash-table.wide { min-width: 980px; font-size: 13px; }
.cash-table th, .cash-table td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: right; vertical-align: top; white-space: nowrap; }
.cash-table thead th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; white-space: normal; }
.cash-table th:first-child { text-align: left; font-weight: 600; }
.cash-table tr.open th, .cash-table tr.open td { background: var(--sunk); }
.cash-table tr.short th:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.cash-table .s { font-size: 12px; color: var(--muted); }
.cash-table .pill { margin-left: 6px; }
.cash-h3 { font-size: 14px; margin: 6px 0 0; }
.cash-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-amt .s { font-weight: 400; }
.cash-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cash-grid { grid-template-columns: 1fr 1fr 1fr; } }
.cash-date { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; font-size: 13px; }
.cash-date label { display: grid; gap: 4px; font-weight: 600; min-width: 0; }
.cash-date input { max-width: 190px; }
.cash-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.cash-check input { width: auto; }
.cash-how p { margin: 0 0 8px; font-size: 14px; }

/* ---- Projects by area, private projects (1.0.0.10) ---- */
.area-h { margin: 6px 0 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.area-h .muted-inline { margin-left: 4px; }
.chip-n { color: var(--muted); font-size: 12px; margin-left: 2px; }
.chip[aria-pressed="true"] .chip-n { color: inherit; }
.filter .chips + .chips { margin-top: 6px; }
.tile-marks { display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pill.private { background: var(--sun-soft); color: var(--fg); }

/* ---- "A new version is ready" (1.0.0.11): on top of everything, clear of the phone's notch, never over the tab bar ---- */
.update-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--brand); color: var(--brand-ink); font-weight: 600; text-align: center; }
.update-bar[hidden] { display: none; }
.update-bar .btn { background: var(--brand-ink); color: var(--brand); border: 0; }
.foot a[data-update] { font-weight: 600; }

/* ---- Update in the sidebar (1.0.0.12): looks like a tab, set apart because it is an action ---- */
@media (min-width: 760px) {
  .side .side-update { margin-top: 15px; position: relative; }
  .side .side-update::before { content: ""; position: absolute; left: 10px; right: 10px; top: -8px; border-top: 1px solid var(--line); }
  .side .side-update.ready { color: var(--brand); font-weight: 600; }
  .side .side-update.ready::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-left: auto; }
  .side .side-said { font-size: 12px; color: var(--muted); padding: 2px 10px 0; }
}

/* ---- Scorecard (1.0.0.14) ---- */
.score-table th:first-child { white-space: normal; min-width: 170px; }
.spark { width: 96px; height: 24px; display: block; margin-left: auto; }
.spark polyline { fill: none; stroke: var(--c-in); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.ok-text { color: var(--ok); font-weight: 600; }
.score-row + .score-row { border-top: 1px solid var(--line); }
.score-row .row { border-top: 0; }
.score-row details .row { border-top: 1px solid var(--line); padding: 6px 0; }
