/* ───────────────────────────────────────────────────────────
   Prior Moves — landing styles. Tokens mirror app.py _CSS.
   ─────────────────────────────────────────────────────────── */
:root {
  /* Consume the Prior Moves Design System foundation (ds-tokens.css, linked
     first) as the single source of truth. Local aliases keep the existing
     rules working while every value now traces to one --pm-* token. */
  --bg: var(--pm-bg);
  --panel: var(--pm-panel);
  --panel-2: var(--pm-panel-2);
  --panel-3: var(--pm-panel-3);
  --border: var(--pm-border);
  --border-2: var(--pm-border-2);
  /* Foreground: DS base, lifted for contrast (Howard directive 2026-06-26). */
  --text: #eef2fb;
  --muted: #aebdd6;
  --faint: #8a98b2;
  --accent: var(--pm-accent);
  --accent-2: var(--pm-accent-2);
  --accent-ink: var(--pm-accent-ink);
  --accent-grad: var(--pm-accent-grad);
  --gold: var(--pm-gold);
  --green: var(--pm-up);
  --down: var(--pm-down); /* colorblind-safe amber for negatives (not red) */
  --red: var(--pm-alert); /* hard errors only */
  --card-grad: var(--pm-card-grad);
  --shadow-card: var(--pm-shadow-card);
  --font-mono: var(--pm-font-mono);
  --maxw: 1340px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(
      1100px 520px at 78% -8%,
      rgba(34, 211, 238, 0.06),
      transparent 60%
    ),
    radial-gradient(
      900px 480px at 10% -6%,
      rgba(59, 130, 246, 0.08),
      transparent 60%
    ),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  letter-spacing: -0.03em;
}
h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}
h3 {
  font-weight: 700;
  font-size: 1.12rem;
}
p {
  margin: 0 0 1rem;
}

.grad {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ── buttons ── */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  padding: 0.72rem 1.3rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #2f6fe0);
  border-color: #2f6fe0;
  color: #fff;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.28);
}
.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.42);
}
.btn-ghost {
  background: var(--panel-2);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
}
.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}
.btn-lg {
  padding: 0.95rem 1.9rem;
  font-size: 1.08rem;
}

/* ── header ── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* full-bleed bar, but content edges align to the centered --maxw column */
  padding: 0.85rem max(clamp(1rem, 4vw, 2rem), calc((100% - var(--maxw)) / 2));
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  border-radius: 8px;
}
.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.head-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.head-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.head-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.head-nav a.btn {
  color: #fff;
}

/* ── layout bands ── */
.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2rem);
}
.band-alt {
  position: relative;
  max-width: none;
}
.band-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(17, 26, 46, 0.55),
    rgba(17, 26, 46, 0)
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band-alt > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.band-alt {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2rem);
}
.section-lede {
  color: var(--muted);
  max-width: 64ch;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  text-align: left;
}
.band-cta {
  margin-top: 1.75rem;
  font-size: 1.02rem;
  color: var(--fg);
  max-width: 64ch;
}
.band-cta a {
  font-weight: 600;
  white-space: normal;
}
/* band-alt centers its children (margin:auto). The narrow 64ch lede therefore
   centered as a box, so its left edge sat right of the left-aligned h2 (read as
   "right-aligned"). Match the lede box to the full content column so it shares
   the h2's left edge. */
.band-alt > .section-lede {
  max-width: var(--maxw);
}

/* ── hero ── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem)
    clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 1rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid #1c6577;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
}
.hero h1 {
  margin-bottom: 1rem;
}
.lede {
  color: var(--muted);
  font-size: 1.13rem;
  max-width: 54ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.6rem 0 0.9rem;
}
.hero-note {
  color: var(--faint);
  font-size: 0.86rem;
  margin: 0;
}

.hero-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}
.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.stat-list li {
  background: rgba(10, 15, 28, 0.45);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
}
.stat-num {
  display: block;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.stat-num small {
  font-size: 0.7rem;
  color: var(--faint);
  font-weight: 600;
  margin-left: 0.15rem;
}
.stat-lab {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}
.card-foot {
  color: var(--faint);
  font-size: 0.74rem;
  margin: 1rem 0 0;
  line-height: 1.45;
}

/* ── feature grid ── */
.grid {
  display: grid;
  gap: 1.1rem;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.feature {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 1.3rem 1.35rem;
}
.feature h3 {
  margin-bottom: 0.5rem;
}
.feature p {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

/* ── steps ── */
/* margin:0 auto — the auto keeps the column centered in band-alt's maxw track
   like the h2/lede; a bare margin:0 here overrode that and shoved the steps
   to the section's left padding edge (read as "misaligned" vs the heading). */
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.steps li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}
.step-n {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  /* nudge the badge onto the title's optical line (h3 cap-height sits a hair
     below the flex-start top) so badge ↔ title read level */
  margin-top: 0.1rem;
}
.steps h3 {
  margin-bottom: 0.3rem;
}
.steps p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}
.cta-row {
  margin-top: 2rem;
}

/* ── stat cards (track record) ── */
.stat-cards {
  margin-bottom: 1.6rem;
}
.stat-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-card .big {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: var(--green);
  line-height: 1;
}
.stat-card .unit {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
}
.stat-card .lab {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.55rem;
  line-height: 1.4;
}
.fine {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 72ch;
}
.caveat {
  margin-top: 1.4rem;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: rgba(244, 183, 64, 0.07);
  border: 1px solid #7a5c1e;
  color: #f6cf83;
  font-size: 0.92rem;
  max-width: 72ch;
}
.caveat strong {
  color: var(--gold);
}

/* ── methodology ── */
.method {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
}
.method h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}
.method p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.method strong {
  color: var(--text);
}

/* ── FAQ ── */
.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 78ch;
}
.faq details {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 1.25rem;
  transition: border-color 0.15s ease;
}
.faq details[open] {
  border-color: #33507e;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1.05rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--muted);
  margin: 0;
  padding: 0 0 1.1rem;
  font-size: 0.96rem;
}

/* ── final CTA ── */
.final-cta {
  max-width: var(--maxw);
  margin: 0 auto clamp(2rem, 5vw, 4rem);
  text-align: center;
  padding: clamp(2.4rem, 6vw, 4rem) clamp(1.4rem, 4vw, 2rem);
  background:
    radial-gradient(
      700px 320px at 50% 0%,
      rgba(59, 130, 246, 0.16),
      transparent 70%
    ),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 20px;
}
.final-cta h2 {
  margin-bottom: 0.4rem;
}
.final-cta p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 1.6rem;
}

/* ── footer ── */
.site-foot {
  border-top: 1px solid var(--border);
  padding: clamp(2.4rem, 5vw, 3.4rem) clamp(1rem, 4vw, 2rem) 2.6rem;
  background: rgba(10, 15, 28, 0.55);
}
/* "More from Howard" network nav — align to the same centered column as the
   rest of the footer (was inline-styled and full-width = misaligned). */
.foot-network {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto 1.4rem;
  font-size: 0.9rem;
}
.foot-network > span {
  font-weight: 600;
  color: var(--muted);
}
.foot-network a {
  color: var(--muted);
  font-weight: 500;
}
.foot-network a:hover {
  color: var(--text);
}
.foot-cols {
  max-width: var(--maxw);
  margin: 0 auto 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand {
  max-width: 34ch;
}
.foot-brand p {
  color: var(--faint);
  font-size: 0.9rem;
  margin: 0.7rem 0 0;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}
.foot-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.foot-nav a:hover {
  color: var(--text);
}
.disclaimer {
  max-width: var(--maxw);
  margin: 0 auto 1rem;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.6;
}
.disclaimer strong {
  color: var(--muted);
}
.copyright {
  max-width: var(--maxw);
  margin: 0 auto;
  color: var(--faint);
  font-size: 0.8rem;
}

/* ── responsive ── */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-card {
    order: 2;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .head-nav a:not(.btn) {
    display: none;
  }
  .stat-list {
    grid-template-columns: 1fr 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  /* Apex nav: the section-anchor links overflow a phone. Hide them (the sections
     are reachable by scrolling and from the footer); keep logo + primary CTA. */
  .ap-nav-links {
    display: none !important;
  }
  .ap-wrap {
    flex-wrap: wrap;
    gap: 12px !important;
  }
}
/* Horizontal-scroll wrapper for the apex data tables so their fixed columns
   never squish or overflow on a phone. The inner table keeps a min width and
   scrolls sideways instead. */
.ap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 620px) {
  .ap-scroll > .ap-tbl {
    min-width: 520px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ── digest email capture ── */
.digest-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.digest-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.digest-list li {
  background: rgba(10, 15, 28, 0.45);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.97rem;
}
.digest-list strong {
  color: var(--text);
}
.digest-honesty {
  color: var(--faint);
  font-size: 0.86rem;
  max-width: 56ch;
}
.digest-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.2rem 1rem;
}
.substack-embed {
  border-radius: 10px;
  overflow: hidden;
  margin: 0.9rem 0 0.8rem;
  border: 1px solid var(--border);
}
.substack-embed iframe {
  display: block;
  background: transparent;
}
.digest-fine {
  color: var(--faint);
  font-size: 0.8rem;
  margin: 0 0 0.6rem;
}
.final-cta .cta-sub {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}
@media (max-width: 760px) {
  .digest-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   DESIGN SYSTEM UPGRADES (Prior Moves DS, 2026-06-26)
   Token foundation in ds-tokens.css; these apply the DS's visible polish to
   the existing structure: accent rail, gradient primary, mono numerals.
   ========================================================================== */

/* Thin accent rail at the very top of the page (DS .lp-top). */
.ds-top {
  height: 3px;
  background: var(--accent-grad);
}

/* Primary button — DS gradient with dark ink (reads as a lit signal, not a
   flat blue block). */
.btn-primary {
  background: var(--accent-grad);
  border: 0;
  color: #06121f;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.22);
}
.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.34);
}

/* Every figure is tabular mono — the numbers are the product. */
.stat-num,
.stat-num small,
.stat-card .big,
.stat-card .unit,
.card-foot .v,
.hero-card .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings:
    "tnum" 1,
    "zero" 1;
  letter-spacing: -0.01em;
}

/* Positive figures use the colorblind-safe green-teal; the hero proof number
   already reads as an "edge". */
.stat-card .big {
  color: var(--green);
}

/* Card surfaces pick up the DS gradient + elevation for depth. */
.hero-card,
.stat-card,
.feature,
.method {
  background: var(--card-grad);
  box-shadow: var(--shadow-card);
}
.feature:hover,
.method:hover,
.stat-card:hover {
  border-color: var(--border-2);
}
