/* Guides (/guides and /guides/<slug>, built by scripts/build-guides.py from content/guides/*.md; docs/adding-guides.md).
   Layout and the guide-only pieces; colours, type, radii and shadows come from the site.css tokens. Game art as it is. */
.g-wrap { padding-bottom: var(--sp-12); }

/* index: category chips + one grid of guide cards per category */
.g-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-8); }
.g-chip { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: 0 var(--sp-4); border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--ring); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.g-chip:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-3); }
.g-chip .n { color: var(--faint); font-size: var(--fs-xs); }
.g-cat { margin: 0 0 var(--sp-10); scroll-margin-top: 90px; }
.g-blurb { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); }
.g-index { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.g-card { position: relative; display: flex; gap: var(--sp-4); align-items: flex-start; height: 100%; padding: var(--sp-5) 60px var(--sp-5) var(--sp-5);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); }
.g-card:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-3), 0 14px 26px -16px rgba(0, 0, 0, 0.7); }
.g-card img, .g-noicon { flex: none; width: 56px; height: 56px; border-radius: var(--r-md); background: var(--well); box-shadow: var(--ring); object-fit: contain; }
.g-card-t { min-width: 0; }
.g-card b { display: block; font-size: var(--fs-md); line-height: 1.25; letter-spacing: -0.01em; margin-bottom: var(--sp-1); }
.g-card small { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.g-meta { display: block; margin-top: var(--sp-2); color: var(--faint); font-style: normal; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.g-card .go-arrow { position: absolute; right: var(--sp-4); bottom: var(--sp-4); }

/* "still stuck" boxes */
.g-help h2 { font-size: var(--fs-md); margin: 0 0 var(--sp-1); }
.g-help p { margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }
.g-help-wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5) var(--sp-6); }
.g-help-wide p { margin: 0; }

/* guide page head */
.g-hero-grid { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); }
.g-hero-t { min-width: 0; }
.g-hero .eyebrow a { color: inherit; }
.g-hero-icon { flex: none; width: 96px; height: 96px; border-radius: var(--r-lg); background: var(--well); box-shadow: var(--ring); object-fit: contain; }

/* guide page body */
.g-layout { display: grid; gap: var(--sp-6); align-items: start; padding-bottom: var(--sp-12); }
@media (min-width: 1000px) { .g-layout { grid-template-columns: minmax(0, 820px) minmax(260px, 1fr); } }
.g-article { padding: var(--sp-5); min-width: 0; }
@media (min-width: 700px) { .g-article { padding: var(--sp-6) var(--sp-8); } }
.g-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 34px;
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.g-count { color: var(--muted); font-size: var(--fs-sm); }
.g-reset[disabled] { opacity: 0.5; cursor: default; }
.g-body { color: var(--muted); font-size: var(--fs-base); line-height: 1.6; overflow-wrap: anywhere; }
.g-body > p, .g-body > ul { margin: 0 0 var(--sp-3); }
.g-body ul { padding-left: 20px; }
.g-body li + li { margin-top: var(--sp-1); }
.g-body h2 { color: var(--text); font-size: var(--fs-lg); margin: var(--sp-8) 0 var(--sp-3); scroll-margin-top: 90px; }
.g-body > h2:first-child { margin-top: var(--sp-3); }
.g-body h3 { color: var(--text); font-size: var(--fs-md); margin: var(--sp-5) 0 var(--sp-2); }
.g-body strong, .g-body em { color: var(--text); }
.g-body a { color: var(--accent); }
.g-body code { padding: 1px 6px; border-radius: var(--r-xs); background: var(--well); box-shadow: var(--ring); color: var(--text); font-size: 0.92em; }

/* numbered steps with a tick box */
.g-steps { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: var(--sp-2); }
.g-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) 44px; gap: var(--sp-3); align-items: start; padding: var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-3);
  border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); scroll-margin-top: 90px; }
.g-step:target { box-shadow: 0 0 0 1px var(--accent-ring); }
.g-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-ring);
  color: var(--accent); font-weight: 700; font-size: var(--fs-md); }
.g-step-body { padding-top: 5px; }
.g-step-body h3 { margin: 0 0 var(--sp-1); color: var(--text); font-size: var(--fs-base); font-weight: 700; line-height: 1.4; }
.g-step-body p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.g-step-body ul { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); }
.g-tick { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.g-tick input { width: 22px; height: 22px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.g-step.is-done .g-n { background: transparent; box-shadow: 0 0 0 1px var(--line-2); color: var(--faint); }
.g-step.is-done .g-step-body h3 { color: var(--muted); }

/* Tip / Important boxes */
.g-note { margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); }
.g-note b { display: block; margin-bottom: 2px; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.g-note p { margin: 0; font-size: var(--fs-sm); }
.g-note-tip { box-shadow: inset 3px 0 0 var(--ok), var(--ring); }
.g-note-tip b { color: var(--ok); }
.g-note-warn { box-shadow: inset 3px 0 0 var(--accent), var(--ring); }
.g-note-warn b { color: var(--accent); }

.g-fig { margin: var(--sp-4) 0; }
.g-fig img { display: block; max-width: 100%; height: auto; border-radius: var(--r-md); box-shadow: var(--ring); }
.g-fig figcaption { margin-top: var(--sp-2); color: var(--faint); font-size: var(--fs-xs); }
.g-updated { margin: var(--sp-6) 0 0; font-size: var(--fs-xs); }

/* side column */
.g-aside { display: grid; gap: var(--sp-4); min-width: 0; }
.g-side { padding: var(--sp-5); }
.g-side h2 { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); margin: 0 0 var(--sp-3); }
.g-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.g-side li a { color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.g-side li a:hover { color: var(--accent); }
.g-side.g-help h2 { font-size: var(--fs-md); letter-spacing: normal; text-transform: none; color: var(--text); }

@media (max-width: 600px) {
  .g-hero-icon { width: 64px; height: 64px; }
  .g-hero-grid { align-items: flex-start; }
  .g-step { grid-template-columns: 30px minmax(0, 1fr) 44px; gap: var(--sp-2); }
  .g-n { width: 30px; height: 30px; font-size: var(--fs-base); }
}
