/* CODING CHECKPOINT: layout for the static gameplay catalogue and player wiki.
   geoplanetical.css owns brand, buttons, screenshot previews, lightbox and footer.
   All content-specific rules stay inside main; no durable state or game dependency. */
.guide {
  --guide-muted: color-mix(in srgb, var(--text) 76%, var(--ink));
  --guide-rule: 1px solid var(--line);
  --guide-focus: 2px solid var(--brass-light);
  --guide-mono: Consolas, "Liberation Mono", monospace;
}
.guide [hidden] { display: none !important; }
.guide .geo-header { background: var(--ink); border-bottom: var(--guide-rule); }
.guide .geo-header.is-stuck { background: var(--ink); }
.guide .geo-nav__links { gap: 1.2rem; }
.guide .geo-nav__links a { font-size: .875rem; letter-spacing: .05em; }
.guide .geo-nav__links a[aria-current] { color: var(--brass-light); text-decoration: underline; text-underline-offset: .4em; }
.guide :is(a, button, input, summary):focus-visible { outline: var(--guide-focus); outline-offset: 4px; }
.guide main { padding: calc(var(--header-h) + 2.5rem) 0 3.5rem; }
.guide main :is(section, details, h2, input)[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.guide main p { margin: 0; color: var(--guide-muted); }
.guide main h1 { font-size: clamp(2.25rem, 4.2vw, 3.6rem); line-height: 1.05; margin: 0 0 .85rem; }
.guide main h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.16; margin: 0; }
.guide main h3 { margin: 0; font-size: 1rem; }
.guide main .guide-eyebrow { font: 500 .8rem/1.3 var(--display); letter-spacing: .12em; color: var(--brass); text-transform: uppercase; margin: 0 0 .65rem; }
.guide main .geo-btn { color: var(--btn-fg); min-height: 44px; font-size: .875rem; }
.guide .reference-shell { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: clamp(2rem, 4.5vw, 4.5rem); }
.guide .reference-content { min-width: 0; }
.guide .reference-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.guide .reference-brand { display: block; width: 100%; aspect-ratio: 1000 / 160; margin-bottom: 1.75rem; }
.guide .reference-brand img { width: 100%; height: 100%; object-fit: cover; }
.guide .reference-sidebar nav { border-left: 1px solid var(--brass); padding-left: 1rem; }
.guide .reference-topics > summary { display: none; }
.guide .reference-sidebar nav > a { display: flex; gap: .65rem; align-items: baseline; padding-block: .35rem; font-size: .875rem; line-height: 1.3; color: var(--guide-muted); }
.guide .reference-sidebar nav > a span { font: .68rem var(--guide-mono); color: var(--brass); }
.guide .reference-sidebar nav > a:hover { color: var(--brass-light); }
.guide .reference-sidebar nav > .guide-eyebrow:not(:first-child), .guide .sidebar-wiki { margin-top: 1rem; }
.guide .reference-heading { padding: 0 0 1.5rem; border-bottom: var(--guide-rule); }
.guide .reference-heading p:not(.guide-eyebrow) { max-width: 65ch; font-size: 1.075rem; line-height: 1.5; }
.guide .reference-heading > a { display: inline-block; margin-top: .85rem; font-size: .9rem; color: var(--brass-light); }
.guide .gameplay-heading { position: relative; padding-bottom: 1.8rem; }
.guide .gameplay-heading::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px; background: var(--brass); }
.guide .gameplay-section { padding: 1.8rem 0; border-bottom: var(--guide-rule); }
.guide .gameplay-section__head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.1rem; }
.guide .gameplay-section__head > div { min-width: 0; }
.guide .gameplay-section__head h2 { max-width: 29ch; }
/* Only the preview's placement is local. Material and behaviour are shared. */
.guide .gameplay-preview { width: 185px; flex-shrink: 0; margin: 0; }
.guide .gameplay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem 2rem; list-style: none; padding: 0; margin: 0; }
.guide .gameplay-actions li { position: relative; padding-left: 1rem; font-size: 1rem; line-height: 1.5; color: var(--guide-muted); }
.guide .gameplay-actions li::before { content: ""; position: absolute; left: 0; top: .65em; width: 4px; height: 4px; background: var(--brass); }
.guide .gameplay-guide { display: inline-block; font-size: .875rem; color: var(--brass-light); margin-top: 1.15rem; }
.guide .gameplay-guide:hover, .guide .reference-heading > a:hover { text-decoration: underline; text-underline-offset: .25em; }
.guide .faq-topics { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: 1.5rem; }
.guide .faq-topics a { font-size: .875rem; color: var(--brass-light); }
.guide .faq-topics a:hover { text-decoration: underline; text-underline-offset: .2em; }
.guide .faq-group + .faq-group { margin-top: 1.5rem; }
.guide .faq-group > h3 { font: 500 .875rem/1.4 var(--display); color: var(--brass); letter-spacing: .06em; margin-bottom: .5rem; }
.guide .gameplay-heading > a + a { margin-left: 1rem; }
@media (max-width: 540px) { .guide .gameplay-heading > a { display: block; } .guide .gameplay-heading > a + a { margin-left: 0; } }
.guide .game-faq .wiki-article__body { display: block; max-width: 75ch; }
.guide .game-faq .gameplay-guide { display: block; margin-top: .5rem; }
.guide .gameplay-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding-top: 1.8rem; font-size: .9rem; }
.guide .command-search { padding: 1.25rem 0; }
.guide .command-search label { display: block; margin-bottom: .5rem; font-size: .875rem; color: var(--text); }
.guide .command-search__field { display: flex; gap: .6rem; }
.guide .command-search input { min-width: 0; width: 100%; height: 44px; padding: 0 .85rem; font: inherit; color: var(--text); background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 2px; }
.guide .command-search input::placeholder { color: var(--guide-muted); }
.guide .command-search p { font-size: .8rem; margin-top: .5rem; }
.guide .guide-small-button { font: 500 .85rem var(--body); cursor: pointer; min-height: 44px; padding: .5rem .85rem; color: var(--text); background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 2px; }
.guide .guide-small-button:hover { border-color: var(--brass); color: var(--brass-light); }
.guide .guide-small-button:disabled { cursor: wait; }
.guide .search-empty { padding: 1rem; border-left: 2px solid var(--brass); background: var(--ink-2); }
.guide #guides-title { margin: .25rem 0 .8rem; }
.guide .wiki-article { border-bottom: var(--guide-rule); }
.guide .wiki-article > summary { display: flex; gap: .9rem; align-items: baseline; list-style: none; cursor: pointer; padding: .8rem .65rem .8rem 0; }
.guide .wiki-article > summary::-webkit-details-marker { display: none; }
.guide .wiki-article > summary::after { content: "+"; margin-left: auto; font: 1.3rem var(--guide-mono); color: var(--brass); }
.guide .wiki-article[open] > summary::after { content: "−"; }
.guide .wiki-article > summary:hover strong { color: var(--brass-light); }
.guide .reference-number { font: .75rem var(--guide-mono); color: var(--brass); }
.guide .wiki-article summary strong { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.guide .wiki-article summary small { display: block; font-size: .85rem; color: var(--guide-muted); line-height: 1.4; margin-top: .25rem; }
.guide .wiki-article[open] { background: linear-gradient(90deg, var(--ink-2), transparent); }
.guide .wiki-article[open] > summary { padding-left: .85rem; }
.guide .wiki-article__body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.5rem; padding: .25rem 1rem 1.25rem; font-size: .9375rem; line-height: 1.55; }
.guide .wiki-article__body ol { margin: 0; padding-left: 1.15rem; }
.guide .wiki-article__body li { padding-left: .2rem; margin-bottom: .6rem; color: var(--guide-muted); }
.guide .wiki-article__body li:last-child { margin-bottom: 0; }
.guide .wiki-article__body li::marker { color: var(--brass); }
.guide .wiki-article__body strong { color: var(--text); font-weight: 600; }
.guide .wiki-article__body aside { border-left: var(--guide-rule); padding-left: 1rem; }
.guide .wiki-article__body h3 { font: 600 .95rem/1.4 var(--body); margin: 0 0 .5rem; color: var(--brass-light); }
.guide main :is(code, kbd) { font-family: var(--guide-mono); color: var(--text); font-size: .9em; }
.guide main code { overflow-wrap: anywhere; }
.guide main kbd { white-space: nowrap; background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 2px; padding: .1em .35em; }
.guide .console-intro { padding: 1.8rem 0; }
.guide .console-essentials { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.guide .console-essentials h3 { font: 600 .95rem/1.4 var(--body); margin-bottom: .4rem; }
.guide .console-essentials p, .guide .console-help, .guide .achievement-note { font-size: .9375rem; line-height: 1.5; }
.guide .console-help { margin-top: .9rem; }
.guide .achievement-note { margin-top: 1rem; padding: .75rem 1rem; background: var(--ink-2); border-left: 2px solid var(--brass); }
.guide .achievement-note strong { color: var(--brass-light); }
.guide .reference-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.guide .reference-section-head > a { font-size: .8rem; color: var(--brass-light); }
.guide:not(.guide-enhanced) .reference-section-head > a { display: none; }
.guide .command-group { margin-top: 1.25rem; }
.guide .command-group > h2 { font: 500 .8rem/1.3 var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--brass); padding-bottom: .5rem; border-bottom: 1px solid var(--line-strong); }
.guide .command-entry { display: grid; grid-template-columns: 165px minmax(0, 1fr) 66px; gap: 1rem; align-items: center; padding: .65rem 0; border-bottom: var(--guide-rule); }
.guide .command-entry:target { background: var(--ink-2); outline: 1px solid var(--brass); outline-offset: 4px; }
.guide .command-entry h3 { font: 600 1rem/1.4 var(--body); text-transform: none; }
.guide .command-entry h3 code { font-size: .9rem; }
.guide .command-kind { display: block; color: var(--guide-muted); font-size: .7rem; margin-top: .1rem; }
.guide .command-entry p { font-size: .9rem; line-height: 1.45; }
.guide .command-entry .command-args { font-size: .8rem; margin-top: .35rem; }
.guide .command-args a { color: var(--brass-light); text-decoration: underline; text-underline-offset: .2em; }
.guide .command-entry__copy { width: 66px; padding-inline: .4rem; }
.guide .copy-status { min-height: 1.4rem; font-size: .875rem; }
.guide:not(.guide-enhanced) .command-entry { grid-template-columns: 165px minmax(0, 1fr); }
@media (max-width: 1050px) {
  .guide .geo-nav__links, .guide .geo-nav .geo-btn { display: none; }
  .guide .geo-nav__toggle { display: inline-flex; min-height: 44px; align-items: center; }
  .guide .geo-nav.is-open { position: static; padding: 0; background: none; border: 0; backdrop-filter: none; }
  .guide .geo-nav.is-open .geo-nav__links { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; gap: 0; width: auto; margin: 0; padding: 1rem 1.25rem; background: var(--ink); border-bottom: var(--guide-rule); }
  .guide .geo-nav.is-open .geo-nav__links a { display: block; padding-block: .75rem; }
  .guide:not(.guide-enhanced) .geo-header { position: static; height: auto; padding-block: 1rem; }
  .guide:not(.guide-enhanced) .geo-header__inner { flex-wrap: wrap; }
  .guide:not(.guide-enhanced) .geo-nav__toggle { display: none; }
  .guide:not(.guide-enhanced) .geo-nav__links { display: flex; flex-wrap: wrap; gap: .75rem; }
  .guide:not(.guide-enhanced) main { padding-top: 1.5rem; }
  .guide .reference-shell { grid-template-columns: 155px minmax(0, 1fr); gap: 1.75rem; }
  .guide .wiki-article__body { grid-template-columns: 1fr; }
  .guide .command-entry { grid-template-columns: 140px minmax(0, 1fr) 66px; gap: .7rem; }
}
@media (min-width: 801px) {
  .guide .reference-sidebar { max-height: calc(100dvh - var(--header-h) - 3rem); overflow-y: auto; scrollbar-width: thin; padding-right: .5rem; padding-bottom: .5rem; }
}
@media (max-width: 800px) {
  .guide main { padding-top: calc(var(--header-h) + 1.5rem); }
  .guide .reference-shell { display: block; }
  .guide .reference-sidebar { position: static; margin-bottom: 1.5rem; }
  .guide .reference-brand { width: 245px; margin-bottom: 1rem; }
  .guide .reference-sidebar nav { display: flex; flex-wrap: wrap; gap: .1rem 1rem; padding-left: .75rem; }
  .guide .reference-topics > summary { display: list-item; cursor: pointer; min-height: 44px; padding: .6rem 0; color: var(--brass-light); font-size: .9rem; border-bottom: var(--guide-rule); }
  .guide .reference-topics[open] > summary { margin-bottom: .5rem; }
  .guide .reference-sidebar nav > .guide-eyebrow { display: none; }
  .guide .reference-sidebar nav > a { padding-block: .3rem; font-size: .85rem; }
  .guide .reference-sidebar .sidebar-wiki { margin-top: 0; }
}
@media (max-width: 540px) {
  .guide .gameplay-actions, .guide .console-essentials { grid-template-columns: 1fr; gap: .65rem; }
  .guide .gameplay-section { padding-block: 1.4rem; }
  .guide .gameplay-section__head { align-items: flex-start; gap: .75rem; }
  .guide .gameplay-preview { width: 115px; }
  .guide .gameplay-section__head h2 { font-size: 1.4rem; }
  .guide .command-entry, .guide:not(.guide-enhanced) .command-entry { grid-template-columns: minmax(0, 1fr) 66px; gap: .35rem .75rem; }
  .guide .command-entry__name { grid-area: 1 / 1; }
  .guide .command-entry__copy { grid-area: 1 / 2; }
  .guide .command-entry__effect { grid-column: 1 / -1; padding-bottom: .25rem; }
  .guide .wiki-article summary small { font-size: .8rem; }
  .guide .wiki-article__body { padding-inline: .6rem; }
  .guide .reference-heading p:not(.guide-eyebrow) { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.guide) { scroll-behavior: auto; }
  .guide *, .guide *::before, .guide *::after { animation: none !important; transition: none !important; }
}
@media print {
  .guide .geo-header, .guide .geo-footer, .guide .reference-sidebar, .guide .command-search, .guide .command-entry__copy { display: none; }
  .guide main { padding: 0; }
  .guide .reference-shell { display: block; }
}
