/* HeroHud · classic theme stylesheet */

/* ============================================================
   SUNSET TOKENS — tri-theme (sunset default · dark/night · light/dawn).
   Canonical palette mirrors the app's Sunset skin (skins/sunset.py):
   plum surfaces, cream text, coral accent, amber highlights, green
   gains, sky links, rose secondary. The page reads as a warm dusk.
   ============================================================ */
:root, html[data-theme="sunset"] {
  color-scheme: dark;

  /* page surfaces */
  --paper:    #221a24;   /* base window — warm deep plum */
  --paper-2:  #2b212e;   /* alternating section / raised surface */
  --surface:  #2b212e;   /* panels, cards, inputs */
  --surface-2:#372a3b;   /* headers, chips, hovers base */
  --hover:    #3f3043;   /* hover plum */

  /* text */
  --ink:       #f2e9e4;  /* cream */
  --ink-soft:  #e3d4dc;
  --muted:     rgba(242,233,228,0.60);
  --text-soft: #bfa9bb;  /* mauve grey */

  /* lines */
  --bd:        #473649;  /* soft warm border */
  --outline:   #19121b;  /* near-black warm */
  --select:    #523047;

  /* accents — coral/green/rose flow from the Customizer (dynamic CSS);
     the fixed identity colors (amber/sky/rose/green) never change so the
     theme always reads as "sunset" even if --accent is recolored. */
  --accent:   #ff7e67;   /* coral (primary) — overridable */
  --accent-2: #7ec488;   /* green (gains/ok) — overridable */
  --hot:      #e85d8a;   /* rose (secondary) — overridable */
  --amber:    #ffb347;   /* fixed: titles / section numbers / highlights */
  --rose:     #e85d8a;   /* fixed */
  --green:    #7ec488;   /* fixed: profit / checks */
  --sky:      #6fc3df;   /* fixed: links / info / sync */
  --gold:     #ffb347;   /* legacy alias → amber */
  --blue:     #6fc3df;   /* legacy alias → sky */

  /* surfaces that ALWAYS read dark (primary buttons, footer, CTA, replayer
     table, mock chrome). Deep plum across all three themes. */
  --surface-dark:    #1d161f;
  --surface-dark-2:  #160f18;
  --surface-dark-fg: #f2e9e4;

  /* pushable-button 3D bases (tone-on-tone, darker than the face) */
  --btn-base:    #160f18;
  --accent-base: #c14a36;  /* under a coral button */
  --hot-base:    #b23f68;

  /* shape + depth — out: hard offset ink shadows; in: soft plum-tinted */
  --radius:    10px;
  --radius-sm: 6px;
  --border:       1px solid var(--bd);
  --border-thick: 1.5px solid var(--bd);
  --shadow-sm: 0 6px 16px -8px rgba(13,8,15,0.50);
  --shadow:    0 16px 36px -14px rgba(13,8,15,0.55);
  --shadow-lg: 0 30px 64px -22px rgba(13,8,15,0.62);
  --glow:      0 0 40px rgba(255,126,103,0.07);   /* warm ambient light */

  --grain-opacity: 0.5;
  --transition-theme: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;

  /* dusk scroll progress (0 = golden hero → 1 = night footer); set by JS */
  --scroll-dusk: 0;
}

/* NIGHT — sky has fully closed; sober, accents a touch desaturated. */
/* DAWN — warm cream daylight; ink turns deep plum. The "always dark"
   surfaces stay plum so buttons/footer/mocks keep their identity. */
html[data-theme="light"] {
  color-scheme: light;
  --paper:    #faf3ea;
  --paper-2:  #f3e8da;
  --surface:  #fffaf3;
  --surface-2:#f3e8da;
  --hover:    #f0e2d2;
  --ink:       #2b212e;
  --ink-soft:  #4a3a4d;
  --muted:     rgba(43,33,46,0.62);
  --text-soft: #6a5566;
  --bd:        #e3d3c3;
  --outline:   #d9c7b6;
  --select:    #ffd9c9;
  --surface-dark:    #2b212e;
  --surface-dark-2:  #221a24;
  --surface-dark-fg: #f2e9e4;
  --shadow-sm: 0 6px 16px -8px rgba(120,90,70,0.26);
  --shadow:    0 16px 36px -14px rgba(120,90,70,0.30);
  --shadow-lg: 0 30px 64px -22px rgba(120,90,70,0.34);
  --grain-opacity: 0.4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', sans-serif;
  font-weight: 500;
  overflow-x: hidden;
  scroll-behavior: smooth;
  transition: var(--transition-theme);
}

/* "Scroll = anochecer": a fixed dusk wash behind everything that deepens
   from golden hour (top) to closed night (bottom) as --scroll-dusk → 1.
   Two stacked gradients cross-fade so the whole page feels like one sunset.
   (--scroll-dusk is driven by herohud.js; 0 at the hero, 1 at the footer.) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(61,34,16,0.55), rgba(34,26,36,0) 60%);
  opacity: calc(1 - var(--scroll-dusk, 0));
  transition: opacity 0.2s linear;
}
html[data-theme="light"] body::after { opacity: 0; }

/* warm ambient grain — barely-there cream speckle, not paper noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(242,233,228,0.035) 1px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(255,179,71,0.030) 1px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(242,233,228,0.022) 1px, transparent 2px);
  background-size: 7px 7px, 11px 11px, 5px 5px;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity, 1);
}
html[data-theme="light"] body::before {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(70,54,73,0.05) 1px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(70,54,73,0.04) 1px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(70,54,73,0.03) 1px, transparent 2px);
}

/* halftone overlay */
.halftone {
  background-image: radial-gradient(circle, var(--ink) 1.2px, transparent 1.6px);
  background-size: 6px 6px;
}

/* TYPOGRAPHY ============================ */
h1, h2, h3, h4, .display {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 0.96;
  text-transform: uppercase;
}

h1 { font-size: clamp(56px, 11vw, 168px); }
h2 { font-size: clamp(40px, 7vw, 92px); }
h3 { font-size: clamp(28px, 3.2vw, 48px); }

.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* SHARED COMPONENTS ============================ */
.box {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

/* Pushable buttons — flat at rest, lift on hover with a tone-on-tone 3D base
   underneath (box-shadow keeps the base crisp around the radius), sink on
   press. Mirrors the app's Sunset pushable QPushButton. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 0 var(--btn-3d, var(--btn-base)), var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 0 var(--btn-3d, var(--btn-base)), var(--shadow);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 0 var(--btn-3d, var(--btn-base)), var(--shadow-sm);
}
.btn--accent { background: var(--accent); color: #2a1620; border-color: transparent; --btn-3d: var(--accent-base); }
.btn--hot    { background: var(--hot);    color: #2a1620; border-color: transparent; --btn-3d: var(--hot-base); }

.tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 1px solid var(--bd);
  border-radius: 999px;
}
.tag--accent { background: var(--accent); color: #2a1620; border-color: transparent; }
.tag--paper  { background: var(--surface); color: var(--ink); }

/* SCREEN/SECTION SHELL ============================ */
section {
  position: relative;
  z-index: 2;
  padding: 120px 6vw;
  border-bottom: 1px solid var(--bd);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* accent-word highlight — a soft warm brush behind the word, not a hard bar */
.scribble {
  display: inline-block;
  position: relative;
}
.scribble::after {
  content: "";
  position: absolute;
  left: -3%;
  bottom: 2%;
  width: 106%;
  height: 16%;
  background: var(--accent);
  border-radius: 3px;
  z-index: -1;
  transform: skew(-3deg, -1deg);
  opacity: 0.85;
}

/* sticky nav */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(43,33,46,0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--bd);
  border-radius: 999px;
  box-shadow: var(--shadow), var(--glow);
  padding: 9px 16px;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
html[data-theme="light"] .nav { background: rgba(255,250,243,0.84); }
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--bd);
  white-space: nowrap;
}
.nav__logo > span { padding-left: 2px; }
.nav__logo-mark {
  width: 26px; height: 26px;
  background: var(--accent);
  border: 1px solid rgba(25,18,27,0.25);
  border-radius: 7px;
  display: grid; place-items: center;
  color: #2a1620;
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  transform: rotate(-3deg);
  box-shadow: var(--glow);
}
.nav a { color: var(--ink); text-decoration: none; padding: 4px 10px; border-radius: 999px; transition: color 0.15s ease, background-color 0.15s ease; }
.nav a:hover { background: var(--hover); color: var(--accent); }
/* WP-generated menus (wp_nav_menu) assigned to a nav location: render the
   list horizontally so it matches the default fallback anchors. */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu li { margin: 0; padding: 0; }
.nav__menu .current-menu-item > a,
.nav__menu .current_page_item > a { background: var(--hover); color: var(--accent); }
.nav__sep {
  width: 1px; height: 22px;
  background: var(--bd);
  opacity: 0.9;
  margin: 0 2px;
}
.nav__toggle {
  background: transparent;
  border: 1px solid var(--bd);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  height: 28px;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav__toggle:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }
.nav__lang { padding: 0; overflow: hidden; }
.nav__lang span {
  padding: 4px 9px;
  display: inline-block;
  border-right: 1px solid var(--bd);
  opacity: 0.55;
}
.nav__lang span:last-child { border-right: none; }
.nav__lang span.on {
  background: var(--accent);
  color: #2a1620;
  opacity: 1;
}
.nav__theme {
  width: 30px;
  justify-content: center;
}
.nav__cta {
  background: var(--accent) !important;
  color: #2a1620 !important;
  padding: 7px 14px !important;
  border: 1px solid transparent;
  border-radius: 999px;
  margin-left: 2px;
  box-shadow: 0 2px 0 0 var(--accent-base);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--accent-base), var(--glow); }
.nav__cta:active { transform: translateY(1px); box-shadow: 0 1px 0 0 var(--accent-base); }

/* HERO ============================ */
.hero {
  min-height: 100vh;
  padding-top: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* GOLDEN HOUR — a warm amber→coral→plum sky behind the hero. The page
     deepens toward night as you scroll (see body::after / --scroll-dusk). */
  background:
    radial-gradient(120% 90% at 75% 8%, rgba(255,179,71,0.22), transparent 46%),
    radial-gradient(90% 80% at 18% 0%, rgba(255,126,103,0.20), transparent 50%),
    linear-gradient(180deg, #3a2418 0%, #2c1f2b 42%, var(--paper) 100%);
}
html[data-theme="light"] .hero {
  background:
    radial-gradient(120% 90% at 75% 8%, rgba(255,179,71,0.45), transparent 48%),
    radial-gradient(90% 80% at 18% 0%, rgba(255,126,103,0.34), transparent 52%),
    linear-gradient(180deg, #ffe9cf 0%, #fbe2d6 44%, var(--paper) 100%);
}
/* warm orbital glow that sits behind the headline */
.hero__title::before {
  content: "";
  position: absolute;
  left: -8%;
  top: -22%;
  width: 70%;
  height: 150%;
  background: radial-gradient(closest-side, rgba(255,126,103,0.28), transparent 70%);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.hero__title {
  position: relative;
}
.hero__title .word {
  display: block;
}
.hero__title .word--accent {
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-stroke: 0;
  text-shadow: 0 0 28px rgba(255,126,103,0.45), 0 2px 0 rgba(25,18,27,0.25);
}
.hero__sub {
  margin-top: 28px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 600;
  max-width: 540px;
}
.hero__cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__meta {
  margin-top: 36px;
  display: flex;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.hero__meta span::before {
  content: "▸ ";
  color: var(--accent);
}

.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
}

/* FLOATING DOODLES around hero */
.doodle {
  position: absolute;
  pointer-events: none;
}

/* SECTION HEADER ============================ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.section-head__left { max-width: 900px; }
.section-head__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.section-head__num::before { content: "// "; color: var(--accent); }

/* HUD SECTION ============================ */
.hud-section {
  background: var(--paper-2);
}
.hud-window {
  background: var(--surface-dark);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--glow);
  padding: 0;
  position: relative;
  overflow: hidden;
  transform: rotate(-1deg);
}
.hud-window__bar {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
}
.hud-window__bar .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--hot);
  border: 1.5px solid var(--paper);
}
.hud-window__bar .dot.y { background: var(--gold); }
.hud-window__bar .dot.g { background: var(--accent-2); }
.hud-window__title { margin-left: 8px; opacity: 0.85; }

.hud-table {
  position: relative;
  aspect-ratio: 50 / 27;
  background: radial-gradient(ellipse at center, #281d2c 0%, #190f1c 72%, #120b14 100%);
  overflow: hidden;
}

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.feature {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px 28px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--glow);
  border-color: var(--accent);
}
.feature__num {
  position: absolute;
  top: -18px; left: 24px;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  background: var(--amber);
  border-radius: 999px;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 800;
  color: #2a1606;
  box-shadow: var(--shadow-sm);
}
.feature h3 { margin-bottom: 12px; }
.feature p { font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--ink-soft); }
.feature__icon {
  margin-bottom: 14px;
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-dark);
  color: var(--accent);
}

/* REPLAYER SECTION ============================ */
.replayer-section { background: var(--paper); }
.replayer-stage {
  position: relative;
  padding: 28px;
  background: var(--surface-dark);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  max-width: 980px;
  margin: 0 auto;
}
.replayer-stage > div:first-child { max-width: 760px; margin: 0 auto; }

.replayer-controls {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.replayer-controls__step {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.15);
  position: relative;
  border: 2px solid var(--surface-dark-fg);
  max-width: 600px;
}
.replayer-controls__fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  width: var(--p, 0%);
  transition: width 0.4s ease;
}
.replayer-controls__btn {
  width: 44px; height: 44px;
  background: var(--surface-dark-fg);
  border: 3px solid var(--surface-dark-fg);
  color: var(--surface-dark);
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 16px;
}
.replayer-controls__btn--active { background: var(--accent); color: white; }

.street-tags {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.street-tag {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 14px;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border: 2px solid var(--surface-dark-fg);
  color: var(--surface-dark-fg);
  background: transparent;
  cursor: pointer;
}
.street-tag.active { background: var(--accent); border-color: var(--accent); }

/* Replayer scene — faithful mock of the desktop replayer (HH_REPLAYER_SCENE).
   Two layers like the software: the table gets a CSS perspective tilt
   (table_tilt) while players/board/chips sit flat on the overlay. */
.rp-scene {
  position: relative;
  aspect-ratio: 1.6;
  perspective: 1100px;
}
.rp-scene svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rp-table {
  transform: rotateX(6.5deg);
  transform-origin: 50% 100%;
}
.rp-t {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  user-select: none;
}
.rp-watermark {
  font-weight: 300;
  font-size: 27px;
  letter-spacing: 0.18em;
  fill: rgba(255,255,255,0.10);
}
.rp-t--pot { font-size: 14px; fill: #ffb347; }
.rp-t--val { font-size: 12px; fill: #ffffff; }
.rp-t--dbtn { font-size: 13px; fill: #2b212e; }
.rp-t--eq { font-size: 13px; }
.rp-t--eqst { font-size: 8.5px; fill: #a0a0aa; letter-spacing: 0.08em; }
.rp-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  fill: #f5f5f5;
}
.rp-stack {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  fill: #ffb347;
}
.rp-action {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 11.5px;
  fill: #fbbf24;
  text-anchor: middle;
  letter-spacing: 0.04em;
}
.rp-seat { transition: opacity 0.35s ease; }
.rp-seat.rp-folded { opacity: 0.3; }
.rp-seat.rp-active .rp-name { fill: #ffd9cf; }
.rp-seat.rp-active .rp-av-ring { animation: rp-ring-pulse 1.6s ease-in-out infinite; }
@keyframes rp-ring-pulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.45; }
}
.rp-pot-pill { transition: opacity 0.3s ease; }
.rp-pot-stack { will-change: transform; }
.rp-bet { will-change: transform, opacity; }
/* board card deal-in */
.rp-bcard.rp-deal { opacity: 0; transform: translateY(-14px); }
.rp-bcard.rp-deal--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
/* equity badge pop */
.rp-eq-badge {
  animation: rp-eq-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes rp-eq-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .rp-seat, .rp-bcard.rp-deal--in, .rp-pot-pill { transition: none; }
  .rp-bcard.rp-deal { opacity: 1; transform: none; }
  .rp-eq-badge { animation: none; }
  .rp-seat.rp-active .rp-av-ring { animation: none; }
}

/* NOTES SECTION ============================ */
.notes-section { background: var(--paper-2); }
.notes-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.notes-window {
  background: var(--surface-dark);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--glow);
  overflow: hidden;
}
.notes-window__head {
  background: var(--surface-dark-2);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--surface-dark-fg);
  border-bottom: 1px solid var(--bd);
}
.notes-window__title {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.notes-window__badge {
  background: var(--hot);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
}
.notes-window__meta {
  padding: 8px 16px;
  background: var(--surface-dark-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
  border-bottom: 1px solid var(--bd);
}
.notes-window__meta span { color: var(--amber); }
.notes-window__quick {
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface-dark);
  border-bottom: 1px solid var(--bd);
}
.notes-window__quick-btn {
  background: rgba(255,255,255,0.04);
  color: var(--surface-dark-fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.notes-window__quick-btn:hover { background: rgba(255,126,103,0.12); border-color: var(--accent); }
.notes-window__body {
  padding: 16px;
  background: var(--surface-dark);
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  color: var(--surface-dark-fg);
  min-height: 240px;
  line-height: 1.6;
}
.note-pin {
  background: rgba(255,179,71,0.16);
  color: var(--amber);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 4px;
}
.note-pin::before { content: ""; }
.notes-window__actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-dark-2);
}
.notes-window__btn {
  background: rgba(255,255,255,0.04);
  color: var(--surface-dark-fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.notes-window__btn:hover { background: rgba(255,126,103,0.12); border-color: var(--accent); }

/* sync diagram */
.sync-diagram {
  position: relative;
  text-align: center;
}
.sync-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px 0;
}
.sync-node {
  flex: 0 0 auto;
  padding: 18px 20px;
  border: var(--border-thick);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  text-align: center;
  min-width: 140px;
}
.sync-node__title {
  font-size: 22px;
  display: block;
}
.sync-node__sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0.7;
}
.sync-arrow {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 40px;
  color: var(--sky);
}

/* STATS / ARCHIVE ============================ */
.stats-section { background: var(--paper); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.stats-card {
  background: var(--paper);
  border: var(--border-thick);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  position: relative;
}
.stats-card--big { grid-column: span 7; }
.stats-card--med { grid-column: span 5; }
.stats-card--small { grid-column: span 4; }
.stats-card--graph { grid-column: span 12; }

.stat-num {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* STAT CATALOG — a wall of HUD-style cells, grouped by street ====== */
.stat-count { align-self: flex-end; }

/* street colour map (shared by legend dots, cell dots and bars) */
.stat-cell[data-street="pre"]   .stat-cell__dot,
.stat-legend__item[data-street="pre"]   .stat-cell__dot,
.stat-cell[data-street="pre"]   .stat-cell__bar > span { background: var(--accent); }
.stat-cell[data-street="flop"]  .stat-cell__dot,
.stat-legend__item[data-street="flop"]  .stat-cell__dot,
.stat-cell[data-street="flop"]  .stat-cell__bar > span { background: var(--amber); }
.stat-cell[data-street="turn"]  .stat-cell__dot,
.stat-legend__item[data-street="turn"]  .stat-cell__dot,
.stat-cell[data-street="turn"]  .stat-cell__bar > span { background: var(--sky); }
.stat-cell[data-street="river"] .stat-cell__dot,
.stat-legend__item[data-street="river"] .stat-cell__dot,
.stat-cell[data-street="river"] .stat-cell__bar > span { background: var(--rose); }
.stat-cell[data-street="sd"]    .stat-cell__dot,
.stat-legend__item[data-street="sd"]    .stat-cell__dot,
.stat-cell[data-street="sd"]    .stat-cell__bar > span { background: var(--green); }

.stat-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.stat-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.stat-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 14px;
}
.stat-cell {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 13px 11px;
  position: relative;
  /* overflow stays visible so the floating tooltip can emerge above the card */
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, z-index 0s;
}
.stat-cell:hover,
.stat-cell.tip-on {
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 18px rgba(255, 126, 103, 0.22);
  border-color: var(--accent);
  z-index: 20; /* float above sibling cells while tooltip is visible */
}

/* ── stat tooltip popover ──
   left + width are set by initStatTips() so the panel is always clamped
   inside the viewport. CSS handles only colours, shape and the fade-in. */
.stat-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  /* left / width → inline style via JS */
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), 0 0 24px rgba(255, 126, 103, 0.18);
  padding: 12px 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* arrow caret — left offset aligned to card centre by JS via --tip-arrow */
.stat-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--tip-arrow, 50%);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--accent);
}
.stat-tip__name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--accent);
  text-transform: uppercase;
  line-height: 1.3;
}
.stat-tip__body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0;
}
/* JS adds .tip-on to reveal — works for both hover (desktop) and tap (mobile) */
.stat-cell.tip-on .stat-tip {
  opacity: 1;
  transform: translateY(0);
}

.stat-cell__top { display: flex; align-items: center; gap: 7px; }
.stat-cell__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.stat-cell__abbr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  text-transform: uppercase;
  white-space: nowrap;
}
.stat-cell__val {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-top: 9px;
  color: var(--amber);
}
.stat-cell__bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-dark);
  margin-top: 11px;
  overflow: hidden;
}
.stat-cell__bar > span { display: block; height: 100%; border-radius: 2px; }

/* signature cards */
.stat-features {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 26px;
}
.stat-feature {
  background: linear-gradient(155deg, var(--surface) 0%, var(--surface-2) 100%);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.stat-feature--pos { box-shadow: var(--shadow-sm), var(--glow); border-color: rgba(255, 126, 103, 0.4); }
.stat-feature__kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.stat-feature__head h3 { margin: 8px 0 10px; font-size: clamp(24px, 2.6vw, 34px); }
.stat-feature__head p {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 22px;
}

/* mini positional breakdown */
.posmini { display: flex; flex-direction: column; gap: 9px; }
.posmini__row { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 12px; }
.posmini__lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}
.posmini__bar { height: 8px; border-radius: 4px; background: var(--surface-dark); overflow: hidden; }
.posmini__bar > span { display: block; height: 100%; border-radius: 4px; background: var(--amber); }
.posmini__val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}
.posmini__row.is-peak .posmini__lab { color: var(--accent); }
.posmini__row.is-peak .posmini__bar > span { background: var(--accent); }
.posmini__row.is-peak .posmini__val { color: var(--accent); }

/* steal trio */
.steal-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.steal-cell {
  background: var(--surface-dark);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
}
.steal-cell__val {
  display: block;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: var(--amber);
}
.steal-cell__lab {
  display: block;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .stat-features { grid-template-columns: 1fr; }
  .stat-wall { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

/* ARCHIVE — framed as the app's ARCHIVE tab ====================== */
.archive-section { background: var(--paper-2); }
.archive-side-tag { align-self: flex-end; }

.archive-window {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--glow);
  overflow: hidden;
}
.archive-window__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface-dark-2);
  border-bottom: 1px solid var(--bd);
  font-family: 'JetBrains Mono', monospace;
}
.archive-window__bar .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--hot);
}
.archive-window__bar .dot.y { background: var(--amber); }
.archive-window__bar .dot.g { background: var(--green); }
.archive-tabs { display: inline-flex; gap: 4px; margin-left: 8px; }
.archive-tab {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
}
.archive-tab.is-active { background: rgba(255,126,103,0.16); color: var(--accent); }
.archive-window__meta {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.archive-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
}
.archive-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--bd);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.archive-chip.is-active { border-color: var(--accent); color: var(--accent); }
.archive-chip__caret { opacity: 0.6; font-size: 9px; }

.archive-graph { padding: 18px 18px 6px; }

.archive-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--bd);
  border-top: 1px solid var(--bd);
}
.archive-kpi {
  background: var(--surface-dark);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.archive-kpi__val {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1;
}
.archive-kpi__val--green { color: var(--green); }
.archive-kpi__val--coral { color: var(--accent); }
.archive-kpi__val--ink { color: var(--surface-dark-fg); }
.archive-kpi__lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.archive-sessions { margin-top: 22px; }
.archive-sessions__head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-soft);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.archive-row {
  display: grid;
  grid-template-columns: 80px 70px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.archive-row:hover { transform: translateX(3px); border-color: var(--accent); }
.archive-row__stake {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.archive-row__fmt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  padding: 3px 8px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  justify-self: start;
}
.archive-row__hands {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.archive-row__unit { font-size: 10px; color: var(--muted); font-weight: 600; }
.archive-row__net {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}
.archive-row__net--up { color: var(--green); }
.archive-row__net--down { color: var(--accent); }
.archive-row__bb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: right;
  min-width: 84px;
}

@media (max-width: 760px) {
  .archive-kpis { grid-template-columns: repeat(2, 1fr); }
  .archive-row { grid-template-columns: 60px 1fr auto; gap: 10px; }
  .archive-row__fmt, .archive-row__bb { display: none; }
}

/* ANALYSIS — faithful mock of the app's ANALYSIS tab (analysis_tab.py).
   The window stays dark in all three site themes (it is "the software in
   action"), so every colour inside it is LOCAL: cream-translucent overlays
   over the dark base (never --ink/--surface-2/--bd, which flip in the light
   theme and become unreadable on a dark panel). Palette mirrors the soft's
   sunset QSS: fields #2b212e-like, borders #473649-like, cream text, coral
   focus/selected, amber player name. Chrome bar reuses .archive-*. ======== */
.analysis-section { background: var(--paper); }
.analysis-side-tag { align-self: flex-end; }

.analysis-window {
  /* window-local tokens (theme-proof: all derived from cream/coral over dark) */
  --an-fg:    var(--surface-dark-fg);
  --an-soft:  rgba(242,233,228,0.58);
  --an-mut:   rgba(242,233,228,0.38);
  --an-line:  rgba(242,233,228,0.16);
  --an-field: rgba(242,233,228,0.06);
  --an-hover: rgba(242,233,228,0.10);
  background: var(--surface-dark);
  color: var(--an-fg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--glow);
  overflow: hidden;
  height: 500px;
}
.an-body {
  display: grid;
  grid-template-columns: 252px 1fr;
  height: calc(500px - 38px);  /* 38px = bar */
}

/* --- filters panel: QGroupBox "Filtros" + form rows + Apply --- */
.an-filters {
  padding: 18px 14px 14px;
  background: var(--surface-dark-2);
  border-right: 1px solid var(--an-line);
  overflow-y: auto;
}
.an-groupbox {
  position: relative;
  border: 1px solid var(--an-line);
  border-radius: 6px;
  padding: 16px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.an-groupbox__title {
  position: absolute;
  top: -8px;
  left: 8px;
  padding: 0 5px;
  background: var(--surface-dark-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--an-soft);
}
.an-frow {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 8px;
}
.an-flabel {
  font-size: 11px;
  color: var(--an-fg);
}
.an-combo, .an-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px;
  background: var(--an-field);
  border: 1px solid var(--an-line);
  border-radius: 4px;
  font-size: 11px;
  color: var(--an-fg);
  white-space: nowrap;
}
.an-combo i {
  margin-left: auto;
  font-style: normal;
  font-size: 9px;
  color: var(--an-soft);
}
.an-field {
  cursor: pointer;
  position: relative;
  transition: border-color 0.14s ease;
}
.an-field:hover, .an-field.is-open { border-color: var(--accent); }
.an-field__text { font-weight: 700; }
.an-field__caret {
  width: 1px;
  align-self: stretch;
  margin: 4px 0;
  background: var(--accent);
  animation: an-caret 0.9s steps(1) infinite;
}
@keyframes an-caret { 50% { opacity: 0; } }

/* completer-style dropdown (player picker / pot-type combo) */
.an-dd {
  position: absolute;
  top: calc(100% + 3px);
  left: -1px;
  right: -1px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #372a3b;
  background: color-mix(in srgb, var(--surface-dark) 60%, #4d3b52);
  border: 1px solid var(--an-line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.an-dd[hidden] { display: none; }
.an-dd__item {
  appearance: none;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--an-fg);
}
.an-dd__item:hover { background: rgba(255,126,103,0.18); color: var(--accent); }
.an-dd__pin { color: var(--amber); margin-right: 5px; }

/* pushable Apply — tone-on-tone 3D base (skin sunset button recipe) */
.an-apply {
  appearance: none;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  background: #3d2e35;
  color: var(--an-fg);
  border: 1px solid transparent;
  border-bottom: 3px solid #974d45;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.12s ease, border-bottom-width 0.12s ease;
}
.an-apply:hover { transform: translateY(-1px); background: #4a343c; }
.an-apply.is-press, .an-apply:active { transform: translateY(1px); border-bottom-width: 1px; background: #33262c; }

/* --- results panel: Stats | Manos tab widget --- */
.an-results { padding: 12px 16px 16px; min-width: 0; overflow-y: auto; }
.an-results.is-computing .an-secs { opacity: 0; transform: translateY(10px); transition: none; }
.an-secs { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.4s ease; }
.an-pane.is-hidden { display: none; }

.an-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--an-line);
  margin-bottom: 12px;
}
.an-tab {
  appearance: none;
  cursor: pointer;
  background: var(--an-field);
  color: var(--an-soft);
  border: 1px solid var(--an-line);
  border-bottom: none;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.14s ease, background 0.14s ease;
}
.an-tab:hover { color: var(--an-fg); }
.an-tab.is-active {
  background: var(--an-hover);
  color: var(--an-fg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.an-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.an-resline { font-size: 12px; color: var(--an-soft); }
.an-resline [data-hh-an-name] { color: var(--amber); font-weight: 800; }
.an-gear {
  margin-left: auto;
  padding: 1px 7px;
  background: var(--an-field);
  border: 1px solid var(--an-line);
  border-radius: 4px;
  font-size: 14px;
  color: var(--an-fg);
}

/* QProgressBar (indeterminate) */
.an-busy {
  display: none;
  width: 110px;
  height: 6px;
  border-radius: 3px;
  background: var(--an-field);
  border: 1px solid var(--an-line);
  overflow: hidden;
  position: relative;
}
.an-busy.is-on { display: inline-block; }
.an-busy i {
  position: absolute;
  top: 0; bottom: 0;
  width: 36%;
  background: var(--accent);
  animation: an-busy 0.85s ease-in-out infinite;
}
@keyframes an-busy {
  0% { left: -36%; }
  100% { left: 100%; }
}

/* --- _StatSection: "▾  Title" header + Stat/Total table --- */
.an-sec { margin-bottom: 18px; }
.an-sec__title {
  font-size: 12px;
  font-weight: 800;
  color: var(--an-soft);
  padding: 3px 0;
  border-bottom: 1px solid var(--an-line);
  margin-bottom: 0;
}
.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.an-table th {
  background: var(--an-field);
  color: var(--an-soft);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  text-align: center;
}
.an-table td {
  padding: 4px 8px;
  text-align: center;
  color: var(--an-fg);
  border-bottom: 1px solid rgba(242,233,228,0.07);
  font-variant-numeric: tabular-nums;
}
.an-table th.an-table__stat, .an-table td.an-table__stat { text-align: left; width: 34%; }
.an-table td.an-table__stat { color: var(--an-soft); }
.an-table tbody tr:nth-child(even) td { background: rgba(242,233,228,0.03); }
.an-table td.an-up { color: var(--green); font-weight: 700; }
.an-table td.an-down { color: var(--accent); font-weight: 700; }

/* --- Manos pane: pot combo + exclude checkbox --- */
.an-handbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.an-handbar .an-flabel { font-size: 11px; }
.an-combo--btn { cursor: pointer; position: relative; min-width: 120px; transition: border-color 0.14s ease; }
.an-combo--btn:hover, .an-combo--btn.is-open { border-color: var(--accent); }
.an-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 11px;
  color: var(--an-fg);
  user-select: none;
}
.an-check__box {
  width: 14px; height: 14px;
  flex: 0 0 auto;
  border: 1px solid var(--an-soft);
  border-radius: 2px;
  background: var(--an-field);
  position: relative;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.an-check__box.is-on { background: var(--accent); border-color: var(--accent); }
.an-check__box.is-on::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #221a24;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.an-hands tbody tr { transition: background 0.14s ease; }
.an-hands tbody tr:hover td { background: var(--an-hover); }

@media (max-width: 860px) {
  .analysis-window { height: auto; }
  .an-body { grid-template-columns: 1fr; height: auto; }
  .an-filters { border-right: none; border-bottom: 1px solid var(--an-line); overflow-y: visible; }
  .an-results { overflow-y: visible; }
  .an-table th, .an-table td { padding: 4px 5px; font-size: 10px; }
  .an-hands th:nth-child(4), .an-hands td:nth-child(4),
  .an-hands th:nth-child(6), .an-hands td:nth-child(6) { display: none; }
  [data-hh-an-table="position"] th:nth-child(3), [data-hh-an-table="position"] td:nth-child(3),
  [data-hh-an-table="position"] th:nth-child(4), [data-hh-an-table="position"] td:nth-child(4) { display: none; }
}


/* LIVE — real-time session panel + embedded floating mini ========= */
.live-section { background: var(--paper); }
.live-side-tag { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; }
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(126, 196, 136, 0.25);
  animation: pulse-live 2.2s ease-in-out infinite;
  display: inline-block;
  flex: 0 0 auto;
}
.live-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
  margin-top: 8px;
}
.live-panel {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--glow);
  overflow: hidden;
}
.live-panel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--surface-dark-2);
  border-bottom: 1px solid var(--bd);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.live-panel__tab { color: var(--green); }
.live-panel__clock { margin-left: auto; color: var(--text-soft); }
.live-panel__profit {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 800;
  line-height: 1;
  color: var(--green);
  padding: 24px 24px 6px;
}
.live-panel__spark { padding: 0 18px; }
.live-panel__spark svg { width: 100%; height: 64px; display: block; }
.live-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--bd);
  border-top: 1px solid var(--bd);
  margin-top: 16px;
}
.live-stat {
  background: var(--surface-dark);
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.live-stat__val {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  color: var(--surface-dark-fg);
  white-space: nowrap;
}
.live-stat__val--green { color: var(--green); }
.live-stat__val--coral { color: var(--accent); }
.live-stat__lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  text-transform: uppercase;
}
.live-desk { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .live-stage { grid-template-columns: 1fr; }
}

/* ROADMAP ============================ */
.roadmap-section { background: var(--paper); }
.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.roadmap-card {
  background: var(--paper-2);
  border: var(--border-thick);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  position: relative;
}
.roadmap-card--next {
  background: var(--paper);
}
.roadmap-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bd);
}
.roadmap-card__head h3 { font-size: 28px; }
.roadmap-card__pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
}
.roadmap-card__pill--live {
  background: var(--accent-2);
  color: #10241a;
  border-color: transparent;
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126,196,136,0.40); }
  50% { box-shadow: 0 0 0 6px rgba(126,196,136,0); }
}
.roadmap-card ul { list-style: none; }
.roadmap-card li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px dashed rgba(10,10,10,0.18);
}
.roadmap-card li:last-child { border-bottom: none; }
.roadmap-check {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  background: var(--accent-2);
  border: none;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 16px;
  color: #10241a;
}
.roadmap-check--next {
  background: transparent;
  color: var(--text-soft);
  border: 1px dashed var(--bd);
}

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

/* CTA ============================ */
.cta-section {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section h2 {
  color: var(--surface-dark-fg);
}
.cta-section .scribble::after { background: var(--hot); }
.cta-section .halftone-bg {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(circle, var(--surface-dark-fg) 1.5px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.06;
  z-index: 0;
}
.cta-content { position: relative; z-index: 2; }
.cta-section .btn { background: var(--surface-dark-fg); color: var(--surface-dark); }
.cta-section .btn--accent { background: var(--accent); color: white; }

/* FOOTER — see "BRUTALIST FOOTER" block at the end of file */

/* SCROLL ANIMATIONS ============================ */
/* Per-element knobs: --rev-x / --rev-y (slide-from), --rev-s (scale-from),
   --rev-rot (persistent rotation). Big stages get cinematic variants below. */
.reveal {
  opacity: 0;
  transform: translate(var(--rev-x, 0), var(--rev-y, 30px)) scale(var(--rev-s, 1)) rotate(var(--rev-rot, 0deg));
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: translate(0, 0) scale(1) rotate(var(--rev-rot, 0deg));
}

/* headings slide in from the left, their sub from below (subtle cross-axis) */
.section-head h2.reveal { --rev-x: -26px; --rev-y: 0; }

/* big stages rise with a slight scale — the "screen turning on" gesture */
.replayer-stage.reveal,
.hud-window.reveal,
.notes-window.reveal,
.sync-diagram.reveal { --rev-y: 52px; --rev-s: 0.965; transition-duration: 1s; }

.roadmap-card.reveal { --rev-y: 40px; --rev-s: 0.97; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.is-in > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.14s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.23s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.32s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.41s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.50s; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: 0.59s; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: 0.68s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1;
    transform: translate(0, 0) rotate(var(--rev-rot, 0deg));
    transition: none;
  }
}

/* speech bubble */
.bubble {
  position: relative;
  background: var(--paper);
  border: var(--border-thick);
  padding: 14px 18px;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  display: inline-block;
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 30px;
  width: 0; height: 0;
  border: 10px solid transparent;
  border-top-color: var(--ink);
}
.bubble::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 33px;
  width: 0; height: 0;
  border: 7px solid transparent;
  border-top-color: var(--paper);
  z-index: 1;
}

/* BIG MARQUEE ============================ */
.marquee {
  background: var(--accent);
  color: white;
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  z-index: 3;
}
.marquee__track {
  display: flex;
  gap: 50px;
  animation: scroll-x 30s linear infinite;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 50px;
}
.marquee__dot {
  width: 18px; height: 18px;
  background: var(--paper);
  border-radius: 50%;
  display: inline-block;
  border: 2px solid var(--ink);
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* MINI LIVE SECTION ============================ */
.mini-section { background: var(--paper); }
.mini-stage {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 50px;
  align-items: center;
}
.mini-stage__text h3 {
  margin-bottom: 14px;
}
.mini-stage__text p {
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
  max-width: 460px;
  color: var(--muted);
  margin-bottom: 22px;
}
.mini-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.mini-feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.mini-feat-list li::before {
  content: "■";
  color: var(--accent);
  font-size: 14px;
  line-height: 1.2;
  flex: 0 0 auto;
}
.mini-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  background: var(--accent);
  color: white;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Desk surface — the playground where the floating panel lives */
.mini-playground {
  position: relative;
  background: var(--paper-2);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  height: 460px;
  overflow: hidden;
  background-image:
    radial-gradient(circle, rgba(10,10,10,0.18) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
.mini-playground__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,10,10,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
/* soft accent spotlight where the panel rests — gives the desk some depth */
.mini-playground::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 32% 30%, rgba(124,58,237,0.08), transparent 70%);
  pointer-events: none;
}
.mini-playground__label {
  position: absolute;
  bottom: 10px; left: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.mini-playground__label::before {
  content: "// ";
  color: var(--accent);
}

/* The mini panel itself — brutalist port of LiveMiniPanel (mini.py hero1) */
.mini-panel {
  position: absolute;
  background: #1d161f;
  border: 1px solid var(--bd);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0;
  user-select: none;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  min-height: 60px;
  /* Override theme transition so dragging feels snappy */
  transition: box-shadow 0.15s ease, transform 0.05s ease;
  z-index: 4;
}
.mini-panel.is-dragging { cursor: grabbing; }
.mini-panel.is-dragging,
.mini-panel.is-resizing { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }

/* drop-in entrance when the playground scrolls into view (.is-on from JS) */
.mini-playground.is-on .mini-panel {
  animation: mini-drop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
@keyframes mini-drop {
  0%   { transform: scale(0.85) translateY(-30px); opacity: 0; }
  60%  { transform: scale(1.04) translateY(3px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.mini-playground.is-on .mini-playground__hint {
  animation: mini-hint-pulse 2.2s ease-in-out 1.1s 3;
}
@keyframes mini-hint-pulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .mini-playground.is-on .mini-panel,
  .mini-playground.is-on .mini-playground__hint { animation: none; }
}
.mini-playground__ghost svg { width: 16px; height: 16px; }

.mini-panel__inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px 12px;
  padding: 8px 10px 6px;
  align-items: center;
}
.mini-panel.show-profit .mini-panel__inner {
  grid-template-columns: auto auto auto 1fr auto;
}

/* each stat lives in its own chunky card, like QFrame#MiniCard in mini.py:
   #0f0f10 face, 2px #050505 border, thick black bottom/right = fake 3D */
.mini-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  background: #0f0f10;
  border: 2px solid #050505;
  border-bottom: 4px solid #000;
  border-right: 4px solid #000;
  border-radius: 2px;
  padding: 3px 9px 4px;
}
.mini-cell__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  font-weight: 700;
  color: #606067;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mini-cell__value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #e4e4e7;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.mini-cell__value .mini-prefix-icon {
  display: inline-block;
  width: 12px; height: 12px;
  color: #a1a1aa;
}
.mini-cell__value .mini-prefix-hash {
  color: #a1a1aa;
  font-size: 12px;
}
.mini-cell--profit .mini-cell__value {
  font-size: 14px;
  font-weight: 800;
}
.mini-cell--profit.up .mini-cell__value { color: #22c55e; }
.mini-cell--profit.down .mini-cell__value { color: #ef4444; }
.mini-cell--profit.flat .mini-cell__value { color: #a1a1aa; }

.mini-panel__buttons {
  display: flex;
  gap: 3px;
  align-items: center;
}
.mini-btn {
  width: 24px; height: 22px;
  background: #17171a;
  border: 1.5px solid #050505;
  border-bottom: 2.5px solid #000;
  border-right: 2.5px solid #000;
  color: #d4d4d8;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  padding: 0;
}
.mini-btn:hover {
  background: #242428;
  border-color: var(--accent);
}
.mini-btn--stop {
  background: #2a1010;
  color: #fecaca;
}
.mini-btn--stop:hover { background: #551717; border-color: #7f1d1d; }
.mini-btn svg { width: 14px; height: 14px; }

.mini-extra {
  grid-column: 1 / -2;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #e4e4e7;
  font-weight: 600;
}
.mini-extra__sep {
  color: #52525b;
}
.mini-extra__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini-extra__key {
  color: #71717a;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.mini-brand {
  position: absolute;
  right: 6px; bottom: 2px;
  color: #4e4f8a;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

.mini-grip {
  position: absolute;
  right: 0; bottom: 0;
  width: 16px; height: 16px;
  cursor: nwse-resize;
  background-image:
    linear-gradient(135deg, transparent 55%, #6366f1 55%, #6366f1 60%, transparent 60%,
                    transparent 70%, #6366f1 70%, #6366f1 75%, transparent 75%,
                    transparent 85%, #6366f1 85%, #6366f1 90%, transparent 90%);
  opacity: 0.7;
}
.mini-grip:hover { opacity: 1; }

/* Sticky config menu (gear) */
.mini-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #121212;
  border: 1px solid #3f3f46;
  padding: 4px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #e4e4e7;
  min-width: 170px;
  z-index: 20;
  box-shadow: 4px 4px 0 0 rgba(0,0,0,0.5);
}
.mini-menu__item {
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}
.mini-menu__item:hover { background: #27272a; }
.mini-menu__check {
  width: 12px; height: 12px;
  border: 1.5px solid #71717a;
  display: grid; place-items: center;
  font-size: 11px;
  line-height: 1;
}
.mini-menu__item.is-on .mini-menu__check {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}
.mini-menu__sep {
  height: 1px;
  background: #3f3f46;
  margin: 4px 0;
}

/* Width preset chips */
.mini-controls {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-controls__btn {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
}
.mini-controls__btn:hover { background: var(--ink); color: var(--paper); }
.mini-controls__btn.is-active { background: var(--accent); color: white; border-color: var(--ink); }

@media (max-width: 900px) {
  .mini-stage { grid-template-columns: 1fr; }
  .mini-playground { height: 380px; }
}

/* RESPONSIVE ============================ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .notes-stage { grid-template-columns: 1fr; }
  .stats-card--big, .stats-card--med, .stats-card--small { grid-column: span 12; }
  section { padding: 80px 5vw; }
  .nav { font-size: 13px; padding: 6px 10px; gap: 6px; }
  .nav a { padding: 3px 6px; }
  .nav__sep { display: none; }
}
@media (max-width: 720px) {
  .nav__logo span:not(.nav__logo-mark) { display: none; }
  .nav a:not(.nav__cta):not(.nav__docs) { display: none; }
}

/* ============================================================
   WORDPRESS / BILINGUAL / NEW UTILITY CLASS STYLES
   ============================================================ */

/* Skip link */
.skip-link.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 99999;
}
.skip-link.screen-reader-text:focus {
  left: 16px;
  top: 16px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 16px;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Cart badge in the nav */
.nav__cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px !important;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 12px;
  transition: transform 0.12s ease;
}
.nav__cart:hover { transform: translate(-1px, -1px); background: var(--ink) !important; color: var(--paper) !important; }
.nav__cart-count { min-width: 16px; text-align: center; }

/* ---------- Bilingual visibility ---------- */
html[data-lang="ES"] .hh-lang--en { display: none !important; }
html[data-lang="EN"] .hh-lang--es { display: none !important; }
/* When a bilingual span is inline-flow (no block needed), keep it inline */
.hh-lang { display: inline; }
.hh-lang--es, .hh-lang--en { display: inline; }
/* Marquee tracks are flex containers — toggle the WHOLE track, not just spans inside */
html[data-lang="ES"] .marquee__track.hh-lang--en { display: none !important; }
html[data-lang="EN"] .marquee__track.hh-lang--es { display: none !important; }
html[data-lang="ES"] .marquee__track.hh-lang--es { display: flex; }
html[data-lang="EN"] .marquee__track.hh-lang--en { display: flex; }

/* Theme toggle icon flip — tri-state: the active theme shows its own icon
   (sunset → horizon · dark → moon · light → sun). Cycle order in JS:
   sunset → dark → light → sunset. */
.nav__theme svg { display: none; }
html[data-theme="sunset"] .hh-theme-sunset { display: inline-block; }
html[data-theme="light"]  .hh-theme-sun    { display: inline-block; }

/* Lang chips highlight (was driven by JS classNames before) */
.nav__lang span { color: var(--ink); }
html[data-lang="ES"] .nav__lang [data-lang-value="ES"],
html[data-lang="EN"] .nav__lang [data-lang-value="EN"] {
  background: var(--accent); color: #2a1620; opacity: 1;
}
.nav__lang [data-lang-value] {
  padding: 4px 9px;
  display: inline-block;
  border-right: 1px solid var(--bd);
  opacity: 0.55;
}
.nav__lang [data-lang-value]:last-child { border-right: none; }

/* ---------- Hero replacements (no React inline styles) ---------- */
.hero__tag { margin-bottom: 22px; display: inline-block; }
.hero__bubble {
  position: absolute;
  top: 8%;
  left: -8%;
  transform: rotate(-6deg);
  z-index: 4;
}
.hero__doodle-arrow {
  top: 20%;
  right: -6%;
  width: 90px;
  height: 90px;
  transform: rotate(28deg);
}
.hero__doodle-star {
  bottom: -2%;
  right: 4%;
  width: 72px;
  height: 72px;
}
.hero__art-burst {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero__art-burst svg, .hero__art > svg { z-index: 2; }
.hero__art-burst[data-hh-illus="heroTable"] { z-index: 1; }
.hero__art [data-hh-illus="heroTable"] { z-index: 1; }

/* Hero table — cinematic entrance (triggered by .is-cine from JS) + idle float.
   The mouse 3D tilt lives in JS (initHeroParallax) on .hero__art-burst. */
.hero__art-burst { will-change: transform; }
.hero__art.is-cine .hero-svg {
  animation: hh-hero-float 8s ease-in-out 2.2s infinite;
}
/* NOTE: the animations target the *-inner wrapper groups — animating the
   outer <g> would override its transform="" positioning attribute. */
.hero__art.is-cine .hero-card--1 .hero-card-inner,
.hero__art.is-cine .hero-card--2 .hero-card-inner,
.hero__art.is-cine .hero-card--3 .hero-card-inner,
.hero__art.is-cine .hero-card--4 .hero-card-inner,
.hero__art.is-cine .hero-card--5 .hero-card-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: hh-hero-deal 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__art.is-cine .hero-card--1 .hero-card-inner { animation-delay: 0.35s; }
.hero__art.is-cine .hero-card--2 .hero-card-inner { animation-delay: 0.47s; }
.hero__art.is-cine .hero-card--3 .hero-card-inner { animation-delay: 0.59s; }
.hero__art.is-cine .hero-card--4 .hero-card-inner { animation-delay: 0.71s; }
.hero__art.is-cine .hero-card--5 .hero-card-inner { animation-delay: 0.83s; }
.hero__art.is-cine .hero-player .hero-player-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: hh-hero-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
.hero__art.is-cine .hero-player--hero .hero-player-inner { animation-delay: 1.0s; }
.hero__art.is-cine .hero-hole-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: hh-hero-flip 0.45s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
}
@keyframes hh-hero-deal {
  from { opacity: 0; transform: translateY(-48px) rotate(-9deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes hh-hero-pop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: none; }
}
@keyframes hh-hero-flip {
  from { opacity: 0; transform: scaleX(0.1); }
  to   { opacity: 1; transform: none; }
}
@keyframes hh-hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__art.is-cine .hero-svg,
  .hero__art.is-cine .hero-card-inner,
  .hero__art.is-cine .hero-player-inner,
  .hero__art.is-cine .hero-hole-inner { animation: none; }
}

/* Shared section-sub variant used by many sections */
.hud-section__sub {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 500;
  max-width: 720px;
}
.hud-section__tag { align-self: flex-start; }

/* Replayer */
.replayer-section__bullets {
  list-style: none;
  text-align: right;
  margin: 0;
  padding: 0;
}
.replayer-section__bullets li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0;
  letter-spacing: 0.08em;
}
.replayer-stage__svg { max-width: 760px; margin: 0 auto; }
.replayer-controls__step-label {
  font-family: 'JetBrains Mono', monospace;
  color: var(--surface-dark-fg);
  font-size: 12px;
  font-weight: 700;
  margin-left: 12px;
}

/* Notes points list (was inline styled) */
.notes-section__points {
  list-style: none;
  text-align: left;
  margin-top: 30px;
  padding: 0;
}
.notes-section__points li {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 22px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bd);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.notes-section__pill {
  background: var(--accent);
  color: #2a1620;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 auto;
}
.sync-node--featured { background: var(--accent); color: #fff; }
.sync-node--featured .sync-node__sub { opacity: 0.85; }

/* Stats graph header */
.stats-card__graph-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  gap: 14px;
  flex-wrap: wrap;
}
.stats-card__graph-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Mini section helpers */
.mini-stage__sub { margin-top: 22px; }
.mini-playground__hint {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

/* ---------- PRICING SECTION ---------- */
.pricing-section { background: var(--paper-2); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}
.pricing-card {
  background: var(--paper);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pricing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), var(--glow); }
.pricing-card--featured {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--glow);
}
.pricing-card--featured:hover { transform: translateY(-10px); }
.pricing-card__ribbon {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #2a1620;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.pricing-card__head {
  border-bottom: 1px solid var(--bd);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.pricing-card--featured .pricing-card__head { border-bottom-color: rgba(242,233,228,0.22); }
.pricing-card__name {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.pricing-card__price-num {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 64px;
  line-height: 1;
}
.pricing-card--featured .pricing-card__price-num { color: var(--accent); }
.pricing-card__price-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
  opacity: 0.7;
  letter-spacing: 0.1em;
}
.pricing-card__features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}
.pricing-card__check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background: var(--accent-2);
  border: none;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 14px;
  color: #10241a;
}
.pricing-card__cta {
  width: 100%;
  justify-content: center;
  font-size: 18px;
}
.pricing-wc-wrap {
  grid-column: 1 / -1;
  padding-top: 36px;
  border-top: 1px dashed var(--bd);
  margin-top: 16px;
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card--featured { transform: none; }
}

/* ---------- CTA section helpers ---------- */
.cta-section__title { font-size: clamp(56px, 10vw, 140px); color: var(--surface-dark-fg); }
.cta-section__sub {
  font-size: 22px;
  font-weight: 600;
  margin: 24px auto;
  max-width: 600px;
  opacity: 0.85;
}
.cta-section__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.cta-section__btn-primary { font-size: 26px; }
.cta-section__star {
  position: absolute;
  left: -5%;
  bottom: -30%;
  width: 280px;
  opacity: 0.15;
}

/* ---------- Footer (legacy holding pen — see BRUTALIST FOOTER below) ---------- */

/* ---------- Inner-page layout (page.php / single.php / archive.php) ---------- */
.container--narrow { max-width: 860px; }
.page-section, .single-section, .archive-section, .error-404-section {
  padding-top: 160px;
  background: var(--paper);
}
.page-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ink);
}
.page-title { font-size: clamp(40px, 6vw, 80px); margin-bottom: 12px; }
.page-thumb { margin: 0 0 28px; border: var(--border-thick); }
.page-thumb img { display: block; width: 100%; height: auto; }
.page-content {
  font-size: 17px;
  line-height: 1.65;
}
.page-content p { margin-bottom: 1em; }
.page-content h2 { font-size: clamp(28px, 4vw, 44px); margin: 1.6em 0 0.6em; }
.page-content h3 { font-size: clamp(22px, 3vw, 32px); margin: 1.3em 0 0.5em; }
.page-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 8px 0 8px 18px;
  font-style: italic;
  margin: 1.2em 0;
}
.page-content a { color: var(--accent); }
.page-content img { max-width: 100%; height: auto; }
.page-content ul, .page-content ol { padding-left: 1.6em; margin-bottom: 1em; }
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.post-card { padding: 0; overflow: hidden; }
.post-card__thumb { display: block; border-bottom: 3px solid var(--ink); }
.post-card__thumb img { display: block; width: 100%; height: auto; }
.post-card__body { padding: 22px; }
.post-card__title { font-size: clamp(22px, 2.6vw, 28px); margin: 8px 0 12px; line-height: 1.05; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { margin-bottom: 14px; font-size: 15px; line-height: 1.55; }
.post-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Pagination */
.pagination, .navigation.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--ink); color: var(--paper); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--ink); color: #fff; }

/* Comments */
.comments-area { padding: 24px; margin-top: 40px; }
.comments-title { font-family: 'Bricolage Grotesque', 'Archivo', sans-serif; font-size: 28px; margin-bottom: 18px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-bottom: 1px dashed var(--ink); padding: 16px 0; }
.comment-author { font-family: 'Bricolage Grotesque', 'Archivo', sans-serif; font-size: 18px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea,
.search-form .search-field,
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type=submit] { display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--accent); color: #fff; border: 3px solid var(--ink); font-family: 'Bricolage Grotesque', 'Archivo', sans-serif; font-weight: 900; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; box-shadow: var(--shadow-sm); width: auto; }
.comment-form .form-submit { margin-top: 14px; }
.comment-form p { margin-bottom: 14px; }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; }
.search-form .search-submit { white-space: nowrap; }

/* Sidebar widgets (on inner pages, optional) */
.widget-area { display: grid; gap: 20px; margin-top: 60px; }
.widget { padding: 20px; }
.widget-title { font-family: 'Bricolage Grotesque', 'Archivo', sans-serif; font-size: 22px; margin-bottom: 12px; }
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px dashed rgba(10,10,10,0.18); }

/* No-results box */
.no-results .search-form { margin-top: 14px; }


/* ============================================================
   BRUTALIST FOOTER
   ============================================================ */

.site-footer {
  background: var(--surface-dark);
  color: var(--surface-dark-fg);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--bd);
  box-shadow: inset 0 2px 0 0 var(--accent);
}

/* Newsletter band — sits above the main footer */
.footer-newsletter {
  background: var(--accent);
  color: #2a1620;
  border-bottom: 1px solid var(--outline);
  position: relative;
}
.footer-newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #fff 1.4px, transparent 1.8px);
  background-size: 14px 14px;
  opacity: 0.08;
  pointer-events: none;
}
.footer-newsletter__wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 40px 0;
  position: relative;
  z-index: 1;
}
.footer-newsletter__title {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.footer-newsletter__sub {
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  font-weight: 600;
  max-width: 480px;
  opacity: 0.9;
}
.footer-newsletter__form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 4px;
  min-width: 380px;
}
.footer-newsletter__input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 14px !important;
  padding: 10px 14px !important;
  color: var(--ink) !important;
  width: auto !important;
  outline: none !important;
}
.footer-newsletter__btn {
  font-size: 16px;
  padding: 10px 18px;
  white-space: nowrap;
  border-width: 2px !important;
  box-shadow: none !important;
}
.footer-newsletter__btn:hover { transform: translateY(-1px); }
@media (max-width: 800px) {
  .footer-newsletter__wrap { grid-template-columns: 1fr; }
  .footer-newsletter__form { min-width: 0; width: 100%; }
}

/* MAIN FOOTER GRID */
.footer-main {
  padding: 60px 6vw 30px;
}
.footer-grid--main {
  display: grid;
  gap: 36px 28px;
  align-items: flex-start;
  /* Default 5-column on wide screens (1 brand + 4 cols). The data-cols attr is informational. */
  grid-template-columns: 1.4fr repeat(4, 1fr);
}
.footer-grid--main[data-cols="6"] { grid-template-columns: 1.4fr repeat(5, 1fr); }
.footer-grid--main[data-cols="5"] { grid-template-columns: 1.4fr repeat(4, 1fr); }
.footer-grid--main[data-cols="4"] { grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-grid--main[data-cols="3"] { grid-template-columns: 1.4fr repeat(2, 1fr); }
.footer-grid--main[data-cols="2"] { grid-template-columns: 1.4fr 1fr; }
.footer-grid--main[data-cols="1"] { grid-template-columns: 1fr; }

@media (max-width: 1100px) {
  .footer-grid--main,
  .footer-grid--main[data-cols] { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .footer-grid--main,
  .footer-grid--main[data-cols] { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid--main,
  .footer-grid--main[data-cols] { grid-template-columns: 1fr; }
}

/* BRAND BLOCK */
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.footer-brand__logo { height: 40px; width: auto; display: block; }
.footer-brand__letter {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #2a1620;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 22px;
  border: 1px solid rgba(242,233,228,0.35);
  border-radius: var(--radius-sm);
}
.footer-brand__name {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-brand__tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  max-width: 320px;
  opacity: 0.85;
}
.footer-brand .custom-logo { max-height: 56px; width: auto; height: auto; filter: invert(0.95); }

/* COLUMNS */
.footer-col {}
.footer-col__title {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 4px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(242,233,228,0.14);
  position: relative;
}
.footer-col__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 32px;
  height: 2px;
  background: var(--accent);
}
.footer-col__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-col__menu li { padding: 0; margin: 0; }
.footer-col__menu a {
  color: var(--surface-dark-fg);
  text-decoration: none;
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 14px;
  opacity: 0.85;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-col__menu a::before {
  content: "▸";
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.footer-col__menu a:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateX(2px);
}
.footer-col__menu a:hover::before { opacity: 1; transform: translateX(0); }

.footer-col__empty {
  font-size: 11px;
  opacity: 0.5;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.footer-col__empty code {
  background: rgba(241,236,223,0.1);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 10px;
}
.footer-col__empty em { font-style: normal; color: var(--accent); }

/* SOCIAL ICONS */
.footer-social {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin: 8px 0 0;
}
.footer-social__link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.04);
  color: var(--surface-dark-fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.footer-social__link svg { width: 18px; height: 18px; }
.footer-social__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--glow);
  background: var(--accent);
  border-color: var(--accent);
  color: #2a1620;
}
.footer-social__link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Fallback bar when brand block is hidden */
.footer-social-bar {
  padding-top: 30px;
  margin-top: 20px;
  border-top: 1px dashed rgba(242,233,228,0.14);
  display: flex;
  justify-content: center;
}

/* Footer widget area */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed rgba(242,233,228,0.14);
}
.footer-widgets .widget-title { color: var(--accent); margin-bottom: 10px; }
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets a { color: var(--surface-dark-fg); }

/* BOTTOM BAR */
.footer-bottom {
  background: var(--surface-dark-2);
  border-top: 1px solid rgba(242,233,228,0.10);
  padding: 18px 6vw;
}
.footer-bottom__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-bottom__copy { opacity: 0.75; }
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  opacity: 0.75;
}
.footer-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(126,196,136,0.25);
  animation: pulse-live 2.2s ease-in-out infinite;
}
.footer-menu-wrap ul {
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  justify-content: center;
}
.footer-menu-wrap a {
  color: var(--surface-dark-fg);
  text-decoration: none;
  opacity: 0.75;
  font-size: 11px;
}
.footer-menu-wrap a:hover { opacity: 1; color: var(--accent); }

@media (max-width: 760px) {
  .footer-bottom__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-status, .footer-bottom__copy { justify-self: center; }
  .footer-menu-wrap ul { justify-content: center; }
}

/* ============================================================
   TESTIMONIALS · continuous image marquee
   ============================================================ */
.testimonials-section {
  position: relative;
  z-index: 2;
  padding: 80px 0 0;
  border-bottom: var(--border-thick);
  background: var(--paper);
}
.testimonials-section__head {
  padding: 0 6vw;
  margin-bottom: 40px;
}
.testimonials-marquee {
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  overflow: hidden;
  padding: 28px 0;
  position: relative;
  margin-top: 0;
}
.testimonials-section--accent { background: var(--paper); }
.testimonials-section--accent .testimonials-marquee { background: var(--accent); color: #fff; }
.testimonials-section--paper  .testimonials-marquee { background: var(--paper-2); color: var(--ink); }
.testimonials-section--dark   .testimonials-marquee { background: var(--surface-dark); color: var(--surface-dark-fg); }

.testimonials-track {
  display: flex;
  gap: 30px;
  align-items: center;
  width: max-content;
  animation: testimonials-scroll-x 35s linear infinite;
  will-change: transform;
}
.testimonials-marquee:hover .testimonials-track { animation-play-state: paused; }
@keyframes testimonials-scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Card */
.testimonial-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 18px 10px 10px;
  flex: 0 0 auto;
  color: var(--ink);
  min-height: 72px;
}
.testimonials-section--with-quote .testimonial-card { padding: 12px 20px 12px 12px; max-width: 420px; }
.testimonial-card__avatar {
  width: 52px;
  height: 52px;
  background: var(--surface-2);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}
.testimonial-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.testimonial-card__avatar-fallback {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.testimonial-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.testimonial-card__name {
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.05;
}
.testimonial-card__handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.7;
  white-space: nowrap;
}
.testimonial-card__quote {
  font-family: 'Archivo', sans-serif;
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 4px;
  max-width: 280px;
  white-space: normal;
  opacity: 0.85;
  display: block;
}

/* Variant tweaks — keep cards readable on every band */
.testimonials-section--accent .testimonial-card,
.testimonials-section--dark   .testimonial-card { box-shadow: var(--shadow); }

/* Mobile: faster scroll, smaller cards */
@media (max-width: 720px) {
  .testimonial-card { min-height: 64px; padding: 8px 14px 8px 8px; gap: 10px; }
  .testimonial-card__avatar { width: 44px; height: 44px; }
  .testimonial-card__name { font-size: 18px; }
  .testimonials-section--with-quote .testimonial-card { max-width: 320px; }
  .testimonial-card__quote { font-size: 12px; max-width: 200px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .testimonials-track { animation: none; }
}
