/* topbot.fyi
   A pen plotter's report: one ink, one green pen, hatching instead of tints, hollow marks instead of
   pale fills. Archivo (one variable family, width 62–125) does every job: expanded for the wordmark,
   normal for the text, narrow for data. Chart colors are validated with the dataviz palette validator
   against these exact surfaces. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-italic.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fbfbf9;
  --ink: #1b1c1f;
  --ink-2: #4b4e57;
  --muted: #6b6e76;
  --rule: #dcddd6;
  --grid: #e6e6e0;
  --baseline: #b9bab3;
  --hover: rgba(27, 28, 31, 0.05);
  /* the pens */
  --pen: #1e7f4f;
  --pen-ink: #1a7047;      /* the pen as text */
  --on-pen: #fbfbf9;
  --link: var(--pen-ink);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #15181d;
    --ink: #e8e7e1;
    --ink-2: #b5b6b0;
    --muted: #8a8d94;
    --rule: #2c3038;
    --grid: #262a31;
    --baseline: #4a4f58;
    --hover: rgba(232, 231, 225, 0.07);
    --pen: #45a874;
    --pen-ink: #5ec48f;
    --on-pen: #15181d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-variant-numeric: proportional-nums;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; border-radius: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
strong { font-weight: 640; }
em { font-style: italic; }
.data, figcaption, .legend, .meta, .note, .dateline, table, .chart-title, details summary, .print-label, footer.bottom {
  font-stretch: 92%;
}
.site { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* ------------------------------------------------------------------ header and footer: the sheet's edges */
header.top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; flex-wrap: wrap;
  padding: 1.25rem 0 0.85rem;
  border-bottom: 1.5px solid var(--ink);
}
.mark { font-stretch: 125%; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; }
.mark span { color: var(--pen-ink); font-weight: 500; }
header.top nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; font-stretch: 96%; }
header.top nav a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; padding: 0.2rem 0; }
header.top nav a:hover { color: var(--ink); }
header.top nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--pen); }

footer.bottom { margin-top: 4.5rem; padding: 1.2rem 0 3rem; border-top: 1.5px solid var(--ink); font-size: 0.84rem; line-height: 1.55; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 3rem; justify-content: space-between; }
footer.bottom p { margin: 0; max-width: 40rem; }

/* ------------------------------------------------------------------ type */
main { padding: 2.1rem 0 2rem; }
.prose { max-width: 38rem; }
h1, h2, h3 { text-wrap: balance; color: var(--ink); font-variant-numeric: lining-nums proportional-nums; }
h1 { font-size: clamp(2rem, 1.25rem + 2.5vw, 3rem); line-height: 1.07; font-weight: 620; letter-spacing: -0.024em; font-stretch: 97%; margin: 0.4rem 0 1rem; max-width: 21em; }
h2 { font-size: 1.5rem; line-height: 1.22; font-weight: 620; letter-spacing: -0.016em; margin: 3.2rem 0 0.8rem; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 620; letter-spacing: -0.01em; margin: 2rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1.05rem; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--muted); }
.lede { font-size: 1.22rem; line-height: 1.5; max-width: 36rem; letter-spacing: -0.006em; }
.muted { color: var(--muted); }
.note { color: var(--ink-2); font-size: 0.95rem; }
.dateline { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.8rem; }
.statement { font-size: 1.5rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.014em; max-width: 30rem; margin: 1.5rem 0 1.25rem; }
.hero { margin-top: 1.6rem; }
.hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.2vw, 3.6rem); max-width: 18em; }

/* ------------------------------------------------------------------ charts */
figure.chart { margin: 2.2rem 0 2.4rem; max-width: 44rem; }
figure.chart.wide { max-width: 60rem; }
figure.chart.hero-fig { margin-top: 0; }
.chart-title { margin: 0 0 0.4rem; font-weight: 620; font-size: 1rem; line-height: 1.4; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; margin: 0 0 0.7rem; font-size: 0.86rem; line-height: 1.45; color: var(--ink-2); }
.key { width: 13px; height: 13px; margin-right: 0.45rem; vertical-align: -2px; overflow: visible; }
.key-line { width: 22px; }
svg.c { width: 100%; height: auto; display: block; overflow: visible; }
@media (max-width: 40rem) { figure.chart { overflow-x: auto; overflow-y: hidden; padding-bottom: 0.3rem; } svg.c { min-width: 37rem; } }
figure.chart figcaption { margin-top: 0.8rem; max-width: 40rem; font-size: 0.88rem; line-height: 1.55; color: var(--ink-2); }
details.tableview { margin-top: 0.55rem; }
details.tableview summary { font-size: 0.86rem; line-height: 1.5; color: var(--link); cursor: pointer; width: max-content; }
details.tableview[open] summary { margin-bottom: 0.4rem; }

svg.c text { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; font-stretch: 92%; }
svg.c .c-tick { fill: var(--muted); font-size: 11.5px; }
svg.c .c-label { fill: var(--ink); font-size: 12.5px; }
svg.c .c-narrow { font-stretch: 82%; }
svg.c .c-mono { font-family: var(--mono); font-size: 11px; }
svg.c .c-value { fill: var(--ink); font-size: 12px; font-weight: 620; }
svg.c .c-note { fill: var(--muted); font-size: 11.5px; }
svg.c .c-pen { fill: var(--pen-ink); font-weight: 600; }
svg.c .c-axis-label { fill: var(--ink-2); font-size: 12px; }
svg.c .c-in { font-size: 12px; font-weight: 620; }
svg.c .on-pen { fill: var(--on-pen); }
svg.c .halo, svg.c .c-in.halo { fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3.5px; stroke-linejoin: round; }
.c-grid { stroke: var(--grid); stroke-width: 1; }
.c-base { stroke: var(--baseline); stroke-width: 1; }
.c-fit { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; stroke-linecap: round; }
.c-join { stroke: var(--baseline); stroke-width: 2; stroke-linecap: round; }
.ci-pen, .ci-ink { stroke-width: 2; stroke-linecap: round; }
.ci-pen { stroke: var(--pen); opacity: 0.42; }
.ci-pen.strong { opacity: 0.6; }
.ci-ink { stroke: var(--ink-2); opacity: 0.35; }
.d-pen { fill: var(--pen); stroke: var(--paper); stroke-width: 2; }
.d-hollow { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.d-ring { fill: var(--paper); stroke: var(--pen); stroke-width: 1.8; }
/* the marks: all of it, some of it, none of it */
.m-all { fill: var(--pen); }
.m-ring { fill: var(--paper); stroke: var(--pen); stroke-width: 1.2; }
.m-half { fill: var(--pen); }
.m-none { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.2; }
.m-dot { fill: var(--muted); }
.m-all:hover, .m-half:hover, .m-ring:hover, .m-none:hover { stroke: var(--ink); stroke-width: 1.8; }
/* hatched and solid fills */
.pat-pen { stroke: var(--pen); stroke-width: 1.3; }
.pat-ink { stroke: var(--ink-2); stroke-width: 1; }
.pat-dot { fill: var(--ink-2); }
.f-pen { fill: var(--pen); }
.f-pen45 { fill: url(#p-pen45); }
.f-ink45 { fill: url(#p-ink45); }
.f-ink135 { fill: url(#p-ink135); }
.f-inkdot { fill: url(#p-inkdot); }
.f-none { fill: var(--paper); }
.seg { stroke: var(--ink-2); stroke-width: 1; }
.seg.f-pen { stroke: var(--pen); }
.bar { stroke: var(--pen); stroke-width: 1.2; }
.bar:hover, .seg:hover { stroke-width: 2; stroke: var(--ink); }
.c-hit { fill: transparent; }
.c-hit:hover { fill: var(--hover); }
.c-hit:focus { outline: none; }
.c-hit:focus-visible { fill: var(--hover); stroke: var(--pen); stroke-width: 1.5; }
.defs { position: absolute; width: 0; height: 0; }

.tip {
  position: absolute; z-index: 20; pointer-events: none; max-width: 22rem;
  padding: 0.45rem 0.65rem; border-radius: 4px;
  background: var(--ink); color: var(--paper);
  font-size: 0.8rem; line-height: 1.4; font-stretch: 94%; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}
.tip strong { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.tip span { display: block; opacity: 0.8; }

/* ------------------------------------------------------------------ the run print */
.print { margin: 1.6rem 0 2rem; max-width: 60rem; }
.print-group { margin-bottom: 1.4rem; }
.print-kind { margin: 0 0 0.6rem; font-size: 0.95rem; font-weight: 640; color: var(--ink); }
.print-kind span { font-weight: 400; color: var(--muted); font-size: 0.88rem; margin-left: 0.4rem; }
.print-row { display: grid; grid-template-columns: 14rem minmax(0, 44rem); gap: 0 1.5rem; align-items: start; margin-bottom: 0.7rem; }
.print-label { margin: 0; line-height: 1.35; }
.print-name { display: block; font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.print-stat { display: block; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.print-marks { width: 100%; height: auto; display: block; margin-top: 0.25rem; overflow: visible; }
.print figcaption { margin: 0.8rem 0 0; max-width: 40rem; font-size: 0.88rem; line-height: 1.55; color: var(--ink-2); }
.print-keys { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; margin-bottom: 0.55rem; color: var(--ink-2); }
@media (max-width: 46rem) {
  .print-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .print-label { display: flex; flex-wrap: wrap; gap: 0 0.6rem; align-items: baseline; }
  .print-name, .print-stat { display: inline; }
}

/* ------------------------------------------------------------------ verdict map and repository entries */
.verdict-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 0.5rem 2rem; margin: 1.5rem 0 2rem; max-width: 64rem; }
.map-col h3 { font-size: 0.95rem; font-weight: 620; margin: 0.6rem 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.map-col h3 span { color: var(--muted); font-weight: 400; }
.map-col ul { list-style: none; padding: 0; margin: 0; }
.map-col li { margin: 0 0 0.25rem; }
.chip { display: inline-flex; align-items: flex-start; gap: 0.5rem; font-size: 0.86rem; line-height: 1.45; font-stretch: 88%; color: var(--ink-2); text-decoration: none; }
.chip:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.vmark { flex: none; overflow: visible; }
.chip .vmark { margin-top: 0.26em; }

article.repo { max-width: 40rem; padding: 1.7rem 0 0.9rem; border-top: 1px solid var(--rule); }
article.repo h3 { margin: 0 0 0.3rem; display: flex; align-items: center; gap: 0.4rem 0.9rem; flex-wrap: wrap; font-size: 1.08rem; font-weight: 650; letter-spacing: -0.012em; }
article.repo h3 a { color: var(--ink); text-decoration-color: var(--baseline); }
.verdict-tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 500; font-stretch: 92%; color: var(--ink-2); letter-spacing: 0; }
article.repo .meta { font-size: 0.86rem; line-height: 1.5; color: var(--muted); margin: 0 0 0.75rem; }
article.repo .verdict { font-size: 1rem; }
dl.repo-dl { margin: 0.5rem 0 0.9rem; }
dl.repo-dl dt { font-size: 0.86rem; line-height: 1.4; font-weight: 650; font-stretch: 92%; color: var(--ink-2); margin-top: 0.95rem; }
dl.repo-dl dd { margin: 0.25rem 0 0; font-size: 1rem; }
dl.repo-dl dd ul { margin: 0; }
dl.repo-dl dd p { margin: 0 0 0.35rem; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.87rem; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 620; color: var(--ink-2); border-bottom: 1px solid var(--ink); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 0.8rem; }
td.nowrap { white-space: nowrap; }
tr.total td { border-top: 1px solid var(--ink); font-weight: 620; }
caption { caption-side: bottom; text-align: left; color: var(--ink-2); padding-top: 0.6rem; font-size: 0.84rem; }
td code, th code { font-size: 0.95em; }

/* ------------------------------------------------------------------ method, sources, data */
dl.defs { display: grid; grid-template-columns: 11rem 1fr; gap: 0.75rem 1.5rem; font-size: 1rem; }
dl.defs dt { font-weight: 650; font-size: 0.9rem; line-height: 1.5; padding-top: 0.12rem; }
dl.defs dd { margin: 0; }
@media (max-width: 40rem) { dl.defs { grid-template-columns: 1fr; gap: 0.2rem; } dl.defs dd { margin-bottom: 0.7rem; } }
.toc { columns: 2 16rem; font-size: 0.93rem; line-height: 1.5; padding-left: 1.1rem; }
section.refgroup { margin-bottom: 1rem; }
section.refgroup h2 .muted, details summary .muted { font-weight: 400; font-size: 0.84rem; }
details.dom { border-bottom: 1px solid var(--rule); padding: 0.5rem 0; }
details.dom summary { cursor: pointer; font-size: 0.95rem; line-height: 1.5; }
details.dom[open] summary { margin-bottom: 0.4rem; }
ul.refs { font-size: 0.95rem; padding-left: 1.1rem; margin: 0 0 0.5rem; }
ul.refs li { margin-bottom: 0.2rem; }
ul.refs a { word-break: break-word; }
.pill { font-size: 0.76rem; line-height: 1; padding: 0.2rem 0.45rem; border: 1px solid var(--rule); border-radius: 3px; white-space: nowrap; color: var(--muted); font-stretch: 92%; }
.pill.measured { border-color: var(--pen); color: var(--pen-ink); }
ol.timeline { list-style: none; padding: 0; margin: 1.5rem 0; }
ol.timeline > li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); margin: 0; }
ol.timeline time { font-size: 0.86rem; line-height: 1.6; color: var(--muted); }
ol.timeline h3 { margin: 0 0 0.35rem; }
@media (max-width: 40rem) { ol.timeline > li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ------------------------------------------------------------------ the totals, kept like a ledger */
.totals { margin: 3rem 0 1rem; }
.ledgers { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.5rem 3.5rem; max-width: 52rem; margin-top: 1.2rem; }
dl.ledger { margin: 0; font-variant-numeric: tabular-nums lining-nums; font-stretch: 92%; }
.ledger-head { margin: 0 0 0.3rem; font-weight: 640; font-size: 0.95rem; padding-bottom: 0.4rem; border-bottom: 1.5px solid var(--ink); }
dl.ledger > div { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.42rem 0; border-bottom: 1px solid var(--rule); }
dl.ledger dt { color: var(--ink-2); font-size: 0.93rem; flex: 1; }
dl.ledger dd { margin: 0; font-size: 0.98rem; font-weight: 560; color: var(--ink); white-space: nowrap; }
dl.ledger > div.sum { border-top: 3px double var(--ink); border-bottom: 0; margin-top: -1px; padding-top: 0.55rem; }
dl.ledger > div.sum dt { color: var(--ink); font-weight: 640; }
dl.ledger > div.sum dd { font-size: 1.3rem; font-weight: 680; color: var(--pen-ink); letter-spacing: -0.01em; }
.aside { margin-top: 2.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* trajectories, iso-cost */
.t-run { fill: none; stroke: var(--ink-2); stroke-width: 0.7; opacity: 0.16; }
.t-med { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.t-med.t-pen { stroke: var(--pen); }
.t-med.t-ink { stroke: var(--ink); stroke-dasharray: 6 4; }
.c-iso { stroke: var(--baseline); stroke-width: 1; stroke-dasharray: 3 4; }
.iso-dot { fill: url(#p-pen45); stroke: var(--pen); stroke-width: 1.5; }
.key .t-run { opacity: 0.6; stroke-width: 1; }
