/* Certo's public pages (SCRUM-180). Tokens and status chips follow docs/design/landing/checker.html
   and docs/design/web-app/statuses.html (SCRUM-136, SCRUM-137). No web fonts, no scripts. */
:root {
  --paper: #f6f7f5; --sheet: #ffffff; --ink: #16191f; --ink-2: #4a5160; --rule: #d9dde3;
  --accent: #1f3f8f; --accent-ink: #ffffff; --accent-soft: #e6ecf8;
  --ok: #1b6634; --ok-bg: #e5f3ea; --mm: #8a4a00; --mm-bg: #fff0d9; --qnf: #a2341a; --qnf-bg: #fce9e2;
  --dne: #991b1b; --dne-fg: #ffffff; --nc: #3d4d68; --tint: #e9edf2;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px; --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111419; --sheet: #191d24; --ink: #e8eaee; --ink-2: #a7aebb; --rule: #2d333d;
    --accent: #8fb0ff; --accent-ink: #0d1530; --accent-soft: #1c2742;
    --ok: #82d39c; --ok-bg: #142a1c; --mm: #f1bd6c; --mm-bg: #2e2212; --qnf: #f49c82; --qnf-bg: #311b14;
    --dne: #ff9a9a; --dne-fg: #2a0d0d; --nc: #b0c0dc; --tint: #222833;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--font-body); overflow-wrap: anywhere; }
.wrap { max-width: 52rem; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
code, .cite { font-family: var(--font-mono); font-size: 0.92em; }
.cite { white-space: normal; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sheet); padding: 8px 12px; }
.skip:focus { left: var(--gutter); }

header.site { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.bar { display: flex; align-items: baseline; gap: 12px; min-height: 52px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { font: 700 1.35rem/1 var(--font-display); color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.tag { color: var(--ink-2); font-size: 0.9rem; }
.beta { background: var(--mm-bg); color: var(--ink); border-bottom: 1px solid var(--mm); font-size: 0.9rem; padding: 0.5rem 0; }
main { padding-top: 1.5rem; padding-bottom: 2.5rem; }
footer.site { border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.85rem; padding: 1.25rem 0 2rem; }
footer.site p { margin: 0.35rem 0; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--ink-2); margin: 0; font-weight: 600; }
.lede { font-size: 1.08rem; max-width: 40rem; }
.message, .notice { border-left: 3px solid var(--accent); padding: 0.5rem 0.75rem; background: var(--accent-soft); }
.help, .meta, .fresh, .where { color: var(--ink-2); font-size: 0.88rem; }

form.lookup { margin: 1rem 0 1.5rem; }
form.lookup label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
form.lookup .row { display: flex; gap: 8px; flex-wrap: wrap; }
form.lookup input { flex: 1 1 16rem; min-width: 0; min-height: 48px; padding: 0.5rem 0.75rem; font: 1rem var(--font-mono);
  color: var(--ink); background: var(--sheet); border: 1.5px solid var(--rule); border-radius: var(--radius); }
form.lookup button, a.button { min-height: 48px; padding: 0.55rem 1.2rem; font: 600 1rem var(--font-body); color: var(--accent-ink);
  background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
/* The quote finder (SCRUM-182): a passage box, then the optional citation row. */
form.quote textarea { display: block; width: 100%; box-sizing: border-box; min-height: 9rem; padding: 0.6rem 0.75rem; font: 1rem/1.5 var(--font-display);
  color: var(--ink); background: var(--sheet); border: 1.5px solid var(--rule); border-radius: var(--radius); resize: vertical; }
form.quote textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
form.quote label[for="cite"] { margin-top: 0.75rem; }
.you .words { font-family: var(--font-display); overflow-wrap: anywhere; }
.closest { margin: 1rem 0; padding: 0.5rem 0.75rem; border: 1.5px dashed var(--rule); border-radius: var(--radius); }
.closest blockquote, figure.para blockquote { overflow-wrap: anywhere; }
table.qdiff mark { background: var(--mm-bg); color: inherit; }

.explain ul, .list, .notes, .learned, .citing { padding-left: 1.2rem; }
.list li, .explain li { margin: 0.5rem 0; }
.list .meta { display: block; }

.result { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem var(--gutter) 1.25rem; }
.result.dashed { border: 1.5px dashed var(--rule); }
.result.strong { border: 2px solid var(--dne); }
.you { margin-top: 0; color: var(--ink-2); font-size: 0.9rem; }
.headline { font: 600 1.12rem/1.45 var(--font-display); margin: 0.75rem 0 0.4rem; }
.found { border-top: 1px solid var(--rule); margin-top: 1rem; }
.found h2 { margin-top: 1rem; }
dl.cites, dl.facts { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 0.35rem 1rem; margin: 0.75rem 0; }
dl.cites dt, dl.facts dt { font-weight: 600; color: var(--ink-2); }
dl.cites dd, dl.facts dd { margin: 0; }
@media (max-width: 520px) { dl.cites, dl.facts { grid-template-columns: minmax(0, 1fr); } dl.cites dd, dl.facts dd { margin-bottom: 0.4rem; } }
.learned { margin: 0; }
.citing li { margin: 0.3rem 0; overflow-wrap: anywhere; }
figure.para { margin: 1rem 0; }
figure.para figcaption { color: var(--ink-2); font-size: 0.85rem; }
blockquote { margin: 0.4rem 0 0; padding: 0.6rem 0.9rem; border-left: 3px solid var(--rule); font-family: var(--font-display); font-size: 1.02rem; }
table.mm { border-collapse: collapse; width: 100%; margin: 0.75rem 0; font-size: 0.92rem; }
table.mm caption { text-align: left; font-weight: 600; padding-bottom: 0.3rem; }
table.mm th, table.mm td { border: 1px solid var(--rule); padding: 0.4rem 0.5rem; text-align: left; vertical-align: top; }

/* Status chips (web app design §4.1): own icon, visible words, border style. */
.st { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 10px 2px 6px; font: 700 0.85rem/1.5 var(--font-body); }
.st svg { width: 16px; height: 16px; flex: none; }
.st-ok { color: var(--ok); background: var(--ok-bg); }
.st-fnq { color: var(--ok); background: transparent; }
.st-mm { color: var(--mm); background: var(--mm-bg); }
.st-qd { color: var(--mm); background: var(--mm-bg); }
.st-qnf { color: var(--qnf); background: var(--qnf-bg); }
.st-dne { color: var(--dne-fg); background: var(--dne); border-color: var(--dne); --icx: var(--dne); }
.st-nic, .st-cc, .st-cnr, .st-fnc { color: var(--nc); background: transparent; border-style: dashed; }

.cta { margin-top: 2rem; padding: 1rem var(--gutter); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--tint); }
.cta h2 { margin-top: 0.2rem; }

/* Judgment page: the Court's paragraph numbers in the margin. */
.judgment h1 { font-size: clamp(1.35rem, 4.2vw, 1.9rem); }
.paras .p { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.paras .p:target { background: var(--accent-soft); }
.paras .p:has(> .also:target) { background: var(--accent-soft); }
/* A paragraph's second id (SCRUM-463): out of the grid, at the paragraph's top. */
.paras .p { position: relative; }
.paras .p > .also { position: absolute; top: 0; left: 0; scroll-margin-top: 1rem; }
.pno { margin: 0; text-align: right; font: 600 0.95rem/1.7 var(--font-body); }
.pno a { text-decoration: none; display: inline-block; min-width: 44px; min-height: 44px; text-align: right; }
.ptext p { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.04rem; line-height: 1.65; white-space: pre-line; }
.ptext p.where { font-family: var(--font-body); font-size: 0.8rem; }
h3.opinion { margin-top: 1.5rem; }
@media (max-width: 420px) { .paras .p { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0 0.5rem; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
