/* Siena palette and type, from siena.cx. Licensed serifs (Feature Deck, Tiempos)
   are swapped for Instrument Serif and Source Serif 4. */
:root {
  --bg: #f3f0eb;
  --paper: #faf7f1;
  --surface: #ffffff;
  --sand: #efe5d0;
  --ink: #122023;
  --ink-2: #2a3639;
  --muted: #5d6769;
  --faint: #8a9294;
  --line: #e2ddd3;
  --line-2: #d6cfc1;
  --coral: #fb5646;   --coral-soft: #fde3df;
  --peach: #c9762f;   --peach-soft: #feecd9;
  --sky: #2e79d8;     --sky-soft: #e3edfc;
  --butter: #8a7a12;  --butter-soft: #f7f0c6;
  --violet: #6a62b8;  --violet-soft: #ebe9f8;
  --good: #1f7a4d;    --good-soft: #e0f0e6;
  --warn: #9a6200;    --warn-soft: #fbefd6;
  --bad: #c2382b;     --bad-soft: #fbe3df;
  --idle-soft: #ebe7df;
  --serif-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --serif-text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1719; --paper: #122023; --surface: #16272a; --sand: #1d3033;
    --ink: #f3f0eb; --ink-2: #e2ddd3; --muted: #a7b0b1; --faint: #7d8789; --line: #24373a; --line-2: #2f4447;
    --coral: #ff8576; --coral-soft: #3a2220; --peach: #fec796; --peach-soft: #3a2c1c;
    --sky: #97bdff; --sky-soft: #1c2b42; --butter: #f2e59a; --butter-soft: #33301a;
    --violet: #b3adf0; --violet-soft: #29263f; --good: #7fd4a1; --good-soft: #17332a;
    --warn: #f2c06b; --warn-soft: #3a2f17; --bad: #ff8a7d; --bad-soft: #3d201d; --idle-soft: #1d3033;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1719; --paper: #122023; --surface: #16272a; --sand: #1d3033;
  --ink: #f3f0eb; --ink-2: #e2ddd3; --muted: #a7b0b1; --faint: #7d8789; --line: #24373a; --line-2: #2f4447;
  --coral: #ff8576; --coral-soft: #3a2220; --peach: #fec796; --peach-soft: #3a2c1c;
  --sky: #97bdff; --sky-soft: #1c2b42; --butter: #f2e59a; --butter-soft: #33301a;
  --violet: #b3adf0; --violet-soft: #29263f; --good: #7fd4a1; --good-soft: #17332a;
  --warn: #f2c06b; --warn-soft: #3a2f17; --bad: #ff8a7d; --bad-soft: #3d201d; --idle-soft: #1d3033;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
p { margin: 0 0 10px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; }
.brand b { font-family: var(--serif-display); font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.brand span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 999px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--sand); }
.nav a.on { color: var(--paper); background: var(--ink); }
.asof { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
@media (max-width: 760px) { .asof { display: none; } .top-row { gap: 12px; } }

main.wrap { padding-top: 32px; padding-bottom: 56px; min-height: 70vh; }
.foot { color: var(--faint); font-size: 12px; padding-top: 18px; padding-bottom: 32px; border-top: 1px solid var(--line); }

/* ---------- Editorial (Overview) ---------- */
.ed { max-width: 720px; margin: 0 auto; }
.ed-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); margin-bottom: 14px; }
.ed h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(40px, 7vw, 64px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 18px; }
.ed h1 em { font-style: italic; color: var(--coral); }
.ed-dek { font-family: var(--serif-text); font-size: 21px; line-height: 1.45; color: var(--ink-2); margin-bottom: 20px; }
.ed-byline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 36px; display: flex; gap: 16px; flex-wrap: wrap; }
.ed h2 { font-family: var(--serif-display); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; margin: 52px 0 14px; }
.ed h2 .n { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.08em; vertical-align: middle; margin-right: 10px; }
.ed p, .ed li { font-family: var(--serif-text); font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.ed p { margin: 0 0 18px; }
.ed .first::first-letter { font-family: var(--serif-display); float: left; font-size: 76px; line-height: 0.82; padding: 6px 10px 0 0; color: var(--ink); }
.pull { font-family: var(--serif-display); font-size: clamp(28px, 4.5vw, 38px); line-height: 1.15; color: var(--ink); border-left: 3px solid var(--coral); padding: 4px 0 4px 22px; margin: 36px 0; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 26px 0 30px; }
.figures div { padding: 18px 14px 16px 0; }
.figures div + div { border-left: 1px solid var(--line-2); padding-left: 16px; }
.figures b { display: block; font-family: var(--serif-display); font-weight: 400; font-size: 46px; line-height: 1; letter-spacing: -0.02em; }
.figures span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 520px) { .figures b { font-size: 34px; } }
.bet-essay { border-top: 1px solid var(--line-2); padding: 20px 0 6px; display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; }
.bet-essay .idx { font-family: var(--serif-display); font-size: 34px; line-height: 1; color: var(--faint); }
.bet-essay h3 { font-family: var(--serif-display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0 0 6px; }
.bet-essay h3 a { text-decoration: none; }
.bet-essay h3 a:hover { text-decoration: underline; }
.bet-essay .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bet-essay p { font-size: 17px; margin-bottom: 10px; }
.ed ul { padding-left: 20px; margin: 0 0 18px; }
.ed li { margin-bottom: 8px; }
.ed-end { text-align: center; color: var(--faint); font-family: var(--serif-display); font-size: 24px; margin-top: 40px; }
.ed .note { font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* ---------- Work views ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-family: var(--serif-display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.01em; margin: 0 0 6px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar button { font: inherit; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--muted); cursor: pointer; }
.toolbar button:hover { color: var(--ink); }
.toolbar button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.toolbar .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 10px; }
.panel-h h2 { font-size: 13px; font-weight: 600; margin: 0; }
.panel-b { padding: 14px 16px; }
.stack { display: grid; gap: 14px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .cols-2 { grid-template-columns: 1fr; } }
h2.sec { font-size: 13px; font-weight: 600; margin: 30px 0 10px; display: flex; align-items: center; gap: 8px; }
h2.sec .mono { font-weight: 400; }

/* Tables */
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.tbl table { min-width: 680px; }
th { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--paper); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.title-cell { font-weight: 600; }
.title-cell a { text-decoration: none; }
.title-cell a:hover { text-decoration: underline; }
.sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
details.row-more summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; }
details.row-more summary::-webkit-details-marker { display: none; }
details.row-more summary::before { content: "+ "; }
details.row-more[open] summary::before { content: "– "; }
details.row-more div { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--idle-soft); color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.chip.plain::before { display: none; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.accent { background: var(--sky-soft); color: var(--sky); }
.tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; white-space: nowrap; text-decoration: none; }
.c-coral { background: var(--coral-soft); color: var(--coral); }
.c-peach { background: var(--peach-soft); color: var(--peach); }
.c-sky { background: var(--sky-soft); color: var(--sky); }
.c-butter { background: var(--butter-soft); color: var(--butter); }
.c-violet { background: var(--violet-soft); color: var(--violet); }
.avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 600; vertical-align: middle; margin-right: 6px; flex: none; }
.who { display: inline-flex; align-items: center; white-space: nowrap; font-size: 13px; }

/* Board (Now / Next / Later) */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.lane { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.lane-h { padding: 4px 4px 12px; }
.lane-h .t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lane-h h2 { font-family: var(--serif-display); font-weight: 400; font-size: 32px; margin: 0; line-height: 1; }
.lane-h .count { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.lane-h p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.gate-strip { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--line-2); font-size: 12px; color: var(--muted); }
.gate-strip b { color: var(--ink); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; }
.card:last-child { margin-bottom: 0; }
.card.done { opacity: 0.62; }
.card.done .card-t { text-decoration: line-through; text-decoration-color: var(--faint); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.card-t { font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.card-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.when { font-family: var(--mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.when.open { color: var(--muted); }
.card-note { font-size: 12px; color: var(--bad); margin: -2px 0 8px; }

/* Lists */
.item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.good { background: var(--good); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; }
.kv dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
.back { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 10px; }
.empty { color: var(--faint); font-size: 13px; }
.rhythm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .rhythm { grid-template-columns: 1fr; } }
.meet { padding: 12px 0; border-top: 1px solid var(--line); }
.meet:first-child { border-top: 0; padding-top: 0; }
.meet b { display: block; }
.meet .mono { display: block; margin: 2px 0 6px; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.meet p { font-size: 13px; margin: 0 0 4px; color: var(--ink-2); }
