/* Tokens consumed from tokens.css (loaded before this file) — see mapping
   in the redesign task notes: --bg -> --bg-base, --text/--txt -> --text-main,
   --accent* -> --green*, --mono/--font -> --font-mono/--font-sans. */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--green); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-muted); }

/* ── NAV ─────────────────────────────────────────────────────── */
.sp-nav {
  position: sticky; top: 0; z-index: 50;
  height: 50px; flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 20px; gap: 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-dim);
}

/* Logo CSS provided by public/css/logo.css (bc-logo component) — single
   source of truth across base, landing, login and static layouts. Scale
   override matches .hd/.va-head so the mark renders the same size
   everywhere instead of falling back to logo.css's --bc-scale:1. */
.sp-nav .bc-logo { --bc-scale: 0.52; --bc-gap: 9px; --bc-spacing: 3.5px; }

.sp-sep {
  width: 1px; height: 14px; background: var(--border-dim); flex-shrink: 0;
}
.sp-back {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
  transition: color 0.12s; letter-spacing: 0.06em; text-transform: uppercase;
}
.sp-back:hover { color: var(--text-main); }
.sp-page {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted);
  letter-spacing: 0.10em; text-transform: uppercase;
}

.sp-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.sp-live { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
.sp-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

/* Theme toggle — same component as base.css's .theme-toggle (dashboard
   header); duplicated here since this layout doesn't load base.css. */
.theme-toggle {
    display: inline-flex; align-items: center;
    background: var(--bg-elevated); border: 1px solid var(--border-dim);
    border-radius: var(--r-md); padding: 2px; gap: 1px;
}
.theme-toggle button {
    background: transparent; border: 0; color: var(--text-muted);
    width: 26px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.68rem; border-radius: var(--r-sm);
    transition: color var(--t-fast), background var(--t-fast);
}
.theme-toggle button:hover { color: var(--text-main); }
.theme-toggle button.on {
    color: var(--accent);
    background: var(--bg-surface);
}

/* ── CONTENT WRAP ────────────────────────────────────────────── */
.sp-wrap {
  max-width: 760px; margin: 0 auto;
  padding: 48px 24px 96px;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ── PAGE ELEMENTS ───────────────────────────────────────────── */
.sp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 18px;
}
.sp-eyebrow::before { content: ''; width: 20px; height: 2px; background: rgba(255,255,255,0.18); }
.sp-eyebrow b { color: var(--text-main); font-weight: 700; }
.sp-eyebrow span { color: var(--text-muted); }

.sp-h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.08;
  margin-bottom: 14px;
}
.sp-h1 em {
  font-style: normal;
  color: var(--green);
}

.sp-lead {
  font-size: 0.92rem; color: var(--text-sub); line-height: 1.75;
  max-width: 580px; margin-bottom: 48px;
  border-bottom: 1px solid var(--border-dim); padding-bottom: 36px;
}
.sp-lead b { color: var(--text-main); font-weight: 600; }

.sp-meta {
  font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-muted);
  display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 40px;
}
.sp-meta b { color: var(--text-sub); }

/* ── BODY SECTIONS ───────────────────────────────────────────── */
.sp-body { display: flex; flex-direction: column; gap: 40px; }

.sp-section h2 {
  font-family: var(--font-sans);
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-main);
}
.sp-section h2 .n {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  color: var(--green); letter-spacing: 0.10em;
  background: var(--green-dim); border: 1px solid var(--green-border);
  padding: 2px 7px;
}
.sp-section p { font-size: 0.86rem; color: var(--text-sub); line-height: 1.8; margin-bottom: 10px; }
.sp-section p:last-child { margin-bottom: 0; }
.sp-section p b { color: var(--text-main); font-weight: 600; }
.sp-section code {
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--bg-elevated); border: 1px solid var(--border-dim);
  padding: 1px 5px; color: var(--green);
}
.sp-section a { color: var(--green); text-decoration: none; transition: color 0.12s; }
.sp-section a:hover { color: var(--accent-h); }

.sp-section ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sp-section ul li {
  font-size: 0.86rem; color: var(--text-sub); line-height: 1.65;
  display: flex; align-items: flex-start; gap: 10px;
}
.sp-section ul li::before {
  content: '→'; color: var(--green); font-family: var(--font-mono);
  font-size: 0.64rem; margin-top: 4px; flex-shrink: 0;
}
.sp-section ul li b { color: var(--text-main); font-weight: 600; }

.sp-divider { border: 0; border-top: 1px solid var(--border-dim); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.sp-foot {
  margin-top: auto; padding-top: 28px;
  border-top: 1px solid var(--border-dim);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted);
}
.sp-foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.sp-foot a { color: var(--text-muted); text-decoration: none; transition: color 0.12s; }
.sp-foot a:hover { color: var(--text-main); }

/* ── Tablet / large phone (≤680px) ─────────────────────────────── */
@media (max-width: 680px) {
  .sp-nav  { padding: 0 16px; gap: 10px; height: 48px; }
  .sp-wrap { padding: 36px 18px 72px; }
  .sp-page { display: none; }
  .sp-back span { display: none; }
  /* Hero spacing — compress so the lead doesn't push body content
     off-screen before any of it shows. */
  .sp-h1   { letter-spacing: -0.02em; font-size: clamp(1.6rem, 7vw, 2.2rem); margin-bottom: 12px; }
  .sp-lead { font-size: 0.86rem; line-height: 1.65; margin-bottom: 28px; padding-bottom: 22px; }
  .sp-meta { flex-direction: column; gap: 6px; margin-bottom: 28px; }
  /* Body — tighter rhythm, looser line-height than 1.8 reads better on
     narrow lines because gaps were creating uncomfortable whitespace. */
  .sp-body { gap: 28px; }
  .sp-section h2 { font-size: 1rem; margin-bottom: 10px; }
  .sp-section p,
  .sp-section ul li { font-size: 0.82rem; line-height: 1.65; }
  /* Footer — gap shrinks so links wrap on one or two compact rows
     instead of stretching into a tall stack. */
  .sp-foot { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 56px; padding-top: 22px; }
  .sp-foot-links { gap: 14px; }
}

/* ── Small phone (≤480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
  .sp-nav { padding: 0 12px; gap: 8px; }
  /* Drop the back link and divider — wordmark is already a Home link,
     and the duplicate Home arrow steals scarce nav real estate. */
  .sp-sep, .sp-back { display: none; }
  .sp-wrap { padding: 30px 14px 56px; }
  .sp-h1 { font-size: clamp(1.4rem, 8vw, 1.9rem); }
  .sp-eyebrow { font-size: 0.55rem; margin-bottom: 14px; }
  .sp-section h2 .n { font-size: 0.54rem; padding: 1px 6px; }
}

/* ── Accessibility · keyboard focus ──
   Public pages had no focus styles at all. Give every interactive
   control a visible accent ring for keyboard/AT users; mouse users see
   nothing (:focus-visible). Outline follows the element's border-radius. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* Smooth in-page anchor jumps (nav → #pricing etc.); perf.css disables
   this under prefers-reduced-motion. */
html { scroll-behavior: smooth; }

/* Firefox scrollbar theming (WebKit handled above). */
* { scrollbar-width: thin; scrollbar-color: var(--border-muted) transparent; }
