/* Player guide (galacticgambit.app/guide/). Loaded after /styles.css, whose tokens and header/footer styles it reuses. */

html { scroll-padding-top: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-header nav > a[aria-current] { color: var(--ink); }

/* Layout: sidebar + article */
.guide-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; padding-block: 48px 96px; }
.guide-sidebar { position: sticky; top: 0; max-height: 100vh; max-height: 100svh; overflow-y: auto; overscroll-behavior: contain; padding-block: 8px 24px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.guide-main { min-width: 0; max-width: 780px; }

/* Sidebar: search, menu toggle and page list */
.guide-tools { display: none; }
.js .guide-tools { display: grid; gap: 10px; margin-bottom: 24px; }
.guide-search-input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.85rem; }
.guide-search-input::placeholder { color: var(--muted); }
.guide-search-input:focus-visible { outline-offset: 2px; }
.guide-search-results { margin-top: 8px; border: 1px solid var(--line); background: var(--surface); }
.guide-search-result { display: block; padding: 10px 12px; border-top: 1px solid var(--line); text-decoration: none; }
.guide-search-result:first-child { border-top: 0; }
.guide-search-result:hover, .guide-search-result[aria-selected="true"] { background: var(--surface-2); }
.guide-search-result[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.result-where { display: block; color: var(--accent-hi); font: 500 0.6rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.result-title { display: block; color: var(--ink); font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.result-snippet { display: block; margin-top: 3px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.result-snippet mark { background: none; color: var(--ink); font-weight: 600; }
.guide-search-empty { padding: 10px 12px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.guide-menu-toggle { display: none; }
.guide-nav { display: grid; gap: 22px; }
.guide-nav-home { justify-self: start; color: #b0b4bc; font-size: 0.86rem; text-decoration: none; }
.guide-nav-title { color: var(--muted); font: 500 0.64rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.guide-nav ul { margin: 8px 0 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.guide-nav li a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 1px solid transparent; color: #b0b4bc; font-size: 0.86rem; line-height: 1.45; text-decoration: none; }
.guide-nav a:hover { color: var(--ink); }
.guide-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.guide-nav li a[aria-current="page"] { border-left-color: var(--accent); }

/* Article header */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); font: 500 0.66rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.guide-main h1 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.4; letter-spacing: 0.01em; }
.guide-main .lede { max-width: 680px; margin-top: 14px; color: #b0b4bc; font-size: 1.02rem; }
.guide-home > .eyebrow { margin-bottom: 18px; }

/* Shared label style for small headings */
.in-short h2, .page-toc h2, .related h2, .callout-title, .under-hood > summary, .andromeda > summary, .table-wrap caption, .pager-label {
  font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}

.in-short { margin-top: 32px; padding: 18px 22px 20px; border: 1px solid var(--line); border-top: 2px solid var(--accent); background: var(--surface); }
.in-short h2 { color: var(--accent-hi); }
.in-short ul { margin: 10px 0 0; padding-left: 1.2em; }
.page-toc { margin-top: 32px; }
.page-toc h2 { color: var(--muted); }
.page-toc ol { margin: 10px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; }
.page-toc li { padding-block: 3px; break-inside: avoid; font-size: 0.88rem; line-height: 1.5; }
.page-toc a { color: #b0b4bc; text-decoration: none; }
.page-toc a:hover { color: var(--ink); text-decoration: underline; }

/* Article text */
.guide-section { margin-top: 56px; }
.guide-section > * + *, .under-hood-body > * + *, .andromeda-body > * + *, .callout > * + * { margin-top: 16px; }
.guide-section > h2 { font-family: var(--display); font-size: 1.12rem; line-height: 1.55; letter-spacing: 0.01em; }
.guide-section > h2 + * { margin-top: 18px; }
.guide-section > h2 > a { color: inherit; text-decoration: none; }
.guide-section > h2 > a:hover::after { content: " #"; color: var(--accent-hi); }
.guide-section h3 { margin-top: 36px; font-size: 1rem; font-weight: 600; line-height: 1.5; }
.guide-section h3 + * { margin-top: 10px; }
.guide-section > h2:target, .guide-section h3:target, .definitions dt:target { color: var(--accent-hi); }
.guide-article p, .guide-article li, .guide-article dd { color: #c9ccd2; font-size: 0.95rem; line-height: 1.7; }
.guide-article .breadcrumb li { color: var(--muted); font-size: inherit; line-height: inherit; }
.guide-article .lede { color: #b0b4bc; font-size: 1.02rem; }
.guide-article a { color: var(--accent-hi); }
.guide-article a:hover { color: var(--ink); }
.guide-article strong { color: var(--ink); font-weight: 600; }
.guide-section ul, .guide-section ol, .under-hood-body ul, .under-hood-body ol, .andromeda-body ul, .callout ul { padding-left: 1.3em; }
.guide-article li + li { margin-top: 6px; }
.guide-article li > ul, .guide-article li > ol { margin-top: 6px; }
code { font-family: var(--mono); font-size: 0.88em; }
.guide-article p code, .guide-article li code { padding: 1px 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.definitions { margin: 8px 0 0; }
.definitions dt { margin-top: 22px; color: var(--ink); font-weight: 600; }
.definitions dd { margin: 4px 0 0; }

/* Tables */
.table-wrap { margin-block: 24px; border: 1px solid var(--line); background: var(--surface); }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 2px; }
.guide-article table { width: 100%; border-collapse: collapse; font-size: 0.85rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.table-wrap caption { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; }
.guide-article th, .guide-article td { padding: 9px 14px; border-top: 1px solid var(--line); color: #c9ccd2; text-align: left; vertical-align: top; }
.guide-article thead th { border-top: 0; background: var(--surface-2); color: var(--muted); font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.guide-article tbody th { color: var(--ink); font-weight: 600; }
.guide-article .align-right { text-align: right; }
.guide-article .align-center { text-align: center; }
.table-wrap figcaption { padding: 10px 14px; font-size: 0.78rem; }
.table-compact th, .table-compact td { padding: 7px 10px; }

/* Callouts and collapsible boxes */
.callout { margin-block: 24px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); }
.callout-title { color: var(--accent-hi); }
.callout .callout-title + * { margin-top: 6px; }
.callout-note { border-left-color: var(--line-strong); }
.callout-note .callout-title { color: var(--muted); }
.callout-warning { border-left-color: var(--gold); }
.callout-warning .callout-title { color: var(--gold); }
.under-hood, .andromeda { margin-block: 24px; border: 1px solid var(--line); background: var(--surface); }
.under-hood > summary, .andromeda > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; color: var(--muted); cursor: pointer; list-style: none; }
.under-hood > summary::-webkit-details-marker, .andromeda > summary::-webkit-details-marker { display: none; }
.under-hood > summary::before, .andromeda > summary::before { content: "+"; width: 1ch; color: var(--accent-hi); font-size: 0.9rem; }
.under-hood[open] > summary::before, .andromeda[open] > summary::before { content: "\2212"; }
.under-hood > summary:hover, .andromeda > summary:hover { color: var(--ink); }
.under-hood-body, .andromeda-body { padding: 14px 16px 18px; border-top: 1px solid var(--line); }
.andromeda { margin-top: 56px; }
.formula { overflow-x: auto; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); }
.formula code { color: var(--ink); font-size: 0.8rem; line-height: 1.7; white-space: pre-wrap; }

/* Page footer: related pages, note, previous/next */
.related { margin-top: 56px; }
.related h2 { color: var(--muted); }
.related ul { display: grid; gap: 1px; margin: 12px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--line); }
.guide-article .related li { margin: 0; padding: 14px 16px; background: var(--surface); }
.related a { color: var(--ink); font-weight: 600; text-decoration: none; }
.related a:hover { color: var(--accent-hi); }
.related span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.page-note { margin-top: 48px; color: var(--muted); font-size: 0.8rem; }
.guide-article .page-note { color: var(--muted); font-size: 0.8rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pager a:hover { border-color: var(--accent); }
.pager-next { grid-column: 2; text-align: right; }
.pager-label { display: block; color: var(--muted); }
.pager-title { display: block; margin-top: 4px; color: var(--ink); font-weight: 600; }

/* Guide home */
.home-start { margin-top: 28px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 44px; border: 1px solid var(--line); background: var(--line); }
.category-card { padding: 24px 24px 28px; background: var(--surface); }
.category-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.category-card h2 { font-family: var(--display); font-size: 0.95rem; line-height: 1.6; }
.category-blurb { margin-top: 6px; color: var(--muted); font-size: 0.85rem; }
.category-card ul { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.category-card li > a { color: var(--ink); font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.category-card li > a:hover { color: var(--accent-hi); text-decoration: underline; }
.category-card li > p { margin-top: 2px; color: #a3a8b0; font-size: 0.82rem; line-height: 1.55; }
.guide-home .page-note { margin-top: 18px; max-width: 680px; }

/* Espionage calculator (static/espionage-calculator.js) */
.esp-calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.guide-article .esp-calc-fallback { color: var(--muted); }
.esp-inputs, .esp-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.esp-side { display: grid; gap: 12px; align-content: start; min-width: 0; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--line); background: var(--surface); }
.esp-side legend { padding: 0 6px; color: var(--accent-hi); font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.esp-stepper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.esp-stepper label { color: #c9ccd2; font-size: 0.88rem; line-height: 1.4; }
.esp-stepper-control { display: flex; flex: none; }
.esp-step { width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.esp-step:hover { border-color: var(--accent); }
.esp-step[aria-disabled="true"] { color: var(--line-strong); cursor: default; }
.esp-step[aria-disabled="true"]:hover { border-color: var(--line-strong); }
.esp-stepper-control input { width: 3.5em; height: 36px; margin-inline: -1px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--ink); font: 500 0.9rem var(--mono); text-align: center; appearance: textfield; -moz-appearance: textfield; }
.esp-stepper-control input::-webkit-inner-spin-button, .esp-stepper-control input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.esp-stepper-control > :focus-visible { position: relative; z-index: 1; }
.esp-card { display: grid; align-content: start; gap: 12px; min-width: 0; padding: 14px 18px 18px; border: 1px solid var(--line); border-top: 2px solid var(--accent); background: var(--surface); }
.guide-section .esp-card > * { margin: 0; }
.guide-section .esp-card h3 { color: var(--accent-hi); font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.esp-card .esp-stepper { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.guide-article .esp-headline { padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--ink); font-weight: 600; line-height: 1.55; }
.guide-article .esp-headline.is-bad { border-left-color: var(--bad); }
.guide-article .esp-headline.is-good { border-left-color: var(--accent); }
.esp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.esp-stats > div { padding: 8px 10px; background: var(--bg); }
.esp-stats dt { color: var(--muted); font: 500 0.6rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.guide-article .esp-stats dd { margin: 2px 0 0; color: var(--ink); font: 600 0.92rem/1.4 var(--mono); }
.guide-article .esp-label { color: var(--muted); font: 500 0.64rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.guide-section .esp-card > .esp-label + .esp-list { margin-top: -6px; }
.guide-article .esp-list { padding-left: 1.2em; }
.guide-article .esp-list li { font-size: 0.88rem; line-height: 1.55; }
.guide-article .esp-list li + li { margin-top: 4px; }
.esp-hints { display: grid; gap: 6px; }
.guide-article .esp-hint { color: #a3a8b0; font-size: 0.84rem; line-height: 1.55; }
.esp-card .formula code { font-size: 0.74rem; }
.esp-tables .table-wrap { margin-block: 16px 0; }
.guide-article .esp-grid td { min-width: 3.6em; color: var(--ink); white-space: nowrap; }
.guide-article .esp-grid thead td { border-top: 0; background: var(--surface-2); }
.guide-article .esp-grid tbody th { min-width: 11em; }
.esp-row-note { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 400; line-height: 1.4; }
.esp-cell-sub { display: block; color: #d5d8de; font: 500 0.6rem/1.4 var(--mono); }
.guide-article .esp-grid .esp-traced { background: rgba(252, 61, 33, 0.18); }
.guide-article .esp-grid .esp-hidden { color: #a3a8b0; }
.heat-0 { background: rgba(47, 107, 255, 0.04); }
.heat-1 { background: rgba(47, 107, 255, 0.096); }
.heat-2 { background: rgba(47, 107, 255, 0.152); }
.heat-3 { background: rgba(47, 107, 255, 0.208); }
.heat-4 { background: rgba(47, 107, 255, 0.264); }
.heat-5 { background: rgba(47, 107, 255, 0.32); }
.heat-6 { background: rgba(47, 107, 255, 0.376); }
.heat-7 { background: rgba(47, 107, 255, 0.432); }
.heat-8 { background: rgba(47, 107, 255, 0.488); }
.heat-9 { background: rgba(47, 107, 255, 0.544); }
.heat-10 { background: rgba(47, 107, 255, 0.6); }
.guide-article .esp-grid .is-selected { box-shadow: inset 0 0 0 2px var(--gold); }

/* Pictures (tools/guide/media.ts). Cut-outs stand on a "stage": a soft glow in the tone colour. */
.tone-blue { --tone: 47 107 255; }
.tone-teal { --tone: 79 209 197; }
.tone-gold { --tone: 244 200 74; }
.tone-red { --tone: 252 61 33; }
.tone-violet { --tone: 183 148 244; }
.stage { background: radial-gradient(ellipse at center, rgb(var(--tone) / 0.28), rgb(var(--tone) / 0.06) 55%, transparent 75%), var(--surface); }
.focus-center img { object-position: 50% 50%; }
.focus-left img { object-position: 0% 50%; }
.focus-right img { object-position: 100% 50%; }
.focus-top img { object-position: 50% 0%; }
.focus-bottom img { object-position: 50% 100%; }
.page-hero { margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hero-wide img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.hero-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 32px; padding: 24px; }
.hero-stage .cutout { width: auto; max-width: 100%; height: 190px; object-fit: contain; }
.hero-stage .tile { width: auto; max-width: 100%; height: 150px; object-fit: contain; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.category-art { display: flex; align-items: center; justify-content: center; height: 140px; margin: -24px -24px 20px; overflow: hidden; border-bottom: 1px solid var(--line); }
.category-art-cover img { width: 100%; height: 100%; object-fit: cover; }
.category-art-stage { padding: 12px; }
.category-art-stage img { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.guide-figure { margin-block: 28px; margin-inline: auto; }
.figure-small { max-width: 220px; }
.figure-medium { max-width: 420px; }
.figure-art { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.figure-art.stage { padding: 18px; }
.figure-art img, .beside-art img { width: 100%; height: auto; }
/* A cut-out smaller than its frame (the 128px Supporter perk art) keeps its own size instead of being blown up. */
.figure-art.stage img, .beside-art.stage img { width: auto; margin-inline: auto; }
.guide-figure figcaption { padding: 8px 2px 0; border: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.6; text-align: center; }
.beside { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; align-items: start; }
.beside-right .beside-art { grid-column: 2; grid-row: 1; }
.beside-right .beside-body { grid-column: 1; grid-row: 1; }
.beside-left { grid-template-columns: 200px minmax(0, 1fr); }
.beside-art { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.beside-art.stage { padding: 14px; }
.beside-body > * + * { margin-top: 16px; }
.guide-section .gallery, .guide-section .border-list { margin-inline: 0; padding: 0; list-style: none; }
.gallery { display: grid; gap: 14px 12px; margin-block: 24px; }
.gallery-small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.gallery-medium { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery-large { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.guide-article .gallery > li { min-width: 0; margin: 0; }
.gallery-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gallery-art img { width: 100%; height: 100%; object-fit: contain; }
.gallery-art:not(.stage) { padding: 0; }
.gallery-art:not(.stage) img { object-fit: cover; }
.gallery-wide .gallery-art { aspect-ratio: 21 / 9; }
.guide-article .gallery-link { display: block; color: inherit; text-decoration: none; }
.gallery-link:hover .gallery-art, .gallery-link:focus-visible .gallery-art { border-color: var(--accent); }
.guide-article .gallery-name { margin-top: 8px; color: var(--ink); font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.guide-article .gallery-link:hover .gallery-name { color: var(--accent-hi); }
.guide-article .gallery-note { margin-top: 2px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.inline-icon { display: inline-block; width: auto; height: 1.3em; margin-inline: 1px 3px; vertical-align: -0.3em; }
.border-showcase { margin-block: 24px; }
.border-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 16px; }
.guide-article .border-list > li { display: grid; justify-items: center; min-width: 0; margin: 0; text-align: center; }
.border-frame { position: relative; width: 88px; height: 88px; margin: 32px 0; }
.border-portrait { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 2px; }
.border-motion { display: none; position: absolute; z-index: 2; top: -34%; left: -34%; width: 168%; height: 168%; max-width: none; pointer-events: none; }
.border-frame::after { content: ""; position: absolute; z-index: 2; inset: -5px; border: 1px solid var(--gold); border-radius: 4px; pointer-events: none; }
.border-showcase.motion-on .border-motion { display: block; }
.border-showcase.motion-on .border-frame::after { display: none; }
.guide-article .border-name { color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.guide-article .border-blurb { margin-top: 4px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.motion-toggle { margin-top: 18px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.motion-toggle:hover { border-color: var(--accent); }
.guide-section .shot-panel { margin-block: 28px; }
.guide-article .shot-single { grid-template-columns: minmax(0, 1fr); }
.guide-article .shot-phone { justify-items: center; }
.shot-phone .phone-frame { width: min(260px, 70%); }

@media (max-width: 1000px) {
  .guide-shell { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 28px 64px; }
  .guide-sidebar { position: static; max-height: none; overflow: visible; order: 2; padding: 0; }
  .js .guide-sidebar { order: 0; }
  .js .guide-tools { margin-bottom: 0; }
  .js .guide-menu-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-size: 0.85rem; }
  .js .guide-menu-toggle::after { content: "+"; color: var(--accent-hi); }
  .js .guide-menu-toggle[aria-expanded="true"]::after { content: "\2212"; }
  .js .guide-sidebar:not(.is-open) .guide-nav { display: none; }
  .js .guide-sidebar.is-open .guide-nav { margin-top: 20px; padding: 18px 18px 20px; border: 1px solid var(--line); background: var(--surface); }
  .guide-main { max-width: none; }
}
@media (max-width: 700px) {
  .guide-shell { gap: 28px; padding-block: 20px 48px; }
  .guide-main .lede, .guide-article .lede { font-size: 0.95rem; }
  .guide-section { margin-top: 44px; }
  .guide-article p, .guide-article li, .guide-article dd { font-size: 0.92rem; }
  .page-toc ol { columns: 1; }
  .in-short { padding: 16px 16px 18px; }
  .guide-article th, .guide-article td { padding: 8px 10px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
  .category-grid { grid-template-columns: minmax(0, 1fr); }
  .category-card { padding: 20px 18px 24px; }
  .esp-inputs, .esp-results { grid-template-columns: minmax(0, 1fr); }
  .page-hero { margin-top: 22px; }
  .hero-wide img { aspect-ratio: 2 / 1; }
  .hero-stage { gap: 10px 16px; padding: 18px 12px; }
  .hero-stage .cutout { height: 120px; }
  .hero-stage .tile { height: 100px; }
  .category-art { height: 120px; margin: -20px -18px 18px; }
  .beside, .beside-left { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .beside-right .beside-art, .beside-right .beside-body { grid-column: auto; grid-row: auto; }
  .beside-art { justify-self: center; width: min(220px, 100%); }
  .gallery-small { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .gallery-medium { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .gallery-large { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .border-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-phone .phone-frame { width: min(240px, 65%); }
}
@media print {
  .site-header, .guide-sidebar, .pager, .skip-link, .category-art, .page-hero, .border-motion, .motion-toggle { display: none !important; }
  .border-frame::after { display: block !important; }
  .guide-shell { display: block; padding: 0; }
  :root { color-scheme: light; --ink: #111; --muted: #555; --surface: #fff; --surface-2: #f2f2f2; --bg: #fff; --line: #ccc; background: #fff; color: #111; }
  .guide-article p, .guide-article li, .guide-article dd, .guide-article th, .guide-article td { color: #111; }
}
