/* Timeless Ticks: mobile-first design system. No frameworks, no webfonts. */

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;

  --paper: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --ink: #14181e;
  --ink-2: #3b444f;
  --muted: #626d7a;
  --line: #e0d9cd;
  --line-2: #cec5b5;
  --brass: #8a6520;
  --brass-ink: #7a5a1c;
  --brass-soft: #f3e7cd;
  --brass-wash: rgb(150 118 44 / 9%);
  --paper-2: #f4f0e8;
  --link: #0f5f7a;
  --link-hover: #0b4457;
  --good: #1d6b45;
  --warn: #8a5a11;
  --bad: #97321f;
  --good-bg: #e6f3ec;
  --warn-bg: #fbeed6;
  --bad-bg: #fbe6e1;
  --shadow: 0 1px 2px rgb(20 24 30 / 6%), 0 8px 24px -16px rgb(20 24 30 / 24%);
  --focus: #0f5f7a;

  --ff-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-head: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --ff-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 74rem;
  --measure: 40rem;
  --pad: 1.125rem;
  --radius: 0.75rem;
  --tap: 2.875rem; /* 46px */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1216;
    --surface: #161b21;
    --surface-2: #1c232a;
    --ink: #e9ecef;
    --ink-2: #c3cad2;
    --muted: #99a4b0;
    --line: #2a323b;
    --line-2: #3a444f;
    --brass: #d6ae63;
    --brass-ink: #e2be79;
    --brass-soft: #2b2519;
    --brass-wash: rgb(211 178 95 / 12%);
    --paper-2: #141a20;
    --link: #7ac7e0;
    --link-hover: #a5dcef;
    --good: #6fd39d;
    --warn: #e5b463;
    --bad: #f0907a;
    --good-bg: #14291f;
    --warn-bg: #2b2312;
    --bad-bg: #2c1a17;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 28px -18px rgb(0 0 0 / 70%);
    --focus: #7ac7e0;
  }
}

/* ------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-text);
  font-size: 1.0625rem;      /* 17px on phones */
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; display: block; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--link); text-underline-offset: 0.16em; text-decoration-thickness: 0.07em; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ----------------------------------------------------------- helpers */
.u-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 0.5rem; top: -100%; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 0.75rem 1rem;
  border: 2px solid var(--focus); border-radius: 0.5rem; font-weight: 600;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
@media (min-width: 40em) { :root { --pad: 1.5rem; } }
@media (min-width: 64em) { :root { --pad: 2rem; } }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .site-head { background: var(--paper); } }

.site-head__bar {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 3.5rem;
}

.brand {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding-block: 0.4rem; margin-inline-start: -0.15rem; min-width: 0;
}
.brand__mark { color: var(--brass); display: grid; place-items: center; flex: none; }
.brand__mark svg { width: 1.6rem; height: 1.6rem; }
.brand__name {
  font-family: var(--ff-head); font-size: 1.125rem; letter-spacing: -0.015em;
  display: block; white-space: nowrap;
}
.brand__sub { display: none; font-size: 0.75rem; color: var(--muted); font-weight: 400; }
@media (min-width: 48em) { .brand__sub { display: block; } }

.head__spacer { flex: 1 1 auto; }

.head-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: var(--tap); min-width: var(--tap);
  padding-inline: 0.7rem;
  background: transparent; border: 1px solid var(--line-2); border-radius: 0.6rem;
  color: var(--ink-2); font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.head-btn:hover { background: var(--surface-2); color: var(--ink); }
.head-btn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.head-btn__text { display: none; }
@media (min-width: 30em) { .head-btn__text { display: inline; } }

.head-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }

/* primary nav: horizontal scroller on mobile, inline on desktop */
.site-nav { border-top: 1px solid var(--line); background: var(--surface); }
.site-nav[hidden] { display: none; }
.site-nav__list {
  list-style: none; padding: 0.5rem 0 0.75rem; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem;
}
@media (min-width: 34em) { .site-nav__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 48em) { .site-nav__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-nav__list a {
  display: flex; align-items: center; min-height: var(--tap);
  padding: 0.25rem 0.65rem; border-radius: 0.5rem;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
}
.site-nav__list a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav__list a[aria-current] { color: var(--brass-ink); background: var(--brass-soft); font-weight: 600; }

@media (min-width: 62em) {
  .site-nav { border-top: 0; background: transparent; display: block !important; }
  .site-nav[hidden] { display: block; }
  .site-head__bar { min-height: 4rem; }
  .site-nav__inner { padding-bottom: 0; }
  .nav-toggle { display: none; }
  .site-nav__list {
    display: flex; flex-wrap: wrap; gap: 0.1rem; padding: 0 0 0.5rem;
    justify-content: flex-start;
  }
  .site-nav__list a { min-height: 2.5rem; font-size: 0.9375rem; padding-inline: 0.6rem; }
}

/* ------------------------------------------------------ search panel */
.searchpanel {
  position: fixed; inset: 0; z-index: 60;
  background: var(--paper);
  display: flex; flex-direction: column;
}
.searchpanel[hidden] { display: none; }
.searchpanel__bar {
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.6rem var(--pad); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.searchpanel__field { position: relative; flex: 1 1 auto; min-width: 0; }
.searchpanel__field input {
  width: 100%; min-height: var(--tap);
  padding: 0.5rem 0.75rem 0.5rem 2.4rem;
  border: 1px solid var(--line-2); border-radius: 0.6rem;
  background: var(--paper); font-size: 1rem;
}
.searchpanel__field svg {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  width: 1.15rem; height: 1.15rem; color: var(--muted); pointer-events: none;
}
.searchpanel__close {
  min-height: var(--tap); padding-inline: 0.9rem; flex: none;
  border: 1px solid var(--line-2); border-radius: 0.6rem;
  background: transparent; font-weight: 500;
}
.searchpanel__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.searchpanel__inner { max-width: 46rem; margin-inline: auto; padding: 1rem var(--pad) 3rem; }
.searchpanel__hint { color: var(--muted); font-size: 0.9375rem; margin-bottom: 0.75rem; }

.sugg { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.sugg li a {
  display: block; padding: 0.7rem 0.85rem; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: 0.65rem;
  background: var(--surface); text-decoration: none; color: var(--ink);
}
.sugg li a:hover, .sugg li a:focus-visible { border-color: var(--brass); }
.sugg__sec { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brass); font-weight: 700; }
.sugg__t { display: block; font-weight: 600; margin-top: 0.1rem; }
.sugg__d { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 0.15rem; }
.sugg mark { background: var(--brass-soft); color: var(--ink); padding: 0 0.1em; border-radius: 2px; }

.chipbar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.chipbar a, .chipbar button {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0.2rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-size: 0.875rem; font-weight: 500;
}
.chipbar a:hover, .chipbar button:hover { border-color: var(--brass); color: var(--ink); }
.chipbar [aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }

/* --------------------------------------------------------------- main */
main { flex: 1 0 auto; }
main:focus { outline: none; }

.crumbs { padding-block: 0.85rem 0.25rem; }
.crumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem;
  font-size: 0.8125rem; color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-inline-end: 0.5rem; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }

.article { padding-bottom: 3rem; }
.article__grid { display: block; }
.article__body { min-width: 0; }

@media (min-width: 64em) {
  .article__grid {
    display: grid;
    grid-template-columns: minmax(0, 44rem) minmax(12rem, 17rem);
    gap: 3.25rem;
    align-items: start;
    justify-content: center;
  }
  .article__aside { position: sticky; top: 6rem; min-width: 0; }
  /* index pages with no sidebar keep a comfortable measure but fill the grid */
  .article .article__grid > .article__body { max-width: 44rem; }
}

.article__head { padding-block: 0.5rem 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.eyebrow {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--brass); font-weight: 700; margin-bottom: 0.5rem;
}
.article__head h1 { font-size: clamp(1.75rem, 5.5vw, 2.6rem); }
.lede {
  font-size: 1.125rem; color: var(--ink-2); margin-top: 0.85rem;
  max-width: var(--measure); line-height: 1.55;
}
.byline {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem;
  margin-top: 1rem; font-size: 0.8125rem; color: var(--muted);
}
.byline a { color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--good-bg); color: var(--good);
  padding: 0.1rem 0.5rem; border-radius: 999px; font-weight: 600; font-size: 0.75rem;
}

/* --------------------------------------------------------------- prose */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15rem; }
.prose p, .prose li { overflow-wrap: break-word; }
.prose h2 {
  font-size: clamp(1.3rem, 4.2vw, 1.6rem);
  margin-top: 2.5rem; padding-top: 0.25rem;
}
.prose h3 { font-size: 1.15rem; margin-top: 1.9rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0.7rem; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li + li { margin-top: 0.45rem; }
.prose strong { font-weight: 650; color: var(--ink); }
.prose code {
  font-family: var(--ff-mono); font-size: 0.9em;
  background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px;
  overflow-wrap: anywhere;
}
.prose blockquote {
  border-inline-start: 3px solid var(--brass);
  padding-inline-start: 1rem; color: var(--ink-2); font-style: italic;
}
.prose a.gloss {
  text-decoration-style: dotted; text-decoration-thickness: 1px;
}

/* --------------------------------------------------------- key blocks */
.answer-box {
  background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brass);
  border-radius: var(--radius); padding: 1.1rem 1.15rem;
  margin-bottom: 1.5rem; max-width: var(--measure); box-shadow: var(--shadow);
}
.answer-box h2 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--brass); font-family: var(--ff-text); font-weight: 700; margin-bottom: 0.5rem;
}
.answer-box p { font-size: 1.0625rem; }
.answer-box p + p { margin-top: 0.7rem; }

.panel {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.15rem;
  margin-block: 1.75rem; max-width: var(--measure);
}
.panel h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.panel ul { padding-inline-start: 1.15rem; margin: 0; }
.panel li + li { margin-top: 0.45rem; }
.panel p + p { margin-top: 0.7rem; }

.keyfacts li::marker { color: var(--brass); }

.callout {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; background: var(--surface); margin-block: 1.75rem;
}
.callout__label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em;
  font-weight: 700; margin-bottom: 0.4rem;
}
.callout p + p { margin-top: 0.6rem; }
.callout--key { border-inline-start: 4px solid var(--brass); }
.callout--key .callout__label { color: var(--brass); }
.callout--tip { border-inline-start: 4px solid var(--good); background: var(--good-bg); }
.callout--tip .callout__label { color: var(--good); }
.callout--warn { border-inline-start: 4px solid var(--warn); background: var(--warn-bg); }
.callout--warn .callout__label { color: var(--warn); }

/* -------------------------------------------------------------- tables */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin-block: 1.75rem; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior-x: contain;
}
.table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 0; font-size: 0.9375rem; }
/* only force sideways scrolling when a table really has too many columns */
.table-wrap table:has(tr > *:nth-child(3)) { min-width: 30rem; }
.table-wrap table:has(tr > *:nth-child(4)) { min-width: 38rem; }
.table-wrap table:has(tr > *:nth-child(5)) { min-width: 46rem; }
.table-wrap th, .table-wrap td {
  padding: 0.6rem 0.7rem; text-align: start; vertical-align: top;
  border-bottom: 1px solid var(--line);
  overflow-wrap: break-word;
}
@media (min-width: 40em) { .table-wrap th, .table-wrap td { padding: 0.65rem 0.85rem; } }
.table-wrap thead th {
  background: var(--surface-2); font-family: var(--ff-text);
  font-weight: 650; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-2); position: sticky; top: 0;
}
.table-wrap tbody th { font-weight: 600; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.table-scroll-hint { font-size: 0.8125rem; color: var(--muted); margin-top: -1.4rem; margin-bottom: 1.75rem; }

/* ------------------------------------------------------------ figures */
.figure { margin-block: 1.9rem; max-width: var(--measure); }
.figure__frame {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; overflow: hidden;
}
.figure__frame svg { width: 100%; height: auto; max-width: 100%; color: var(--ink); }

/* the technical diagrams are inline SVG and take their type and hairlines
   from here: without these rules their labels inherit body type and collide */
.dg-title { font-size: 15px; font-weight: 650; fill: var(--ink); font-family: var(--ff-text); }
.dg-label { font-size: 12.5px; fill: var(--ink-2); font-family: var(--ff-text); }
.dg-label--sm { font-size: 11px; fill: var(--muted); font-family: var(--ff-text); }
.dg-hair { stroke: var(--line-2); stroke-width: 1; }
.figure figcaption {
  font-size: 0.875rem; color: var(--muted); margin-top: 0.65rem; line-height: 1.5;
}
.figure figcaption b { color: var(--ink-2); }

/* ---------------------------------------------------------------- faq */
.faq { margin-block: 2.5rem; max-width: var(--measure); }
.faq > h2 { font-size: 1.35rem; margin-bottom: 0.9rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 0.6rem;
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 0.85rem 2.6rem 0.85rem 1rem; min-height: var(--tap);
  font-weight: 600; position: relative; display: flex; align-items: center;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1rem; top: 50%;
  width: 0.6rem; height: 0.6rem; margin-top: -0.35rem;
  border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -0.1rem; }
.faq summary:hover { background: var(--surface-2); }
.faq details > div { padding: 0 1rem 1rem; color: var(--ink-2); }
.faq details > div > * + * { margin-top: 0.7rem; }

/* ------------------------------------------------------------ sources */
.sources ul { list-style: none; padding: 0; }
.sources li {
  padding-inline-start: 1.15rem; position: relative;
  font-size: 0.9375rem; color: var(--ink-2);
}
.sources li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--brass);
}

.updated-note {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--muted); max-width: var(--measure);
}

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.tags a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0.35rem 0.9rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; font-size: 0.8125rem; font-weight: 500;
}
.tags a:hover { border-color: var(--brass); color: var(--brass-ink); }

/* ---------------------------------------------------------- def-hero */
.def-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brass);
  border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1.5rem;
  max-width: var(--measure); box-shadow: var(--shadow);
}
.def-hero p { font-size: 1.125rem; }
.def-hero__label {
  font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--brass); font-weight: 700; margin-bottom: 0.4rem;
}

/* ---------------------------------------------------------- vs-cards */
.vs-grid { display: grid; gap: 1rem; margin-block: 1.75rem; max-width: var(--measure); }
@media (min-width: 40em) { .vs-grid { grid-template-columns: 1fr 1fr; } }
.vs-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1rem 1.05rem; min-width: 0;
}
.vs-head { font-family: var(--ff-head); font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--brass); }
.vs-card ul { padding-inline-start: 1.1rem; margin: 0; font-size: 0.9375rem; }
.vs-card li + li { margin-top: 0.4rem; }

/* -------------------------------------------------------------- cards */
.cards { list-style: none; padding: 0; display: grid; gap: 0.85rem; }
@media (min-width: 36em) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62em) { .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 62em) { .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.95rem 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--brass); }
.card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card h3 { font-size: 1.05rem; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:hover { color: var(--brass); }
.card p { font-size: 0.875rem; color: var(--muted); line-height: 1.5; overflow-wrap: break-word; }
.card__eyebrow {
  font-size: 0.6875rem !important; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brass) !important; font-weight: 700;
}
.card__meta { font-size: 0.75rem !important; color: var(--muted); margin-top: auto; padding-top: 0.25rem; }

.qlist { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.qlist a {
  display: flex; align-items: center; gap: 0.6rem; min-height: var(--tap);
  padding: 0.6rem 0.9rem; border: 1px solid var(--line); border-radius: 0.65rem;
  background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 500;
  font-size: 0.9375rem;
}
.qlist a::before { content: "→"; color: var(--brass); flex: none; }
.qlist a:hover { border-color: var(--brass); color: var(--brass); }

.related { margin-top: 2.75rem; max-width: 100%; }
.related > h2 { font-size: 1.35rem; margin-bottom: 0.9rem; }

/* -------------------------------------------------------------- pager */
.pager {
  display: grid; gap: 0.6rem; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
}
@media (min-width: 40em) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: block; padding: 0.85rem 1rem; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600;
  font-size: 0.9375rem; min-width: 0; overflow-wrap: break-word;
}
.pager a:hover { border-color: var(--brass); }
.pager a span { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-bottom: 0.15rem; }
.pager__next { text-align: end; }

/* ---------------------------------------------------------------- toc */
.toc__aside { display: none; }
@media (min-width: 64em) { .toc__aside { display: block; } }
.toc__h {
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-family: var(--ff-text); font-weight: 700; margin-bottom: 0.6rem;
}
.toc ol { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--line); }
.toc li a {
  display: block; padding: 0.4rem 0 0.4rem 0.85rem; margin-inline-start: -2px;
  border-inline-start: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: 0.875rem; line-height: 1.4;
}
.toc li a:hover { color: var(--ink); }
.toc li a.is-active { color: var(--brass); border-inline-start-color: var(--brass); font-weight: 600; }

/* inline TOC shown on small screens */
.toc-inline {
  margin-block: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); max-width: var(--measure);
}
@media (min-width: 64em) { .toc-inline { display: none; } }
.toc-inline > summary {
  list-style: none; cursor: pointer; padding: 0.8rem 1rem; min-height: var(--tap);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-weight: 600; font-size: 0.9375rem;
}
.toc-inline > summary::-webkit-details-marker { display: none; }
.toc-inline > summary::after {
  content: ""; width: 0.55rem; height: 0.55rem; flex: none;
  border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
  transform: rotate(45deg) translateY(-2px);
}
.toc-inline[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc-inline ol { list-style: none; padding: 0 1rem 0.85rem; margin: 0; }
.toc-inline li a {
  display: flex; align-items: center; min-height: 2.5rem;
  color: var(--ink-2); text-decoration: none; font-size: 0.9375rem;
  border-top: 1px solid var(--line); padding-block: 0.35rem;
}
.toc-inline li a:hover { color: var(--brass); }

/* --------------------------------------------------------------- tool */
.tool {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1rem; margin-block: 1.5rem;
  max-width: var(--measure); box-shadow: var(--shadow);
}
.tool__grid { display: grid; gap: 1rem; }
.tool form { display: grid; gap: 0.9rem; }
.field { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend {
  display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.35rem; padding: 0;
}
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; min-height: var(--tap);
  padding: 0.5rem 0.75rem; border: 1px solid var(--line-2); border-radius: 0.6rem;
  background: var(--paper); font-size: 1rem;
}
.field small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 0.3rem; line-height: 1.45; }
.radios { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.radios label {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: var(--tap);
  padding: 0.35rem 0.8rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--paper); font-size: 0.9375rem; cursor: pointer;
}
.radios label:has(input:checked) { border-color: var(--brass); background: var(--brass-soft); color: var(--brass-ink); font-weight: 600; }
.radios input { accent-color: var(--brass); width: 1.05rem; height: 1.05rem; }

.result {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; min-width: 0;
}
.result__big { font-family: var(--ff-head); font-size: clamp(1.35rem, 5vw, 1.8rem); font-weight: 600; line-height: 1.2; }
.result__note { font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.5; }
.result dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.75rem; margin-top: 0.85rem; font-size: 0.9375rem; }
.result dt { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.result dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: break-word; }
.result .table-wrap { margin-block: 0.85rem; }
.verdict-good { color: var(--good); }
.verdict-warn { color: var(--warn); }
.verdict-bad { color: var(--bad); }
@media (min-width: 52em) { .tool__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* --------------------------------------------------------------- hero */
.hero { padding-block: 1.5rem 1rem; }
.hero__inner { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 60em) { .hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; padding-block: 1.5rem; } }
.hero__text { min-width: 0; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.25rem); letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(1.0625rem, 3.4vw, 1.25rem); }
.hero__dial { display: none; }
@media (min-width: 60em) { .hero__dial { display: block; color: var(--ink); opacity: .9; } }
.hero__dial svg { width: 100%; max-width: 22rem; margin-inline: auto; height: auto; }

.searchbox { display: flex; gap: 0.5rem; margin-top: 1.25rem; max-width: 30rem; }
.searchbox input {
  flex: 1 1 auto; min-width: 0; min-height: var(--tap);
  padding: 0.5rem 0.9rem; border: 1px solid var(--line-2); border-radius: 0.6rem;
  background: var(--surface); font-size: 1rem;
}
.searchbox button {
  flex: none; min-height: var(--tap); padding-inline: 1.1rem;
  border: 1px solid var(--brass); border-radius: 0.6rem;
  background: var(--brass); color: #fff; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .searchbox button { color: #14181e; } }
.searchbox button:hover { filter: brightness(1.08); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.chips a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0.25rem 0.9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; font-size: 0.8125rem; font-weight: 500;
}
.chips a:hover { border-color: var(--brass); color: var(--brass-ink); }

.proof { list-style: none; padding: 0; margin-top: 1.5rem; display: grid; gap: 0.5rem; }
.proof li {
  position: relative; padding-inline-start: 1.6rem;
  font-size: 0.9375rem; color: var(--ink-2); line-height: 1.5;
}
.proof li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--good); font-weight: 700;
}

.home-sec { padding-block: 2rem; border-top: 1px solid var(--line); }
.home-sec__head {
  display: grid; gap: 0.35rem; margin-bottom: 1.1rem;
  grid-template-areas: "h" "p" "m";
}
@media (min-width: 48em) {
  .home-sec__head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "h m" "p p";
    align-items: baseline; column-gap: 1.5rem;
  }
}
.home-sec__head h2 { grid-area: h; font-size: clamp(1.3rem, 4.5vw, 1.75rem); }
.home-sec__head p { grid-area: p; color: var(--muted); font-size: 0.9375rem; max-width: 46rem; }
.home-sec__more { grid-area: m; justify-self: start; }
@media (min-width: 48em) { .home-sec__more { justify-self: end; } }
.home-sec__more {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: var(--tap);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.home-sec__more::after { content: "→"; }

.deck { list-style: none; padding: 0; display: grid; gap: 0.85rem; }
@media (min-width: 36em) { .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62em) { .deck { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.deck .card { padding: 1rem; }

/* ------------------------------------------------------------ indexes */
.index-count { color: var(--muted); font-size: 0.9375rem; margin-top: 0.75rem; }
.glossary-group { margin-top: 2.25rem; }
.glossary-group > h2 { font-size: 1.35rem; margin-bottom: 0.85rem; }
.glossary-group > h2 a {
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.glossary-group > h2 a:hover { color: var(--brass); }

.az { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1.25rem; }
.az a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); border-radius: 0.5rem;
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; font-weight: 600; font-size: 0.9375rem;
}
.az a:hover { border-color: var(--brass); }

.deflist { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
@media (min-width: 48em) { .deflist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.deflist a {
  display: block; padding: 0.7rem 0.9rem; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: 0.65rem; background: var(--surface);
  text-decoration: none; color: var(--ink); min-width: 0;
}
.deflist a:hover { border-color: var(--brass); }
.deflist strong { display: block; font-weight: 650; }
.deflist span { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; margin-top: 0.15rem; }

.diagram-grid { display: grid; gap: 1.75rem; margin-top: 2rem; }
@media (min-width: 52em) { .diagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.diagram-item { min-width: 0; }
.diagram-item .figure { margin-block: 0; max-width: 100%; }
.diagram-item__used { font-size: 0.8125rem; color: var(--muted); margin-top: 0.6rem; }

/* ------------------------------------------------------- search page */
#search-form, #search-status, #search-results { max-width: 46rem; }
.result-item {
  border-bottom: 1px solid var(--line); padding-block: 1rem; min-width: 0;
}
.result-item:first-child { padding-top: 0.25rem; }
.result-item__section {
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brass); font-weight: 700;
}
.result-item h2 { font-size: 1.1rem; margin-top: 0.2rem; }
.result-item h2 a { color: var(--ink); text-decoration: none; }
.result-item h2 a:hover { color: var(--brass); text-decoration: underline; }
.result-item p { color: var(--muted); font-size: 0.9375rem; margin-top: 0.25rem; overflow-wrap: break-word; }
.result-item mark { background: var(--brass-soft); color: var(--ink); padding: 0 0.12em; border-radius: 2px; }
#search-status { color: var(--muted); font-size: 0.9375rem; margin-block: 1rem 0.5rem; }

/* ------------------------------------------------------------- footer */
.site-foot {
  margin-top: auto; border-top: 1px solid var(--line);
  background: var(--surface); padding-block: 2.25rem 1.5rem;
}
.foot__cols { display: grid; gap: 1.75rem; }
@media (min-width: 40em) { .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot__col h2 {
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-family: var(--ff-text); font-weight: 700; margin-bottom: 0.35rem;
}
.foot__col ul { list-style: none; padding: 0; }
.foot__col a {
  display: flex; align-items: center; min-height: var(--tap);
  color: var(--ink-2); text-decoration: none; font-size: 0.9375rem;
}
.foot__col a:hover { color: var(--brass); text-decoration: underline; }
.foot__base { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.foot__meta { font-size: 0.875rem; color: var(--muted); max-width: 48rem; line-height: 1.55; }
.foot__legal { font-size: 0.8125rem; color: var(--muted); margin-top: 0.9rem; }
.foot__legal a { color: var(--muted); }
.foot__legal a:hover { color: var(--brass); }

/* print */
@media print {
  .site-head, .site-foot, .pager, .related, .toc, .toc-inline, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article__grid { display: block; }
}

/* --------------------------------------------------------- hub intros */
.hub-intro { margin-block: 1.5rem 2rem; }
.hub-intro .prose { max-width: var(--measure); }
.hub-intro .prose > * + * { margin-top: 0.9rem; }
.hub-intro p { font-size: 1.0625rem; color: var(--ink-2); }

.hub-jump {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1rem 1.1rem; margin-block: 1.75rem;
}
.hub-jump h2 {
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-family: var(--ff-text); font-weight: 700; margin-bottom: 0.6rem;
}
.hub-jump ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hub-jump a {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: var(--tap);
  padding: 0.25rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--paper);
  color: var(--ink-2); text-decoration: none; font-size: 0.875rem; font-weight: 500;
}
.hub-jump a:hover { border-color: var(--brass); color: var(--brass-ink); }
.hub-jump a span {
  font-variant-numeric: tabular-nums; font-size: 0.75rem;
  color: var(--muted); background: var(--surface-2);
  padding: 0.05rem 0.4rem; border-radius: 999px;
}
.related__note { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.75rem; margin-top: -0.4rem; }
