/* Macro Share - shared site + chart styles.
   Colors are the validated dataviz reference palette (see palette.md);
   light/dark values are both selected, not an automatic flip. */

:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --surface-raised: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --gridline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.16);

  --series-1: #2a78d6; /* blue - brand + primary series */
  --series-1-soft: #cde2fb;
  --series-2: #eb6834; /* orange */
  --series-3: #1baf7a; /* aqua */
  --series-4: #eda100; /* yellow */
  --series-7: #4a3aa7; /* violet - gradient partner for brand blue */

  --good: #0ca30c;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
  --shadow-lifted: 0 2px 8px rgba(11, 11, 11, 0.06), 0 20px 48px rgba(11, 11, 11, 0.10);
  --brand-gradient: linear-gradient(135deg, var(--series-1), var(--series-7));

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --surface-raised: #202020;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --gridline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);

    --series-1: #3987e5;
    --series-1-soft: #184f95;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-7: #9085e9;

    --good: #0ca30c;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-lifted: 0 2px 8px rgba(0, 0, 0, 0.3), 0 24px 56px rgba(0, 0, 0, 0.44);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --page: #0d0d0d;
  --surface-raised: #202020;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --gridline: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --series-1: #3987e5;
  --series-1-soft: #184f95;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-7: #9085e9;

  --good: #0ca30c;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-lifted: 0 2px 8px rgba(0, 0, 0, 0.3), 0 24px 56px rgba(0, 0, 0, 0.44);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--page);
  background-image: radial-gradient(color-mix(in srgb, var(--text-primary) 6%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4, .brand, .footer-brand, .stat-value, .tile-value {
  font-family: var(--font-display);
}

/* ---------- Scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(.16,.84,.44,1), transform 0.7s cubic-bezier(.16,.84,.44,1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Button ripple ---------- */

.btn { position: relative; overflow: hidden; }

.ripple {
  position: absolute;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  background: color-mix(in srgb, currentColor 35%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple-anim 0.6s ease-out forwards;
}

@keyframes ripple-anim {
  to { width: 280px; height: 280px; opacity: 0; }
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--page) 78%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.scrolled {
  background: color-mix(in srgb, var(--page) 92%, transparent);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--border);
  color: var(--text-primary);
}

.nav-links a.active {
  color: var(--text-primary);
  background: var(--border);
}

.nav-cta {
  background: var(--series-1) !important;
  color: #fff !important;
}
.nav-cta:hover {
  background: var(--series-1) !important;
  filter: brightness(1.08);
  opacity: 0.95;
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links { gap: 0; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 48px;
  align-items: center;
}

.hero-copy { text-align: left; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-visual { max-width: 440px; margin: 0 auto; }
}

.hero::before {
  content: "";
  position: absolute;
  top: -260px;
  left: 50%;
  width: 900px;
  height: 560px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--series-1) 16%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(calc(-50% + var(--tilt-x, 0px)), var(--tilt-y, 0px));
  transition: transform 0.3s ease-out;
  animation: hero-breathe 8s ease-in-out infinite;
}

@keyframes hero-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero::after {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--series-3) 10%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-anim > * {
  opacity: 0;
  animation: hero-fade-up 0.8s cubic-bezier(.16,.84,.44,1) forwards;
}
.hero-anim > *:nth-child(1) { animation-delay: 0.05s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.16s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.27s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.38s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.49s; }

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .hero-anim > * { opacity: 1; animation: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--good) 12%, transparent); }
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 700;
}

.hero h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

@media (max-width: 980px) {
  .hero p.lead { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.magnetic { transition: transform 0.2s cubic-bezier(.16,.84,.44,1); }

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--series-1) 40%, transparent);
}
.btn-primary:hover {
  filter: brightness(1.1) saturate(1.1);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--series-1) 50%, transparent);
}

.btn-lg { padding: 16px 30px; font-size: 16px; border-radius: 12px; }

.btn-secondary {
  background: var(--surface-1);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--border); }

.hero-stats {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .hero-stats { justify-content: center; }
}

.hero-stat {
  padding: 0 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }

@media (max-width: 980px) {
  .hero-stat { border-right: none; margin-right: 0; padding: 0 18px; }
}

.hero-stat .stat-value { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.hero-stat .stat-label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* ---------- Hero product mockup ---------- */

.hero-visual { position: relative; }

.mockup-card {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lifted);
  overflow: hidden;
  transform: rotate(-2.5deg);
  animation: mockup-float 6s ease-in-out infinite;
}

@keyframes mockup-float {
  0%, 100% { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2.5deg) translateY(0); }
  50% { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2.5deg) translateY(-10px); }
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.mockup-titlebar .tl-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-titlebar .tl-dot:nth-child(1) { background: #e34948; }
.mockup-titlebar .tl-dot:nth-child(2) { background: #eda100; }
.mockup-titlebar .tl-dot:nth-child(3) { background: #1baf7a; }

.mockup-titlebar .tl-title {
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.mockup-body { padding: 18px; }

.mockup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mockup-heading .mh-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.mockup-heading .mh-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--series-1);
  background: color-mix(in srgb, var(--series-1) 14%, transparent);
  padding: 3px 9px;
  border-radius: 999px;
}

.mockup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.mockup-row:hover { background: var(--surface-1); }

.mockup-row .mr-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.mockup-row .mr-avatar svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; }

.mockup-row .mr-text { flex: 1; min-width: 0; }
.mockup-row .mr-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mockup-row .mr-sub { font-size: 11.5px; color: var(--text-muted); }

.mockup-row .mr-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.mockup-row.mr-active .mr-btn { background: var(--series-1); border-color: var(--series-1); color: #fff; }

.mockup-rec-badge {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  animation: mockup-badge-float 6s ease-in-out infinite;
  animation-delay: 0.3s;
}

@keyframes mockup-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.mockup-rec-badge .rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e34948;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.mockup-toast {
  position: absolute;
  left: -22px;
  bottom: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 190px;
  animation: mockup-badge-float 7s ease-in-out infinite;
  animation-delay: 1s;
}

.mockup-toast .toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--series-3) 16%, transparent);
  color: var(--series-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mockup-toast .toast-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 980px) {
  .mockup-toast { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mockup-card, .mockup-rec-badge, .mockup-toast { animation: none; }
}

/* ---------- Sections ---------- */

section { padding: 64px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--series-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
}

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.feature-card:nth-child(1) { grid-column: span 4; }
.feature-card:nth-child(2) { grid-column: span 2; }
.feature-card:nth-child(3) { grid-column: span 2; }
.feature-card:nth-child(4) { grid-column: span 4; }
.feature-card:nth-child(5) { grid-column: span 3; }
.feature-card:nth-child(6) { grid-column: span 3; }

.feature-wide { display: flex; align-items: flex-start; gap: 20px; }
.feature-wide .icon { margin-bottom: 0; flex-shrink: 0; }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card { grid-column: span 1 !important; }
  .feature-wide { flex-direction: column; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}

.spotlight { position: relative; isolation: isolate; }

.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--series-1) 12%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}
.spotlight:hover::before { opacity: 1; }

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}

.feature-card:hover .icon {
  transform: scale(1.12) rotate(-4deg);
}

.feature-card .icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  position: relative;
  padding-top: 8px;
}

.step .num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--series-1);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-1) 14%, transparent);
  transition: box-shadow 0.25s ease;
}
.step:hover .num {
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--series-1) 18%, transparent);
}

.step h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ---------- Format strip ---------- */

.format-strip {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.format-strip .label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.marquee {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: marquee-scroll 16s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.pill {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Section divider ---------- */

.divider {
  display: block;
  width: 100%;
  height: 48px;
  color: var(--surface-1);
}

/* ---------- Closing CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 64px 40px;
  text-align: center;
  background: var(--brand-gradient);
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.14;
  z-index: -1;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.cta-band p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 30px;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--series-1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.cta-band .btn-primary:hover { filter: none; background: #fff; opacity: 0.92; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: 48px;
}

footer .footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}

footer .footer-brand img { width: 24px; height: 24px; border-radius: 6px; }

footer .footer-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 320px;
}

footer .footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

footer .footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 700;
}

footer .footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 0;
}
footer .footer-col a:hover { color: var(--text-primary); }

footer .bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ================= Statistics page ================= */

.page-header {
  padding: 56px 0 8px;
}

.page-header .eyebrow { margin-bottom: 10px; }

.page-header h1 {
  font-size: clamp(30px, 4vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 0;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

@media (max-width: 860px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
}

.stat-tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-tile:hover { transform: translateY(-2px); }

.stat-tile .tile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.stat-tile .tile-label svg {
  width: 15px;
  height: 15px;
  stroke: var(--series-1);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.stat-tile .tile-value {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: proportional-nums;
}

.stat-tile .tile-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.viz-root {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.viz-root .fig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.viz-root .fig-head h3 {
  margin: 0;
  font-size: 16px;
}

.viz-root .fig-head .fig-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.table-toggle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--series-1);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.table-toggle:hover { background: var(--border); }

.chart-svg text {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.chart-svg .gridline { stroke: var(--gridline); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--baseline); stroke-width: 1; }
.chart-svg .line-series { fill: none; stroke: var(--series-1); stroke-width: 2; }
.chart-svg .area-series { fill: color-mix(in srgb, var(--series-1) 16%, transparent); stroke: none; }
.chart-svg .dot { fill: var(--series-1); }

.hover-crosshair {
  stroke: var(--baseline);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 8px 12px;
  font-size: 12.5px;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.08s;
  white-space: nowrap;
  z-index: 5;
}

.chart-tooltip .tt-value { font-weight: 700; }
.chart-tooltip .tt-label { color: var(--text-muted); }

.bar-list { display: flex; flex-direction: column; gap: 14px; }

.bar-row .bar-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.bar-row .bar-name {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.bar-row .bar-meta {
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 8px;
  background: var(--gridline);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--series-1), color-mix(in srgb, var(--series-1) 70%, var(--series-3)));
  border-radius: 4px;
  transition: width 1s cubic-bezier(.16,.84,.44,1);
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -2px;
}

.data-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: none; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state .icon { font-size: 28px; margin-bottom: 10px; }
.empty-state p { margin: 0; font-size: 14px; }

.skeleton {
  background: linear-gradient(90deg, var(--gridline) 25%, var(--border) 50%, var(--gridline) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.error-banner {
  background: color-mix(in srgb, var(--series-2) 12%, var(--surface-1));
  border: 1px solid color-mix(in srgb, var(--series-2) 35%, var(--border));
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ================= Premium layer ================= */

.scroll-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 100%;
  background: var(--brand-gradient);
  transform-origin: left;
  transform: scaleX(0);
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--series-1) 14%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.glass {
  background: color-mix(in srgb, var(--surface-raised) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lifted);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent);
  mask-image: linear-gradient(to bottom, black 55%, transparent);
}

/* word-by-word headline reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.w > span { display: inline-block; transform: translateY(110%); animation: word-up 0.9s cubic-bezier(.16,.84,.44,1) forwards; }
.w:nth-of-type(1) > span { animation-delay: 0.15s; }
.w:nth-of-type(2) > span { animation-delay: 0.23s; }
.w:nth-of-type(3) > span { animation-delay: 0.31s; }
.w:nth-of-type(4) > span { animation-delay: 0.39s; }
.w:nth-of-type(5) > span { animation-delay: 0.47s; }
.w:nth-of-type(6) > span { animation-delay: 0.55s; }
@keyframes word-up { to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .w > span { transform: none; animation: none; } }

.hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -0.03em; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.025em; line-height: 1.1; }
.section-head p { font-size: 17px; }

/* giant outlined marquee */
.bigmarquee {
  overflow: hidden;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.bm-track {
  display: flex; align-items: center; gap: 40px;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 116px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.bm-track span {
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text-primary) 38%, transparent);
}
.bm-track span.fill {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 0;
}
.bm-track i { font-style: normal; color: var(--series-1); font-size: 0.5em; }
@media (prefers-reduced-motion: reduce) { .bm-track { animation: none; } }

/* live numbers band */
.numbers { padding: 24px 0 8px; }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 24px;
  overflow: hidden;
}
.num-item { padding: 40px 32px; text-align: center; border-right: 1px solid var(--border); }
.num-item:last-child { border-right: none; }
.num-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.num-lab {
  margin-top: 10px;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .numbers-grid { grid-template-columns: 1fr; }
  .num-item { border-right: none; border-bottom: 1px solid var(--border); padding: 28px 20px; }
  .num-item:last-child { border-bottom: none; }
}

/* live replay demo */
.demo-panel { border-radius: 24px; padding: 18px 18px 14px; position: relative; overflow: hidden; }
.demo-panel::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 80%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--series-7) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.demo-hud { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 6px 12px; font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.hud-pill { display: inline-flex; align-items: center; gap: 7px; background: color-mix(in srgb, var(--series-1) 14%, transparent); color: var(--series-1); padding: 5px 12px; border-radius: 999px; font-weight: 800; letter-spacing: 0.05em; }
.hud-pill .rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #e34948; animation: pulse-dot 1.4s ease-in-out infinite; }
.hud-frame b { font-family: var(--font-display); color: var(--text-primary); font-variant-numeric: tabular-nums; display: inline-block; min-width: 4.5ch; }
.hud-rate { margin-left: auto; color: var(--text-muted); }
#demo-canvas { position: relative; display: block; width: 100%; height: 300px; }
.demo-caption { position: relative; margin: 8px 6px 0; font-size: 12px; color: var(--text-muted); }
@media (max-width: 640px) { #demo-canvas { height: 240px; } .hud-rate { margin-left: 0; } }

/* animated gradient border on feature cards */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.feature-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--series-1), var(--series-7), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s ease;
  animation: spin-ang 3.5s linear infinite;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }
@keyframes spin-ang { to { --ang: 360deg; } }

.feature-card { background: color-mix(in srgb, var(--surface-1) 80%, transparent); backdrop-filter: blur(10px); }
.feature-card h3 { font-size: 18px; letter-spacing: -0.01em; }

/* ================= Browse page + theme toggle ================= */

.theme-toggle {
  width: 36px; height: 36px; margin-right: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-secondary); cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
.theme-toggle:hover { background: var(--border); color: var(--text-primary); transform: rotate(25deg); }
.theme-toggle svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

.search-bar {
  display: flex; align-items: center; gap: 12px;
  border-radius: 18px; padding: 10px 10px 10px 18px; margin: 28px 0 32px;
}
.search-bar svg { width: 20px; height: 20px; stroke: var(--text-muted); fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.search-bar input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text-primary); font: 600 17px var(--font-body); padding: 10px 0;
}
.search-bar input::placeholder { color: var(--text-muted); font-weight: 500; }
.search-bar:focus-within { border-color: var(--series-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-1) 18%, transparent), var(--shadow-lifted); }

.results-head { align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.results-head h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.02em; }
.results-head .table-toggle { margin-left: auto; }

.macro-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 40px; }
@media (max-width: 760px) { .macro-grid { grid-template-columns: 1fr; } }
.macro-card { border-radius: 18px; padding: 20px; transition: transform 0.2s ease, border-color 0.2s ease; }
.macro-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.mc-title { min-width: 0; }
.mc-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-sub { font-size: 12.5px; color: var(--text-muted); }
.mc-dl { padding: 9px 18px; font-size: 13.5px; flex-shrink: 0; }
.mc-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--page); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 8px 8px 16px; font: 600 14px var(--font-body);
  transition: border-color 0.15s, transform 0.15s;
}
.chip:hover { border-color: var(--series-1); transform: translateY(-2px); }
.chip-count { background: var(--brand-gradient); color: #fff; border-radius: 999px; min-width: 26px; text-align: center; padding: 2px 8px; font-size: 12px; font-weight: 800; }

.latest-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  padding: 12px 6px; color: var(--text-primary); text-align: left; cursor: pointer; font: inherit;
  transition: background 0.15s;
}
.latest-row:last-child { border-bottom: none; }
.latest-row:hover { background: var(--surface-1); }
.latest-row .mr-btn { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

/* ================= Accessibility ================= */

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 10000;
  background: var(--series-1); color: #fff; font-weight: 700;
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--series-1);
  outline-offset: 3px;
  border-radius: 6px;
}
.search-bar input:focus-visible { outline: none; }
.btn:focus-visible, .chip:focus-visible, .theme-toggle:focus-visible { outline-offset: 2px; }

/* ================= Scroll-pinned story ================= */

.story { position: relative; height: 320vh; }
.story-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; width: 100%; }
.story-copy h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 32px; }
.story-copy { position: relative; }

.story-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.story-steps li {
  display: flex; gap: 18px; padding: 16px 18px; border-radius: 16px; cursor: pointer;
  border: 1px solid transparent; opacity: 0.42;
  transition: opacity 0.35s ease, background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}
.story-steps li b { font-family: var(--font-display); font-size: 14px; color: var(--series-1); padding-top: 4px; }
.story-steps li h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.story-steps li p { margin: 0; font-size: 14.5px; color: var(--text-secondary); max-width: 420px; }
.story-steps li.active { opacity: 1; background: var(--surface-1); border-color: var(--border); transform: translateX(6px); }

.story-progress { position: absolute; left: -22px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--gridline); overflow: hidden; }
.story-progress i { display: block; height: 100%; background: var(--brand-gradient); transform-origin: top; transform: scaleY(0); }

.story-stage { position: relative; border-radius: 26px; min-height: 380px; padding: 24px; overflow: hidden; }
.story-stage::before { content: ""; position: absolute; inset: -30% -20% auto; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--series-7) 16%, transparent), transparent 70%); pointer-events: none; }
.scene { position: absolute; inset: 24px; opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.16,.84,.44,1); pointer-events: none; display: flex; flex-direction: column; }
.scene.on { opacity: 1; transform: none; pointer-events: auto; }
.sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sc-meta { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.sc-foot { margin-top: auto; font-size: 13px; color: var(--text-muted); }

.tracks { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 20px; }
.track { position: relative; height: 22px; border-radius: 8px; background: color-mix(in srgb, var(--text-primary) 5%, transparent); }
.track i { position: absolute; top: 3px; bottom: 3px; left: var(--l); width: 0; border-radius: 5px; background: var(--brand-gradient); }
.scene.on .track i { animation: bar-grow 0.9s cubic-bezier(.16,.84,.44,1) forwards; }
.scene.on .track:nth-child(2) i { animation-delay: 0.15s; }
.scene.on .track:nth-child(3) i { animation-delay: 0.3s; }
.scene.on .track:nth-child(4) i { animation-delay: 0.45s; }
@keyframes bar-grow { to { width: var(--w); } }

.checks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; opacity: 0; transform: translateX(-12px); }
.checks svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: color-mix(in srgb, var(--good) 20%, transparent); stroke: var(--good); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.scene.on .checks li { animation: check-in 0.5s cubic-bezier(.16,.84,.44,1) forwards; }
.scene.on .checks li:nth-child(2) { animation-delay: 0.2s; }
.scene.on .checks li:nth-child(3) { animation-delay: 0.4s; }
.scene.on .checks li:nth-child(4) { animation-delay: 0.6s; }
.scene.on .checks li:nth-child(5) { animation-delay: 0.8s; }
@keyframes check-in { to { opacity: 1; transform: none; } }

.share-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; background: var(--surface-1); border: 1px solid var(--border); margin: 8px 0 20px; }
.sf-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-gradient); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sf-name { font-family: var(--font-display); font-weight: 700; }
.sf-sub { font-size: 12.5px; color: var(--text-muted); }
.sf-btn { margin-left: auto; padding: 9px 18px; font-size: 13.5px; }

/* aurora drift behind the hero */
.hero::after {
  width: 620px; height: 620px; top: -220px; right: -160px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--series-7) 18%, transparent), color-mix(in srgb, var(--series-3) 8%, transparent) 55%, transparent 72%);
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-120px, 70px) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; } }

@media (max-width: 900px) {
  .story { height: auto; padding: 24px 0; }
  .story-pin { position: static; height: auto; }
  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-progress { display: none; }
  .story-steps li { opacity: 1; }
  .story-steps li.active { transform: none; }
  .story-stage { min-height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
  .scene.on .track i { animation: none; width: var(--w); }
  .scene.on .checks li { animation: none; opacity: 1; transform: none; }
}

/* ================= Neon / Geometry Dash layer ================= */

/* perspective grid floor */
.grid-floor {
  position: absolute; left: -10%; right: -10%; bottom: -40px; height: 340px;
  z-index: 0; pointer-events: none; overflow: hidden;
  perspective: 420px;
  -webkit-mask-image: linear-gradient(to top, black 10%, transparent 85%);
  mask-image: linear-gradient(to top, black 10%, transparent 85%);
}
.grid-floor::before {
  content: ""; position: absolute; inset: -60% -10% 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--series-1) 55%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--series-7) 55%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: rotateX(62deg);
  transform-origin: 50% 100%;
  animation: grid-run 2.6s linear infinite;
}
@keyframes grid-run { to { background-position: 0 56px, 0 0; } }

/* floating neon cubes */
.cubes { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cubes i {
  position: absolute; width: var(--s); height: var(--s); left: var(--x); top: var(--y);
  border-radius: 22%;
  border: 2px solid var(--series-1);
  background: color-mix(in srgb, var(--series-1) 10%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--series-1) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--series-1) 35%, transparent);
  animation: cube-float var(--d) ease-in-out infinite alternate;
  opacity: 0.85;
}
.cubes i:nth-child(even) { border-color: var(--series-7); background: color-mix(in srgb, var(--series-7) 12%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--series-7) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--series-7) 35%, transparent); }
@keyframes cube-float {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-40px) rotate(90deg); }
}
@media (max-width: 980px) { .cubes i:nth-child(n+4) { display: none; } }

/* neon glow on gradient words */
.gradient-text { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--series-1) 55%, transparent)); }

/* spike divider */
.spikes {
  height: 28px; width: 100%;
  background: var(--brand-gradient);
  -webkit-mask-image: linear-gradient(135deg, #000 25%, transparent 25%), linear-gradient(225deg, #000 25%, transparent 25%);
  mask-image: linear-gradient(135deg, #000 25%, transparent 25%), linear-gradient(225deg, #000 25%, transparent 25%);
  -webkit-mask-size: 28px 28px; mask-size: 28px 28px;
  -webkit-mask-position: -14px 0, -14px 0; mask-position: -14px 0, -14px 0;
  transform: scaleY(-1);
  opacity: 0.9;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--series-1) 45%, transparent));
}

/* scanlines on the demo panel */
.demo-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 3px 4px);
}

/* neon edge on primary buttons */
.btn-primary { box-shadow: 0 0 0 1px color-mix(in srgb, #fff 18%, transparent) inset, 0 6px 22px color-mix(in srgb, var(--series-1) 55%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .grid-floor::before, .cubes i { animation: none; }
}

/* ================= Legal pages ================= */

.legal { padding-bottom: 40px; }
.legal > * { max-width: 760px; }
.legal-lead { font-size: 18px; line-height: 1.65; color: var(--text-secondary); margin: 28px 0 8px; }
.legal h2 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -0.02em; margin: 44px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.legal h3 { font-size: 16px; margin: 22px 0 6px; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text-secondary); font-size: 15.5px; line-height: 1.7; }
.legal ul { padding-left: 22px; margin: 8px 0 12px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text-primary); }
.legal a { color: var(--series-1); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font-size: 13px; background: var(--surface-1); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.legal-note { margin-top: 36px; font-size: 14px; }
.contact-placeholder { background: color-mix(in srgb, var(--series-4) 22%, transparent); padding: 1px 8px; border-radius: 6px; font-weight: 600; }

footer .bottom-row a { color: var(--text-secondary); text-decoration: none; font-weight: 600; }
footer .bottom-row a:hover { color: var(--text-primary); }

/* ================= Cookie notice ================= */

.cookie-notice {
  position: fixed; left: 50%; bottom: 20px; z-index: 10001;
  width: min(680px, calc(100% - 32px));
  display: flex; align-items: center; gap: 18px;
  padding: 14px 14px 14px 20px; border-radius: 18px;
  transform: translate(-50%, 24px); opacity: 0;
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  transition: transform 0.45s cubic-bezier(.16,.84,.44,1), opacity 0.35s ease;
}
.cookie-notice.show { transform: translate(-50%, 0); opacity: 1; }
.cn-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.cn-text strong { color: var(--text-primary); }
.cn-text a { color: var(--series-1); text-decoration: underline; text-underline-offset: 3px; }
.cn-btn { padding: 10px 20px; font-size: 14px; flex-shrink: 0; }
@media (max-width: 560px) { .cookie-notice { flex-direction: column; align-items: stretch; gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .cookie-notice { transition: none; } }

/* ================= Legal history ================= */

.jump-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; }
.jump-links a { text-decoration: none !important; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-primary) !important; }
.jump-links a:hover { background: var(--border); }

.versions { list-style: none; margin: 16px 0 0; padding: 0 0 0 26px; position: relative; }
.versions::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--gridline); border-radius: 2px; }
.version { position: relative; background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; }
.version::before { content: ""; position: absolute; left: -26px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-1); border: 2px solid var(--baseline); }
.version.current::before { border-color: var(--series-1); background: var(--series-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-1) 20%, transparent); }
.v-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.v-num { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text-primary); }
.v-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--series-1); background: color-mix(in srgb, var(--series-1) 14%, transparent); padding: 3px 10px; border-radius: 999px; }
.v-date { margin-left: auto; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.legal .v-summary { color: var(--text-primary); font-weight: 600; margin: 0 0 8px; }
.diff { display: grid; gap: 10px; margin-top: 14px; }
.diff > div { font-size: 14.5px; line-height: 1.6; padding: 12px 14px; border-radius: 12px; color: var(--text-secondary); }
.diff .was { background: color-mix(in srgb, var(--series-2) 10%, transparent); border: 1px solid color-mix(in srgb, var(--series-2) 30%, transparent); }
.diff .now { background: color-mix(in srgb, var(--good) 9%, transparent); border: 1px solid color-mix(in srgb, var(--good) 28%, transparent); }
.diff .tag { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; color: var(--text-muted); }
.legal .version-line { font-size: 14px; color: var(--text-muted); margin: 6px 0 0; }
.legal .version-line a { font-weight: 600; }

/* ================= Full-text versions ================= */

.version details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.version details > summary::-webkit-details-marker { display: none; }
.v-toggle { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--series-1); }
.v-toggle::after { content: " \25BE"; }
.version details[open] .v-toggle::after { content: " \25B4"; }
.version details[open] > summary { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.v-date { margin-left: 0; }
.doc { max-width: 720px; }
.doc .doc-title { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); font-size: 15px; margin: 0 0 6px; }
.legal .doc > * { max-width: none; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; padding-top: 0; border-top: none; letter-spacing: -0.01em; }
.doc h4 { font-size: 15px; margin: 18px 0 4px; }
.doc .legal-lead { font-size: 15.5px; margin: 6px 0 4px; }
.doc .legal-note { margin-top: 22px; }
