
@font-face { font-family: "Albert Sans"; src: url("/brand/fonts/albert-sans.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/brand/fonts/playfair-display.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --line: #e2dfd8;
  --line-strong: #cfcac0;
  --fg: #26282b;
  --fg-2: #5f6368;
  --fg-3: #8a8e93;
  --brand: #66696b;
  --gold: #dbad49;
  --gold-hover: #cc9c35;
  --gold-ink: #7a5a12;
  --gold-wash: #fbf3dd;
  --on-gold: #261c02;
  --ok: #1f7a4d; --ok-wash: #e4f3ea;
  --warn: #9a6400; --warn-wash: #fdf1d6;
  --bad: #b3261e; --bad-wash: #fbe7e5;
  --info: #335d8f; --info-wash: #e6eef8;
  --shadow: 0 1px 2px rgba(38,40,43,.06), 0 4px 16px rgba(38,40,43,.05);
  --font: Runda, "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 8px; --r-sm: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #1b1c1e; --surface: #232528; --surface-2: #2b2d31; --line: #35383d; --line-strong: #4a4e54;
  --fg: #ecebe7; --fg-2: #b4b7bb; --fg-3: #80848a; --brand: #a9adb1;
  --gold: #e0b858; --gold-hover: #ecc66a; --gold-ink: #f0cf7a; --gold-wash: #3a3220; --on-gold: #261c02;
  --ok: #6fcf97; --ok-wash: #1e3328; --warn: #e6b454; --warn-wash: #3a2f14; --bad: #f28b82; --bad-wash: #3d2220; --info: #8ab4f8; --info-wash: #1f2c3e;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
} }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
code { font: 12.5px var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }

/* Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail .logo { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; text-decoration: none; }
.rail .logo img { width: 124px; height: auto; display: block; }
.rail .logo span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.rail nav { display: flex; flex-direction: column; gap: 18px; }
.rail .group { display: flex; flex-direction: column; gap: 1px; }
.rail .group h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); padding: 0 10px 6px; font-weight: 600; }
.rail nav a { display: block; padding: 7px 10px; border-radius: var(--r-sm); text-decoration: none; font-size: 13.5px; color: var(--fg-2); position: relative; }
.rail nav a:hover { background: var(--surface-2); color: var(--fg); }
.rail nav a[aria-current="page"] { background: var(--gold-wash); color: var(--fg); font-weight: 600; }
.rail nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.rail .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--fg-3); }
.rail .foot .who { color: var(--fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rail .version { display: inline-block; width: max-content; font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.rail .logout button { background: none; border: 0; padding: 0; color: var(--fg-3); text-decoration: underline; font: inherit; font-size: 12.5px; cursor: pointer; }
.rail .logout button:hover { color: var(--fg); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 48px; padding: 8px 28px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.crumbs .sep { margin: 0 8px; color: var(--line-strong); }
.crumbs .here { color: var(--fg); font-weight: 600; }
.page { width: 100%; max-width: 1180px; padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.page > * { min-width: 0; margin: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.page-head h1 { font: 600 28px/1.2 var(--display); letter-spacing: -.01em; }
.page-head .lede { margin: 4px 0 0; color: var(--fg-2); max-width: 64ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page h2 { font-size: 16px; font-weight: 600; margin-top: 8px; }
.page h3 { font-size: 14px; font-weight: 600; }
.page p { max-width: 72ch; }

/* Buttons and controls */
button, .btn, a.button { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:hover, .btn:hover, a.button:hover { border-color: var(--fg-3); }
button.primary, .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
button.primary:hover, .btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
button.danger, .btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
button.danger:hover, .btn.danger:hover { background: var(--bad-wash); }
form.inline { display: inline; }
input, select, textarea { font: inherit; color: inherit; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); width: 100%; max-width: 28rem; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(219,173,73,.25); }
textarea { min-height: 7rem; }
label { display: block; margin: 0.7rem 0 0.25rem; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
/* Controls sit inside their label for the binding; they take body type. */
label > input, label > select, label > textarea { display: block; margin-top: 4px; font: 14px/1.5 var(--font); font-weight: 400; color: var(--fg); }
.muted { color: var(--fg-3); }
time { color: var(--fg-2); }
.flash { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid; font-size: 13px; color: var(--fg); position: sticky; top: 8px; z-index: 6; box-shadow: var(--shadow); }
.flash b { font-weight: 600; }
.flash.ok { background: var(--ok-wash); border-color: var(--ok); }
.flash.ok b { color: var(--ok); }
.flash.warn { background: var(--warn-wash); border-color: var(--warn); }
.flash.warn b { color: var(--warn); }
.flash.bad { background: var(--bad-wash); border-color: var(--bad); }
.flash.bad b { color: var(--bad); }
.empty { padding: 28px 18px; text-align: center; color: var(--fg-2); min-width: 18rem; }
.empty strong { display: block; color: var(--fg); margin-bottom: 4px; font-size: 14px; }
details.confirm { display: inline-block; vertical-align: middle; position: relative; }
details.confirm > summary { list-style: none; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > summary { background: var(--bad-wash); }
details.confirm > form { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); width: 22rem; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--bad); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); text-align: left; }
details.confirm > form p { margin: 0 0 6px; font-size: 13px; color: var(--fg-2); }
details.confirm > form label { margin-top: 4px; }
details.confirm > form input { max-width: none; }
details.confirm > form button { margin-top: 10px; }
td details.confirm { margin-left: 4px; }
.pager { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg-2); }
.pager span { margin-right: auto; }

/* Surfaces existing pages already emit */
fieldset { border: 1px solid var(--line); border-radius: var(--r); margin: 0; padding: 14px 18px 18px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
legend { float: left; width: 100%; font-weight: 600; font-size: 16px; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
legend + * { clear: both; }
/* Block tables size to their content and scroll sideways inside their own
   box, so a ten column table never widens the page. */
table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); font-size: 13.5px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--fg-2); font-weight: 600; letter-spacing: .02em; background: var(--surface-2); white-space: nowrap; }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
tbody tr:hover > td { background: var(--surface-2); }
td pre { margin: 0; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.8rem; overflow-x: auto; white-space: pre-wrap; font: 12.5px/1.5 var(--mono); }
.notice, .error { padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid; font-size: 13px; }
.notice { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.error { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-wash); }
.pill.off { color: var(--fg-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pill.warn { color: var(--warn); background: var(--warn-wash); }
.pill.bad { color: var(--bad); background: var(--bad-wash); }
.pill.info { color: var(--info); background: var(--info-wash); }
p.hint { font-size: 12.5px; color: var(--fg-2); }

/* Connector pages: family headings, tabs, coverage meters, fact lists */
h2.family { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 22px 0 8px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 18px; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--fg-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--gold); font-weight: 600; }
.tabs .n { font-size: 11.5px; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line); }
.tabs .n.warn { background: var(--warn-wash); color: var(--warn); box-shadow: none; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -6px 0 14px; font-size: 13px; color: var(--fg-2); }
.detail-meta .why { color: var(--fg-3); }
.detail-meta .bad, dl.facts .bad { color: var(--bad); }
.duo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.panel.glance dl.facts { margin: 0; }
.cx-cols, .cx-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(130px, 1fr) 96px 88px; gap: 14px; align-items: center; }
.cx-cols { padding: 0 15px 6px; font-size: 12px; color: var(--fg-3); }
.cx-cols .r, .cx-calls, .cx-last { text-align: right; justify-content: flex-end; }
.cx-row { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; color: var(--fg); text-decoration: none; }
.cx-row:hover { background: var(--surface-2); text-decoration: none; }
.cx-row .nm { min-width: 0; }
.cx-row .nm b { display: block; font-weight: 600; }
.cx-row .slug { display: block; font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-st { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.cx-st .why { font-size: 12px; color: var(--fg-3); }
.cov { display: grid; gap: 4px; font-size: 12px; color: var(--fg-3); min-width: 0; }
.cov meter { width: 100%; height: 6px; }
.cov span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-calls { display: flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.cx-calls .spark { width: 56px; height: 18px; margin: 0; flex: none; }
.cx-last { font-size: 12.5px; color: var(--fg-2); }
.acc-item .ct .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: inline-block; }
.acc-item .ct .dot.bad, .acc-item .em .bad { background: var(--bad); }
.acc-item .em .warn { color: var(--warn); }
.acc-item .em .bad { color: var(--bad); background: none; }
.acc-tools form.sort { display: flex; gap: 8px; align-items: center; margin: 0 0 0 auto; }
.acc-tools form.sort label { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 0; }
.acc-tools form.sort select { width: auto; margin: 0; }
.panel.act { padding-bottom: 6px; }
.toolbar input[type="search"] { max-width: 14rem; }
.toolbar select { width: auto; max-width: 16rem; margin: 0; }
.stat-line { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 14px 2px 8px; }
.stat-line div { display: grid; }
.stat-line .k { font-size: 12px; color: var(--fg-3); }
.stat-line .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-line .v.bad { color: var(--bad); }
.stat-line .v small { font-size: 12.5px; font-weight: 500; color: var(--fg-3); margin-left: 4px; letter-spacing: 0; }
td .sub { display: block; font-size: 12px; color: var(--fg-3); }
td.tools code { margin-right: 4px; }
.notes .snap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; font-size: 13px; color: var(--fg-2); }
.notes .snap form { margin: 0; }
.notes .insight { margin-bottom: 14px; }
.note { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.note .scope b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin-bottom: 3px; }
.note .scope code { font-size: 12.5px; }
.note .scope .when { display: block; margin-top: 6px; font-size: 12px; color: var(--fg-3); }
.note:target { background: var(--gold-wash); box-shadow: 0 0 0 8px var(--gold-wash); border-radius: 4px; }
.note form { margin: 0; }
.note label { margin: 0; }
.note textarea { width: 100%; max-width: none; min-height: 5rem; font-size: 13.5px; }
.note form p { margin: 6px 0 0; }
.note .right details.confirm { margin: 0; }
.notes details.add { margin-top: 14px; }
.notes .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.notes .two input, .notes .two select, .notes textarea { max-width: none; width: 100%; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; font-size: 13.5px; }
dl.facts dt { color: var(--fg-2); font-weight: 600; font-size: 12.5px; }
dl.facts dd { margin: 0; }
details.add { margin: 10px 0; }
details.add > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
details.add[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.add > fieldset { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
td a strong { color: var(--fg); }

/* Grants page: people column and the grant rows */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.split { display: grid; grid-template-columns: 18.5rem minmax(0, 1fr); gap: 18px; align-items: start; }
.people { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px; }
.people form { margin: 0 0 6px; }
.people label { margin: 0; }
.people input { max-width: none; }
.people h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 12px 6px 4px; }
.people .acc-list { max-height: 640px; overflow-y: auto; }
.people .acc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); color: var(--fg); text-decoration: none; font-size: 13.5px; min-width: 0; }
.people .acc-item .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .acc-item .em { grid-column: 1; font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .acc-item .ct { grid-column: 2; grid-row: 1 / 3; align-self: center; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--fg-3); }
.people .acc-item:hover { background: var(--surface-2); }
.people .acc-item[aria-current="page"] { background: var(--gold-wash); box-shadow: inset 3px 0 0 var(--gold); }
.people .acc-item[aria-current="page"] .nm { font-weight: 600; }
.people .acc-foot { margin: 8px 6px 4px; font-size: 12px; color: var(--fg-3); }
.people details.add { margin: 6px 0 0; }
.people details.add > summary { font-size: 13px; padding: 8px 10px; }
.seg-row { display: flex; justify-content: flex-end; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.seg a { padding: 4px 11px; border-radius: 6px; font-size: 12.5px; color: var(--fg-2); text-decoration: none; font-weight: 500; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.pane { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 22px 20px; }
.pane h2 { margin-top: 0; }
.acc-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.acc-head h2 { font: 500 22px/1.2 var(--display); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.acc-head p { color: var(--fg-2); font-size: 13px; margin: 4px 0 0; max-width: 70ch; }
.acc-head .right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acc-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 6px; }
.acc-tools label { margin: 0; }
.acc-tools input[type="search"] { max-width: 18rem; margin: 0; }
.check { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--fg); }
.check input { width: auto; max-width: none; margin: 0; }
.fam h3 { display: flex; gap: 8px; align-items: baseline; margin: 16px 0 8px; font-size: 13px; }
.fam h3 span { font-weight: 400; font-size: 12px; color: var(--fg-3); }
.g-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.g-row .nm { min-width: 0; }
.g-row .nm b { font-weight: 600; }
.g-row .tier { font-size: 12px; color: var(--fg-3); margin-left: 6px; }
.g-row .ds { display: block; font-size: 12.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-row .st { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.g-row label { margin: 0; }
.g-row select { width: auto; min-width: 13rem; max-width: none; margin: 0; }
.pill.plain::before { display: none; }

/* Overview: tiles, attention list, the hourly chart, two columns */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .k { font-size: 12px; color: var(--fg-2); font-weight: 600; }
.tile strong { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.tile .d { font-size: 12.5px; color: var(--fg-3); }
.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attention li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r); box-shadow: var(--shadow); }
.attention li.bad { border-left-color: var(--bad); }
.attention li.warn { border-left-color: var(--warn); }
.attention li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attention li span { font-size: 13px; color: var(--fg-2); }
.attention li .btn { white-space: nowrap; }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px 8px; }
.chart { display: block; width: 100%; height: auto; }
.chart .bar { fill: var(--gold); }
.chart .err { fill: var(--bad); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .tick { fill: var(--fg-3); font-size: 10px; font-family: var(--font); }
.legend { display: flex; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--fg-2); margin: 6px 0 0; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.swatch.bar { background: var(--gold); }
.swatch.err { background: var(--bad); }

/* Overview hero (issue #129 phase 9): status, headline, metrics, chart */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 22px 26px 14px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px 28px; }
.hero .status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--fg-2); }
.hero .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.hero .dot.warn { background: var(--warn); }
.hero .headline { font: 500 34px/1.15 var(--display); letter-spacing: -.01em; margin: 10px 0 12px; max-width: 18ch; }
.hero .lede-big { margin: 0; font-size: 15px; color: var(--fg-2); max-width: 46ch; }
.hero .lede-big strong { color: var(--fg); font-weight: 600; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; border-left: 1px solid var(--line); padding-left: 24px; align-self: start; }
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric .k { font-size: 12px; color: var(--fg-2); font-weight: 600; }
.metric strong { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.metric .d { font-size: 12.5px; color: var(--fg-3); }
.metric .d.bad { color: var(--bad); }
.spark { display: block; width: 100%; max-width: 160px; height: 26px; margin-top: 4px; }
.spark .area { fill: var(--gold); opacity: .22; }
.spark .line { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.spark.err .area { fill: var(--bad); }
.spark.err .line { stroke: var(--bad); }
.spark.flat .area { fill: var(--fg-3); }
.spark.flat .line { stroke: var(--fg-3); }
.hero-chart { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.panel h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 12px; }
.panel h2 .muted { font-size: 12.5px; font-weight: 500; }
.panel h2 a { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.panel .attention li { box-shadow: none; }
ul.health { list-style: none; margin: 0; padding: 0; }
ul.health li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 4rem; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
ul.health li:last-child { border-bottom: 0; }
ul.health .name { font-weight: 600; }
ul.health .name a { text-decoration: none; }
ul.health .note { display: block; font-size: 12.5px; color: var(--fg-3); }
ul.health .note.warn { color: var(--warn); }
ul.health .note.bad { color: var(--bad); }
ul.health .spark { margin: 0; }
ul.health .count { text-align: right; font-weight: 600; }
.table-view > summary { cursor: pointer; font-size: 12.5px; color: var(--fg-2); margin: 6px 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 18px; align-items: start; }
.cols section { min-width: 0; }
.cols h2 { margin-top: 0; }

/* Activity: the filter row, time split bars, the waterfall, the insight */
form.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px 14px; }
form.filters label { margin: 0; flex: 1 1 10rem; max-width: 18rem; }
form.filters button, form.filters .btn { margin-bottom: 1px; }
.timesplit { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12.5px; color: var(--fg-2); }
.timesplit svg { width: 90px; height: 8px; border-radius: 4px; overflow: hidden; flex: none; }
.timesplit .g { fill: var(--brand); }
.timesplit .m { fill: var(--gold); }
.tile .timesplit { font-size: 12px; }
.waterfall { display: block; width: 100%; height: auto; }
.waterfall .grid { stroke: var(--line); stroke-width: 1; }
.waterfall .tick, .waterfall .wf-label { fill: var(--fg-3); font-size: 10.5px; font-family: var(--font); }
.waterfall .wf-label { fill: var(--fg-2); }
.waterfall .wf-gap { fill: var(--gold); opacity: .55; }
.waterfall .wf-call { fill: var(--brand); }
.waterfall .wf-call.err { fill: var(--bad); }
.swatch.gap { background: var(--gold); opacity: .55; }
.insight { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--gold-wash); border: 1px solid var(--gold); border-radius: var(--r); }
.insight.bad { background: var(--bad-wash); border-color: var(--bad); }
.insight > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.insight span { font-size: 13.5px; color: var(--fg); }
.insight .btn { white-space: nowrap; }

/* Sign in, chooser, landing, and credentials pages share the stylesheet */
body.login { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
body.landing { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #ffffff; color: var(--brand); }
body.landing main { text-align: center; padding: 3rem 1.5rem; }
body.landing img.logo { width: min(34rem, 86vw); height: auto; display: block; margin: 0 auto; }
body.landing p.service { font-size: 1.05rem; letter-spacing: 0.28em; text-transform: uppercase; margin: 1.2rem 0 0; }
.chooser { text-align: center; max-width: 22rem; }
.chooser h1 { font-size: 1.2rem; margin: 0 0 1.5rem; }
.chooser img.mark { margin-bottom: 0.8rem; }
.chooser a.button { display: flex; width: 100%; gap: 0.7rem; padding: 0.7rem; margin-bottom: 0.75rem; font-size: 1rem; font-weight: 500; }
.chooser a.microsoft { background: #2f2f2f; color: #fff; border-color: #2f2f2f; }
.chooser a.microsoft:hover { background: #1f1f1f; border-color: #1f1f1f; }
.chooser a.google { background: #fff; color: #3c4043; border-color: #dadce0; }
.chooser a.google:hover { background: #f8f9fa; }
.chooser .error { margin: 0 0 1rem; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2.2rem; max-width: 24rem; width: 100%; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.1rem; text-align: center; }
.login-card img.mark { display: block; margin: 0 auto 0.6rem; }
.login-card a.button { display: flex; margin: 0.6rem 0; padding: 0.65rem; }
.login-card p { color: var(--fg-2); font-size: 13px; }
.cred-shell { max-width: 72rem; padding: 2rem 2.4rem; }
.cred-shell h1 { text-align: center; border-bottom: 3px solid var(--gold); padding-bottom: 0.55rem; }
.cred-intro { font-size: 0.88rem; color: var(--fg-2); text-align: center; max-width: 44rem; margin-left: auto; margin-right: auto; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1.1rem; margin: 1.2rem 0; align-items: start; }
.cred-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 1rem 1.15rem; box-shadow: var(--shadow); min-width: 0; }
.cred-card input { max-width: none; }
.cred-head { display: flex; align-items: center; gap: 0.65rem; }
.cred-logo { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; flex: none; }
.cred-logo svg { width: 24px; height: 24px; }
.cred-title { font-weight: 600; font-size: 1rem; flex: 1; }
.cred-card p.hint { margin: 0.6rem 0 0.8rem; }
.cred-card label { margin-top: 0.5rem; }
a.button.ms { display: inline-flex; padding: 0.55rem 1rem; }
a.button.ms svg { width: 18px; height: 18px; }
.signout { text-align: center; margin-top: 1.3rem; }
.signout button { border: none; background: none; color: var(--fg-3); text-decoration: underline; padding: 0; font-size: 0.84rem; }

/* Phone */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .rail .logo img { width: 96px; }
  .rail nav { flex: 1 1 100%; gap: 10px; }
  .rail .group { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .rail .group h3 { flex-basis: 100%; padding-bottom: 2px; }
  .rail nav a[aria-current="page"]::before { display: none; }
  .rail .foot { margin-top: 0; padding-top: 8px; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .page-head .actions { margin-left: 0; }
  input, select, textarea { max-width: none; }
  .split { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 18px 16px 10px; }
  .hero .headline { font-size: 28px; }
  .metrics { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  ul.health li { grid-template-columns: minmax(0, 1fr) 4rem; }
  ul.health .spark { display: none; }
  .people .acc-list { max-height: 240px; }
  .g-row { grid-template-columns: 1fr; gap: 6px; }
  .g-row .st { justify-content: flex-start; }
  .cx-cols { display: none; }
  .cx-row { grid-template-columns: 1fr; gap: 6px; }
  .cx-calls, .cx-last { justify-content: flex-start; text-align: left; }
  .duo { grid-template-columns: 1fr; }
  .note { grid-template-columns: 1fr; gap: 6px; }
  .notes .two { grid-template-columns: 1fr; }
  .pane { padding: 14px; }
  .cred-shell { padding: 1.4rem 1rem; }
}
