/* public-site.css — shared design system for all public-facing surfaces:
   landing (/), public analytics (/public), login, and register.
   dashboard.css covers private-app primitives; this file covers public ones. */

/* ── Skip Link ─────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--accent);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
  left: 1rem;
}

/* ── Fonts ──────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ── Base reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-primary);
  color: var(--text-primary);
}

body.landing-page {
  overflow-x: clip;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.brand {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.52);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand img {
  width: 24px;
  height: 24px;
  display: block;
}

/* ── Theme variables (public themed surfaces: landing, /public) ─────────── */
:root, :root[data-theme="light"] {
  --bg-primary: #f4f3f1;
  --bg-card: #ffffff;
  --bg-elevated: #ececea;
  --text-primary: #1a1814;
  --text-secondary: #6b6560;
  --text-muted: #9c9690;
  --accent: #4a6b8a;
  --accent-strong: #36506a;
  --accent-light: #dde4ec;
  --success: #587a5f;
  --danger: #a85a5a;
  --border: #d9d6d1;
  --shadow-sm: 0 1px 3px rgba(26, 24, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 24, 20, 0.06);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --grid-color: #d9d6d1;
  --tick-color: #9c9690;
  --axis-title-color: #6b6560;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-primary: #12171c;
  --bg-card: #1a2128;
  --bg-elevated: #232d36;
  --text-primary: #f4efe7;
  --text-secondary: #c3b9ac;
  --text-muted: #918779;
  --accent: #8aa9c7;
  --accent-strong: #a8c0d8;
  --accent-light: #2a3a4a;
  --success: #98b8a0;
  --danger: #d49a9a;
  --border: #313c45;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.34);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --grid-color: #313c45;
  --tick-color: #918779;
  --axis-title-color: #c3b9ac;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg-primary: #12171c;
    --bg-card: #1a2128;
    --bg-elevated: #232d36;
    --text-primary: #f4efe7;
    --text-secondary: #c3b9ac;
    --text-muted: #918779;
    --accent: #8aa9c7;
    --accent-strong: #a8c0d8;
    --accent-light: #2a3a4a;
    --success: #98b8a0;
    --danger: #d49a9a;
    --border: #313c45;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.34);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --grid-color: #313c45;
    --tick-color: #918779;
    --axis-title-color: #c3b9ac;
    color-scheme: dark;
  }
}

/* ── Shared typography ──────────────────────────────────────────────────── */
.eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Metric cards (used in auth hero panels) ────────────────────────────── */
.metric-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}
.metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa8c8;
  margin-bottom: 8px;
}
.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* ── Trust metrics strip (landing page) ─────────────────────────────────── */
.trust-metrics {
  margin: 28px 0 54px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  padding: 8px 0;
  border-block: 1px solid var(--border);
}
.trust-metrics .metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 18px;
  text-align: left;
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.trust-metrics .metric-label {
  color: var(--text-secondary);
  font-size: 0.7rem;
  margin-bottom: 10px;
}
.trust-metrics .metric-value {
  color: var(--text-primary);
  font-size: 2rem;
  font-feature-settings: 'tnum';
}

/* ── Editorial band + section framing ───────────────────────────────────── */
.editorial-band,
.how-it-works,
.performance-summary,
.about {
  margin: 72px 0;
}
.editorial-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 28px 36px;
  align-items: start;
}
.editorial-lead .eyebrow,
.section-header {
  margin-bottom: 28px;
}
.editorial-lead .eyebrow,
.section-header .eyebrow {
  color: var(--accent);
  margin-bottom: 12px;
}
.editorial-lead h2,
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.editorial-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.editorial-columns p,
.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}
.editorial-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.editorial-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}
.editorial-links a:hover { color: var(--accent-strong); }

/* ── How it works section (landing page) ────────────────────────────────── */
.section-header-left {
  text-align: left;
  max-width: 720px;
}
.process-grid {
  display: block;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}
.process-step {
  display: grid;
  grid-template-columns: 72px minmax(0, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: transparent;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.process-step h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}
.process-step p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Methodology section (landing page) ─────────────────────────────────── */
.methodology-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, min(480px, 1fr));
  gap: 52px;
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.methodology-visual {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}
.methodology-text .eyebrow {
  color: var(--accent);
  margin-bottom: 12px;
}
.methodology-text h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}
.methodology-text > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.methodology-features {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}
.feature-item {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.feature-item strong {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}
.feature-item span {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.95rem;
}
/* Model methodology: cyclical pipeline (SVG links between cards + corner nodes) */
.model-cycle {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 420px);
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 1;
  border-top: 1px solid var(--border);
  padding: 0;
}
.model-cycle-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.model-cycle-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.model-cycle-marker-shape {
  fill: var(--accent);
}
.model-cycle-nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
}
.cycle-node {
  position: absolute;
  z-index: 1;
  margin: 0;
  padding: 0;
}
.cycle-node-card {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--bg-card) 38%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(110px, 28vw);
  padding: 12px 8px;
  text-align: center;
}
.cycle-node--top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.cycle-node--right {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.cycle-node--bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.cycle-node--left {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.cycle-node-card span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.28;
}
.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Performance summary section (landing page) ─────────────────────────── */
.performance-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 42px;
  align-items: start;
}
.performance-intro .eyebrow {
  color: var(--accent);
  margin-bottom: 12px;
}
.performance-intro h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}
.performance-intro p {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.65;
}
.performance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 28px;
  border-top: 1px solid var(--border);
}
.performance-card {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 18px 8px 0;
}
.performance-card:last-child {
  border-right: 0;
  padding-right: 0;
}
.card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 0;
}
.card-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.card-body {
  display: grid;
  gap: 16px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  font-feature-settings: 'tnum';
}
.performance-cta {
  text-align: left;
  margin-top: 28px;
}
.performance-cta a.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.performance-cta a.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* ── About section (landing page) ───────────────────────────────────────── */
.about-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.about-text .eyebrow {
  color: var(--accent);
  margin-bottom: 12px;
}
.about-text h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}
.about-text > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.about-features {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}
.about-feature {
  display: grid;
  gap: 6px;
}
.about-feature strong {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.about-feature span {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.9rem;
}
.about-cta {
  display: grid;
  gap: 24px;
  align-content: start;
}
.cta-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 0 0;
}
.cta-card h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.cta-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.cta-actions {
  display: grid;
  gap: 10px;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .performance-cta a.primary,
:root[data-theme="dark"] .ps-hero-actions a.primary {
  color: #17120a;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .btn-primary,
  :root[data-theme="auto"] .performance-cta a.primary,
  :root[data-theme="auto"] .ps-hero-actions a.primary {
    color: #17120a;
  }
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-primary:hover, .btn-secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.contact-info {
  padding-top: 8px;
}
.contact-info h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.contact-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.contact-link:hover {
  text-decoration: underline;
}

/* ── Landing hero refinements ───────────────────────────────────────────── */
.ps-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 40px;
  align-items: end;
  padding: 44px 0 24px;
  position: relative;
  isolation: isolate;
}
.hero-copy h1 {
  max-width: 12ch;
}
.hero-copy-stage {
  position: relative;
  z-index: 1;
}
.hero-copy-stage h1 {
  font-size: clamp(2.85rem, 6.6vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.08em;
  text-wrap: balance;
  max-width: 8.8ch;
  margin-bottom: 64px;
}
.ps-hero-copy {
  font-size: 1.08rem;
  line-height: 1.72;
  max-width: 58ch;
  color: var(--text-secondary);
  margin: 0 0 24px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 18px;
}
.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.hero-demo {
  position: relative;
  min-height: 520px;
  perspective: 1400px;
}
.hero-demo-grid {
  position: relative;
  width: 100%;
  height: 100%;
}
.demo-panel {
  border: 1px solid rgba(255,255,255,0.36);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.34));
  backdrop-filter: blur(16px);
  box-shadow:
    0 28px 80px rgba(26, 24, 20, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.46);
}
.demo-panel-primary {
  position: absolute;
  inset: 40px 0 0 24px;
  border-radius: 32px;
  padding: 24px;
  overflow: hidden;
  transform: rotate(-4deg);
}
.demo-panel-primary::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(74,107,138,0.3), transparent 70%);
  animation: pulseOrbit 8s ease-in-out infinite;
}
.demo-panel-float {
  position: absolute;
  width: min(260px, 72%);
  right: -6px;
  border-radius: 24px;
  padding: 18px 18px 16px;
  display: grid;
  gap: 10px;
  transform: translate3d(0, 0, 0);
}
.demo-panel-float strong {
  font-size: 1.02rem;
  line-height: 1.2;
}
.demo-panel-float p {
  color: var(--text-secondary);
  line-height: 1.55;
}
.demo-panel-float.alt {
  bottom: 28px;
  animation-delay: -3s;
}
.demo-panel-float:not(.alt) {
  top: 26px;
}
.demo-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.demo-scoreline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.demo-scoreline span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.76rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.demo-scoreline strong {
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.05em;
}
.demo-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  height: 170px;
  margin-top: 28px;
}
.demo-bars span {
  display: block;
  height: var(--bar);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(74,107,138,0.92), rgba(26,45,74,0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32);
  animation: barPulse 5.2s ease-in-out infinite;
}
.demo-bars span:nth-child(2n) {
  animation-delay: -1.8s;
}
.demo-bars span:nth-child(3n) {
  animation-delay: -3.1s;
}
.hero-orbit {
  position: absolute;
  inset: 56px auto auto calc(50% - 80px);
  width: 560px;
  height: 560px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(74,107,138,0.14);
  border-radius: 999px;
}
.orbit-a {
  inset: 0;
  animation: spinSlow 24s linear infinite;
}
.orbit-b {
  inset: 70px;
  border-color: rgba(88,122,95,0.12);
  animation: spinSlow 19s linear infinite reverse;
}
.orbit-c {
  inset: 155px;
  border-color: rgba(26,45,74,0.14);
  animation: spinSlow 16s linear infinite;
}
:root[data-theme="dark"] .orbit {
  border-color: rgba(138,169,199,0.34);
}
:root[data-theme="dark"] .orbit-b {
  border-color: rgba(152,184,160,0.3);
}
:root[data-theme="dark"] .orbit-c {
  border-color: rgba(168,192,216,0.26);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .orbit {
    border-color: rgba(138,169,199,0.34);
  }
  :root[data-theme="auto"] .orbit-b {
    border-color: rgba(152,184,160,0.3);
  }
  :root[data-theme="auto"] .orbit-c {
    border-color: rgba(168,192,216,0.26);
  }
}
.hero-marquee {
  position: relative;
  overflow: hidden;
  margin: 10px 0 26px;
  padding: 14px 0;
  border-block: 1px solid var(--border);
}
.hero-marquee::before,
.hero-marquee::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 80px;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
  z-index: 1;
}
.hero-marquee::after {
  inset: 0 0 0 auto;
  background: linear-gradient(270deg, var(--bg-primary), transparent);
}
.hero-marquee-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: marqueeDrift 28s linear infinite;
}
.hero-marquee-track span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
  border: 1px solid rgba(255,255,255,0.42);
  backdrop-filter: blur(10px);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}
.hero-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}
.glance-card {
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.18));
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.glance-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.glance-label {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.glance-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.15;
}
.glance-card p {
  color: var(--text-secondary);
  line-height: 1.58;
}
.hero-aside {
  display: grid;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.hero-note {
  display: grid;
  gap: 8px;
}
.hero-note-label {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-note p {
  color: var(--text-secondary);
  line-height: 1.6;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseOrbit {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 0.45; }
}

@keyframes barPulse {
  0%, 100% { transform: scaleY(0.96); opacity: 0.92; }
  50% { transform: scaleY(1.04); opacity: 1; }
}

@keyframes marqueeDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes floatCard {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

.landing-page .demo-panel-float {
  animation: floatCard 7s ease-in-out infinite;
}

.contact-main {
  padding: 44px 0 0;
  display: grid;
  gap: 36px;
}

.contact-hero {
  max-width: 760px;
}

.contact-hero h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.07em;
  margin: 14px 0 28px;
  text-wrap: balance;
  max-width: 11.5ch;
}

.contact-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.72;
}

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

.contact-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.24));
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.contact-card-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(221,228,236,0.48));
}

.contact-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.contact-card h2 {
  font-size: 1.4rem;
  line-height: 1.06;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

.contact-card a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}

.contact-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 12px;
}

.contact-primary-link {
  font-size: 1.15rem;
}

.contact-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.contact-about h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 12px 0 14px;
}

.contact-about p {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 760px;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.copy-button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
}

.contact-form-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

.topic-grid {
  display: grid;
  gap: 12px;
}

.topic-grid div {
  display: grid;
  gap: 4px;
}

.topic-grid strong {
  color: var(--text-primary);
}

.topic-grid span {
  color: var(--text-secondary);
  line-height: 1.55;
}

.research-main {
  padding: 44px 0 0;
  display: grid;
  gap: 36px;
}

.research-hero {
  max-width: 780px;
}

.research-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.07;
  letter-spacing: -0.06em;
  margin: 14px 0 24px;
  text-wrap: balance;
  max-width: 12ch;
}

.research-hero p,
.research-empty p {
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.72;
  max-width: 66ch;
}

.research-empty {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.26));
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.research-empty h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.public-analytics-main {
  padding-top: 38px;
}

.analytics-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 320px;
  gap: 26px;
  align-items: start;
  margin-bottom: 28px;
}

.analytics-hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.07;
  letter-spacing: -0.07em;
  margin: 10px 0 24px;
  max-width: 10ch;
}

.analytics-hero-copy p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.72;
  max-width: 64ch;
}

.analytics-hero-side {
  display: grid;
  gap: 12px;
}

.analytics-side-card,
.analytics-overview-card,
.analytics-panel,
.analytics-stat-card,
.analytics-stat-row {
  background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.26));
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.analytics-side-card {
  padding: 18px 18px 16px;
  border-radius: 22px;
  display: grid;
  gap: 6px;
}

.analytics-side-card span {
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.analytics-side-card strong,
.analytics-side-card a {
  color: var(--text-primary);
  font-size: 0.98rem;
  text-decoration: none;
}

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

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

.analytics-context div {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.analytics-context div:last-child { border-right: 0; }

.analytics-context span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.analytics-context strong {
  font-size: 0.94rem;
  color: var(--text-primary);
}

.analytics-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.analytics-alert.is-error {
  border-color: rgba(168, 90, 90, 0.35);
  color: var(--danger);
}

.analytics-overview-card {
  border-radius: 26px;
  padding: 22px;
}

.analytics-card-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.analytics-overview-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 10px;
}

.analytics-overview-card p {
  color: var(--text-secondary);
  line-height: 1.58;
}

.analytics-section {
  margin-bottom: 22px;
}

.analytics-section-receipts {
  margin-top: 76px;
  padding-top: 8px;
}

.analytics-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.analytics-section-header h2 {
  font-size: 1.8rem;
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

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

.analytics-stat-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analytics-stat-card {
  border-radius: 22px;
  padding: 18px;
}

.analytics-stat-row {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.analytics-stat-card span,
.analytics-stat-item span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.analytics-stat-card strong,
.analytics-stat-item strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.analytics-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.analytics-panel {
  border-radius: 28px;
  overflow: hidden;
}

.analytics-panel-header {
  padding: 18px 20px 0;
  display: grid;
  gap: 6px;
}

.analytics-panel-header span {
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.analytics-panel-header strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.analytics-panel-body {
  padding: 16px 20px 20px;
}

.analytics-panel-wide {
  border-radius: 24px;
}

.chart-wrap-large {
  height: 280px;
}

.chart-caption {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
  margin-top: 12px;
}

.analytics-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.26));
  box-shadow: var(--shadow-sm);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.analytics-table th,
.analytics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.analytics-table th {
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.analytics-table td {
  color: var(--text-primary);
  font-feature-settings: 'tnum';
}

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

.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.analytics-pagination button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  color: var(--text-primary);
  padding: 8px 14px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.analytics-pagination button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.positive { color: var(--success) !important; }
.negative { color: var(--danger) !important; }

.result-pill {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.result-pill.win {
  color: var(--success);
  background: rgba(88, 122, 95, 0.12);
}

.result-pill.loss {
  color: var(--danger);
  background: rgba(168, 90, 90, 0.12);
}

.side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-pill.home {
  background: #dde4ec;
  color: #3d556e;
}

.side-pill.away {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--accent);
}

:root[data-theme="dark"] .side-pill.home {
  background: #1f3144;
  color: var(--text-primary);
}

:root[data-theme="dark"] .side-pill.away {
  background: #05070a;
  color: var(--text-primary);
  border-color: transparent;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .side-pill.home {
    background: #1f3144;
    color: var(--text-primary);
  }

  :root[data-theme="auto"] .side-pill.away {
    background: #05070a;
    color: var(--text-primary);
    border-color: transparent;
  }
}

.auth-shell-wrap {
  padding-bottom: 44px;
}

.auth-shell-v2 {
  margin-top: 28px;
}

.auth-hero-v2 {
  background:
    radial-gradient(circle at top right, rgba(74,107,138,0.2), transparent 24%),
    linear-gradient(160deg, rgba(26, 45, 74, 0.96), rgba(18, 27, 43, 0.98)),
    #1a2d4a;
}

.auth-form-v2 {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,253,249,0.96));
}

/* ── Auth surface ───────────────────────────────────────────────────────── */
body.auth-body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(74, 107, 138, 0.15), transparent 32%),
    radial-gradient(circle at bottom right, rgba(26, 45, 74, 0.18), transparent 28%),
    var(--bg-primary);
  min-height: 100vh;
  color: var(--text-primary);
  padding: 24px;
  display: grid;
  place-items: center;
}

.auth-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 420px);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.auth-hero {
  padding: 44px 40px;
  background:
    linear-gradient(160deg, rgba(26, 45, 74, 0.96), rgba(18, 27, 43, 0.98)),
    #1a2d4a;
  color: #fff;
  display: grid;
  align-content: space-between;
  gap: 32px;
  min-height: 620px;
}

.auth-hero-body {
  display: grid;
  gap: 18px;
}

.auth-hero .eyebrow { color: #a8c0d8; }

.auth-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 9ch;
}

.auth-hero p {
  max-width: 44ch;
  color: #c6d2e1;
  font-size: 1rem;
  line-height: 1.65;
}

.auth-trust-note {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 6px;
}

.auth-trust-note strong {
  color: #fff;
  font-size: 1.05rem;
}

.auth-trust-note p {
  margin: 0;
}

.auth-hero ul {
  padding-left: 18px;
  color: #d8e0ea;
  display: grid;
  gap: 8px;
}

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

.auth-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.hero-link:hover { transform: translateY(-1px); filter: brightness(1.04); }
.hero-link.primary { background: linear-gradient(135deg, #6b8daa, #4a6b8a); color: #fff; }
.hero-link.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-form {
  background: var(--bg-card);
  display: grid;
  align-content: center;
}

.auth-form-header {
  padding: 34px 34px 12px;
}
.auth-form-header h2 {
  color: var(--text-primary);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-form-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 8px;
  line-height: 1.55;
}

.auth-form-body {
  padding: 12px 34px 34px;
}

.error-banner {
  background: var(--danger-light, #f0dede);
  border: 1px solid var(--danger, #a85a5a);
  border-radius: 10px;
  color: var(--danger, #a85a5a);
  font-size: 0.82rem;
  padding: 9px 12px;
  margin-bottom: 18px;
}

.field { margin-bottom: 16px; }
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field-label-row label {
  margin-bottom: 0;
}

.field-label-row a {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.field input:focus {
  border-color: #4a6b8a;
  box-shadow: 0 0 0 4px rgba(74, 107, 138, 0.12);
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.password-field input {
  border-radius: 14px 0 0 14px;
}

.password-field button {
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.field-help,
.form-note {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.field-help {
  margin-top: 8px;
}

.form-note {
  margin: 4px 0 12px;
}

.checkbox-row {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #1a2d4a, #243d62);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-submit:hover { background: #243d62; }
.btn-submit:active { background: #132238; }
.btn-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-form .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.auth-form .btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

/* ── Hamburger nav toggle ───────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-icon {
  position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after  { top: 5px; }

.topbar.nav-open .nav-toggle-icon { background: transparent; }
.topbar.nav-open .nav-toggle-icon::before { transform: rotate(45deg) translate(3.5px, 3.5px); }
.topbar.nav-open .nav-toggle-icon::after  { transform: rotate(-45deg) translate(3.5px, -3.5px); }

/* ── Auth surface responsive ────────────────────────────────────────────── */
@media (max-width: 920px) {
  .ps-hero,
  .hero-glance,
  .editorial-band,
  .contact-about,
  .analytics-hero,
  .methodology-content,
  .performance-layout,
  .about-content {
    grid-template-columns: 1fr;
  }
  .hero-aside {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 18px;
  }
  .hero-demo {
    min-height: 420px;
  }
  .hero-demo-grid {
    min-height: 420px;
  }
  .demo-panel-primary {
    inset: 20px 0 0 0;
    transform: rotate(-2deg);
  }
  .demo-panel-float {
    width: min(240px, 72%);
  }
  .hero-orbit {
    width: 420px;
    height: 420px;
    inset: 90px auto auto calc(50% - 110px);
  }
  .editorial-columns {
    grid-template-columns: 1fr;
  }
  .process-step {
    grid-template-columns: 56px 1fr;
  }
  .process-step h3 {
    grid-column: 2;
  }
  .process-step p {
    grid-column: 1 / -1;
  }
  .performance-grid {
    grid-template-columns: 1fr;
  }
  .performance-card {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .performance-card:last-child {
    border-bottom: 0;
  }
  .contact-grid,
  .contact-form-panel,
  .analytics-context,
  .analytics-overview-grid,
  .analytics-stat-grid,
  .analytics-stat-grid.five,
  .analytics-stat-row,
  .analytics-chart-row {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: center;
  }
  .contact-main,
  .public-analytics-main {
    padding-top: 24px;
  }
  .analytics-panel-body {
    padding: 14px 16px 18px;
  }
  .chart-wrap {
    height: 200px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    min-height: unset;
    padding: 28px 24px;
  }
  .auth-hero h1 { max-width: 12ch; }
  .analytics-context div {
    border-right: 0;
  }
  .analytics-context div {
    border-bottom: 1px solid var(--border);
  }
  .analytics-context div:last-child {
    border-bottom: 0;
  }
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth-form-header,
  .auth-form-body {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 560px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-copy-stage h1 {
    font-size: clamp(2.05rem, 10.5vw, 3.1rem);
    line-height: 1.13;
    max-width: none;
    margin-bottom: 34px;
  }
  .analytics-hero-copy h1,
  .contact-hero h1 {
    font-size: clamp(1.9rem, 9.6vw, 2.85rem);
    line-height: 1.13;
    max-width: none;
    margin-bottom: 26px;
  }
  .ps-hero-copy,
  .analytics-hero-copy p,
  .contact-hero p,
  .auth-hero p {
    font-size: 0.98rem;
    line-height: 1.7;
  }
  .hero-badges {
    gap: 8px;
    margin: 18px 0 22px;
  }
  .hero-badges span {
    min-height: 38px;
    padding: 0 13px;
  }
  .ps-hero-actions,
  .hero-actions,
  .contact-actions,
  .auth-hero-actions,
  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  .ps-hero-actions a,
  .hero-actions a,
  .contact-actions a,
  .auth-hero-actions a,
  .actions > * {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  .ps-hero-actions a:not(.primary) {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 18px;
    background: var(--bg-card);
  }
  .hero-demo {
    min-height: unset;
  }
  .hero-demo-grid {
    min-height: unset;
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .demo-panel-primary {
    position: static;
    transform: none;
    padding: 18px;
    border-radius: 26px;
    inset: auto;
  }
  .demo-scoreline {
    grid-template-columns: 1fr 1fr;
  }
  .demo-bars {
    gap: 7px;
    height: 100px;
    margin-top: 16px;
  }
  .demo-panel-float {
    position: static;
    width: 100%;
    right: auto;
    top: auto;
    bottom: auto;
    animation: none !important;
  }
  .hero-marquee-track span {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
  }
  .topbar {
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 28px;
    position: relative;
  }
  .topbar .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .topbar .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 100;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-md);
  }
  .topbar.nav-open .nav-links {
    display: flex;
  }
  .topbar .nav-links a {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
  }
  .topbar .nav-links a:hover {
    background: var(--bg-elevated);
  }
  .contact-card,
  .analytics-overview-card,
  .analytics-stat-card,
  .analytics-stat-row {
    padding: 18px;
    border-radius: 22px;
  }
  .analytics-side-card {
    padding: 16px;
    border-radius: 18px;
  }
  .contact-card h2,
  .analytics-section-header h2 {
    line-height: 1.08;
  }
  .analytics-overview-card strong,
  .analytics-stat-card strong {
    line-height: 1.08;
  }
  .hero-orbit {
    width: 300px;
    height: 300px;
    inset: 86px auto auto calc(50% - 100px);
  }
  .process-step {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .process-step h3,
  .process-step p {
    grid-column: 1;
  }
  .model-cycle {
    width: min(100%, 300px);
  }
  .cycle-node-card {
    width: min(90px, 24vw);
    padding: 8px 4px;
    gap: 4px;
  }
  .cycle-node-card span {
    font-size: 0.72rem;
  }
  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
  }
  body.auth-body { padding: 12px; }
  .auth-shell {
    border-radius: 22px;
    grid-template-columns: 1fr;
  }
  .auth-hero { display: none; }
  .hero-link { width: 100%; }
  .auth-form-header,
  .auth-form-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ── Public site surface (landing, /public topbar) ──────────────────────── */
.ps-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 88px;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 0 0 18px;
  margin-bottom: 42px;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: auto;
  height: 48px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand span {
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand .eyebrow { color: var(--accent); }

.brand strong,
.ps-shell h1,
.ps-shell h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.nav-links,
.ps-hero-actions,
.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-links a,
.ps-hero-actions a,
.section-links a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
  padding: 0;
  border-radius: 0;
  border: 0;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
}

.ps-hero-actions a.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
}

.ps-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 28px 0 12px;
  margin-bottom: 24px;
}

.ps-hero p,
.section-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.ps-hero .hero-copy-stage h1 {
  margin-bottom: 56px;
}

.ps-hero-copy {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary,
.contact-form-panel .btn-primary {
  width: auto;
  min-height: 46px;
  padding-inline: 20px;
}

.demo-note {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.proof-strip,
.analytics-context,
.public-footer,
.contact-form-panel {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 58px;
  padding: 16px 0;
  border-bottom: 0;
}

.proof-strip a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  min-height: 58px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  overflow-wrap: break-word;
}

.proof-strip a::after {
  content: ">";
  color: var(--accent);
  grid-column: 2;
}

.proof-strip a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 920px) {
  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .proof-strip {
    grid-template-columns: 1fr;
  }
}

.public-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 54px;
  padding: 18px 0;
  color: var(--text-secondary);
}

.public-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.public-footer a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

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

:root[data-theme="dark"] .hero-badges span,
:root[data-theme="dark"] .hero-marquee-track span,
:root[data-theme="dark"] .trust-metrics .metric-card,
:root[data-theme="dark"] .demo-panel,
:root[data-theme="dark"] .glance-card,
:root[data-theme="dark"] .contact-card,
:root[data-theme="dark"] .contact-card-primary,
:root[data-theme="dark"] .analytics-side-card,
:root[data-theme="dark"] .analytics-overview-card,
:root[data-theme="dark"] .analytics-panel,
:root[data-theme="dark"] .analytics-stat-card,
:root[data-theme="dark"] .analytics-stat-row,
:root[data-theme="dark"] .analytics-table-wrap {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(35, 45, 54, 0.9), rgba(18, 23, 28, 0.76));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .analytics-pagination button {
  background: rgba(18, 23, 28, 0.36);
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .cycle-node-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 23, 28, 0.36);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .performance-cta a.primary,
:root[data-theme="dark"] .ps-hero-actions a.primary {
  color: #17120a;
}

:root[data-theme="dark"] .hero-badges span,
:root[data-theme="dark"] .hero-marquee-track span {
  background: rgba(26, 33, 40, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .hero-badges span,
  :root[data-theme="auto"] .hero-marquee-track span,
  :root[data-theme="auto"] .trust-metrics .metric-card,
  :root[data-theme="auto"] .demo-panel,
  :root[data-theme="auto"] .glance-card,
  :root[data-theme="auto"] .contact-card,
  :root[data-theme="auto"] .contact-card-primary,
  :root[data-theme="auto"] .analytics-side-card,
  :root[data-theme="auto"] .analytics-overview-card,
  :root[data-theme="auto"] .analytics-panel,
  :root[data-theme="auto"] .analytics-stat-card,
  :root[data-theme="auto"] .analytics-stat-row,
  :root[data-theme="auto"] .analytics-table-wrap {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(35, 45, 54, 0.9), rgba(18, 23, 28, 0.76));
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  :root[data-theme="auto"] .analytics-pagination button {
    background: rgba(18, 23, 28, 0.36);
    border-color: rgba(255, 255, 255, 0.12);
  }

  :root[data-theme="auto"] .cycle-node-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(18, 23, 28, 0.36);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  :root[data-theme="auto"] .btn-primary,
  :root[data-theme="auto"] .performance-cta a.primary,
  :root[data-theme="auto"] .ps-hero-actions a.primary {
    color: #17120a;
  }

  :root[data-theme="auto"] .hero-badges span,
  :root[data-theme="auto"] .hero-marquee-track span {
    background: rgba(26, 33, 40, 0.82);
  }
}

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

.section-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-card h2 { font-size: 1.45rem; }

.section-card .eyebrow { color: var(--accent); }

/* ── Theme chip (select inside topbar) ──────────────────────────────────── */
.theme-chip {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  height: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.theme-chip:hover, .theme-chip:focus { border-color: var(--accent); }

/* ── Analytics primitives (used by /public) ─────────────────────────────── */
.stat-card {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: none;
}
.stat-card:last-child { border-right: 0; }
.stat-card-header {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0;
}
.stat-card-body { padding: 0; }
.stat-card-body .big {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  font-feature-settings: 'tnum';
}

.panel {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.panel-header {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 0;
}
.panel-body { padding: 0 0 8px; }
.chart-wrap { position: relative; height: 220px; }
.empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Public surface responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .ps-grid { grid-template-columns: 1fr; }
  .ps-hero { padding: 24px 0 8px; }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-header h2 {
    font-size: 1.8rem;
  }
  .methodology {
    padding: 32px 24px;
  }
  .methodology-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .methodology-text h2 {
    font-size: 1.8rem;
  }
  .model-cycle {
    width: min(100%, 380px);
    margin-inline: auto;
  }
  .performance-grid {
    grid-template-columns: 1fr;
  }
  .performance-card {
    padding: 24px 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .performance-card:last-child { border-bottom: 0; }
  .about {
    padding: 32px 24px;
  }
  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-text h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .ps-shell {
    padding: 18px 18px 64px;
  }
  .brand {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
  .brand span {
    display: none;
  }
  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav-links a {
    min-height: 42px;
    width: 100%;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-step {
    padding: 24px 0;
  }
  .methodology {
    padding: 24px 18px;
  }
  .methodology-features {
    gap: 16px;
  }
  .model-cycle {
    width: min(100%, 300px);
  }
  .cycle-node-card {
    width: min(90px, 24vw);
    padding: 8px 4px;
    gap: 4px;
  }
  .cycle-node-card span {
    font-size: 0.72rem;
  }
  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
  }
  .about {
    padding: 24px 18px;
  }
  .cta-card {
    padding: 18px 0 0;
  }
  .about-features {
    gap: 16px;
  }
  .hero-copy-stage h1,
  .analytics-hero-copy h1,
  .contact-hero h1 {
    text-wrap: pretty;
  }
  .chart-wrap {
    height: 188px;
  }
}

@media (max-width: 720px) {
  .landing-page .demo-panel,
  .analytics-side-card,
  .analytics-overview-card,
  .analytics-panel,
  .analytics-stat-card,
  .contact-card {
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 36px rgba(26, 24, 20, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track,
  .landing-page .demo-panel-float,
  .demo-panel-primary::before,
  .orbit {
    animation: none !important;
  }

  [data-reveal] {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ── Research page specific ───────────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 12px;
}

.research-card {
  padding: 32px;
  border-radius: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.research-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.research-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.research-card ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
}

.research-card li {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.research-card li:first-child {
  border-top: 0;
  padding-top: 0;
}

.research-card li strong {
  color: var(--text-primary);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.research-citation {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

:root[data-theme="dark"] .research-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(35, 45, 54, 0.9), rgba(18, 23, 28, 0.76));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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