:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #76746e;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --link: #1c5cab;
  --none: #cfcec6;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --good: #006300;
  --attention: #8a5a00;
}
/* The dark theme: when the system asks for it and the reader did not choose the light
   one, or when the reader chose it in the footer. The two lists are the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #96948d;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --link: #86b6ef;
    --none: #4a4a46;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #0ca30c;
    --series-7: #9085e9;
    --series-8: #e66767;
    --good: #0ca30c;
    --attention: #fab219;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #96948d;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --link: #86b6ef;
  --none: #4a4a46;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #0ca30c;
  --series-7: #9085e9;
  --series-8: #e66767;
  --good: #0ca30c;
  --attention: #fab219;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.masthead { border-bottom: 1px solid var(--border); background: var(--surface); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.brand { margin: 0; font-weight: 650; letter-spacing: 0.01em; }
.brand a { color: inherit; text-decoration: none; }
.masthead-row { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.project-picker { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
select { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); }

.intro { padding: 40px 0 8px; }
.intro h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.01em; }
.intro p { margin: 0; max-width: 68ch; color: var(--ink-2); }
.intro .links { margin-top: 12px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 20px; }

.loading, .error { padding: 48px 0; color: var(--ink-2); }

section { margin-top: 40px; }
section > h2 { margin: 0 0 4px; font-size: 20px; }
section > .sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; max-width: 76ch; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }

/* Figures */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 28px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.tile .label { font-size: 13px; color: var(--ink-2); }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.2; margin-top: 4px; }
.tile.hero .value { font-size: 52px; line-height: 1.05; }
.tile .note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile.hero { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.meter { height: 8px; border-radius: 4px; background: var(--none); overflow: hidden; margin-top: 12px; }
.meter > span { display: block; height: 100%; background: var(--series-1); border-radius: 4px 0 0 4px; }

/* Chart */
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.toggle { display: inline-flex; border: 1px solid var(--axis); border-radius: 7px; overflow: hidden; }
.toggle button { font: inherit; font-size: 13px; padding: 4px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.toggle button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .marker { stroke: var(--ink-2); stroke-width: 1; }
.chart .marker-label { fill: var(--ink-2); font-size: 11px; }
.chart .band { fill: transparent; }
.chart .band.active { fill: var(--ink); fill-opacity: 0.05; }

details.table-view { margin-top: 12px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--ink-2); width: fit-content; }

.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
  padding: 8px 10px; font-size: 13px; min-width: 150px; max-width: 280px;
}
.tooltip .tt-title { color: var(--ink-2); margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-row .key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tooltip .tt-row .v { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }
.tooltip .tt-row .n { color: var(--ink-2); }

/* Ranked bars */
.bars { display: grid; grid-template-columns: minmax(120px, max-content) minmax(80px, 1fr) max-content; grid-auto-flow: row dense; gap: 8px 14px; align-items: center; font-size: 14px; }
.bars .name { grid-column: 1; display: flex; align-items: center; gap: 8px; }
.bars .track { grid-column: 2; height: 14px; }
.bars .figure { grid-column: 3; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bars .bar { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.stated { display: grid; grid-template-columns: minmax(180px, max-content) 1fr; gap: 10px 24px; margin: 0; font-size: 14px; }
.stated dt { color: var(--ink-2); }
.stated dd { margin: 0; }
.stated dd code { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--muted); }
.stated + .notes { margin: 16px 0 0; padding-left: 18px; }
.card > .notes:first-child { margin: 0; padding-left: 18px; }
.stated-link { margin: 14px 0 0; font-size: 14px; }
@media (max-width: 560px) {
  .stated { grid-template-columns: 1fr; gap: 2px; }
  .stated dd { margin-bottom: 10px; }
  .stated dd code { display: block; margin: 2px 0 0; }
}
.bars.shares .track { background: var(--none); border-radius: 4px; overflow: hidden; }
.bars.shares .bar { background: var(--series-1); border-radius: 0; }
.bars.shares .name a { color: inherit; }
details.table-view .bars { margin-top: 12px; }
.bars .figure small, .bars .name small { color: var(--muted); font-size: 12px; }
.bars .name small { display: block; }
@media (max-width: 560px) {
  .bars { grid-template-columns: 1fr max-content; gap: 4px 12px; }
  .bars .figure { grid-column: 2; }
  .bars .track { grid-column: 1 / -1; height: 8px; margin-bottom: 10px; }
}

/* Tables */
.table-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small { color: var(--muted); font-size: 12px; }

.person { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.person a { color: inherit; font-weight: 550; text-decoration: none; }
.person a:hover { text-decoration: underline; }
.person small { display: block; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--none); object-fit: cover; }
.avatar.small { width: 20px; height: 20px; }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.avatar.small.initials { font-size: 9px; }

.split { display: flex; gap: 2px; height: 8px; min-width: 120px; border-radius: 4px; overflow: hidden; }
.split > span { height: 100%; min-width: 2px; }
.models-used { color: var(--ink-2); font-size: 13px; min-width: 180px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }

.box { white-space: nowrap; }
.box .mark { display: inline-block; width: 1.2em; font-weight: 700; }
.box.ticked .mark { color: var(--good); }
.box.missing, .box.not-yet { color: var(--muted); }
.reading { display: flex; min-width: 150px; }
.reading .mark { flex: none; width: 1.3em; font-weight: 700; }
.reading.ok .mark { color: var(--good); }
.reading.check .mark { color: var(--attention); }
.state { font-size: 12px; color: var(--ink-2); border: 1px solid var(--axis); border-radius: 10px; padding: 0 8px; white-space: nowrap; }
.pr-title { min-width: 200px; max-width: 300px; }
.pr-title a { color: inherit; }

.notes { font-size: 14px; color: var(--ink-2); max-width: 76ch; }
.notes li { margin-bottom: 6px; }
.empty { color: var(--ink-2); font-size: 14px; }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 56px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* Overview of the projects */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 28px; }
.order-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; margin: 24px 0 12px; font-size: 13px; color: var(--muted); }
.order-bar + .projects { margin-top: 0; }
.order { font: inherit; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.order:hover, .order:focus-visible { color: var(--ink); border-color: var(--axis); outline: none; }
.project-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; color: inherit; text-decoration: none; }
.project-card:hover, .project-card:focus-visible { border-color: var(--axis); outline: none; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.project-card h2 { margin: 0; font-size: 20px; }
.project-card .head { display: flex; align-items: center; gap: 12px; }
.project-card .head > div { min-width: 0; }
.project-card .logo { width: 40px; height: 40px; flex: none; border-radius: 8px; background: #fff; object-fit: contain; }
.project-card .repo { font-size: 13px; color: var(--muted); }
.project-card .value { font-size: 36px; font-weight: 600; line-height: 1.2; margin-top: 12px; }
.project-card .label { font-size: 13px; color: var(--ink-2); }
.project-card .facts { font-size: 13px; color: var(--ink-2); margin: 12px 0 0; }

/* Navigation and text pages */
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 14px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.prose section { max-width: 74ch; }
.prose h2 { margin-bottom: 12px; }
.prose h3 { font-size: 16px; margin: 28px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--grid); border-radius: 4px; padding: 1px 5px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0 0 12px; line-height: 1.45; }
.prose pre code { background: none; padding: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Table of contents of a text page */
html { scroll-behavior: smooth; }
.prose section, .prose h3 { scroll-margin-top: 16px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-top: 28px; font-size: 14px; }
.toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.prose .toc ol { margin: 0; padding-left: 20px; }
.prose .toc ol ol { margin-top: 6px; list-style: none; padding-left: 4px; font-size: 13px; }
.prose .toc li { margin-bottom: 6px; }
.prose .toc li:last-child { margin-bottom: 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover, .toc a:focus-visible { color: var(--ink); text-decoration: underline; }
.toc code { background: none; padding: 0; }
.toc-body > section:first-child { margin-top: 28px; }
@media (min-width: 960px) {
  .with-toc { display: grid; grid-template-columns: minmax(0, 74ch) minmax(220px, 280px); gap: 0 56px; align-items: start; }
  .with-toc .toc { grid-column: 2; grid-row: 1; position: sticky; top: 16px; }
  .with-toc .toc-body { grid-column: 1; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.prose h2 .state { font-weight: 500; vertical-align: middle; margin-left: 6px; }
.prose table { margin-bottom: 14px; }
.prose td code { white-space: nowrap; }

/* ---------- Video ---------- */
.film { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0d0d0d; border-radius: 6px; }
section > .film-note { margin: 12px 0 0; }

/* ---------- Lines changed ---------- */
.heaviest { margin-top: 16px; font-size: 14px; color: var(--ink-2); max-width: 76ch; }
.heaviest p { margin: 0 0 8px; }
.heaviest ol { list-style: none; margin: 0; padding: 0; }
.heaviest li { display: grid; grid-template-columns: 9ch 1fr; gap: 12px; padding: 6px 0; border-top: 1px solid var(--grid); }
.heaviest .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.heaviest a { overflow-wrap: anywhere; }
.heaviest small { display: block; color: var(--muted); }
.heaviest small .swatch { margin: 0 4px 0 0; }
section > .sub.after { margin: 12px 0 0; }

/* ---------- Policies of other projects ---------- */
/* Five columns in the width of the text: fixed shares, and code that wraps. */
.policies { table-layout: fixed; min-width: 640px; font-size: 13px; line-height: 1.45; }
.policies th, .policies td { vertical-align: top; padding-left: 0; padding-right: 12px; overflow-wrap: break-word; }
.policies th:nth-child(1) { width: 14%; }
.policies th:nth-child(2) { width: 22%; }
.policies th:nth-child(3) { width: 21%; }
.policies th:nth-child(4) { width: 22%; }
.policies th:nth-child(5) { width: 21%; }
.prose .policies code { white-space: normal; word-break: break-word; overflow-wrap: anywhere; font-size: 12px; }
.policies td:first-child small { display: block; color: var(--muted); }

.prose blockquote { margin: 12px 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--axis); color: var(--ink); font-size: 17px; }
.prose blockquote p { margin: 0; }

/* ---------- Statistics: when each model version was named ---------- */
.bars .track.span, .bars .track.scale { position: relative; }
.bars .track.span .bar { position: absolute; top: 0; border-radius: 4px; min-width: 6px; }
.bars .track.span .mark { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--grid); }
.bars .track.scale { height: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars .track.scale span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }
.bars .track.scale span:first-child { transform: none; }
.bars.spans .figure small { font-size: 12px; }

/* ---------- Text pages: what should catch the eye ---------- */
.intro .links .button { background: var(--ink); color: var(--surface); text-decoration: none; font-weight: 600; padding: 6px 14px; border-radius: 7px; }
.intro .links { align-items: center; }
.prose .callout { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--link); border-radius: 6px; padding: 12px 16px; margin: 16px 0; }
.prose .callout.caution { border-left-color: var(--attention); }

.file-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 8px; counter-reset: file; }
.file-card { counter-increment: file; display: block; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 12px 46px; color: inherit; text-decoration: none; }
.file-card::before { content: counter(file); position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--axis); color: var(--ink-2); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.file-card:hover, .file-card:focus-visible { border-color: var(--axis); outline: none; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.prose .file-card code { background: none; padding: 0; font-weight: 600; overflow-wrap: anywhere; }
.file-card span { display: block; font-size: 13px; color: var(--ink-2); }

.prose .file-name { margin: 0; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); background: var(--grid); border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 6px 16px; }
.prose .file-name + pre { border-radius: 0 0 10px 10px; }
.prose .file-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prose .file-name button { font: inherit; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.prose .file-name button:hover, .prose .file-name button:focus-visible { color: var(--ink); border-color: var(--axis); }

.prose ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 8px; }
.prose ol.steps li { counter-increment: step; position: relative; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px 12px 56px; }
.prose ol.steps li::before { content: counter(step); position: absolute; left: 14px; top: 11px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 650; display: grid; place-items: center; }
@media (max-width: 560px) { .file-cards { grid-template-columns: 1fr; } }

/* ---------- Overview: the last months of a project ---------- */
.spark { margin-top: 14px; }
.spark svg { display: block; width: 100%; height: 36px; }
.spark .all { fill: var(--none); }
.spark .named { fill: var(--series-1); }
.spark .base { stroke: var(--axis); stroke-width: 1; }
.spark-note { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.spark-note .swatch { width: 8px; height: 8px; margin-right: 4px; }

/* ---------- Badge of a project ---------- */
.badge img { display: block; height: 20px; }
.badge pre { margin: 14px 0 0; padding: 10px 12px; background: var(--page); border: 1px solid var(--border); border-radius: 6px; overflow-x: auto; }
.badge code { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- A year of days ---------- */
.calendar-scroll { overflow-x: auto; padding-bottom: 4px; }
.calendar svg { display: block; }
.calendar text { fill: var(--muted); font-size: 10px; }
.cal-0 { fill: var(--grid); }
.cal-1 { fill: var(--series-1); fill-opacity: 0.3; }
.cal-2 { fill: var(--series-1); fill-opacity: 0.5; }
.cal-3 { fill: var(--series-1); fill-opacity: 0.75; }
.cal-4 { fill: var(--series-1); }
.calendar-legend { display: flex; align-items: center; gap: 3px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.calendar-legend svg { display: block; }

/* ---------- Lines ---------- */
.chart .end-label { fill: var(--ink-2); font-size: 12px; }
.line-key { display: inline-block; width: 18px; height: 0; }

/* ---------- Theme switcher of the footer ---------- */
.toggle.theme button { font-size: 12px; padding: 2px 10px; }
