/* Shared stylesheet for the static guide pages under /guides. These are plain
   HTML on purpose: the app is a client-rendered SPA, so these are the only pages
   on the site whose words exist before any JavaScript runs — which is exactly
   what a crawler that does not execute JS (Bing, most AI crawlers) needs.

   Colours and type mirror the app's default look: the SKY0N theme
   (packages/core/src/themes.js, DEFAULT_THEME) under the Arcade layout, so a
   visitor who lands here from a search result and taps the call to action sees
   the same page they just left. The guides cannot read a visitor's saved theme
   (no JavaScript, no settings), so they hardcode the one every new visitor gets.
   Keep these in step with SKY0N: every value here is lifted from that theme,
   whose text roles clear WCAG AA on the page and on a panel
   (themes.contrast.test.js). SKY0N has two pinks on purpose — the link pink is
   dark enough to read as text on the pale page, and the button pink is the one
   whose white label clears 5:1 — hence --accent and --accent-fill. */
:root {
  --bg: #F0F7FF;          /* appBg */
  --panel: #ffffff;       /* panel */
  --border: #E8F0F8;      /* border / divider */
  --text: #1E2A3A;        /* text */
  --body: #3a5f93;        /* body: running copy */
  --muted: #4a6fa3;       /* muted: ledes, captions, nav */
  --accent: #b72b7d;      /* accent: links, headings (4.5:1+ on --bg and --panel) */
  --accent-fill: #da1d8c; /* accentBg: filled buttons, white label */
  --on-accent: #ffffff;   /* accentBgText */
  --accent-soft: rgba(240, 143, 200, 0.2); /* accentSoft: hover tints */
  --font-body: "Quicksand", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.7 var(--font-body);
}
header, main, footer { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
header { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; }
/* The wordmark is SKY0N's blue→pink gradient (themes.js `wordmark`). */
.brand {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-decoration: none;
  font-size: 1.25rem;
  color: var(--accent);
  background: linear-gradient(90deg, #7b9ed4, #f08fc8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* The header's links only: the related-guides <nav> at the end of <main> has its own. */
header nav a { color: var(--muted); margin-left: 1rem; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
header nav a:hover { color: var(--text); text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; line-height: 1.15; margin: 2.5rem 0 0.75rem; font-weight: 800; color: var(--text); }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; font-weight: 800; color: var(--accent); }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.25rem; font-weight: 700; color: var(--text); }
p, li { color: var(--body); }
li::marker { color: var(--muted); }
strong { color: var(--text); font-weight: 700; }
.lede { color: var(--muted); font-size: 1.1rem; }
a { color: var(--accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
/* Linked headings (the hub's guide titles) read as headings, not as links. */
h1 a, h2 a, h3 a { text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover { text-decoration: underline; }
code, .ex {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--text);
}
.ex { display: block; padding: 0.75rem 1rem; margin: 0.75rem 0; white-space: pre-wrap; border-radius: 0.75rem; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); color: var(--body); }
th { color: var(--muted); font-weight: 600; }
td strong { color: var(--text); }
.cta {
  display: inline-block;
  margin: 1.5rem 0;
  padding: 0.8rem 1.6rem;
  border-radius: 2rem;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(218, 29, 140, 0.25);
  transition: background-color 150ms ease;
}
.cta:hover { background: #c61b80; }
footer { color: var(--muted); font-size: 0.85rem; padding-top: 3rem; padding-bottom: 2rem; border-top: 1px solid var(--border); margin-top: 2rem; }
footer a { color: var(--muted); }

/* Related guides (tools/related-guides.mjs writes the block at the end of <main>):
   a short list, each link with the page's own one-line description under it. */
.related { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.related h2 { font-size: 1.05rem; margin: 0 0 0.75rem; color: var(--text); }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { margin: 0 0 0.75rem; }
.related li a { font-weight: 600; }
.related li span { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* The in-page quiz (guides/quiz.js). */
.drill { background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.drill-q { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; margin: 0 0 0.75rem; font-variant-numeric: tabular-nums; color: var(--text); }
.drill input { font: inherit; font-size: 1.3rem; width: 7rem; padding: 0.4rem 0.6rem; border-radius: 0.5rem; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.drill input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.drill button { font: inherit; font-weight: 700; margin-left: 0.5rem; padding: 0.5rem 1.2rem; border: 0; border-radius: 2rem; background: var(--accent-fill); color: var(--on-accent); cursor: pointer; }
.drill button:hover { background: #c61b80; }
.drill-res { color: var(--muted); margin: 0.75rem 0 0; }
caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 0.5rem; }

/* Keyboard focus, as the app draws it (--focus-ring in styles/index.css). */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
