/* Prepared HQ (26 Oct 2026): the merged Today design (canvas Bv6BFqHbPQcDVMd8zXks7Y, Home.dc.html).
   System fonts only, so the page loads nothing from anyone else. */
:root {
  --ground: #F4F2EC; --card: #FFFFFF; --line: #E4DFD3; --line-soft: #F0ECE3;
  --ink: #182A45; --navy: #0B1F3A; --navy-2: #22385C; --muted: #51617D; --side-ink: #DDE6F2; --side-muted: #B9C7DB;
  --amber: #F59E0B; --amber-ink: #B45309; --amber-soft: #F5B544;
  --good: #15803D; --good-bg: #DFF0E4; --bad: #B91C1C; --bad-bg: #FBE3E3; --warn: #B45309; --warn-bg: #FCEFD8; --quiet-bg: #EEF1F5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #0E1A2E; --card: #13233D; --line: #223657; --line-soft: #1B2E4C; --ink: #E6ECF5; --navy: #F5F7FB; --navy-2: #C9D5E6; --muted: #A3B2C9;
          --good-bg: #123524; --good: #6EE7A0; --bad-bg: #3A1618; --bad: #FCA5A5; --warn-bg: #3A2A10; --warn: #FCD34D; --quiet-bg: #1B2E4C; --amber-ink: #F5B544; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.45 var(--sans); }
a { color: var(--navy-2); }
h1, h2 { color: var(--navy); }
.muted { color: var(--muted); }
.fp { flex: none; }

/* sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.auth-card h1 { font: 600 28px/1.15 var(--serif); margin: 18px 0 6px; }
.auth .brand span { color: var(--navy); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 16px 0; }
.field input { font: 500 16px var(--sans); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); color: var(--ink); }
.msg { min-height: 20px; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: #0B1F3A; color: #FFFFFF; font: 700 13.5px var(--sans); padding: 10px 14px; border-radius: 9px; min-height: 44px; cursor: pointer; }
.btn .fp { color: var(--amber-soft); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-big { width: 100%; min-height: 52px; font-size: 15px; margin-top: 8px; }
.btn-quiet { background: var(--card); color: var(--navy); border: 1px solid var(--line); }
.btn-text { background: transparent; color: var(--muted); padding: 10px 6px; }
.linklike { border: 0; background: none; color: var(--side-ink); font: 600 12.5px var(--sans); padding: 8px 0; cursor: pointer; text-decoration: underline; min-height: 36px; }
@media (prefers-color-scheme: dark) { .btn { background: #F59E0B; color: #0B1F3A; } .btn .fp { color: #0B1F3A; } }

/* frame */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 236px; max-width: 100%; background: #0B1F3A; color: var(--side-ink); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; color: #FFFFFF; }
.brand b { color: var(--amber); }
.nav { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.nav a { display: flex; justify-content: space-between; align-items: center; color: var(--side-ink); text-decoration: none; padding: 10px; border-radius: 8px; min-height: 44px; }
.nav a.on { background: #22385C; color: #FFFFFF; }
.count { background: var(--amber); color: #0B1F3A; font-size: 11.5px; border-radius: 999px; padding: 2px 7px; }
.side-foot { margin-top: auto; font-size: 12.5px; color: var(--side-muted); display: flex; flex-direction: column; gap: 6px; }
.side-foot .fp { color: var(--amber-soft); vertical-align: -2px; }
.main { flex: 999 1 560px; min-width: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; padding: 28px 28px 48px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.col-side { flex: 1 1 330px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 760px) {
  .side { flex-basis: 100%; padding: 12px 16px; gap: 10px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .side-foot { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .cols { padding: 18px 16px 32px; gap: 16px; }
  .col-side { order: -1; } /* on a phone the queue comes first */
}

/* brief */
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-ink); }
.brief h1 { margin: 10px 0 10px; font: 600 clamp(27px, 4vw, 42px)/1.12 var(--serif); max-width: 820px; }
.brief p { margin: 0; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; color: var(--navy-2); max-width: 820px; }
.things { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.thing { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.thing-n { font: 700 28px/1 var(--serif); color: var(--amber-ink); }
.thing-title { font-weight: 700; font-size: 15.5px; color: var(--navy); }
.thing-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* numbers + tables */
.kpis { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line-soft); }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 4px; }
.kpi-note { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-note.good { color: var(--good); } .kpi-note.warn { color: var(--amber-ink); } .kpi-note.bad { color: var(--bad); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.panel h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; padding: 8px 8px 8px 0; }
td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line-soft); }
.num { text-align: right; } .strong { font-weight: 700; }
.pill { font-weight: 700; font-size: 12px; border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.quiet { background: var(--quiet-bg); color: var(--muted); }

/* queue */
.card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.due-urgent { color: var(--bad); }
.card-title { font-weight: 700; font-size: 14.5px; color: var(--navy); margin-top: 5px; line-height: 1.35; }
.card-text { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note { display: none; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.note.open { display: flex; }
.note textarea { font: 14px var(--sans); padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); color: var(--ink); }
.all-clear { text-align: center; padding: 18px 8px; color: var(--good); font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); margin: 12px 0 0; display: flex; gap: 6px; align-items: center; }
.hint .fp { color: var(--amber-ink); }
.coming { background: #0B1F3A; color: #FFFFFF; border-radius: 14px; padding: 16px; }
.coming h2 { margin: 0 0 10px; font-size: 15px; color: #FFFFFF; }
.coming-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 3px 0; }
.coming-row b { color: var(--amber-soft); } .coming-row span { color: var(--side-ink); }

/* ---- the other pages (26 Oct 2026): Money, Stats, Systems, Catalogue, Switches ---- */
.page { padding: 28px 28px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1180px; }
.page-head h1 { margin: 8px 0 6px; font: 600 clamp(26px, 3.4vw, 36px)/1.15 var(--serif); }
.page-head p { margin: 0; font-size: 14.5px; max-width: 720px; }
.empty { margin: 4px 0; color: var(--muted); font-style: italic; }
.small { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.smallprint { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 0 4px; }
.smallprint p { margin: 0 0 6px; }
.nowrap { white-space: nowrap; }
.wrap { overflow-wrap: anywhere; }
td.bad, dd.bad { color: var(--bad); font-weight: 700; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--quiet-bg); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
table.fit { min-width: 0; }
.panel-head .legend { margin: 0; }
.panel-head { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.kpis .kpi:last-child { border-right: 0; }

/* charts: colour by class, never by inline style */
.chart-box { margin-top: 6px; }
.chart { display: block; width: 100%; height: auto; }
/* The SVG scales with its box, so its text is set per width band to land at roughly 11-14px on screen. */
.chart text { font: 600 12px var(--sans); fill: var(--muted); }
@media (min-width: 1200px) { .chart text { font-size: 9.5px; } }
.chart.narrow { display: none; }
.chart.narrow text { font-size: 13px; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .grid.base { stroke: var(--line); }
.bar.last, .sw.last { fill: #22385C; background: #22385C; }
.bar.now, .sw.now { fill: #F59E0B; background: #F59E0B; }
.seg.amazon, .sw.amazon, .share.g1, .sw.g1 { fill: #22385C; background: #22385C; }
.seg.awin, .sw.awin, .share.g2, .sw.g2 { fill: #F59E0B; background: #F59E0B; }
.seg.shop, .sw.shop, .share.g3, .sw.g3 { fill: #5B8DEF; background: #5B8DEF; }
.seg.adsense, .sw.adsense { fill: #C0587E; background: #C0587E; }
.seg.articles, .sw.articles { fill: #0F8B7E; background: #0F8B7E; }
.seg.samples, .sw.samples { fill: #8B6FD6; background: #8B6FD6; }
.seg.est { opacity: .45; }
.chart path:hover, .chart rect:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key b { color: var(--ink); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sharebar { display: block; width: 100%; height: 22px; margin-top: 4px; }
@media (max-width: 760px) {
  .page { padding: 18px 16px 32px; gap: 14px; }
  .nav a { padding: 10px 9px; flex: none; }
  .nav { position: relative; scrollbar-width: none; }
  .chart.wide { display: none; }
  .chart.narrow { display: block; }
  .app { align-content: flex-start; } /* the menu bar keeps its own height on a short page */
}
@media (prefers-color-scheme: dark) {
  .bar.last, .sw.last, .seg.amazon, .sw.amazon, .share.g1, .sw.g1 { fill: #8FA8D0; background: #8FA8D0; }
  .seg.adsense, .sw.adsense { fill: #E07AA0; background: #E07AA0; }
  .seg.articles, .sw.articles { fill: #3CC2B2; background: #3CC2B2; }
  .seg.samples, .sw.samples { fill: #B39DF0; background: #B39DF0; }
}

/* money */
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.tlist { margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.tlist div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.tlist dt { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.tlist dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tcard .kpi-note { margin-top: 8px; font-weight: 500; }
td.num { font-variant-numeric: tabular-nums; }
.est-tag { font-size: 10.5px; font-weight: 800; color: var(--amber-ink); background: var(--warn-bg); border-radius: 5px; padding: 1px 5px; }
sup { font-size: 9px; }

/* stats */
.seg-nav { display: inline-flex; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg-nav a { text-decoration: none; color: var(--muted); font-weight: 700; padding: 8px 14px; border-radius: 8px; min-height: 40px; display: inline-flex; align-items: center; }
.seg-nav a.on { background: #0B1F3A; color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .seg-nav a.on { background: #F59E0B; color: #0B1F3A; } }

/* systems */
.errors { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.errors b { color: var(--bad); }

/* catalogue */
.small-id { font-size: 11.5px; font-weight: 500; margin-top: 2px; }

/* home alerts card (Today) */
.mini { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 14px; }
.mini dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini dd { margin: 2px 0 0; font-weight: 800; color: var(--navy); font-size: 15px; }
.mini dd .muted { font-weight: 600; font-size: 12.5px; }

/* switches */
.switches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.switch { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.switch:first-child { border-top: 0; padding-top: 4px; }
.switch-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch-label { font-weight: 700; font-size: 15px; color: var(--navy); }
.switch-detail { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.switch-form { margin-top: 10px; }
.requested { margin: 10px 0 0; font-weight: 700; color: var(--amber-ink); background: var(--warn-bg); border-radius: 9px; padding: 10px 12px; font-size: 13.5px; }
