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

:root {
  color-scheme: dark;
  --ground: #101214;
  --surface: #171a1e;
  --raised: #1e2227;
  --line: #2a2f36;
  --text: #ece9e2;
  --muted: #9aa0a9;
  --accent: #e0a84a;
  --paper: #e9e4d8;
  --method: #7fd0e8;
  --library: #8fcb8a;
  --architecture: #b9a1f0;
  --design: #f0a3c0;
  --spec: #e0a84a;
  --build: #f08a5d;
  --meta: #9aa0a9;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #f4f1ea;
    --surface: #fbf9f4;
    --raised: #ffffff;
    --line: #dcd6c8;
    --text: #1b1d20;
    --muted: #5c636c;
    --accent: #8a5d0c;
    --method: #136f8a;
    --library: #2f7a2a;
    --architecture: #6243b8;
    --design: #a8315f;
    --spec: #8a5d0c;
    --build: #b04a1c;
    --meta: #5c636c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top, main, footer { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ---------- header */
.top { padding-top: 56px; padding-bottom: 8px; }
.eyebrow { margin: 0 0 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 14px; font-size: clamp(32px, 6vw, 54px); line-height: 1.05; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.sub { margin: 0; max-width: 62ch; color: var(--muted); font-size: 18px; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; margin: 36px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats div { background: var(--surface); padding: 16px 16px 14px; }
.stats dt { font: 500 28px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.stats dd b { display: block; color: var(--text); font-weight: 500; font-size: 14px; }

/* ---------- controls */
.controls { position: sticky; top: 0; z-index: 5; margin: 36px -20px 0; padding: 14px 20px 10px; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .toggle {
  font: 500 13px/1 var(--sans); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; min-height: 34px; cursor: pointer;
}
.chip span { margin-left: 4px; font-family: var(--mono); font-size: 12px; opacity: .7; }
.chip:hover, .toggle:hover { color: var(--text); border-color: var(--muted); }
.chip.on { color: var(--ground); background: var(--c, var(--text)); border-color: var(--c, var(--text)); }
.toggle[aria-pressed="true"] { color: var(--ground); background: var(--text); border-color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.search { flex: 1 1 220px; }
.search input {
  width: 100%; min-height: 34px; padding: 6px 12px; font: 400 14px/1.2 var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.search input::placeholder { color: var(--muted); }
.strip { display: flex; gap: 2px; margin-top: 10px; height: 16px; }
.seg { flex: 1 1 0; min-width: 3px; border-radius: 2px; background: var(--c); opacity: .85; transition: opacity .15s, transform .15s; }
.seg:hover, .seg.here { opacity: 1; transform: scaleY(1.45); }
.seg.off { opacity: .14; }
.count { margin: 6px 0 0; min-height: 18px; font: 400 12px/1.5 var(--mono); color: var(--muted); }

.phase-method { --c: var(--method); }
.phase-library { --c: var(--library); }
.phase-architecture { --c: var(--architecture); }
.phase-design { --c: var(--design); }
.phase-spec { --c: var(--spec); }
.phase-build { --c: var(--build); }
.phase-meta { --c: var(--meta); }

/* ---------- list */
.list { list-style: none; margin: 24px 0 0; padding: 0; }
.card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.card:first-child { border-top: 0; }
.card:focus { outline: none; }
.card:focus-visible .body, .card:target .body { box-shadow: -3px 0 0 var(--c); }
.when { font: 400 12px/1.4 var(--mono); color: var(--muted); padding-top: 3px; }
.when .n { display: block; font-size: 22px; font-weight: 500; color: var(--c); line-height: 1.1; margin-bottom: 4px; }
.when .day { display: block; }
.body { padding-left: 16px; margin-left: -16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.tag.phase { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.tag.kind-correction { color: var(--ground); background: var(--text); border-color: var(--text); }
.prompt {
  margin: 0 0 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c);
  border-radius: 0 8px 8px 0; font: 400 14.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.mask { display: inline-block; width: 9ch; height: 1em; vertical-align: -0.12em; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--muted) 0 4px, color-mix(in srgb, var(--muted) 55%, transparent) 4px 8px); opacity: .55; }
.note { margin: -6px 0 14px; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.caused { margin: 0; max-width: 68ch; text-wrap: pretty; }
.caused .lead { display: block; margin-bottom: 2px; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* work figures on a card */
.work { margin-top: 14px; max-width: 68ch; }
.work .lead { display: block; margin-bottom: 6px; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mix { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.mix .track { fill: var(--line); }
.m-fable { fill: var(--spec); background: var(--spec); }
.m-opus { fill: var(--architecture); background: var(--architecture); }
.m-sonnet { fill: var(--method); background: var(--method); }
.m-haiku { fill: var(--library); background: var(--library); }
.figs { margin: 8px 0 0; font: 400 13px/1.5 var(--mono); color: var(--muted); }
.figs b { font-weight: 500; color: var(--text); }
.bymodel { margin: 4px 0 0; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.sep { opacity: .5; }
details { margin-top: 10px; }
summary { display: inline-block; cursor: pointer; font: 500 13px/1 var(--sans); color: var(--accent); padding: 8px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; font-family: var(--mono); }
details[open] summary::after { content: " −"; }
details ul { margin: 6px 0 0; padding-left: 18px; max-width: 68ch; color: var(--text); }
details li { margin: 6px 0; }
details li::marker { color: var(--c); }
.numbers { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.numbers div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.numbers dt { font: 500 18px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.numbers dd { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
figure { margin: 14px 0 0; }
figure img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.gap { display: flex; align-items: center; gap: 12px; padding: 4px 0 4px 116px; color: var(--muted); font: 400 12px/1 var(--mono); }
.gap::before, .gap::after { content: ""; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.gap::before { width: 24px; }
.gap::after { flex: 1; }
.card[hidden], .gap[hidden] { display: none; }
.none { color: var(--muted); padding: 40px 0; }
mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 2px; }

/* ---------- measured */
.measured { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.measured .stats { margin-top: 0; }
h3 { margin: 30px 0 8px; font-size: 16px; font-weight: 600; }
.scroll { overflow-x: auto; }
table.num { font-size: 14px; }
table.num thead th { font: 500 11px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: 8px; white-space: nowrap; }
table.num td { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
table.num th[scope="row"] { white-space: normal; min-width: 150px; }
table.num th small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
table.num td:last-child { color: var(--text); }
.barcol { width: 22%; min-width: 90px; padding-right: 0; }
.bar { display: block; width: 100%; height: 8px; margin-top: 6px; border-radius: 4px; overflow: hidden; }
.bar .track { fill: var(--line); }
.bar .fill { fill: var(--accent); }
.bar.quiet .fill { fill: var(--muted); }
.lanes { margin-top: 6px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 40px; }
table.tools th[scope="row"] { font-weight: 400; }
table.tools td { text-align: right; }
table.tools td.barcol { width: 40%; }
.fine { margin: 24px 0 0; max-width: 78ch; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- state */
.state { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
h2 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.asof { margin: 0 0 18px; color: var(--muted); font: 400 13px/1.5 var(--mono); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); }
th { font-weight: 500; white-space: nowrap; }
td.fig { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; color: var(--accent); }
td:last-child { color: var(--muted); }
.caveats { margin: 18px 0 0; padding-left: 18px; color: var(--muted); max-width: 70ch; }
.caveats li { margin: 6px 0; }

footer { padding-top: 40px; padding-bottom: 64px; color: var(--muted); font-size: 13.5px; }
footer p { max-width: 70ch; margin: 0 0 8px; }
kbd { font: 500 12px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); }

@media (max-width: 640px) {
  .top { padding-top: 36px; }
  .sub { font-size: 16px; }
  .card { grid-template-columns: 1fr; }
  .when { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
  .when .n { margin: 0; }
  .when .day { display: inline; }
  .body { padding-left: 0; margin-left: 0; }
  .gap { padding-left: 0; }
  .state th, .state td { display: block; padding: 4px 0; border: 0; white-space: normal; }
  .state tr { display: block; padding: 12px 0; border-top: 1px solid var(--line); }
  .barcol { display: none; }
  html { scroll-padding-top: 12px; }
  .controls { position: static; }
}
