/* StackPilot AI — Classic Animated Executive Slate Design System
   Pure CSS, zero external assets/fonts, strict CSP compliant, WCAG AA/AAA contrast. */

:root {
  --font-serif: 'Iowan Old Style', Georgia, 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  --bg-canvas: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-surface-soft: #eef2f9;
  --bg-masthead: #0f172a;
  --bg-notice: #fffbeb;

  --ink-primary: #0b1220;
  --ink-body: #334155;
  --ink-muted: #475569;
  --ink-amber: #78350f;
  --ink-masthead: #ffffff;
  --ink-masthead-nav: #e2e8f0;

  --accent-cobalt: #2563eb;
  --accent-cobalt-hover: #1d4ed8;
  --accent-cobalt-text: #1d4ed8;
  --accent-emerald: #065f46;
  --accent-emerald-hover: #064e3b;
  --accent-emerald-legacy: #047857;
  --accent-emerald-bright: #34d399;
  --accent-emerald-mid: #059669;
  --accent-navy: #1e3a5f;
  --accent-amber: #d97706;

  --border-hairline: #e2e8f0;
  --border-control: #94a3b8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--ink-body);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  background: var(--accent-emerald);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 6px;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--ink-primary);
  outline-offset: 2px;
}

/* Floating Glassmorphic Pill Header (Luminous Bento Editorial) */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  background: transparent;
  padding: 14px max(20px, calc((100% - 1160px) / 2)) 8px;
}

header.site-header::after {
  display: none;
}

.nav-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 8px 28px rgba(11, 18, 32, 0.06);
}

header.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

header.site-header .brand .accent {
  color: var(--accent-cobalt-text);
}

.brand-mark {
  flex-shrink: 0;
  display: block;
}

header.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

header.site-header nav a {
  color: var(--ink-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 4px;
  text-decoration: none;
  transition: color 180ms ease;
}

header.site-header nav a::after {
  background: var(--accent-cobalt);
}

header.site-header nav a:hover,
header.site-header nav a:focus-visible {
  color: var(--ink-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, transform 180ms ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--accent-cobalt);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Legacy Midnight Slate Masthead (private routes) */
header:not(.site-header) {
  position: relative;
  width: 100%;
  background: var(--bg-masthead);
  color: var(--ink-masthead);
  padding: 20px max(24px, calc((100% - 1080px) / 2)) 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
}

header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-emerald-mid) 0%,
    var(--accent-emerald-bright) 35%,
    var(--accent-navy) 70%,
    var(--accent-emerald-mid) 100%
  );
  background-size: 200% 100%;
  animation: mastheadShimmer 8s linear infinite;
}

.brand,
a.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink-masthead);
  text-decoration: none;
}

.brand .accent,
a.brand .accent {
  color: var(--accent-emerald-bright);
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-width: 0;
  align-items: center;
}

header nav a {
  position: relative;
  color: var(--ink-masthead-nav);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 4px 0;
  transition: color 220ms ease;
}

header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent-emerald-bright);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

header nav a:hover,
header nav a:focus-visible {
  color: #ffffff;
}

header nav a:hover::after,
header nav a:focus-visible::after {
  transform: scaleX(1);
}

header nav a:focus-visible {
  outline: 2px solid var(--accent-emerald-bright);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Main Content Canvas */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 56px;
  min-height: 68vh;
}

h1,
h2 {
  font-family: var(--font-serif);
  color: var(--ink-primary);
  letter-spacing: -0.015em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.12;
  margin-bottom: 16px;
  animation: fadeUp 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 .accent {
  color: var(--accent-emerald);
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

h3,
h4 {
  font-family: var(--font-sans);
  color: var(--ink-primary);
  margin-top: 0;
}

p,
li {
  color: var(--ink-body);
  line-height: 1.68;
}

strong {
  color: var(--ink-primary);
}

a {
  color: var(--accent-emerald);
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

a:hover {
  color: var(--accent-emerald-hover);
}

:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

/* Hero & Entrance Reveal */
.hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border-hairline);
}

.hero > p,
.eyebrow,
.lead,
main > .notice {
  animation: fadeUp 550ms cubic-bezier(0.16, 1, 0.3, 1) 60ms both;
}

.eyebrow,
.hero > p.accent {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.125rem;
  color: var(--ink-body);
  max-width: 72ch;
}

.section,
section {
  margin: 34px 0;
}

/* Muted / Metadata / Monospace */
.muted,
.helper,
.claim-context {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.claim-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-amber);
  font-weight: 600;
}

.status {
  font-weight: 700;
  color: var(--ink-amber);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
}

code {
  padding: 2px 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel code {
  display: block;
  padding: 14px;
}

/* Notice & Research Boundary Callouts */
.notice,
.alert {
  background: var(--bg-notice);
  border: 1px solid #f59e0b;
  border-left: 4px solid var(--accent-amber);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  color: var(--ink-primary);
  margin: 20px 0;
}

.notice strong,
.alert strong {
  color: var(--ink-amber);
}

/* Cards, Panels, Grids */
.cards,
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.panel,
.quiz,
.stat,
.gate-row {
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-top: 2px solid var(--ink-primary);
  border-radius: 10px;
  padding: 22px;
  min-width: 0;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), border-color 240ms ease, box-shadow 240ms ease;
}

.quiz,
.stat {
  background: var(--bg-surface);
}

.card:hover,
.panel:hover {
  transform: translateY(-3px);
  border-color: var(--accent-emerald-mid);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.65rem;
  color: var(--ink-primary);
}

/* Buttons & Primary CTAs */
.button,
button,
#download-questions {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  background: var(--accent-emerald);
  color: #ffffff;
  border: 1px solid var(--accent-emerald);
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease;
}

.button:hover,
button:hover,
#download-questions:hover {
  background: var(--accent-emerald-hover);
  border-color: var(--accent-emerald-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.18);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.secondary,
.button.secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-control);
}

button.secondary:hover,
.button.secondary:hover {
  background: #e2e8f0;
  border-color: var(--ink-primary);
  color: var(--ink-primary);
  box-shadow: none;
}

.buttons,
.actions,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

/* Forms & Interactive Controls */
.fields,
.inputs,
.compare-controls,
.settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.inputs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-hairline);
  min-width: 0;
}

.field:last-child {
  border-bottom: 0;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

label {
  display: block;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.45;
  margin-bottom: 6px;
}

input[type='text'],
input[type='number'],
input[type='url'],
input[type='search'],
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 11px 12px;
  font: inherit;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  border: 1px solid var(--border-control);
  border-radius: 8px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea {
  min-height: 140px;
  resize: vertical;
  overflow-wrap: anywhere;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent-emerald);
}

.amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-primary);
}

.result {
  margin-top: 20px;
}

.result section,
#result section,
#comparison-result section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

/* Comparison & Data Tables */
.table-scroll,
.scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  background: var(--bg-canvas);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-canvas);
  min-width: 580px;
}

caption {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--ink-muted);
}

thead th {
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--ink-primary);
  vertical-align: bottom;
}

tbody th,
tbody td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
  color: var(--ink-body);
}

tbody th {
  color: var(--ink-primary);
}

tbody tr {
  transition: background-color 220ms ease;
}

tbody tr:hover {
  background: var(--bg-surface);
}

tbody tr:hover > th:first-child,
tbody tr:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-emerald-mid);
}

/* Hub & Directory Grids */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.filter-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-pill:hover,
.filter-pill:focus-visible {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.hub-card {
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.hub-card h3 a {
  color: var(--ink-primary);
  text-decoration: none;
}

.hub-card h3 a:hover,
.hub-card h3 a:focus-visible {
  color: var(--accent-emerald);
  text-decoration: underline;
}

.hub-card p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink-body);
  flex: 1;
}

.hub-card-link {
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.hub-card-link:hover {
  text-decoration: underline;
}

.badge-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Footer */
footer {
  width: 100%;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-hairline);
  color: var(--ink-body);
  padding: 36px max(24px, calc((100% - 1080px) / 2)) 28px;
  font-size: 0.9375rem;
}

footer a {
  color: var(--accent-emerald);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin-bottom: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col strong {
  color: var(--ink-primary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-hairline);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Breakpoints */
@media (max-width: 720px) {
  header {
    padding: 18px 16px 21px;
  }

  main {
    padding: 24px 16px 40px;
  }

  footer {
    padding: 24px 16px;
  }

  .hero {
    padding: 20px 0 18px;
  }

  .cards,
  .grid,
  .fields,
  .inputs,
  .compare-controls,
  .settings {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Luminous Bento Editorial System (Phase 21)
   ========================================================================== */
.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--accent-cobalt-text);
}

.bento-hero {
  position: relative;
  padding: 20px 0 12px;
}

.aurora-glow {
  position: relative;
  overflow: hidden;
}

.aurora-glow::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 360px;
  background: radial-gradient(circle at 25% 35%, rgba(37, 99, 235, 0.12), transparent 55%),
              radial-gradient(circle at 75% 40%, rgba(5, 150, 105, 0.10), transparent 55%);
  pointer-events: none;
  animation: auroraDrift 14s ease-in-out infinite alternate;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.bento-tile {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(11, 18, 32, 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.bento-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(11, 18, 32, 0.07);
  border-color: #cbd5e1;
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }
.bento-span-12 { grid-column: span 12; }

.bento-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin: 0 0 10px;
}

.bento-hero h1 {
  font-size: clamp(1.95rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  margin: 0 0 14px;
}

.hero-deck {
  font-size: 1.02rem;
  color: var(--ink-body);
  margin: 0 0 18px;
  max-width: 58ch;
}

.hero-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-search input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-control);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font-size: 0.95rem;
}

.hero-search button {
  padding: 11px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--accent-cobalt);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

.hero-search button:hover,
.hero-search button:focus-visible {
  background: var(--accent-cobalt-hover);
}

.hero-visual-tile {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-surface-soft);
}

.hero-visual-tile img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.hero-visual-badge {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.hero-visual-badge .badge-domain {
  font-family: var(--font-mono);
  color: var(--accent-cobalt-text);
}

/* Quick Stack Shortlist Tile */
.shortlist-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.shortlist-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  color: var(--ink-body);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.shortlist-pill[aria-pressed="true"] {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #ffffff;
}

.shortlist-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.shortlist-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.shortlist-link:hover,
.shortlist-link:focus-visible {
  border-color: var(--accent-cobalt);
  color: var(--accent-cobalt-text);
}

/* Telemetry & 20-Brand Marquee */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.telemetry-stat {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
}

.telemetry-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--ink-primary);
  line-height: 1.2;
}

.telemetry-stat span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.marquee-wrap {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  padding: 10px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 0 12px;
  animation: marqueeScroll 32s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

/* Geometric Tool Monograms */
.sw-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sw-monogram-sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.sw-cat-crm {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.sw-cat-seo {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
}

.sw-cat-hosting {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Cost-Share Radial Ring & Quote Matrix */
.ring-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 6px 24px rgba(11, 18, 32, 0.04);
}

.ring-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ring-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ring-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 5px;
}

.ring-field select,
.ring-field input[type="range"] {
  width: 100%;
}

.horizon-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.horizon-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  color: var(--ink-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.horizon-btn[aria-pressed="true"] {
  background: var(--accent-cobalt);
  border-color: var(--accent-cobalt);
  color: #ffffff;
}

.ring-viz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
}

.ring-svg {
  width: 210px;
  height: 210px;
  transform: rotate(-90deg);
}

.ring-arc {
  transition: stroke-dashoffset 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ring-readout {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.ring-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
}

.ring-delta {
  grid-column: span 2;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

/* 60-Second Video Briefings + Lightbox Modal */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.story-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid #1e293b;
  background: #0b1220;
  color: #ffffff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.story-card:hover,
.story-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(11, 18, 32, 0.22);
}

.story-card img.story-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.story-card-body {
  position: relative;
  z-index: 1;
}

.story-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.story-card h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 1.12rem;
}

.story-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.88rem;
}

.lb-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(8px);
}

.lb-modal[hidden] {
  display: none;
}

.lb-dialog {
  position: relative;
  width: min(390px, 100%);
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  border-radius: 24px;
  overflow: hidden;
  background: #0b1220;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.lb-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.lb-top,
.lb-slide,
.lb-actions {
  position: relative;
  z-index: 1;
}

.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.lb-progress {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 700;
}

.lb-close,
.lb-next {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.lb-next {
  background: var(--accent-cobalt);
  border-color: var(--accent-cobalt);
  width: 100%;
}

.lb-slide h3 {
  color: #ffffff;
  font-size: 1.45rem;
  margin: 0 0 12px;
}

.lb-slide p {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

/* Scroll-Reveal (always opacity: 1 so axe never measures mid-fade blended contrast) */
.js-ready .reveal {
  opacity: 1;
  transform: translateY(8px);
  transition: transform 320ms ease;
}

.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Software directory search bar */
.directory-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-top: 12px;
}

.search-input {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-control);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 0.95rem;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.filter-pill[aria-pressed="true"] {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #ffffff;
}

.empty-state {
  margin-top: 20px;
  text-align: center;
  padding: 32px 24px;
}

.empty-state h3 {
  margin-top: 0;
  color: var(--ink-primary);
}

.empty-state p {
  margin: 8px auto 18px;
  max-width: 48ch;
  color: var(--ink-body);
}

.error-404-wrap {
  padding-top: 40px;
  padding-bottom: 56px;
}

.error-404-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 32px;
}

.error-404-card h1 {
  margin-top: 14px;
}

.error-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  align-items: center;
}

.error-404-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  color: var(--ink-body);
}

.error-404-link:hover,
.error-404-link:focus-visible {
  color: var(--accent-cobalt-text);
  border-color: var(--accent-cobalt);
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.04); }
}

/* ── Phase 22b: Extended B2B Duel Cards & Profile Chip Dock ─────────────── */

.ext-section {
  padding: 32px 28px;
}

.ext-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.ext-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.ext-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill-count {
  opacity: 0.75;
}

.duel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.duel-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: var(--ink-body);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.duel-card:hover,
.duel-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.09);
}

.monogram-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mono-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}

.mono-cat-crm {
  background: #dbeafe;
  color: #1d4ed8;
}

.mono-cat-seo {
  background: #ede9fe;
  color: #4c1d95;
}

.mono-cat-host {
  background: #d1fae5;
  color: #065f46;
}

.vs-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  color: var(--ink-muted);
}

.duel-cat-tag {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.cat-crm .duel-cat-tag {
  background: #dbeafe;
  color: #1d4ed8;
}

.cat-seo .duel-cat-tag {
  background: #ede9fe;
  color: #4c1d95;
}

.cat-host .duel-cat-tag {
  background: #d1fae5;
  color: #065f46;
}

.duel-body {
  flex: 1;
}

.duel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.duel-line {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.duel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d4ed8;
  border-top: 1px solid var(--border-hairline);
  padding-top: 10px;
  margin-top: auto;
}

.duel-arrow {
  transition: transform 200ms ease;
}

.duel-card:hover .duel-arrow,
.duel-card:focus-visible .duel-arrow {
  transform: translateX(4px);
}

.profiles-dock {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
}

.profiles-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.profiles-dock-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.chip-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  color: #065f46;
  transition: border-color 180ms, background 180ms;
}

.profile-chip.cat-crm {
  color: #1d4ed8;
}

.profile-chip.cat-seo {
  color: #4c1d95;
}

.profile-chip.cat-host {
  color: #065f46;
}

.profile-chip:hover,
.profile-chip:focus-visible {
  background: var(--bg-surface);
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-cat-crm {
  background: #2563eb;
}

.dot-cat-seo {
  background: #7c3aed;
}

.dot-cat-host {
  background: #065f46;
}

.disclosure-strip {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 16px;
  padding: 24px;
}

.disclosure-strip h2 {
  margin-top: 0;
  color: #92400e;
}

/* ── Phase 22b Responsive Overrides ─────────────────────────────────────── */
@media (max-width: 960px) {
  .duel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ext-header-row {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .duel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Multi-Breakpoint Responsive Rules */
@media (max-width: 1024px) {
  .bento-span-7,
  .bento-span-5,
  .bento-span-6 {
    grid-column: span 12;
  }

  .ring-panel {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-pill {
    border-radius: 20px;
    padding: 12px 14px;
  }

  .telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  .ring-row,
  .ring-readout {
    grid-template-columns: 1fr;
  }

  .ring-delta {
    grid-column: span 1;
  }
}

/* Pure-CSS Keyframes */
@keyframes fadeUp {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes mastheadShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* Mandatory Accessibility Reduced-Motion Guard */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .aurora-glow::before {
    animation: none !important;
  }

  .bento-tile:hover,
  .story-card:hover,
  .nav-cta:hover,
  .js-ready .reveal {
    transform: none !important;
  }

  .duel-card,
  .duel-arrow {
    transition: none !important;
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
