/* Team dashboard. Colors are tokens; dark mode is its own selected steps. */
:root {
  color-scheme: light;
  --page: #f4f4f0;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --node: #fbfbf9;
  --ink: #0b0b0b;
  --ink-2: #4a4946;
  --muted: #6b6a65;
  --grid: #e8e7e1;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, .09);
  --border-strong: rgba(11, 11, 11, .16);
  --shadow: 0 1px 2px rgba(15, 15, 10, .04), 0 4px 16px rgba(15, 15, 10, .04);
  --accent: #2a6fc9;
  --t1: #2a78d6; --t2: #eb6834; --t3: #1baf7a; --t4: #eda100; --t5: #e87ba4; --t6: #008300; --t7: #6250d6; --t0: #bdbbb2;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-ink: #006300; --critical-ink: #b42323; --warning-ink: #855600;
  --future: rgba(11, 11, 11, .035);
  /* status: working / in progress / planned, and track statuses */
  --s-working: #138a36; --s-working-bg: #e3f4e7;
  --s-progress: #2a6fc9; --s-progress-bg: #e4eefb;
  --s-planned: #6b6a65; --s-planned-bg: #efeee9;
  --s-risk: #a86a00; --s-risk-bg: #fcf0d6;
  --s-blocked: #b42323; --s-blocked-bg: #fbe4e2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #242422; --node: #202020; --ink: #f0efec; --ink-2: #c9c8be; --muted: #9a998f;
    --grid: #2c2c2a; --axis: #3c3c38; --border: rgba(255, 255, 255, .09); --border-strong: rgba(255, 255, 255, .18); --shadow: none; --accent: #5b9cf0;
    --t1: #3987e5; --t2: #d95926; --t3: #199e70; --t4: #c98500; --t5: #d55181; --t6: #2a9a2a; --t7: #9085e9; --t0: #55544f;
    --good-ink: #3ccb52; --critical-ink: #ff7b72; --warning-ink: #f5b73b; --future: rgba(255, 255, 255, .03);
    --s-working: #3ccb52; --s-working-bg: rgba(60, 203, 82, .14);
    --s-progress: #6aa8f5; --s-progress-bg: rgba(91, 156, 240, .16);
    --s-planned: #a5a49a; --s-planned-bg: rgba(255, 255, 255, .07);
    --s-risk: #f5b73b; --s-risk-bg: rgba(245, 183, 59, .14);
    --s-blocked: #ff7b72; --s-blocked-bg: rgba(255, 123, 114, .14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #242422; --node: #202020; --ink: #f0efec; --ink-2: #c9c8be; --muted: #9a998f;
  --grid: #2c2c2a; --axis: #3c3c38; --border: rgba(255, 255, 255, .09); --border-strong: rgba(255, 255, 255, .18); --shadow: none; --accent: #5b9cf0;
  --t1: #3987e5; --t2: #d95926; --t3: #199e70; --t4: #c98500; --t5: #d55181; --t6: #2a9a2a; --t7: #9085e9; --t0: #55544f;
  --good-ink: #3ccb52; --critical-ink: #ff7b72; --warning-ink: #f5b73b; --future: rgba(255, 255, 255, .03);
  --s-working: #3ccb52; --s-working-bg: rgba(60, 203, 82, .14);
  --s-progress: #6aa8f5; --s-progress-bg: rgba(91, 156, 240, .16);
  --s-planned: #a5a49a; --s-planned-bg: rgba(255, 255, 255, .07);
  --s-risk: #f5b73b; --s-risk-bg: rgba(245, 183, 59, .14);
  --s-blocked: #ff7b72; --s-blocked-bg: rgba(255, 123, 114, .14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 30; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 10px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.bar-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.bar-top .wrap { display: flex; align-items: center; gap: 14px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 5px; background: var(--ink); flex: none; }
.brand-mark i { border-radius: 2px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 4px 2px; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .track-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 580; color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.nav a:hover, .track-nav a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"], .track-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow); }
.swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.swatch.lg { width: 12px; height: 12px; }
.theme { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.theme:hover { color: var(--ink); }

main { padding: 24px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card h2, .section-head h2 { margin: 0 0 4px; font-size: 17px; font-weight: 680; letter-spacing: -.01em; }
.card .sub, .section-head .sub { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head .sub { margin: 0; }
.section-head { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; margin: 4px 2px 12px; }
.section-head .sub { margin: 0; }
section + section, #diagrams > section + section { margin-top: 16px; }
#diagrams { margin-top: 16px; }
.fine { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* ---------- overview hero ---------- */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: center; padding: 28px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background: radial-gradient(620px 240px at 100% 0%, color-mix(in srgb, var(--t1) 15%, transparent), transparent 70%),
              radial-gradient(520px 240px at 0% 120%, color-mix(in srgb, var(--t2) 11%, transparent), transparent 70%); }
.hero > * { position: relative; }
.hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; letter-spacing: -.025em; font-weight: 760; }
.summary { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; max-width: 60ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 11px; font-weight: 640; font-size: 14px; background: var(--ink); color: var(--surface); border: 1px solid var(--ink); }
.btn::after { content: "→"; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.hero-clock { justify-self: end; text-align: left; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--border); border-radius: 16px; padding: 18px; min-width: 0; }
.count { display: flex; gap: 8px; }
.count div { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 8px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.count b { font-size: 32px; line-height: 1.05; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.count span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.count.late b { color: var(--critical-ink); }
.deadline { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); font-weight: 560; }
.nextup { margin-top: 12px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; background: var(--s-progress-bg); color: var(--s-progress); margin-right: 2px; vertical-align: 1px; }
.tag.now { background: var(--s-working-bg); color: var(--s-working); }

/* ---------- today + decisions ---------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.today { list-style: none; margin: 0; padding: 0; position: relative; }
.slot { display: grid; grid-template-columns: 116px 18px 1fr; gap: 0 10px; padding: 0 0 14px; position: relative; }
.slot:last-child { padding-bottom: 0; }
.slot::before { content: ""; position: absolute; left: 134px; top: 14px; bottom: -4px; width: 2px; background: var(--grid); }
.slot:last-child::before { display: none; }
.slot-time { font-size: 13.5px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; padding-top: 1px; text-align: right; }
.slot-dot { width: 12px; height: 12px; border-radius: 50%; margin: 5px auto 0; background: var(--surface); box-shadow: inset 0 0 0 2px var(--axis); position: relative; z-index: 1; }
.slot-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; line-height: 1.35; }
.slot-what b { font-weight: 650; }
.slot-detail { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.slot.past .slot-time, .slot.past .slot-what b, .slot.past .slot-detail { color: var(--muted); }
.slot.past .slot-dot { background: var(--axis); }
.slot.next .slot-dot { box-shadow: inset 0 0 0 3px var(--s-progress); }
.slot.now .slot-dot { background: var(--s-working); box-shadow: 0 0 0 4px var(--s-working-bg); }
.state { font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 99px; border: 1px dashed var(--border-strong); color: var(--muted); }
.state.st-agreed { border-style: solid; border-color: transparent; background: var(--s-working-bg); color: var(--s-working); }
.state.st-done { border-style: solid; border-color: transparent; background: var(--surface-2); color: var(--ink-2); }
.decisions { margin: 0; padding: 0 0 0 22px; display: grid; gap: 12px; }
.decisions li { padding-left: 4px; }
.decisions li::marker { font-weight: 700; color: var(--s-risk); }
.decisions b { display: block; font-weight: 640; line-height: 1.35; }
.decisions .why { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

/* ---------- track cards ---------- */
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.tcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
a.tcard:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.tcard-head { display: flex; align-items: center; gap: 10px; }
.tcard-head h3 { margin: 0; font-size: 16px; font-weight: 680; line-height: 1.25; }
.tcard .plain { margin: 0; color: var(--ink-2); font-size: 14px; }
.tcard-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--ink-2); }
.tcard-row .owner b { color: var(--ink); font-weight: 620; }
.owner.tbd { color: var(--warning-ink); font-weight: 650; }
.tcard .next { margin: 0; font-size: 13.5px; color: var(--ink); border-top: 1px solid var(--grid); padding-top: 10px; }
.tcard .next b { font-weight: 650; }
.tcard .risk { margin: 0; font-size: 13px; color: var(--warning-ink); }
.tcard .risk b { font-weight: 680; }
.tcard .blocked { margin: 0; font-size: 13px; color: var(--critical-ink); }
.tcard .blocked b { font-weight: 680; }
.tcard-foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: auto; flex-wrap: wrap; }
.tcard-foot .upd { margin-left: auto; }
.mini { width: 56px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: inline-block; }
.mini i { display: block; height: 100%; background: var(--c); border-radius: 99px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 680; padding: 2px 10px 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--s-planned-bg); color: var(--s-planned); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.b-in-progress { background: var(--s-progress-bg); color: var(--s-progress); }
.badge.b-done { background: var(--s-working-bg); color: var(--s-working); }
.badge.b-at-risk { background: var(--s-risk-bg); color: var(--s-risk); }
.badge.b-at-risk::before { border-radius: 1px; transform: rotate(45deg); width: 7px; height: 7px; }
.badge.b-blocked { background: var(--s-blocked-bg); color: var(--s-blocked); }
.badge.b-blocked::before { border-radius: 1px; }
.badge.b-not-started::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- latest updates (overview) ---------- */
.latest { list-style: none; margin: 0; padding: 0; }
.latest li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--grid); align-items: baseline; }
.latest li:first-child { border-top: 0; padding-top: 0; }
.latest time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.latest-meta { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-size: 12.5px; }
.latest-what { font-size: 14.5px; }
.more-link { font-size: 13.5px; font-weight: 650; color: var(--accent); }
.more-link::after { content: " →"; }
.dot-s { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot-s.done { background: var(--good); }
.dot-s.blocked { background: var(--critical); }
.dot-s.in-progress { background: var(--accent); }
.dot-s.decision { background: var(--t7); border-radius: 1px; transform: rotate(45deg); }

/* ---------- pills (feed statuses) ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 2px 9px 2px 7px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.done::before { background: var(--good); }
.pill.blocked::before { background: var(--critical); }
.pill.at-risk::before { background: var(--warning); }
.pill.in-progress::before { background: var(--accent); }
.pill.not-started::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.pill.decision::before { background: var(--t7); border-radius: 2px; transform: rotate(45deg); }
.pill.blocked { color: var(--critical-ink); }
.pill.done { color: var(--good-ink); }

/* ---------- page heads ---------- */
.page-head { padding: 26px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; letter-spacing: -.02em; font-weight: 740; }
.page-head .sub { margin-bottom: 14px; max-width: 70ch; }
.page-head .chips { margin-bottom: 0; }

/* ---------- charts ---------- */
.charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-size: 11.5px; fill: var(--muted); font-family: inherit; }
.chart .lbl { fill: var(--ink-2); font-size: 12px; }
.chart .lbl-strong { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .now-line { stroke: var(--ink); stroke-width: 1.5; }
.chart .now-text { fill: var(--ink); font-weight: 650; }
.chart .future { fill: var(--future); }
.chart [data-tip] { cursor: default; }
.ring text { font-weight: 700; fill: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.contrib-row { display: grid; grid-template-columns: 26px minmax(70px, 120px) 1fr; gap: 10px; align-items: center; padding: 6px 0; }
.contrib-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-chart { color: var(--muted); font-size: 13px; padding: 16px 0; }

#tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 9px; max-width: 260px; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s; white-space: pre-line; }
#tip.on { opacity: 1; transform: none; }

/* ---------- full feed ---------- */
.feed-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip-btn { font: inherit; font-size: 12.5px; font-weight: 560; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip-btn.all { padding-left: 10px; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.feed, .commits { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--grid); }
.entry:first-child { border-top: 0; }
.entry > div { overflow-wrap: anywhere; }
.avatar { width: 34px; height: 34px; border-radius: 50%; position: relative; overflow: hidden; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.meta .who { color: var(--ink); font-weight: 650; font-size: 13.5px; }
.tchip { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 580; }
.what { margin: 3px 0 2px; font-weight: 600; line-height: 1.35; }
.whytext { margin: 0; color: var(--ink-2); font-size: 14px; }
.details { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.where { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.code { font: 11.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.code:hover { color: var(--accent); text-decoration: none; }
.commit { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--grid); font-size: 13.5px; }
.commit:first-child { border-top: 0; }
.commit .msg { min-width: 0; }
.commit .line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit .sm { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.commit .when { white-space: nowrap; }
.more { font: inherit; font-size: 13.5px; font-weight: 650; color: var(--accent); background: none; border: 0; padding: 10px 0 0; cursor: pointer; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; list-style: none; }

/* ---------- track page ---------- */
.track-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: -6px 0 14px; padding: 4px 2px; }
.track-nav::-webkit-scrollbar { display: none; }
.t-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 26px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 13%, var(--surface)), var(--surface) 65%); }
.t-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.t-hero h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; line-height: 1.15; }
.t-hero .goal { margin: 0 0 12px; color: var(--ink-2); max-width: 70ch; }
.t-hero .goal.lead { color: var(--ink); font-size: 16.5px; margin-bottom: 6px; }
.t-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--ink-2); align-items: center; }
.t-facts b { color: var(--ink); }
.t-next { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); font-size: 14px; max-width: 80ch; }
.t-risk { margin: 10px 0 0; color: var(--warning-ink); font-weight: 600; font-size: 14px; max-width: 80ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 560; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .note { font-size: 12.5px; color: var(--ink-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms { list-style: none; margin: 0; padding: 0; position: relative; }
.ms li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.ms li:first-child { border-top: 0; }
.ms .dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--c); justify-self: center; }
.ms .done .dot { background: var(--c); }
.ms .done .title { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--axis); }
.ms .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ms .late .when { color: var(--critical-ink); font-weight: 600; }

/* ---------- How it works ---------- */
.d-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.lg-item { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.dstat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 680; padding: 2px 10px 2px 8px; border-radius: 99px; width: max-content; }
.dstat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.dstat.d-working { background: var(--s-working-bg); color: var(--s-working); }
.dstat.d-working::before { background: currentColor; }
.dstat.d-in-progress { background: var(--s-progress-bg); color: var(--s-progress); }
.dstat.d-in-progress::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px currentColor; }
.dstat.d-planned { background: var(--s-planned-bg); color: var(--s-planned); }
.dstat.d-planned::before { border: 1.5px dashed currentColor; width: 7px; height: 7px; }
.d-toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 13.5px; font-weight: 620; }
.d-toc a { color: var(--accent); }
.diagram h2 { font-size: 19px; }
.dg { margin: 6px 0 0; }
.dg-canvas { width: 100%; }
.dg-canvas svg { display: block; width: 100%; height: auto; overflow: visible; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.dg-box { fill: var(--node); stroke: var(--border-strong); stroke-width: 1; }
.dg-node.zone .dg-box { fill: var(--surface-2); }
.dg-node.s-planned .dg-box { stroke-dasharray: 6 4; stroke: var(--axis); }
.dg-accent { fill: var(--s-planned); }
.dg-node.s-working .dg-accent { fill: var(--s-working); }
.dg-node.s-in-progress .dg-accent { fill: var(--s-progress); }
.dg-node.s-planned .dg-accent { fill: transparent; }
.dg-iconbox { fill: var(--surface); stroke: var(--border); }
.dg-node.zone .dg-iconbox { fill: var(--surface); }
.dg-icon path { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dg-title { fill: var(--ink); font-size: 14.5px; font-weight: 650; }
.dg-text { fill: var(--ink-2); font-size: 13px; }
.dg-item { fill: var(--ink); font-size: 13px; font-weight: 620; }
.dg-itemtext { fill: var(--ink-2); font-size: 12.5px; }
.dg-owner { fill: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.dg-sep { stroke: var(--grid); stroke-width: 1; }
.spill rect { fill: var(--s-planned-bg); }
.spill text { font-size: 11.5px; font-weight: 650; fill: var(--s-planned); }
.spill.s-working rect { fill: var(--s-working-bg); }
.spill.s-working text { fill: var(--s-working); }
.spill.s-in-progress rect { fill: var(--s-progress-bg); }
.spill.s-in-progress text { fill: var(--s-progress); }
.sm-working { fill: var(--s-working); }
.sm-ring { fill: none; stroke: var(--s-progress); stroke-width: 1.5; }
.sm-half { fill: var(--s-progress); }
.sm-planned { fill: none; stroke: var(--s-planned); stroke-width: 1.5; stroke-dasharray: 2 1.6; }
.dg-edge { stroke: var(--ink-2); stroke-width: 1.8; }
.dg-edge.e-in-progress { stroke-dasharray: 9 4; }
.dg-edge.e-planned { stroke: var(--muted); stroke-dasharray: 3 4; }
.dg-head { fill: var(--ink-2); }
.dg-head.e-planned { fill: var(--muted); }
.dg-elabel { fill: var(--ink-2); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.dg-notes { margin: 14px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; display: grid; gap: 4px; }
.conns { margin-top: 16px; border-top: 1px solid var(--grid); padding-top: 14px; }
.conns h3 { margin: 0 0 8px; font-size: 14px; font-weight: 660; }
.conns ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conns li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.conns b { color: var(--ink); font-weight: 620; }
.c-line { height: 0; border-top: 2px solid var(--ink-2); }
.c-in-progress .c-line { border-top-style: dashed; }
.c-planned .c-line { border-top: 2px dotted var(--muted); }
.textver { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.textver summary { cursor: pointer; font-weight: 650; color: var(--accent); width: max-content; }
.textver ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.textver ul ul { margin-top: 4px; }
.textver b { color: var(--ink); }
.textver .sub { margin: 10px 0 0; }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.team li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.team b { display: block; font-size: 14px; }
.team span { font-size: 12.5px; color: var(--ink-2); }
.glossary { margin: 0; display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 0 18px; }
.glossary dt { font-weight: 660; padding: 10px 0; border-top: 1px solid var(--grid); }
.glossary dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--grid); color: var(--ink-2); }
.glossary dt:first-of-type, .glossary dt:first-of-type + dd { border-top: 0; }

footer { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 13px; color: var(--muted); }
footer a { color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  a.tcard:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero, .split, .charts, .feed-wrap, .two { grid-template-columns: 1fr; }
  .hero-clock { justify-self: stretch; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .d-legend { grid-template-columns: 1fr; }
  .glossary { grid-template-columns: 1fr; }
  .glossary dd { border-top: 0; padding-top: 0; }
}
@media (max-width: 560px) {
  .bar-top .wrap { gap: 8px; }
  .brand > span:last-child { display: none; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .nav { gap: 2px; }
  main { padding-top: 16px; }
  .card { padding: 16px; border-radius: 16px; }
  .hero { padding: 20px; gap: 18px; }
  .page-head { padding: 20px; }
  .count { gap: 6px; }
  .count div { min-width: 0; flex: 1; }
  .count b { font-size: 26px; }
  .slot { grid-template-columns: 70px 16px 1fr; gap: 0 8px; }
  .slot::before { left: 85px; }
  .slot-time { font-size: 12.5px; }
  .tracks { grid-template-columns: 1fr; }
  .latest li { grid-template-columns: 1fr; gap: 2px; }
  .t-hero { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .stats { gap: 10px; }
  .stat .value { font-size: 22px; }
}
