/* ProtemKey: calm, crisp, trustworthy. System fonts only. */
:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #142027;
  --ink-2: #33424b;
  --muted: #5b6871;
  --line: #d9dfda;
  --brand: #0f5c55;
  --brand-ink: #0b4a44;
  --brand-soft: #e1efeb;
  --accent: #b8862b;
  --accent-soft: #f6ead2;
  --focus: #2a7de1;
  --code-bg: #eef1ec;
  --b-very-weak: #b42318;
  --b-weak: #c4661f;
  --b-fair: #a98314;
  --b-strong: #2e7d4f;
  --b-very-strong: #0f5c55;
  --shadow: 0 1px 2px rgba(20, 32, 39, .06), 0 6px 24px rgba(20, 32, 39, .06);
  --radius: 14px;
  --logo-bg: #0f5c55;
  --logo-fg: #f2c46d;
  --hb-on: #0f5c55;
  --hb-off: #dfe6e1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1517;
    --surface: #131e21;
    --surface-2: #19272b;
    --ink: #e6ecea;
    --ink-2: #c4cfcc;
    --muted: #93a29f;
    --line: #26363a;
    --brand: #4fc2b2;
    --brand-ink: #7fd8cb;
    --brand-soft: #16302d;
    --accent: #e0b25a;
    --accent-soft: #2e2615;
    --code-bg: #1a272b;
    --b-very-weak: #f0705f;
    --b-weak: #f0a35c;
    --b-fair: #e3c35a;
    --b-strong: #63c48b;
    --b-very-strong: #4fc2b2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    --logo-bg: #1b4f49;
    --logo-fg: #f2c46d;
    --hb-on: #2f8d81;
    --hb-off: #1b292c;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mono, code, pre, kbd { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 5px; font-size: .9em; overflow-wrap: anywhere; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: .3em 0 .35em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.5em 0 .4em; }
.h-small { font-size: 1.02rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .7em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fine { font-size: .86rem; color: var(--muted); }
.lede { font-size: 1.14rem; color: var(--ink-2); max-width: 46em; }
.kicker { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 650; color: var(--accent); margin: 0; }
.arrow { font-weight: 600; text-decoration: none; }
.arrow::after { content: " →"; }

/* JS-only controls appear when site.js marks the page */
.js-only { display: none; }
html.js .js-only { display: revert; }
html.js .gen-form.js-only, html.js .out-actions.js-only { display: flex; }
html.js .nojs-msg { display: none; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.2rem; letter-spacing: -.01em; }
.brand b, .foot-brand b { color: var(--brand); }
.logo { flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 7px 11px; border-radius: 9px; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

/* hero */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center; padding-top: 36px; padding-bottom: 30px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin: .15em 0 .3em; }
.trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: .95rem; }
.trust li { display: inline-flex; gap: 7px; align-items: center; }
.trust .i { color: var(--brand); }
.hero-art { width: 100%; height: auto; display: block; }
.hb-on { fill: var(--hb-on); opacity: .9; }
.hb-off { fill: var(--hb-off); }
.hl-shackle { fill: none; stroke: var(--ink-2); stroke-width: 16; opacity: .9; }
.hl-body { fill: var(--ink); }
.hl-hole { fill: var(--bg); }
.hk-bow { fill: var(--accent); }
.hk-ring { fill: none; stroke: #8a6418; stroke-width: 3; opacity: .45; }
.hk-hole { fill: var(--bg); }
.hk-blade, .hk-tooth { fill: var(--accent); }
.hk-groove { fill: #8a6418; opacity: .35; }

/* cards and generator */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.home-gen { margin-top: -6px; position: relative; }
.tabs { display: flex; gap: 6px; margin: 26px 0 10px; }
.tab { text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); font-weight: 550; }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .tab.on { color: #062a26; } }
.tool-head { margin: 8px 0 18px; }
.out-wrap { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.out {
  flex: 1 1 420px; min-height: 76px; display: block;
  font-size: clamp(1.2rem, 3.4vw, 1.75rem); line-height: 1.35; font-weight: 550;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  overflow-wrap: anywhere; word-break: break-word; letter-spacing: .01em; color: var(--ink);
}
.out .nojs-msg { font-size: 1rem; font-family: system-ui, sans-serif; color: var(--muted); font-weight: 400; }
.out .sepch { color: var(--muted); }
.out .dg { color: var(--brand); }
.out .sy { color: var(--accent); }
.out-actions { display: flex; flex-direction: column; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font: inherit; font-size: .98rem; font-weight: 600; padding: 9px 18px; border-radius: 11px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #062a26; } }
.btn-ghost { background: transparent; }
.btn.done { background: var(--b-strong); border-color: var(--b-strong); color: #fff; }
.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; margin-top: 20px; }
.gen-form { flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.two { flex-direction: row; gap: 14px; flex-wrap: wrap; }
.field.two label { flex: 1 1 140px; }
.flabel, .field > label { font-weight: 600; font-size: .95rem; }
.field label input[type=number], .field label select { display: block; width: 100%; margin-top: 4px; }
.field-range label { display: flex; justify-content: space-between; }
.val { font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--brand); height: 28px; }
select, input[type=number], input[type=search], .pw-in, .dice-code {
  font: inherit; font-size: 1rem; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); min-height: 44px;
}
.checks { gap: 8px; }
.checks label { font-weight: 450; display: flex; gap: 9px; align-items: flex-start; }
.checks input { accent-color: var(--brand); width: 18px; height: 18px; margin-top: 4px; flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: .95rem; cursor: pointer; background: var(--surface); }
.seg input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 650; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg code { background: none; padding: 0; }
.nojs { background: var(--accent-soft); padding: 12px 14px; border-radius: 10px; }

/* meter */
.meter { margin-bottom: 12px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.meter-bits { font-size: 1.05rem; color: var(--ink-2); }
.meter-bits b { font-size: 2.1rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.meter-band { font-weight: 700; padding: 3px 11px; border-radius: 999px; font-size: .9rem; color: #fff; white-space: nowrap; }
.band-very-weak { background: var(--b-very-weak); } .band-weak { background: var(--b-weak); } .band-fair { background: var(--b-fair); }
.band-strong { background: var(--b-strong); } .band-very-strong { background: var(--b-very-strong); }
@media (prefers-color-scheme: dark) { .meter-band { color: #0d1517; } }
.meter-track { position: relative; height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 22px; }
.meter-fill { height: 100%; border-radius: 999px; transition: width .35s ease; }
.band-bg-very-weak { background: var(--b-very-weak); } .band-bg-weak { background: var(--b-weak); } .band-bg-fair { background: var(--b-fair); }
.band-bg-strong { background: var(--b-strong); } .band-bg-very-strong { background: var(--b-very-strong); }
.tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .25; }
.tick i { position: absolute; top: 19px; left: -8px; font-style: normal; font-size: .72rem; color: var(--muted); opacity: 1; }
.why { list-style: none; padding: 0; margin: 0 0 6px; }
.why li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.why li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.why li.neg b { color: var(--b-weak); }
.space { font-size: .92rem; color: var(--muted); margin: 6px 0 14px; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.time { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.t-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.t-val { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.t-note { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.time-custom { margin-top: 8px; }
.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.more-list { margin: 10px 0 0; padding-left: 1.6em; display: grid; gap: 6px; }
.more-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.more-list li::marker { color: var(--muted); }
.more-list button { flex: none; min-height: 36px; padding: 5px 12px; font-size: .88rem; }

/* checker */
.pw-row { display: flex; gap: 10px; margin-top: 6px; }
.pw-in { flex: 1; font-size: 1.25rem; min-width: 0; }
.privacy-line { margin: 8px 0 18px; }
.lines { list-style: none; padding: 0; margin: 0 0 14px; counter-reset: ln; }
.lines li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lines .seg-t { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 650; overflow-wrap: anywhere; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; justify-self: start; }
.lines .k-common .seg-t, .lines .k-walk .seg-t, .lines .k-repeat .seg-t, .lines .k-sequence .seg-t { background: #fbe3df; color: #7a1a10; }
.lines .k-word .seg-t, .lines .k-date .seg-t { background: var(--accent-soft); }
@media (prefers-color-scheme: dark) { .lines .k-common .seg-t, .lines .k-walk .seg-t, .lines .k-repeat .seg-t, .lines .k-sequence .seg-t { background: #3a1c18; color: #f5b6ac; } }
.lines .seg-b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.lines .seg-w { color: var(--ink-2); font-size: .95rem; }
.notes { padding-left: 1.2em; margin: 0 0 16px; }
.notes li { margin-bottom: 6px; }

/* calculator, dice, wordlist */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 26px; }
.calc hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.back { flex-direction: row; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.back label { flex: 1 1 260px; font-weight: 600; font-size: .95rem; }
.back select, .back input { display: block; width: 100%; margin-top: 4px; }
.back-out { font-size: 1.05rem; margin: 14px 0 0; }
.dice-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.die select { width: 64px; height: 64px; font-size: 1.6rem; text-align: center; font-weight: 700; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.dice-word { font-size: 1.7rem; font-weight: 700; color: var(--brand); padding: 0 10px; }
.dice-code { width: 9ch; }
.search { width: 100%; max-width: 420px; }
.wordlist { columns: 4 230px; column-gap: 26px; margin: 24px 0; }
.wl-group { break-inside: avoid; margin-bottom: 14px; }
.wl-h { font-size: 1rem; margin: 0 0 4px; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--brand); }
.wl-h span { color: var(--muted); }
.wl { list-style: none; padding: 0; margin: 0; font-size: .93rem; line-height: 1.55; }
.wl-d { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); font-size: .85em; margin-right: 4px; }
.wl li.hit { background: var(--accent-soft); border-radius: 4px; }

/* sections and grids */
.band-sec, .tools-sec, .guides-sec { margin-top: 30px; }
.sec-lede { color: var(--ink-2); max-width: 46em; margin-top: -.2em; }
.sec-h { margin-top: 1.4em; }
.toolgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.toolcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .15s, transform .15s; }
.toolcard:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.toolcard .ico { grid-row: span 2; color: var(--brand); }
.toolcard .ico .acc { stroke: var(--accent); }
.tc-name { font-weight: 700; }
.tc-sub { color: var(--muted); font-size: .9rem; }
.check-teaser { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-top: 34px; background: linear-gradient(120deg, var(--brand-soft), var(--surface) 70%); }
.check-teaser h2 { margin-top: 0; }
.check-teaser .btn { flex: none; }
.ggrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ggrid > * { flex: 0 1 calc((100% - 2 * 14px) / 3); min-width: 0; }   /* 3 / 2 / 1, short last row centred (PARK-56) */
.ggrid.g4 > * { flex-basis: calc((100% - 3 * 14px) / 4); }            /* curated 4: 4 / 2 / 1 */
.gcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, transform .15s; }
.gcard:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.gc-sec { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.gc-t { font-weight: 700; font-size: 1.06rem; line-height: 1.3; }
.gc-s { color: var(--ink-2); font-size: .93rem; }
.gc-m { color: var(--muted); font-size: .8rem; margin-top: auto; }
.toc-sections { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.toc-sections a { text-decoration: none; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 550; }
.toc-sections span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.related { margin: 40px 0 10px; }

/* prose and guides */
.prose { max-width: 46em; }
.prose.wide { max-width: none; }
.prose p, .prose li { color: var(--ink); }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; }
.prose blockquote.note { border-left-color: var(--accent); background: var(--accent-soft); }
.prose blockquote p { margin: .4em 0; }
.prose pre, pre.code { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .9rem; line-height: 1.5; }
.prose pre code, pre.code code { background: none; padding: 0; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 46em) minmax(0, 1fr); gap: 40px; align-items: start; }
.guide h1 { margin-top: .2em; }
.guide-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.toc ol { padding-left: 1.1em; margin: 6px 0 0; font-size: .93rem; }
.toc li { margin-bottom: 5px; }
.foot-h { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.sources ol { font-size: .92rem; padding-left: 1.3em; }
.sources li { overflow-wrap: anywhere; }
a.ext::after { content: "↗"; font-size: .8em; margin-left: 2px; opacity: .65; }
.crumbs ol { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .6; }
.crumbs a { color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; margin: 1em 0 1.4em; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tbl { border-collapse: collapse; width: 100%; font-size: .93rem; }
.tbl caption { caption-side: bottom; text-align: left; padding: 9px 12px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--surface-2); font-weight: 650; white-space: nowrap; font-size: .88rem; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.num td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.num td.l { white-space: normal; min-width: 14em; }
.tbl td.l { min-width: 16em; }
.tbl td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.control td { background: var(--accent-soft); }
.tbl code.wrap { white-space: nowrap; }
.ok { color: var(--b-strong); font-weight: 700; }
.bad { color: var(--b-very-weak); font-weight: 700; }
.toplist ol { columns: 2 180px; padding-left: 0; list-style: none; }
.toplist li { padding: 3px 0; }
.toplist .rk { color: var(--muted); font-variant-numeric: tabular-nums; display: inline-block; min-width: 3.2em; font-size: .88em; }
.toplist figcaption { font-size: .84rem; color: var(--muted); }
.toplist { margin: 1em 0; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.res { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.res b { font-size: 1.9rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.res span { color: var(--ink-2); font-size: .92rem; }
details { margin: 1em 0; }
summary { cursor: pointer; font-weight: 600; color: var(--brand); }

/* glossary */
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 18px; }
.az a { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--surface); font-weight: 650; }
.gloss { margin: 0; max-width: 50em; }
.gterm { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.gterm:target { background: var(--accent-soft); border-radius: 8px; padding-left: 10px; }
.gloss dt { font-weight: 750; font-size: 1.08rem; }
.gloss dd { margin: 4px 0 0; color: var(--ink-2); }
.see { display: block; font-size: .88rem; color: var(--muted); margin-top: 4px; }

/* footer */
.foot { margin-top: 60px; background: var(--surface); border-top: 1px solid var(--line); padding: 30px 0 20px; font-size: .92rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 4px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; color: var(--ink); margin: 0 0 6px; }
.foot-src { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-size: .82rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 22px; gap: 10px; }
  .hero-pic { max-width: 460px; }
  .gen-grid, .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ggrid > *, .ggrid.g4 > * { flex-basis: calc((100% - 14px) / 2); }
  .ggrid.g3 > * { flex-basis: calc((100% - 2 * 14px) / 3); }          /* curated 3: stays 3 until one column */
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-side { position: static; }
  .toc { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .bar { flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; padding-bottom: 6px; min-height: 0; }
  .nav { margin-left: 0; width: 100%; margin-right: -16px; padding-right: 16px; }
  .nav a { padding: 6px 9px; font-size: .92rem; }
  .top { position: static; }
  .hero-pic { display: none; }
  .card { padding: 16px; }
  .out-wrap { flex-direction: column; }
  .out { flex: 1 1 auto; min-height: 64px; }
  .out-actions { flex-direction: row; }
  .out-actions .btn { flex: 1; }
  .times { grid-template-columns: 1fr; }
  .time { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .t-note { flex-basis: 100%; }
  .toolgrid, .results { grid-template-columns: minmax(0, 1fr); }
  .ggrid > *, .ggrid.g3 > *, .ggrid.g4 > * { flex-basis: 100%; }
  .check-teaser { flex-direction: column; align-items: flex-start; }
  .lines li { grid-template-columns: minmax(0, 1fr) auto; }
  .lines .seg-w { grid-column: 1 / -1; }
  .die select { width: 52px; height: 52px; font-size: 1.35rem; }
  .meter-bits b { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .foot, .out-actions, .more, .related, .guide-side { display: none; }
}
@media (max-width: 600px) { .lines .seg-w { order: 3; } .lines .seg-b { justify-self: end; } }
.guide .kicker { margin-top: 18px; }
