/* Guides: /guides and /guides/{slug}. Loaded only on those pages. Uses the site's tokens
   (site.css :root) and its blocky notched corners. --shelf is the guide category's color. */
[hidden] { display: none !important; }

/* ----- Guide header (in the night band) ----- */
.g-head { max-width: 860px; }
.g-shelf { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font: 500 15px var(--pixel); letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: var(--shelf, var(--trust)); padding: 5px 12px; clip-path: var(--notch); }
.g-shelf-icon { display: inline-flex; background: rgba(255, 255, 255, .9); padding: 2px; clip-path: var(--notch); }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font: 500 15px var(--pixel); letter-spacing: .03em; color: #9fb0cc; }
.g-meta span + span::before { content: "■"; margin-right: 18px; color: var(--shelf, var(--accent)); font-size: 9px; vertical-align: 2px; }

/* ----- Article + contents ----- */
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (min-width: 1100px) { .g-layout { grid-template-columns: minmax(0, 760px) 280px; justify-content: space-between; } }
.g-article { max-width: 760px; }
.g-article > h2 { scroll-margin-top: 96px; position: relative; padding-top: 6px; }
.g-article > h2::before { content: ""; display: block; width: 44px; height: 6px; margin-bottom: 12px; background: var(--shelf, var(--accent)); }
.g-article img, .g-article video { max-width: 100%; height: auto; clip-path: var(--notch); }
.g-article a:not(.btn) { color: var(--link); font-weight: 700; }
.g-article code { font: 500 .88em var(--mono); background: var(--raised); padding: 2px 6px; }
.g-article pre { margin: 0; padding: 14px 16px; overflow-x: auto; background: #0f1a2e; color: #d7e3f7; clip-path: var(--notch); font: 500 14px/1.6 var(--mono); }
.g-article pre code { background: none; padding: 0; color: inherit; font: inherit; }
.g-article kbd { font: 700 .82em var(--mono); background: var(--surface); padding: 2px 8px; box-shadow: inset 0 0 0 2px var(--line-strong), inset 0 -3px 0 var(--line-strong); }

.g-toc { display: none; }
@media (min-width: 1100px) {
  .g-toc { display: grid; gap: 10px; position: sticky; top: 96px; padding: 18px; background: var(--surface-2); clip-path: var(--notch); box-shadow: inset 0 0 0 2px var(--line); }
  .g-toc b { font: 500 15px var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
  .g-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
  .g-toc li { counter-increment: toc; }
  .g-toc a { display: flex; gap: 10px; padding: 6px 8px; font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none; line-height: 1.35; }
  .g-toc a::before { content: counter(toc); font: 500 13px var(--pixel); color: var(--faint); min-width: 14px; padding-top: 2px; }
  .g-toc a:hover { color: var(--text); background: var(--raised); }
  .g-toc a.on { color: var(--text); background: var(--surface); box-shadow: inset 4px 0 0 var(--shelf, var(--accent)); }
  .g-toc-top { font-size: 14px; font-weight: 700; color: var(--faint); text-decoration: none; }
}

/* ----- Quick answer ----- */
.g-tldr { display: grid; gap: 8px; padding: 18px 20px; background: #eefbf4; clip-path: var(--notch); box-shadow: inset 0 0 0 2px #bfe9d2, inset 0 -5px 0 #bfe9d2; }
.g-tldr b { font: 500 15px var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--good); }
.g-tldr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.g-tldr li { position: relative; padding-left: 24px; font-weight: 700; }
.g-tldr li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 10px; background: var(--good-fill); box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), inset -2px -2px 0 rgba(0,0,0,.2); }

/* ----- Writer's blocks ----- */
.g-tip, .g-warn, .g-note { position: relative; padding: 16px 18px 16px 58px; clip-path: var(--notch); font-size: 17px; }
.g-tip::before, .g-warn::before, .g-note::before { position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; display: grid; place-items: center;
  font: 500 17px var(--pixel); color: #fff; clip-path: var(--notch); }
.g-tip { background: #eefbf4; box-shadow: inset 4px 0 0 var(--good-fill); } .g-tip::before { content: "!"; background: var(--good-fill); }
.g-warn { background: #fff1f0; box-shadow: inset 4px 0 0 var(--bad); } .g-warn::before { content: "×"; background: var(--bad); }
.g-note { background: #eef7fc; box-shadow: inset 4px 0 0 var(--trust-fill); } .g-note::before { content: "i"; background: var(--trust-fill); }
.g-tip > :first-child, .g-warn > :first-child, .g-note > :first-child { margin-top: 0; }
.g-tip > :last-child, .g-warn > :last-child, .g-note > :last-child { margin-bottom: 0; }

.prose ol.g-steps { list-style: none; padding: 0; counter-reset: step; gap: 12px; }
.g-steps > li { counter-increment: step; position: relative; padding: 14px 16px 14px 64px; background: var(--surface-2); clip-path: var(--notch); box-shadow: inset 0 -4px 0 var(--line); }
.g-steps > li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center;
  font: 500 19px var(--pixel); color: var(--on-accent); background: var(--accent); clip-path: var(--notch); box-shadow: inset 0 -3px 0 var(--accent-edge); }

.prose ul.g-check { list-style: none; padding: 0; }
.g-check > li { position: relative; padding-left: 34px; }
.g-check > li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 14px; font-weight: 800;
  color: #fff; background: var(--good-fill); clip-path: var(--notch); }
.prose ul.g-cross { list-style: none; padding: 0; }
.g-cross > li { position: relative; padding-left: 34px; }
.g-cross > li::before { content: "✕"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  color: #fff; background: var(--bad); clip-path: var(--notch); }

.g-table { overflow-x: auto; }
.g-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.g-table th { font: 500 14px var(--pixel); letter-spacing: .04em; text-transform: uppercase; text-align: left; color: #fff; background: var(--text); padding: 10px 12px; }
.g-table td { padding: 10px 12px; border-bottom: 2px solid var(--line); vertical-align: top; }
.g-table tr:nth-child(even) td { background: var(--surface-2); }

.g-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.g-cards > div { display: grid; gap: 6px; align-content: start; padding: 16px; background: var(--surface); clip-path: var(--notch);
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -5px 0 var(--line); font-size: 16px; line-height: 1.5; }
.g-cards > div > b:first-child { font: 700 18px var(--display); }
.g-cards > div > p { margin: 0; color: var(--muted); }

.g-big { display: grid; gap: 4px; padding: 18px 20px; background: var(--text); color: #fff; clip-path: var(--notch); }
.g-big b { font: 700 clamp(30px, 5vw, 44px) var(--display); color: var(--accent); line-height: 1; }
.g-big span { color: #c6d2e6; font-size: 16px; }

.g-quote { margin: 0; padding: 14px 18px; border-left: 6px solid var(--shelf, var(--accent)); background: var(--surface-2); font-size: 19px; font-style: italic; }
.g-quote cite { display: block; margin-top: 6px; font-size: 15px; font-style: normal; color: var(--faint); }

details.g-faq { padding: 0; background: var(--surface-2); clip-path: var(--notch); box-shadow: inset 0 0 0 2px var(--line); }
details.g-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.g-faq summary::after { content: "+"; font: 500 22px var(--pixel); color: var(--faint); }
details.g-faq[open] summary::after { content: "−"; }
details.g-faq > :not(summary) { margin: 0; padding: 0 18px 16px; }

.g-stat { font-family: var(--display); color: var(--good); }

/* ----- Live server list inside a guide ----- */
.g-live { margin: 6px 0; padding: 16px; background: #0f1a2e; color: #fff; clip-path: var(--notch); box-shadow: inset 0 -5px 0 #060b16; display: grid; gap: 12px; }
.g-live figcaption { font: 700 18px var(--display); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-live figcaption small { font: 500 13px var(--pixel); color: #8fa0bd; letter-spacing: .03em; }
.g-live-dot { width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 0 4px rgba(61, 214, 140, .2); }
.g-live ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: live; }
.g-live li { counter-increment: live; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 10px; background: #17233a; clip-path: var(--notch); }
.g-live li::before { content: counter(live); font: 500 15px var(--pixel); color: #8fa0bd; }
.g-live-name { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff !important; text-decoration: none; }
.g-live-name img { width: 32px; height: 32px; image-rendering: pixelated; clip-path: var(--notch-art); background: #22314d; flex-shrink: 0; }
.g-live-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-live-on { font: 500 14px var(--pixel); color: var(--accent); white-space: nowrap; }
.g-live-off { font: 500 14px var(--pixel); color: #ff8a80; }
.g-live-ip { grid-column: 2 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 4px 4px 4px 10px;
  background: #0b1120; color: #cfe3ff; clip-path: var(--notch); max-width: 100%; }
.g-live-ip code { background: none !important; color: inherit; padding: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-live-ip .label { font: 700 13px var(--body); color: var(--on-accent); background: var(--accent); padding: 4px 10px; clip-path: var(--notch); }
.g-live-more { font-weight: 700; color: var(--accent) !important; text-decoration: none; justify-self: start; }
@media (min-width: 640px) { .g-live li { grid-template-columns: 26px minmax(0, 1fr) auto auto; } .g-live-ip { grid-column: auto; } }

/* ----- Calls to action ----- */
.g-cta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: 22px; margin-top: 12px; clip-path: var(--notch); }
.g-cta-icon { display: grid; place-items: center; width: 72px; height: 72px; background: rgba(255, 255, 255, .85); clip-path: var(--notch); }
.g-cta-body { display: grid; gap: 8px; }
.g-cta-body b { font: 700 24px/1.2 var(--display); }
.g-cta-body p { margin: 0; font-size: 17px; }
.g-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.g-cta-player { background: #0f1a2e; color: #fff; box-shadow: inset 0 -6px 0 var(--accent); }
.g-cta-player p { color: #c6d2e6; }
.g-cta-player .btn-outline { color: #fff; box-shadow: inset 0 0 0 2px #50627f; background: transparent; }
.g-cta-owner { background: linear-gradient(135deg, #fff7da, #fff 70%); box-shadow: inset 0 0 0 2px var(--gold), inset 0 -6px 0 var(--gold-edge); }
.g-cta-owner p { color: var(--muted); }
.g-cta-community { background: #5865f2; color: #fff; box-shadow: inset 0 -6px 0 #3c45a5; }
.g-cta-community p { color: rgba(255, 255, 255, .88); }
.g-cta-community .btn-primary { background: #fff; color: #3c45a5; box-shadow: inset 0 -4px 0 #d5d9ff; }
.g-cta-community .btn-outline { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); background: transparent; }
.g-cta-parent { background: #fff5f4; box-shadow: inset 0 0 0 2px #f3c3bf, inset 0 -6px 0 #f3c3bf; }
.g-cta-parent p { color: var(--muted); }
@media (max-width: 560px) { .g-cta { grid-template-columns: minmax(0, 1fr); } .g-cta-icon { width: 60px; height: 60px; } }

/* ----- Cards ----- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.g-card { display: grid; gap: 10px; align-content: start; padding: 18px; background: var(--surface); color: var(--text); text-decoration: none; clip-path: var(--notch);
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -5px 0 var(--line); transition: transform .15s steps(3, end); position: relative; }
.g-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--shelf, var(--accent)); }
.g-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--shelf), inset 0 -5px 0 var(--shelf); }
.g-card-top { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.g-card-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--surface-2); clip-path: var(--notch); flex-shrink: 0; }
.g-card:hover .g-card-icon svg { animation: item-bob .8s steps(4, end) infinite; }
.g-card-shelf { font: 500 13px var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.g-card-title { font: 700 20px/1.25 var(--display); }
.g-card-sum { font-size: 16px; color: var(--muted); line-height: 1.5; }
.g-card-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--faint); }
.g-who { padding: 2px 8px; clip-path: var(--notch); }
.g-who-player { background: #e6f4fb; color: var(--trust); }
.g-who-owner { background: #fff4d6; color: var(--gold-text); }
.g-who-parent { background: #fdecea; color: var(--bad); }
.g-grid-featured .g-card { background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%); }
.g-related { margin-top: 12px; }

/* ----- /guides index ----- */
.gi-head { max-width: 900px; }
.gi-search .input { width: 100%; max-width: 640px; min-height: 60px; font-size: 18px; }
.gi-who { display: flex; flex-wrap: wrap; gap: 8px; }
.gi-who-btn { min-height: 44px; padding: 0 16px; font: 700 16px var(--body); color: #cfe0f7; background: rgba(255, 255, 255, .06); border: 0; cursor: pointer; clip-path: var(--notch);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); }
.gi-who-btn:hover { color: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.gi-who-btn[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); box-shadow: inset 0 -4px 0 var(--accent-edge); }
.gi-intent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.gi-intent { display: grid; gap: 6px; align-content: start; padding: 18px; min-height: 170px; text-decoration: none; color: var(--text); background: var(--surface-2); clip-path: var(--notch);
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -5px 0 var(--shelf); transition: transform .15s steps(3, end); }
.gi-intent:hover { color: var(--text); transform: translateY(-3px); background: var(--surface); }
.gi-intent:hover .gi-intent-icon svg { animation: item-bob .8s steps(4, end) infinite; }
.gi-intent b { font: 700 19px/1.25 var(--display); }
.gi-intent span:not(.gi-intent-icon) { font-size: 15px; color: var(--muted); }
.gi-intent small { margin-top: auto; font: 500 14px var(--pixel); color: var(--shelf); letter-spacing: .03em; }
.gi-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; position: sticky; top: 72px; z-index: 5; padding: 10px 0; background: var(--ground); }
.gi-chip { cursor: pointer; border: 0; font: 700 16px var(--body); color: var(--text); }
.gi-chip.on { background: var(--shelf, var(--text)); color: #fff; }
.gi-empty { font-size: 18px; font-weight: 700; color: var(--muted); }
.gi-shelf { scroll-margin-top: 140px; }
.gi-shelf-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.gi-shelf-head h2 { margin: 0; }
.gi-shelf-head p { margin: 2px 0 0; color: var(--muted); }
.gi-shelf-icon { display: grid; place-items: center; width: 56px; height: 56px; background: var(--surface-2); clip-path: var(--notch); box-shadow: inset 0 -4px 0 var(--shelf); flex-shrink: 0; }
.gi-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.gi-bottom .g-cta { margin: 0; }

@media (prefers-reduced-motion: reduce) { .g-card, .gi-intent { transition: none; } .g-card:hover .g-card-icon svg, .gi-intent:hover .gi-intent-icon svg { animation: none; } }
