/* 8.ro */

/* ---------- tokens ----------
   Light is the default; dark follows the system unless the visitor picked a
   theme (data-theme on <html>, set by the boot script before first paint).
   Text tokens are at least 4.5:1 on every surface they sit on; --field-line,
   the border of anything you type into or choose, is at least 3:1 (WCAG
   1.4.11). Hairlines (--line) only separate, they never identify a control. */
:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --line: #e4e4df;
  --line-2: #d4d4ce;
  --field-line: #8f8f88;
  --text: #18181a;
  --muted: #55555b;
  --faint: #66666c;
  --accent: #ea580c;
  --accent-ink: #b5420a;
  --accent-soft: #fdf0e6;
  --accent-line: #f3c3a0;
  --ink: #18181a;
  --on-ink: #ffffff;
  --ok: #10632f;
  --shadow: 0 1px 2px rgb(24 24 26 / .05);
  --shadow-lift: 0 1px 2px rgb(24 24 26 / .04), 0 12px 32px -16px rgb(24 24 26 / .22);
  --backdrop: rgb(18 18 20 / .42);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Segoe UI Mono", "JetBrains Mono", Menlo, Consolas, "Roboto Mono", "Liberation Mono", "DejaVu Sans Mono", monospace;
  --header-h: 60px;
  --r: 14px;
  --r-s: 9px;
  --gutter: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --line: #26262b;
  --line-2: #33333a;
  --field-line: #6f6f78;
  --text: #ededee;
  --muted: #b0b0b8;
  --faint: #9a9aa2;
  --accent: #f97316;
  --accent-ink: #ff9d5c;
  --accent-soft: rgb(249 115 22 / .13);
  --accent-line: rgb(249 115 22 / .42);
  --ink: #ededee;
  --on-ink: #111113;
  --ok: #4ade80;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-lift: 0 1px 2px rgb(0 0 0 / .4), 0 14px 36px -18px rgb(0 0 0 / .8);
  --backdrop: rgb(0 0 0 / .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0c0e;
    --surface: #141417;
    --surface-2: #1b1b1f;
    --line: #26262b;
    --line-2: #33333a;
    --field-line: #6f6f78;
    --text: #ededee;
    --muted: #b0b0b8;
    --faint: #9a9aa2;
    --accent: #f97316;
    --accent-ink: #ff9d5c;
    --accent-soft: rgb(249 115 22 / .13);
    --accent-line: rgb(249 115 22 / .42);
    --ink: #ededee;
    --on-ink: #111113;
    --ok: #4ade80;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-lift: 0 1px 2px rgb(0 0 0 / .4), 0 14px 36px -18px rgb(0 0 0 / .8);
    --backdrop: rgb(0 0 0 / .6);
  }
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, .mono { font-family: var(--mono); }
::selection { background: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: var(--r-s);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  font-size: .75rem; line-height: 1; color: var(--faint);
  background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand {
  display: inline-flex; align-items: flex-end; gap: 1px;
  text-decoration: none; color: var(--text); line-height: 1;
  border-radius: 6px; padding: 4px 2px;
}
.mark { width: 19px; height: 26px; fill: var(--accent); flex: none; }
.brand-t { font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em; line-height: .9; }
.find {
  margin-left: 12px;
  display: flex; align-items: center; gap: 10px;
  width: min(340px, 100%); height: 40px; padding: 0 8px 0 12px;
  background: var(--surface); color: var(--faint);
  border: 1px solid var(--line-2); border-radius: 11px;
  text-decoration: none; font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s;
}
.find:hover { border-color: var(--field-line); }
.find-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-nav { display: flex; gap: 4px; }
.top-nav a {
  padding: 8px 12px; border-radius: var(--r-s);
  color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 500;
}
.top-nav a:hover { color: var(--text); background: var(--surface-2); }
.top-nav a[aria-current] { color: var(--text); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: transparent; color: var(--muted);
  border: 1px solid transparent; border-radius: 11px;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
@media (max-width: 719px) {
  .top-nav { display: none; }
  .find { width: 40px; height: 40px; padding: 0; margin-left: auto; justify-content: center; border-color: transparent; background: transparent; color: var(--muted); }
  .find + .top-end { margin-left: 0; }
  .find-t, .find kbd { display: none; }
}

/* ---------- glyph ---------- */
.glyph {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-ink);
  font: 650 1.05rem/1 var(--mono); letter-spacing: -.04em; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.glyph.g1 { font-size: 1.25rem; }
.glyph.g3 { font-size: .8125rem; letter-spacing: -.06em; }

/* ---------- home ---------- */
.hero { padding: 64px 0 8px; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.eyebrow { color: var(--muted); font-size: .875rem; margin-bottom: 14px; }
.eyebrow .mono { color: var(--accent-ink); font-weight: 600; }
.hero h1 { font-size: clamp(2.125rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em; max-width: 16ch; font-weight: 700; text-wrap: balance; }
.hero .lede { margin-top: 16px; font-size: 1.125rem; color: var(--muted); max-width: 52ch; text-wrap: balance; }
.hero .filter { width: 100%; text-align: left; }
.filter {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin-top: 28px; max-width: 640px; height: 56px; padding: 0 14px 0 18px;
  background: var(--surface); border: 1px solid var(--field-line); border-radius: 15px;
  box-shadow: var(--shadow-lift);
}
.filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lift); }
.filter .i { color: var(--faint); width: 20px; height: 20px; }
.filter input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  font-size: 1.0625rem;
}
.filter input::placeholder { color: var(--faint); }
.filter input::-webkit-search-cancel-button { display: none; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: .875rem; text-align: left; }
@media (max-width: 559px) {
  .hero { padding-top: 36px; }
  .filter { height: 52px; padding-left: 14px; }
  .filter input { font-size: 1rem; }
  .filter kbd { display: none; }
}
.hero-note .i, .foot-local .i { width: 16px; height: 16px; color: var(--ok); }
.filter-page { margin-top: 20px; box-shadow: none; padding-right: 6px; }
.filter-page .btn { height: 42px; }

.cat { margin-top: 44px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cat-head .glyph { width: 32px; height: 32px; border-radius: 9px; font-size: .875rem; }
.cat-head h2 { font-size: 1.1875rem; }
.cat-head h2 a { text-decoration: none; }
.cat-head h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cat-n { color: var(--faint); font-size: .8125rem; }
.empty { margin-top: 32px; color: var(--muted); }

/* ---------- cards ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); }
.grid-s { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card-li { display: flex; }
.card {
  flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 12px 14px;
  padding: 16px; background: var(--surface); color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-t { font-weight: 620; letter-spacing: -.01em; }
.card-d { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.card-u {
  grid-column: 1 / -1; align-self: end;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 10px; border-top: 1px dashed var(--line-2);
  font: .8125rem/1.2 var(--mono); color: var(--faint);
}
.card-u .i { width: 16px; height: 16px; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lift); }
.card:hover .glyph, .card:focus-visible .glyph { background: var(--accent); color: #fff; }
.card:hover .card-u { color: var(--accent-ink); }
.card:hover .card-u .i, .card:focus-visible .card-u .i { opacity: 1; transform: none; }
@media (max-width: 559px) {
  .grid { gap: 10px; }
  .card { padding: 14px; grid-template-rows: auto auto; row-gap: 6px; }
  .card-u { grid-column: 2; padding-top: 0; border-top: 0; }
  .card-u .i { display: none; }
}

/* ---------- inner pages ---------- */
.page { padding-top: 20px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--text); }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-top: 18px; }
.page-head .glyph { width: 52px; height: 52px; border-radius: 14px; font-size: 1.25rem; }
.page-head .glyph.g3 { font-size: 1rem; }
.page-head h1 { font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.25rem); letter-spacing: -.03em; font-weight: 700; }
.page-head .lede { margin-top: 6px; color: var(--muted); font-size: 1.0625rem; max-width: 64ch; }
.tool-head { flex-wrap: wrap; }
.tool-title { flex: 1 1 240px; min-width: 0; }
.tool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border-radius: 999px; font-size: .8125rem; font-weight: 550;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent);
}
.badge .i { width: 15px; height: 15px; }
.url {
  display: inline-grid; height: 30px; padding: 0 10px; border-radius: 999px;
  font: 600 .8125rem/1 var(--mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--field-line);
}
.url:hover { border-color: var(--text); }
.url .i { width: 14px; height: 14px; color: var(--faint); }
.sub { font-size: 1.125rem; margin: 36px 0 14px; }
.draft { margin-top: 24px; padding: 28px 24px; border: 1px dashed var(--accent-line); background: var(--accent-soft); border-radius: var(--r); color: var(--text); }
.noscript { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-s); background: var(--surface-2); color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px; white-space: nowrap;
  font-size: .875rem; font-weight: 560; letter-spacing: -.005em;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--field-line); border-radius: var(--r-s);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn .i { width: 16px; height: 16px; }
.btn-main { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-main:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
/* Copy buttons hold both labels in one cell, so the switch to "Copiat"
   never changes their width. */
[data-act="copy"], .url { display: inline-grid; }
[data-act="copy"] > span, .url > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.b-ok { visibility: hidden; }
.done .b-l { visibility: hidden; }
.done .b-ok { visibility: visible; }
.url.done { color: var(--ok); border-color: var(--ok); }

/* ---------- workspace ---------- */
.tool { margin-top: 24px; }
.ws { display: grid; gap: 16px; }
.pane {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.pane:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 7px 8px 7px 16px; border-bottom: 1px solid var(--line);
}
.pane-t { font-size: .875rem; font-weight: 620; color: var(--text); }
.pane-tl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pane-note { font: .75rem/1.3 var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-note.is-err { color: #c42b1c; }
:root[data-theme="dark"] .pane-note.is-err { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pane-note.is-err { color: #ff8a7a; } }
.field-code { white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.credit { margin-top: 12px; font-size: .8125rem; color: var(--faint); }
.credit a { color: var(--muted); }
.pane-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.field-text {
  display: block; width: 100%; min-height: 240px; flex: 1;
  margin: 0; padding: 14px 16px; border: 0; outline: none; resize: vertical;
  background: transparent; color: var(--text);
  font: .9375rem/1.65 var(--mono); tab-size: 4;
}
.field-text::placeholder { color: var(--faint); }
.field-prose { font: 1rem/1.65 var(--font); }
.pane-out .field-text { background: var(--surface-2); }
.status {
  min-height: 34px; padding: 8px 16px; border-top: 1px solid var(--line);
  font: .75rem/1.5 var(--mono); color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 960px) {
  .field-text { min-height: 360px; }
  .ws-io { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ws-io .opts { grid-column: 1 / -1; }
  .ws-gen .field-text { min-height: 420px; }
  .ws-side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

/* options: segmented radios and checkboxes; they work without the script */
.opts { margin: 0; padding: 0; border: 0; min-width: 0; }
.opts-l { padding: 0; margin-bottom: 10px; font-size: .8125rem; font-weight: 620; color: var(--muted); }
.opts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.opts-next { margin-top: 12px; }
.opts-inline { margin: 0; }
.check b { font-weight: 640; color: var(--text); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-o { position: relative; display: inline-flex; }
.seg-o input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-o span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
  font: 500 .8125rem/1 var(--mono); white-space: nowrap;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--field-line); border-radius: var(--r-s);
  transition: background-color .15s, border-color .15s, color .15s;
}
.seg-o:hover span { border-color: var(--text); }
.seg-o input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.seg-o input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.opts-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
/* typed options: a search term, a number, a font */
.opts-fields { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 720px) { .opts-fields { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .8125rem; font-weight: 620; color: var(--muted); }
.field-in {
  width: 100%; height: 40px; padding: 0 12px;
  font: 400 .9375rem/1 var(--mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-s);
}
.field-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-in.num { width: 7.5rem; }
select.field-in { font-family: var(--font); padding-right: 32px; cursor: pointer; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: .875rem; }
.field-hint { font-weight: 400; color: var(--faint); font-size: .75rem; }
.field-hint code { font-size: .75rem; }

/* counter stats: above the text on a phone (visible while the keyboard is
   up), a sticky column beside it on a wide screen */
.stats { order: -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.stat-n { font-size: 1.25rem; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.stat-l { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.stat-main .stat-n { color: var(--accent-ink); }
@media (min-width: 960px) {
  .stats { order: 0; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; top: calc(var(--header-h) + 16px); }
  .stat { padding: 14px 16px; }
  .stat-n { font-size: 1.5rem; }
  .stat-l { font-size: .8125rem; }
  .stat-main { grid-column: 1 / -1; padding: 18px 20px; border-color: var(--accent-line); background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
  .stat-main .stat-n { font-size: 3rem; letter-spacing: -.04em; }
  .stat-main .stat-l { font-size: .875rem; color: var(--text); }
}

/* ---------- explanatory text ---------- */
.info { margin-top: 56px; display: grid; gap: 40px; }
@media (min-width: 960px) { .info { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; } }
.prose section + section { margin-top: 32px; }
.prose h2, .faq h2, .related h2 { font-size: 1.25rem; margin-bottom: 12px; letter-spacing: -.02em; }
.prose p { max-width: 68ch; line-height: 1.7; }
.prose p + p { margin-top: 10px; }
.prose strong { font-weight: 640; }
.prose a, .faq a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose code, .faq code {
  font-size: .875em; padding: .1em .35em; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 0;
  font-weight: 580; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.125rem/1.2 var(--mono); color: var(--faint); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 16px; color: var(--muted); line-height: 1.65; }
.related { margin-top: 56px; }

/* ---------- ad slots (drawn only when the server is told to) ---------- */
.ad {
  display: grid; place-items: center; min-height: 120px; margin-top: 32px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--faint); font-size: .8125rem;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--surface-2) 10px 20px);
}
@media (max-width: 559px) { .ad { min-height: 250px; } }

/* ---------- footer ---------- */
.foot { margin-top: 88px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: grid; gap: 32px; padding-block: 40px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot-brand p { margin-top: 12px; color: var(--muted); font-size: .9375rem; max-width: 34ch; }
.foot-brand .brand { padding-left: 0; }
.foot-local { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem !important; }
.foot-local .i { margin-top: 2px; }
.foot-col h2 { font-size: .875rem; margin-bottom: 10px; }
.foot-col h2 a { text-decoration: none; }
.foot-col ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; max-width: 460px; }
.foot-col li a { display: inline-block; padding: 4px 0; color: var(--muted); font-size: .875rem; text-decoration: none; }
.foot-more { display: inline-block; margin-top: 6px; color: var(--accent-ink); font-size: .875rem; font-weight: 560; text-decoration: none; }
.foot-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-col li a:hover, .foot-col h2 a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-block: 16px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--faint); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current] { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.page-doc .prose { margin-top: 28px; }
@media (min-width: 720px) { .foot-in { grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 48px; } }

/* ---------- finder (the palette behind "/" and Ctrl+K) ---------- */
.finder {
  width: min(640px, calc(100vw - 2 * var(--gutter))); max-height: min(560px, 80vh);
  margin: 12vh auto auto; padding: 0;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 80px -24px rgb(0 0 0 / .45);
  overflow: hidden;
}
.finder[open] { display: flex; flex-direction: column; }
.finder::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.finder-box { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); }
.finder-box .i { color: var(--faint); width: 20px; height: 20px; }
.finder-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 1.0625rem; }
.finder-box input::-webkit-search-cancel-button { display: none; }
.finder-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.finder-list a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit;
}
.finder-list .glyph { width: 34px; height: 34px; border-radius: 9px; font-size: .9375rem; }
.finder-list .glyph.g3 { font-size: .75rem; }
.finder-list b { display: block; font-weight: 600; font-size: .9375rem; }
.finder-list small { display: block; color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-list .mono { font-size: .75rem; color: var(--faint); }
.finder-list [aria-selected="true"] a { background: var(--surface-2); }
.finder-list [aria-selected="true"] .glyph { background: var(--accent); color: #fff; }
.finder-empty { padding: 18px 12px; color: var(--muted); }
.finder-hint { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--faint); }
@media (max-width: 559px) {
  .finder { margin-top: 8px; max-height: calc(100vh - 16px); }
  .finder-list .mono { display: none; }
  .finder-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .top, .foot, .finder, .ad, .pane-act, .tool-meta { display: none !important; }
}
