/* Artagon theme */
:root {
  --ink: #0b1220;
  --bg: #0a0f1e;
  --surface: #0f172a;
  --muted: #94a3b8;
  --primary: #22e3c5;
  --accent: #7c5cff;
  --ring: rgba(34, 227, 197, 0.45);
  --maxw: 1200px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 8, 23, 0.35);
}

/* ========= THEME PACKS ========= */

/* Midnight Teal (current default) */
:root[data-theme="midnight"] {
  --bg: #0b1220;
  --bg-alt: #0a0f1e;
  --surface: #0f172a;
  --border: #1e293b;

  --text: #e2e8f0;
  --muted: #94a3b8;

  --brand-teal: #22e3c5; /* Verified */
  --brand-violet: #7c5cff; /* Attested */
  --brand-sky: #38bdf8; /* Helpful actions/links */

  --ring: rgba(34, 227, 197, 0.45);
}

/* Twilight Indigo */
:root[data-theme="twilight"] {
  --bg: #0e1026;
  --bg-alt: #101530;
  --surface: #131a3a;
  --border: #1e2a4a;

  --text: #e5eaf3;
  --muted: #a9b4cc;

  --brand-teal: #22d3ee;
  --brand-violet: #a78bfa;
  --brand-sky: #6ea8fe;

  --ring: rgba(110, 168, 254, 0.45);
}

/* Deep Slate Blue */
:root[data-theme="slate"] {
  --bg: #0a0e19;
  --bg-alt: #0e1526;
  --surface: #101a2e;
  --border: #20314e;

  --text: #edf2f7;
  --muted: #9bb1cc;

  --brand-teal: #2dd4bf;
  --brand-violet: #5b8aff;
  --brand-sky: #5b8aff;

  --ring: rgba(91, 138, 255, 0.45);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font:
    16px/1.6 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Arial;
  color: var(--text, #e2e8f0);
  background:
    radial-gradient(
      1200px 580px at 20% -10%,
      color-mix(in oklab, var(--brand-violet, #7c5cff) 25%, transparent),
      transparent 60%
    ),
    radial-gradient(
      1000px 520px at 80% -10%,
      color-mix(in oklab, var(--brand-teal, #22e3c5) 18%, transparent),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      var(--bg-alt, #0a0f1e) 0%,
      var(--bg, #0b1220) 60%,
      var(--bg, #0b1220) 100%
    );
  background-color: var(--bg, #0b1220); /* fallback */
}
a {
  color: var(--brand-sky, var(--primary, #22e3c5));
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 20px;
}
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 30, 0.55);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: saturate(150%) blur(10px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #f8fafc;
  text-decoration: none;
}
.logo {
  width: 28px;
  height: 28px;
}
nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}
nav a {
  color: #e2e8f0;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
}
nav a:hover {
  background: rgba(148, 163, 184, 0.12);
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  line-height: 1;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(
    135deg,
    var(--brand-teal, var(--primary, #22e3c5)),
    var(--brand-sky, #38bdf8)
  );
  color: #041016;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow:
    0 4px 16px color-mix(in srgb, var(--brand-teal) 40%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
}

.cta::before {
  content: '→';
  margin-right: 0.4rem;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 24px color-mix(in srgb, var(--brand-teal) 50%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta:hover::before {
  transform: translateX(3px);
}

.cta:hover::after {
  left: 100%;
}

.cta-large {
  height: 48px;
  font-size: 1.1rem;
  padding: 0 2rem;
}

.cta-section {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand-teal) 5%, var(--bg)),
    color-mix(in srgb, var(--brand-violet) 5%, var(--bg))
  );
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.hero {
  padding: 84px 0 42px;
}
.hero h1 {
  font-size: clamp(2rem, 2.6vw + 1rem, 4rem);
  line-height: 1.1;
  margin: 0 0 16px;
}
.sub {
  color: #a7b4c7;
  max-width: 760px;
  font-size: 1.15rem;
}
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 25%, transparent);
  background: color-mix(in srgb, var(--surface) 90%, var(--brand-teal) 5%);
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  font-size: 0.875rem;
}

.btn::before {
  content: '◆';
  font-size: 0.6em;
  color: var(--brand-teal);
  transition: all 0.3s ease;
  opacity: 0.6;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-teal);
  background: color-mix(in srgb, var(--surface) 85%, var(--brand-teal) 12%);
  box-shadow:
    0 4px 16px color-mix(in srgb, var(--brand-teal) 20%, transparent),
    inset 0 0 20px color-mix(in srgb, var(--brand-teal) 5%, transparent);
}

.btn:hover::before {
  color: var(--brand-sky);
  opacity: 1;
  transform: rotate(180deg);
}

/* Specific button icon styles */
.btn[href*="docs"]::before {
  content: '📖';
  font-size: 0.9em;
}

.btn[href*="docs"]:hover::before {
  transform: scale(1.15);
}

.btn[href*="play"]::before,
.btn[href*="playground"]::before {
  content: '⚡';
  font-size: 0.9em;
}

.btn[href*="play"]:hover::before,
.btn[href*="playground"]:hover::before {
  transform: scale(1.2) rotate(0deg);
}

.btn[href*="github"]::before {
  content: '⭐';
  font-size: 0.85em;
}

.btn[href*="github"]:hover::before {
  transform: scale(1.15) rotate(0deg);
}

.btn[type="submit"]::before {
  content: '🔍';
  font-size: 0.85em;
}

.btn[type="submit"]:hover::before {
  transform: scale(1.15) rotate(0deg);
}
.grid {
  display: grid;
  gap: 18px;
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: color-mix(in srgb, var(--surface, #0f172a) 90%, white 10%);
  border: 1px solid
    color-mix(
      in srgb,
      var(--border, rgba(148, 163, 184, 0.16)) 70%,
      transparent
    );
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctl-h);
  line-height: 1;
  padding: 0 0.65rem;
  gap: 0.35rem;
  border: 1px solid
    color-mix(in srgb, var(--border, rgba(148, 163, 184, 0.22)) 60%, white 10%);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text, #cbd5e1);
}
.hero-art {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 26px;
}
@media (max-width: 900px) {
  .kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}
.section {
  padding: 60px 0;
}
.twocol {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 0.9fr;
}
@media (max-width: 1000px) {
  .twocol {
    grid-template-columns: 1fr;
  }
}
.code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #0a1222;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 18px;
  overflow: auto;
}
footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 28px 0 60px;
  color: #9fb1c8;
}
.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.discrete {
  color: #8fa0b8;
  font-size: 0.92rem;
}
.menu {
  display: none;
}
.menu-btn {
  display: none;
}
@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
  }
  .menu {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 30, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 10px 20px;
    backdrop-filter: blur(10px);
  }
  .menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .menu a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0.5rem;
  }
  .menu .nav-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
  }
  nav ul {
    display: none;
  }
  .menu[hidden] {
    display: none;
  }
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 8px;
}
.sidebar {
  width: 260px;
  padding: 16px;
  position: sticky;
  top: 70px;
}
.doc {
  padding: 16px;
}
.site-footer small {
  color: #9fb1c8;
}
.hide-sm {
  display: inline-flex;
}
@media (max-width: 980px) {
  .hide-sm {
    display: none;
  }
}

/* ===== NAV LAYOUT NORMALIZATION ===== */
:root {
  --nav-h: 64px;
  --ctl-h: 36px;
}
header {
  min-height: var(--nav-h);
}
header .nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1;
  height: var(--ctl-h);
}
header .links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
header .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctl-h);
  line-height: 1;
  padding: 0 0.7rem;
  color: var(--text);
  opacity: 0.85;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}
header .links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-sky));
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--brand-teal);
}
header .links a:hover {
  background: color-mix(in srgb, var(--brand-teal) 5%, transparent);
  opacity: 1;
  box-shadow: 0 0 15px color-mix(in srgb, var(--brand-teal) 15%, transparent);
}
header .links a:hover::after {
  width: 70%;
}
header .links a.active,
header .links a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--brand-teal) 40%, transparent);
  background: color-mix(in srgb, var(--brand-teal) 8%, transparent);
  opacity: 1;
  box-shadow: 0 0 12px color-mix(in srgb, var(--brand-teal) 20%, transparent);
}
header .links a.active::after,
header .links a[aria-current="page"]::after {
  width: 70%;
}

/* Navigation icons */
.nav-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
header .links a:hover .nav-icon {
  opacity: 1;
  transform: scale(1.1);
}
header .links a.active .nav-icon,
header .links a[aria-current="page"] .nav-icon {
  opacity: 1;
}

/* Mobile menu button */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font: inherit;
  transition: all 0.2s ease;
}
.menu-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}
.menu-btn:hover .menu-icon {
  transform: rotate(90deg);
}
.menu-btn[aria-expanded="true"] .menu-icon {
  transform: rotate(90deg);
}
.menu-text {
  font-size: 0.9rem;
}

header .right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Tagline in header - small and pop */
header .right .pill {
  font-size: 0.65rem;
  padding: 0 0.6rem;
  height: 28px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand-teal) 12%, transparent),
    color-mix(in srgb, var(--brand-violet) 12%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--brand-teal) 30%, transparent);
  color: var(--brand-teal);
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--brand-teal) 20%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--brand-teal) 8%, transparent);
  animation: tagline-shimmer 4s ease-in-out infinite;
}

@keyframes tagline-shimmer {
  0%, 100% {
    box-shadow:
      0 0 12px color-mix(in srgb, var(--brand-teal) 20%, transparent),
      inset 0 0 8px color-mix(in srgb, var(--brand-teal) 8%, transparent);
    border-color: color-mix(in srgb, var(--brand-teal) 30%, transparent);
  }
  50% {
    box-shadow:
      0 0 18px color-mix(in srgb, var(--brand-teal) 35%, transparent),
      inset 0 0 12px color-mix(in srgb, var(--brand-violet) 10%, transparent);
    border-color: color-mix(in srgb, var(--brand-violet) 35%, transparent);
  }
}

/* Accessible skip link: hidden until keyboard focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 0.55rem 0.85rem;
  z-index: 10001;
  background: var(--surface);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Anchor targets not hidden under sticky header */
:target {
  scroll-margin-top: 80px;
}

/* ===== HOME PAGE HERO SECTION ===== */

/* Mission Badge - prominent hero badge */
.mission-badge {
  display: inline-block;
  color: var(--brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--brand-teal);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 8%, transparent);
  box-shadow: 0 0 25px color-mix(in srgb, var(--brand-teal) 35%, transparent);
  margin-bottom: 1.5rem;
}

/* Hero H1 - Verified, Private, Attested with gradient glow */
#hero-h1 {
  background: linear-gradient(
    120deg,
    var(--brand-teal) 0%,
    var(--brand-sky) 45%,
    var(--brand-violet) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 40px color-mix(in srgb, var(--brand-teal) 30%, transparent),
    0 0 80px color-mix(in srgb, var(--brand-violet) 20%, transparent);
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--brand-teal) 40%, transparent))
          drop-shadow(0 0 40px color-mix(in srgb, var(--brand-violet) 25%, transparent));
  animation: rainbow-shift 8s ease-in-out infinite;
  position: relative;
}

@keyframes rainbow-shift {
  0%, 100% {
    filter:
      drop-shadow(0 0 20px color-mix(in srgb, var(--brand-teal) 40%, transparent))
      drop-shadow(0 0 40px color-mix(in srgb, var(--brand-violet) 25%, transparent));
  }
  33% {
    filter:
      drop-shadow(0 0 25px color-mix(in srgb, var(--brand-sky) 45%, transparent))
      drop-shadow(0 0 35px color-mix(in srgb, var(--brand-teal) 30%, transparent));
  }
  66% {
    filter:
      drop-shadow(0 0 25px color-mix(in srgb, var(--brand-violet) 45%, transparent))
      drop-shadow(0 0 35px color-mix(in srgb, var(--brand-sky) 30%, transparent));
  }
}

/* ===== HOME PAGE MISSION SECTION ===== */

/* Mission intro paragraph */
.mission-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
}

.mission-intro strong {
  color: var(--text);
  font-weight: 600;
}

/* Domain Cards */
.domain-highlight {
  position: relative;
  transition: all 0.3s ease;
  border-color: color-mix(in srgb, var(--border) 70%, transparent);
}

.domain-highlight:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  border-color: var(--brand-teal);
}

.domain-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--brand-teal);
  background: var(--surface);
  border: 2px solid var(--brand-teal);
  border-radius: 50%;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-teal) 30%, transparent);
}

.domain-highlight h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1.3rem;
}

.domain-highlight p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Pillar Cards */
.pillar-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 6rem;
  transition: all 0.3s ease;
  border-color: color-mix(in srgb, var(--border) 70%, transparent);
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--brand-violet);
}

.pill-number {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-violet);
  background: color-mix(in srgb, var(--brand-violet) 15%, transparent);
  border: 2px solid var(--brand-violet);
  border-radius: 50%;
  flex-shrink: 0;
}

.pillar-card h4 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-size: 1.15rem;
}

.pillar-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Vision CTA section */
.vision-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .mission-badge {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }

  .domain-badge {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    top: -10px;
    right: 15px;
  }

  .pillar-card {
    padding-left: 20px;
    padding-top: 3rem;
  }

  .pill-number {
    left: auto;
    right: 20px;
    top: 15px;
  }
}

/* ===== Roadmap readability ===== */
:root{
  --rm-card-bg: color-mix(in srgb, var(--surface) 88%, transparent);
  --rm-card-stroke: color-mix(in srgb, var(--border) 72%, transparent);
  --rm-chip-bg: rgba(148,163,184,.12);
}

.rm-hero { padding-block: clamp(48px, 8vw, 112px); border-bottom: 1px solid var(--rm-card-stroke); }
.rm-lead { color: color-mix(in srgb, var(--text) 85%, white 6%); max-width: 70ch; line-height: 1.6; }

.rm-onthispage { display:flex; gap:.5rem; flex-wrap: wrap; margin-top: 16px; }
.rm-chip {
  display:inline-flex; align-items:center; gap:.4rem; height:30px; padding:0 .7rem;
  border-radius: 999px; background: var(--rm-chip-bg); border:1px solid var(--rm-card-stroke);
  font-weight: 600; font-size: .9rem;
}

.rm-grid { display:grid; gap:16px; grid-template-columns: repeat(12, minmax(0,1fr)); }
.rm-col-4 { grid-column: span 4; }
@media (max-width: 960px){ .rm-col-4 { grid-column: span 12; } }

.rm-card {
  background: var(--rm-card-bg); border:1px solid var(--rm-card-stroke);
  border-radius: 16px; padding: 18px; backdrop-filter: saturate(110%) blur(6px);
}
.rm-card h3 { margin: 0 0 .3rem 0; }
.rm-eyebrow { font-size: .82rem; letter-spacing:.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 70%, white 10%); margin-bottom: .35rem; }

.rm-list { margin: .3rem 0 0 0; padding-left: 1.1rem; }
.rm-list li { margin: .25rem 0; }

.rm-kpis { display:flex; flex-wrap:wrap; gap:.4rem; margin-top: 10px; }
.rm-kpi {
  display:inline-flex; align-items:center; gap:.4rem; height:28px; padding: 0 .6rem;
  border-radius:10px; background: var(--rm-chip-bg); border:1px solid var(--rm-card-stroke);
  font-size: .85rem; font-weight: 600;
}

.rm-toggle { display:flex; gap:.6rem; margin: 12px 0 18px 0; }
.rm-toggle input { display:none; }
.rm-toggle label {
  cursor:pointer; padding:.4rem .7rem; border-radius:10px; border:1px solid var(--rm-card-stroke);
  background: var(--rm-chip-bg);
}
.rm-toggle input:checked + label { background: var(--brand-grad); color:#031018; border-color: transparent; }

#view-cards:not(:checked) ~ .rm-cards { display:none; }
#view-table:not(:checked) ~ .rm-table { display:none; }

.rm-table table { width:100%; border-collapse: separate; border-spacing:0; }
.rm-table th, .rm-table td { padding: 10px 12px; border-bottom:1px solid var(--rm-card-stroke); }
.rm-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.rm-table tbody tr:nth-child(odd){ background: color-mix(in srgb, var(--surface) 96%, transparent); }
.rm-phase { white-space: nowrap; font-weight: 700; }

@media print {
  .rm-toggle, .rm-onthispage { display:none; }
  .rm-table thead th { position: static; }
}

/* Skip link: visible only on focus */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 16px; top: 16px; width: auto; height: auto; padding: .5rem .75rem;
  background: var(--surface); border:1px solid var(--card-stroke); border-radius:10px; z-index: 1000;
}

/* "Shim" dead links: visibly disabled but keep layout */
a.is-disabled { pointer-events: none; opacity: .55; }
a.is-disabled::after { content: " (coming soon)"; font-size: .85em; color: color-mix(in srgb, var(--text) 70%, white 10%); }

/* Spacing & rhythm */
:root{
  --section-pad: clamp(48px, 8vw, 112px);
  --container-max: 1200px;
}
.section { padding-block: var(--section-pad); }
.container.narrow { max-width: var(--container-max); margin-inline: auto; }

.lead { font-size: clamp(1rem, .65rem + 1vw, 1.25rem); line-height: 1.6; max-width: 62ch; }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0,1fr)); }
.col-4 { grid-column: span 4; } @media (max-width: 960px){ .col-4 { grid-column: span 12; } }
.card { background: var(--card-bg); border:1px solid var(--card-stroke); border-radius:16px; padding:18px; }

/* ===== Roadmap toggle + spacing fix ===== */
/* radios: invisible but present in DOM; must be siblings of both views */
.rm-view-toggle { position: absolute; inline-size: 0; block-size: 0; opacity: 0; pointer-events: none; }

/* Default: show cards, hide table */
.rm-cards { display: block; }
.rm-table { display: none; }

/* Toggle using wrapper state (radios are siblings of sections) */
.rm-view #view-table:checked ~ .rm-cards { display: none; }
.rm-view #view-table:checked ~ .rm-table { display: block; }

/* Active tab highlighting without adjacency dependence */
.rm-toggle { display: flex; gap: .6rem; margin: 12px 0 18px 0; }
.rm-tab { cursor: pointer; padding: .45rem .75rem; border-radius: 10px; border: 1px solid var(--rm-card-stroke); background: var(--rm-chip-bg); font-weight: 600; }
.rm-view #view-cards:checked ~ .rm-hero .toggle-cards,
.rm-view #view-table:checked ~ .rm-hero .toggle-table { background: var(--brand-grad); color: #031018; border-color: transparent; }

/* Tighten spacing under hero; global .section padding can be too large here */
.rm-cards.section, .rm-table.section { padding-top: 16px; }

/* Smooth anchor scroll with fixed header */
.rm-card { scroll-margin-top: 80px; }

/* Minor polish for first card top margin if any */
.rm-card:first-child { margin-top: 0; }
