/* AID-I HQ
   Layout: a quiet left rail (staff) or top bar (client), with one wide working column.
   Black and gold first; the light theme is the brand's warm cream.
   Text colours meet WCAG AA (4.5:1) on every background they're used on (checked with axe, 21 Nov 2026). */
/* Look of 1 Dec 2026: the layout of the AI-visibility tools people know (sans-serif, rounder cards, pill buttons,
   a left sidebar, results in colour) in Aid-I's own black, gold and cream.
   The --*-fill colours are for bars and dots only (the results' strong / mixed / weak). */
:root {
  --bg: #0b0a09;        /* page */
  --surface: #131210;   /* panels */
  --surface-2: #1b1916; /* raised / hover */
  --line: #2a2723;
  --line-2: #3a352d;
  --fg: #f4f0ec;        /* cream ink */
  --muted: #a39c92;
  --dim: #88827a;
  --gold: #c8a860;
  --gold-2: #e2c98b;
  --gold-ink: #0b0a09;  /* text on gold */
  --gold-wash: rgba(200, 168, 96, .10);
  --good: #8fbf7f;  --good-wash: rgba(143, 191, 127, .12);
  --warn: #d9a84e;  --warn-wash: rgba(217, 168, 78, .13);
  --bad: #cf8a72;   --bad-wash: rgba(207, 138, 114, .13);
  --info: #8fa9c4;  --info-wash: rgba(143, 169, 196, .13);
  --good-fill: var(--good); --warn-fill: var(--warn); --bad-fill: var(--bad);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --brand: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: var(--sans);
  --r: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f1ea; --surface: #fffdf9; --surface-2: #efe9df; --line: #e3dacd; --line-2: #d3c7b6;
    --fg: #17140f; --muted: #6b6359; --dim: #6e665b;
    --gold: #7b5e27; --gold-2: #654b1b; --gold-ink: #fffdf9; --gold-wash: rgba(123, 94, 39, .10);
    --good: #456e3a; --good-wash: rgba(79, 127, 67, .11);
    --warn: #845c16; --warn-wash: rgba(167, 116, 28, .12);
    --bad: #95513a; --bad-wash: rgba(166, 90, 64, .11);
    --info: #496684; --info-wash: rgba(79, 111, 144, .11);
    --good-fill: #6f9a62; --warn-fill: #c9963f; --bad-fill: #b9705a;
    --shadow: 0 18px 50px rgba(60, 45, 20, .16);
    --card-shadow: 0 1px 2px rgba(60, 45, 20, .05);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f1ea; --surface: #fffdf9; --surface-2: #efe9df; --line: #e3dacd; --line-2: #d3c7b6;
  --fg: #17140f; --muted: #6b6359; --dim: #6e665b;
  --gold: #7b5e27; --gold-2: #654b1b; --gold-ink: #fffdf9; --gold-wash: rgba(123, 94, 39, .10);
  --good: #456e3a; --good-wash: rgba(79, 127, 67, .11);
  --warn: #845c16; --warn-wash: rgba(167, 116, 28, .12);
  --bad: #95513a; --bad-wash: rgba(166, 90, 64, .11);
  --info: #496684; --info-wash: rgba(79, 111, 144, .11);
  --good-fill: #6f9a62; --warn-fill: #c9963f; --bad-fill: #b9705a;
  --shadow: 0 18px 50px rgba(60, 45, 20, .16);
  --card-shadow: 0 1px 2px rgba(60, 45, 20, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
#root { min-height: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.num, td, .tabular { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------ wordmark */
.wordmark { font-family: var(--brand); font-weight: 600; font-size: 26px; letter-spacing: .01em; color: var(--fg); display: inline-flex; align-items: center; line-height: 1; }
.wordmark i { display: inline-block; width: .42em; height: .085em; background: var(--gold); margin: 0 .06em; transform: translateY(.06em); border-radius: 2px; box-shadow: 0 0 10px rgba(200,168,96,.5); }
.wordmark small { font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-left: 10px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .wordmark { font-size: 44px; opacity: .85; }

/* ------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 22px 14px 18px max(14px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px; background: var(--bg); }
.rail .brand { padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; text-align: left; }
.nav button:hover { background: var(--surface-2); color: var(--fg); }
.nav button[aria-current="page"] { background: var(--gold-wash); color: var(--fg); }
.nav button[aria-current="page"] svg { color: var(--gold); }
.nav .count { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 20px; padding: 1px 7px; }
.nav .count.hot { background: var(--warn-wash); color: var(--fg); box-shadow: inset 0 0 0 1px var(--warn); }
.rail .foot { margin-top: auto; display: grid; gap: 10px; padding: 0 8px; font-size: 12px; color: var(--dim); }
.rail .me { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); font-weight: 600; font-size: 12px; border: 1px solid var(--line-2); flex: none; }
.main { min-width: 0; padding: 26px max(16px, env(safe-area-inset-right, 0px)) 80px 34px; }
.main-inner { max-width: 1240px; margin: 0 auto; }

.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--line); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar button { background: none; border: 0; color: var(--muted); display: grid; justify-items: center; gap: 2px; font-size: 10.5px; padding: 6px 0; }
  .tabbar button[aria-current="page"] { color: var(--gold); }
  .main { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); }
}
@media (min-width: 901px) { .tabbar { display: none; } }

/* ------------------------------------------------ demo ribbon */
.ribbon { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; background: var(--gold-wash); border-bottom: 1px solid var(--line); color: var(--gold-2); font-size: 12.5px; padding: 7px max(16px, env(safe-area-inset-right, 0px)) 7px max(16px, env(safe-area-inset-left, 0px)); }
.ribbon .seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; }
.ribbon .seg button { background: none; border: 0; padding: 3px 11px; color: var(--muted); font-size: 12px; }
.ribbon .seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }

/* ------------------------------------------------ page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 22px; }
.eyebrow { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 6px; }
.page-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; }
.page-head h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
.page-head .sub { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------ buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 9px; padding: 8px 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); border-color: var(--dim); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; }
.btn.gold:hover { filter: brightness(1.07); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--fg); background: var(--surface-2); }

.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 11px; color: var(--fg); min-width: 0; }
textarea.input { resize: vertical; min-height: 76px; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.search { position: relative; min-width: 0; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search .input { padding-left: 32px; }
.inline-edit { background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 3px 6px; margin: -3px -6px; color: inherit; width: 100%; }
.inline-edit:hover { border-color: var(--line-2); }
.inline-edit:focus { outline: none; border-color: var(--gold); background: var(--bg); }

/* ------------------------------------------------ surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-family: var(--display); font-size: 22px; font-weight: 600; }
.panel-head .hint { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* ------------------------------------------------ stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.stat { background: var(--surface); padding: 16px 18px; min-width: 0; }
.stat .label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1.05; margin-top: 6px; color: var(--fg); }
.stat .value small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat.gold .value { color: var(--gold); }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------ pills, chips */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.info { background: var(--info-wash); color: var(--info); }
.pill.gold { background: var(--gold-wash); color: var(--gold); }
.pill.line { background: none; border-color: var(--line-2); }
.chip { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.gold-t { color: var(--gold); }
.good-t { color: var(--good); }
.warn-t { color: var(--warn); }
.bad-t { color: var(--bad); }
.serif { font-family: var(--display); }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; font-size: 13px; }
.empty.box { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 26px 16px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ------------------------------------------------ lists */
.list { display: grid; }
.list > .item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.list > .item:first-child { border-top: 0; }
.list .item .title { font-weight: 500; }
.list .item .meta { color: var(--muted); font-size: 12.5px; }
.check { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 5px; display: inline-grid; place-items: center; flex: none; margin-top: 1px; background: var(--bg); cursor: pointer; }
.check:checked { background: var(--gold); border-color: var(--gold); }
.check:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--gold-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.done-t { text-decoration: line-through; color: var(--dim); }

/* ------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: var(--surface-2); }
table.t td.r, table.t th.r { text-align: right; }

/* ------------------------------------------------ pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-wrap { position: relative; }
.board-wrap.more::after { content: ''; position: absolute; top: 0; right: 0; bottom: 12px; width: 48px; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg)); }
.lane.slim { align-items: center; gap: 8px; padding: 12px 0; min-height: 180px; }
.lane.slim h3 { writing-mode: vertical-rl; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0; }
.lane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-width: 0; transition: border-color .15s, background .15s; }
.lane.over { border-color: var(--gold); background: var(--gold-wash); }
.lane-head { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.lane-head .row { justify-content: space-between; }
.lane-head h3 { font-size: 13px; font-weight: 600; }
.lane-head .sum { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lane-body { padding: 10px; display: grid; gap: 8px; overflow-y: auto; align-content: start; min-height: 80px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: grab; display: grid; gap: 7px; transition: border-color .15s, transform .15s; min-width: 0; }
.card:hover { border-color: var(--line-2); }
.card.dragging { opacity: .45; }
.card .name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.card .next { font-size: 12px; color: var(--muted); line-height: 1.4; }
.card .next.late { color: var(--warn); }
.card .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ------------------------------------------------ client hub */
.hub-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 18px; }
@media (max-width: 760px) { .hub-head { grid-template-columns: minmax(0, 1fr); } }
.hub-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 40px); line-height: 1.05; }
.hub-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--gold); }
.back { background: none; border: 0; color: var(--muted); padding: 0; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.back:hover { color: var(--fg); }

/* ------------------------------------------------ big number / meters */
.hero-num { font-family: var(--display); font-weight: 600; font-size: 76px; line-height: .9; color: var(--gold); }
.hero-num small { font-size: 28px; color: var(--muted); font-weight: 500; }
.meter { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; border-radius: 8px; background: var(--gold); }
.meter.rival > i { background: var(--dim); }
.vs { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.vs .who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.channel { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.channel:first-child { border-top: 0; padding-top: 0; }
.goal-track { position: relative; height: 10px; background: var(--surface-2); border-radius: 10px; margin: 14px 0 8px; }
.goal-track > i { position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.goal-track > b { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--fg); opacity: .5; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }

/* ------------------------------------------------ timeline */
.timeline { display: grid; }
.tl { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.tl::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tl .ic.gold { color: var(--gold); border-color: var(--gold); background: var(--gold-wash); }
.tl .what { font-weight: 500; }
.tl .when { color: var(--dim); font-size: 12px; }
.tl .body { color: var(--muted); font-size: 13px; white-space: pre-wrap; margin-top: 2px; }

/* ------------------------------------------------ modal / drawer / toast */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); animation: fade .15s ease; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); animation: rise .2s ease; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.modal-head h2 { font-family: var(--display); font-size: 26px; font-weight: 600; }
.modal-body { padding: 16px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); animation: rise .2s ease; max-width: calc(100vw - 32px); }
@keyframes fade { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } }
.toast { animation-name: toastin; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px) } }

/* ------------------------------------------------ command palette */
.palette { width: min(600px, 100%); align-self: start; margin-top: 10vh; }
.palette .input { font-size: 16px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--surface); }
.palette .input:focus { box-shadow: none; }
.palette .results { max-height: 50vh; overflow: auto; padding: 6px; }
.palette .res { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 9px; }
.palette .res[aria-selected="true"], .palette .res:hover { background: var(--surface-2); }
.kbd { font-size: 11px; color: var(--dim); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }

/* ------------------------------------------------ invoice paper */
.paper { background: #fffdf9; color: #17140f; border-radius: 10px; padding: 34px 38px; font-size: 13px; box-shadow: var(--shadow); }
.paper .wordmark { color: #17140f; font-size: 30px; }
.paper .wordmark i { background: #9a7631; box-shadow: none; }
.paper table { width: 100%; border-collapse: collapse; margin-top: 22px; }
.paper th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6b6359; border-bottom: 1px solid #e3dacd; padding: 8px 0; }
.paper td { padding: 9px 0; border-bottom: 1px solid #efe9df; }
.paper .r { text-align: right; }
.paper .tot td { border: 0; font-weight: 600; }
.paper .muted { color: #6b6359; }
@media print {
  body * { visibility: hidden; }
  .paper, .paper * { visibility: visible; }
  .paper { position: absolute; inset: 0; box-shadow: none; }
}

/* ------------------------------------------------ login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login .art { position: relative; overflow: hidden; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.login .art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login .art > * { position: relative; }
.login .art h1 { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; max-width: 12ch; }
.login .art h1 em { color: var(--gold); }
.login .form { display: grid; place-items: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.login .form > div { width: min(380px, 100%); display: grid; gap: 14px; }
@media (max-width: 820px) { .login { grid-template-columns: minmax(0, 1fr); } .login .art { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); padding: 28px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); } }

/* ------------------------------------------------ client portal */
.portal-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.portal-top .in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.portal-nav { display: flex; gap: 2px; overflow-x: auto; }
.portal-nav button { background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.portal-nav button[aria-current="page"] { color: var(--fg); background: var(--gold-wash); }
.portal-main { max-width: 1080px; margin: 0 auto; padding: 30px max(16px, env(safe-area-inset-right, 0px)) 90px max(16px, env(safe-area-inset-left, 0px)); }
.welcome h1 { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; }
.welcome h1 em { color: var(--gold); }
.welcome p { color: var(--muted); max-width: 60ch; margin: 10px 0 0; }
.dots-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.feature { position: relative; overflow: hidden; }
.feature > *:not(canvas) { position: relative; }
@media (max-width: 900px) { .portal-nav.desk { display: none; } }
/* The portal has up to seven tabs: one row, however many there are. */
.portal-tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.portal-tabbar button { min-width: 0; font-size: 10px; }
@media (min-width: 901px) { .portal-tabbar { display: none; } }

/* "Sync now" button */
@keyframes spin { to { transform: rotate(360deg) } }
.spin { animation: spin 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* Time tracker (11 Nov 2026) */
.sticky-top { position: sticky; top: 0; z-index: 25; }
.timerbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--gold-wash); border-bottom: 1px solid var(--line-2); font-size: 13.5px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); backdrop-filter: blur(6px); }
.timerbar.long { background: var(--warn-wash); border-bottom-color: var(--warn); }
.timerbar .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: timerpulse 1.6s ease-in-out infinite; }
.timerbar .link { background: none; border: 0; padding: 0; color: var(--fg); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.timerbar .spacer { flex: 1; }
@keyframes timerpulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .timerbar .pulse { animation: none; } }
.timer-start { display: inline-flex; gap: 6px; align-items: center; }
.timer-stop { border-color: var(--bad); color: var(--bad); }
.hbar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar > i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.hbar.warn > i { background: var(--warn); }
.hbar.bad > i { background: var(--bad); }

/* Dropdowns and number boxes look the same in every browser (Safari draws its own grey ones). */
select.input { -webkit-appearance: none; appearance: none; padding-right: 32px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39c92' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 13px; }
input[type="number"].input { -moz-appearance: textfield; appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button, input[type="number"].input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* A save is in progress: buttons that would save again look busy (the click is ignored in app.js). */
body[data-busy] .btn:not(.ghost), body[data-busy] input.check { cursor: progress; opacity: .6; }
.modal.confirm { max-width: 440px; }

/* Invoice table: numbers, dates and money don't wrap; a link-looking button opens the invoice from the keyboard. */
table.t td.nowrap { white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The business name in a clickable row is a real link: Tab reaches it, Enter opens it (H2). */
.rowlink { color: inherit; text-decoration: none; }
.rowlink:hover, .rowlink:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Developer view and the owner's website page (phase 1) */
.main .seg, .portal-main .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; align-self: flex-start; }
.portal-main .seg button { background: none; border: 0; padding: 6px 14px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.portal-main .seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.dev-task h2 { font-family: var(--sans); font-weight: 600; }
.dev-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--info-wash); color: var(--fg); font-size: 13px; }
.dev-note.warn { background: var(--warn-wash); }
.dev-note.good { background: var(--good-wash); }
.dev-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dev-body h3 { font-size: 13px; font-weight: 600; margin: 4px 0 6px; }
.dev-body ol, .dev-body ul { margin: 0 0 12px; padding-left: 20px; }
.dev-body li { margin: 0 0 6px; line-height: 1.5; }
.paste { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0 0 12px; background: var(--surface-2); }
.paste pre { margin: 8px 0 0; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.45; }
.paste pre:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.paste-text { margin-top: 8px; white-space: pre-wrap; font-size: 13px; }
.facts-form textarea { min-height: 70px; }

/* Guided tour (demo only) */
.tour { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--fg, inherit); border: 1px solid var(--gold-2, var(--line));
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 36px rgba(0, 0, 0, .35); }
.tour h2 { font-size: 22px; margin: 2px 0 4px; }
.tour p { margin: 0 0 10px; line-height: 1.45; }
@media (max-width: 760px) { .tour { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }

/* ------------------------------------------------ SaaS 6.8: headline tiles, bar rows with their range, pill tabs,
   the owner's "Getting started" checklist, and a lighter, airier client portal (black and gold kept). */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
.kpi-value { font-size: 30px; font-weight: 600; line-height: 1.1; margin-top: 6px; letter-spacing: -.01em; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--gold); }
.bar > i.soft { background: color-mix(in srgb, var(--gold) 70%, var(--surface-2)); }
.bar > i.good { background: var(--good); } .bar > i.bad { background: var(--bad); }
.bar > b { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--fg) 22%, transparent); border-radius: 6px; }
.barlist { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.barrow { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.barrow-head, .barrow-foot { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.barrow-foot { justify-content: flex-start; }
.barrow .title { font-weight: 600; }
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; max-width: 100%; }
.seg-tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg-tabs button:hover { color: var(--fg); }
.seg-tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.linkish { background: none; border: 0; padding: 0; text-align: left; color: var(--fg); font-weight: 500; }
.linkish:hover { color: var(--gold); }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: -4px 0 14px; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 6px; transition: width .3s ease; }
.checklist-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.check-step { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface-2); border: 1px solid transparent;
  border-radius: 12px; padding: 12px 14px; color: var(--fg); }
.check-step:hover:not(:disabled) { border-color: var(--gold); }
.check-step .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-step .title { font-weight: 600; }
.check-step .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.check-step.done .tick { background: var(--good); border-color: var(--good); color: var(--bg); }
.check-step.done .title { text-decoration: line-through; color: var(--muted); }
/* The client's side: rounder cards, a soft lift, sans-serif panel headings, more room between sections. */
.portal-main .panel { border-radius: 16px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px -18px rgba(0, 0, 0, .35); }
.portal-main .panel-head h2 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.portal-main .panel.feature .eyebrow { letter-spacing: .08em; }
.portal-main .kpi { border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.portal-top { backdrop-filter: saturate(1.2) blur(8px); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.portal-nav button[aria-current="page"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 2px -10px; }
@media (max-width: 600px) { .kpi-value { font-size: 24px; } .portal-main .panel { padding: 16px; } }
@media (max-width: 600px) { .check-step.done .muted { display: none; } .check-step { padding: 10px 12px; } }
.barrow-foot .grow { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }   /* wraps under the figures on a phone */

/* ------------------------------------------------ Visual touches (30 Nov 2026): icons, info tips, skeletons,
   the AI quote card and the next-step card. */
.site-icon, .brand-mark { border-radius: 5px; object-fit: contain; flex: none; vertical-align: middle; background: #fff; }
.mark-letter { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 700; line-height: 1; vertical-align: middle;
  color: hsl(var(--h) 35% 28%); background: hsl(var(--h) 45% 88%); }
.mark-letter.sq { border-radius: 6px; }
:root[data-theme="dark"] .mark-letter { color: hsl(var(--h) 45% 85%); background: hsl(var(--h) 25% 24%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark-letter { color: hsl(var(--h) 45% 85%); background: hsl(var(--h) 25% 24%); } }
.info { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.info-btn { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--muted);
  font: 600 10px/1 var(--sans); padding: 0; display: grid; place-items: center; text-transform: none; letter-spacing: 0; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--fg); border-color: var(--gold); }
.info-pop { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(280px, 80vw);
  background: var(--fg); color: var(--bg); font: 400 12.5px/1.45 var(--sans); padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow);
  text-transform: none; letter-spacing: 0; white-space: normal; }
.skel-page .skel, .skel { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 45%, var(--surface-2) 65%);
  background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; max-width: 100%; }
.skel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.ai-quote { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.ai-quote-head { display: flex; align-items: center; gap: 8px; }
.ai-quote-ask { align-self: flex-end; max-width: 88%; background: var(--surface-2); border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: 13.5px; }
.ai-quote-answer { max-width: 92%; }
.ai-quote-answer ol { margin: 0 0 6px; padding-left: 20px; }
.ai-quote-answer li { padding: 3px 6px; border-radius: 6px; }
.ai-quote-answer li.you { background: var(--gold-wash); color: var(--gold); font-weight: 600; }
.next-card { align-self: start; background: #17140f; color: #f4f0ec; border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.next-card .btn.gold { margin-top: 6px; }
.next-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #e2c98b; }
.next-title { font-size: 20px; font-weight: 600; line-height: 1.25; }
.next-body { margin: 0; color: #c9c1b6; font-size: 13.5px; }
.next-marks { display: flex; gap: 6px; flex-wrap: wrap; }
.next-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.assistant-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; align-items: center; }
.assistant-row .a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.chart-here { font: 600 11px var(--sans); fill: var(--gold); }

/* ------------------------------------------------ Look of 1 Dec 2026 (see the top of this file).
   Headings and figures in the sans-serif, labels in sentence case, rounder white cards, black pill buttons. */
.page-head h1, .hub-head h1, .welcome h1, .login .art h1, .modal-head h2, .panel-head h2, .tour h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -.025em; }
.page-head h1, .hub-head h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; }
.welcome h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.login .art h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; }
.page-head h1 em, .welcome h1 em, .login .art h1 em { font-style: normal; color: var(--gold); font-weight: 600; }
.panel-head h2 { font-size: 16px; letter-spacing: -.01em; }
.modal-head h2 { font-size: 21px; }
.eyebrow { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 500; }
.stat .label, table.t th, .section-label, .next-eyebrow, .paper th { letter-spacing: 0; text-transform: none; font-size: 12.5px; font-weight: 500; }
.stat .value, .hero-num, .serif { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; }
.stat .value { font-size: 30px; }
.hero-num { color: var(--fg); }
.hero-num small { font-size: .38em; letter-spacing: 0; }
.kpi-value { font-size: 30px; letter-spacing: -.03em; }

.btn { border-radius: 999px; padding: 8px 16px; }
.btn.sm { border-radius: 999px; padding: 5px 12px; }
.btn.gold { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.gold:hover { filter: none; opacity: .86; }
.next-card .btn.gold { background: #c8a860; color: #0b0a09; border-color: #c8a860; }
.input, select.input, textarea.input { background: var(--surface); border-radius: 10px; }
.check:checked { background: var(--fg); border-color: var(--fg); }
.check:checked::after { border-color: var(--bg); }
.ribbon .seg button[aria-pressed="true"], .portal-main .seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.ribbon { background: var(--surface-2); color: var(--fg); }

.panel, .kpi, .skel-card, .ai-quote, .table-wrap, .lane { border-radius: 16px; box-shadow: var(--card-shadow); }
.portal-main .panel { box-shadow: var(--card-shadow); }
.stats { border-radius: 16px; }
.card { background: var(--surface); border-radius: 12px; box-shadow: var(--card-shadow); }
.lane { background: var(--surface-2); box-shadow: none; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--fg); }
.seg-tabs button[aria-selected="true"] { box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }

/* The staff rail and the portal's sidebar: white, with a grey pill and a gold marker on the page you're on. */
.rail { background: var(--surface); }
.nav button, .portal-nav button { position: relative; }
.nav button[aria-current="page"], .prail .portal-nav button[aria-current="page"] { background: var(--surface-2); color: var(--fg); box-shadow: none; }
.nav button[aria-current="page"]::before, .prail .portal-nav button[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav button[aria-current="page"] svg { color: var(--fg); }

/* The client portal's shell: a left sidebar on a computer, the top bar and bottom tabs on a phone. */
.pshell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.prail { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px;
  padding: 22px 14px 18px max(14px, env(safe-area-inset-left, 0px)); }
.prail .wordmark { padding: 0 8px; }
.prail .portal-nav { display: grid; gap: 2px; overflow: visible; }
.prail .portal-nav button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; }
.prail .portal-nav button:hover { background: var(--surface-2); color: var(--fg); }
.prail .portal-nav button[aria-current="page"] svg { color: var(--gold); }
.site-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.site-chip .lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.site-chip b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prail-foot { margin-top: auto; display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.pcol { min-width: 0; }
.pcol .portal-main { max-width: 1120px; padding-left: max(16px, min(40px, 3vw)); padding-right: max(16px, min(40px, 3vw)); }
.pcol .portal-top { display: none; }
@media (max-width: 900px) {
  .pshell { grid-template-columns: minmax(0, 1fr); }
  .prail { display: none; }
  .pcol .portal-top { display: block; }
}

/* Results in colour: strong, mixed and weak (insights.js says where the lines are). */
.bar > i.good { background: var(--good-fill); } .bar > i.warn { background: var(--warn-fill); } .bar > i.bad { background: var(--bad-fill); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend i.good { background: var(--good-fill); } .legend i.warn { background: var(--warn-fill); } .legend i.bad { background: var(--bad-fill); }
.feature .dots-canvas { opacity: .35; }   /* quieter on white cards */
