/* Printwright — service manual × workbench. Tokens documented in DESIGN.md. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage.woff2') format('woff2'); font-weight: 400 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('../fonts/atkinson-next.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('../fonts/atkinson-next-italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; src: url('../fonts/atkinson-mono.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --bg: oklch(1 0 0);
  --surface: oklch(0.972 0.006 230);
  --surface-2: oklch(0.945 0.01 230);
  --line: oklch(0.885 0.012 230);
  --line-strong: oklch(0.78 0.02 232);
  --ink: oklch(0.235 0.028 238);
  --ink-2: oklch(0.45 0.026 236);
  --steel: oklch(0.34 0.072 232);
  --steel-2: oklch(0.29 0.064 234);
  --steel-line: oklch(1 0 0 / 0.07);
  --steel-line-major: oklch(1 0 0 / 0.13);
  --on-steel: oklch(0.975 0.008 230);
  --on-steel-2: oklch(0.86 0.03 225);
  --link: oklch(0.46 0.105 238);
  --link-hover: oklch(0.37 0.1 238);
  --marigold: oklch(0.84 0.155 82);
  --marigold-hover: oklch(0.79 0.16 78);
  --marigold-soft: oklch(0.955 0.05 88);
  --marigold-line: oklch(0.8 0.12 82);
  --ok: oklch(0.5 0.12 155);
  --ok-soft: oklch(0.96 0.035 155);
  --ok-line: oklch(0.8 0.08 155);
  --stop-soft: oklch(0.965 0.02 30);
  --stop-line: oklch(0.82 0.07 30);
  --stop-ink: oklch(0.47 0.13 30);
  --info-soft: oklch(0.965 0.018 235);
  --info-line: oklch(0.85 0.04 235);
  --lcd-bg: oklch(0.26 0.035 178);
  --lcd-edge: oklch(0.2 0.025 190);
  --lcd-ink: oklch(0.91 0.14 140);
  --paper: oklch(1 0 0);
  --hl: oklch(0.86 0.15 86 / 0.85);

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --shadow-1: 0 1px 2px oklch(0.2 0.03 235 / 0.06), 0 2px 8px oklch(0.2 0.03 235 / 0.05);
  --shadow-2: 0 12px 40px oklch(0.2 0.05 235 / 0.16), 0 2px 8px oklch(0.2 0.05 235 / 0.08);
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 70ch;

  --z-dropdown: 20; --z-sticky: 30; --z-backdrop: 40; --z-dialog: 50; --z-toast: 60;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: oklch(0.18 0.016 235);
  --surface: oklch(0.215 0.018 235);
  --surface-2: oklch(0.255 0.02 235);
  --line: oklch(0.33 0.022 235);
  --line-strong: oklch(0.45 0.025 235);
  --ink: oklch(0.95 0.008 230);
  --ink-2: oklch(0.79 0.02 230);
  --steel: oklch(0.255 0.05 232);
  --steel-2: oklch(0.21 0.04 234);
  --on-steel-2: oklch(0.84 0.03 225);
  --link: oklch(0.8 0.095 225);
  --link-hover: oklch(0.88 0.08 225);
  --marigold: oklch(0.82 0.15 80);
  --marigold-hover: oklch(0.86 0.14 82);
  --marigold-soft: oklch(0.29 0.05 80);
  --marigold-line: oklch(0.55 0.1 80);
  --ok: oklch(0.78 0.13 155);
  --ok-soft: oklch(0.26 0.04 155);
  --ok-line: oklch(0.45 0.08 155);
  --stop-soft: oklch(0.27 0.035 30);
  --stop-line: oklch(0.5 0.08 30);
  --stop-ink: oklch(0.82 0.1 35);
  --info-soft: oklch(0.24 0.025 235);
  --info-line: oklch(0.4 0.04 235);
  --paper: oklch(0.96 0.005 230);
  --hl: oklch(0.82 0.15 82 / 0.9);
  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-2: 0 16px 48px oklch(0 0 0 / 0.5);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  font-feature-settings: 'kern'; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
svg.i { display: inline-block; flex: none; vertical-align: middle; }
h1, h2, h3, h4 { font-family: var(--font-display); font-stretch: 90%; font-weight: 700; line-height: 1.15; letter-spacing: -0.006em; margin: 0 0 0.5em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.45rem + 2.2vw, 2.9rem); letter-spacing: -0.012em; }
h2, .h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem); }
h3, .h3 { font-size: 1.28rem; letter-spacing: -0.01em; }
.h4 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; margin: 0 0 0.5em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
strong { font-weight: 700; }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
code { background: var(--surface-2); padding: 0.08em 0.36em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { display: inline-block; padding: 0.05em 0.42em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); font-size: 0.85em; line-height: 1.4; }
ul, ol { padding: 0; margin: 0; }
li { list-style: none; }
::selection { background: var(--hl); color: oklch(0.2 0.03 238); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: var(--z-toast); background: var(--marigold); color: oklch(0.2 0.03 238); padding: 10px 16px; border-radius: var(--radius-s); font-weight: 700; text-decoration: none; transition: top 0.15s var(--ease); }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.fine { font-size: 0.92rem; color: var(--ink-2); }
.count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); font-weight: 400; }

/* ── Buttons & links ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.55em 1.05em; border-radius: var(--radius-s); border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.12s var(--ease), color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-steel { background: var(--steel); color: var(--on-steel); }
.btn-steel:hover { background: var(--steel-2); color: var(--on-steel); }
[data-theme='dark'] .btn-steel { background: var(--link); color: oklch(0.18 0.03 238); }
[data-theme='dark'] .btn-steel:hover { background: var(--link-hover); color: oklch(0.18 0.03 238); }
.btn-marigold { background: var(--marigold); color: oklch(0.22 0.03 238); }
.btn-marigold:hover { background: var(--marigold-hover); color: oklch(0.22 0.03 238); }
.btn-outline { background: var(--bg); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); background: var(--surface); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding-inline: 0.7em; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 40px; font-size: 0.95rem; padding: 0.45em 0.85em; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 700; text-decoration: none; }
.link-arrow svg { transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow--on-steel { color: var(--on-steel); }
.link-arrow--on-steel:hover { color: var(--marigold); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-s); background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--surface-2); }

/* ── Independence strip ─────────────────────────────────────────────── */
.strip { background: var(--steel-2); color: var(--on-steel-2); font-size: 0.88rem; }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; padding-block: 6px; }
.strip p { margin: 0; display: flex; align-items: center; gap: 8px; }
.strip p svg { color: var(--marigold); }
.strip strong { color: var(--on-steel); font-weight: 700; }
.strip nav { display: flex; gap: 18px; flex: none; }
.strip a { color: var(--on-steel); text-decoration: none; }
.strip a:hover { text-decoration: underline; color: var(--on-steel); }
.strip :focus-visible { outline-color: var(--marigold); }

/* ── Masthead ───────────────────────────────────────────────────────── */
.masthead { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s var(--ease); }
.masthead.is-stuck { box-shadow: var(--shadow-1); }
.masthead-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.42rem; letter-spacing: -0.008em; line-height: 1; }
.wordmark span { font-weight: 500; }
.primary { flex: 1; min-width: 0; }
.primary-list { display: flex; align-items: center; gap: 2px; }
.nav-link, .nav-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-s);
  color: var(--ink); font-weight: 700; font-size: 0.98rem; text-decoration: none; background: none; border: 0; position: relative;
}
.nav-link:hover, .nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-link[aria-current]::after, .nav-btn[aria-current]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 3px; background: var(--marigold); border-radius: 2px; }
.nav-btn svg { transition: transform 0.2s var(--ease); }
.nav-btn[aria-expanded='true'] { background: var(--surface-2); }
.nav-btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.masthead-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.search-btn { border-color: var(--line-strong); padding: 0 10px 0 12px; color: var(--ink-2); min-width: 0; }
.search-btn-text { font-size: 0.95rem; margin-right: 18px; }
.search-kbd { font-size: 0.78rem; }
.when-dark { display: none !important; }
[data-theme='dark'] .when-dark { display: inline-block !important; }
[data-theme='dark'] .when-light { display: none !important; }
.menu-btn { display: none; }

/* Mega menus */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); z-index: var(--z-dropdown); animation: drop 0.2s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.mega-inner { display: grid; grid-template-columns: 1fr 270px; gap: 36px; padding-block: 28px 32px; }
.mega-inner--split { grid-template-columns: 1fr 1.6fr; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; }
.mega-cat-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 6px; }
.mega-cat-head svg { color: var(--link); }
.mega-cat-head .count { margin-left: auto; }
.mega-cat-head:hover { color: var(--link); }
.mega-cat ul li a, .mega-list a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.mega-cat ul li a:hover, .mega-list a:hover { color: var(--link); text-decoration: underline; }
.mega-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mega-side p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.mega-side .mega-side-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.mega-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin: 0 0 8px; }
.mega-title a { color: var(--ink); text-decoration: none; }
.mega-title a:hover { color: var(--link); }
.mega-list--cols { columns: 2; column-gap: 28px; }
.mega-fine { margin: 14px 0 0; font-size: 0.85rem; color: var(--ink-2); }

/* Drawer (mobile menu) */
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(400px, 92vw); padding: 0; border: 0; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-2); }
.drawer::backdrop { background: oklch(0.15 0.03 238 / 0.5); }
.drawer[open] { animation: slide-in 0.25s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.drawer-body { padding: 18px 20px 32px; }
.drawer-label { margin: 22px 0 6px; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }
.drawer-list a { display: flex; align-items: center; gap: 10px; min-height: 46px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-list a svg { color: var(--link); }
.drawer-list a .count { margin-left: auto; }
.drawer-list--plain a { font-weight: 400; }

/* Search dialog */
.search-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 48px)); margin: 8vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-2); overflow: hidden; }
.search-dialog[open] { display: flex; flex-direction: column; animation: drop 0.18s var(--ease); }
.search-dialog::backdrop { background: oklch(0.15 0.03 238 / 0.55); }
.search-dialog-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.search-dialog-form > svg { color: var(--ink-2); }
.search-dialog-form input { flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent; font-size: 1.12rem; outline: none; }
.search-results { overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.sr-item:hover, .sr-item[aria-selected='true'] { background: var(--surface-2); color: var(--ink); }
.sr-item mark { background: var(--hl); color: inherit; border-radius: 2px; padding: 0 1px; }
.sr-kind { flex: none; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); margin-top: 2px; min-width: 64px; text-align: center; }
.sr-kind--code { font-family: var(--font-mono); background: var(--lcd-bg); color: var(--lcd-ink); border-color: var(--lcd-edge); max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type='search']::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.sr-text { display: flex; flex-direction: column; min-width: 0; }
.sr-title { font-weight: 700; line-height: 1.3; }
.sr-sum { font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-empty { padding: 18px 14px; color: var(--ink-2); margin: 0; }
.sr-all { display: block; padding: 10px 12px; font-weight: 700; }
.search-foot { display: flex; gap: 18px; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-2); background: var(--surface); }
.search-foot kbd { margin-right: 3px; }

/* ── Cutting mat surfaces ───────────────────────────────────────────── */
.mat {
  background-color: var(--steel); color: var(--on-steel);
  background-image:
    linear-gradient(var(--steel-line-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--steel-line-major) 1px, transparent 1px),
    linear-gradient(var(--steel-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--steel-line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.mat h1, .mat h2, .mat h3 { color: var(--on-steel); }
.mat :focus-visible { outline-color: var(--marigold); }
.ruler {
  height: 18px; border-top: 1px solid var(--steel-line-major);
  background-image:
    repeating-linear-gradient(90deg, var(--on-steel-2) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(90deg, oklch(1 0 0 / 0.45) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, oklch(1 0 0 / 0.22) 0 1px, transparent 1px 12px);
  background-size: 100% 16px, 100% 10px, 100% 6px; background-repeat: no-repeat;
  background-position: 0 0;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; padding-block: clamp(40px, 6vw, 76px) 28px; }
.hero h1 { font-size: clamp(2.3rem, 1.55rem + 3.1vw, 3.8rem); font-stretch: 88%; font-weight: 720; line-height: 1.06; letter-spacing: 0.004em; word-spacing: 0.04em; max-width: 16ch; margin-bottom: 0.4em; }
.hero-lede { font-size: 1.18rem; color: var(--on-steel-2); max-width: 54ch; margin-bottom: 26px; }
.hero-search { position: relative; max-width: 640px; }
.hero-search-label { display: block; font-weight: 700; margin-bottom: 8px; }
.hero-search-field { display: flex; align-items: center; gap: 10px; background: var(--paper); color: oklch(0.235 0.028 238); border-radius: var(--radius); padding: 6px 6px 6px 16px; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.2), 0 10px 30px oklch(0.15 0.05 235 / 0.35); }
.hero-search-field > svg { color: oklch(0.45 0.026 236); }
.hero-search-field input { flex: 1; min-width: 0; min-height: 50px; border: 0; background: transparent; font-size: 1.08rem; outline: none; color: oklch(0.235 0.028 238); }
.hero-search-field input::placeholder { color: oklch(0.5 0.02 236); }
.hero-search-field:focus-within { box-shadow: 0 0 0 3px var(--marigold), 0 10px 30px oklch(0.15 0.05 235 / 0.35); }
.hero-search-field--light { box-shadow: 0 0 0 1px var(--line-strong); background: var(--bg); color: var(--ink); }
.hero-search-field--light input { color: var(--ink); }
.hero-search-field--light:focus-within { box-shadow: 0 0 0 3px var(--link); }
.search-results--inline { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); z-index: var(--z-dropdown); max-height: 420px; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; font-size: 0.95rem; }
.popular > span { color: var(--on-steel-2); }
.popular ul { display: flex; flex-wrap: wrap; gap: 8px; }
.popular a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid oklch(1 0 0 / 0.28); color: var(--on-steel); text-decoration: none; background: oklch(1 0 0 / 0.04); transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease); }
.popular a:hover { background: oklch(1 0 0 / 0.12); border-color: var(--marigold); color: var(--on-steel); }
.hero-art { color: var(--on-steel); }
.art { width: 100%; height: auto; overflow: visible; }
.art .fill-body { fill: var(--steel); }
.art .fill-soft { fill: oklch(1 0 0 / 0.06); }
.art .fill-paper { fill: var(--paper); stroke: currentColor; }
.art .lcd { fill: var(--lcd-bg); stroke: currentColor; }
.art .lcd-ink { stroke: var(--lcd-ink); }
.art .hl { fill: var(--marigold); }
.art .tank { stroke: var(--marigold); opacity: 0.85; }
.art-hero text { font-family: var(--font-body); font-size: 13.5px; fill: var(--on-steel-2); stroke: none; font-weight: 700; }
.art-hero .dim { font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; fill: var(--on-steel-2); }
.art-hero .note path { stroke: var(--on-steel-2); }
.art-hero .dot { fill: var(--marigold); stroke: none; }
.art-hero .mat-ticks { stroke: var(--on-steel-2); }
.art-hero .sheet { animation: feed 1.4s 0.35s var(--ease) both; }
@keyframes feed { from { transform: translateY(-78px); } }
.hero-promises ul { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-block: 18px 22px; border-top: 1px solid var(--steel-line-major); font-size: 0.95rem; font-weight: 700; }
.hero-promises li { display: inline-flex; align-items: center; gap: 8px; }
.hero-promises svg { color: var(--marigold); }

/* ── Home sections ──────────────────────────────────────────────────── */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tight { padding-block: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.section--panel { background: var(--surface); border-block: 1px solid var(--line); }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 32px; margin-bottom: 30px; }
.section-intro h2 { margin: 0; grid-column: 1; }
.section-intro p { margin: 0; grid-column: 1; color: var(--ink-2); max-width: 62ch; }
.section-intro .link-arrow { grid-column: 2; grid-row: 1 / span 2; }
.section-intro--row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.section-intro--row p { grid-column: 2; grid-row: 1; }
.section-intro--tight { margin-bottom: 18px; }
.drawer-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.drawer-block { padding-block: 20px 22px; border-top: 2px solid var(--ink); }
.drawer-block h3 { font-size: 1.18rem; margin-bottom: 10px; }
.drawer-block h3 a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.drawer-block h3 a:hover { color: var(--link); }
.drawer-block h3 .count { margin-left: auto; }
.drawer-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--steel); flex: none; }
[data-theme='dark'] .drawer-icon { color: var(--link); }
.drawer-block ul li a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.drawer-block ul li a:hover { color: var(--link); text-decoration: underline; }
.diagnose-strip { margin-top: 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.diagnose-strip > div { display: flex; align-items: center; gap: 14px; }
.diagnose-strip > div > svg { color: var(--link); }
.diagnose-strip p { margin: 0; }

/* LCD readout + code lookup */
.code-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.code-copy p { color: var(--ink-2); max-width: 50ch; }
.code-lookup { margin: 22px 0 18px; }
.code-lookup label { display: block; font-weight: 700; margin-bottom: 8px; }
.lcd-field { display: flex; gap: 8px; padding: 8px; background: var(--lcd-edge); border-radius: var(--radius); box-shadow: inset 0 2px 0 oklch(1 0 0 / 0.06), 0 1px 0 oklch(1 0 0 / 0.5); max-width: 520px; }
.lcd-field input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; border: 0; border-radius: 6px;
  background: var(--lcd-bg); color: var(--lcd-ink); font-family: var(--font-mono); font-size: 1.25rem; letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.35), inset 0 6px 14px oklch(0 0 0 / 0.35); text-shadow: 0 0 10px oklch(0.85 0.15 140 / 0.45); outline: none;
}
.lcd-field input::placeholder { color: oklch(0.91 0.14 140 / 0.42); }
.lcd-field input:focus { box-shadow: inset 0 0 0 2px var(--marigold), inset 0 6px 14px oklch(0 0 0 / 0.35); }
.code-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.code-chips a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color 0.18s var(--ease), transform 0.18s var(--ease); }
.code-chips a:hover { border-color: var(--link); transform: translateY(-2px); color: var(--ink); }
.code-chips a > span:last-child { font-size: 0.93rem; line-height: 1.35; color: var(--ink-2); }
.lcd-chip { display: inline-block; align-self: flex-start; padding: 3px 9px; border-radius: 4px; background: var(--lcd-bg); color: var(--lcd-ink); font-family: var(--font-mono); font-size: 0.92rem; letter-spacing: 0.04em; box-shadow: inset 0 0 0 1px var(--lcd-edge); text-shadow: 0 0 8px oklch(0.85 0.15 140 / 0.35); white-space: nowrap; }
.lcd-readout { display: inline-block; padding: 10px; background: var(--lcd-edge); border-radius: var(--radius); box-shadow: 0 1px 0 oklch(1 0 0 / 0.4), var(--shadow-1); }
.lcd-glass { display: block; padding: 14px 20px; border-radius: 6px; background: var(--lcd-bg); box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.35), inset 0 8px 18px oklch(0 0 0 / 0.35); }
.lcd-text { font-family: var(--font-mono); font-size: 1.5rem; color: var(--lcd-ink); letter-spacing: 0.06em; text-shadow: 0 0 12px oklch(0.85 0.15 140 / 0.5); white-space: nowrap; }
.lcd-readout--big .lcd-text { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); }
.lcd-caption { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 0.9rem; color: var(--ink-2); }

/* Printer types strip */
.type-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.type-strip a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
.type-strip a:hover { border-color: var(--link); background: var(--bg); color: var(--ink); }
.type-strip-art { color: var(--ink); margin-bottom: 10px; }
.type-strip-art .art .fill-body { fill: var(--bg); }
.type-strip-art .art .fill-soft { fill: var(--surface-2); }
.type-strip-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.type-strip-meta { font-size: 0.9rem; color: var(--ink-2); }
.type-strip a:hover .art .hl { fill: var(--marigold-hover); }

/* Rules (promises) */
.section--rules { padding-block: clamp(52px, 7vw, 92px); }
.rules-head { max-width: 640px; margin-bottom: 30px; }
.rules-head p { color: var(--on-steel-2); font-size: 1.08rem; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--steel-line-major); border-radius: var(--radius); background: oklch(0 0 0 / 0.12); }
.rules-col { padding: 26px 28px; }
.rules-col + .rules-col { border-left: 1px solid var(--steel-line-major); }
.rules-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.rules-col h3 svg { color: var(--marigold); }
.rules-col li { padding: 10px 0; border-top: 1px dashed var(--steel-line-major); color: var(--on-steel-2); }
.rules-col li strong { color: var(--on-steel); }
.rules-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 26px; }

/* Guides + tools */
.guides-tools { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.job-list { counter-reset: job; margin-bottom: 18px; border-top: 1px solid var(--line); }
.job-list li { counter-increment: job; border-bottom: 1px solid var(--line); }
.job-list a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; color: var(--ink); text-decoration: none; padding-block: 8px; }
.job-list a::before { content: counter(job, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); }
.job-list a:hover .job-title { color: var(--link); text-decoration: underline; }
.job-title { font-weight: 700; }
.job-time { display: inline-flex; align-items: center; gap: 5px; font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }
.tool-stack { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.tool-stack h2 { margin-bottom: 2px; }
.tool-stack .fine { margin-bottom: 8px; }
.tool-link { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.2s var(--ease); }
.tool-link:hover { border-color: var(--link); color: var(--ink); }
.tool-link > svg { color: var(--link); margin-top: 2px; }
.tool-link > span { display: flex; flex-direction: column; }
.tool-link > span > span { font-size: 0.92rem; color: var(--ink-2); }

/* Brands row */
.brands-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.brands-row h2 { margin-bottom: 4px; }
.brands-row .fine { margin: 0; }
.brand-names { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-names a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 700; font-family: var(--font-display); font-stretch: 90%; }
.brand-names a:hover { border-color: var(--link); color: var(--link); }

/* Method + spec sheet */
.spec-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.method { counter-reset: m; margin: 22px 0 20px; }
.method li { counter-increment: m; position: relative; padding: 0 0 18px 56px; }
.method li::before { content: counter(m); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-s); background: var(--marigold); color: oklch(0.22 0.03 238); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.method li::after { content: ''; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--line); }
.method li:last-child::after { display: none; }
.method h3 { font-size: 1.12rem; margin-bottom: 4px; }
.method p { color: var(--ink-2); margin: 0; }
.spec-sheet { background: var(--paper); color: oklch(0.235 0.028 238); border-radius: 4px; padding: 22px 24px 18px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); position: relative; }
.spec-sheet::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(90deg, var(--steel) 0 18px, transparent 18px 24px); border-radius: 4px 4px 0 0; opacity: 0.85; }
.spec-sheet-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; margin: 4px 0 12px; color: oklch(0.45 0.026 236); }
.spec-sheet dl { margin: 0; }
.spec-sheet dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; padding: 9px 0; border-bottom: 1px dotted oklch(0.78 0.02 232); }
.spec-sheet dt { color: oklch(0.45 0.026 236); }
.spec-sheet dd { margin: 0; font-weight: 700; text-align: right; }
.spec-sheet .fine { margin: 12px 0 0; font-size: 0.82rem; color: oklch(0.45 0.026 236); }

/* ── Content pages ──────────────────────────────────────────────────── */
.doc-head, .hub-head { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.doc-head::before, .hub-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent 40%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.doc-head-inner, .hub-head .wrap { position: relative; padding-block: 26px 34px; }
.doc-head-inner.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.doc-head h1, .hub-head h1 { max-width: 24ch; margin-bottom: 0.35em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; margin-bottom: 18px; }
.kind-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }
.kind-tag svg { color: var(--link); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 16px; font-size: 0.9rem; }
.crumbs li { display: inline-flex; align-items: center; color: var(--ink-2); }
.crumbs li + li::before { content: '/'; margin: 0 9px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--link); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.95rem; color: var(--ink-2); }
.meta-row li { display: inline-flex; align-items: center; gap: 7px; }
.level { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.level-bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.level-bars i { width: 5px; height: 14px; border-radius: 2px; background: var(--line); }
.level-bars i:nth-child(1) { height: 8px; }
.level-bars i:nth-child(2) { height: 11px; }
.level-1 .level-bars i:nth-child(-n+1), .level-2 .level-bars i:nth-child(-n+2), .level-3 .level-bars i:nth-child(-n+3) { background: var(--steel); }
[data-theme='dark'] .level-1 .level-bars i:nth-child(-n+1), [data-theme='dark'] .level-2 .level-bars i:nth-child(-n+2), [data-theme='dark'] .level-3 .level-bars i:nth-child(-n+3) { background: var(--link); }
.needs { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 0.95rem; color: var(--ink-2); }
.needs svg { margin-top: 3px; color: var(--link); }
.doc-head--code .doc-head-aside { text-align: center; }
.doc-head--type .doc-head-aside { width: min(340px, 34vw); }
.type-art { color: var(--ink); }
.type-art .art .fill-body { fill: var(--bg); }
.type-art .art .fill-soft { fill: var(--surface-2); }

.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 5vw, 64px); padding-block: 34px 72px; }
.doc-main { min-width: 0; max-width: 780px; }
.doc-main > * + * { margin-top: 36px; }
.doc-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 8px; }
.toc { border-left: 2px solid var(--line); padding-left: 16px; }
.toc-title { font-weight: 700; font-size: 0.92rem; margin: 0 0 8px; }
.toc a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 0.94rem; line-height: 1.35; }
.toc a:hover { color: var(--link); }
.toc a.is-active { color: var(--ink); font-weight: 700; }
.side-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.side-card p { font-size: 0.94rem; color: var(--ink-2); }
.side-card .side-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.side-card .side-card-title svg { color: var(--link); }
.side-promise { display: flex; gap: 10px; font-size: 0.9rem; color: var(--ink-2); }
.side-promise svg { color: var(--ok); margin-top: 2px; }
.side-promise p { margin: 0; }
.side-promise strong { color: var(--ink); }

/* First try (highlighter) */
.first-try { padding: 24px 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); }
.first-try h2 { font-size: 1.1rem; margin-bottom: 10px; }
.first-try p { font-size: 1.14rem; line-height: 1.6; }
.hl { background: linear-gradient(100deg, transparent 0.3em, var(--hl) 0.3em, var(--hl) calc(100% - 0.2em), transparent calc(100% - 0.2em)) no-repeat 0 60% / 100% 70%; color: inherit; padding: 0 0.35em; margin-left: -0.35em; border-radius: 2px; animation: hl-sweep 0.6s 0.2s var(--ease) both; }
@keyframes hl-sweep { from { background-size: 0% 70%; } }
[data-theme='dark'] .hl { color: oklch(0.2 0.03 238); background: var(--hl); padding: 0.05em 0.4em; margin-left: 0; border-radius: 3px; animation-name: hl-sweep-full; }
@keyframes hl-sweep-full { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Signs and causes */
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.ticks li > svg { margin-top: 3px; color: var(--ok); }
.ticks--warn li > svg { color: var(--stop-ink); }
.ticks--info li > svg { color: var(--link); }
.ticks--arrow li > svg { color: var(--link); }
.causes li { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.causes li:last-child { border-bottom: 0; }
.odds { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.odds-dot { width: 22px; height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.odds-dot::after { content: ''; position: absolute; inset: 0 auto 0 0; background: var(--steel); border-radius: 3px; }
[data-theme='dark'] .odds-dot::after { background: var(--link); }
.odds-common .odds-dot::after { width: 100%; }
.odds-sometimes .odds-dot::after { width: 60%; }
.odds-rare .odds-dot::after { width: 28%; }

/* Notes */
.note { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--info-line); background: var(--info-soft); }
.note p:last-child { margin-bottom: 0; }
.note-title { font-weight: 700; margin-bottom: 4px; }
.note-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--link); }
.note-bench { background: var(--marigold-soft); border-color: var(--marigold-line); }
.note-bench .note-icon { color: oklch(0.45 0.1 70); background: var(--marigold); }
[data-theme='dark'] .note-bench .note-icon { color: oklch(0.22 0.03 238); }
.note-safety { background: var(--marigold-soft); border-color: var(--marigold-line); border-style: dashed; }
.note-safety .note-icon { color: oklch(0.45 0.1 70); }
[data-theme='dark'] .note-safety .note-icon { color: var(--marigold); }
.note-stop { background: var(--stop-soft); border-color: var(--stop-line); }
.note-stop .note-icon { color: var(--stop-ink); }
.note-ok { background: var(--ok-soft); border-color: var(--ok-line); }

/* Steps */
.section-head { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { color: var(--ink-2); margin: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line-strong); margin-bottom: 18px; }
.tabs [role='tab'] { display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 13px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-s) var(--radius-s) 0 0; background: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; position: relative; top: 1px; }
.tabs [role='tab']:hover { color: var(--ink); background: var(--surface); }
.tabs [role='tab'][aria-selected='true'] { color: var(--ink); background: var(--bg); border-color: var(--line-strong); box-shadow: inset 0 3px 0 var(--marigold); }
.tab-yours { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.panel:focus-visible { outline-offset: 6px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }
.progress { margin: 0; font-size: 0.9rem; color: var(--ink-2); font-family: var(--font-mono); }
.progress.is-done { color: var(--ok); font-weight: 700; }
.steps { counter-reset: s; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.step-tag { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-s); background: var(--steel); color: var(--on-steel); font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; position: relative; transition: background-color 0.25s var(--ease); }
[data-theme='dark'] .step-tag { background: var(--surface-2); border: 1px solid var(--line-strong); }
.step-tick { position: absolute; opacity: 0; transform: scale(0.6); transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.step.is-done .step-tag { background: var(--ok); color: oklch(1 0 0); }
[data-theme='dark'] .step.is-done .step-tag { color: oklch(0.18 0.03 238); }
.step.is-done .step-n { opacity: 0; }
.step.is-done .step-tick { opacity: 1; transform: none; }
.step-title { font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; letter-spacing: 0; margin: 6px 0 6px; }
.step-body > p { margin-bottom: 10px; }
.step-see { display: flex; gap: 8px; align-items: flex-start; font-size: 0.95rem; color: var(--ink-2); padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); }
.step-see svg { margin-top: 3px; color: var(--ok); }
.step-done { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--bg); font-size: 0.92rem; font-weight: 700; color: var(--ink-2); transition: all 0.18s var(--ease); }
.step-done:hover { border-color: var(--ok); color: var(--ok); }
.step-done[aria-pressed='true'] { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.cmd { display: flex; align-items: stretch; margin: 4px 0 12px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--lcd-edge); background: var(--lcd-bg); }
.cmd code { flex: 1; min-width: 0; display: block; padding: 12px 14px; background: transparent; color: var(--lcd-ink); font-size: 0.95rem; white-space: pre-wrap; border-radius: 0; }
.cmd-copy { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 14px; border: 0; border-left: 1px solid var(--lcd-edge); background: oklch(0.31 0.035 178); color: var(--lcd-ink); font-weight: 700; font-size: 0.9rem; min-height: 44px; }
.cmd-copy:hover { background: oklch(0.35 0.04 178); }

/* Feedback */
.feedback { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback-yes, .feedback-no { margin-top: 16px; }
.feedback-yes p, .feedback-no .fine { margin: 0; }
.feedback [data-fb][aria-pressed='true'] { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 0; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--ink-2); transition: transform 0.2s var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq summary:hover { color: var(--link); }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); }
.faq details > div p { margin: 0; }

/* Link rows */
.rows { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; min-height: 56px; color: var(--ink); text-decoration: none; }
.rows a:hover .row-title { color: var(--link); text-decoration: underline; }
.row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--steel); flex: none; }
[data-theme='dark'] .row-icon { color: var(--link); }
.row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-kind { font-size: 0.8rem; color: var(--ink-2); font-weight: 700; }
.row-title { font-weight: 700; line-height: 1.35; }
.row-sum { font-size: 0.92rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.row-go { color: var(--ink-2); flex: none; transition: transform 0.2s var(--ease); }
.rows a:hover .row-go { transform: translateX(3px); color: var(--link); }
.related h2 { margin-bottom: 12px; }
.sub-h { margin-top: 28px; }

/* Code page specifics */
.meaning-text { font-size: 1.14rem; }

/* How-to specifics */
.intro-text { font-size: 1.14rem; }
.needs-box { padding: 20px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.needs-box h2 { display: flex; align-items: center; gap: 8px; }
.needs-box h2 svg { color: var(--link); }

/* Prose (brands, types, legal) */
.prose p, .prose li { max-width: var(--measure); }
.prose h3 { margin-top: 1.4em; font-size: 1.15rem; }
.prose ul:not([class]) li { list-style: disc; margin: 0 0 0.5em 1.2em; padding-left: 0.2em; }
.numbered { counter-reset: n; }
.numbered li { counter-increment: n; position: relative; padding: 8px 0 8px 44px; }
.numbered li::before { content: counter(n); position: absolute; left: 0; top: 7px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); font-weight: 800; font-family: var(--font-display); font-size: 0.95rem; }
.spec-list > div { display: grid; grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.spec-list dt { font-weight: 700; font-family: var(--font-display); font-size: 1.05rem; }
.spec-list dd { margin: 0; color: var(--ink-2); }
.habits li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.habit-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-s); background: var(--marigold); color: oklch(0.22 0.03 238); font-family: var(--font-display); font-weight: 800; }
.habits h3 { font-family: var(--font-body); font-size: 1.08rem; letter-spacing: 0; margin: 4px 0 4px; }
.habits p { margin: 0; color: var(--ink-2); }
.official { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.official h2 { display: flex; align-items: center; gap: 8px; }
.official p { color: var(--ink-2); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pros-cons > div { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.pros-cons h2 { display: flex; align-items: center; gap: 8px; }
.pros-cons h2 svg { color: var(--link); }
.care { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.care th, .care td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.care thead th { font-size: 0.85rem; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding-top: 0; }
.care tbody th { font-weight: 700; white-space: nowrap; width: 1%; }
.care--compare tbody th, .care--cookies tbody th { white-space: normal; }
.table-scroll { overflow-x: auto; }
.prose--legal > section + section { margin-top: 40px; }
.prose--legal h2 { padding-top: 6px; }
.promise-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.promise-list li > svg { color: var(--ok); margin-top: 3px; }
.promise-list--never li > svg { color: var(--stop-ink); }
.promise-list h3 { font-family: var(--font-body); font-size: 1.06rem; letter-spacing: 0; margin: 0 0 2px; }
.promise-list p { margin: 0; color: var(--ink-2); }
.method--page { margin-top: 8px; }
.empty-log { display: flex; gap: 10px; align-items: center; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); }
.empty-log svg { color: var(--ok); }
.empty-log p { margin: 0; }

/* ── Hubs ───────────────────────────────────────────────────────────── */
.hub-body { padding-block: 32px 80px; }
.jump ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jump a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 700; }
.jump a svg { color: var(--link); }
.jump a:hover { border-color: var(--link); }
.hub-group + .hub-group { margin-top: 52px; }
.hub-group-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.hub-group-head h2 { margin: 0; font-size: 1.5rem; }
.hub-group-head p { margin: 2px 0 0; color: var(--ink-2); }
.hub-group-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius); background: var(--steel); color: var(--on-steel); flex: none; }
[data-theme='dark'] .hub-group-icon { background: var(--surface-2); color: var(--link); }
.count-pill { margin-left: auto; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.fix-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.fix-index li { border-bottom: 1px solid var(--line); }
.fix-index a { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; color: var(--ink); text-decoration: none; height: 100%; }
.fix-index-title { font-weight: 700; font-size: 1.08rem; }
.fix-index a:hover .fix-index-title { color: var(--link); text-decoration: underline; }
.fix-index-sum { color: var(--ink-2); font-size: 0.94rem; line-height: 1.45; }
.fix-index-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 0.86rem; color: var(--ink-2); margin-top: 4px; }
.fix-index-meta .level { font-weight: 400; color: var(--ink-2); }
.code-lookup--hub { margin: 18px 0 0; }
.code-index a, .guide-index a { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.code-index .lcd-chip { min-width: 9.5rem; text-align: center; }
.code-index-text, .guide-index-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.code-index-title, .guide-index-title { font-weight: 700; }
.code-index a:hover .code-index-title, .guide-index a:hover .guide-index-title { color: var(--link); text-decoration: underline; }
.code-index-sum, .guide-index-sum { font-size: 0.93rem; color: var(--ink-2); }
.guide-index { border-top: 1px solid var(--line); }
.guide-index-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--steel); flex: none; }
[data-theme='dark'] .guide-index-icon { color: var(--link); }
.guide-index-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }
.brand-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.brand-index a { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; height: 100%; }
.brand-index-name { font-family: var(--font-display); font-weight: 720; font-stretch: 88%; font-size: 1.6rem; letter-spacing: -0.01em; }
.brand-index-sum { color: var(--ink-2); font-size: 0.95rem; flex: 1; }
.brand-index a:hover .brand-index-name { color: var(--link); }
.type-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.type-index a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color 0.2s var(--ease); }
.type-index a:hover { border-color: var(--link); color: var(--ink); }
.type-index-art { color: var(--ink); margin-bottom: 8px; }
.type-index-art .art .fill-body { fill: var(--bg); }
.type-index-art .art .fill-soft { fill: var(--surface-2); }
.type-index-name { font-family: var(--font-display); font-weight: 720; font-size: 1.35rem; }
.type-index-sum { color: var(--ink-2); font-size: 0.95rem; flex: 1; }
.compare { margin-top: 56px; }
.tool-index li + li { margin-top: 14px; }
.tool-index a { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-l); color: var(--ink); text-decoration: none; transition: border-color 0.2s var(--ease); }
.tool-index a:hover { border-color: var(--link); color: var(--ink); }
.tool-index-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--radius); background: var(--steel); color: var(--marigold); flex: none; }
.tool-index-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tool-index-title { font-family: var(--font-display); font-weight: 720; font-size: 1.35rem; }
.tool-index-sum { color: var(--ink-2); }
.tool-index-meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.tool-index + .note { margin-top: 32px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.contact-card > svg { color: var(--link); margin-bottom: 10px; }
.contact-card p { color: var(--ink-2); flex: 1; }
.contact-card .btn { white-space: normal; text-align: left; }
.contact-meta { margin-top: 32px; max-width: var(--measure); }

/* Sitemap */
.sitemap > section + section { margin-top: 44px; }
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 36px; }
.sitemap-cols h3 { font-size: 1.05rem; margin-bottom: 8px; }
.sitemap-list li { padding: 4px 0; }

/* Search page + 404 */
.page-search { max-width: 680px; }
.search-status { color: var(--ink-2); }
.rows--results .row-sum { display: block; }
.empty { text-align: center; max-width: 520px; margin: 24px auto; color: var(--ink-2); }
.empty .art { width: 140px; margin: 0 auto 10px; color: var(--ink-2); }
.empty .art .fill-paper { fill: var(--bg); }
.empty .art .fill-soft { fill: var(--surface-2); }
.empty .btn { margin: 4px; }
.not-found { text-align: center; }
.nf-readout { margin-bottom: 26px; }
.not-found .lede { margin-inline: auto; }
.not-found .page-search { margin: 0 auto 22px; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }

/* ── Tools ──────────────────────────────────────────────────────────── */
.dx { max-width: 760px; }
.dx-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.dx-progress span { display: block; height: 100%; width: 100%; background: var(--marigold); border-radius: 3px; transform: scaleX(0.12); transform-origin: left center; transition: transform 0.35s var(--ease); }
.dx-card { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg); box-shadow: var(--shadow-1); }
.dx-step { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); margin-bottom: 6px; }
.dx-q { outline: none; }
.dx-hint { color: var(--ink-2); }
.dx-options { display: grid; gap: 8px; }
.dx-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-align: left; text-decoration: none; font-weight: 700; transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease); }
.dx-option > svg:first-child { color: var(--link); flex: none; }
.dx-option span { flex: 1; }
.dx-option:hover { border-color: var(--link); background: var(--surface); color: var(--ink); }
.dx-results .rows { margin-top: 6px; }
.dx-best { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--marigold); color: oklch(0.22 0.03 238); margin-left: 6px; vertical-align: 2px; }
.dx-nav { display: flex; gap: 8px; margin-top: 18px; }
.dx-fine { margin-top: 16px; }
.dx-card.is-entering { animation: dx-in 0.28s var(--ease); }
@keyframes dx-in { from { opacity: 0; transform: translateX(12px); } }

.sheets-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
.sheet-controls { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.sheet-controls fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.sheet-controls legend { font-weight: 700; margin-bottom: 6px; }
.sheet-controls label { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.sheet-controls input[type='radio'] { width: 18px; height: 18px; accent-color: var(--steel); }
.sheet-controls .fine { margin: 0; }
.sheet-read ul li { padding: 4px 0; font-size: 0.93rem; }
.sheet-stage { background: var(--surface-2); border-radius: var(--radius-l); padding: clamp(14px, 3vw, 32px); overflow-x: auto; }
.sheet { background: #fff; color: #111; margin: 0 auto; aspect-ratio: 8.5 / 11; width: 100%; max-width: 680px; padding: 5%; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 12px; font-family: var(--font-body); }
.sheet-stage[data-paper='a4'] .sheet { aspect-ratio: 210 / 297; }
.sheet-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid #ccc; font-size: 0.85rem; color: #333; }
.sheet-head strong { font-family: var(--font-display); font-size: 1.15rem; color: #111; }
.sheet-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sheet-swatches div { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 0.72rem; }
.sheet-swatches .sw { display: block; width: 100%; aspect-ratio: 1; border-radius: 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet-swatches em, .sheet-ramp em, .sheet-text em { font-style: normal; color: #555; }
.sheet-label { margin: 6px 0 0; font-size: 0.76rem; color: #444; }
.sheet-ramp { display: grid; grid-template-columns: repeat(11, 1fr); border: 1px solid #ddd; }
.sheet-ramp span { aspect-ratio: 1.2; display: flex; align-items: flex-end; justify-content: center; font-size: 0.6rem; padding-bottom: 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet-ramp span:nth-child(n+6) em { color: #fff; }
.sheet-grad { height: 28px; border-radius: 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet-lines, .sheet-nozzle, .sheet-grid { width: 100%; height: auto; }
.sheet-text { margin: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.sheet-text em { font-size: 7pt; display: inline-block; width: 3.2em; }
.sheet-text--serif { font-family: Georgia, 'Times New Roman', serif; }
.sheet-text--bold { font-weight: 700; }
.sheet-solid { flex: 1; min-height: 60px; background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.calc-usage { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 18px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.95rem; position: relative; }
.calc input[type='number'], .calc input[type='text'] { min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--bg); font-size: 1.08rem; font-variant-numeric: tabular-nums; width: 100%; }
.calc input:focus { outline: 3px solid var(--link); outline-offset: 0; border-color: var(--link); }
.calc-usage label { width: 220px; }
.calc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.calc-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; display: grid; gap: 14px; }
.calc-col legend { padding: 0 6px; margin-left: -6px; }
.calc-col legend input { font-family: var(--font-display) !important; font-weight: 720; font-size: 1.2rem !important; border-color: transparent !important; padding: 0 6px !important; min-height: 40px !important; background: transparent !important; }
.calc-col legend input:hover { border-color: var(--line) !important; }
.unit { position: absolute; right: 12px; bottom: 12px; color: var(--ink-2); font-weight: 400; pointer-events: none; }
.hint { font-weight: 400; color: var(--ink-2); font-size: 0.85rem; }
.calc-out { margin: 22px 0 28px; }
.calc-table { width: 100%; border-collapse: collapse; }
.calc-table th, .calc-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; font-family: var(--font-body); }
.calc-table thead th { font-family: var(--font-display); font-size: 1.05rem; border-bottom: 2px solid var(--ink); }
.calc-table tr.is-total td { font-weight: 700; font-size: 1.08rem; }
.calc-verdict { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--marigold-soft); border: 1px solid var(--marigold-line); }
.calc-verdict p { margin: 0; }
.calc-verdict svg { margin-top: 2px; flex: none; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer { background: var(--steel-2); color: var(--on-steel-2); padding-top: 56px; font-size: 0.95rem;
  background-image: linear-gradient(var(--steel-line) 1px, transparent 1px), linear-gradient(90deg, var(--steel-line) 1px, transparent 1px);
  background-size: 24px 24px; }
.footer a { color: var(--on-steel); text-decoration: none; }
.footer a:hover { color: var(--marigold); text-decoration: underline; }
.footer :focus-visible { outline-color: var(--marigold); }
.footer-top { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: 48px; padding-bottom: 40px; }
.brand--on-steel { color: var(--on-steel); }
.brand--on-steel:hover { color: var(--on-steel); text-decoration: none !important; }
.footer-brand p { margin: 16px 0; max-width: 34ch; }
.footer-promises li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--on-steel); }
.footer-promises svg { color: var(--marigold); }
.footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer-nav h2 { font-family: var(--font-display); font-size: 1rem; color: var(--on-steel); margin: 0 0 10px; letter-spacing: 0; }
.footer-nav ul + h2 { margin-top: 22px; }
.footer-nav li { padding: 4px 0; }
.footer-legal { border-top: 1px solid var(--steel-line-major); padding-block: 24px 28px; font-size: 0.88rem; }
.footer-legal p { max-width: 110ch; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-top: 12px; border-top: 1px dashed var(--steel-line-major); }
.footer-base p { margin: 0; }
.footer .link-btn { color: var(--on-steel); }
.footer .link-btn:hover { color: var(--marigold); }

/* Consent + toast */
.consent { position: fixed; inset: auto 12px 12px; z-index: var(--z-dialog); display: flex; justify-content: center; pointer-events: none; }
.consent-inner { pointer-events: auto; display: flex; gap: 20px; align-items: center; max-width: 920px; width: 100%; padding: 18px 20px; border-radius: var(--radius-l); background: var(--bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); animation: drop 0.25s var(--ease); }
.consent h2 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.consent p { margin: 0; font-size: 0.93rem; color: var(--ink-2); }
.consent-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.consent-text { flex: 1; min-width: 0; }
.consent-more { min-height: 44px; padding: 0 8px; font-weight: 700; color: var(--ink-2); }
.consent-more:hover { color: var(--ink); }

/* Cookie settings panel */
.consent-dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-2); }
.consent-dialog[open] { animation: drop 0.2s var(--ease); }
.consent-dialog::backdrop { background: oklch(0.15 0.03 238 / 0.55); }
.consent-dialog-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.consent-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 4px 22px; }
.consent-dialog-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; }
.consent-dialog-head h2 svg { color: var(--link); }
.consent-dialog-intro { margin: 0; padding: 0 22px 12px; color: var(--ink-2); }
.consent-cats { list-style: none; margin: 0; padding: 0 22px; overflow-y: auto; border-top: 1px solid var(--line); }
.consent-cat { display: flex; align-items: flex-start; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.consent-cat:last-child { border-bottom: 0; }
.consent-cat-text { flex: 1; min-width: 0; }
.consent-cat-name { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; cursor: pointer; }
.consent-cat p { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.consent-locked { flex: none; margin-top: 2px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.85rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.consent-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.switch { appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0; border-radius: 999px; background: var(--ink-2); cursor: pointer; transition: background-color 0.18s var(--ease); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px oklch(0 0 0 / 0.3); transition: transform 0.2s var(--ease); }
.switch:checked { background: var(--steel); }
[data-theme='dark'] .switch:checked { background: var(--link); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
.switch:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: var(--z-toast); padding: 10px 16px; border-radius: var(--radius-s); background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Live chat launcher (stands in for Tidio's button until chat is used) */
.chat-launcher { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: var(--z-sticky); display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--steel); color: var(--on-steel); font: inherit; font-weight: 700; font-size: 1rem; box-shadow: var(--shadow-2); cursor: pointer; animation: chat-in 0.45s var(--ease) 0.8s both; transition: background-color 0.18s var(--ease), transform 0.18s var(--ease); }
.chat-launcher svg { color: var(--marigold); flex: none; }
.chat-launcher:hover { background: var(--steel-2); transform: translateY(-2px); }
.chat-launcher:active { transform: translateY(0); }
.chat-launcher:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 999px; }
.chat-launcher.is-loading { cursor: progress; }
.chat-launcher.is-loading svg { animation: chat-wait 0.9s var(--ease) infinite alternate; }
[data-theme='dark'] .chat-launcher { background: var(--link); color: oklch(0.18 0.03 238); }
[data-theme='dark'] .chat-launcher svg { color: currentColor; }
[data-theme='dark'] .chat-launcher:hover { background: var(--link-hover); }
@keyframes chat-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes chat-wait { from { opacity: 1; } to { opacity: 0.35; } }
/* keep the footer's last line clear of the chat button */
body:has(.chat-launcher, #tidio-chat) .footer-base { padding-bottom: 72px; }

/* Ads */
.ad { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); min-height: 120px; }
.ad-label { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .search-btn-text, .search-kbd { display: none; }
  .search-btn { min-width: 44px; padding: 0 10px; }
}
@media (max-width: 1080px) {
  .primary, .btn-diagnose { display: none; }
  .menu-btn { display: inline-flex; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-side { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .doc-side .toc, .doc-side [data-print] { display: none; }
  .doc-main { max-width: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 560px; }
  .drawer-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .sheets-layout { grid-template-columns: minmax(0, 1fr); }
  .sheet-controls { position: static; }
}
@media (max-width: 860px) {
  .strip nav { display: none; }
  .code-split, .guides-tools, .spec-split, .brands-row { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules-col + .rules-col { border-left: 0; border-top: 1px solid var(--steel-line-major); }
  .section-intro, .section-intro--row { grid-template-columns: minmax(0, 1fr); }
  .section-intro .link-arrow, .section-intro--row p { grid-column: 1; grid-row: auto; }
  .doc-head-inner.has-aside { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .doc-head--code .doc-head-aside { text-align: left; order: -1; }
  .doc-head--type .doc-head-aside { width: min(300px, 80vw); order: -1; }
  .fix-index { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-cols { grid-template-columns: minmax(0, 1fr); }
  .consent-inner { flex-direction: column; align-items: stretch; }
  .consent-actions { flex-wrap: wrap; }
  .consent-actions .btn { flex: 1; }
  .consent-more { flex-basis: 100%; }
  .consent-dialog-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  body { font-size: 1.03rem; }
  .chat-launcher { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .chat-launcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .strip { font-size: 0.82rem; }
  .masthead-inner { gap: 8px; min-height: 60px; }
  .wordmark { font-size: 1.28rem; }
  .hero-art { display: none; }
  .hero-search-field { flex-wrap: wrap; padding: 6px; }
  .hero-search-field > svg { display: none; }
  .hero-search-field input { flex-basis: 100%; padding-left: 10px; }
  .hero-search-field .btn { width: 100%; }
  .hero-promises ul { flex-direction: column; gap: 8px; }
  .drawer-index, .type-strip, .code-chips, .signs, .pros-cons { grid-template-columns: minmax(0, 1fr); }
  .causes li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .step-tag { width: 34px; height: 34px; font-size: 1rem; }
  .first-try { padding: 18px; }
  .note { flex-direction: column; gap: 10px; }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .code-index a { flex-wrap: wrap; gap: 8px 14px; }
  .code-index .lcd-chip { min-width: 0; }
  .code-index .row-go, .guide-index-meta { display: none; }
  .tool-index a { flex-wrap: wrap; }
  .tool-index-meta, .tool-index .row-go { display: none; }
  .lcd-field { flex-wrap: wrap; }
  .lcd-field .btn { width: 100%; }
  .job-list a { grid-template-columns: 2rem minmax(0, 1fr); }
  .job-time { grid-column: 2; }
  .care tbody th { white-space: normal; }
  .care, .care thead, .care tbody, .care tr, .care th, .care td { display: block; width: auto; }
  .care thead { display: none; }
  .care tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .care th, .care td { padding: 2px 0; border: 0; }
  .lcd-text { white-space: normal; overflow-wrap: anywhere; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .footer-base { flex-direction: column; }
}
@media (max-width: 360px) {
  .masthead-actions .search-btn { display: none; }
}

/* ── Motion preferences ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── Print ──────────────────────────────────────────────────────────── */
@media print {
  :root, [data-theme='dark'] { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --ink: #000; --ink-2: #333; --line: #bbb; --line-strong: #888; --link: #000; --steel: #222; --on-steel: #fff; color-scheme: light; }
  body { font-size: 11pt; }
  .strip, .masthead, .footer, .doc-side, .feedback, .related, .tabs, .step-done, .cmd-copy, .consent, .toast, .chat-launcher, #tidio-chat, .ad, .skip, .search-dialog, .drawer, .hero-search, .popular, .diagnose-strip, .crumbs, .link-arrow { display: none !important; }
  .doc-head, .hub-head { background: none; border: 0; }
  .doc-head::before, .hub-head::before { display: none; }
  .doc-grid { display: block; padding: 0; }
  .panel[hidden] { display: block !important; }
  .panel { break-inside: auto; margin-bottom: 18pt; }
  .step { break-inside: avoid; }
  .step-tag { background: #fff !important; color: #000 !important; border: 1.5pt solid #000; }
  .faq details > div { display: block; }
  .faq details:not([open]) > div { display: block; }
  .faq summary svg { display: none; }
  a { color: #000; text-decoration: none; }
  .cmd { background: #fff; border-color: #000; }
  .cmd code { color: #000; }
  .lcd-readout, .lcd-glass { background: #fff !important; box-shadow: none; border: 1pt solid #000; }
  .lcd-text { color: #000; text-shadow: none; }
  .hl { background: none; text-decoration: underline; }
  @page { margin: 16mm; }
  body.page-sheets main > *:not(.hub-body), body.page-sheets .sheet-controls { display: none !important; }
  body.page-sheets .hub-body, body.page-sheets .sheets-layout, body.page-sheets .sheet-stage { display: block; padding: 0; margin: 0; background: none; }
  body.page-sheets .sheet { box-shadow: none; max-width: none; width: 100%; aspect-ratio: auto; height: 245mm; padding: 0; }
}
