@font-face { font-family: "Zen Kaku"; font-weight: 400; font-display: swap;
  src: url("fonts/zen-kaku-gothic-new-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku"; font-weight: 500; font-display: swap;
  src: url("fonts/zen-kaku-gothic-new-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku"; font-weight: 700; font-display: swap;
  src: url("fonts/zen-kaku-gothic-new-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f2f4f7;
  --surface: #ffffff;
  --ink: #16213a;
  --muted: #5a6378;
  --faint: #8a93a6;
  --rule: #dce1ea;
  --cell: #e8ecf2;
  --business: #2a78d6;
  --first: #eb6834;
  --good: #0ca30c;
  --critical: #d03b3b;
  --focus: #2a78d6;
  --radius-s: 4px;
  --radius-m: 8px;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2.25rem;
  --step-4: 3.375rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #141b2b;
    --surface: #1b2335;
    --ink: #e9edf5;
    --muted: #aab3c5;
    --faint: #7c869b;
    --rule: #2c3650;
    --cell: #232c42;
    --business: #3987e5;
    --first: #d95926;
    --focus: #6da7ec;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Zen Kaku", system-ui, sans-serif; font-size: var(--step-0); line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 500; }
p { margin: 0 0 0.75em; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
button, .button {
  font: inherit; font-weight: 500; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 6px 14px; cursor: pointer;
}
button:hover { border-color: var(--muted); }
button:disabled { opacity: 0.55; cursor: default; }
button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: 5px 8px; }

/* ---- Header ---- */
.top { border-bottom: 1px solid var(--rule); background: var(--surface); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
.health { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--step--1); flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.dot.bad { background: var(--critical); }
.top form { margin: 0; }

/* ---- Program tabs ---- */
.tabs { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; }
.tab { font: inherit; font-weight: 500; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: 14px 14px 11px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); border-color: var(--rule); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab .count { font-size: var(--step--1); font-weight: 700; color: var(--paper); background: var(--good); border-radius: 10px; padding: 0 7px; line-height: 1.5; }
.tab .count.zero { background: none; color: var(--faint); font-weight: 400; padding: 0; }
.tab .short { display: none; }
@media (max-width: 600px) { .tab .long { display: none; } .tab .short { display: inline; } .tab { padding: 12px 10px 9px; } }
.view-blurb { color: var(--muted); max-width: 72ch; margin-bottom: 18px; }

/* ---- Hero: the November calendars ---- */
.hero { padding: 28px 0 32px; }
.hero-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.03em; font-weight: 700; }
.hero .lede { font-size: var(--step-1); max-width: 62ch; margin: 12px 0 28px; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: var(--step--1); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 6px; border-radius: 3px; display: inline-block; }
.swatch.business { background: var(--business); }
.swatch.first { background: var(--first); }
.swatch.was { background: repeating-linear-gradient(135deg, var(--faint) 0 2px, transparent 2px 4px); }
.swatch.none { background: var(--cell); }

.cals { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cal h3 { margin-bottom: 12px; }
.cal h3 small { color: var(--muted); font-weight: 400; font-size: var(--step--1); margin-left: 8px; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 8px; }
.cal > div > .month-head:first-child { margin-top: 0; }
.month-name { font-weight: 700; }
.month-note { color: var(--muted); font-size: var(--step--1); }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { font-size: var(--step--1); color: var(--faint); text-align: center; padding-bottom: 4px; }
.day {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s);
  min-height: 64px; padding: 6px 7px 7px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; cursor: pointer; color: var(--ink);
}
.day:hover { border-color: var(--muted); }
.day.empty { background: transparent; border-color: transparent; cursor: default; }
.day.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.day .n { font-size: var(--step-0); font-weight: 500; line-height: 1; }
.day.has-open .n { font-weight: 700; }
.bars { display: grid; gap: 3px; }
.bar { height: 6px; border-radius: 3px; background: var(--cell); }
.bar.business.open { background: var(--business); }
.bar.first.open { background: var(--first); }
.bar.was { background: repeating-linear-gradient(135deg, var(--faint) 0 2px, transparent 2px 4px); }

.detail { margin-top: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m);
  padding: 18px 20px; }
.detail h3 { margin-bottom: 10px; }
.trips { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.trips th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 12px 6px 0; border-bottom: 1px solid var(--rule); }
.trips td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.trips tr:last-child td { border-bottom: 0; }
.trips td strong { font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 6px; }
.tag i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.tag.business i { background: var(--business); }
.tag.first i { background: var(--first); }
.state-open { color: var(--good); font-weight: 500; }
@media (prefers-color-scheme: dark) { .state-open { color: #3fcf3f; } }

/* ---- Sections ---- */
section.block { padding: 36px 0; border-top: 1px solid var(--rule); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.block-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.two { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; }

/* Claude report */
.report { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 24px 28px; max-width: 72ch; }
.report h2 { font-size: var(--step-1); margin: 1.2em 0 0.4em; }
.report h3 { font-size: var(--step-0); margin: 1em 0 0.3em; font-weight: 700; }
.report p:first-child { font-size: var(--step-1); }
.report ul { padding-left: 1.2em; margin: 0 0 0.75em; }
.report li { margin-bottom: 0.25em; }
.report-meta { font-size: var(--step--1); color: var(--muted); margin-top: 16px; }
.report-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Release estimates */
.estimates { display: grid; gap: 18px; }
.est .window { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.est .window.none { font-size: var(--step-1); color: var(--muted); font-weight: 500; }
.est .label { font-weight: 500; }
.est .sub { color: var(--muted); font-size: var(--step--1); }
.meter { height: 6px; background: var(--cell); border-radius: 3px; margin: 8px 0 4px; max-width: 280px; }
.meter b { display: block; height: 100%; border-radius: 3px; background: var(--ink); }

/* Charts */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.chart h3 { margin-bottom: 4px; }
.chart .sub { color: var(--muted); font-size: var(--step--1); margin-bottom: 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .gridline { stroke: var(--rule); stroke-width: 1; }
.chart .axis { stroke: var(--faint); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .mark.business { fill: var(--business); }
.chart .mark.first { fill: var(--first); }
.chart .mark.all { fill: var(--ink); opacity: 0.82; }
.chart .hit:hover + .mark, .chart .mark.hl { opacity: 0.8; }
.chart-wide { grid-column: 1 / -1; }
.tip { position: fixed; pointer-events: none; z-index: 10; background: var(--ink); color: var(--paper);
  font-size: var(--step--1); padding: 6px 9px; border-radius: var(--radius-s); max-width: 240px; line-height: 1.4; }
.chart-legend { display: flex; gap: 16px; font-size: var(--step--1); color: var(--muted); margin-bottom: 6px; }
details.table-view { margin-top: 8px; font-size: var(--step--1); color: var(--muted); }
details.table-view table { border-collapse: collapse; margin-top: 6px; }
details.table-view td, details.table-view th { padding: 2px 12px 2px 0; text-align: left; }

/* Routes + activity */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--step--1); padding: 6px 16px 8px 0; border-bottom: 1px solid var(--rule); }
.table td { padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); }
.table td.num, .table th.num { text-align: right; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.feed time { color: var(--muted); font-size: var(--step--1); padding-top: 2px; }
.feed .closed { color: var(--muted); }
.feed li.more-row { display: block; border-bottom: 0; padding-top: 14px; }
.urgent-flag { font-weight: 700; }
.empty-note { color: var(--muted); padding: 12px 0; }

footer { padding: 32px 0 48px; color: var(--faint); font-size: var(--step--1); border-top: 1px solid var(--rule); }

/* ---- Login ---- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 360px; }
.login h1 { font-size: var(--step-3); letter-spacing: -0.02em; margin-bottom: 6px; }
.login p { color: var(--muted); margin-bottom: 28px; }
.login label { display: block; font-weight: 500; margin-bottom: 6px; }
.login input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); margin-bottom: 18px; }
.login button { width: 100%; padding: 11px; }
.login .error { color: var(--critical); margin: -8px 0 18px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .login .error { color: #ec7b7b; } }
.login .mini-cal { display: grid; grid-template-columns: repeat(7, 10px); gap: 3px; margin-bottom: 28px; }
.login .mini-cal i { height: 10px; border-radius: 2px; background: var(--cell); }
.login .mini-cal i.b { background: var(--business); }
.login .mini-cal i.f { background: var(--first); }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 860px) {
  .scroll table { min-width: 640px; }
  .top .wrap { gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: 1; }
  .health { order: 3; flex-basis: 100%; }
  .scroll td, .scroll th { white-space: nowrap; }
  .cals, .two, .charts { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: var(--step-3); }
  .day { min-height: 52px; padding: 5px; }
  .feed li { grid-template-columns: 1fr; gap: 2px; }
  .wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
