/*
 * Joe Writes roadmap. Tokens, type roles and components are copied by value from Joe's design package
 * (@joewrites/design: tokens.css, badge, button, card, callout, and the UX consistency spec): warm paper, ink type,
 * hairline rules, one sage that means "done". Light only, as the app is for launch. Newsreader for headlines and
 * figures, Geist for text, Geist Mono for code (all SIL OFL, fonts/).
 */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* tokens.css :root (light values, with the spec's AA fixes) */
  --background: hsl(40 20% 99%);
  --card: hsl(0 0% 100%);
  --sidebar: hsl(40 14% 96.5%);
  --paper-2: hsl(40 12% 95%);
  --foreground: hsl(30 8% 11%);
  --muted-foreground: hsl(30 5% 40%);
  --faint: hsl(30 5% 42%);
  --border: hsl(30 8% 11% / 0.09);
  --border-strong: hsl(30 8% 11% / 0.16);
  --field-border: hsl(30 8% 11% / 0.48);
  --ring: hsl(152 32% 34%);
  --brand: hsl(152 26% 34%);
  --brand-ink: hsl(152 32% 24%);
  --brand-tint: hsl(150 30% 94%);
  --warning: hsl(32 85% 33%);
  --warning-tint: hsl(40 90% 94%);
  --destructive: hsl(4 68% 44%);
  --destructive-tint: hsl(4 80% 96%);
  --overlay: hsl(30 8% 11% / 0.3);
  --hover: hsl(30 8% 11% / 0.04);
  --selection: hsl(140 42% 80% / 0.6);
  --shadow-xs: 0 1px 2px hsl(30 10% 10% / 0.05);
  --shadow-card: 0 1px 2px hsl(30 10% 10% / 0.04), 0 1px 3px hsl(30 10% 10% / 0.04);
  --shadow-pop: 0 0 0 1px hsl(30 10% 10% / 0.06), 0 4px 8px -2px hsl(30 10% 10% / 0.06), 0 16px 32px -8px hsl(30 10% 10% / 0.1);
  --radius-sm: 0.375rem;
  --radius-control: 0.5rem;
  --radius-card: 0.75rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --duration-fast: 150ms;
  --font-serif: "Newsreader", ui-serif, Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  /* The spec's spacing steps: list gap 8px, card padding 16px, section gap 32px+; gutter 20 -> 40px. */
  --related: 0.5rem;
  --group: 1rem;
  --section: 3rem;
  --gutter: 1.25rem;

  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5rem;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 5rem;
}
@media (width >= 64rem) { :root { --gutter: 2.5rem; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: text-decoration-color var(--duration-fast) ease, color var(--duration-fast) ease; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: var(--selection); color: inherit; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted-foreground); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 9; border-radius: var(--radius-control); box-shadow: var(--shadow-pop); }

/* Type roles (tokens.css): text-display / text-headline in Newsreader, text-title / body / small / caption in Geist. */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-family: var(--font-serif); font-size: 1.625rem; line-height: 2rem; font-weight: 400; letter-spacing: -0.015em; font-variant-numeric: lining-nums; }
h2 { font-size: 0.9375rem; line-height: 1.375rem; font-weight: 560; letter-spacing: -0.008em; }
h3 { font-size: 0.9375rem; line-height: 1.375rem; font-weight: 560; letter-spacing: -0.008em; }
.label { font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; }
.meta { font-size: 0.75rem; line-height: 1rem; }
.num { font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat { font-family: var(--font-serif); font-size: 1.875rem; line-height: 2.25rem; font-weight: 400; font-variant-numeric: lining-nums; letter-spacing: -0.015em; }
code { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.25rem; }
@media (width >= 64rem) {
  h1 { font-size: 1.875rem; line-height: 2.25rem; }
}

/* Top bar: the "Joe" wordmark as on joewrites.com, then the page name; hairline under it. */
.top { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(8px); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--foreground); min-height: 2.75rem; }
.brand .mark { width: 1.25rem; height: 1.25rem; flex: none; }
.wordmark { font-family: var(--font-serif); font-size: 1.1875rem; line-height: 1; font-weight: 400; letter-spacing: -0.01em; }
.crumb { font-size: 0.8125rem; line-height: 1.25rem; display: inline-flex; gap: 0.5rem; color: var(--foreground); font-weight: 500; }
.crumb .muted { color: var(--border-strong); }
nav { display: flex; gap: 0.25rem; }
nav a { text-decoration: none; color: var(--muted-foreground); display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.625rem; font-size: 0.8125rem; line-height: 1.25rem; border-radius: var(--radius-sm); transition: color var(--duration-fast) ease; }
nav a:hover { color: var(--foreground); }

main.wrap { padding-top: var(--section); padding-bottom: var(--related); }
main > section { margin-bottom: var(--section); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: var(--related) var(--group); flex-wrap: wrap; margin-bottom: var(--group); }
/* Card (card.tsx): the one card style. */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }

/* Badge (badge.tsx): h-5, rounded-full, 11px / 500, a tone per status. */
.pill {
  display: inline-flex; align-items: center; gap: 0.25rem; height: 1.25rem; padding: 0 0.5rem; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--pl, var(--border)); font-size: 0.6875rem; line-height: 1rem; font-weight: 500;
  color: var(--pf, var(--muted-foreground)); background: var(--pb, var(--paper-2));
}

/* Roadmap stages: in progress is ink (the one primary), next and later neutral, shipped sage (success). --c colours the
   dots, bars and graph boxes. */
.st-now { --c: var(--foreground); --pb: var(--foreground); --pf: var(--card); --pl: var(--foreground); }
.st-next { --c: var(--muted-foreground); --pb: var(--paper-2); --pf: var(--foreground); --pl: var(--border-strong); }
.st-later { --c: var(--faint); --pb: var(--card); --pf: var(--muted-foreground); --pl: var(--border-strong); }
.st-shipped { --c: var(--brand); --pb: var(--brand-tint); --pf: var(--brand-ink); --pl: hsl(152 26% 34% / 0.2); }

/* Hero: the page title as on joewrites.com (text-display), one line of context, three figures. */
.hero { padding-bottom: var(--related); }
.eyebrow { font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; color: var(--muted-foreground); margin-bottom: 0.75rem; }
.hero h1 { font-size: 2.125rem; line-height: 2.5rem; font-weight: 350; letter-spacing: -0.02em; max-width: 46rem; }
.lede { font-size: 1.0625rem; line-height: 1.625rem; margin-top: 1rem; max-width: 40rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--group); margin: 2.5rem 0 0; padding-top: var(--group); border-top: 1px solid var(--border); }
.stats dt { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.stats dd { margin: 0.25rem 0 0; }
@media (width >= 64rem) {
  .hero h1 { font-size: 2.625rem; line-height: 3rem; }
}

/* Theme progress: each theme is a filter button with a ring of shipped (sage) and in progress (ink) of the total. */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.theme {
  display: flex; align-items: center; gap: 0.875rem; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 0.875rem var(--group) 0.875rem 0.875rem; transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.theme:hover { background: var(--paper-2); }
.theme[aria-pressed="true"] { border-color: var(--foreground); box-shadow: inset 0 0 0 1px var(--foreground); }
.ring { width: 2.75rem; height: 2.75rem; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--paper-2); }
.ring .done { stroke: var(--brand); stroke-linecap: round; }
.ring .wip { stroke: var(--foreground); stroke-linecap: round; }
.theme .name { display: block; font-size: 0.9375rem; line-height: 1.375rem; font-weight: 560; letter-spacing: -0.008em; }
.theme .meta { display: block; color: var(--muted-foreground); margin-top: 2px; }

/* Toolbar: search (the .field look) plus FilterChips (shown by app.js; the static page has no use for them). */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; }
.search { position: relative; flex: 1 1 16rem; max-width: 22rem; display: flex; }
.search svg { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; width: 16px; height: 16px; fill: none; stroke: var(--muted-foreground); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; height: 2.5rem; padding: 0 0.75rem 0 2.25rem; font: inherit; font-size: 0.875rem; color: var(--foreground);
  background: var(--card); border: 1px solid var(--field-border); border-radius: var(--radius-control); box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.search input::placeholder { color: var(--faint); }
.search input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chip {
  font: inherit; font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; color: var(--muted-foreground); cursor: pointer;
  min-height: 2rem; padding: 0 0.75rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.chip:hover { color: var(--foreground); background: var(--paper-2); }
.chip[aria-pressed="true"] { color: var(--card); border-color: var(--foreground); background: var(--foreground); }
.chip.clear { background: transparent; border-color: transparent; color: var(--muted-foreground); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.chip.clear:hover { color: var(--foreground); text-decoration-color: currentColor; }

/* Board: one column per shown stage (app.js sets --cols); cards with theme, title, summary and meta. */
.board { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--group); align-items: start; }
.col h3 { display: flex; align-items: center; gap: var(--related); margin-bottom: 0.75rem; }
.col h3 .count { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); font-weight: 400; font-variant-numeric: tabular-nums; }
.col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--related); }
.item { display: block; padding: var(--group); text-decoration: none; color: inherit; transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease; }
.item:hover { border-color: var(--border-strong); background: var(--paper-2); }
.item:focus-visible { border-radius: var(--radius-card); }
.item .when { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.75rem; font-size: 0.75rem; line-height: 1rem; font-weight: 500; color: var(--brand-ink); }
.item .when::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.item .target, .item .activity, .item .waiting { display: block; margin-top: 0.5rem; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.item .waiting { color: var(--warning); }
.item .progress { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.item .progress svg { flex: 1; height: 4px; }
.item .progress .track { fill: var(--paper-2); }
.item .progress .fill { fill: var(--brand); }
.item .progress + .activity { margin-top: 0.25rem; }
.item .tag { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.item .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.item h4 { margin: 0.5rem 0 0.25rem; font-size: 0.9375rem; line-height: 1.375rem; font-weight: 560; letter-spacing: -0.008em; text-wrap: pretty; }
.item p { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.25rem; text-wrap: pretty; }
/* What an empty list says (globals.css .empty). */
.empty { padding: 2rem 1.5rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-card); color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.25rem; text-align: center; }

/* Incidents: one card per past incident, newest first. Impact as a Badge: degraded warning, partial danger-outline,
   major danger. */
.imp-degraded { --pb: var(--warning-tint); --pf: var(--warning); --pl: hsl(32 85% 33% / 0.2); }
.imp-partial { --pb: var(--card); --pf: var(--destructive); --pl: hsl(4 68% 44% / 0.4); }
.imp-major { --pb: var(--destructive-tint); --pf: var(--destructive); --pl: hsl(4 68% 44% / 0.2); }
.incidents { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--related); max-width: 52rem; }
.incident { padding: var(--group) 1.25rem; scroll-margin-top: 5rem; }
.incident:focus-visible, .incident:target { outline: 2px solid var(--ring); outline-offset: 2px; }
.incident .ihead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); }
.incident time { font-weight: 500; color: var(--foreground); }
.incident h3 { margin: 0.625rem 0 0.25rem; }
.incident > p { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.25rem; max-width: 44rem; }
.incident .ifoot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem var(--group); margin-top: 0.875rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.incident .comps { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.incident .comps .tag { display: inline-flex; align-items: center; height: 1.25rem; font-size: 0.6875rem; line-height: 1rem; font-weight: 500; padding: 0 0.5rem; border-radius: 999px; border: 1px solid var(--border); background: var(--paper-2); color: var(--muted-foreground); }
.incident .self { margin-left: auto; }

/* Timeline: a scrolling list card grouped by month (sticky month heads); the month chips zoom to one month. */
.timeline { max-height: 36rem; overflow: auto; padding: 0 1.25rem; overscroll-behavior: contain; }
.timeline .month { position: sticky; top: 0; z-index: 1; background: var(--card); padding: 1.25rem 0 0.5rem; font-size: 0.75rem; line-height: 1rem; font-weight: 500; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.timeline ol { list-style: none; margin: 0; padding: 0; }
.timeline ol > li { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--group); padding: var(--group) 0; border-top: 1px solid var(--border); }
.timeline ol > li:first-child { border-top: 0; }
.timeline time { font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.25rem; font-variant-numeric: lining-nums; }
.timeline .ver { display: block; font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1rem; color: var(--muted-foreground); margin-top: 2px; }
.timeline .label { display: block; font-size: 0.9375rem; line-height: 1.375rem; font-weight: 560; }
.timeline a.label { text-decoration: none; }
.timeline a.label:hover { text-decoration: underline; }
.timeline .label + p { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.25rem; max-width: 40rem; text-wrap: pretty; }
.timeline .pill { white-space: normal; height: auto; min-height: 1.25rem; padding: 0.125rem 0.5rem; text-decoration: none; }
.timeline .pill:hover { text-decoration: underline; }
.timeline ul { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem; }

/* Detail dialog: a card with the pop shadow over the overlay scrim. */
dialog {
  width: min(36rem, calc(100vw - 2rem)); max-height: calc(100dvh - 4rem); overflow: auto; padding: var(--group) 1.25rem 1.25rem;
  color: var(--foreground); background: var(--card); border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow-pop);
}
dialog::backdrop { background: var(--overlay); }
.dhead { display: flex; align-items: center; gap: var(--related); margin-bottom: 0.75rem; }
.close { margin-left: auto; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted-foreground); cursor: pointer; transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease; }
.close:hover { background: var(--hover); color: var(--foreground); }
.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
dialog h2 { margin-bottom: 0.5rem; }
#detail-summary { font-size: 0.9375rem; line-height: 1.5rem; color: var(--muted-foreground); }
#detail-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem var(--group); margin: var(--group) 0 0; padding-top: var(--group); border-top: 1px solid var(--border); font-size: 0.8125rem; line-height: 1.25rem; }
#detail-facts:empty { display: none; }
#detail-facts dt { color: var(--muted-foreground); }
#detail-facts dd { margin: 0; }
.dlinks { list-style: none; margin: var(--group) 0 0; padding: 0; display: grid; gap: 0.375rem; font-size: 0.8125rem; line-height: 1.25rem; }
.dlinks a { color: var(--brand-ink); }

/* View tabs: ghost nav items (the sidebar's NAV_LINK); the selected one sits on paper-2. */
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-control); background: var(--paper-2); border: 1px solid var(--border); }
.tabs button {
  font: inherit; font-weight: 500; font-size: 0.8125rem; line-height: 1.25rem; color: var(--muted-foreground); cursor: pointer; min-height: 2rem;
  padding: 0 0.75rem; border: 0; border-radius: var(--radius-sm); background: transparent; transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}
.tabs button:hover { color: var(--foreground); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-xs), 0 0 0 1px var(--border); }
.toolbar #result-note { margin-left: auto; }

/* Calendar: a label column and a track per item; bars placed by app.js in % of the window; today is one line. */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem var(--group); margin-bottom: 0.75rem; }
.calendar { overflow-x: auto; padding: 0.5rem var(--group) var(--group); }
.cal { --label: 15rem; position: relative; min-width: 46rem; }
.cal-row { display: grid; grid-template-columns: var(--label) 1fr; align-items: center; min-height: 2.25rem; font-size: 0.8125rem; line-height: 1.25rem; }
.cal-label { padding-right: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--foreground); }
a.cal-label:hover { text-decoration: underline; }
.cal-track {
  position: relative; height: 2.25rem;
  background: repeating-linear-gradient(to right, var(--border) 0 1px, transparent 1px calc(100% / var(--cols)));
}
.cal-axis { position: sticky; top: 0; z-index: 1; background: var(--card); border-bottom: 1px solid var(--border); }
.cal-axis .cal-track { background: none; }
.cal-tick { position: absolute; top: 50%; translate: 0.5rem -50%; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground); white-space: nowrap; }
.cal-group { padding: 0.875rem 0 0.25rem; font-size: 0.75rem; line-height: 1rem; font-weight: 500; color: var(--muted-foreground); }
.bar {
  position: absolute; top: 0.5rem; height: 1.25rem; border-radius: 999px; overflow: hidden; display: block;
  background: color-mix(in srgb, var(--c) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.bar:hover { border-color: var(--c); }
.bar.st-shipped { background: var(--c); border-color: var(--c); }
.bar.st-later { border-style: dashed; background: transparent; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--c); opacity: 0.85; }
.cal-now {
  position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: var(--destructive); pointer-events: none;
  left: calc(var(--label) + (100% - var(--label)) * var(--today-f));
}
.cal-unscheduled { margin-top: var(--group); padding-top: var(--group); border-top: 1px solid var(--border); }
.cal-unscheduled .chips { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.cal-unscheduled .pill { text-decoration: none; height: auto; min-height: 1.5rem; padding: 0.125rem 0.5rem; white-space: normal; }
.cal-empty { padding: var(--group) 0; color: var(--muted-foreground); font-size: 0.8125rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.75rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.sw { width: 14px; height: 8px; border-radius: 999px; display: inline-block; background: var(--c); }
.sw.dashed { background: transparent; border: 1px dashed var(--c); }
.sw.today { width: 2px; height: 12px; border-radius: 1px; background: var(--destructive); }
.sw.ext { background: transparent; border: 1px dashed var(--muted-foreground); }
.sw.crit { height: 3px; background: var(--foreground); }

/* Graph: built in build.py as inline SVG at 1:1 (works without JavaScript); app.js adds filters and tracing. The pane
   scrolls; the zoom is fixed. Our lane is a paper band; other teams' lanes are dashed. */
.graph-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--group); align-items: start; }
.graph { position: relative; }
.graph .gpane { padding: 0.75rem; overflow: auto; max-height: 78vh; overscroll-behavior: contain; }
.graph-svg { display: block; max-width: none; margin: 0 auto; font-family: var(--font-sans); }
.glane { fill: var(--sidebar); }
.glane:not(.lane-api) { fill: none; stroke: var(--border-strong); stroke-dasharray: 6 5; }
.glane-label { fill: var(--muted-foreground); font-size: 12px; font-weight: 500; }
.edge { fill: none; stroke: var(--muted-foreground); stroke-opacity: 0.5; stroke-width: 1.5; transition: stroke-opacity var(--duration-fast) ease; }
.edge.crit { stroke: var(--foreground); stroke-opacity: 0.9; stroke-width: 2.5; }
.arrow path { fill: var(--muted-foreground); fill-opacity: 0.7; }
.arrow.crit path { fill: var(--foreground); fill-opacity: 1; }
.gnode { cursor: pointer; text-decoration: none; transition: opacity var(--duration-fast) ease; }
.gnode text { text-decoration: none; }
.gnode:focus { outline: none; }
.gbox { fill: var(--card); stroke: var(--border-strong); stroke-width: 1; }
.gnode.crit .gbox { stroke: var(--foreground); stroke-width: 2; }
.gnode:hover .gbox { fill: var(--paper-2); stroke: var(--foreground); stroke-width: 1.5; }
.gnode:focus-visible .gbox { stroke: var(--ring); stroke-width: 2.5; }
.gnode.ext .gbox { fill: transparent; stroke: var(--muted-foreground); stroke-dasharray: 5 4; }
.gnode.anon .gbox { fill: var(--paper-2); stroke: var(--border); stroke-dasharray: 2 3; }
.gnode.anon { cursor: default; }
.gdot { fill: var(--c); }
.gtag { fill: var(--muted-foreground); font-size: 11.5px; }
.gtitle { fill: var(--foreground); font-size: 13px; font-weight: 560; }
.gnode.anon .gtitle { fill: var(--muted-foreground); font-style: italic; font-weight: 400; }
.gtrack { fill: var(--paper-2); }
.gfill { fill: var(--brand); }
.gone { display: none; }
.graph-svg.tracing .gnode:not(.hl) { opacity: 0.22; }
.graph-svg.tracing .edge:not(.hl) { stroke-opacity: 0.08; }
.graph-svg.tracing .edge.hl { stroke: var(--foreground); stroke-opacity: 0.9; stroke-width: 2.25; }
.graph-empty, .graph-none { padding: 2rem 1.5rem; color: var(--muted-foreground); font-size: 0.8125rem; text-align: center; }
.gside { padding: var(--group) 1.25rem 1.25rem; }
.gside h3 { margin-bottom: 0.25rem; }
.gside h3 + p { margin-bottom: 0.75rem; }
.needed { list-style: none; margin: 0 0 var(--group); padding: 0; display: grid; gap: 0.75rem; font-size: 0.8125rem; line-height: 1.25rem; }
.needed li { display: grid; gap: 0.25rem; justify-items: start; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.needed li:first-child { border-top: 0; padding-top: 0; }
.needed .nname { font-weight: 500; }
.needed .pill { white-space: normal; height: auto; min-height: 1.25rem; padding: 0.125rem 0.5rem; }

.foot { padding-top: 1.25rem; padding-bottom: var(--section); border-top: 1px solid var(--border); }
.foot p + p { margin-top: 0.25rem; }

@media (max-width: 64rem) {
  .board { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); }
  .graph-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 56rem) {
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  :root { --section: 2.5rem; }
  nav a { padding: 0 0.5rem; }
  .stats { gap: 0.75rem; }
  .stats .stat { font-size: 1.625rem; line-height: 2rem; }
  .themes { grid-template-columns: 1fr; }
  .theme { padding: 0.75rem; gap: 0.75rem; }
  .ring { width: 2.25rem; height: 2.25rem; }
  .timeline { padding: 0 var(--group); }
  .timeline ol > li { grid-template-columns: 1fr; gap: 0.25rem; }
  .search { max-width: none; }
  .search input { font-size: 1rem; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1 0 auto; padding: 0 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
