:root {
  --bg: #111317;
  --surface: #1a1d23;
  --surface-2: #22262e;
  --border: #2e333d;
  --text: #ececef;
  --muted: #a3a8b3;
  --accent: #ff7a1a;
  --accent-hover: #ff9447;
  --accent-ink: #1a0e04;
  --info: #3a8dde;
  --warn: #ff5a4a;
  --warn-bg: #2a1716;
  --radius: 12px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.accent { color: var(--accent); }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); background: rgba(17,19,23,.92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand b { color: var(--accent); }
.logo-mark { color: var(--accent); }
.header-link { color: var(--muted); text-decoration: none; font-size: .95rem; }
.header-link:hover { color: var(--text); }
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--muted); }
.disclosure { color: var(--text); font-weight: 600; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 18px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* hero */
.hero { padding: 40px 0 12px; }
.hero-small { padding-top: 24px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section { margin-top: 36px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: .5em; }
.section-head h2 { margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .85em; margin-right: 6px; vertical-align: 2px; }


/* buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); padding: 11px 18px; border-radius: 8px; text-decoration: none; text-align: center; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-small { padding: 8px 14px; font-size: .9rem; white-space: nowrap; }
.btn-disabled { background: var(--surface-2); color: var(--muted); cursor: default; border: 1px dashed var(--border); }
.btn-disabled:hover { background: var(--surface-2); color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }

/* cards & tiles */
.display-grid, .tile-grid, .chips, .parts, .steps { list-style: none; padding: 0; margin: 0; }
.display-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.display-card, .tile { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.display-card:hover, .tile:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.display-name { font-size: 1.25rem; font-weight: 800; color: var(--accent); }
.display-desc, .tile-sub { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile-label { font-weight: 800; font-size: 1.05rem; }
.tile-code .tile-label { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.3rem; color: var(--accent); }

/* fix page */
.fix-header { padding: 24px 0 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.fix-header .lede { margin-top: -4px; }
.answer { background: linear-gradient(135deg, rgba(255,122,26,.16), rgba(255,122,26,.04)); border: 1px solid rgba(255,122,26,.45); border-radius: var(--radius); padding: 18px 20px; margin-top: 16px; }
.answer h2 { font-size: 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.answer p { font-size: 1.15rem; margin: 0; }

.callout { border-radius: var(--radius); padding: 16px 20px; margin-top: 24px; border: 1px solid var(--border); background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-size: 1.1rem; }
.callout-info { border-left: 4px solid var(--info); }
.callout-warn { border: 1px solid rgba(255,90,74,.5); border-left: 4px solid var(--warn); background: var(--warn-bg); }
.callout-warn .callout-title { color: var(--warn); }

.steps { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.step-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.step-check { appearance: none; flex: none; width: 24px; height: 24px; margin: 2px 0 0; border: 2px solid var(--border); border-radius: 6px; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.step-check::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.step-check:checked { background: var(--accent); border-color: var(--accent); }
.step-check:checked::after { opacity: 1; }
.step-body { display: grid; gap: 4px; }
.step-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.step-detail { color: var(--muted); font-size: .95rem; }
.step-row:has(.step-check:checked) { opacity: .55; }
.step-row:has(.step-check:checked) strong { text-decoration: line-through; }

.badge { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; }
.badge-free { background: rgba(74,200,120,.16); color: #6fdc96; }
.badge-easy { background: rgba(58,141,222,.18); color: #7ab8f2; }
.badge-moderate { background: rgba(255,122,26,.18); color: var(--accent-hover); }
.badge-shop { background: rgba(255,90,74,.18); color: #ff8a7e; }

.parts { display: grid; gap: 10px; }
.part { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.part h3 { margin-bottom: 2px; }
.part p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .part { flex-direction: column; align-items: stretch; } }

.related h2 { font-size: 1.05rem; margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; background: var(--surface); }
.chips a:hover { border-color: var(--accent); }

/* search */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-inner { gap: 16px; }
.site-header .search { flex: 1; max-width: 340px; margin-left: auto; }
.search { position: relative; }
.search-input { width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px 8px 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a8b3' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
.search-input:focus { border-color: var(--accent); outline: none; }
.search-input::placeholder { color: var(--muted); }
.search-hero { max-width: 560px; margin: 8px 0 14px; }
.search-hero .search-input { font-size: 1.1rem; padding: 14px 18px 14px 44px; background-position: 16px center; background-size: 20px; border-width: 2px; }
.search-results { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.5); overflow: hidden; }
.result.is-active, .result:hover { background: var(--surface-2); color: var(--text); }
.no-results { margin: 0; padding: 12px 14px; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .site-header .search { order: 3; flex-basis: 100%; max-width: none; }
  .main-nav { margin-left: auto; gap: 2px 14px; }
  .main-nav a { font-size: .88rem; }
}

/* misc */
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: rgba(255,122,26,.12); color: var(--accent-hover); }
.range { font-size: .8em; font-weight: 500; margin-left: 6px; }
.pick { margin-top: 28px; }
.jump a { margin: 0 2px; }
.feedback { margin-top: 24px; font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 1em; }

.code-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.code-table th, .code-table td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--border); }
.code-table th { border-top: 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.code-table td:first-child { width: 5.5em; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 800; }
.code-table a { text-decoration: none; }

/* display finder */
.finder-grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.finder-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.finder-card h2 { margin: 6px 0 0; color: var(--accent); font-size: 1.25rem; }
.finder-card p { margin: 0; font-size: .92rem; }
.finder-card .btn { margin-top: auto; align-self: flex-start; }
.display-drawing { width: 100%; height: auto; background: #15171c; border-radius: 8px; padding: 10px 8px 4px; }
.clues { margin: 4px 0 10px; padding-left: 1.1em; font-size: .9rem; }
.clues li { margin: 2px 0; }
.tips { margin: 0; padding-left: 1.2em; }
.tips li { margin: 6px 0; }

/* text pages */
.prose { max-width: 680px; padding-top: 24px; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.contact-email { font-size: 1.2rem; font-weight: 700; }

@media print {
  .site-header, .site-footer, .related, .parts, .feedback, .crumbs { display: none; }
  body { background: #fff; color: #000; }
  .step-row, .callout, .answer { background: #fff; border-color: #999; }
}

/* search results (grouped by display) */
.search-results { max-height: min(70vh, 520px); overflow-y: auto; }
.result-group + .result-group { border-top: 1px solid var(--border); }
.result-group-title { margin: 0; padding: 8px 14px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.result { display: flex; gap: 12px; align-items: baseline; min-height: 44px; padding: 10px 14px; text-decoration: none; color: var(--text); }
.result-label { flex: none; min-width: 4.6em; font-weight: 800; color: var(--accent); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.result-sub { font-size: .95rem; }
.search-label { display: block; font-weight: 700; margin-bottom: 6px; }
.hero-hint { margin-top: -4px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .92em; }

/* source badges */
.src-badge { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }
.src-manual { background: rgba(74,200,120,.16); color: #6fdc96; border: 1px solid rgba(74,200,120,.35); }
.src-reported { background: rgba(255,196,0,.12); color: #ffd25c; border: 1px solid rgba(255,196,0,.35); }

/* safety banners */
.banner { border-radius: var(--radius); padding: 16px 20px; margin-top: 16px; }
.banner h2 { font-size: 1.15rem; margin-bottom: .35em; }
.banner p { margin: 0; }
.banner-stop { background: #3a1210; border: 2px solid var(--warn); }
.banner-stop h2 { color: #ff8a7e; }
.banner-charge { background: rgba(255,196,0,.08); border: 1px solid rgba(255,196,0,.4); }
.banner-charge h2 { color: #ffd25c; }
.banner-status { background: rgba(58,141,222,.1); border: 1px solid rgba(58,141,222,.45); }
.banner-status h2 { color: #7ab8f2; }

/* quick answer + try first */
.answer h2 { font-size: 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.answer p { font-size: 1.08rem; }
.answer p:last-child { margin-bottom: 0; }
.code-note { font-size: .98rem !important; color: var(--text); border-top: 1px solid rgba(255,122,26,.3); padding-top: 10px; }
.try-first { margin-top: 24px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.try-first h2 { margin-bottom: .2em; }
.try-first ol { margin: 0; padding-left: 1.4em; }
.try-first li { margin: 8px 0; }
.try-first a { color: var(--text); text-decoration: none; display: inline-block; min-height: 32px; }
.try-first a:hover strong { color: var(--accent); }

/* checklist numbers */
.step-n { display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; font-weight: 800; color: var(--muted); }
.step-row { min-height: 48px; }
.step-check { width: 28px; height: 28px; }
.step:target .step-row { border-color: var(--accent); }

/* display details, sources, glossary */
.details-title { margin-top: 1em; }
.details { margin: 0; padding-left: 1.2em; }
.details li { margin: 6px 0; }
.detail-src { font-size: .8rem; color: var(--muted); }
.page-meta { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.page-meta h2 { font-size: 1rem; }
.sources { padding-left: 1.2em; font-size: .92rem; margin: 0 0 1em; }
.sources li { margin: 4px 0; overflow-wrap: anywhere; }
.page-meta p { margin: 4px 0; font-size: .92rem; }
.glossary-links { margin-top: 20px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.glossary { margin: 0; }
.glossary div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.glossary dt { font-weight: 800; color: var(--accent); }
.glossary dd { margin: 4px 0 0; }
.glossary div:target { background: rgba(255,122,26,.08); }
.aff-note { font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.still .chips { margin-bottom: 1em; }
.helper ul { padding-left: 1.2em; }
.helper li { margin: 8px 0; }
.conflict { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
.meanings td { vertical-align: top; }
.meanings td:first-child { font-family: inherit; width: auto; font-weight: 700; }
.meanings .src-badge { margin: 4px 0 0; }
.row-link { white-space: nowrap; display: inline-block; min-height: 32px; }
.no-drawing { display: grid; place-items: center; aspect-ratio: 240 / 170; color: var(--muted); font-size: .85rem; text-align: center; border: 1px dashed var(--border); }
.no-drawing span { padding: 8px; }
.display-card .display-drawing { margin-bottom: 8px; }
.display-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.display-card { align-items: center; text-align: center; padding: 12px; }
.display-card .display-name { font-size: 1.05rem; }

/* bigger tap targets on touch screens */
.tile, .chips a, .btn, .header-link, .footer-links a { min-height: 44px; }
.chips a, .header-link, .footer-links a { display: inline-flex; align-items: center; }
@media (max-width: 640px) {
  .meanings thead { display: none; }
  .meanings tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
  .meanings td { border: 0; padding: 0; }
  .meanings td:nth-child(3) { grid-column: 1 / -1; }
  .src-badge { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.brand-tag { font-size: .78rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
@media (max-width: 640px) { .brand-tag { display: none; } }

/* main menu */
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.main-nav a:hover { color: var(--text); }
.brand + .main-nav { margin-left: auto; }

/* homepage "what do you need" cards */
.entry-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.entry-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; min-height: 44px; background: linear-gradient(135deg, rgba(255,122,26,.14), rgba(255,122,26,.03)); border: 1px solid rgba(255,122,26,.4); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.entry-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.entry-title { font-weight: 800; font-size: 1.1rem; }
.entry-title::after { content: " →"; color: var(--accent); }
.entry-sub { color: var(--muted); font-size: .9rem; line-height: 1.4; }
@media (max-width: 640px) { .entry-grid { grid-template-columns: 1fr; } }

/* guides */
.banner-caution { background: rgba(255,196,0,.08); border: 1px solid rgba(255,196,0,.45); }
.banner-caution h2 { color: #ffd25c; }
.cat-chips { margin: 8px 0 4px; }
.chip-current { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); }

/* header: search on its own row below 900px so nothing gets squeezed */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 10px; row-gap: 4px; }
  .site-header .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .main-nav { margin-left: auto; }
  .brand-tag { display: none; }
}

.result-text { flex-direction: column; align-items: flex-start; gap: 2px; }
.result-text .result-label { font-family: inherit; min-width: 0; color: var(--text); }
.result-text .result-sub { color: var(--muted); font-size: .88rem; }

/* ---------- navigation: active menu, phone tab bar, tabs, jump tabs ---------- */
.main-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(17,19,23,.97); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); backdrop-filter: blur(6px); }
  .tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; border-radius: 10px; }
  .tab-item[aria-current="page"] { color: var(--accent); }
  .tab-item:active { background: var(--surface-2); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .main-nav { display: none; }
}

/* switchable tabs (all panels show if JavaScript is off) */
.tablist { display: none; }
.tabs-ready .tablist { display: flex; gap: 6px; margin: 24px 0 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tabs-ready .tablist::-webkit-scrollbar { display: none; }
.tablist button { flex: 1 0 auto; min-height: 44px; padding: 8px 16px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--muted); background: none; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tablist button:hover { color: var(--text); }
.tablist button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }
.tabs-ready .panel-title { display: none; }
.tabpanel > .section:first-child { margin-top: 16px; }

/* sticky "jump to" tabs on fix pages */
.page-tabs { position: sticky; top: var(--hdr, 58px); z-index: 4; margin: 12px -16px 0; padding: 8px 16px; background: rgba(17,19,23,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.page-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.page-tabs ul::-webkit-scrollbar { display: none; }
.page-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.page-tabs a:hover { border-color: var(--accent); }
.page-tabs a.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#quick, #try-first, #checklist, #shop, #parts, #still, #meanings, [id^="step-"] { scroll-margin-top: calc(var(--hdr, 58px) + 72px); }
.jump-chips { margin-bottom: 8px; }

/* back to top */
.to-top { position: fixed; right: 16px; bottom: 24px; z-index: 25; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) { .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media print { .tabbar, .page-tabs, .to-top { display: none !important; } body { padding-bottom: 0; } }
.to-top[hidden], .tabpanel[hidden] { display: none !important; }

/* ---------- guide photos and videos ---------- */
.photo { margin: 20px 0 0; }
.photo img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.photo figcaption { margin-top: 8px; font-size: .92rem; color: var(--text); }
.photo .credit { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); }
.photo .credit a { color: var(--muted); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: radial-gradient(circle at 50% 40%, #2a1a10, #111317 70%); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--text); text-decoration: none; }
.video-play { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 1.6rem; padding-left: 5px; transition: transform .15s; }
.video-facade:hover .video-play { transform: scale(1.08); }
.video-title { font-weight: 800; font-size: 1.05rem; max-width: 34ch; }
.video-meta { font-size: .8rem; color: var(--muted); }
#video { scroll-margin-top: calc(var(--hdr, 58px) + 72px); }

/* ---------- previous / next buttons ---------- */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin-top: 32px; }
.pager-btn { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.pager-btn:hover { border-color: var(--accent); color: var(--text); }
.pager-next { text-align: right; }
.pager-dir { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.pager-name { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.pager-empty { border: 0; background: none; }
.pager-up { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .88rem; font-weight: 700; text-align: center; text-decoration: none; }
.pager-up:hover { color: var(--accent); }
@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-up { grid-column: 1 / -1; grid-row: 2; min-height: 44px; border: 1px solid var(--border); }
  .pager-empty { display: none; }
  .pager-btn.pager-next:only-of-type { grid-column: 2; }
}
.credits { padding-left: 1.2em; }
.credits li { margin: 12px 0; overflow-wrap: anywhere; }
