/* bareflow's tokens: every color, type, and space value the site uses is defined here.
   Grayscale, with one hue: --mark, a ground under --mark-ink for a loss only (a page with no loss
   shows no --mark), never a text color and never alone.
   Themes: the system's by default; data-theme on <html> overrides it. The two dark blocks are one
   palette written twice (verify fails if they differ).
   verify enforces: no color literal outside this file; no box-shadow, gradient, or text-shadow;
   no border-radius over 2px; no text in --mark; every text pair at 4.5:1 or more in both themes.
   --rule and --tape-edge are decoration; a control's edge uses --ink-2 (3:1 non-text).
   Fonts are self-hosted from /_app/fonts (site/fonts: SOURCE, OFL.txt). Each has a local fallback
   face whose overrides come from scripts/font-metrics.js, so the swap does not move the text. */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/_app/fonts/literata-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/_app/fonts/literata-latin-wght-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/_app/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Literata Fallback"; font-style: normal; src: local("Georgia");
  size-adjust: 108.31%; ascent-override: 108.67%; descent-override: 28.44%; line-gap-override: 0%; }
@font-face { font-family: "Literata Fallback"; font-style: italic; src: local("Georgia Italic");
  size-adjust: 99.41%; ascent-override: 118.40%; descent-override: 30.98%; line-gap-override: 0%; }
@font-face { font-family: "Mono Fallback"; src: local("Menlo Regular"), local("Menlo-Regular"), local("DejaVu Sans Mono");
  size-adjust: 104.97%; ascent-override: 93.74%; descent-override: 30.10%; line-gap-override: 0%; }
:root {
  --paper: #ffffff; --ink: #15171a; --ink-2: #5b6067; --rule: #e3e5e8; --code-wash: #f3f4f6;
  --tape: #15171a; --tape-ink: #f4f5f6; --tape-ink-2: #9aa0a6; --tape-edge: #15171a; --mark: #ffe14d; --mark-ink: #15171a;
  --focus: #15171a; --w-text: 400;
  --serif: "Literata", "Literata Fallback", Georgia, serif;
  --mono: "Atkinson Hyperlegible Mono", "Mono Fallback", ui-monospace, Menlo, Consolas, monospace;
  --t-small: 0.8125rem; --t-body: 1.0625rem; --lh-body: 1.55;
  --t-title: 1.75rem; --t-h2: 1.375rem; --t-h3: 1.125rem; --t-h4: 1rem;
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 1rem; --s-4: 2rem;
  --measure: 66ch; --radius: 2px;
  color-scheme: light dark;
}
@media (min-width: 40rem) {
  :root { --t-body: 1.125rem; --lh-body: 1.6; --t-title: 2.25rem; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111315; --ink: #e6e7e9; --ink-2: #9aa0a6; --rule: #2a2d31; --code-wash: #1a1c1f;
    --tape: #2b2e33; --tape-ink: #f1f2f3; --tape-ink-2: #a9aeb4; --tape-edge: #3a3e44; --mark: #e8c547; --mark-ink: #111315;
    --focus: #e6e7e9; --w-text: 380;
  }
}
:root[data-theme="dark"] {
  --paper: #111315; --ink: #e6e7e9; --ink-2: #9aa0a6; --rule: #2a2d31; --code-wash: #1a1c1f;
  --tape: #2b2e33; --tape-ink: #f1f2f3; --tape-ink-2: #a9aeb4; --tape-edge: #3a3e44; --mark: #e8c547; --mark-ink: #111315;
  --focus: #e6e7e9; --w-text: 380;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* Values come from tokens.css (the build puts it first in _app/style.css). */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* rules that set display would otherwise show hidden elements */
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--w-text) var(--t-body)/var(--lh-body) var(--serif); }
#pointer, #landing, #challenge { max-width: 64rem; margin: 0 auto; padding: var(--s-3); }
#challenge:empty { display: none; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.name { font: 600 var(--t-body) var(--mono); text-decoration: none; }
h1 { font-size: var(--t-title); line-height: 1.15; letter-spacing: -0.01em; margin: var(--s-4) 0 var(--s-3); }
code, pre, input, textarea, button, label, summary { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--code-wash); padding: 0 0.2em; border-radius: var(--radius); }
label { display: block; margin: var(--s-3) 0 var(--s-1); color: var(--ink-2); font-size: var(--t-small); }
input, textarea { width: 100%; padding: var(--s-2); border: 1px solid var(--ink-2); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: var(--t-small); }
button { padding: var(--s-1) var(--s-2); border: 1px solid var(--ink-2); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: var(--t-small); cursor: pointer; }
button:hover { background: var(--code-wash); }
.row { display: flex; gap: var(--s-2); }
/* The home: the claim, the door, the example, then why and how. Serif is the page's words (the
   example, the quotes in why) and the slogan; everything else bareflow says is Mono. */
.lede, .why p, .use p { font: 1rem/1.6 var(--mono); }
.lede { max-width: var(--measure); }
.why blockquote { margin: var(--s-2) 0 var(--s-3) var(--s-3); }
.try { margin: var(--s-2) 0 0; font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); }
.try a { color: var(--ink); }
.why, .use { max-width: var(--measure); }
.why h2, .use h2 { font: 600 var(--t-small)/1.5 var(--mono); color: var(--ink-2); margin: var(--s-4) 0 var(--s-2); }
.use-where { font-weight: 600; }
@media (max-width: 39.99rem) { .desktop { display: none; } }
#paste-form button { margin-top: var(--s-3); }
.bookmarklet { padding: 0 var(--s-2); border: 1px dashed var(--ink-2); border-radius: var(--radius); font-family: var(--mono); font-size: var(--t-small); }
details { margin: var(--s-3) 0; }
summary { cursor: pointer; font-size: var(--t-small); color: var(--ink-2); }
#pointer, .note { font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); max-width: 64rem; margin: 0 auto; padding: var(--s-4) var(--s-3); font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot .name { font: inherit; font-weight: 600; }
.foot button { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.foot button:hover { background: none; color: var(--ink); }

/* The tape: where bareflow speaks, at every scroll position, the same at every width. Line 1: the
   wordmark, the count (or a message), more/less beside it. Line 2: the origin; only the host
   scrolls, and it shows its end (no ellipsis, no hidden overflow). more/less shows or hides line 3. */
.tape, .exhibit-tape { padding: var(--s-2) var(--s-3); background: var(--tape); color: var(--tape-ink);
  border-bottom: 1px solid var(--tape-edge); font: var(--t-small)/1.5 var(--mono); }
.tape { position: sticky; top: 0; z-index: 1; }
.tape-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); }
#status { min-width: 0; overflow-wrap: anywhere; color: var(--tape-ink-2); }
:is(.tape, .exhibit-tape) .chip, #fold { white-space: nowrap; }
.tape-from { display: flex; margin: 0; color: var(--tape-ink-2); white-space: pre; }
.tape-from > #origin { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tape a, .tape summary, .tape button { color: var(--tape-ink); font: inherit; }
.tape :focus-visible { outline-color: var(--tape-ink); }
:is(.tape, .exhibit-tape) .name { font-weight: 600; }
.tape button { padding: 0; border: 0; background: none; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.tape button:hover { background: none; }
:is(.tape, .exhibit-tape) .chip { padding: 0 var(--s-1); border: 1px solid transparent; border-radius: var(--radius); background: var(--mark); color: var(--mark-ink); font-weight: 600; text-decoration: none; }
#result[data-failed] #status { color: var(--tape-ink); }
#status .detail { display: block; color: var(--tape-ink-2); }
#contents { margin: 0; }
#contents[open] { flex-basis: 100%; }
#contents ol { margin: var(--s-1) 0 var(--s-1); padding-left: 2.5em; max-height: 60vh; overflow: auto; }
.tape-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); margin-top: var(--s-1); }
html { scroll-padding-top: calc(var(--tape-h, 0px) + var(--s-2)); }

/* The page's voice: its words in the page face and ink, never colored; links underlined in ink. */
/* One column for page and colophon; the measure is in the page face's ch, so it sits on #view. */
#view { max-width: calc(var(--measure) + 2 * var(--s-3)); margin: 0 auto; padding: 0 var(--s-3) var(--s-4); }
.frame, .source, .colophon { min-width: 0; }
.page { overflow-wrap: break-word; }
.page h1 { margin-top: var(--s-4); }
.page h2 { font-size: var(--t-h2); margin: var(--s-4) 0 var(--s-2); }
.page h3 { font-size: var(--t-h3); margin: var(--s-3) 0 var(--s-2); }
.page h4, .page h5, .page h6 { font-size: var(--t-h4); margin: var(--s-3) 0 var(--s-2); }
.page :is(h1, h2, h3, h4, h5, h6) { font-weight: 600; }
.page blockquote { margin: var(--s-3) 0 var(--s-3) var(--s-4); }
.page li::marker { color: var(--ink-2); }
.page figure { margin: var(--s-3) 0; }
.page figcaption { font: var(--t-small) var(--mono); color: var(--ink-2); }
pre { background: var(--code-wash); padding: var(--s-3); border-radius: var(--radius); overflow-x: auto; font-size: var(--t-small); line-height: 1.5; }
pre code { background: none; padding: 0; font-size: inherit; }
/* Code is never soft-wrapped: it scrolls in its block. */
.page pre { margin: 0; font-size: 0.875em; }
.source { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: var(--s-4); }
.table-scroll { margin: var(--s-3) 0; overflow-x: auto; }
.page table { border-collapse: collapse; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.page th, .page td { padding: var(--s-1) var(--s-2); text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.page th { border-bottom-color: var(--ink-2); }
/* Phone: code and tables bleed to the screen's edges; inline code breaks anywhere. */
@media (max-width: 39.99rem) {
  .page pre, .table-scroll { margin-inline: calc(-1 * var(--s-3)); border-radius: 0; }
  .table-scroll { padding-inline: var(--s-3); }
  .page :not(pre) > code { overflow-wrap: anywhere; }
}
/* Wide: a wide code block or table breaks out to the right, up to 56rem; the text keeps its measure. */
@media (min-width: 76rem) {
  .page pre, .table-scroll { width: max-content; min-width: 100%; max-width: 56rem; }
}
/* Images are links, never loads: a figure between hairlines, where it came from over what it shows. */
.page figure.image { margin: var(--s-3) 0; padding: var(--s-2) 0; border-block: 1px solid var(--rule); }
.image > a, .image > .link-refused { display: block; color: var(--ink); text-decoration: none; }
.image > a .image-alt { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; } /* links are underlined; the host line is not */
.image-host { display: block; font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.image-alt { overflow-wrap: anywhere; }
.image-tag { font: var(--t-small) var(--mono); color: var(--ink-2); }

/* The margin contents, from 56rem: sticky under the tape; the column stays centered while the
   margin holds the list, and moves right when it does not. */
.toc { font: var(--t-small)/1.5 var(--mono); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 var(--s-1); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc a[aria-current] { color: var(--ink); font-weight: 600; }
@media (max-width: 55.99rem) { #toc { display: none; } }
@media (min-width: 56rem) {
  #contents { display: none; }
  #view:has(> #toc:not([hidden])) { display: grid; max-width: none; grid-template-columns: minmax(13rem, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--s-4); align-items: start; }
  #view:has(> #toc:not([hidden])) > :not(#toc) { grid-column: 2; }
  #toc { grid-column: 1; grid-row: 1 / span 3; justify-self: end; width: 13rem; position: sticky; top: calc(var(--tape-h, 0px) + var(--s-3)); max-height: calc(100vh - var(--tape-h, 0px) - 2 * var(--s-3) - var(--s-4)); overflow-y: auto; } /* --s-4: #view's bottom padding, or the list rides up at the end */
}

/* The colophon: after the page, folded; bareflow's account of this copy for whoever opens it. */
.colophon { margin: var(--s-4) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--rule); font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); }
.colophon > summary { font-weight: 600; color: var(--ink); }
.colophon h2 { font: 600 var(--t-small)/1.5 var(--mono); color: var(--ink); margin: var(--s-3) 0 var(--s-2); }
.caption { margin: var(--s-3) 0 var(--s-1); }
.header { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
/* The fingerprint: 64 bars, one per bit of the header's hex, drawn in ink; 0 is an empty cell. */
.bars { display: flex; height: 1.5rem; }
.bars > span { flex: 0 0 3px; }
.bars > .on { background: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; margin: var(--s-3) 0; }
#mode[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.losses { list-style: none; margin: 0; padding: 0; }
.losses li { margin: 0 0 var(--s-2); }
.losses p { margin: 0; overflow-wrap: anywhere; }
.loss-n { padding: 0 var(--s-1); border: 1px solid transparent; border-radius: var(--radius); background: var(--mark); color: var(--mark-ink); font-weight: 600; }
.losses details { margin: var(--s-1) 0 0; }
.losses pre { background: var(--code-wash); color: var(--ink); max-height: 16rem; overflow: auto; }

/* The home's example: a still copy of the view in a box edged in ink-2, the tape without controls.
   Inside it bareflow says only what the excerpt leaves out, never in the loss hue. */
.example > h2 { font: 600 var(--t-small)/1.5 var(--mono); color: var(--ink-2); margin: var(--s-4) 0 var(--s-2); }
.exhibit { max-width: calc(var(--measure) + 2 * var(--s-3) + 2px); margin: 0; padding-bottom: var(--s-3); border: 1px solid var(--ink-2); border-radius: var(--radius); }
.exhibit-part { padding: 0 var(--s-3); }
.exhibit-tape p { margin: 0; }
.elision, .exhibit > figcaption, .exhibit .losses { font: var(--t-small)/1.5 var(--mono); color: var(--ink-2); }
.exhibit .page { max-width: var(--measure); }
.exhibit .page h1 { margin-top: var(--s-2); }
.exhibit > figcaption { margin-top: var(--s-3); padding: var(--s-3) var(--s-3) 0; border-top: 1px solid var(--rule); }

/* The privacy page: bareflow's words only, so Mono throughout, at the home's lede size. */
#privacy { max-width: 64rem; margin: 0 auto; padding: var(--s-3); }
#privacy h1 { font: 600 var(--t-body)/1.5 var(--mono); margin: var(--s-4) 0 var(--s-2); }
#privacy ul { max-width: var(--measure); margin: 0; padding-left: 1.25em; font: 1rem/1.6 var(--mono); }
#privacy li + li { margin-top: var(--s-3); }
#privacy li::marker { color: var(--ink-2); }
