@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/static/fonts/plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/static/fonts/plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/static/fonts/plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/static/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/static/fonts/plex-mono-500.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #121110; --bar: #0b0a09; --surface: #1b1a17; --surface-2: #171614; --raised: #1e1d1a; --input: #141311;
  --line: #2e2c27; --line-soft: #262420; --line-strong: #3a3731;
  --ink: #f4f1ea; --text: #ece9e2; --text-2: #dcd8cf; --text-3: #c9c5bb; --muted: #a19c91; --faint: #8e8a80;
  --accent: #6fcfc2; --accent-ink: #0b1f1c; --accent-bg: #12302c; --accent-line: #245a53;
  --err: #f0937a; --err-line: #e0664a; --err-bg: #3b1c14;
  --future-bg: #2c2440; --future-line: #4b3d6e; --future-ink: #d9cbf6;
  --plan-bg: #382c12; --plan-line: #6b5520; --plan-ink: #f2d084;
  --ended-bg: #2a1f18; --ended-line: #5c3a22; --ended-ink: #f6c8a8;
  --logo-tile: #ece9e2;
  --logo-1: #245a53; --logo-2: #4b3d6e; --logo-3: #6b5520; --logo-4: #6e3f22;
  --logo-5: #2b4a6b; --logo-6: #3d5a2a; --logo-7: #6b2f45; --logo-8: #4a4740;
  /* Chart palette (dataviz palette.md, dark steps), validated against --surface: see README, "Charts". */
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --series-other: var(--faint); --status-warning: #fab219;
  --sans: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
[data-status="Proposed"]    { --st-bg: #2c2a26; --st-fg: #d3cec4; --st-dot: #8e8a80; }
[data-status="Evaluation"]  { --st-bg: #2c2440; --st-fg: #cfbcf4; --st-dot: #9d80e2; }
[data-status="Trial"]       { --st-bg: #192b40; --st-fg: #a3cbf4; --st-dot: #5b9be0; }
[data-status="Active"]      { --st-bg: #172f1f; --st-fg: #98dcae; --st-dot: #45b36b; }
[data-status="UnderReview"] { --st-bg: #382c12; --st-fg: #f2d084; --st-dot: #d9a430; }
[data-status="Cancelling"]  { --st-bg: #3b2215; --st-fg: #f6b288; --st-dot: #e57a35; }
[data-status="Cancelled"]   { --st-bg: #262522; --st-fg: #9a968d; --st-dot: #66625b; }
[data-status="None"]        { --st-bg: transparent; --st-fg: #a19c91; --st-dot: #4a463f; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--sans); }
a { color: var(--accent); } a:hover { color: #a3e6dc; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

.topbar { height: 60px; display: flex; align-items: center; gap: 40px; padding: 0 32px; background: var(--bar); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 6px; text-decoration: none; }
.nav a { color: var(--text-3); font-weight: 500; }
.nav a[aria-current="page"] { color: var(--text); background: var(--line-soft); }
.env { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--muted); }
.env-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.account { display: flex; align-items: center; gap: 12px; color: var(--text-3); }
.account-name { font-weight: 500; }
.banner-local { margin: 12px 32px 0; background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err); font-weight: 600; }
.page.bare { max-width: 560px; margin: 48px auto 0; align-items: center; text-align: center; }

.page { padding: 24px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 1600px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head > .title { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
h1 { margin: 0; font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.subtitle { margin: 0; color: var(--muted); }
.controls { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.control { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.input, .select { height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.input.mono, .select.mono { font-family: var(--mono); }
.input.is-shifted { border: 2px solid var(--accent); background: var(--accent-bg); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border: 2px solid var(--err-line); }
.btn { height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:disabled { color: #5f5b53; border-color: var(--line); cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; }
.btn-plan { background: var(--plan-bg); color: var(--plan-ink); border-color: var(--plan-line); font-weight: 600; }
.btn-small { height: 32px; padding: 0 12px; font-size: 13px; }

.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.banner > span { flex: 1; }
.banner-past { background: var(--accent-bg); border: 1px solid var(--accent-line); color: #b5ece4; }
.banner-future { background: var(--future-bg); border: 1px solid var(--future-line); color: var(--future-ink); }
.banner label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.card { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.card-value { margin: 0; font: 600 28px var(--mono); color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-value-text { font: 600 20px/34px var(--sans); letter-spacing: 0; }
.card-value-long { white-space: normal; font: 600 16px/22px var(--sans); }
.card-sub { font-size: 12px; color: #979286; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.pill { height: 34px; padding: 0 14px; border-radius: 17px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px dashed #4a463f; color: var(--faint); position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill:has(input:checked) { border: 1px solid var(--st-dot); background: var(--st-bg); color: var(--st-fg); }
.pill .count { font: 12px var(--mono); opacity: .8; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4a463f; flex: none; }
.pill:has(input:checked) .dot, .badge .dot { background: var(--st-dot); }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search { width: 320px; padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a19c91' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") no-repeat 12px center; }
.showing { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted); }
.showing .fx { font-size: 11px; color: var(--faint); }

.table { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  --col-seats: 150px; --col-cost: 130px; --col-dp: 150px; --col-seats-n: 150px; --col-cost-n: 120px; --col-dp-n: 120px; }
/* A column the viewer's access leaves out (slice 7) keeps an empty, zero-width cell. */
.table.no-seats { --col-seats: 0px; --col-seats-n: 0px; }
.table.no-cost { --col-cost: 0px; --col-cost-n: 0px; }
.table.no-dp { --col-dp: 0px; --col-dp-n: 0px; }
.thead, .tr { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.4fr) minmax(0, 1.6fr) 76px var(--col-seats) var(--col-cost) var(--col-dp) 150px; gap: 16px; padding: 0 20px; align-items: center; }
.thead { height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.thead button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.thead button[aria-pressed="true"] { color: var(--ink); }
.tr { min-height: 54px; border-bottom: 1px solid var(--line-soft); }
.tr:hover { background: #23221f; }
.tr.is-new { background: #15302c; }
.tr .name { font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tr[data-status="Cancelled"] .name { color: #858076; }
.num { font-family: var(--mono); text-align: right; }
.cell-cost { display: flex; flex-direction: column; align-items: flex-end; }
.cell-dp { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.report-links { display: flex; gap: 18px; margin: 0; font-size: 13px; }
.report-links a { color: var(--accent); }
.muted { color: var(--muted); }
.sub { font-size: 12px; color: #979286; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sub.planned { color: var(--plan-ink); font-weight: 600; font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--st-bg); color: var(--st-fg); }
.badge .dot { width: 6px; height: 6px; }
.badge[data-status="None"] { border: 1px dashed #4a463f; }
.empty { padding: 64px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.later-note { padding: 14px 20px; font-size: 13px; color: var(--faint); border-top: 1px dashed var(--line); }

.dialog { width: min(760px, calc(100vw - 32px)); padding: 0; border: 1px solid #34312c; border-radius: 12px; background: var(--raised); color: var(--text-2); }
.dialog::backdrop { background: rgba(0, 0, 0, .62); }
.dialog-head { padding: 22px 28px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
.dialog-head h2 { margin: 0; font-size: 20px; color: var(--ink); }
.dialog-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.dialog-head .close { margin-left: auto; }
.dialog-body { padding: 20px 28px; display: flex; flex-direction: column; gap: 18px; max-height: 70vh; overflow-y: auto; }
.dialog-foot { padding: 16px 28px; border-top: 1px solid var(--line); background: #1a1917; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.dialog-foot .note { margin-right: auto; font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field .req { color: var(--err); }
.field-error { font-weight: 500; color: var(--err); }
.field-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.error-summary { padding: 10px 14px; border-radius: 8px; background: var(--err-bg); border: 1px solid #6b2e1f; color: #f7bba8; font-size: 13px; font-weight: 500; }
.hint-planned { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--plan-bg); color: var(--plan-ink); font-size: 13px; font-weight: 500; }
.history-box { margin: 0; padding: 14px 16px 16px; border: 1px solid #34312c; border-radius: 10px; background: #181715; }
.history-box legend { padding: 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.impact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: #181715; border: 1px solid #34312c; }
.impact .value { margin-left: auto; font: 600 24px var(--mono); color: var(--plan-ink); }

.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.svc-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.svc-head .title { flex: 1 1 400px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.svc-head .title-row { display: flex; align-items: center; gap: 14px; }
.svc-head h1 { font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-head .desc { margin: 0; font-size: 15px; color: var(--text-3); max-width: 760px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-weight: 500; }
.tab { text-decoration: none; }
.tab[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.panel { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 16px; }
.panel.dim { opacity: .6; }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel h2 { margin: 0; flex: 1; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel-head .meta { font: 12px var(--mono); color: var(--faint); }
.details { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; }
.details dt { font-size: 12px; color: var(--muted); }
.details dd { margin: 6px 0 0; font-size: 15px; color: var(--ink); }
.details dd.big { font: 22px var(--mono); }
.notice { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 10px; background: var(--surface); border: 1px dashed #4a463f; color: var(--text-2); }
.notice > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.notice strong { font-size: 16px; }
.notice-ended { background: var(--ended-bg); border: 1px solid var(--ended-line); color: var(--ended-ink); }
.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.hist { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.hist.after { opacity: .45; }
.hist .dot-col { display: flex; justify-content: center; padding-top: 5px; }
.hist .hdot { width: 10px; height: 10px; border-radius: 50%; background: #5b9be0; }
.hist[data-type="Addition"] .hdot { background: #45b36b; }
.hist[data-type="Removal"] .hdot { background: #e57a35; }
.hist.scheduled .hdot { background: none; border: 2px dashed #9d80e2; }
.hist.planned .hdot { background: none; border: 2px dashed #d9a430; }
.hist .line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist .type { font-weight: 600; color: var(--ink); }
.hist .why { margin: 4px 0; font-size: 13px; color: var(--text-3); }
.hist.dropped .why { text-decoration: line-through; }
.hist .meta { display: flex; gap: 8px; flex-wrap: wrap; font: 12px var(--mono); color: var(--faint); }
.hist .meta span { padding: 2px 6px; border-radius: 4px; background: #23221f; }
.hist form { display: inline-flex; gap: 6px; align-items: center; }
.marker { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 0 12px; }
.marker::before { content: ""; width: 12px; height: 12px; transform: rotate(45deg); background: var(--accent); justify-self: center; }
.marker span { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #9be6db; }
.marker span::after { content: ""; flex: 1; height: 1px; background: var(--accent-line); }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.tag-scheduled { background: var(--future-bg); color: #cfbcf4; }
.tag-planned { background: var(--plan-bg); color: var(--plan-ink); }
.tag-due { background: #3b2215; color: #f6b288; }
.tag-stale { background: var(--ended-bg); color: var(--ended-ink); }
.tag-inforce, .tag-sp { background: var(--accent-bg); color: var(--accent); }
.dp-version { display: flex; flex-direction: column; gap: 8px; }
.dp-version .line1 { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.dp-version .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.dp-actions { display: flex; gap: 8px; }
.md { color: var(--text-2); line-height: 1.55; overflow-wrap: anywhere; }
.md h3, .md h4, .md h5, .md h6 { margin: 18px 0 8px; color: var(--ink); }
.md h3 { font-size: 18px; } .md h4 { font-size: 15px; } .md h5, .md h6 { font-size: 13px; }
.md a { color: var(--accent); }
.md table { display: block; overflow-x: auto; border-collapse: collapse; }
.md th, .md td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; }
.md code, .md pre, .md-raw { font-family: var(--mono); font-size: 13px; }
.md pre, .md-raw { margin: 0; padding: 12px 14px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; white-space: pre-wrap; }
.versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.version { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.version a { color: var(--ink); font-family: var(--mono); }
.version.shown a { font-weight: 600; text-decoration: none; }
.version .meta { font-size: 12px; color: var(--muted); }
.ticket { padding: 2px 6px; border-radius: 4px; background: #1d2a3d; color: #a3cbf4; text-decoration: none; font: 12px var(--mono); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 12px 18px; border-radius: 8px; background: #ece9e2; color: #141311; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .thead, .tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) var(--col-seats-n) var(--col-cost-n) var(--col-dp-n) 120px; }
  .thead > :nth-child(3), .tr > :nth-child(3), .thead > :nth-child(4), .tr > :nth-child(4) { display: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field[hidden] { display: none; }
.details .span-all { grid-column: 1 / -1; }
.details dd a { color: var(--ink); overflow-wrap: anywhere; }
.dp-group { margin: 0; padding: 14px 16px 16px; border: 1px solid #34312c; border-radius: 10px; background: #181715; display: flex; flex-direction: column; gap: 16px; }
.dp-group legend { padding: 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dp-row { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.dp-row > .field { flex: 1 1 200px; min-width: 0; }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tree > li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.tree ul { margin-left: 8px; padding-left: 20px; border-left: 1px solid var(--line); }
.tree li.retired > .dept-line .name { color: var(--muted); text-decoration: line-through; }
.tree > li > .btn { align-self: flex-start; }
.dept-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dept-line .name { font-weight: 600; color: var(--ink); }
.dept-line .spacer { flex: 1; }
.cost-tree { display: flex; flex-direction: column; }
.cost-tree summary, .cost-tree li, .cost-total { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.cost-tree summary { cursor: pointer; border-bottom: 1px solid var(--line-soft); font-weight: 600; color: var(--ink); }
.cost-sub summary { padding-left: 16px; font-weight: 500; color: var(--text-2); }
.cost-sub ul { list-style: none; margin: 0; padding: 0 0 0 32px; }
.cost-sub li a { color: var(--text); }
.cost-total { border-top: 1px solid var(--line-strong); font-weight: 600; color: var(--ink); }
.notice-warn { background: var(--plan-bg); border: 1px solid var(--plan-line); color: var(--plan-ink); }

.control.inline { flex-direction: row; align-items: center; text-transform: none; font-size: 14px; font-weight: 400; }
.users-table .thead, .users-table .tr { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr) 90px 150px; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.grid-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.grid-table td.actions { text-align: right; white-space: nowrap; }
.grid-table a { color: var(--ink); }
details.past summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
.ends { margin: 0; padding-left: 18px; color: var(--text-2); }

.cell-seats { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
.tag-seat-matched { background: var(--accent-bg); color: var(--accent); }
.tag-seat-unused { background: var(--plan-bg); color: var(--plan-ink); }
.tag-seat-over { background: var(--err-bg); color: var(--err); }
.tag-seat-ended { background: var(--ended-bg); color: var(--ended-ink); }
.tag-seat-headcount { background: var(--surface-2); color: var(--muted); }
.tag-seat-within { background: var(--accent-bg); color: var(--accent); }
.tag-seat-users { background: var(--surface-2); color: var(--muted); }
.tag-seat-overlimit { background: var(--plan-bg); color: var(--plan-ink); --c: var(--status-warning); display: inline-flex; align-items: center; gap: 4px; }
.seats-line { display: flex; align-items: center; gap: 12px; }
.seats-line .big { font: 18px var(--mono); color: var(--ink); }
.split-sub { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0 4px 16px; font-size: 13px; color: var(--text-2); }

/* Service logos, or a badge with the service's initials. */
.logo, .logo-badge { flex: none; border-radius: 5px; }
.logo { display: block; object-fit: contain; background: var(--logo-tile); padding: 1px; }
.logo-badge { display: inline-grid; place-items: center; color: var(--ink); font-weight: 600; letter-spacing: .02em; line-height: 1; user-select: none; }
.logo-16 { width: 16px; height: 16px; font-size: 8px; border-radius: 4px; }
.logo-20 { width: 20px; height: 20px; font-size: 9px; }
.logo-32 { width: 32px; height: 32px; font-size: 13px; border-radius: 7px; }
img.logo-32 { padding: 2px; }
.logo-c1 { background: var(--logo-1); } .logo-c2 { background: var(--logo-2); } .logo-c3 { background: var(--logo-3); } .logo-c4 { background: var(--logo-4); }
.logo-c5 { background: var(--logo-5); } .logo-c6 { background: var(--logo-6); } .logo-c7 { background: var(--logo-7); } .logo-c8 { background: var(--logo-8); }
.name-cell { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.name-cell > .logo, .name-cell > .logo-badge { grid-row: span 2; }
.with-logo { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* Charts (Reports). Marks wear the series colour through --c; text wears text tokens only. */
.s1 { --c: var(--series-1); } .s2 { --c: var(--series-2); } .s3 { --c: var(--series-3); } .s4 { --c: var(--series-4); }
.s5 { --c: var(--series-5); } .s6 { --c: var(--series-6); } .s7 { --c: var(--series-7); } .s8 { --c: var(--series-8); }
.s0 { --c: var(--series-other); } .warn { --c: var(--status-warning); }
.chart { position: relative; margin: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg text { fill: var(--muted); font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.chart-svg .end-label, .chart-svg .value, .chart-svg .bar-name, .chart-svg .direct-label { fill: var(--text-2); }
.chart-svg .bar-name, .chart-svg .direct-label { font-family: var(--sans); font-size: 12px; }
.chart-svg .note { fill: var(--text-3); font-family: var(--sans); }
.chart-svg .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart-svg .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .line.projected { stroke-dasharray: 6 4; }
.chart-svg .area { fill: var(--c); fill-opacity: .1; stroke: none; }
.chart-svg .dot { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.chart-svg .seg, .chart-svg .bar { fill: var(--c); }
.chart-svg .now, .chart-svg .crosshair { stroke: var(--text-3); stroke-width: 1; }
.chart-svg .crosshair { pointer-events: none; }
.chart-svg .hit { fill: transparent; outline: none; }
.chart-svg .hit:hover, .chart-svg .hit:focus-visible { fill: var(--line-soft); fill-opacity: .35; }
.chart-svg .hit:focus-visible { stroke: var(--accent); stroke-width: 1; }
.chart-tip { position: absolute; z-index: 5; min-width: 150px; padding: 8px 10px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line-strong); pointer-events: none; font-size: 12px; color: var(--text-2); }
.chart-tip .tip-title { color: var(--muted); margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .tip-row strong { font: 600 13px var(--mono); color: var(--ink); }
.chart-tip .key { width: 12px; height: 2px; background: var(--c, transparent); flex: none; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.table-view summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.report-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.report-table td.text { text-align: left; }
@media (forced-colors: active) { .chart-svg .line, .chart-svg .seg, .chart-svg .bar, .chart-svg .dot { forced-color-adjust: auto; } }
/* Reports page: one control row (range, currency, planned, presets) above every report. */
.report-controls { align-items: flex-end; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presets a[aria-current="page"], .basis a[aria-current="page"] { background: var(--line-soft); color: var(--ink); border-color: var(--line-strong); }
.headline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.headline .hero { font: 600 48px/1.1 var(--sans); color: var(--ink); letter-spacing: -0.02em; }
.basis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.table-scroll { max-width: 100%; overflow-x: auto; } /* a wide table scrolls inside its panel, never the page */
.empty-chart { margin: 0; padding: 40px 0; text-align: center; color: var(--muted); }
.sub-head { display: flex; align-items: center; gap: 12px; }
.sub-h { margin: 0; flex: 1; font-size: 14px; font-weight: 600; color: var(--text-2); }
.status-label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--text-2); }
.warn-icon { width: 14px; height: 14px; fill: var(--c); flex: none; }
@media (max-width: 700px) { .page { padding: 16px; } .headline .hero { font-size: 36px; } }
/* Slice 5: products, the Cost serves group and the Needs a product tag. */
.tag-needs-product { background: var(--plan-bg); color: var(--plan-ink); }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.radio-row label, .check-list label { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.check-list { display: flex; flex-direction: column; gap: 6px; }
.tree .shares { list-style: none; margin: 0 0 0 8px; padding-left: 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.tree .shares li { display: flex; justify-content: space-between; gap: 12px; }
.tree .shares li a { color: var(--text); }
.tree > li.unassigned > .dept-line .name { color: var(--plan-ink); }
/* Admin (slice 7 §8) */
.access-table .access-name { display: block; font-weight: 600; color: var(--ink); }
.access-table tr.disabled td { color: var(--muted); }
.tag-level-none { color: var(--faint); }
.tag-level-view { background: var(--accent-bg); color: var(--accent); }
.tag-level-edit { background: var(--plan-bg); color: var(--plan-ink); }
[data-access-levels] .radio-row { display: flex; align-items: center; gap: 16px; }
[data-access-levels] .area-label { width: 140px; font-weight: 600; color: var(--text-2); }
/* Footer: the running version (slice 9) */
.footer { padding: 16px 32px 24px; font-size: 12px; }
