/* ==========================================================================
   Queryous — Global Stylesheet
   Zero-build, vanilla CSS3. Single stylesheet for the whole site.
   ========================================================================== */

:root {
  /* Surfaces & Canvas — dark mode default (the "Hook") */
  --bg-primary: #000000;
  --bg-surface: #0D0D0D;
  --bg-surface-elevated: #171717;
  --border-subtle: #262626;
  --border-focus: #3D3D3D;

  /* Text & Readability */
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --text-dark: #111827;

  /* Brand Accent — Neon Cyan, the signature anchor colour */
  --accent-neon: #00E5FF;
  --accent-alert: #E53935;

  /* Functional / Categorical Colours — saturated badge + pale card pairs */
  --cat-orange: #FFB85D;
  --cat-orange-bg: #FFF3E0;
  --cat-purple: #9900FF;
  --cat-purple-bg: #D0BFFF;
  --cat-green: #7EF673;
  --cat-green-bg: #E8F5E9;
  --cat-pink: #F476F4;
  --cat-pink-bg: #FCE4F6;
  --cat-silver: #E9E9E9;
  --cat-lime: #EEFF41;

  /* Font Stacks — Roboto Mono for headings/terminal motifs, Roboto for body */
  --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout Constants */
  --max-width: 1200px;
  --header-height: 72px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 999px;
  --transition-fast: 150ms ease-out;
}

/* Light theme token overrides. Applied via [data-theme="light"] on <html>,
   set by js/main.js (falls back to the OS preference on first visit).
   Per the brand system: dark mode is for hero/impact moments ("the Hook"),
   light mode is for content delivery ("the Breakdown"). */
:root[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-surface: #F8F9FA;
  --bg-surface-elevated: #F1F1F1;
  --border-subtle: #E5E5E5;
  --border-focus: #CCCCCC;

  --text-primary: #000000;
  --text-secondary: #4B5157;
  --text-muted: #6B7076;
  --text-dark: #111827;

  /* Neon cyan is darkened slightly for AA contrast on a white surface */
  --accent-neon: #0097A7;
  --accent-alert: #C62828;
}

/* ==========================================================================
   Section Accent — page-level brand colour-coding
   Every page gets its own accent used across buttons, links, badges, the
   nav "chin", and the footer glow: Home stays Queryous Cyan (the Hook);
   Offerings, Manifesto & Team, and Research & Insights each take a brand
   colour instead. Set via data-section on <body>; defaults to the cyan
   accent already used sitewide, so pages without the attribute (Home) are
   unaffected.
   ========================================================================== */
:root {
  --section-accent: var(--accent-neon);
}
body[data-section="offerings"]  { --section-accent: var(--cat-pink); }
body[data-section="manifesto"]  { --section-accent: var(--cat-orange); }
body[data-section="research"]   { --section-accent: var(--cat-green); }
body[data-section="blackbox"]   { --section-accent: var(--cat-lime); }

:root[data-theme="light"] .btn-primary { color: #FFFFFF; }
:root[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(10, 154, 80, 0.08) 0%, rgba(10, 154, 80, 0) 70%);
}
:root[data-theme="light"] .site-header {
  background: rgba(250, 250, 249, 0.85);
}
:root[data-theme="light"] .scaffold-modal-backdrop {
  background: rgba(17, 24, 39, 0.35);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

body, .site-header, .card, .battle-card, .scaffold-card, .audit-card,
.blog-card, .team-card, .inquiry-form, .field input, .field select,
.field textarea, .capability-item, .scaffold-modal-body {
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

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

/* ==========================================================================
   Layout Primitives
   ========================================================================== */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--border-subtle);
}

.section:first-of-type { border-top: none; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--section-accent);
  margin-bottom: 16px;
}

.section-kicker::before { content: "> "; }

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

/* ==========================================================================
   Terminal / Monospace Accents
   ========================================================================== */

.mono {
  font-family: var(--font-mono);
}

.terminal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--section-accent);
  letter-spacing: 0.02em;
}

.terminal-tag::before { content: ">"; color: var(--section-accent); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-xl);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: var(--section-accent);
  color: #001014;
}

.btn-primary::before { content: ">"; opacity: 0.6; }

.btn-primary:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--section-accent) 82%, white 18%);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.btn-secondary::before { content: ">"; opacity: 0.5; color: var(--section-accent); }

.btn-secondary:hover {
  border-color: var(--section-accent);
  color: var(--section-accent);
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-focus);
  border-radius: 0;
  padding-bottom: 2px;
}

.btn-text:hover { color: var(--section-accent); border-color: var(--section-accent); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  display: block;
  height: 34px;
  width: auto;
}

.logo-img--light { display: none; }
:root[data-theme="light"] .logo-img--dark { display: none; }
:root[data-theme="light"] .logo-img--light { display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text-primary); }

/* Each nav link carries its own destination colour (independent of the
   current page's --section-accent), so hovering "previews" that section's
   colour before you click through. --nav-link-accent falls back to the
   current page's own accent if a link is missing the data attribute. */
.main-nav a { --nav-link-accent: var(--section-accent); }
.main-nav a[data-nav-color="home"]       { --nav-link-accent: var(--accent-neon); }
.main-nav a[data-nav-color="offerings"]  { --nav-link-accent: var(--cat-pink); }
.main-nav a[data-nav-color="manifesto"]  { --nav-link-accent: var(--cat-orange); }
.main-nav a[data-nav-color="research"]   { --nav-link-accent: var(--cat-green); }
.main-nav a[data-nav-color="blackbox"]   { --nav-link-accent: var(--cat-lime); }

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -20px;
  height: 2px;
  background: var(--nav-link-accent);
  box-shadow:
    0 0 8px 0 var(--nav-link-accent),
    0 0 20px 2px color-mix(in srgb, var(--nav-link-accent) 55%, transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  opacity: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.partner-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 5px 14px;
  border-radius: var(--radius-xl);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: transform var(--transition-fast);
}

.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.search-trigger:hover {
  border-color: var(--section-accent);
  color: var(--section-accent);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  justify-content: center;
  padding: 12vh 24px 24px;
}

.search-overlay.open { display: flex; }

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.search-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: fit-content;
  max-height: 72vh;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.search-prompt {
  font-family: var(--font-mono);
  color: var(--section-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-close {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1;
}

.search-close:hover { color: var(--text-primary); border-color: var(--border-focus); }

.search-results {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.search-result:hover,
.search-result.active { background: var(--bg-surface); }

.search-result-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.search-result-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.search-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 10px 2px;
}

.search-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.search-hint kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
}

@media (max-width: 640px) {
  .search-overlay { padding-top: 8vh; }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--section-accent);
  color: var(--section-accent);
}

.theme-toggle svg { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 900px) {
  .partner-badge { display: none; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .main-nav a {
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
  }
  .main-nav a[aria-current="page"]::after { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
}

/* Northern-lights glow — soft aurora curtains in the page's section
   colour, seated on the footer's top border. */
.site-footer::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 0;
  right: 0;
  height: 280px;
  background:
    radial-gradient(ellipse 42% 100% at 18% 0%, color-mix(in srgb, var(--section-accent) 65%, transparent), transparent 72%),
    radial-gradient(ellipse 48% 100% at 52% 12%, color-mix(in srgb, var(--section-accent) 45%, transparent), transparent 72%),
    radial-gradient(ellipse 38% 100% at 85% 0%, color-mix(in srgb, var(--section-accent) 60%, transparent), transparent 72%);
  filter: blur(55px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

:root[data-theme="light"] .site-footer::before { opacity: 0.28; }

.site-footer > .wrap { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 14px;
  max-width: 320px;
  font-size: 0.92rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-col a, .footer-col p {
  display: block;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--section-accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

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

/* ==========================================================================
   Cards (shared component)
   ========================================================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.card:hover {
  border-color: var(--section-accent);
  transform: translateY(-2px);
}

.card--blue:hover { border-color: var(--accent-neon); }

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* ==========================================================================
   Front Page (replaces hero cover)
   ========================================================================== */

.frontpage {
  /* The Hook: pinned to the dark, high-impact treatment regardless of the
     site-wide light/dark toggle — per the brand system, hero/impact moments
     are always Deep Black + Neon Cyan; content sections below can toggle. */
  --bg-primary: #000000;
  --bg-surface: #0D0D0D;
  --bg-surface-elevated: #171717;
  --border-subtle: #262626;
  --border-focus: #3D3D3D;
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --accent-neon: #00E5FF;

  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 56px 0 80px;
  position: relative;
  overflow: hidden;
}

.frontpage::before {
  content: "";
  position: absolute;
  top: -25%;
  right: -10%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.16) 0%, rgba(0, 229, 255, 0) 70%);
  pointer-events: none;
}

.frontpage::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -6%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.07) 0%, rgba(0, 229, 255, 0) 70%);
  pointer-events: none;
}

.fp-wireframe {
  position: absolute;
  top: -6%;
  right: -4%;
  width: 460px;
  height: 460px;
  pointer-events: none;
  z-index: 0;
}

.frontpage-masthead,
.frontpage-hero,
.frontpage-features {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .fp-wireframe { width: 300px; height: 300px; opacity: 0.7; }
}
@media (max-width: 640px) {
  .fp-wireframe { display: none; }
}

/* Masthead */
.frontpage-masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--border-focus);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  margin-bottom: 56px;
}

.fp-date,
.fp-issue {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Hero split */
.frontpage-hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: start;
  margin-bottom: 64px;
}

.fp-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--section-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.fp-headline {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 24px;
}

.fp-standfirst {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 36px;
}

.fp-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Stat block */
.fp-stat-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fp-stat {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.fp-stat:last-child { border-bottom: none; }

.fp-stat-num {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--section-accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.fp-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Feature cards row */
.frontpage-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 40px;
}

.fp-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.fp-feature-card:hover {
  border-color: var(--section-accent);
  transform: translateY(-2px);
}

.fp-fc-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--section-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fp-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.fp-feature-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  flex-grow: 1;
}

.fp-fc-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--section-accent);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .frontpage-hero { grid-template-columns: 1fr; gap: 40px; }
  .frontpage-features { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .frontpage-masthead { flex-direction: column; align-items: flex-start; gap: 6px; }
  .fp-headline { font-size: 2.2rem; }
}

/* ==========================================================================
   Battle Section (Promise vs Pitfall)
   ========================================================================== */

.battle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.battle-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg-surface);
  border-top: 3px solid var(--card-accent, var(--accent-neon));
  box-shadow:
    0 -2px 10px 0 color-mix(in srgb, var(--card-accent, var(--accent-neon)) 85%, transparent),
    0 -14px 36px -10px color-mix(in srgb, var(--card-accent, var(--accent-neon)) 60%, transparent);
}

.battle-card .terminal-tag { color: var(--card-accent, var(--accent-neon)); margin-bottom: 18px; }
.battle-card .terminal-tag::before { color: var(--card-accent, var(--accent-neon)); }

.battle-card--booster { --card-accent: var(--accent-neon); }
.battle-card--atrophy { --card-accent: var(--cat-pink); }

.battle-card h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.battle-list li {
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
}

.battle-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--card-accent, var(--accent-neon));
}

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

/* ==========================================================================
   9-Box Scaffolding Grid
   ========================================================================== */

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

.scaffold-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  /* Extra bottom padding reserves space for the absolutely-positioned
     "Click to inspect ->" hover hint (::after) so it never overlaps the
     description text above it. */
  padding: 22px 22px 46px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  position: relative;
}

.scaffold-card:hover, .scaffold-card:focus-visible {
  border-color: var(--section-accent);
  background: var(--bg-surface-elevated);
}

.scaffold-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--section-accent);
  display: block;
  margin-bottom: 10px;
}

.scaffold-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.scaffold-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

@media (max-width: 1024px) {
  .scaffold-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .scaffold-grid { grid-template-columns: 1fr; }
}

/* Scaffold Modal
   The overlay is a full-viewport BLOCK scroll container — this is the
   most reliable pattern across all browsers. The backdrop sits behind it
   via a separate fixed element; the body is centred with margin: auto
   and floats naturally down when content is too tall for the viewport. */
.scaffold-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.scaffold-modal.open { display: block; }

.scaffold-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(4px);
  z-index: 0;
}

.scaffold-modal-body {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: calc(100% - 48px);
  /* centres horizontally; ~8vh top gap tries to keep it near viewport
     centre for short content but scrolls naturally for tall content */
  margin: 8vh auto 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.scaffold-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
}

.scaffold-modal-close:hover { color: var(--text-primary); border-color: var(--border-focus); }

.scaffold-modal-body .terminal-tag { margin-bottom: 14px; }

.scaffold-modal-body h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.scaffold-modal-body p {
  color: var(--text-secondary);
}

.scaffold-modal-example {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.scaffold-modal-example-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--section-accent);
  margin-bottom: 8px;
}

.scaffold-modal-example-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary) !important;
}

/* ==========================================================================
   Alpine Journey Roadmap
   ========================================================================== */

.alpine-map {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border-subtle);
}

.alpine-stage {
  position: relative;
  padding: 0 0 48px 32px;
}

.alpine-stage:last-child { padding-bottom: 0; }

.alpine-stage::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--stage-accent, var(--cat-orange));
}

.alpine-stage--1 { --stage-accent: var(--cat-orange); }
.alpine-stage--2 { --stage-accent: var(--cat-purple); }
.alpine-stage--3 { --stage-accent: var(--cat-green); }

.alpine-elevation {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--stage-accent, var(--cat-orange));
  margin-bottom: 8px;
  display: block;
}

.alpine-stage h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.alpine-stage p {
  color: var(--text-secondary);
  max-width: 620px;
}

.alpine-here {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-alert);
}

.alpine-here::before { content: "\25B2"; }

/* ==========================================================================
   Health Check Audit
   ========================================================================== */

.audit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.audit-card {
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.audit-card .terminal-tag { color: var(--cat-orange); margin-bottom: 16px; }
.audit-card .terminal-tag::before { color: var(--cat-orange); }

.audit-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.audit-card p { color: var(--text-secondary); font-size: 0.94rem; }

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

/* ==========================================================================
   Interior Page Header (offerings.html, blog.html — lighter than .frontpage)
   ========================================================================== */

.page-header {
  padding: 64px 0 8px;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 18px 0 20px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
}

/* ==========================================================================
   Offerings Carousel (offerings.html)
   ========================================================================== */

.carousel {
  position: relative;
}

.carousel-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.carousel-dot {
  background: none;
  border: none;
  padding: 14px 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-bottom: 2px solid transparent;
  margin-right: 28px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.carousel-dot:hover { color: var(--text-secondary); }

.carousel-dot.active {
  color: var(--section-accent);
  border-color: var(--section-accent);
  box-shadow: 0 2px 10px -1px var(--section-accent);
}

.carousel-track { position: relative; }

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
  animation: slide-in 220ms ease-out;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.slide-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 10px;
}

.slide-narrative {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 40px;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.capability-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--bg-surface);
}

.capability-item h4 {
  font-size: 0.98rem;
  margin-bottom: 8px;
  color: var(--section-accent);
}

.capability-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .capability-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .carousel-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .carousel-dot { margin-right: 20px; white-space: nowrap; }
}

/* ==========================================================================
   Card Slider (index.html — "Evidence")
   A horizontally-scrolling row of compact cards (image banner, title,
   subtitle, body, link), navigated with arrow buttons or native touch
   swipe. Built on CSS scroll-snap rather than a transform/JS slider, so
   it degrades to plain touch scrolling with no JS and needs no library.
   ========================================================================== */

.card-slider-wrap {
  position: relative;
}

.card-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-slider::-webkit-scrollbar { display: none; }

.slider-card {
  flex: 0 0 auto;
  width: 320px;
  scroll-snap-align: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.slider-card:hover {
  border-color: var(--card-accent, var(--accent-neon));
  transform: translateY(-2px);
}

.slider-card:nth-child(1) { --card-accent: var(--accent-neon); }
.slider-card:nth-child(2) { --card-accent: var(--cat-purple); }
.slider-card:nth-child(3) { --card-accent: var(--cat-orange); }
.slider-card:nth-child(4) { --card-accent: var(--cat-green); }

.slider-card-banner {
  position: relative;
  height: 150px;
  background: var(--bg-surface-elevated);
  overflow: hidden;
  flex-shrink: 0;
}

.slider-card-banner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.slider-card-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, var(--bg-surface) 100%);
}

.slider-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.slider-card-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--card-accent, var(--accent-neon));
  letter-spacing: 0.02em;
}

.slider-card-title {
  font-size: 1.05rem;
  line-height: 1.3;
}

.slider-card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.slider-card-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
  flex-grow: 1;
}

.slider-card-link {
  margin-top: 4px;
  align-self: flex-start;
}

.card-slider-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.card-slider-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}

.card-slider-arrow:hover {
  border-color: var(--section-accent);
  color: var(--section-accent);
}

.card-slider-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .slider-card { width: 78vw; }
}

/* ==========================================================================
   Inquiry Forms
   ========================================================================== */

.forms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.inquiry-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.inquiry-form h3 { font-size: 1.05rem; margin-bottom: 4px; }
.inquiry-form .form-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: block;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--section-accent);
  outline: none;
}

.field textarea { resize: vertical; min-height: 84px; }

.inquiry-form .btn { width: 100%; justify-content: center; margin-top: 4px; }

.form-feedback {
  text-align: left;
  padding: 8px 0;
}

.form-feedback .terminal-tag { margin-bottom: 14px; }
.form-feedback h3 { font-size: 1.1rem; margin-bottom: 10px; }
.form-feedback p { color: var(--text-secondary); font-size: 0.92rem; }

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

/* ==========================================================================
   About / Manifesto
   ========================================================================== */

.manifesto-block {
  max-width: 720px;
}

.manifesto-block h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 18px 0 28px;
}

.manifesto-block > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.theory-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.theory-item {
  border-left: 2px solid var(--cat-orange);
  padding-left: 20px;
}

.theory-item h4 {
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.theory-item p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.team-card:hover { border-color: var(--section-accent); }

.team-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--bg-surface-elevated);
  object-fit: cover;
  display: block;
}

.team-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo--placeholder span {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--border-focus);
  letter-spacing: 0.04em;
}

.team-body { padding: 22px; }

.team-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--section-accent);
  display: block;
  margin-bottom: 6px;
}

.team-body h3 { font-size: 1.1rem; margin-bottom: 12px; }

.team-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.team-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.team-interests span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 999px;
}

.team-contact {
  font-size: 0.85rem;
  color: var(--section-accent);
}

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

/* ==========================================================================
   Hover Gallery (about.html — "The Practice")
   Four equal panels that expand on hover/focus. Each panel keeps its own
   fixed category colour (cyan/purple/orange/green) rather than following
   --section-accent, since the point here is a rainbow of four distinct
   moments, not a single page accent.
   ========================================================================== */

.hover-gallery {
  display: flex;
  gap: 8px;
  height: 480px;
  margin-top: 8px;
}

.hover-item {
  position: relative;
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: flex 450ms cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-fast);
}

.hover-item:hover,
.hover-item:focus-visible {
  flex: 3;
  border-color: var(--item-accent, var(--accent-neon));
}

.hover-item:nth-child(1) { --item-accent: var(--accent-neon); }
.hover-item:nth-child(2) { --item-accent: var(--cat-purple); }
.hover-item:nth-child(3) { --item-accent: var(--cat-orange); }
.hover-item:nth-child(4) { --item-accent: var(--cat-green); }

.hover-item svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  transition: opacity 450ms ease;
}

.hover-item:hover svg,
.hover-item:focus-visible svg { opacity: 0.9; }

.hover-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.hover-index {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--item-accent, var(--accent-neon));
  z-index: 2;
}

.hover-content {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  white-space: nowrap;
  transition: opacity 350ms ease, transform 350ms ease;
}

.hover-item:hover .hover-content,
.hover-item:focus-visible .hover-content {
  opacity: 1;
  transform: translateY(0);
  white-space: normal;
}

.hover-content h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.hover-content p {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 320px;
}

.hover-label {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: opacity 200ms ease;
}

.hover-item:hover .hover-label,
.hover-item:focus-visible .hover-label { opacity: 0; }

@media (max-width: 900px) {
  .hover-gallery { height: 400px; }
}

@media (max-width: 768px) {
  .hover-gallery { flex-direction: column; height: 640px; }
  .hover-item { flex: 1; }
  .hover-item:hover, .hover-item:focus-visible { flex: 3; }
  .hover-content { opacity: 1; transform: none; white-space: normal; }
  .hover-label { display: none; }
  .hover-content p { display: none; }
  .hover-item:hover .hover-content p,
  .hover-item:focus-visible .hover-content p { display: block; }
}

/* ==========================================================================
   Blog Index & Posts
   ========================================================================== */

.blog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.filter-btn:hover { color: var(--text-primary); }

.filter-btn.active {
  border-color: var(--section-accent);
  color: var(--section-accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.blog-card:hover { border-color: var(--section-accent); transform: translateY(-2px); }

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-badge {
  font-family: var(--font-mono);
  color: var(--section-accent);
}

.blog-card h3 { font-size: 1.1rem; }

.blog-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-grow: 1;
}

.blog-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.blog-footer-row .btn-text { font-size: 0.85rem; }

.linkedin-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--section-accent);
  border-bottom: 1px solid transparent;
}

.linkedin-btn:hover { border-color: var(--section-accent); }

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

/* Blog Post Detail */
.post-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.post-header .blog-meta { margin-bottom: 20px; }

.post-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 16px;
}

.post-body {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.post-section p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.post-subpoints {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-subpoints li {
  padding-left: 18px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.post-subpoints li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--section-accent);
}

.post-citation {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-citation strong { color: var(--text-secondary); }

.post-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--section-accent);
  color: #04170C;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 24px;
  top: 12px;
}

/* ==========================================================================
   Case Study Pages
   ========================================================================== */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pull-quote {
  margin: 48px 0 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--section-accent);
  max-width: 760px;
}

.pull-quote p {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.cta-banner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.cta-banner .section-kicker { display: block; }

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 14px;
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cta-banner { padding: 40px 24px; }
  .pull-quote { padding-left: 18px; }
  .pull-quote p { font-size: 1.08rem; }
}



/* =====================================================
   INTERACTIVE ENHANCEMENTS
   ===================================================== */

/* --- Custom Cursor --- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--accent-neon);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s, opacity 0.2s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent-neon);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1), height 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s, border-color 0.3s;
  opacity: 0.55;
}
body.cursor-hover .cursor-dot { width: 16px; height: 16px; opacity: 0.7; }
body.cursor-hover .cursor-ring { width: 56px; height: 56px; opacity: 0.35; }
body.cursor-clicking .cursor-dot { width: 6px; height: 6px; }
body.cursor-clicking .cursor-ring { width: 28px; height: 28px; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } }

/* --- Reading Progress Bar --- */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-neon), var(--cat-purple), var(--cat-pink));
  z-index: 9997;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--accent-neon);
}

/* --- Scroll Reveal base states --- */
.sr { opacity: 0; will-change: transform, opacity; }
.sr.sr-fade { transform: translateY(30px); }
.sr.sr-left { transform: translateX(-40px); }
.sr.sr-right { transform: translateX(40px); }
.sr.sr-scale { transform: scale(0.92); }
.sr.sr-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

/* --- Parallax container --- */
.parallax-section {
  position: relative;
  overflow: hidden;
}
.parallax-bg {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.parallax-section > * { position: relative; z-index: 1; }

/* --- Particle canvas overlay in hero --- */
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.frontpage { overflow: hidden; position: relative; }

/* --- Glitch text effect --- */
@keyframes glitch-1 {
  0%,100% { clip-path: inset(0 0 98% 0); transform: translate(-2px,0); }
  20% { clip-path: inset(15% 0 70% 0); transform: translate(2px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px,0); }
  60% { clip-path: inset(70% 0 15% 0); transform: translate(1px,0); }
  80% { clip-path: inset(90% 0 0 0); transform: translate(-2px,0); }
}
@keyframes glitch-2 {
  0%,100% { clip-path: inset(0 0 98% 0); transform: translate(2px,0); color: var(--cat-pink); }
  25% { clip-path: inset(25% 0 50% 0); transform: translate(-2px,0); }
  50% { clip-path: inset(50% 0 25% 0); transform: translate(2px,0); }
  75% { clip-path: inset(75% 0 0 0); transform: translate(-2px,0); }
}
.glitch-text {
  position: relative;
  display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.glitch-text:hover::before {
  opacity: 0.8;
  animation: glitch-1 0.4s steps(1) forwards;
  color: var(--accent-neon);
}
.glitch-text:hover::after {
  opacity: 0.6;
  animation: glitch-2 0.4s steps(1) 0.05s forwards;
  color: var(--cat-pink);
}

/* --- Typewriter cursor --- */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent-neon);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink-cursor 0.8s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Tilt card 3D wrapper --- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.tilt-card:hover {
  box-shadow: 0 20px 60px -10px rgba(0,229,255,0.2);
}

/* --- Magnetic button wrapper --- */
.magnetic-wrap {
  display: inline-flex;
  position: relative;
}

/* --- Animated section kicker (terminal) --- */
@keyframes terminal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.section-kicker::after {
  content: "_";
  animation: terminal-blink 1s step-end infinite;
  color: var(--section-accent);
}

/* --- Stat counter animation wrapper --- */
.fp-stat-num[data-count] {
  transition: color 0.3s;
}

/* --- Enhanced card slider dots --- */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.slider-dot-btn {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--border-focus);
  transition: background 0.3s, width 0.3s, border-radius 0.3s;
  cursor: pointer;
}
.slider-dot-btn.active {
  background: var(--section-accent);
  width: 20px;
  border-radius: 3px;
}

/* --- Floating label for scaffold cards on hover --- */
.scaffold-card::after {
  content: "Click to inspect →";
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--section-accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.scaffold-card:hover::after { opacity: 0.7; }

/* --- Noise grain overlay on hero --- */
.frontpage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

/* --- Alpine roadmap timeline pulse --- */
.alpine-stage--2 .alpine-stage::before,
.alpine-map .alpine-stage--2::before {
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(153,0,255,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(153,0,255,0); }
}

/* --- Scroll-linked background gradient shift --- */
.section[data-scroll-bg] {
  transition: background-color 0.6s ease;
}

/* --- Animated wireframe in hero --- */
.fp-wireframe circle {
  animation: wire-pulse 3s ease-in-out infinite;
}
.fp-wireframe circle:nth-child(1) { animation-delay: 0s; }
.fp-wireframe circle:nth-child(2) { animation-delay: 0.5s; }
.fp-wireframe circle:nth-child(3) { animation-delay: 1s; }
.fp-wireframe circle:nth-child(4) { animation-delay: 1.5s; }
.fp-wireframe circle:nth-child(5) { animation-delay: 2s; }
@keyframes wire-pulse {
  0%, 100% { r: 3; opacity: 0.8; }
  50% { r: 5; opacity: 1; }
}
.fp-wireframe line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: wire-draw 3s ease forwards;
}
.fp-wireframe line:nth-child(1) { animation-delay: 0.2s; }
.fp-wireframe line:nth-child(2) { animation-delay: 0.5s; }
.fp-wireframe line:nth-child(3) { animation-delay: 0.8s; }
.fp-wireframe line:nth-child(4) { animation-delay: 1.1s; }
.fp-wireframe line:nth-child(5) { animation-delay: 1.4s; }
@keyframes wire-draw {
  to { stroke-dashoffset: 0; }
}

/* --- Hero stat count-up glow on enter --- */
.fp-stat.in-view .fp-stat-num {
  animation: glow-pulse 1s ease-out;
}
@keyframes glow-pulse {
  0% { text-shadow: 0 0 0 var(--accent-neon); }
  50% { text-shadow: 0 0 24px var(--accent-neon), 0 0 48px var(--accent-neon); }
  100% { text-shadow: none; }
}

/* --- Hover gallery enhanced glow --- */
.hover-item:hover {
  box-shadow: 0 0 30px -5px var(--item-accent, var(--accent-neon));
}

/* --- Battle card scan-line animation --- */
.battle-card {
  position: relative;
  overflow: hidden;
}
.battle-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.03) 50%, transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}
@keyframes scanline {
  0% { top: -60%; }
  100% { top: 100%; }
}

/* --- Scroll-pinned sidebar line on roadmap --- */
.alpine-map::before {
  content: "";
  position: absolute;
  left: -2px; top: 0;
  width: 2px;
  height: 0%;
  background: linear-gradient(180deg, var(--cat-orange), var(--cat-purple), var(--cat-green));
  transition: height 0.1s linear;
  box-shadow: 0 0 12px var(--cat-purple);
}

/* --- Page load fade-in ---
   Applied to <main> NOT <body>: any transform (including translateY(0)/none)
   left on <body> by animation fill-mode breaks position:fixed for all overlays.
   Animating <main> keeps the slide-up effect; the modal sits after </main>
   as a direct child of <body>, so it is completely unaffected. */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: page-enter 0.5s cubic-bezier(0.16,1,0.3,1) both; }

/* --- Floating badge on hero --- */
@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.fp-stat-block { animation: float-badge 4s ease-in-out infinite; }

/* --- Link underline reveal animation --- */
.main-nav a::after {
  transition: opacity var(--transition-fast), width 0.3s ease !important;
}

/* --- Enhanced gradient orb glow in hero --- */
.frontpage::before {
  animation: orb-drift 8s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, 5%) scale(1.08); }
}

/* --- Blog card reveal image placeholder animation --- */
.slider-card-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-accent, var(--accent-neon)) 0%, transparent 70%);
  opacity: 0.12;
  z-index: 1;
  transition: opacity 0.3s;
}
.slider-card:hover .slider-card-banner::before { opacity: 0.22; }

/* --- Text scramble base --- */
.scramble-text { display: inline; }

/* --- Interactive scroll indicator ---
   Anchored inside .frontpage's 80px bottom padding (the indicator is ~64px
   tall): a larger bottom offset makes it ride up on top of the feature
   cards, so keep it fully within the padding zone. */
.scroll-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent-neon), transparent);
  animation: scroll-drop 1.5s ease-in-out infinite;
}
@keyframes scroll-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Tooltip on hover for scaffold index numbers --- */
.scaffold-index {
  cursor: help;
}

/* --- Neon text for active nav item --- */
.main-nav a[aria-current="page"] {
  color: var(--nav-link-accent);
}

/* --- Enhanced footer glow animation --- */
.site-footer::before {
  animation: aurora-shift 6s ease-in-out infinite alternate;
}
@keyframes aurora-shift {
  0% { opacity: 0.45; filter: blur(55px) hue-rotate(0deg); }
  100% { opacity: 0.65; filter: blur(45px) hue-rotate(20deg); }
}

/* --- Hover gallery shimmer on expand --- */
.hover-item::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}
.hover-item:hover::after { left: 150%; }



/* =====================================================
   SEARCH RESULT ENHANCEMENTS (category pill + featured)
   ===================================================== */
.search-result { position: relative; }
.search-result-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-neon);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 1px 8px;
  margin-bottom: 6px;
}
.search-featured-heading {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 12px 8px;
}

/* =====================================================
   HERO SLIDESHOW
   ===================================================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  margin-bottom: 64px;
  /* Grid: slides on top, then a nav row of [prev] dots [next] below.
     The arrows used to be pinned to the vertical centre of the slider,
     which put them directly on top of the slide text; keeping them in
     the nav row guarantees they can never overlap slide content at any
     viewport width. */
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "slides slides slides"
    "prev   dots   next";
  align-items: center;
  column-gap: 16px;
  row-gap: 28px;
  /* Keeps the autoplay progress bar clear of the nav row above it */
  padding-bottom: 14px;
}
.hero-slides {
  grid-area: slides;
  display: flex;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 4px 0 8px;
}
.hero-slide-accent { --slide-accent: var(--accent-neon); }
.hero-slide .fp-category { color: var(--slide-accent, var(--accent-neon)); }
.hero-slide .fp-fc-tag { color: var(--slide-accent, var(--accent-neon)); }
.hero-slide .btn-primary { background: var(--slide-accent, var(--accent-neon)); color: #001014; }
.hero-slide .btn-primary:hover { background: color-mix(in srgb, var(--slide-accent, var(--accent-neon)) 82%, white 18%); }
.hero-slide .btn-secondary:hover { border-color: var(--slide-accent, var(--accent-neon)); color: var(--slide-accent, var(--accent-neon)); }
.hero-slide .fp-stat-num { color: var(--slide-accent, var(--accent-neon)); }
.hero-slide .fp-fc-link { color: var(--slide-accent, var(--accent-neon)); }
/* Slide nav dots */
.hero-slider-nav {
  grid-area: dots;
  justify-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.hero-slide-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--border-focus);
  cursor: pointer;
  transition: background 0.3s, width 0.3s, border-radius 0.3s;
}
.hero-slide-dot.active {
  background: var(--accent-neon);
  width: 24px;
  border-radius: 3px;
}
/* Slide arrows - live in the nav row below the slides (grid areas set on
   the --prev / --next modifiers) so they never sit on top of slide text. */
.hero-slide-arrow {
  background: rgba(13,13,13,0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  backdrop-filter: blur(6px);
}
.hero-slide-arrow:hover { border-color: var(--accent-neon); color: var(--accent-neon); background: rgba(0,229,255,0.08); }
.hero-slide-arrow--prev { grid-area: prev; }
.hero-slide-arrow--next { grid-area: next; }
/* Aside mini cards */
.slide-aside-mini {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.slide-aside-mini-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 4px;
}
.slide-aside-mini-item:last-child { border-bottom: none; }
.slide-aside-mini-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.slide-aside-mini-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* Black box aside teaser */
.bb-teaser {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.bb-teaser-box {
  width: 100px; height: 70px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 24px rgba(238,255,65,0.3), inset 0 0 20px rgba(0,0,0,0.8);
  animation: bb-glow 2s ease-in-out infinite;
}
@keyframes bb-glow {
  0%,100% { box-shadow: 0 0 16px rgba(238,255,65,0.2), inset 0 0 20px rgba(0,0,0,0.8); }
  50% { box-shadow: 0 0 36px rgba(238,255,65,0.5), inset 0 0 20px rgba(0,0,0,0.8); }
}
.bb-teaser-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cat-lime);
  letter-spacing: 0.1em;
}
/* Progress bar on hero slide */
.hero-slide-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--accent-neon);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-neon);
}
@media (max-width: 1024px) {
  .hero-slide { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  /* Arrows now sit in the nav row below the slides, so they stay visible
     and usable on small screens - no overlap to hide them for. */
  .hero-slider { column-gap: 10px; }
  .hero-slide { gap: 24px; }
}

/* =====================================================
   BLACK BOX DEMO PAGE
   ===================================================== */
.bb-demo {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 32px;
}
.bb-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bb-col-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bb-input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px;
}
.bb-input:focus { outline: none; border-color: var(--accent-neon); }
.bb-submit {
  align-self: flex-start;
  background: var(--accent-neon);
  color: #001014;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.bb-submit:hover { background: color-mix(in srgb, var(--accent-neon) 82%, white 18%); }
.bb-submit:active { transform: scale(0.97); }
.bb-box {
  position: relative;
  background: #060606;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.9);
}
.bb-canvas { display: block; width: 100%; height: 100%; }
.bb-processing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-neon);
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.bb-processing.active { opacity: 1; animation: bb-flicker 1s linear infinite; }
@keyframes bb-flicker {
  0%,100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.bb-output {
  min-height: 120px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.bb-output.empty { color: var(--text-muted); font-style: italic; }
.bb-cant-see {
  margin-top: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cat-orange);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.bb-cant-see.reveal { opacity: 1; transform: none; }
.bb-cant-see h4 {
  font-family: var(--font-mono);
  color: var(--cat-orange);
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.bb-cant-see ul { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.bb-cant-see li { margin-bottom: 6px; font-size: 0.88rem; }
@media (max-width: 900px) {
  .bb-demo { grid-template-columns: 1fr; }
}
