:root {
  --bg: #050711;
  --bg-card: #0d1220;
  --bg-elevated: #141b2e;
  --text: #f4f7ff;
  --text-muted: #8c9ab6;
  --accent: #7cf7ff;
  --accent-hover: #a78bfa;
  --green: #06b66b;
  --red: #d7335d;
  --orange: #e1782d;
  --border: rgba(148, 174, 225, 0.16);
  --border-bright: rgba(124, 247, 255, 0.38);
  --violet: #8b5cf6;
  --cyan: #7cf7ff;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --glow: 0 0 40px rgba(73, 221, 255, 0.13);
  --max-width: 1080px;
}

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

[hidden] {
  display: none !important;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

.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;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(70, 86, 255, 0.17), transparent 31rem),
    radial-gradient(circle at 86% 22%, rgba(0, 222, 255, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(124, 247, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 247, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 74%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 74%);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header */
.site-header {
  background: rgba(5, 7, 17, 0.78);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(124, 247, 255, 0.38));
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(124, 247, 255, 0.45);
}

.lang-switcher {
  position: relative;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

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

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 180px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.lang-dropdown a:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.lang-dropdown a.current {
  color: var(--accent);
  font-weight: 600;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

/* Main */
.site-main {
  flex: 1;
  padding: 40px 0 64px;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 38px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 850;
  margin-bottom: 12px;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.home-hero {
  position: relative;
  padding: 58px 20px 8px;
}

.home-hero h1 {
  background: linear-gradient(105deg, #ffffff 18%, #9eeeff 55%, #b4a4ff 86%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 52px rgba(112, 219, 255, 0.11);
}

.hero-kicker,
.hero-signals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  margin-bottom: 22px;
}

.hero-kicker span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.hero-kicker span:last-child {
  transform: rotate(180deg);
}

.hero-signals {
  color: #6f7f9e;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  margin: 23px 0 0;
}

.hero-signals i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Test Area */
.test-area {
  position: relative;
  background: linear-gradient(145deg, rgba(17, 24, 43, 0.96), rgba(7, 10, 20, 0.98));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow), var(--glow), inset 0 1px rgba(255,255,255,0.04);
}

.test-area::before,
.test-area::after {
  content: '';
  position: absolute;
  z-index: 3;
  width: 52px;
  height: 52px;
  pointer-events: none;
}

.test-area::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius) 0 0;
}

.test-area::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  border-radius: 0 0 var(--radius);
}

.console-bar {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  color: #62708d;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.018);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.console-label,
.console-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-status { justify-self: end; color: #63e6b0; }
.console-label { color: #a4b2ce; }

.console-label i,
.console-status i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.test-stats {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  background: rgba(7, 10, 20, 0.62);
  border-bottom: 1px solid var(--border);
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat {
  flex: 1;
  padding-inline: 10px;
}

.stat {
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-value.highlight {
  color: var(--accent);
}

.test-surface {
  width: 100%;
  height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s, box-shadow 0.18s;
  text-align: center;
  padding: 20px;
  border: 0;
  color: var(--text);
  font: inherit;
}

.test-surface.state-idle {
  background:
    radial-gradient(circle at center, rgba(111, 93, 255, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(12, 18, 35, 0.96), rgba(8, 11, 23, 0.98));
}

.test-surface.state-waiting {
  background: radial-gradient(circle at center, #e34167, #9c183b 72%);
  box-shadow: inset 0 0 90px rgba(255,255,255,0.09);
}

.test-surface.state-go {
  background: radial-gradient(circle at center, #17df8a, #047b4c 72%);
  box-shadow: inset 0 0 100px rgba(255,255,255,0.11), 0 0 60px rgba(23,223,138,0.22);
}

.test-surface.state-result,
.test-surface.state-done {
  background: radial-gradient(circle at center, rgba(124,247,255,0.13), transparent 48%), #0b1020;
}

.test-surface.state-done {
  border-top: 1px solid rgba(124,247,255,0.34);
  border-bottom: 1px solid rgba(139,92,246,0.38);
}

.test-surface.state-early {
  background: radial-gradient(circle at center, #ef8b42, #a44813 72%);
}

.surface-reticle {
  position: absolute;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(124, 247, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(124,247,255,0.08), inset 0 0 30px rgba(124,247,255,0.04);
}

.surface-reticle::before,
.surface-reticle::after,
.surface-reticle i::before,
.surface-reticle i::after {
  content: '';
  position: absolute;
  background: rgba(124,247,255,0.42);
}

.surface-reticle::before { width: 24px; height: 1px; left: -12px; top: 50%; }
.surface-reticle::after { width: 24px; height: 1px; right: -12px; top: 50%; }
.surface-reticle i::before { width: 1px; height: 24px; top: -12px; left: 50%; }
.surface-reticle i::after { width: 1px; height: 24px; bottom: -12px; left: 50%; }

.test-surface.state-waiting .surface-reticle,
.test-surface.state-go .surface-reticle,
.test-surface.state-early .surface-reticle {
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.08);
}

.surface-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  z-index: 1;
  max-width: 520px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.surface-text small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  margin-top: 8px;
  opacity: 0.85;
}

.test-surface.state-waiting .surface-text,
.test-surface.state-go .surface-text {
  color: #fff;
}

.result-display {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
}

.result-display small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.result-panel {
  padding: 28px;
  border-top: 1px solid var(--border);
  background: #111c31;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.result-heading h2 {
  font-size: 1.55rem;
  line-height: 1.3;
}

.eyebrow {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.consistency-badge {
  border: 1px solid #60a5fa;
  background: rgba(59, 130, 246, 0.13);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

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

.result-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.result-metric.primary {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.result-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.result-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.round-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 18px 0 12px;
}

.round-chip {
  text-align: center;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 9px 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.round-chip strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.benchmark-feedback {
  margin: 20px 0 14px;
  padding: 18px;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(10, 18, 34, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.benchmark-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.benchmark-heading h3 { font-size: 1.25rem; }

.benchmark-badge {
  flex: none;
  padding: 7px 11px;
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.benchmark-badge[data-tone="caution"],
.benchmark-badge[data-tone="retest"] { border-color: #f59e0b; color: #fde68a; background: rgba(245, 158, 11, 0.1); }
.benchmark-badge[data-tone="fast"] { border-color: #34d399; color: #a7f3d0; background: rgba(52, 211, 153, 0.1); }

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

.benchmark-card {
  position: relative;
  overflow: hidden;
  min-height: 165px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 15, 29, 0.72);
}

.benchmark-card::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  right: -30px;
  bottom: -42px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 50%;
}

.animal-benchmark { border-color: rgba(168, 85, 247, 0.42); }
.animal-benchmark::after { border-color: rgba(168, 85, 247, 0.42); box-shadow: 0 0 35px rgba(168, 85, 247, 0.18); }

.benchmark-kicker {
  display: block;
  margin-bottom: 7px;
  color: #7dd3fc;
  font: 700 0.7rem/1.2 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.animal-benchmark .benchmark-kicker { color: #d8b4fe; }
.benchmark-card strong { display: block; margin-bottom: 7px; font-size: 1.02rem; }
.benchmark-card p { position: relative; z-index: 1; margin: 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

.not-equivalent {
  display: inline-block;
  margin-top: 10px;
  color: #c4b5fd;
  font: 700 0.62rem/1.2 var(--font-mono);
  letter-spacing: 0.08em;
}

.benchmark-context,
.benchmark-sources { color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.benchmark-context { margin: 13px 0 4px; }
.benchmark-sources { margin: 0; }
.benchmark-sources a { color: #7dd3fc; }

.result-note,
.article-meta {
  color: var(--text-muted) !important;
  font-size: 0.88rem !important;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.action-btn,
.text-btn {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 650;
}

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

.action-btn:hover,
.text-btn:hover {
  border-color: #93c5fd;
}

.text-btn {
  background: transparent;
  color: #bfdbfe;
  padding-inline: 0;
  border-color: transparent;
}

.local-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.local-history h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.local-history ol {
  margin-left: 20px;
  color: var(--text-muted);
}

/* Content sections */
.content-section {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 21, 37, 0.82), rgba(10, 14, 26, 0.86));
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 14px 45px rgba(0,0,0,0.20);
  border: 1px solid var(--border);
}

.content-section::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 0;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 12px rgba(124,247,255,0.5);
}

.content-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.content-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
  color: #9feef5;
}

.content-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
}

.content-section p {
  margin-bottom: 14px;
  color: var(--text);
}

.content-section ul,
.content-section ol {
  margin: 10px 0 16px 20px;
}

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

.content-section a {
  color: var(--accent);
  text-decoration: none;
}

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

.explain-grid article {
  padding: 16px;
  background: rgba(4, 8, 18, 0.46);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.explain-grid h3 {
  margin-top: 0;
  font-size: 1rem;
}

.explain-grid p:last-child,
.sources-section li:last-child {
  margin-bottom: 0;
}

.source-list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.narrow-container {
  max-width: 820px;
}

.trust-hero {
  margin-bottom: 24px;
}

.inline-cta {
  color: var(--accent) !important;
}

.content-section a:hover {
  text-decoration: underline;
}

/* Interpretation table */
.interpret-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.interpret-table th,
.interpret-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.interpret-table th {
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 14px;
}

.interpret-table td {
  font-size: 15px;
}

.rating {
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.rating.excellent { background: rgba(34,197,94,0.15); color: #4ade80; }
.rating.very-good { background: rgba(59,130,246,0.15); color: #60a5fa; }
.rating.good { background: rgba(168,85,247,0.15); color: #c084fc; }
.rating.above-average { background: rgba(14,165,233,0.15); color: #38bdf8; }
.rating.average { background: rgba(249,115,22,0.15); color: #fb923c; }
.rating.below-average { background: rgba(234,179,8,0.15); color: #facc15; }
.rating.slow { background: rgba(239,68,68,0.15); color: #f87171; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.faq-item h2 {
  margin: 0;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* CTA */
.cta-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,247,255,0.28), transparent 28%),
    linear-gradient(135deg, #1d3370, #5225a9 58%, #195b75);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 24px 0;
}

.cta-box h2 {
  color: #fff;
  margin-bottom: 8px;
}

.cta-box p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}

.cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  transition: transform 0.15s;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: rgba(5, 7, 17, 0.86);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}

/* Product mode directory */
.mode-directory {
  margin: 0 0 28px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8, 12, 24, 0.74);
  box-shadow: 0 18px 50px rgba(0,0,0,0.2);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading-row h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.mode-count,
.mode-index {
  color: #6f7f9e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

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

.mode-card {
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 24px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(17,25,45,0.95), rgba(7,10,20,0.98));
  transition: transform .22s, border-color .22s, box-shadow .22s;
}

.mode-card::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  top: -110px;
  right: -70px;
  border-radius: 50%;
  background: rgba(124,247,255,0.12);
  filter: blur(12px);
}

.mode-card.speed-card::before { background: rgba(139,92,246,0.19); }
.mode-card:hover { transform: translateY(-3px); border-color: var(--border-bright); box-shadow: var(--glow); }
.mode-card strong { position: relative; font-size: 1.35rem; margin: 12px 0 5px; }
.mode-card p { position: relative; color: var(--text-muted); margin: 0 0 18px; }
.mode-index { position: relative; color: var(--accent); }
.mode-link { position: relative; color: #d9fbff; font-weight: 750; }
.mode-link b { display: inline-block; margin-left: 5px; transition: transform .2s; }
.mode-card:hover .mode-link b { transform: translateX(4px); }

/* P0 interactive modes */
.mode-hero h1 {
  background: linear-gradient(105deg, #fff 18%, #9eeeff 55%, #b4a4ff 86%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mode-console { max-width: 980px; margin-inline: auto; }

.mode-surface {
  position: relative;
  width: 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  border: 0;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  text-align: center;
  font: inherit;
  transition: background .18s, box-shadow .18s;
}

.mode-surface.state-idle,
.mode-surface.state-result,
.mode-surface.state-done,
.mode-surface.state-gameover {
  background: radial-gradient(circle at center, rgba(111,93,255,.16), transparent 42%), #090e1c;
}

.mode-surface.state-waiting {
  background: radial-gradient(circle at center, #e34167, #9c183b 72%);
  box-shadow: inset 0 0 90px rgba(255,255,255,.09);
}

.mode-surface.state-go {
  background: radial-gradient(circle at center, #17df8a, #047b4c 72%);
  box-shadow: inset 0 0 100px rgba(255,255,255,.11), 0 0 60px rgba(23,223,138,.22);
}

.mode-surface.state-early,
.mode-surface.state-gameover {
  background: radial-gradient(circle at center, rgba(225,62,99,.24), transparent 45%), #130a14;
}

.mode-surface .surface-text { font-size: 1.55rem; font-weight: 750; }
.mode-result-panel { background: rgba(9,14,28,.95); }
.game-result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.speed-round-chart { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.mode-page .content-section,
.mode-page .mode-directory { max-width: 980px; margin-inline: auto; margin-bottom: 24px; }

@media (hover: hover) {
  .content-section,
  .explain-grid article,
  .result-metric {
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
  }

  .explain-grid article:hover,
  .result-metric:hover {
    transform: translateY(-2px);
    border-color: rgba(124,247,255,0.35);
  }
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.footer-links h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    gap: 16px;
  }

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

  .hero h1 {
    font-size: 2.55rem;
  }

  .home-hero {
    padding: 32px 0 0;
  }

  .hero-kicker {
    font-size: 0.58rem;
    gap: 8px;
  }

  .hero-signals {
    flex-wrap: wrap;
    row-gap: 5px;
  }

  .console-bar {
    grid-template-columns: 1fr 1fr;
  }

  .console-coordinates {
    display: none;
  }

  .test-surface {
    height: 310px;
  }

  .result-panel {
    padding: 20px;
  }

  .result-heading {
    flex-direction: column;
  }

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

  .benchmark-heading { flex-direction: column; }
  .benchmark-grid { grid-template-columns: 1fr; }

  .explain-grid {
    grid-template-columns: 1fr;
  }

  .round-chart {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    overflow-x: auto;
  }

  .result-display {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-section {
    padding: 20px;
  }

  .mode-directory { padding: 20px; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .mode-card-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 190px; }
  .mode-surface { min-height: 310px; }
  .game-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .speed-round-chart { grid-template-columns: repeat(5, minmax(60px, 1fr)); overflow-x: auto; }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .content-section::before {
    left: 20px;
  }
}

@media (max-width: 440px) {
  .container { padding-inline: 14px; }
  .header-inner { gap: 8px; }
  .logo { font-size: 14px; white-space: nowrap; }
  .logo svg { width: 32px; height: 32px; }
  .lang-btn { padding-inline: 10px; }
  .hero p { font-size: 1rem; }
  .hero-kicker span { width: 20px; }
  .test-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
  .stat { padding: 13px 8px; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--border); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .test-area { border-radius: 15px; }
  .console-bar { padding-inline: 14px; }
  .surface-reticle { width: 112px; height: 112px; }
  .result-metric strong { font-size: 1.22rem; }
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .content-section,
[dir="rtl"] .result-panel,
[dir="rtl"] .footer-links {
  text-align: right;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
