:root {
  --paper: #f3f4ef;
  --paper-deep: #e9ebe4;
  --ink: #171b21;
  --muted: #5f6872;
  --stamp: #2341c9;
  --stamp-soft: #d6dcf7;
  --mark: #f5e35a;
  --mark-soft: #faf2b8;
  --rule: #d3d7ce;
  --measure: 68ch;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15181d;
    --paper-deep: #1d2127;
    --ink: #e8e9e3;
    --muted: #9ba3ad;
    --stamp: #93a6f6;
    --stamp-soft: #26305a;
    --mark: #7a6d1c;
    --mark-soft: #3d3716;
    --rule: #2d323a;
  }
}
:root[data-theme="dark"] {
  --paper: #15181d;
  --paper-deep: #1d2127;
  --ink: #e8e9e3;
  --muted: #9ba3ad;
  --stamp: #93a6f6;
  --stamp-soft: #26305a;
  --mark: #7a6d1c;
  --mark-soft: #3d3716;
  --rule: #2d323a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
a { color: var(--stamp); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.2em; }
li { margin-bottom: 0.5em; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }
pre { background: var(--paper-deep); padding: 1rem 1.25rem; overflow-x: auto; max-width: var(--measure); border-left: 3px solid var(--stamp); }
code { background: var(--paper-deep); padding: 0.1em 0.35em; }
pre code { background: none; padding: 0; }

.wrap { width: min(100% - 2rem, 76rem); margin-inline: auto; }

/* masthead */
.mast { border-bottom: 1px solid var(--rule); }
.mast .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem; padding: 1.1rem 0; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand .pass { background: linear-gradient(transparent 55%, var(--mark) 55%, var(--mark) 92%, transparent 92%); padding-inline: 0.05em; }
.nav { font-family: var(--sans); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; margin-left: auto; }
.theme-toggle { display: inline-flex; align-items: center; gap: 0.45rem; line-height: 1; }
.theme-toggle .ico { display: block; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle-head { padding: 0.35rem; border-color: transparent; color: var(--ink); align-self: center; }
.theme-toggle-head:hover { border-color: var(--rule); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="light"] .theme-toggle .ico-moon { display: block; }
:root[data-theme="light"] .theme-toggle .ico-sun { display: none; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--stamp); }
.dated { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }

/* hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { max-width: 22ch; }
.hero .lede { font-size: 1.2rem; margin-top: 1.25rem; max-width: 52ch; color: var(--ink); }

.pass-demo { margin-top: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.75rem 0 1.5rem; position: relative; }
.pass-line { position: relative; font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.5; max-width: 40ch; }
.pass-line .chunk { transition: background-color 0.35s ease, color 0.35s ease; }
.pass-line .chunk.marked { background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 90%, transparent 90%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.pass-line .chunk.swapped { background: none; }
.pass-bar { position: absolute; top: -0.35em; bottom: -0.35em; width: 2px; background: var(--stamp); box-shadow: 0 0 0 1px var(--paper), 0 0 14px 2px color-mix(in srgb, var(--stamp) 55%, transparent); opacity: 0; pointer-events: none; }
.pass-caption { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; margin-top: 1rem; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.pass-caption p { margin: 0; max-width: 60ch; }
.pass-caption button { font-family: var(--sans); font-size: 0.9rem; background: none; border: 1px solid var(--stamp); color: var(--stamp); padding: 0.35rem 0.8rem; cursor: pointer; }
.pass-caption button:hover { background: var(--stamp-soft); }
.pass-static { display: none; }
@media (prefers-reduced-motion: reduce) {
  .pass-static { display: block; }
  .pass-static .was { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
  .pass-caption button { display: none; }
}

/* sections */
.section { padding: clamp(2.25rem, 5vw, 3.75rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 1.75rem; }
.section-head .lede { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-head .more { font-family: var(--sans); font-size: 0.95rem; }

/* state of play */
.brief { display: grid; gap: 1rem; max-width: 60rem; }
.brief-item { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.brief-item:last-child { border-bottom: 1px solid var(--rule); }
.brief-item time { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.brief-item p { margin: 0; max-width: 62ch; }
.brief-item a { color: inherit; }
@media (max-width: 560px) { .brief-item { grid-template-columns: 1fr; gap: 0.2rem; } }

/* directory rows */
.dir { list-style: none; padding: 0; margin: 0; max-width: 68rem; }
.dir > li { display: grid; grid-template-columns: minmax(14rem, 19rem) 1fr; gap: 0.5rem 2.5rem; padding: 1.15rem 0; border-top: 1px solid var(--rule); }
.dir > li:last-child { border-bottom: 1px solid var(--rule); }
.dir .who { font-family: var(--sans); }
.dir .who a { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration-color: var(--stamp); }
.dir .who a:hover { color: var(--stamp); }
.dir .org { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.dir .cost { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }
.dir .what p { margin: 0; max-width: 62ch; }
.dir .what .caveat { margin-top: 0.5rem; padding-left: 0.9rem; border-left: 3px solid var(--mark); color: var(--ink); font-size: 0.97rem; }
.dir .host { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; display: block; word-break: break-all; }
@media (max-width: 720px) { .dir > li { grid-template-columns: 1fr; } }

.group { margin-top: 2.5rem; }
.group h3 { margin-bottom: 0.75rem; }
.group .intro { color: var(--muted); }
.notes { margin-top: 1.75rem; background: var(--paper-deep); padding: 1.25rem 1.5rem; max-width: 68rem; }
.notes h3 { margin-bottom: 0.5rem; }
.notes ul { max-width: 70ch; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; max-width: 60rem; }
.timeline li { display: grid; grid-template-columns: 8rem 1fr; gap: 0.75rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 1px solid var(--rule); }
.timeline time { font-family: var(--sans); color: var(--muted); font-size: 0.92rem; }
.timeline h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.timeline p { margin: 0; max-width: 62ch; }
.timeline .src { font-family: var(--sans); font-size: 0.85rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* two-column prose */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem 3rem; max-width: 68rem; }
.cols h3 { margin-bottom: 0.5rem; }

/* for AI */
.endpoints { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: 68rem; font-family: var(--sans); }
.endpoints li { display: grid; grid-template-columns: minmax(12rem, 16rem) 1fr; gap: 0.3rem 2rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.endpoints li:last-child { border-bottom: 1px solid var(--rule); }
.endpoints code { font-size: 0.95rem; }
@media (max-width: 640px) { .endpoints li { grid-template-columns: 1fr; } }

/* footer */
.foot { border-top: 1px solid var(--rule); margin-top: 2rem; padding: 1.75rem 0 2.5rem; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.foot .wrap { display: grid; gap: 0.75rem; }
.foot a { color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.theme-toggle { background: none; border: 1px solid var(--rule); color: var(--muted); font: inherit; padding: 0.3rem 0.7rem; cursor: pointer; justify-self: start; }

.skip { position: absolute; left: -999px; top: 0; background: var(--mark); color: #171b21; padding: 0.5rem 1rem; font-family: var(--sans); }
.skip:focus { left: 1rem; z-index: 10; }

.notfound { padding: 5rem 0; }

/* breadcrumbs */
.crumbs { font-family: var(--sans); font-size: 0.88rem; color: var(--muted); padding: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: var(--rule); }

/* prose pages: guides, entries, faq */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.45rem; margin: 2.2rem 0 0.6rem; }
.prose h3 { font-size: 1.12rem; margin: 1.5rem 0 0.35rem; }
.prose p { margin: 0 0 1em; }
.prose .answer { font-size: 1.15rem; line-height: 1.55; padding-left: 1rem; border-left: 4px solid var(--mark); margin-bottom: 1.5rem; }
.prose .caveat { padding-left: 0.9rem; border-left: 3px solid var(--mark); }
.meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin: 0; }
.visit { font-family: var(--sans); margin: 0.25rem 0 0; }
.visit a { font-weight: 700; }
.section-head .meta { margin-top: -0.25rem; }
.related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.related h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.related ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); }
.related li { margin-bottom: 0.45rem; }
.dim { color: var(--muted); font-size: 0.88rem; }
.related-guides { margin-top: 2.5rem; max-width: 68rem; }
.related-guides h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.related-guides ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); columns: 2; column-gap: 2rem; }
.related-guides li { margin-bottom: 0.45rem; break-inside: avoid; }
@media (max-width: 640px) { .related-guides ul { columns: 1; } }

/* guides list */
.guides { list-style: none; padding: 0; margin: 0; max-width: 68rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 2.5rem; }
.guides li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.guides li a { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration-color: var(--stamp); }
.guides li a:hover { color: var(--stamp); }
.guides li p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.97rem; }

/* comparison tables */
.cmp-wrap { overflow-x: auto; margin: 0 0 2rem; max-width: 68rem; }
table.cmp { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.93rem; }
table.cmp th, table.cmp td { text-align: left; padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.cmp thead th { font-weight: 700; color: var(--muted); font-size: 0.85rem; border-bottom: 2px solid var(--rule); }
table.cmp tbody th { font-weight: 700; }
table.cmp tbody th a { color: var(--ink); text-decoration-color: var(--stamp); }
.prose table.cmp { margin: 1rem 0 1.5rem; }
.prose .cmp-wrap, .prose table.cmp { max-width: none; }

/* faq + glossary */
.faq h2 { font-size: 1.2rem; margin: 1.8rem 0 0.4rem; }
.glossary { max-width: var(--measure); margin: 0; }
.glossary dt { font-family: var(--sans); font-weight: 700; margin-top: 1.2rem; }
.glossary dd { margin: 0.25rem 0 0; }
