/* ── Variables ── */
:root {
  --bg:         #0a0c0f;
  --bg2:        #0f1218;
  --bg3:        #151a22;
  --border:     rgba(255,255,255,0.07);
  --text:       #e8edf3;
  --text-muted: #8b9ab0;
  --accent:     #3b82f6;       /* blue — matches the app */
  --accent2:    #ff5c35;       /* effort orange */
  --hr-color:   #ff4f6b;       /* HR red-pink */

  /* power zones */
  --z1: #4a9eff22;
  --z2: #4a9eff;
  --z3: #fbbf24;
  --z4: #f97316;
  --z5: #ef4444;
  --z6: #a855f7;
  --z7: #ec4899;

  --radius:  6px;
  --radius-lg: 12px;

  /* CJK fallbacks: Barlow and DM Mono have no Japanese glyphs. Latin text
     still renders in the web fonts; only missing glyphs fall through. */
  --font-cjk:     'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Noto Sans CJK JP', 'Yu Gothic', Meiryo;
  --font-display: 'Barlow Condensed', var(--font-cjk), sans-serif;
  --font-body:    'Barlow', var(--font-cjk), sans-serif;
  --font-mono:    'DM Mono', var(--font-cjk), monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Reusable ── */
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0c0f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 15px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }

.appstore-badge { display: inline-flex; align-items: center; transition: opacity 0.15s; }
.appstore-badge:hover { opacity: 0.8; }
.appstore-badge-svg { height: 40px; width: auto; display: block; }

.btn-nav {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.btn-nav:hover { background: var(--accent); color: #0a0c0f; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(10,12,15,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.logo-watt { color: var(--text); }
.logo-log  { color: var(--text-muted); }
.logo-dot  { color: var(--accent); font-size: 10px; margin-left: 2px; line-height: 1; }

.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* Phone menu button: hidden until the 900px breakpoint hides .nav-links. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); }

/* ── Language dropdown ── */
.nav-lang-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  margin-left: auto;
  flex-shrink: 0;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
  font-size: 13px;
}
.lang-trigger:hover { border-color: var(--accent); color: var(--accent); }
.lang-chevron {
  width: 8px;
  height: 5px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.18s ease;
  margin-top: 1px;
}
.nav-lang-dropdown.open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(10,12,15,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  min-width: 100px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  flex-direction: column;
  gap: 2px;
}
.nav-lang-dropdown.open .lang-menu { display: flex; }
.lang-option {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}
.lang-option:hover { background: var(--border); color: var(--text); }

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 64px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 48px;
  z-index: 2;
}

/* ── Hero below (sub, CTA, stats) ── */
.hero-below {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 64px;
}
.hero-below-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.eyebrow-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.06em;
}
.live-riders {
  color: var(--accent);
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 60px rgba(59,130,246,0.4);
}

.hero-sub {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-platform-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  padding-right: 40px;
}
.stat-div {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin-right: 40px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text);
  line-height: 1;
}
.stat-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── Hero Chart ── */
.hero-chart {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 0;
}
.chart-svg {
  width: 100%;
  height: 160px;
  display: block;
}
.watt-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawLine 2.5s ease-out 0.5s forwards;
}
.hr-line {
  stroke: var(--hr-color);
  stroke-width: 1.5;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawLine 2.5s ease-out 0.9s forwards;
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
.chart-labels {
  display: flex;
  gap: 24px;
  padding: 12px 0;
  justify-content: flex-end;
}
.chart-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.watt-label { color: var(--accent); }
.hr-label   { color: var(--hr-color); }

.app-link-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .app-link-actions { align-items: flex-start; }
}

/* ── Zone Bar ── */
.zone-bar {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.zone-ticker {
  display: flex;
  width: max-content;
  animation: ticker 20s linear infinite;
}
.zone {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.z1 { color: #4a9eff; }
.z2 { color: #60a5fa; }
.z3 { color: #fbbf24; }
.z4 { color: #f97316; }
.z5 { color: #ef4444; }
.z6 { color: #a855f7; }
.z7 { color: #ec4899; }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Features ── */
.features {
  padding: 120px 0;
  background: var(--bg);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.feature-card {
  background: var(--bg2);
  padding: 36px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: rgba(59,130,246,0.2);
}
.card-wide {
  grid-column: span 2;
}
.card-dark {
  background: var(--bg3);
}
.card-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 20px;
}
.card-icon svg {
  width: 100%;
  height: 100%;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.wip-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* Interval demo bars */
.card-demo.intervals {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  margin-top: 24px;
}
.interval {
  flex: 1;
  height: var(--h);
  background: var(--c);
  border-radius: 2px;
  opacity: 0.8;
}

/* TSS bars */
.tss-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 50px;
  margin-top: 24px;
}
.tss-week {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.tss-week span {
  width: 100%;
  height: var(--v);
  background: rgba(74,158,255,0.4);
  border-radius: 2px;
  margin-top: auto;
  transition: background 0.2s;
}
.tss-week.active span { background: var(--accent); opacity: 0.8; }
.tss-week.rest span   { background: rgba(255,255,255,0.1); }
.tss-week small {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── How It Works ── */
.how {
  padding: 120px 0;
  background: var(--bg2);
}
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}
.step {
  flex: 1;
  padding: 0 24px;
}
.step-line {
  width: 60px;
  flex-shrink: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(59,130,246,0.3), var(--border));
}
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: rgba(59,130,246,0.12);
  line-height: 1;
  margin-bottom: 16px;
}
.step-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.step-body p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ── Metrics Strip ── */
.metrics-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  padding: 32px 24px;
}
.metrics-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.metric-val {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.05em;
}
.metric-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ── Early Access ── */
.early-access {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.ea-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.ea-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.ea-copy p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.ea-quote {
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin: 20px 0 24px;
  line-height: 1.6;
}

.ea-promises {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ea-promises li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.ea-promises li svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.ea-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.input-row {
  display: flex;
  gap: 8px;
}
.input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.input-row input:focus {
  border-color: rgba(59,130,246,0.5);
}
.input-row input::placeholder { color: var(--text-muted); }
.ea-fine {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.ea-success {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  min-height: 20px;
}
.ea-success--ok { color: #4ade80; }
.ea-success--err { color: #f87171; }

/* ── Logo text ── */
.logo-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.logo-gear {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.logo-textwrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.logo-dot-pro {
  color: #f59e0b;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Article sections ── */
.article-section {
  padding: 100px 0;
  background: var(--bg);
}
.article-section--dark {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Persona grid ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.persona-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 36px;
  transition: border-color 0.2s;
}
.persona-card:hover {
  border-color: rgba(59,130,246,0.2);
}
.persona-card--accent {
  background: var(--bg3);
}
.persona-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 20px;
}
.persona-icon svg {
  width: 100%;
  height: 100%;
}
.persona-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.persona-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.persona-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.persona-points li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding-left: 14px;
  position: relative;
}
.persona-points li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Explainer list ── */
.explainer-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 800px;
  margin: 0 auto 64px;
}
.explainer-item {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.explainer-item:first-child {
  border-top: 1px solid var(--border);
}
.explainer-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: rgba(59,130,246,0.55);
  line-height: 1;
  flex-shrink: 0;
  width: 80px;
  padding-top: 4px;
}
.explainer-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.explainer-body p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── App link banner ── */
.app-link-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--bg3);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  max-width: 800px;
  margin: 0 auto;
}
.app-link-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-link-text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.app-link-text span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Beta counter ── */
.beta-counter {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.beta-spots {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
}
.beta-spots-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── EA form wrap ── */
.ea-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ea-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.ea-divider::before,
.ea-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-app-direct {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
}
.btn-app-direct:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.input-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── Made in Poland ── */
.made-in-pl {
  color: rgba(107,122,141,0.7);
}


/* ── Footer ── */
.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
  text-align: left;
}
.footer-brand {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.footer-grid {
  flex: 2 1 600px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 32px 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1120px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-grants-badge { display: flex; align-items: center; opacity: 0.85; transition: opacity 0.2s; }
.footer-grants-badge:hover { opacity: 1; }
.footer-grants-badge img { display: block; height: 28px; width: auto; }
.footer-langs { display: flex; gap: 18px; }
.footer-langs a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-langs a:hover { color: var(--text); }
@media (max-width: 760px) {
  .footer-inner { gap: 40px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.05em;
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.footer-nav {
  display: flex;
  gap: 24px;
}
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--text); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(107,122,141,0.5);
}

/* ── Section sub-heading ── */
.section-sub {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 40px;
}
.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition: border-color 0.2s;
}
.pricing-card:hover {
  border-color: rgba(59,130,246,0.2);
}
.pricing-card--featured {
  background: var(--bg3);
  border-color: rgba(59,130,246,0.25);
  z-index: 1;
}
.pricing-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  width: fit-content;
}
.pricing-tier {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
}
.price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
  color: var(--text);
}
.price-period {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.pricing-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 28px;
  flex-grow: 0;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing-features li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding-left: 18px;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.pricing-spots {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.spots-count {
  font-weight: 500;
  color: var(--accent2);
}
.pricing-cta {
  width: 100%;
  justify-content: center;
}
.pricing-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  max-width: 600px;
  margin: 0 auto;
}

/* ── FAQ ── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: color 0.15s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--accent); }
.faq-chevron {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s;
  font-style: normal;
}
details[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-answer p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}
.faq-answer strong { color: var(--text); }
.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59,130,246,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.faq-answer a:hover {
  text-decoration-color: var(--accent);
}
.faq-link-row {
  margin-top: 4px;
}
.faq-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  color: var(--accent) !important;
}
.faq-link:hover { opacity: 0.8; }

.faq-coffee {
  margin-top: 12px;
}
.faq-coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 24px;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s, border-color 0.2s;
}
.faq-coffee-btn:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.35);
}

/* ── Sub-page shared ── */
.subpage-hero {
  padding: 140px 24px 80px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.subpage-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.subpage-hero .section-tag {
  display: block;
  margin-bottom: 16px;
}
.subpage-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.subpage-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.subpage-hero p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 600px;
}
.subpage-content {
  padding: 80px 24px;
  background: var(--bg);
}
.subpage-content-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.subpage-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text);
}
.subpage-section p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.subpage-section p:last-child { margin-bottom: 0; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.status-badge--supported {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
}
.status-badge--coming-soon {
  background: rgba(251,191,36,0.08);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.15);
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.platform-grid--three {
  grid-template-columns: repeat(3, 1fr);
}
.platform-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 28px;
}
.platform-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.platform-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}
.download-card-btn {
  margin-top: 18px;
  width: 100%;
  justify-content: center;
}
/* Riding in the browser needs Web Bluetooth, which no phone browser has. */
.hero-cta-web { display: none; }
@media (min-width: 768px) {
  .hero-cta-web { display: inline-flex; }
}

.platform-card--web {
  border-color: var(--accent);
  max-width: 720px;
}
.platform-card-note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.download-coming-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.trainer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.trainer-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.trainer-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.trainer-table td:first-child { color: var(--text); font-weight: 500; }
.trainer-table tr:last-child td { border-bottom: none; }
.trainer-table tr:hover td { background: rgba(255,255,255,0.02); }
.tag-yes {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4ade80;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.15);
  padding: 2px 8px;
  border-radius: 20px;
}
.subpage-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.subpage-list li {
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}
.subpage-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.subpage-list li strong { color: var(--text); }

.tag-partial {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Menu bar feature (homepage) ── */
.menubar-feature {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 0;
}
.menubar-feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.menubar-feature-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.menubar-feature-copy h2 em {
  font-style: normal;
  color: var(--accent);
}
.menubar-feature-copy p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.menubar-bullets {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menubar-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.menubar-bullets li svg {
  width: 16px; height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.menubar-feature-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* ── Menu bar mock UI ── */
.menubar-strip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.mb-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mb-icon { font-size: 13px; }
.mb-hr  { color: #f87171; }
.mb-pwr { color: #fbbf24; }
.mb-cad { color: #4ade80; }

.menubar-dropdown {
  background: #1a1f2a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 8px 8px 8px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.mb-metric {
  background: #0f1318;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mb-metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mb-metric-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}
.mb-metric-val small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}
.mb-metric-val--hr    { color: #f87171; }
.mb-metric-val--pwr   { color: #fbbf24; }
.mb-metric-val--cad   { color: #4ade80; }
.mb-metric-val--grade { color: #60a5fa; }

/* ── Feature highlight (features.html) ── */
.feature-highlight {
  border: 1px solid rgba(59,130,246,0.15);
  background: rgba(59,130,246,0.03);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.feature-highlight-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.feature-highlight h2 { margin-bottom: 14px; }
.feature-highlight .menubar-demo {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feature-highlight .menubar-dropdown {
  max-width: 300px;
}

/* ── Feature alert preview ── */
.feature-alert-preview {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.18);
  border-left: 3px solid rgba(251,191,36,0.6);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.feature-alert-preview strong { color: var(--text); }
.alert-icon {
  font-size: 16px;
  line-height: 1.5;
  flex-shrink: 0;
  opacity: 0.8;
}

/* ── Feature screenshot ── */
.feature-screenshot {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.feature-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}
.feature-screenshot figcaption {
  padding: 12px 16px;
  background: var(--bg3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

/* ── Plans disclaimer ── */
.plans-disclaimer {
  background: rgba(251,191,36,0.05);
  border-bottom: 1px solid rgba(251,191,36,0.12);
}
.plans-disclaimer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(251,191,36,0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.plans-disclaimer-inner p { color: inherit; margin: 0; }

/* ── Plans filter bar ── */
.plans-filter-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 64px;
  z-index: 10;
}
.plans-filter-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 16px 20px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.filter-btn:hover { color: var(--text); }
.filter-btn--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Plans grid ── */
.plans-section {
  background: var(--bg);
  padding: 60px 24px 100px;
}
.plans-grid-wrap {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.plan-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.2s;
}
.plan-card:hover { border-color: rgba(59,130,246,0.2); }
.plan-card-top {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border);
}
.plan-card-mid {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}
.plan-card-bottom {
  padding: 24px 32px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plan-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.plan-level {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.plan-level--beginner {
  background: rgba(34,197,94,0.08);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.15);
}
.plan-level--intermediate {
  background: rgba(251,191,36,0.08);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.15);
}
.plan-level--advanced {
  background: rgba(239,68,68,0.08);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.15);
}
.plan-weeks {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.plan-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.2;
}
.plan-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}
.plan-stats {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
}
.plan-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
}
.plan-stat:not(:last-child) {
  border-right: 1px solid var(--border);
  margin-right: 16px;
}
.plan-stat-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1;
}
.plan-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.plan-zones {
  display: flex;
  gap: 4px;
}
.pz {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
}
.pz--z1 { background: rgba(74,158,255,0.08); color: #4a9eff; border: 1px solid rgba(74,158,255,0.15); }
.pz--z2 { background: rgba(96,165,250,0.08); color: #60a5fa; border: 1px solid rgba(96,165,250,0.15); }
.pz--z3 { background: rgba(251,191,36,0.08); color: #fbbf24; border: 1px solid rgba(251,191,36,0.15); }
.pz--z4 { background: rgba(249,115,22,0.08); color: #f97316; border: 1px solid rgba(249,115,22,0.15); }
.pz--z5 { background: rgba(239,68,68,0.08);  color: #ef4444; border: 1px solid rgba(239,68,68,0.15); }
.pz--z6 { background: rgba(168,85,247,0.08); color: #a855f7; border: 1px solid rgba(168,85,247,0.15); }

.plan-goal-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.plan-goal-tag svg { color: var(--accent); width: 14px; height: 14px; }

/* ── Phase bar ── */
.plan-phases { margin-bottom: 4px; }
.phase-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  gap: 1px;
  background: var(--bg3);
}
.phase-seg {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  height: 100%;
}
.phase-seg--base     { background: rgba(96,165,250,0.5); }
.phase-seg--build    { background: rgba(249,115,22,0.5); }
.phase-seg--peak     { background: rgba(239,68,68,0.5); }
.phase-seg--recovery { background: rgba(34,197,94,0.4); }

.plan-who {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.plan-who strong { color: var(--text); }

/* ── Zones table ── */
.zones-table-wrap {
  overflow-x: auto;
}
.zones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.zones-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.zones-table td {
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}
.zones-table td:first-child { width: 60px; }
.zones-table td:nth-child(2) { color: var(--text); font-weight: 500; }
.zones-table td:nth-child(3) {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}
.zones-table tr:last-child td { border-bottom: none; }
.zones-table tr:hover td { background: rgba(255,255,255,0.015); }
.zone-dot {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 20px;
}
.z1-dot { background: rgba(74,158,255,0.08);  color: #4a9eff;  border: 1px solid rgba(74,158,255,0.15); }
.z2-dot { background: rgba(96,165,250,0.08);  color: #60a5fa;  border: 1px solid rgba(96,165,250,0.15); }
.z3-dot { background: rgba(251,191,36,0.08);  color: #fbbf24;  border: 1px solid rgba(251,191,36,0.15); }
.z4-dot { background: rgba(249,115,22,0.08);  color: #f97316;  border: 1px solid rgba(249,115,22,0.15); }
.z5-dot { background: rgba(239,68,68,0.08);   color: #ef4444;  border: 1px solid rgba(239,68,68,0.15); }
.z6-dot { background: rgba(168,85,247,0.08);  color: #a855f7;  border: 1px solid rgba(168,85,247,0.15); }
.z7-dot { background: rgba(236,72,153,0.08);  color: #ec4899;  border: 1px solid rgba(236,72,153,0.15); }

/* ── Home banner (bg of hero) ── */
.home-banner {
  position: relative;
  z-index: 0;
  line-height: 0;
}
.home-banner picture { display: block; width: 100%; height: 100;}
.home-banner img {
  display: block;
  width: 100%;
  height: auto;
}
.home-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,12,15,0.1) 0%,
    rgba(10,12,15,0.55) 70%,
    rgba(10,12,15,0.85) 100%
  );
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .menubar-feature-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .plans-grid-wrap {
    grid-template-columns: 1fr 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-wide { grid-column: span 2; }

  .steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  .step-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--border), rgba(59,130,246,0.3), var(--border));
    margin-left: 24px;
  }
  .step { padding: 0; }

  .ea-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nav-links { display: none; }
  .btn-nav { display: none; }
  .nav-lang-dropdown { margin-left: auto; border-left: none; padding-left: 0; }

  /* Row: logo · language · menu button. The open menu drops below the bar;
     flex order keeps this independent of where site_nav.py puts the button. */
  .nav-lang-dropdown { order: 2; }
  .nav-toggle { display: flex; order: 3; }
  .nav-links.open {
    display: flex;
    order: 4;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 24px 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open li:last-child a { border-bottom: none; }
  .nav-links.open a[aria-current="page"] { color: var(--accent); }

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

  .app-link-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .plans-grid-wrap {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .card-wide { grid-column: span 1; }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  .stat-div { display: none; }

  .metrics-inner {
    justify-content: center;
    gap: 32px;
  }

  .input-row {
    flex-direction: column;
  }

  .explainer-item {
    flex-direction: column;
    gap: 8px;
  }
  .explainer-num {
    font-size: 2rem;
    width: auto;
  }
}

/* ── Contact form ── */
.section-inner--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
.contact-intro {
  margin-top: 18px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-field input,
.contact-field textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.contact-field textarea {
  resize: vertical;
  min-height: 160px;
  font-family: var(--font-body);
}
.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(59,130,246,0.5);
}
.contact-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.contact-actions .ea-success {
  margin: 0;
}

/* ── Community list ── */
.community-subhead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.01em;
  margin-bottom: 32px;
  text-align: center;
}
@media (max-width: 600px) {
  .contact-form { padding: 20px; }
}

/* Blog in-text "read next" block (injected after the lead paragraph) */
.read-next { margin: 28px 0; padding: 18px 20px; border-left: 3px solid #3B82F6;
             border-radius: 8px; background: var(--card, rgba(255,255,255,0.03)); }
.read-next .rn-label { display: block; font-size: 0.8rem; text-transform: uppercase;
             letter-spacing: 0.08em; color: var(--text-muted, #8b9ab0); margin-bottom: 8px; }
.read-next ul { list-style: none; padding-left: 0; margin: 0; }
.read-next li { margin: 6px 0; line-height: 1.5; }
.read-next a { color: #3B82F6; text-decoration: none; font-weight: 600; }
.read-next a:hover { text-decoration: underline; }

/* ─── Public calculators (/tools) ──────────────────────────────── */

.calc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
}
.calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.calc-units { display: flex; gap: 6px; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.calc-field { min-width: 0; }
.calc-field input,
.calc-field select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.calc-field input:focus,
.calc-field select:focus { border-color: rgba(59,130,246,0.5); }

.calc-results {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.calc-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.calc-stat { min-width: 120px; }
.calc-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.calc-stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}
.calc-stat-value small {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}
.calc-stat--muted .calc-stat-value { color: var(--text); }

.calc-zones { width: 100%; border-collapse: collapse; margin-top: 22px; }
.calc-zones td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.calc-zones tr:last-child td { border-bottom: none; }
.calc-zones .calc-num {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}
.calc-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}

/* Inputs incomplete — dim the stale figures rather than showing a wrong one. */
.calc--invalid .calc-results { opacity: 0.35; }

.calc-note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.calc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 36px 0;
}
.calc-cta p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.calc-cta strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 16px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.tool-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.tool-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-2px); }
.tool-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 8px;
}
.tool-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }

.calc-faq { margin-top: 14px; }
.calc-faq h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin: 22px 0 8px;
}

.tool-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.tool-related a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  transition: border-color 0.2s;
}
.tool-related a:hover { border-color: rgba(59,130,246,0.5); }

@media (max-width: 600px) {
  .calc { padding: 20px; }
  .calc-stat-value { font-size: 2rem; }
  .calc-primary { gap: 20px; }
}

/* Tool pages carry ~400 words of reading copy each, so their body text uses the
   blog's reading typography rather than the tighter marketing-subpage scale.
   Scoped to .tools-page: features/download/compatible-* keep their look. */
.tools-page .subpage-section p {
  font-size: 1.08rem;
  color: var(--text);
}
.tools-page .calc-faq h3 {
  font-size: 1.12rem;
}

/* ── Hero: browser vs app paths (UX review 2026-09-28) ── */
.hero-paths {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: grid;
  gap: 10px;
  max-width: 620px;
}
.hero-path {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.hero-path svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.hero-path strong { color: var(--text); font-weight: 600; }
/* main.js marks the path that fits the visitor's device. */
.hero-path.is-recommended strong { color: var(--accent); }

.menubar-app-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.menubar-app-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--accent);
}
.menubar-app-link:hover { opacity: 0.8; }

/* ── Features at a glance: grouped by when you use them ── */
.feature-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.feature-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 32px;
}
.feature-group-icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 18px; }
.feature-group-icon svg { width: 100%; height: 100%; }
.feature-group-when {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.feature-group h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.feature-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.feature-group-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.feature-group-list li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.feature-groups-more { margin-top: 24px; text-align: center; }
.feature-groups-more a { color: var(--accent); font-size: 14px; }
@media (max-width: 900px) {
  .feature-groups { grid-template-columns: 1fr; }
}

/* ── "Learn more" under the How-it-works steps ── */
.learn-more { margin-top: 12px; }
.learn-more summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent);
}
.learn-more summary::-webkit-details-marker { display: none; }
.learn-more summary::after { content: '↓'; transition: transform 0.2s; }
.learn-more[open] summary::after { transform: rotate(180deg); }
.learn-more p { margin-top: 10px; font-size: 14px; }

/* ── Jargon tooltips: [[ABBR]] in the copy, expanded by build.py ── */
.term {
  position: relative;
  display: inline-block;
  color: var(--text);
  text-decoration: underline dotted rgba(59,130,246,0.7);
  text-underline-offset: 3px;
  cursor: help;
}
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Fixed, positioned by main.js from the term's rect: a fixed bubble can't
   widen the page on phones, and it is clamped inside the viewport. */
.term-tip {
  position: fixed;
  z-index: 50;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
  white-space: normal;
  /* display, not visibility: a hidden bubble near the screen edge must not
     widen the page on phones. */
  display: none;
  pointer-events: none;
}
.term:hover .term-tip,
.term:focus .term-tip,
.term.is-open .term-tip { display: block; }

/* ── FAQ: smooth open where the browser supports animating <details> ── */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.25s ease, content-visibility 0.25s allow-discrete;
  }
  .faq-item[open]::details-content { height: auto; }
}

/* ── Features page UX pass (2026-09-28) ── */

/* Menu bar mock: a pulsing dot while main.js plays live values. */
.menubar-strip.is-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: mb-pulse 1.6s ease-out infinite;
}
@keyframes mb-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  100% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
}
[data-mb] { font-variant-numeric: tabular-nums; }

/* Post-ride metrics: one plain line each, detail on demand. */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
  align-items: start;
}
.metric-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.metric-card[open] { border-color: rgba(59,130,246,0.3); }
.metric-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-card summary::-webkit-details-marker { display: none; }
.metric-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.metric-short { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.metric-toggle { font-size: 13px; color: var(--accent); margin-top: 2px; }
.metric-toggle::after { content: '↓'; display: inline-block; margin-left: 4px; transition: transform 0.2s; }
.metric-card[open] .metric-toggle::after { transform: rotate(180deg); }
.metric-card > p { margin: 12px 0 0; font-size: 14px; }
.metric-viz { width: 100%; max-width: 240px; height: auto; margin: 6px 0 2px; }
.metric-viz text { font-family: var(--font-mono); font-size: 9px; fill: var(--text-muted); }
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
}

/* Recovery reads as rest: teal and a moon, not the warning amber. */
.feature-highlight--recovery {
  border-color: rgba(45,212,191,0.2);
  background: rgba(45,212,191,0.03);
}
.feature-highlight--recovery .feature-highlight-label {
  color: #2dd4bf;
  background: rgba(45,212,191,0.08);
  border-color: rgba(45,212,191,0.2);
}
.feature-alert-preview--recovery {
  background: rgba(45,212,191,0.06);
  border-color: rgba(45,212,191,0.2);
  border-left-color: rgba(45,212,191,0.7);
}
.feature-alert-preview--recovery .alert-icon { color: #2dd4bf; opacity: 1; }
.feature-alert-preview--recovery .alert-icon svg { width: 20px; height: 20px; display: block; margin-top: 2px; }

/* Interactive Fitness / Fatigue / Form chart (drawn by main.js). */
.pmc-demo { margin: 24px 0; }
.pmc-demo-chart {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px 4px;
  touch-action: pan-y;
}
.pmc-demo-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pmc-demo-chart svg { display: block; width: 100%; height: auto; }
.pmc-demo-chart svg text { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); }
.pmc-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 4px 6px; font-size: 13px; color: var(--text-muted); }
.pmc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pmc-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.pmc-tip {
  position: absolute;
  top: 12px;
  pointer-events: none;
  background: var(--bg3);
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.pmc-tip b { font-family: var(--font-mono); font-weight: 500; }
.pmc-demo figcaption { margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* Files in and out, side by side. */
.file-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.file-tile {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.file-tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.file-tile-icon { width: 28px; height: 28px; color: var(--accent); }
.file-tile-icon svg { width: 100%; height: 100%; }
.file-chips { display: flex; gap: 6px; }
.file-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--accent);
}
.file-tile h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 10px;
}
.subpage-section .file-tile p { font-size: 14px; margin-bottom: 10px; }
.subpage-section .file-tile p.file-tile-more { font-size: 13px; margin-bottom: 0; }
@media (max-width: 760px) {
  .file-tiles { grid-template-columns: 1fr; }
}

/* ── Community page (UX review 2026-09-28) ── */

/* Icons inside buttons say what the click does (open Discord, write to us…). */
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* The page's one primary action, in Discord's own colour for recognition. */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865f2;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-discord .btn-icon { width: 22px; height: 22px; }
.btn-discord:hover { background: #4752c4; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(88,101,242,0.35); }

/* Secondary: outlined, lighter than the page's primary action. */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  border: 1px solid rgba(59,130,246,0.45);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: rgba(59,130,246,0.1); border-color: var(--accent); }

.community-hero .section-header { margin-bottom: 0; }
.community-hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.community-hero-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); }
.community-hero-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

.community-more { padding-top: 0; }
.community-subhead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
  text-align: center;
}
.community-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.community-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.community-card-icon { width: 28px; height: 28px; color: var(--accent); }
.community-card-icon svg { width: 100%; height: 100%; }
.community-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin: 0;
}
.community-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 6px; flex: 1; }
/* Help is a side topic: dashed frame, muted icon, its own kicker. */
.community-card--help { background: transparent; border-style: dashed; border-color: rgba(255,255,255,0.14); }
.community-card--help .community-card-icon { color: var(--text-muted); }
.community-card-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.community-app-banner { max-width: none; }
@media (max-width: 640px) {
  .community-cards { grid-template-columns: 1fr; }
  .community-app-banner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
}

/* Current section in the shared menu (site_nav.py). */
.nav-links a[aria-current="page"] { color: var(--text); }

/* ── About the creator (templated 2026-09-28; was 5 hand-written pages) ── */
.about-page { max-width: 760px; margin: 0 auto; padding: 120px 24px 80px; }
.about-page h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 12px; }
.about-lead { font-size: 1.1rem; line-height: 1.7; color: var(--text); margin-bottom: 32px; }
.about-page h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin: 40px 0 12px; color: var(--text); }
.about-page p, .about-page li { font-size: 15px; line-height: 1.75; color: #b0bac7; margin-bottom: 12px; }
.about-page p a, .about-page li a { color: var(--accent); text-decoration: underline; }
.about-page .author-photo { float: right; width: 200px; height: auto; margin: 0 0 12px 28px; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45)); }
@media (max-width: 600px) { .about-page .author-photo { float: none; display: block; margin: 0 auto 16px; width: 180px; } }

/* Tabs: rider's story vs engineering. */
.about-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); width: fit-content; max-width: 100%; }
.about-tabs[hidden] { display: none; }
.about-tabs button {
  border: none; background: transparent; color: var(--text-muted); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
  padding: 10px 18px; border-radius: var(--radius);
}
.about-tabs button[aria-selected="true"] { background: var(--accent); color: #0a0c0f; }
.about-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.about-panel > h2:first-child { margin-top: 32px; }

/* Link cards replace raw URLs. */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 20px 0 8px; clear: both; }
.link-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.link-card:hover { border-color: rgba(59,130,246,0.45); transform: translateY(-1px); }
.link-card-icon { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--accent); }
.link-card-icon svg { width: 22px; height: 22px; }
.link-card-text { display: flex; flex-direction: column; min-width: 0; }
.link-card-text strong { color: var(--text); font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.link-card-text span { color: var(--text-muted); font-size: 13px; }
.link-card-ext { margin-left: auto; color: var(--text-muted); font-size: 14px; }

/* Vertical timeline with milestone icons. */
.timeline { list-style: none; padding: 0; margin: 20px 0 8px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), rgba(59,130,246,0.15)); }
.timeline-item { position: relative; display: flex; gap: 18px; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-icon { position: relative; z-index: 1; width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--bg3); border: 1px solid rgba(59,130,246,0.4); color: var(--accent); }
.timeline-icon svg { width: 20px; height: 20px; }
.timeline-item:last-child .timeline-icon { background: var(--accent); color: #0a0c0f; }
.timeline-year { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); }
.timeline-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text); margin: 2px 0 4px; }
.timeline-body p { margin: 0; }

/* Tech stack chips by category. */
.stack-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 28px 0 12px; }
.stack-groups { display: grid; gap: 14px; }
.stack-group { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; }
.stack-group h4 { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); padding-top: 4px; }
.stack-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-page .stack-chips li { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.4; color: var(--text); background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); border-radius: 20px; padding: 4px 10px; }
@media (max-width: 600px) { .stack-group { grid-template-columns: 1fr; gap: 6px; } }
.about-details { margin-top: 20px; }
.about-details ul { margin-top: 12px; padding-left: 20px; list-style: disc; }

/* Open to work: set apart, at the end of the engineering story. */
.open-card { margin-top: 40px; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(255,92,53,0.06)); border: 1px solid rgba(59,130,246,0.3); }
.open-card-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent2); }
.about-page .open-card h2 { margin-top: 8px; }

.about-contact { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--border); }
/* A #engineering link lands below the sticky nav, not under it. */
.about-panel { scroll-margin-top: 90px; }

/* ── Download page (UX review 2026-09-28) ── */
.nobt-banner {
  position: relative; z-index: 5;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 760px; margin: 88px auto -56px; padding: 12px 16px;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.3); border-radius: var(--radius);
  font-size: 14px; line-height: 1.5; color: var(--text);
}
.nobt-banner[hidden] { display: none; }
.nobt-banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #fbbf24; }
@media (max-width: 800px) { .nobt-banner { margin: 80px 16px -48px; } }

.smart-pick { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.smart-pick[hidden] { display: none; }
.smart-pick [hidden] { display: none; }
.smart-pick-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.subpage-hero .smart-pick-note { margin: 0; font-size: 14px; color: var(--text-muted); }
.intel-warning {
  display: flex; flex-direction: column; gap: 4px; max-width: 560px; padding: 12px 16px;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.3); border-left: 3px solid #fbbf24; border-radius: var(--radius);
  font-size: 14px; line-height: 1.5; color: var(--text-muted);
}
.intel-warning strong { color: var(--text); }

.platform-card.is-detected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.status-badge--you { background: var(--accent); color: #0a0c0f; border-color: var(--accent); margin-right: 6px; }

.env-check { margin: 8px 0 20px; padding: 16px 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.env-check[hidden] { display: none; }
.env-check h3 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.env-check dl { display: grid; gap: 6px; margin: 0; }
.env-check dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; font-size: 14px; }
.env-check dl > div[hidden] { display: none; }
.env-check dt { color: var(--text-muted); }
.env-check dd { margin: 0; color: var(--text); }
.env-check dd[data-state]::before { content: '●'; margin-right: 6px; }
.env-check dd[data-state="ok"]::before { color: #4ade80; }
.env-check dd[data-state="warn"]::before { color: #fbbf24; }
.env-check dd[data-state="bad"]::before { color: #f87171; }
@media (max-width: 600px) { .env-check dl > div { grid-template-columns: 1fr; gap: 0; } }

.faq-steps { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.faq-steps ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.faq-steps li::marker { color: var(--accent); font-family: var(--font-mono); }
.faq-steps code { font-family: var(--font-mono); font-size: 13px; color: var(--text); background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

/* Seven menu items plus language switcher and download button share one row
   (site_nav.py): never wrap a label, and tighten before the phone menu kicks in. */
.nav-links { gap: 24px; }
.nav-links a { white-space: nowrap; }
@media (max-width: 1180px) {
  .nav-inner { gap: 24px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
}
/* Between tablet and desktop the download button yields to the menu
   (Download stays one click away in page CTAs and the footer). */
@media (max-width: 1040px) {
  .btn-nav { display: none; }
}
/* Logo + language + menu button must fit one row on small phones. */
@media (max-width: 900px) {
  .nav .nav-inner { gap: 12px; }
}
@media (max-width: 480px) {
  .nav { padding: 0 16px; }
  .nav .nav-inner { gap: 8px; }
  .nav-links.open { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) {
  .nav .logo-text { gap: 8px; }
  .nav .logo-gear { width: 32px; height: 32px; }
  .nav .logo-wordmark { font-size: 22px; }
}

/* ── Blog article prose: undo the global reset (margin 0, list-style none,
   links inheriting text colour) inside a post body. :where() keeps the
   specificity low so classed elements (.lead, .post-meta, .blog-back,
   .formula, .read-next) keep their own spacing and colours. ── */
:where(.post) > p { margin: 0 0 1.1em; }
:where(.post) > ul { list-style: disc; margin: 0 0 1.1em; }
:where(.post) > ol { list-style: decimal; margin: 0 0 1.1em; }
:where(.post) > ul > li, :where(.post) > ol > li { margin-bottom: 0.45em; }
:where(.post) > p a, :where(.post) > ul a, :where(.post) > ol a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
}
:where(.post) > p a:hover, :where(.post) > ul a:hover, :where(.post) > ol a:hover { color: #60a5fa; }

/* ── Blog index cards (UX review 2026-09-28): cover, title first, meta below ── */
.post-card {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  border: 1px solid var(--border, #2a2a32); border-radius: 14px; background: var(--card, #16161c);
  text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease;
}
.post-card:hover { border-color: #3B82F6; transform: translateY(-2px); }
.post-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg3); }
.post-card h2 {
  margin: 18px 22px 8px; font-size: 1.3rem; line-height: 1.25;
  /* Long titles stop at three lines instead of stretching the row. */
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .post-meta { margin: 0 22px 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--text-muted, #8c8c96); }
.post-card p {
  margin: 0 22px 22px; color: var(--muted, #c4c4cc); line-height: 1.6; font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Blog categories (UX review 2026-09-28) ── */
.blog-cats {
  max-width: 1120px; margin: 28px auto 24px; padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.blog-cats a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--border, #2a2a32); border-radius: 20px; background: var(--card, #16161c);
  color: var(--text-muted, #8c8c96); font-size: 14px; text-decoration: none; transition: border-color .15s, color .15s;
}
.blog-cats a:hover { border-color: #3B82F6; color: var(--text, #fff); }
.blog-cats a[aria-current="page"] { background: var(--accent, #3b82f6); border-color: var(--accent, #3b82f6); color: #0a0c0f; font-weight: 600; }
.blog-cats a span { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }
@media (max-width: 640px) {
  /* wrap, so the active category is always on screen */
  .blog-cats { gap: 6px; margin: 20px auto 16px; }
  .blog-cats a { padding: 6px 12px; font-size: 13px; }
}
.post-cover { position: relative; }
.post-cat {
  position: absolute; left: 12px; bottom: 12px; padding: 3px 10px; border-radius: 20px;
  background: rgba(10,12,15,0.82); border: 1px solid rgba(59,130,246,0.45);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text, #e8edf3);
}
.post-card > .post-cat { position: static; align-self: flex-start; margin: 18px 22px 0; }

/* Article figures: an enlarge button on each, and a full-screen view (main.js). */
.post figure.lb-figure { position: relative; }
.post figure.lb-figure > img, .post figure.lb-figure > svg { cursor: zoom-in; }
.lb-open-btn {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,12,15,0.72); color: #fff; cursor: pointer;
}
.lb-open-btn:hover, .lb-open-btn:focus-visible { background: var(--accent); border-color: var(--accent); }
html.lb-open, html.lb-open body { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 1000; overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 12px 16px; background: #050608; font-family: var(--font-body);
}
.lb-media { display: block; width: auto; max-width: 100%; max-height: calc(100vh - 140px); height: auto; cursor: zoom-in; }
svg.lb-media { width: 100%; max-width: 1100px; max-height: none; }
.lb.lb-zoomed { display: block; padding: 56px 0 16px; }
.lb.lb-zoomed .lb-media { max-width: none; max-height: none; cursor: zoom-out; }
.lb-hint { margin: 10px auto 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.lb.lb-zoomed .lb-hint { display: none; }
.lb-caption { max-width: 760px; margin: 12px auto 0; padding: 0 4px; font-size: 0.9rem; line-height: 1.45; color: var(--text-muted); text-align: center; }
.lb-close {
  position: fixed; top: 10px; right: 10px; width: 44px; height: 44px; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,12,15,0.8); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}

/* ── Japanese ──
   CJK glyphs are full-width, so the display sizes tuned for condensed Latin
   overflow and split words mid-phrase. Smaller hero, and keep phrases whole
   where the browser supports auto-phrase (others fall back to normal). */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(ja) .hero-title {
  font-size: clamp(1.85rem, 7.5vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: 0;
}
