/* The user manual (/manual/) in the Net SD card site look.
   The manual comes from the /walkthrough engine (net-sdcard docs/mockup), which draws its own light, purple commentary layer.
   tool/skin_manual.py adds this stylesheet after the engine's <style>, plus the site's own header and footer
   (inside .ns-site), so the manual reads as part of netsd.canonspike.com. The engine itself is untouched.
   Adapted from fauxwall-site assets/guide.css. Built to Google's Modern Web Guidance. */

:root {
  color-scheme: dark;
  /* Net SD card site palette (assets/site.css) */
  --ns-bg: #0A0A0B; --ns-bg2: #101012; --ns-card: #16161A; --ns-card2: #1E1E23; --ns-line: #34302A;
  --ns-text: #F6F1E6; --ns-muted: #B5AD9B; --ns-link: #F0C655;
  --ns-g1: #F4CB62; --ns-g2: #E8B53A; --ns-g3: #C98A12; --ns-accent: #E8B53A;
  --ns-grad: linear-gradient(100deg in oklch, var(--ns-g1), var(--ns-g2) 55%, var(--ns-g3));
  --ns-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;

  /* The engine's commentary tokens, mapped onto the site palette. Notes use the site's gold, not purple. */
  --wt-note: var(--ns-g2);
  --wt-soft: var(--ns-card2);
  --wt-ink: #F6E7C0;
  --wt-line: var(--ns-line);
  --wt-text: var(--ns-text);
  --wt-text-2: var(--ns-muted);
  --wt-text-3: #948C7B;
  --wt-rule: var(--ns-line);
  --wt-rule-2: #4A4336;
  --wt-page: var(--ns-bg);
  --wt-radius: 20px;
  --wt-max: 1180px;
  --wt-font: var(--ns-sans);
}

body { background: var(--ns-bg); color: var(--ns-text); font-size: 1rem; line-height: 1.55; overflow-wrap: break-word; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

/* ---------- the site's header and footer, scoped so they cannot touch the app mockup ---------- */
.ns-site { font-family: var(--ns-sans); color: var(--ns-text); }
.ns-site .wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.ns-site .head { position: relative; background: var(--ns-bg); border-bottom: 1px solid var(--ns-line); }
.ns-site .head::after { content: ""; display: block; height: 2px; background: var(--ns-grad); }
.ns-site .head-in { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.ns-site .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ns-text); text-decoration: none; margin-inline-end: auto; min-height: 44px; }
.ns-site .brand img { border-radius: 9px; flex: none; display: block; }
.ns-site .head nav { display: flex; gap: 4px; }
.ns-site .head nav a { color: var(--ns-text); text-decoration: none; padding: 0 14px; display: inline-flex; align-items: center; min-height: 44px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: background-color .15s; }
.ns-site .head nav a:hover { background: var(--ns-card2); }
@media (width <= 480px) {
  .ns-site .head nav { gap: 0; }
  .ns-site .head nav a { padding: 0 7px; font-size: .9rem; }
  .ns-site .head nav a.wide { display: none; }
  .ns-site .brand { font-size: 1.08rem; }
}
.ns-site footer { margin-top: 0; border-top: 1px solid var(--ns-line); color: var(--ns-muted); padding: 24px 0 32px; font-size: .95rem; background: var(--ns-bg2); }
.ns-site footer .foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.ns-site footer a { color: var(--ns-muted); display: inline-block; padding: 10px 0; }
.ns-site footer a:hover { color: var(--ns-text); }
.ns-site footer .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.ns-site footer .langs a[aria-current] { color: var(--ns-text); font-weight: 600; text-decoration: none; }
.ns-site :focus-visible { outline: 3px solid var(--ns-g2); outline-offset: 2px; border-radius: 6px; }

/* ---------- engine bar and chapter rail ---------- */
.wt-proto { background: color-mix(in oklab, var(--ns-bg2) 94%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ns-line); color: var(--ns-text); }
.wt-tag { background: color-mix(in oklab, var(--ns-g1) 18%, transparent); color: var(--ns-g1); }
.wt-proto select { background: var(--ns-card2); color: var(--ns-text); border: 1px solid var(--ns-line); font-size: .85rem; }
.wt-pbtn { border-color: var(--ns-line); color: var(--ns-text); border-radius: 999px; font-size: .85rem; min-height: 2.25rem; padding-inline: .9rem; }
.wt-pbtn:hover { background: var(--ns-card2); }
.wt-pbtn.wt-on { background: var(--ns-accent); border-color: var(--ns-accent); color: #1A1200; }
.wt-pbtn:focus-visible, .wt-proto select:focus-visible { outline-color: var(--ns-g1); }
.wt-clicks { background: var(--ns-card2); }
.wt-clicks b { color: var(--ns-accent); }
.wt-rail { background: var(--ns-bg); border-bottom-color: var(--ns-line); }
.wt-rail button { background: var(--ns-card); border-color: var(--ns-line); color: var(--ns-text); border-radius: 14px; }
.wt-rail button:hover { border-color: var(--ns-g2); }
.wt-rail .wt-k { color: var(--ns-g1); }

/* ---------- intro: a hero like the other pages ---------- */
.wt-intro { max-width: var(--wt-max); }
.wt-intro-in {
  position: relative; isolation: isolate; overflow: clip;
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in oklab, var(--ns-g1) 18%, transparent), transparent 70%),
    radial-gradient(50% 120% at 100% 0%, color-mix(in oklab, var(--ns-g3) 16%, transparent), transparent 70%),
    var(--ns-card);
  border: 1px solid var(--ns-line); border-left: 1px solid var(--ns-line); border-radius: 28px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.wt-intro h1 {
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem); line-height: 1; font-weight: 900; letter-spacing: -.035em;
  background: var(--ns-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wt-intro-in > p { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: color-mix(in oklab, var(--ns-text) 88%, var(--ns-muted)); max-width: 62ch; }
.wt-how { font-size: .9rem; color: var(--ns-muted); }
.wt-jump { color: var(--ns-link); }
.wt-pin { background: var(--ns-card2); border-color: var(--ns-g2); color: var(--ns-text); }
.wt-pin::before { border-top-color: color-mix(in oklab, var(--ns-g2) 60%, transparent); }
.wt-pin:hover, .wt-pin.wt-active { background: var(--ns-g2); border-color: var(--ns-g2); color: #1A1200; }
.wt-sample { color: var(--ns-muted); }

/* ---------- the note panel ---------- */
.wt-note { background: var(--ns-card); color: var(--ns-text); border-color: var(--ns-line); border-top-color: var(--ns-g2); border-radius: 20px; box-shadow: 0 24px 60px rgb(0 0 0 / .5); }
.wt-note footer { border-top-color: var(--ns-line); color: var(--ns-muted); }
.wt-note footer button { background: var(--ns-card2); color: var(--ns-text); border-color: var(--ns-line); border-radius: 999px; padding-inline: 1rem; }
.wt-note footer button.wt-next { background: var(--ns-accent); border-color: var(--ns-accent); color: #1A1200; }
.wt-note .wt-newtag { color: #1A1200; background: var(--ns-g1); }
.wt-note dd.wt-story { background: var(--ns-card2); color: var(--ns-text); }

/* ---------- step-by-step help ---------- */
.wt-manual-in { background: var(--ns-card); border: 1px solid var(--ns-line); border-left: 1px solid var(--ns-line); border-radius: 28px; padding: clamp(1.25rem, 3vw, 2.25rem); }
.wt-manual h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.wt-manual h2::before { content: ""; flex: none; width: 5px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--ns-g1), var(--ns-g2)); }
.wt-manual > .wt-manual-in > p { font-size: 1.05rem; }
.wt-task { background: var(--ns-bg2); border: 1px solid var(--ns-line); border-radius: 20px; }
.wt-task h3 { color: var(--ns-text); font-size: 1.1rem; }
.wt-task a, .wt-task button { color: var(--ns-link); }

/* ---------- the rest of the engine's light surfaces, and its pixel type in rem ---------- */
.wt-proto, .wt-rail { font-size: .875rem; }
.wt-rail .wt-k { font-size: .7rem; }
.wt-pin { font-size: .7rem; }
.wt-pin.wt-active { box-shadow: 0 0 0 4px color-mix(in oklab, var(--ns-g2) 30%, transparent); }
.wt-noted { box-shadow: 0 0 0 2px color-mix(in oklab, var(--ns-g1) 70%, transparent); }
.wt-note { font-size: .95rem; }
.wt-note dt { font-size: .7rem; color: var(--ns-muted); }
.wt-note dt.wt-howto { color: var(--ns-g1); }
.wt-note .wt-newtag { font-size: .66rem; }
.wt-intro details { font-size: .9rem; color: var(--ns-muted); }
.wt-intro summary { color: var(--ns-g1); }
.wt-task ol { font-size: 1rem; }
.wt-task .wt-result { font-size: .95rem; color: var(--ns-muted); }
.wt-showme { font-size: .875rem; }
.wt-words h3, .wt-trouble h3 { font-size: 1.05rem; color: var(--ns-text); }
.wt-words dl, .wt-trouble dl { font-size: .95rem; }
.wt-words dt, .wt-trouble dt { color: var(--ns-text); font-weight: 600; }
.wt-words dd, .wt-trouble dd { color: var(--ns-muted); }
.wt-manual-in kbd, .wt-note kbd { background: var(--ns-card2); color: var(--ns-text); border: 1px solid var(--ns-line); border-radius: 6px; padding: 0 .35em; }

@supports (corner-shape: squircle) {
  .wt-intro-in, .wt-manual-in { corner-shape: squircle; border-radius: 48px; }
  .wt-task, .wt-note { corner-shape: squircle; border-radius: 36px; }
}

@media (forced-colors: active) {
  .wt-intro h1 { background: none; color: CanvasText; }
  .wt-intro-in, .wt-manual-in, .wt-task, .wt-note { border: 1px solid CanvasText; }
}

/* Phone frame behind the app, and the note panel's small text. */
.wt-frame { background: var(--ns-bg); border-color: #05070f; box-shadow: 0 24px 60px rgb(0 0 0 / .45); }
.wt-v { font-size: .78rem; color: var(--ns-muted); }
.wt-x { font-size: 1.375rem; color: var(--ns-muted); }
