/* Reference pages. Same tokens as the app in index.html, deliberately not the
   same file: the app's CSS is inline because it is one document that must paint
   in one round trip, and these are forty documents a reader moves between, so
   here a cached stylesheet is the cheaper shape.

   The app's motif carries over — the dot is the atom of the subject, domains
   are monospaced with tabular figures, and the one saturated hue is reserved
   for a confirmed fact. */

:root {
  color-scheme: light dark;
  --paper: #fbfbfd;
  --raised: #ffffff;
  --ink: #14161b;
  --ink-soft: #5b6270;
  --ink-faint: #9aa1ae;
  --rule: #e5e7ec;
  --rule-firm: #d2d6de;
  --free: #0a8f5b;
  --free-soft: #e6f5ee;
  --maybe: #a76200;
  --maybe-soft: #fbf1e2;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0f13;
    --raised: #14171d;
    --ink: #e8eaef;
    --ink-soft: #9aa2b1;
    --ink-faint: #5f6774;
    --rule: #22262e;
    --rule-firm: #2f343e;
    --free: #35c98a;
    --free-soft: #0e2b21;
    --maybe: #dfa03f;
    --maybe-soft: #2c2113;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--free); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-style: solid; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .9rem clamp(1rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
  background: var(--raised);
}

.wordmark {
  font: 600 1.05rem/1 var(--sans);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--free); }

.bar nav { display: flex; gap: 1.25rem; font-size: .9rem; }
.bar nav a { color: var(--ink-soft); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 5vw, 3rem) 4rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.05rem;
  letter-spacing: -.01em;
  margin: 2.5rem 0 .6rem;
}

.lede { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 2rem; }

code, pre, .num, td:has(> code) { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .9em; }

pre {
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  overflow-x: auto;
  font-size: .85rem;
}

/* A requirement that turns a buyer away is bordered and titled. One that never
   refuses anyone is not — see the rendering hierarchy in CLAUDE.md. */
.rule {
  border: 1px solid var(--rule-firm);
  border-radius: var(--radius);
  background: var(--raised);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.rule h2 { margin: 0 0 .4rem; font-size: .95rem; }
.rule p { margin: 0 0 .5rem; }
.rule p:last-child { margin-bottom: 0; }
.rule.refuses { border-left: 3px solid var(--maybe); background: var(--maybe-soft); }
.rule.note { border: 1px solid var(--rule); background: transparent; }

.aside { color: var(--ink-faint); font-size: .875rem; }

.check { margin: 2rem 0; }
.check label { display: block; font-size: .875rem; color: var(--ink-soft); margin-bottom: .4rem; }
.check .row { display: flex; gap: .5rem; }
.check input {
  flex: 1;
  min-width: 0;
  font: 1rem/1 var(--mono);
  padding: .7rem .8rem;
  color: var(--ink);
  background: var(--raised);
  border: 1px solid var(--rule-firm);
  border-radius: var(--radius);
}
.check input:focus { outline: 2px solid var(--free); outline-offset: 1px; }
.check button {
  font: 600 .95rem/1 var(--sans);
  padding: .7rem 1.1rem;
  color: #fff;
  background: var(--free);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
tr.total th, tr.total td { font-weight: 600; border-bottom: 0; }

/* Wide content scrolls in its own box; the page body never does.
   The overflow belongs to a wrapper, never to the table. `display: block` on a
   <table> drops it out of table layout altogether — columns stop aligning and
   the rows stack — which is what this rule used to do, because `.catalogue` is
   the table itself and `.catalogue table` matched nothing. */
.scroll { overflow-x: auto; margin: 1rem 0; }
.scroll table { min-width: 100%; }

.kind {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .1rem .45rem;
  border-radius: 5px;
  background: var(--maybe-soft);
  color: var(--maybe);
  white-space: nowrap;
}
.kind.quiet { background: var(--rule); color: var(--ink-soft); }

.flag { font-size: .78rem; color: var(--maybe); white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .75rem 0 1.25rem; list-style: none; }
.chips a {
  display: inline-block;
  font: .85rem/1 var(--mono);
  padding: .4rem .55rem;
  border: 1px solid var(--rule-firm);
  border-radius: 6px;
  background: var(--raised);
  text-decoration: none;
  color: var(--ink-soft);
}
.chips a:hover { color: var(--free); border-color: var(--free); }

footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem clamp(1rem, 5vw, 3rem) 3rem;
  color: var(--ink-faint);
  font-size: .85rem;
}
footer p { max-width: 46rem; margin: 0 auto .6rem; }

/* The visible trail the BreadcrumbList in the structured data describes. */
.trail ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .8rem;
  color: var(--ink-faint);
}
.trail li + li::before { content: "/"; margin-right: .35rem; color: var(--rule-firm); }
.trail a { color: var(--ink-soft); text-decoration: none; }
.trail a:hover { color: var(--free); }
