/* Every token this site uses, once. Until 2026-09-15 these nineteen were
   copy-pasted into all eight templates, which is why the palette could not be
   retuned in one edit. See docs/superpowers/specs/2026-09-15-website-redesign-design.md.

   Light is the default. Dark is selected -- its own steps, validated against
   its own surface, not an automatic inversion. */
:root {
  color-scheme: light dark;
  --bg: #fcfcfb; --bg-secondary: #ffffff; --bg-hover: #f4f3f0; --bg-deep: #f0efec;
  --border: #e3e2de; --text: #1b1b1a; --text-bright: #000000; --text-muted: #5d5d59;
  --text-dim: #8a8a85; --accent: #0b5cad; --on-accent: #ffffff; --accent-blue: #1a6fc4;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b; --overlay: rgba(0,0,0,0.04);
  /* THE SERIES HUE, for chart marks only, and deliberately not --good/--warn/
     --crit: those four mean STATE everywhere on this site, and a chart that
     borrowed one would read as a verdict about the thing it drew. It equals
     --accent here and does NOT in dark mode -- see the dark block -- because a
     data mark and a link have different jobs against their surface. Both steps
     were run through the lightness/chroma/contrast checks, not eyeballed:
     #0b5cad is OKLCH L 0.47, inside the 0.43-0.77 light band, >= 3:1 on #fcfcfb. */
  --series: #0b5cad;
  /* The verdict fill. 20% black measures 1.598:1 against --bg, matching what
     16% white achieves on the dark surface (1.627:1). A lighter value was
     measured at 1.173:1, against 1.139:1 for a fill already proven invisible
     at chip size. Do not adjust this by eye. */
  --fill: rgba(0, 0, 0, 0.20);
  --radius: 6px; --radius-sm: 4px;
  --mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a; --bg-secondary: #1f1f23; --bg-hover: #26262b; --bg-deep: #101013;
    --border: #33333a; --text: #e8e8e4; --text-bright: #ffffff; --text-muted: #a8a8a2;
    --text-dim: #7a7a75; --accent: #4fc3f7; --on-accent: #0a1929; --accent-blue: #81d4fa;
    --good: #22a532; --warn: #ffc94d; --crit: #ef5350; --overlay: rgba(255,255,255,0.05);
    /* NOT --accent, which is #4fc3f7 at OKLCH L 0.773 -- above the 0.48-0.67
       band a mark needs on this surface, so it glares as a fill and washes out
       as a hairline. #2e9ad9 is L 0.64 and clears 3:1 on #17171a. Dark mode is
       chosen from the ramp, never an automatic flip of the light value. */
    --series: #2e9ad9;
    --fill: rgba(255, 255, 255, 0.16);
  }
}

/* ---------------------------------------------------------------------------
   Shared layout and typography, moved out of the four docs templates on
   2026-09-15. All four carried this rule for rule identical, which is the
   same problem the tokens above solved: eight copies could not be retinted,
   or in this case relaid out, in one edit. The header, nav and footer
   selectors below are new -- base.html's <nav> of four links and its
   unclassed <footer> replaced each page's own two-link header and
   .site-foot -- everything else is unchanged from what the docs pages
   carried. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
header { display: flex; align-items: center; gap: 12px; padding: 14px 24px;
         background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
/* A link on every page, including the index, so the way home is always
   in the same place. Undecorated because it is a mark rather than a
   phrase in a sentence. */
.logo { display: flex; align-items: center; gap: 9px; font-weight: 600;
        color: var(--text-bright); text-decoration: none; }
.logo:hover { color: var(--accent); }
/* The four-link nav, pushed to the header's far edge the way the single
   .run link used to be. aria-current marks the section a page belongs to;
   see base.html and _nav_context's `here`. */
header nav { margin-left: auto; display: flex; gap: 4px 18px; }
header nav a { color: var(--text-muted); font-size: 13px; font-weight: 500; }
header nav a:hover { color: var(--accent); }
header nav a[aria-current="page"] { color: var(--text-bright); }
/* Narrower than the index's 1120px, because this page is prose and the
   index is a table: a 1120px measure is a hard line to read a paragraph
   across. */
main { padding: 22px 24px; max-width: 780px; }
h1 { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--text-bright);
     letter-spacing: -0.01em; }
h2 { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase;
     letter-spacing: 0.05em; margin: 0 0 12px; }
p { margin: 0 0 11px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 15px; color: var(--text-bright); }
section + section { margin-top: 22px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius);
         background: var(--bg-secondary); padding: 14px 16px; }
code, .ua { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.ua { display: block; padding: 8px 10px; margin: 0 0 11px;
      background: var(--bg-deep); border: 1px solid var(--border);
      border-radius: var(--radius-sm); color: var(--text-bright); }
ul.facts { list-style: none; margin: 0; padding: 0; }
ul.facts > li { padding: 8px 0; border-bottom: 1px solid var(--border); }
ul.facts > li:first-child { border-top: 1px solid var(--border); }
ul.facts > li:last-child { border-bottom: none; }
ul.facts b { color: var(--text-bright); font-variant-numeric: tabular-nums; }
.limit { color: var(--text-muted); }
.limit b { color: var(--text); }
ul.plain { margin: 0; padding-left: 20px; color: var(--text-muted); }
ul.plain li { margin: 3px 0; }
.contact { font-family: var(--mono); font-size: 14px; }
/* A sentence about a bound on what this page promises, in the same token
   the index and the endpoint page use for the same kind of claim. It reads
   identically with no styling at all. */
.warn-note { color: var(--warn); }

/* explore.html's search input carried its own `outline: none` on :focus,
   which this rule replaces rather than repeats: a suppressed outline with
   nothing standing in for it fails a keyboard user silently. One rule for
   the whole site, so a page cannot reintroduce the outline: none without
   reintroducing the ring beside it.

   `input` and not `input[type="search"]`: the element this replaces
   (explore.html's #q) is `type="text"` -- it does its own filtering rather
   than using the browser's native search semantics -- so a selector scoped
   to type="search" would silently never match the one input this rule
   exists for. */
input:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The column and the rail: measurements on the left, a sticky strip of
   identity facts and the legend on the right. First used by the endpoint
   page on 2026-09-16 -- see endpoint.html's own head_extra for what actually
   goes in the rail, which is page-specific; this is only the box and the
   grid that lays it out, so the next page that wants one does not repeat it. */
.page-body { display: grid; grid-template-columns: minmax(0, 1fr) 258px; gap: 26px;
             align-items: start; }
.rail { border: 1px solid var(--border); border-radius: var(--radius);
        background: var(--bg-secondary); padding: 14px 15px; position: sticky; top: 12px; }
@media (max-width: 900px) {
  /* The rail drops below the column rather than beside it, legend last --
     which is the order it is already written in, so nothing reorders.

     minmax(0, 1fr) AND NOT 1fr, which is the same fix the wide rule above
     already carries. A bare `1fr` means minmax(auto, 1fr), and that `auto`
     floors the track at its content's min-content width, so a wide child stops
     being able to shrink and stretches the grid instead. Measured at 390px
     with the metrics table in place: the column went to 507px and took 131px
     of body overflow with it, and the table's own overflow-x never engaged
     because it had been handed 507px to fill. The note below this block --
     "a table added later should scroll rather than push the page" -- is the
     intent; this is what makes it true on a phone. */
  .page-body { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
}

/* ---- NARROW SCREENS ---------------------------------------------------
   These pages already fit at 375px; the padding still costs an eighth of the
   screen, and a table added later should scroll rather than push the page. */
@media (max-width: 640px) {
  header { padding: 10px 14px; gap: 4px 10px; flex-wrap: wrap; }
  /* Standalone nav links are tap targets, unlike links inside a
     sentence: WCAG 2.2's 24px floor applies and they were 15px tall. */
  header a { min-height: 24px; display: inline-flex; align-items: center; }
  main { padding: 16px 14px; }
  h1 { font-size: 19px; line-height: 1.25; }
  table { display: block; overflow-x: auto; max-width: 100%; }
  /* Only 2px over at 375px on /about, and it was .contact: a monospace URL
     with no spaces is one unbreakable word. */
  .contact, .contact a { overflow-wrap: anywhere; }
}

/* The documentation section's own nav, on each of its pages. Muted and small:
   it sits under an h1 that already says where you are, so it is a way out
   rather than a heading. The current page is a <span> and not a link, drawn in
   the text colour so it reads as the one you are on. */
.subnav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 18px;
          font-size: 12.5px; }
.subnav a { color: var(--text-muted); }
.subnav a:hover { color: var(--accent); }
.subnav [aria-current="page"] { color: var(--text-bright); font-weight: 600; }

/* The footer. One line, and the version is the reason it exists: a reader
   looking at a verdict needs to know which build produced it, and an
   operator who found sparqlwatch in their logs needs to match the number
   against the User-Agent that knocked. `version` is a Jinja global, so it is
   the same string the /about page quotes. The footer carried two links --
   docs and VoID -- until 2026-09-17; `footer a` is kept because the rule is
   one line and the footer is the one place on the page where a link must read
   as muted rather than as the accent. */
footer { border-top: 1px solid var(--border); margin: 30px 0 0;
         padding: 14px 24px; display: flex; flex-wrap: wrap;
         gap: 6px 14px; align-items: baseline;
         font-size: 12px; color: var(--text-muted); }
footer .version { font-family: var(--mono); }
footer a { color: var(--text-muted); }
/* The one link the footer carries again since 2026-10-09. `margin-left: auto`
   puts it at the far edge the way `header nav` sits, so the build label stays
   the left-hand anchor and the row keeps its two ends. The icon needs its own
   `center` because the footer aligns on the baseline, which a 15px glyph with
   no text beside it has no sensible one of. */
footer .source { margin-left: auto; display: flex; align-items: center; }
footer .source:hover { color: var(--accent); }
@media (max-width: 640px) { footer { padding: 12px 14px; } }


/* Generated from web/verdict_encoding.py. */
  .enc-verified { border: 1px solid var(--good); background: var(--fill); }
  .enc-undeclared-but-verified { border: 1px dashed var(--good); background: var(--fill); }
  .enc-declared-only { border: 1px solid var(--text-muted); background: transparent; }
  .enc-declared-but-wrong { border: 2px solid var(--crit); background: var(--fill); }
  .enc-absent { border: 1px solid transparent; background: transparent; }
  .enc-indeterminate { border: 1px dashed var(--warn); background: transparent; }
  .enc-not-measured { border: 1px dotted var(--text-dim); background: transparent; }
  .enc-unrecognised { border: 3px double var(--accent); background: transparent; }
  .enc-text-verified { color: var(--good); }
  .enc-text-undeclared-but-verified { color: var(--good); }
  .enc-text-declared-only { color: var(--text-muted); }
  .enc-text-declared-but-wrong { color: var(--crit); }
  .enc-text-absent { color: var(--text-dim); }
  .enc-text-indeterminate { color: var(--warn); }
  .enc-text-not-measured { color: var(--text-dim); }
  .enc-text-unrecognised { color: var(--accent); }
