/* Kivaeno Web — Design Tokens & Editorial Layout
 * Matched 1:1 with kivaeno_mobile/lib/core/theme/app_theme.dart
 */

:root,
html[data-theme="dark"] {
  --bg: #0E111A;
  --surface: #151922;
  --elevated: #1E2433;
  --header-bg: rgba(14, 17, 26, 0.82);
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --primary: #38BDF8;
  --primary-strong: #0284C7;
  --primary-contrast: #0E111A;
  --primary-soft: rgba(56, 189, 248, 0.12);
  --primary-border: rgba(56, 189, 248, 0.28);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.30);

  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --warning-border: rgba(251, 191, 36, 0.30);

  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --danger-border: rgba(248, 113, 113, 0.30);

  --indigo: #818CF8;
  --teal: #2DD4BF;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --elevated: #F1F5F9;
  --header-bg: rgba(248, 250, 252, 0.88);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --primary: #0077B6;
  --primary-strong: #0284C7;
  --primary-contrast: #FFFFFF;
  --primary-soft: rgba(0, 119, 182, 0.08);
  --primary-border: rgba(0, 119, 182, 0.24);

  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  --success: #15803D;
  --success-soft: rgba(21, 128, 61, 0.08);
  --success-border: rgba(21, 128, 61, 0.24);

  --warning: #B45309;
  --warning-soft: rgba(180, 83, 9, 0.08);
  --warning-border: rgba(180, 83, 9, 0.25);

  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --danger-border: rgba(220, 38, 38, 0.24);

  --indigo: #4F46E5;
  --teal: #0F766E;

  --shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 22px 54px rgba(15, 23, 42, 0.09);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.16s ease, opacity 0.16s ease;
}

a:hover {
  text-decoration: underline;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

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

.nav-links a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 17, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

html[data-theme="light"] .lang-switch {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.08);
}

.lang-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.lang-btn[aria-pressed="true"] {
  background: #1B2333;
  border-color: rgba(255, 255, 255, 0.16);
  color: #F8FAFC;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .lang-btn[aria-pressed="true"] {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  background: var(--elevated);
  border-color: var(--primary-border);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-sun {
  display: none;
}

.nav-toggle {
  display: none;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 20px 18px;
}

.mobile-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-drawer a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer a:last-child {
  border-bottom: 0;
}

/* Buttons & Badges */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #161B26;
  border-color: rgba(255, 255, 255, 0.14);
  color: #F8FAFC;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-primary:hover {
  background: #1C2332;
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.14), 0 0 0 3px rgba(56, 189, 248, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .btn-primary {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .btn-primary:hover {
  background: #FFFFFF;
  border-color: rgba(2, 132, 199, 0.34);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.14), 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-outline {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--elevated);
}

.btn-coming-soon {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.pill-muted {
  background: var(--elevated);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.pill-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success-border);
}

/* Scrollytelling Backdrop & Layering (scoped strictly to landing page) */
body[data-page="home"] {
  overflow-x: clip;
  --glass-surface: rgba(21, 25, 34, 0.72);
  --glass-elevated: rgba(30, 36, 51, 0.68);
  --glass-specular: rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] body[data-page="home"] {
  --glass-surface: rgba(255, 255, 255, 0.92);
  --glass-elevated: rgba(241, 245, 249, 0.90);
  --glass-specular: rgba(255, 255, 255, 0.98);
}

body[data-page="home"] main,
body[data-page="home"] .site-footer {
  position: relative;
  z-index: 2;
}

body[data-page="home"] .site-footer {
  background: var(--glass-surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.bg-motion-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-motion-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 44%, rgba(56, 189, 248, 0.20) 0%, rgba(14, 17, 26, 0.24) 40%, rgba(14, 17, 26, 0.96) 76%),
    linear-gradient(135deg, #0E111A 0%, #111828 55%, #090D16 100%);
}

html[data-theme="light"] .bg-motion-backdrop {
  background:
    radial-gradient(circle at 72% 46%, rgba(14, 165, 233, 0.07) 0%, rgba(241, 245, 249, 0.45) 42%, #F8FAFC 76%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.bg-motion-transform {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
  transition: opacity 0.28s ease;
}

.bg-motion-transform.is-swapping {
  opacity: 0 !important;
}

.bg-motion-transform model-viewer {
  width: 100%;
  height: 100%;
  display: block;
  --poster-color: transparent;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.bg-motion-transform model-viewer.is-material-ready {
  opacity: 1;
}

.bg-motion-transform model-viewer[hidden] {
  display: none;
}

.bg-motion-scrim {
  --veil-opacity: 0;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 17, 26, 0.90) 0%, rgba(14, 17, 26, 0.62) 44%, rgba(14, 17, 26, 0.08) 100%),
    rgba(14, 17, 26, var(--veil-opacity));
}

html[data-theme="light"] .bg-motion-scrim {
  background: transparent;
}

/* Hero Section — Monumental 100svh Monograph (zero fake personal data) */
.hero {
  min-height: calc(100svh - 68px);
  padding: 56px 0 36px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
}

.hero-editorial {
  max-width: 560px;
  margin-block: auto;
}

.mono-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
}

.hero-title {
  margin: 20px 0 18px;
  font-size: clamp(2.65rem, 5.4vw, 4.45rem);
  line-height: 1.01;
  letter-spacing: -0.035em;
  font-weight: 700;
  display: flex;
  flex-direction: column;
}

.hero-title-line1 {
  color: var(--text-primary);
}

.hero-title-line2 {
  background: linear-gradient(120deg, var(--primary) 0%, #7DD3FC 55%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .hero-title-line2 {
  background: linear-gradient(120deg, var(--primary) 0%, #0284C7 55%, #0F172A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 50ch;
}

/* Hero Bottom Hairline Manifesto Strip */
.hero-manifesto {
  padding-top: 22px;
  border-top: 1px solid var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
}

.manifesto-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
}

.manifesto-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manifesto-item strong {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.manifesto-item span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.scroll-cue:hover {
  color: var(--primary);
  text-decoration: none;
}

.scroll-cue-line {
  width: 28px;
  height: 1px;
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.specimen-plate {
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #EDF2F8 100%);
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

html[data-theme="light"] .specimen-plate {
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #EDF2F8 100%);
  border-color: rgba(15, 23, 42, 0.10);
}

.specimen-plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sections */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

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

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

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

.bento-card {
  background: var(--glass-surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-strong);
  border-top-color: var(--glass-specular);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
}

.bento-wide {
  grid-column: span 7;
}

.bento-narrow {
  grid-column: span 5;
}

.bento-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.bento-meta .card-icon {
  margin-bottom: 0;
}

.spec-index {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
}

.bento-viz {
  width: 190px;
  height: 52px;
  color: var(--primary);
  opacity: 0.92;
  flex-shrink: 0;
}

.bento-viz--compact {
  width: 110px;
}

.bento-viz svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Strictly Non-Interactive MP4-Style Biomechanical Cinema Reel */
.cinema-reel {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--border-strong);
  border-top-color: var(--glass-specular);
  border-radius: 28px;
  padding: 22px 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cinema-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cinema-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
}

.cinema-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.cinema-reel.is-playing .cinema-dot {
  animation: cinemaPulse 1.8s ease-in-out infinite;
}

@keyframes cinemaPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.cinema-scope-tag {
  color: var(--text-secondary);
}

.cinema-counter {
  color: var(--text-primary);
  font-weight: 600;
}

.cinema-stage {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) 96px minmax(0, 1.55fr);
  gap: 0;
  align-items: center;
}

.cinema-anatomy-zone {
  padding-right: 6px;
}

.anatomy-scan-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--glass-elevated);
  border: 1px solid var(--border);
  padding: 14px 10px;
}

.anatomy-scan-beam {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 16%;
  top: -18%;
  background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.18) 55%, transparent 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.45);
  z-index: 2;
}

html[data-theme="light"] .anatomy-scan-beam {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 119, 182, 0.12) 55%, transparent 100%);
  border-bottom-color: rgba(0, 119, 182, 0.35);
}

.cinema-reel.is-playing .anatomy-scan-beam {
  display: block;
  animation: scanSweep 3.4s linear infinite;
}

@keyframes scanSweep {
  0% {
    top: -18%;
  }
  100% {
    top: 105%;
  }
}

.anatomy-map-host {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anatomy-svg {
  width: 100%;
  max-width: 196px;
  height: auto;
  max-height: 330px;
  display: block;
}

.anatomy-svg .body-outline {
  fill: rgba(148, 163, 184, 0.13);
  stroke: rgba(148, 163, 184, 0.42);
  stroke-width: 0.55;
}

html[data-theme="light"] .anatomy-svg .body-outline {
  fill: rgba(15, 23, 42, 0.06);
  stroke: rgba(15, 23, 42, 0.24);
}

.anatomy-svg .anatomy-details {
  fill: none;
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 0.32;
}

html[data-theme="light"] .anatomy-svg .anatomy-details {
  stroke: rgba(15, 23, 42, 0.22);
}

.anatomy-svg .muscle-path {
  fill: rgba(148, 163, 184, 0.22);
  stroke: rgba(15, 23, 42, 0.45);
  stroke-width: 0.26;
  transition: fill 0.5s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.35s ease, filter 0.5s ease;
}

html[data-theme="light"] .anatomy-svg .muscle-path {
  fill: rgba(100, 116, 139, 0.20);
  stroke: rgba(15, 23, 42, 0.26);
}

.anatomy-svg .muscle-path.is-active {
  fill: var(--primary);
  stroke: var(--text-primary);
  stroke-width: 0.55;
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.72));
}

html[data-theme="light"] .anatomy-svg .muscle-path.is-active {
  fill: var(--primary);
  stroke: #0F172A;
  filter: drop-shadow(0 0 4px rgba(0, 119, 182, 0.38));
}

/* Autonomous Probe Reticle & Double Pulse */
.anatomy-reticle {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.anatomy-reticle .reticle-ring {
  fill: none;
  stroke: var(--primary);
  stroke-width: 0.75;
  stroke-dasharray: 2.4 1.6;
}

.anatomy-reticle .reticle-cross {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 0.55;
  stroke-linecap: round;
}

.anatomy-reticle .reticle-core {
  fill: var(--primary);
}

.anatomy-reticle .reticle-ripple {
  fill: none;
  stroke: var(--primary);
  stroke-width: 0.85;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.anatomy-reticle.is-pulsing .reticle-ripple--outer {
  animation: reticleWave 1.25s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

.anatomy-reticle.is-pulsing .reticle-ripple--inner {
  animation: reticleWave 1.25s cubic-bezier(0.16, 1, 0.3, 1) 0.16s 1;
}

@keyframes reticleWave {
  0% {
    opacity: 0.95;
    transform: scale(0.75);
  }
  100% {
    opacity: 0;
    transform: scale(3.4);
  }
}

/* Center Animated Connector Line */
.cinema-connector {
  height: 330px;
  display: flex;
  align-items: center;
}

.reel-connector-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.connector-track {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.connector-beam {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-dasharray: 180;
  stroke-dashoffset: 0;
}

.connector-beam.is-drawing {
  animation: connectorDraw 0.65s cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

@keyframes connectorDraw {
  from {
    stroke-dashoffset: 180;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.connector-node {
  fill: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary));
}

/* Right Exercise Spotlight Stage */
.cinema-spotlight-zone {
  display: grid;
  grid-template-columns: minmax(220px, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: center;
  padding-left: 4px;
}

.cinema-plate {
  padding: 18px;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(0, 0, 0, 0.24);
}

#spotlight-img {
  transition: opacity 0.18s ease, transform 0.28s ease;
}

.cinema-reel.is-playing #spotlight-img {
  animation: kenBurns 6.8s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.045);
  }
}

#spotlight-img.is-fading {
  opacity: 0.15;
  transform: scale(0.96) !important;
}

.cinema-pattern {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.cinema-ex-title {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.spotlight-muscles {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.spotlight-cue {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.cinema-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cinema-spec-chip {
  background: var(--glass-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.cinema-spec-chip span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.cinema-spec-chip strong {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Non-Interactive Bottom Film Timeline */
.cinema-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 6px;
}

.timeline-seg {
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.timeline-seg.is-current {
  opacity: 1;
}

.timeline-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-seg.is-current .timeline-label {
  color: var(--primary);
  font-weight: 600;
}

.timeline-track {
  height: 3px;
  border-radius: 999px;
  background: var(--border-strong);
  overflow: hidden;
}

.timeline-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--primary);
}

.timeline-seg.is-current .timeline-fill {
  width: 100%;
}

.cinema-reel.is-playing .timeline-seg.is-current .timeline-fill {
  width: 0%;
  animation: timelineFill 3.4s linear 1 forwards;
}

@keyframes timelineFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* Privacy Trust Strip */
.trust-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.metric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
}

.metric-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.trust-links-box {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.trust-link-row:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  text-decoration: none;
}

/* Plans */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-card--featured {
  border-color: var(--primary-border);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 38%);
}

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

.plan-title {
  margin: 0;
  font-size: 1.25rem;
}

.plan-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.plan-check {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.plans-footnote {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 20px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Legal Document Layout (/privacy, /terms, /delete-account) */
.doc-hero {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
}

.doc-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.doc-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.doc-lead {
  margin: 0;
  color: var(--text-secondary);
  max-width: 72ch;
}

.doc-meta-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  padding: 34px 0 64px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.doc-toc-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
}

.doc-toc nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-toc a {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.35;
  padding: 5px 8px;
  border-radius: 8px;
}

.doc-toc a:hover {
  background: var(--elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.doc-main {
  max-width: 820px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.doc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  scroll-margin-top: 86px;
}

.doc-section h2 {
  margin: 0 0 12px;
  font-size: 1.24rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.doc-section h3 {
  margin: 18px 0 8px;
  font-size: 1.02rem;
}

.doc-section p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.doc-section p:last-child {
  margin-bottom: 0;
}

.doc-section ul,
.doc-section ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.doc-section li {
  margin-bottom: 6px;
}

.doc-section strong {
  color: var(--text-primary);
}

/* Callouts & Identity Banner */
.callout {
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  margin: 12px 0;
}

.callout--warning {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.callout--danger {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.callout--success {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.callout-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.callout p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.identity-banner {
  background: var(--surface);
  border: 1px solid var(--primary-border);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.identity-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity-left img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.identity-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.identity-kv strong {
  color: var(--text-primary);
}

/* Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 12px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 520px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--elevated);
  color: var(--text-primary);
  font-weight: 600;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-delete {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.status-retain {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.step-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.step-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.step-card p {
  margin: 0;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 36px;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.85fr));
  gap: 28px;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-primary);
}

.footer-disclaimer {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  max-width: 50ch;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Glassmorphism Polish for Home Sections */
body[data-page="home"] .trust-panel,
body[data-page="home"] .plan-card,
body[data-page="home"] .faq-item {
  background: var(--glass-surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

body[data-page="home"] .plan-card--featured {
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--glass-surface) 42%);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .trust-panel {
    grid-template-columns: 1fr;
  }

  .cinema-stage {
    grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.35fr);
    gap: 20px;
  }

  .cinema-connector {
    display: none;
  }

  .cinema-spotlight-zone {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .bento-wide,
  .bento-narrow {
    grid-column: span 6;
  }

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

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

  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    position: static;
  }

  .doc-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
    padding: 40px 0 44px;
  }

  .cinema-reel {
    padding: 18px;
  }

  .cinema-stage,
  .bento-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .step-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cinema-anatomy-zone {
    padding-right: 0;
  }

  .cinema-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .bento-wide,
  .bento-narrow {
    grid-column: span 1;
  }

  .bento-viz {
    display: none;
  }

  .doc-section {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .container {
    padding-inline: 16px;
  }

  .header-inner {
    gap: 8px;
  }

  .brand span {
    font-size: 1rem;
  }

  .cinema-specs {
    grid-template-columns: 1fr;
  }

  .manifesto-stats {
    gap: 14px 28px;
  }
}

/* 2026 Smooth Scroll, Scroll-Driven Motion & Interactive Navigation (Home Only) */
body[data-page="home"] .section {
  scroll-margin-top: 84px;
  position: relative;
  border-top-color: transparent;
}

body[data-page="home"] #hero {
  scroll-margin-top: 72px;
}

body[data-page="home"] .site-header {
  transition: background-color 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

body[data-page="home"] .header-inner {
  transition: min-height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="home"] .site-header.is-scrolled {
  background: rgba(14, 17, 26, 0.90);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] body[data-page="home"] .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body[data-page="home"] .site-header.is-scrolled .header-inner {
  min-height: 60px;
}

.scroll-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: linear-gradient(90deg, var(--primary-strong) 0%, var(--primary) 65%, #7DD3FC 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
  will-change: transform;
}

html[data-theme="light"] .scroll-progress-bar {
  background: linear-gradient(90deg, #0077B6 0%, #38BDF8 100%);
  box-shadow: none;
}

/* Magnetic Sliding Nav Indicator */
body[data-page="home"] .nav-links {
  position: relative;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
}

body[data-page="home"] .nav-links a {
  position: relative;
  z-index: 1;
  padding: 7px 13px;
  border-radius: 999px;
  transition: color 0.22s ease;
}

body[data-page="home"] .nav-links a.is-active {
  color: var(--primary);
  font-weight: 600;
}

body[data-page="home"] .nav-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--nav-x, 0px), 0, 0);
  width: var(--nav-w, 0px);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
  will-change: transform, width;
}

body[data-page="home"] .nav-indicator.is-visible {
  opacity: 1;
}

/* Desktop Floating Chapter Rail */
.chapter-rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-rail-active .chapter-rail {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(14px, -50%, 0);
}

.rail-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 2px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.22s ease;
}

.rail-dot:hover,
.rail-dot:focus-visible {
  color: var(--text-primary);
  text-decoration: none;
}

.rail-dot.is-active {
  color: var(--primary);
}

.rail-index {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.55;
  transition: opacity 0.22s ease, color 0.22s ease;
}

.rail-dot.is-active .rail-index,
.rail-dot:hover .rail-index,
.rail-dot:focus-visible .rail-index {
  opacity: 1;
}

.rail-pip {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-muted);
  opacity: 0.55;
  transition:
    width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.24s ease,
    opacity 0.24s ease,
    box-shadow 0.24s ease;
}

.rail-dot:hover .rail-pip,
.rail-dot:focus-visible .rail-pip {
  opacity: 0.95;
  background: var(--primary);
}

.rail-dot.is-active .rail-pip {
  width: 22px;
  opacity: 1;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
}

html[data-theme="light"] .rail-dot.is-active .rail-pip {
  box-shadow: 0 0 8px rgba(0, 119, 182, 0.28);
}

.rail-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translate3d(8px, -50%, 0);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--glass-surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.rail-dot:hover .rail-label,
.rail-dot:focus-visible .rail-label {
  opacity: 1;
  transform: translate3d(0, -50%, 0);
}

@media (max-width: 1239px) {
  .chapter-rail {
    display: none;
  }
}

/* Hero Staggered Entrance, Scroll Parallax & Scroll Cue Pulse */
@keyframes heroRevealUp {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

body[data-page="home"] .hero-editorial > * {
  animation: heroRevealUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-page="home"] .hero-editorial > *:nth-child(1) {
  animation-delay: 0.04s;
}

body[data-page="home"] .hero-editorial > *:nth-child(2) {
  animation-delay: 0.115s;
}

body[data-page="home"] .hero-editorial > *:nth-child(3) {
  animation-delay: 0.19s;
}

body[data-page="home"] .hero-editorial > *:nth-child(4) {
  animation-delay: 0.265s;
}

body[data-page="home"] .hero-manifesto {
  animation: heroRevealUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

body[data-page="home"] #hero {
  --hero-scroll: 0;
}

body[data-page="home"] #hero .hero-editorial {
  transform: translate3d(0, calc(var(--hero-scroll, 0) * -32px), 0);
  opacity: calc(1 - var(--hero-scroll, 0) * 0.72);
  will-change: transform, opacity;
}

body[data-page="home"] #hero .hero-manifesto {
  transform: translate3d(0, calc(var(--hero-scroll, 0) * -16px), 0);
  opacity: calc(1 - var(--hero-scroll, 0) * 0.85);
}

@keyframes cueSweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(220%);
  }
}

body[data-page="home"] .scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 55%;
  background: linear-gradient(90deg, transparent, #FFFFFF, transparent);
  animation: cueSweep 2.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

html[data-theme="light"] body[data-page="home"] .scroll-cue-line::after {
  background: linear-gradient(90deg, transparent, #38BDF8, transparent);
}

/* Scroll-Driven Section Dividers (2026 Native CSS Scroll Timeline + Clean Fallback) */
body[data-page="home"] .section-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1140px, calc(100% - 40px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0%, var(--primary-border) 30%, var(--primary) 50%, var(--primary-border) 70%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

@supports (animation-timeline: view()) {
  @keyframes dividerSweep {
    from {
      transform: translateX(-50%) scaleX(0.08);
      opacity: 0.15;
    }
    to {
      transform: translateX(-50%) scaleX(1);
      opacity: 0.85;
    }
  }

  body[data-page="home"] .section-divider {
    animation: dividerSweep linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 36%;
  }
}

/* Progressive-Enhancement Staggered Scroll Reveals & Bento SVG Draw */
html.has-scroll-anim body[data-page="home"] [data-reveal="up"] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

html.has-scroll-anim body[data-page="home"] [data-reveal="scale"] {
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.975);
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.76s cubic-bezier(0.22, 1, 0.36, 1);
}

html.has-scroll-anim body[data-page="home"] [data-reveal][data-reveal-delay="1"] {
  transition-delay: 70ms;
}

html.has-scroll-anim body[data-page="home"] [data-reveal][data-reveal-delay="2"] {
  transition-delay: 140ms;
}

html.has-scroll-anim body[data-page="home"] [data-reveal][data-reveal-delay="3"] {
  transition-delay: 210ms;
}

html.has-scroll-anim body[data-page="home"] [data-reveal][data-reveal-delay="4"] {
  transition-delay: 280ms;
}

html.has-scroll-anim body[data-page="home"] [data-reveal][data-reveal-delay="5"] {
  transition-delay: 350ms;
}

html.has-scroll-anim body[data-page="home"] [data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

html.has-scroll-anim body[data-page="home"] .bento-viz path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  transition: stroke-dashoffset 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
}

html.has-scroll-anim body[data-page="home"] .bento-card.is-revealed .bento-viz path {
  stroke-dashoffset: 0;
}

/* Desktop Pointer Specular Card Spotlight Glow */
@media (hover: hover) and (pointer: fine) {
  body[data-page="home"] [data-spotlight-card] {
    position: relative;
    overflow: hidden;
  }

  body[data-page="home"] [data-spotlight-card]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
      340px circle at var(--spot-x, 50%) var(--spot-y, 50%),
      rgba(56, 189, 248, 0.14) 0%,
      rgba(56, 189, 248, 0.04) 42%,
      transparent 72%
    );
    transition: opacity 0.28s ease;
    z-index: 0;
  }

  html[data-theme="light"] body[data-page="home"] [data-spotlight-card]::before {
    background: radial-gradient(
      340px circle at var(--spot-x, 50%) var(--spot-y, 50%),
      rgba(0, 119, 182, 0.10) 0%,
      rgba(0, 119, 182, 0.03) 42%,
      transparent 72%
    );
  }

  body[data-page="home"] [data-spotlight-card] > * {
    position: relative;
    z-index: 1;
  }

  body[data-page="home"] [data-spotlight-card]:hover::before {
    opacity: 1;
  }
}

/* Smooth FAQ Accordion Chevron & Reveal */
body[data-page="home"] .faq-item summary::after {
  content: "+";
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

body[data-page="home"] .faq-item[open] summary::after {
  content: "+";
  transform: rotate(45deg);
}

body[data-page="home"] .faq-body-wrap {
  overflow: hidden;
}

/* Scroll-Printed Editorial Word/Clip Reveal */
.print-word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.print-word {
  display: inline-block;
}

html.has-scroll-anim body[data-page="home"] [data-print-reveal] .print-word {
  opacity: 0;
  transform: translate3d(0, 108%, 0);
  transition:
    opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--w-idx, 0) * 42ms);
}

html.has-scroll-anim body[data-page="home"] [data-print-reveal].is-printed .print-word {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Sticky Vertical-to-Horizontal Architecture Card Rail */
body[data-page="home"] .rail-section {
  --rail-progress: 0;
  --rail-x: 0px;
  --rail-vel: 0;
}

body[data-page="home"] .rail-pin {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body[data-page="home"] .rail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}

body[data-page="home"] .rail-head .section-header {
  margin-bottom: 0;
}

body[data-page="home"] .rail-meta-readout {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-strong);
}

body[data-page="home"] .rail-hint {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body[data-page="home"] .rail-counter {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
}

body[data-page="home"] .rail-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-radius: 18px;
  background: var(--glass-surface);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1.5px solid var(--border-strong);
  border-top-color: var(--glass-specular);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

html[data-theme="light"] body[data-page="home"] .rail-card {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.14);
  border-top-color: rgba(15, 23, 42, 0.14);
}

body[data-page="home"] .rail-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
}

body[data-page="home"] .rail-plate {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px),
    var(--elevated);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

html[data-theme="light"] body[data-page="home"] .rail-plate {
  background:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    #F8FAFC;
  background-size: 24px 24px, 24px 24px, 100% 100%;
  border-color: rgba(15, 23, 42, 0.10);
}

body[data-page="home"] .rail-plate-num {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 2;
}

body[data-page="home"] .rail-plate-svg {
  width: 86%;
  height: auto;
  transform: translate3d(
    calc((var(--rail-progress, 0) - 0.5) * -22px + var(--rail-vel, 0) * -6px),
    0,
    0
  );
  will-change: transform;
}

html.has-scroll-anim body[data-page="home"] .rail-draw-path {
  stroke-dasharray: 380;
  stroke-dashoffset: 380;
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1) 0.16s;
}

html.has-scroll-anim body[data-page="home"] .rail-card.is-revealed .rail-draw-path {
  stroke-dashoffset: 0;
}

body[data-page="home"] .rail-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

body[data-page="home"] .rail-card-body p {
  margin: 0;
  font-size: 0.935rem;
  line-height: 1.58;
  color: var(--text-secondary);
}

body[data-page="home"] .rail-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="home"] .rail-card-tag {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body[data-page="home"] .rail-card-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

body[data-page="home"] .rail-meter {
  width: 100%;
  height: 2px;
  background: var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
}

body[data-page="home"] .rail-meter-fill {
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform-origin: 0 50%;
  transform: scaleX(var(--rail-progress, 0));
  will-change: transform;
}

@media (min-width: 960px) {
  body[data-page="home"] .rail-section {
    height: 290svh;
    padding: 0;
  }

  body[data-page="home"] .rail-pin {
    position: sticky;
    top: 0;
    height: 100svh;
    justify-content: center;
    gap: clamp(18px, 2.5vh, 30px);
    padding-top: 74px;
    padding-bottom: 24px;
  }

  body[data-page="home"] .rail-viewport {
    width: 100%;
    overflow: hidden;
  }

  body[data-page="home"] .rail-track {
    display: flex;
    align-items: stretch;
    gap: clamp(18px, 2vw, 26px);
    padding-inline: max(20px, calc((100vw - 1180px) / 2 + 20px));
    width: max-content;
    transform: translate3d(var(--rail-x, 0px), 0, 0);
    will-change: transform;
  }

  body[data-page="home"] .rail-card {
    flex: 0 0 clamp(320px, 29vw, 392px);
  }
}

@media (max-width: 959px) {
  body[data-page="home"] .rail-section {
    height: auto;
    padding: 56px 0;
  }

  body[data-page="home"] .rail-pin {
    position: static;
    height: auto;
  }

  body[data-page="home"] .rail-viewport {
    width: 100%;
    overflow: visible;
  }

  body[data-page="home"] .rail-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 20px;
    transform: none !important;
  }

  body[data-page="home"] .rail-meta-readout,
  body[data-page="home"] .rail-foot {
    display: none;
  }
}

@media (max-width: 680px) {
  body[data-page="home"] .rail-track {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  body[data-page="home"] .rail-track {
    padding-inline: 16px;
  }
}

/* Oversized Superdesign-Style Editorial Footer (Home) */
body[data-page="home"] .editorial-footer {
  padding: clamp(56px, 7vw, 96px) 0 36px;
  border-top: 1.5px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-page="home"] .editorial-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto;
  align-items: end;
  gap: 36px 56px;
}

body[data-page="home"] .editorial-wordmark {
  display: inline-block;
  font-size: clamp(3.35rem, 10.2vw, 8.8rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

body[data-page="home"] .editorial-wordmark:hover {
  text-decoration: none;
  opacity: 0.92;
}

body[data-page="home"] .wordmark-dot {
  color: var(--primary);
}

body[data-page="home"] .editorial-motto {
  margin: 14px 0 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.88rem, 1.25vw, 1.04rem);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

body[data-page="home"] .editorial-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(156px, auto));
  gap: 24px 48px;
  padding-bottom: 6px;
}

body[data-page="home"] .editorial-footer-meta {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

body[data-page="home"] .editorial-copy {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

body[data-page="home"] .editorial-disclaimer {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 74ch;
}

@media (max-width: 960px) {
  body[data-page="home"] .editorial-footer-main {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 560px) {
  body[data-page="home"] .editorial-wordmark {
    font-size: clamp(2.9rem, 15.2vw, 4.6rem);
  }

  body[data-page="home"] .editorial-footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 400px) {
  body[data-page="home"] .editorial-footer-cols {
    grid-template-columns: 1fr;
  }
}

/* Pure Non-Interactive AI Coach → Workout Manager Reel (#ai-transfer) */
body[data-page="home"] .transfer-reel {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

body[data-page="home"] .transfer-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1.06fr);
  align-items: stretch;
  gap: 10px;
}

body[data-page="home"] .app-frame {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.32s ease, opacity 0.35s ease;
}

body[data-page="home"] .transfer-reel.is-resetting .transfer-stage-grid {
  opacity: 0.25;
  transition: opacity 0.32s ease;
}

body[data-page="home"] .app-frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

body[data-page="home"] .app-bar-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-page="home"] .app-frame-title {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

/* Left Panel — Chat Viewport */
body[data-page="home"] .app-chat-body {
  position: relative;
  min-height: 296px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-page="home"] .app-msg {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="home"] .app-msg.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body[data-page="home"] .app-msg--user {
  align-self: flex-end;
  max-width: 88%;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 13px;
}

body[data-page="home"] .app-msg--user p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-primary);
}

body[data-page="home"] .app-thinking {
  display: none;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 9px 13px;
  border-radius: 14px;
  background: var(--elevated);
  border: 1px solid var(--border);
}

body[data-page="home"] .app-thinking.is-active {
  display: inline-flex;
}

body[data-page="home"] .app-thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: thinkingBounce 0.9s ease-in-out infinite;
}

body[data-page="home"] .app-thinking span:nth-child(2) {
  animation-delay: 0.16s;
}

body[data-page="home"] .app-thinking span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes thinkingBounce {
  0%, 80%, 100% { opacity: 0.32; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

body[data-page="home"] .app-msg--ai {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-page="home"] .app-ai-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 13px;
}

body[data-page="home"] .app-ai-intro {
  margin: 0 0 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-primary);
}

body[data-page="home"] .app-ai-list {
  margin: 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

body[data-page="home"] .app-ai-actions {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

/* Signature Mobile Full-Pill Button + Concentric Tap Reticle */
body[data-page="home"] .app-transfer-pill-wrap {
  position: relative;
  align-self: flex-start;
  max-width: 100%;
}

body[data-page="home"] .app-transfer-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 15px 0 11px;
  border-radius: 999px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] body[data-page="home"] .app-transfer-pill {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

body[data-page="home"] .app-transfer-pill.is-pressed {
  transform: scale(0.965);
  border-color: var(--primary-border);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

body[data-page="home"] .pill-lead-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body[data-page="home"] .pill-lead-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

body[data-page="home"] .pill-trail-arrow {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

body[data-page="home"] .tap-reticle {
  position: absolute;
  left: 52%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

body[data-page="home"] .tap-reticle.is-pulsing {
  opacity: 1;
}

body[data-page="home"] .tap-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
}

body[data-page="home"] .tap-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--primary);
}

body[data-page="home"] .tap-reticle.is-pulsing .tap-ring--outer {
  animation: tapRipple 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body[data-page="home"] .tap-reticle.is-pulsing .tap-ring--inner {
  animation: tapRipple 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

@keyframes tapRipple {
  0% { transform: scale(0.35); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Authentic Bottom Composer Bar */
body[data-page="home"] .app-composer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

body[data-page="home"] .composer-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body[data-page="home"] .composer-pill {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 999px;
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 0 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 0.78rem;
}

body[data-page="home"] .composer-placeholder {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="home"] .composer-placeholder.is-hidden {
  display: none;
}

body[data-page="home"] .composer-typed {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="home"] .typing-caret {
  display: none;
  width: 1.5px;
  height: 14px;
  margin-left: 2px;
  background: var(--primary);
  flex-shrink: 0;
}

body[data-page="home"] .transfer-reel[data-beat="1"] .typing-caret {
  display: inline-block;
  animation: caretBlink 0.7s step-end infinite;
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

body[data-page="home"] .composer-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

body[data-page="home"] .composer-send.is-tapped {
  transform: scale(0.88);
  box-shadow: 0 0 0 6px var(--primary-soft);
}

/* Center Kinetic Bridge */
body[data-page="home"] .transfer-connector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page="home"] .transfer-connector-line {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
}

body[data-page="home"] .transfer-beam-dot {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transform: translateY(-50%);
  opacity: 0;
}

body[data-page="home"] .transfer-connector.is-firing .transfer-beam-dot {
  animation: bridgeBeamSlide 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bridgeBeamSlide {
  0% { left: -18px; opacity: 1; }
  85% { left: calc(100% - 6px); opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

body[data-page="home"] .transfer-connector-node {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--primary-border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Right Panel — Workout Manager → Create Manually */
body[data-page="home"] .wm-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-page="home"] .wm-title {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

body[data-page="home"] .wm-tabs {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

body[data-page="home"] .wm-tab {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 4px 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

body[data-page="home"] .wm-tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  transition: text-shadow 0.25s ease;
}

body[data-page="home"] .wm-tab--active.is-lit {
  text-shadow: 0 0 12px var(--primary-border);
}

body[data-page="home"] .wm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-page="home"] .wm-daily-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.2px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 600;
}

body[data-page="home"] .wm-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-page="home"] .wm-add-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 600;
}

body[data-page="home"] .wm-count-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
}

body[data-page="home"] .wm-card-list {
  min-height: 226px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-page="home"] .wm-ex-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translate3d(-16px, 0, 0);
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] body[data-page="home"] .wm-ex-card {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.10);
}

body[data-page="home"] .wm-ex-card.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body[data-page="home"] .wm-drag-handle {
  color: var(--text-muted);
  opacity: 0.55;
  display: inline-flex;
  flex-shrink: 0;
}

body[data-page="home"] .wm-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page="home"] .wm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-page="home"] .wm-ex-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body[data-page="home"] .wm-ex-meta strong {
  font-size: 0.84rem;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="home"] .wm-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

body[data-page="home"] .wm-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

body[data-page="home"] .wm-ex-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body[data-page="home"] .wm-chevron {
  color: var(--text-muted);
}

body[data-page="home"] .wm-trash-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Authentic Bottom Save Workout / Start Now Buttons */
body[data-page="home"] .wm-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="home"] .wm-action-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

body[data-page="home"] .wm-action-btn--save,
body[data-page="home"] .wm-action-btn--start {
  background: #161B26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-page="home"] .wm-action-btn--save {
  color: #CBD5E1;
  font-weight: 600;
}

body[data-page="home"] .wm-action-btn--start {
  color: #F8FAFC;
  font-weight: 700;
}

body[data-page="home"] .transfer-reel.is-playing[data-beat="5"] .wm-action-btn--start {
  animation: startHaloDark 1.6s ease-in-out infinite;
}

@keyframes startHaloDark {
  0%, 100% {
    border-color: rgba(56, 189, 248, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30), 0 0 0 0 rgba(56, 189, 248, 0), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  50% {
    border-color: rgba(56, 189, 248, 0.44);
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.18), 0 0 0 4px rgba(56, 189, 248, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

html[data-theme="light"] body[data-page="home"] .wm-action-btn--save,
html[data-theme="light"] body[data-page="home"] .wm-action-btn--start {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] body[data-page="home"] .wm-action-btn--save {
  color: #334155;
  font-weight: 600;
}

html[data-theme="light"] body[data-page="home"] .wm-action-btn--start {
  color: #0F172A;
  font-weight: 700;
  border-color: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] body[data-page="home"] .transfer-reel.is-playing[data-beat="5"] .wm-action-btn--start {
  animation: startHaloLight 1.6s ease-in-out infinite;
}

@keyframes startHaloLight {
  0%, 100% {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06), 0 0 0 0 rgba(14, 165, 233, 0);
  }
  50% {
    border-color: rgba(2, 132, 199, 0.34);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.14), 0 0 0 5px rgba(14, 165, 233, 0.16);
  }
}

body[data-page="home"] .wm-actions.is-sweeping .wm-action-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.14) 50%, transparent 80%);
  transform: translateX(-110%);
  animation: wmSweep 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html[data-theme="light"] body[data-page="home"] .wm-actions.is-sweeping .wm-action-btn::after {
  background: linear-gradient(110deg, transparent 20%, rgba(14, 165, 233, 0.12) 50%, transparent 80%);
}

@keyframes wmSweep {
  to { transform: translateX(110%); }
}

body[data-page="home"] .transfer-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

body[data-page="home"] .transfer-reel.is-playing .timeline-seg.is-current .timeline-fill {
  width: 0%;
  animation: timelineFill var(--beat-ms, 1800ms) linear 1 forwards;
}

@media (max-width: 980px) {
  body[data-page="home"] .transfer-stage-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body[data-page="home"] .transfer-connector {
    height: 34px;
  }

  body[data-page="home"] .transfer-connector-line {
    width: 2px;
    height: 100%;
  }

  body[data-page="home"] .transfer-connector-node {
    transform: rotate(90deg);
  }
}

@media (max-width: 760px) {
  html[data-theme="light"] body[data-page="home"] .hero-editorial {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 20px;
  }

  body[data-page="home"] .transfer-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 420px) {
  body[data-page="home"] .wm-tabs {
    gap: 4px;
  }

  body[data-page="home"] .wm-tab {
    font-size: 0.68rem;
    padding: 6px 2px 8px;
  }

  body[data-page="home"] .wm-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .anatomy-scan-beam,
  .anatomy-reticle.is-pulsing .reticle-ripple,
  .cinema-dot,
  .connector-beam.is-drawing,
  #spotlight-img,
  .timeline-fill,
  body[data-page="home"] .hero-editorial > *,
  body[data-page="home"] .hero-manifesto,
  body[data-page="home"] .scroll-cue-line::after,
  body[data-page="home"] .section-divider,
  body[data-page="home"] .app-thinking span,
  body[data-page="home"] .tap-ring,
  body[data-page="home"] .typing-caret,
  body[data-page="home"] .transfer-beam-dot,
  body[data-page="home"] .wm-action-btn::after,
  body[data-page="home"] .transfer-reel.is-playing[data-beat="5"] .wm-action-btn--start,
  body[data-page="home"] .transfer-reel.is-playing .timeline-seg.is-current .timeline-fill {
    animation: none !important;
  }

  .bg-motion-transform,
  .bg-motion-transform model-viewer,
  .anatomy-reticle,
  #spotlight-img,
  body[data-page="home"] [data-reveal],
  body[data-page="home"] [data-print-reveal] .print-word,
  body[data-page="home"] .bento-viz path,
  body[data-page="home"] .rail-draw-path,
  body[data-page="home"] .rail-plate-svg,
  body[data-page="home"] .nav-indicator,
  .rail-pip,
  .rail-label,
  body[data-page="home"] .site-header,
  body[data-page="home"] .header-inner,
  body[data-page="home"] .faq-item summary::after,
  body[data-page="home"] .app-msg,
  body[data-page="home"] .wm-ex-card {
    transition: none !important;
  }

  body[data-page="home"] .app-msg,
  body[data-page="home"] .wm-ex-card {
    opacity: 1 !important;
    transform: none !important;
  }

  body[data-page="home"] .app-thinking {
    display: none !important;
  }

  body[data-page="home"] .rail-section {
    height: auto !important;
    padding: 56px 0 !important;
  }

  body[data-page="home"] .rail-pin {
    position: static !important;
    height: auto !important;
  }

  body[data-page="home"] .rail-track {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
    padding-inline: 20px !important;
    transform: none !important;
  }

  body[data-page="home"] .rail-plate-svg {
    transform: none !important;
  }

  body[data-page="home"] .rail-foot,
  body[data-page="home"] .rail-meta-readout {
    display: none !important;
  }

  html.has-scroll-anim body[data-page="home"] [data-reveal],
  html.has-scroll-anim body[data-page="home"] [data-print-reveal] .print-word {
    opacity: 1 !important;
    transform: none !important;
  }

  html.has-scroll-anim body[data-page="home"] .bento-viz path,
  html.has-scroll-anim body[data-page="home"] .rail-draw-path {
    stroke-dashoffset: 0 !important;
  }
}

/* Print-Friendly Legal Documents */
@media print {
  :root,
  html[data-theme="dark"],
  html[data-theme="light"] {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --elevated: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --primary: #0284C7;
    --border: #CBD5E1;
    --border-strong: #94A3B8;
  }

  body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 11pt;
  }

  .site-header,
  .mobile-drawer,
  .doc-toc,
  .no-print,
  .site-footer .footer-links {
    display: none !important;
  }

  .doc-layout {
    display: block;
    padding: 0;
  }

  .doc-main {
    max-width: none;
  }

  .doc-section,
  .identity-banner,
  .callout {
    box-shadow: none !important;
    break-inside: avoid;
    border-color: #CBD5E1;
  }

  .data-table tr {
    break-inside: avoid;
  }

  a {
    color: #0284C7;
    text-decoration: underline;
  }
}
