/* Hueline mapping. Accent is the graphite frame, per the design system: the six
 * puzzle colours stay inside puzzle artifacts and never become chrome. */
:root {
  --g-serif:    var(--font-display);
  --g-sans:     var(--font-body);
  --g-ink:      var(--ink-0);
  --g-ink-soft: var(--ink-2);
  --g-accent:   var(--frame);
  --g-surface:  var(--shell-2);
  --g-rule:     var(--line-hairline);
  --g-radius:   var(--radius-card);
}

/* ─────────────────────────────────────────────────────────────────────────
 * CANONICAL guide-page stylesheet, shared by hueful, hueline, lattern,
 * lumear and pruno. Source of truth: Websites/_shared/guide.css.
 *
 * Edit THIS file, then copy it to each site and keep that site's mapping
 * block (the `:root` at the top of each copy) intact.
 *
 * Why it exists: until 2026-11-30 the guide templates on all five sites
 * carried ten to thirteen class names and not one of them had a rule
 * anywhere. The pages rendered as a styled nav, a styled footer and raw
 * browser-default HTML in between: body text running the full viewport
 * width (about 200 characters per line at 1440px and edge to edge at
 * 390px), a UA bold sans H1 instead of the brand display face, UA
 * disclosure triangles, UA bullets, and the AEO "Quick answer" box
 * rendering as an ordinary paragraph. That is roughly 30 pages, and it is
 * where the games' search traffic lands.
 *
 * This file styles NOTHING in its own colours. It consumes a small
 * contract of --g-* variables that each site maps to its own tokens, so a
 * guide page looks like the site it belongs to:
 *
 *   --g-serif     display face, for h1/h2
 *   --g-sans      body face
 *   --g-ink       body text
 *   --g-ink-soft  secondary text (lede, captions, crumbs)
 *   --g-accent    the brand accent
 *   --g-surface   raised card fill (quick answer, steps, faq)
 *   --g-rule      hairline colour
 *   --g-radius    corner radius
 *
 * Every one has a conservative fallback, so a site that forgets to map a
 * variable degrades to something readable rather than to nothing.
 * ───────────────────────────────────────────────────────────────────── */

.guide-main {
  /* 42rem is roughly 66 characters at the body size below. Deliberately a
   * length and not `ch`: `ch` is the width of the zero in the CURRENT face,
   * so the same number gives a different measure in every typeface. That is
   * exactly how scarletthreadbible.com ended up setting 68ch and rendering
   * 94 characters. */
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 24px;
  padding-block: 40px 72px;
  font-family: var(--g-sans, system-ui, sans-serif);
  color: var(--g-ink, #222);
  font-size: 17px;
  line-height: 1.65;
}

/* Nothing inside a guide may exceed the column. The guide figure used to
 * overflow the viewport at 390px and cut its own caption off mid-word. */
.guide-main img,
.guide-main svg,
.guide-main video,
.guide-main table { max-width: 100%; height: auto; }

/* ── breadcrumb ─────────────────────────────────────────────────────── */
.guide-main .crumbs {
  font-size: 13px;
  color: var(--g-ink-soft, #666);
  margin-bottom: 26px;
  display: flex;
  flex-wrap: wrap;          /* wraps instead of clipping at 390px */
  gap: 0 6px;
  align-items: baseline;
}
.guide-main .crumbs a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--g-rule, #ddd); }
.guide-main .crumbs a:hover { color: var(--g-accent, #000); border-bottom-color: currentColor; }

/* ── headings ───────────────────────────────────────────────────────── */
.guide-main h1 {
  font-family: var(--g-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(32px, 5.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.guide-main h2 {
  font-family: var(--g-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(23px, 3.1vw, 29px);
  line-height: 1.22;
  margin: 46px 0 14px;
  text-wrap: balance;
}
.guide-main h3 {
  font-family: var(--g-sans, system-ui, sans-serif);
  font-weight: 600;
  font-size: 18px;
  margin: 32px 0 10px;
}

.guide-main p { margin: 0 0 18px; }
.guide-main a { color: var(--g-accent, #000); }

.guide-main .lede {
  font-size: clamp(18px, 2.3vw, 20px);
  line-height: 1.55;
  color: var(--g-ink-soft, #555);
  margin-bottom: 30px;
}

/* ── quick answer ───────────────────────────────────────────────────── */
.guide-main .quick-answer {
  background: var(--g-surface, #f6f4ef);
  border: 1px solid var(--g-rule, #e4e0d8);
  border-left: 3px solid var(--g-accent, #888);
  border-radius: var(--g-radius, 12px);
  padding: 20px 22px;
  margin: 0 0 34px;
}
.guide-main .quick-answer > :last-child { margin-bottom: 0; }
.guide-main .qa-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--g-accent, #666);
  margin-bottom: 8px;
}

/* ── figures ────────────────────────────────────────────────────────── */
.guide-main .guide-fig { margin: 32px 0; }     /* kills the UA 40px side margin */
.guide-main .guide-fig img {
  display: block;
  margin-inline: auto;
  max-width: min(100%, 300px);
  border-radius: var(--g-radius, 12px);
  border: 1px solid var(--g-rule, #e4e0d8);
}
.guide-main .guide-fig figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--g-ink-soft, #666);
  text-align: center;
}

/* ── lists ──────────────────────────────────────────────────────────── */
.guide-main ul, .guide-main ol { margin: 0 0 20px; padding-left: 1.25em; }
.guide-main li { margin-bottom: 8px; }
.guide-main li::marker { color: var(--g-accent, #888); }

/* ── numbered steps ─────────────────────────────────────────────────── */
.guide-main .guide-steps {
  background: var(--g-surface, #f6f4ef);
  border: 1px solid var(--g-rule, #e4e0d8);
  border-radius: var(--g-radius, 12px);
  padding: 24px 26px 8px;
  margin: 30px 0 34px;
}
.guide-main .guide-steps ol { list-style: none; padding-left: 0; counter-reset: gstep; }
.guide-main .guide-steps li {
  counter-increment: gstep;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
}
.guide-main .guide-steps li::before {
  content: counter(gstep);
  position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--g-accent, #888);
  color: var(--g-surface, #fff);
  font-family: var(--g-serif, Georgia, serif);
  font-size: 14px;
  line-height: 1;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */
.guide-main .faq-wrap { margin: 34px 0; border-top: 1px solid var(--g-rule, #e4e0d8); }
.guide-main .faq-item { border-bottom: 1px solid var(--g-rule, #e4e0d8); }
.guide-main .faq-item summary {
  list-style: none;                  /* drop the UA disclosure triangle */
  cursor: pointer;
  padding: 16px 32px 16px 0;
  position: relative;
  font-weight: 600;
  font-size: 16.5px;
}
.guide-main .faq-item summary::-webkit-details-marker { display: none; }
.guide-main .faq-item summary::after {
  content: "";
  position: absolute; right: 6px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--g-accent, #888);
  border-bottom: 2px solid var(--g-accent, #888);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.guide-main .faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.guide-main .faq-a { padding: 0 0 18px; color: var(--g-ink-soft, #555); }
.guide-main .faq-a > :last-child { margin-bottom: 0; }

/* ── closing CTA and related ────────────────────────────────────────── */
.guide-main .guide-cta {
  margin: 40px 0 34px;
  padding: 26px;
  background: var(--g-surface, #f6f4ef);
  border: 1px solid var(--g-rule, #e4e0d8);
  border-radius: var(--g-radius, 12px);
  text-align: center;
}
.guide-main .guide-cta > :last-child { margin-bottom: 0; }
.guide-main .guide-cta .cta-row,
.guide-main .guide-cta .cta-app { margin-top: 6px; }

.guide-main .guide-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--g-rule, #e4e0d8);
}
.guide-main .guide-related h2 { font-size: 20px; margin: 0 0 12px; }
.guide-main .guide-related ul { list-style: none; padding-left: 0; margin: 0; }
.guide-main .guide-related li { margin-bottom: 10px; }

@media (max-width: 480px) {
  .guide-main { padding-inline: 20px; padding-block: 28px 56px; font-size: 16.5px; }
  .guide-main .guide-steps { padding: 20px 18px 6px; }
  .guide-main .guide-cta { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-main .faq-item summary::after { transition: none; }
}
