/* ==========================================================================
   Crest · 山径 Landing Page Styles
   Aligned with docs/DESIGN.md · Mobile-First Precision · Zero Text Bloat
   ========================================================================== */

:root {
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC",
    system-ui, sans-serif;
  --crest-page: #f6f5f2;
  --crest-surface: #fffefa;
  --crest-card: rgb(255 255 255 / 86%);
  --crest-card-solid: #ffffff;
  --crest-ink: #192128;
  --crest-ink-secondary: #475569;
  --crest-ink-muted: #64748b;
  --crest-line: rgb(25 33 40 / 8%);
  --crest-line-strong: rgb(25 33 40 / 13%);
  --crest-action: #fc4c02;
  --crest-action-hover: #e04300;
  --crest-action-ink: #c23b00;
  --crest-action-tint: rgb(252 76 2 / 7%);
  --crest-shadow-sm: 0 1px 2px rgb(15 23 42 / 4%), 0 4px 12px rgb(15 23 42 / 3%);
  --crest-shadow-md: 0 2px 6px rgb(15 23 42 / 5%), 0 14px 36px rgb(15 23 42 / 8%);
  --crest-shadow-dialog:
    0 24px 56px rgb(15 23 42 / 18%), 0 2px 10px rgb(15 23 42 / 7%), inset 0 1px 0 rgb(255 255 255 / 85%);
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

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

html.scroll-smooth {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--crest-ink);
  background: var(--crest-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

.font-num {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ==========================================================================
   Subtle Topographic Backdrop
   ========================================================================== */
.topo-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.topo-mesh {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Layout Container & Sections
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 56px;
}

.section-header {
  margin-bottom: 26px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--crest-action-ink);
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--crest-ink);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--crest-action);
  outline-offset: 2px;
}

.btn-sm {
  height: 34px;
  padding-inline: 13px;
  font-size: 13px;
}

.btn-lg {
  height: 44px;
  padding-inline: 20px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-primary {
  background: var(--crest-action);
  color: #ffffff;
  box-shadow: 0 1px 2px rgb(252 76 2 / 24%);
}

.btn-primary:hover {
  background: var(--crest-action-hover);
}

.btn-outline {
  border-color: var(--crest-line-strong);
  background: var(--crest-card-solid);
  color: var(--crest-ink);
}

.btn-outline:hover {
  border-color: rgb(25 33 40 / 24%);
  background: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--crest-ink-secondary);
}

.btn-ghost:hover {
  background: rgb(15 23 42 / 5%);
  color: var(--crest-ink);
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(246 245 242 / 82%);
  border-bottom: 1px solid transparent;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
  }
}

.site-header.is-scrolled {
  background: rgb(255 254 250 / 88%);
  border-bottom-color: var(--crest-line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-icon {
  border-radius: 7px;
  flex: none;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--crest-ink);
}

.brand-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--crest-ink-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
  transition:
    background-color 140ms ease,
    color 140ms ease;
}

.main-nav a:hover {
  background: rgb(15 23 42 / 5%);
  color: var(--crest-ink);
}

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: rgb(15 23 42 / 4.5%);
  cursor: pointer;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding-inline: 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--crest-ink-muted);
}

.lang-pill.is-active {
  background: #ffffff;
  color: var(--crest-ink);
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding-top: 40px;
  padding-bottom: 44px;
}

.hero-copy {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 52px);
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--crest-ink);
}

.hero-accent {
  color: var(--crest-action);
}

.hero-lead {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--crest-ink-secondary);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: var(--crest-card);
  box-shadow: var(--crest-shadow-sm);
  overflow: hidden;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 12px;
  text-align: center;
  border-right: 1px solid var(--crest-line);
}

.hero-stat:last-child {
  border-right: 0;
}

.hero-stat strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--crest-ink);
}

.hero-stat span {
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

/* ==========================================================================
   Product Showcase Stage
   ========================================================================== */
.showcase-wrapper {
  margin-top: 32px;
}

.showcase-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  max-width: 460px;
  margin: 0 auto 14px;
  padding: 4px;
  border: 1px solid var(--crest-line);
  border-radius: 11px;
  background: rgb(15 23 42 / 4.5%);
}

.showcase-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding-inline: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.showcase-tab:hover {
  color: var(--crest-ink);
}

.showcase-tab.is-active {
  background: #ffffff;
  font-weight: 600;
  color: var(--crest-ink);
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.tab-index {
  font-size: 11px;
  font-weight: 600;
  color: var(--crest-ink-muted);
}

.showcase-tab.is-active .tab-index {
  color: var(--crest-action);
}

.device-frame {
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-md);
  overflow: hidden;
}

.device-topbar {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--crest-line);
  background: #f9f8f5;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgb(25 33 40 / 14%);
}

.window-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  color: var(--crest-ink-secondary);
}

.window-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  flex: none;
}

.address-sep {
  color: rgb(25 33 40 / 25%);
}

.showcase-panel {
  display: none;
}

.showcase-panel.is-active {
  display: block;
}

.screenshot-wrap {
  background: #f6f5f2;
  overflow: hidden;
}

.showcase-img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Interactive Climb & ERG Simulator
   ========================================================================== */
.sim-stage {
  padding: 20px;
  background: var(--crest-page);
}

.sim-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sim-route-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sim-route-meta h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--crest-ink);
}

.sim-route-meta p {
  margin: 0;
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-mode-group {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--crest-line);
  border-radius: 10px;
  background: rgb(15 23 42 / 4.5%);
}

.sim-mode-btn {
  height: 28px;
  padding-inline: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
  cursor: pointer;
}

.sim-mode-btn.is-active {
  background: #ffffff;
  font-weight: 600;
  color: var(--crest-ink);
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.sim-play-btn {
  min-width: 78px;
}

.sim-play-icon {
  font-size: 10px;
}

.sim-hud-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.sim-metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: var(--crest-card-solid);
  box-shadow: var(--crest-shadow-sm);
}

.sim-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sim-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--crest-ink-secondary);
}

.sim-zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(15 23 42 / 5%);
  font-size: 11px;
  font-weight: 600;
  color: var(--crest-ink);
}

.sim-zone-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f59e0b;
}

.sim-meta-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--crest-ink-secondary);
}

.sim-metric-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.sim-metric-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 34px;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--crest-ink);
}

.sim-metric-value small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crest-ink-muted);
}

.sim-metric-side {
  padding-bottom: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--crest-ink-muted);
}

.sim-metric-companion {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-bottom: 2px;
}

.sim-comp-label {
  font-size: 10px;
  color: var(--crest-ink-muted);
}

.sim-metric-companion strong {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.1;
  color: var(--crest-ink);
}

.sim-metric-companion small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--crest-ink-muted);
}

.sim-zone-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}

.sim-zone-bar span {
  height: 6px;
  border-radius: 999px;
  background: rgb(15 23 42 / 9%);
}

.sim-metric-sub {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

.sim-chart-box {
  padding: 14px 16px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: var(--crest-card-solid);
}

.sim-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

.grade-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.grade-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.g-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.g1 {
  background: #10b981;
}
.g2 {
  background: #eab308;
}
.g3 {
  background: #f97316;
}
.g4 {
  background: #ef4444;
}

.sim-svg-wrap {
  position: relative;
  height: 150px;
  border-radius: 10px;
  background: #f8f7f3;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
}

#sim-profile-svg {
  width: 100%;
  height: 100%;
}

.sim-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 51%;
  pointer-events: none;
}

.sim-cursor-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1.5px;
  background: rgb(252 76 2 / 55%);
}

.sim-cursor-beacon {
  position: absolute;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--crest-action);
  box-shadow: 0 1px 4px rgb(15 23 42 / 24%);
  transform: translateY(-50%);
}

.sim-scrubber-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

.crest-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--crest-action) 0%,
    var(--crest-action) var(--range-pct, 51%),
    rgb(15 23 42 / 12%) var(--range-pct, 51%),
    rgb(15 23 42 / 12%) 100%
  );
  cursor: pointer;
}

.crest-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--crest-action);
  box-shadow: 0 1px 4px rgb(15 23 42 / 24%);
}

.crest-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--crest-action);
  box-shadow: 0 1px 4px rgb(15 23 42 / 24%);
}

/* ==========================================================================
   Bento Features Grid (6-col: 4+2 / 2+4 / 3+3)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-3 {
  grid-column: span 3;
}

.bento-col-2 {
  grid-column: span 2;
}

.bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-lg);
  background: var(--crest-card-solid);
  box-shadow: var(--crest-shadow-sm);
}

.bento-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--crest-line);
  border-radius: 9px;
  background: var(--crest-page);
  color: var(--crest-ink);
  flex: none;
}

.bento-icon svg {
  width: 16px;
  height: 16px;
}

.bento-content h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--crest-ink);
}

.bento-content p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--crest-ink-secondary);
}

.bento-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: #f9f8f5;
}

/* Feature 1 Climb Visual */
.mini-climb-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--crest-ink-secondary);
}

.mini-climb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--crest-action);
}

.mini-climb-grade {
  margin-left: auto;
  font-weight: 700;
  color: var(--crest-action-ink);
}

.mini-climb-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 420 / 92;
}

/* Feature 2 ERG Bars */
.erg-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--crest-ink-secondary);
}

.erg-readout strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--crest-ink);
}

.erg-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 82px;
}

.erg-bar {
  height: var(--bar-h, 60%);
  padding: 0;
  border: 0;
  border-radius: 4px 4px 2px 2px;
  background: var(--bar-color, #94a3b8);
  opacity: 0.48;
  cursor: pointer;
  transition: opacity 140ms ease;
}

.erg-bar:hover,
.erg-bar.is-selected {
  opacity: 1;
}

/* Feature 3 LAN Diagram */
.lan-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.lan-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid var(--crest-line);
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
}

.lan-node--accent {
  border-color: rgb(252 76 2 / 35%);
}

.lan-node-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--crest-ink-muted);
}

.lan-node--accent .lan-node-badge {
  color: var(--crest-action-ink);
}

.lan-node strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crest-ink);
}

.lan-node small {
  font-size: 10.5px;
  color: var(--crest-ink-muted);
}

.lan-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--crest-ink-muted);
}

.lan-line {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--crest-action);
}

/* Feature 4 Analytics Visual */
.mini-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.mini-kpi {
  padding: 7px 8px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-kpi span {
  display: block;
  font-size: 10px;
  color: var(--crest-ink-muted);
}

.mini-kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--crest-ink);
}

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

.mini-poincare,
.mini-mmp {
  padding: 10px 12px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-chart-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--crest-ink-muted);
}

.mini-mmp-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  height: 54px;
  padding-top: 4px;
}

.mini-mmp-bars span {
  position: relative;
  height: var(--h, 70%);
  border-radius: 3px 3px 0 0;
  background: #334155;
}

.mini-mmp-bars i {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 9.5px;
  color: var(--crest-ink-muted);
}

.mini-mmp {
  padding-bottom: 20px;
}

/* Feature 5 BLE Sensors */
.sensor-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sensor-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: var(--crest-ink);
}

.s-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
  flex: none;
}

/* Feature 6 Local Storage */
.local-path {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crest-ink);
}

.local-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.local-tags span {
  padding: 3px 9px;
  border: 1px solid var(--crest-line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-lg);
  background: var(--crest-card-solid);
  box-shadow: var(--crest-shadow-sm);
}

.pricing-card--featured {
  border: 1.5px solid var(--crest-action);
  box-shadow:
    0 2px 10px rgb(252 76 2 / 8%),
    var(--crest-shadow-sm);
}

.plan-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.plan-name {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--crest-ink);
}

.plan-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--crest-action-tint);
  font-size: 11px;
  font-weight: 600;
  color: var(--crest-action-ink);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--crest-line);
}

.price-currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--crest-ink);
}

.price-amount {
  font-size: 38px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--crest-ink);
}

.price-strike {
  margin-left: 6px;
  font-size: 14px;
  color: var(--crest-ink-muted);
  text-decoration: line-through;
}

.price-unit {
  margin-left: 4px;
  font-size: 12.5px;
  color: var(--crest-ink-muted);
}

.plan-features {
  margin: 16px 0 22px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.plan-features li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--crest-ink-secondary);
}

.plan-features li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgb(25 33 40 / 28%);
}

.pricing-card--featured .plan-features li {
  color: var(--crest-ink);
}

.pricing-card--featured .plan-features li::before {
  background: var(--crest-action);
}

.pricing-footer {
  margin-top: auto;
}

/* ==========================================================================
   Download Grid (Windows + macOS Equal-Height 2-Column)
   ========================================================================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.download-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-lg);
  background: var(--crest-card-solid);
  box-shadow: var(--crest-shadow-sm);
}

.download-card-top {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.download-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin-top: auto;
}

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

.btn-ink {
  border: 1px solid var(--crest-ink);
  background: var(--crest-ink);
  color: #ffffff;
}

.btn-ink:hover {
  background: #27323c;
  border-color: #27323c;
}

.macos-notice {
  min-width: 0;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: #f9f8f5;
}

.macos-notice-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--crest-ink);
}

.macos-notice-desc {
  margin: 4px 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--crest-ink-secondary);
}

.macos-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--crest-line);
  border-radius: 8px;
  background: #ffffff;
}

.macos-cmd-row code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--crest-ink);
  white-space: nowrap;
}

.macos-cmd-row .copy-btn {
  flex: none;
  min-width: 54px;
  height: 28px;
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--crest-line);
  border-radius: 11px;
  background: var(--crest-page);
  color: var(--crest-ink);
  flex: none;
}

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

.platform-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--crest-ink);
}

.platform-meta {
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.flagship-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.flagship-pills span {
  padding: 4px 10px;
  border: 1px solid var(--crest-line);
  border-radius: 6px;
  background: var(--crest-page);
  font-size: 12px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
}

.flagship-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--crest-ink-secondary);
}

.step-arrow {
  color: rgb(25 33 40 / 28%);
}

.flagship-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flagship-roadmap {
  margin: 0;
  font-size: 11.5px;
  text-align: center;
  color: var(--crest-ink-muted);
}

.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 22px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.setup-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.setup-banner-copy strong {
  font-size: 15px;
  font-weight: 680;
  color: var(--crest-ink);
}

.setup-banner-copy span {
  font-size: 13.5px;
  color: var(--crest-ink-secondary);
}

.setup-banner-btn {
  flex: none;
}

/* ==========================================================================
   FAQ (Full Container Width — Matches Every Other Section)
   ========================================================================== */
.faq-section {
  padding-top: 24px;
  padding-bottom: 72px;
}

.faq-list {
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-lg);
  background: var(--crest-card-solid);
  box-shadow: var(--crest-shadow-sm);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--crest-line);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--crest-ink);
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--crest-ink-muted);
  flex: none;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--crest-ink);
}

.faq-item p {
  margin: 0;
  padding: 0 22px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--crest-ink-secondary);
}

/* ==========================================================================
   License Modal (Exact DESIGN.md .crest-dialog px-6 Grammar)
   ========================================================================== */
.license-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(460px, calc(100% - 24px));
  max-height: min(600px, calc(100dvh - 40px));
  padding: 0;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 16px;
  background: var(--crest-page);
  color: var(--crest-ink);
  box-shadow: var(--crest-shadow-dialog);
  overflow: hidden;
}

.license-dialog[open] {
  display: flex;
}

.license-dialog::backdrop {
  background: rgb(15 23 42 / 24%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.dialog-header,
.dialog-footer {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 24px;
  background: rgb(255 255 255 / 55%);
}

.dialog-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--crest-line);
}

.dialog-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dialog-brand img {
  border-radius: 6px;
}

.dialog-brand h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--crest-ink);
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--crest-ink-secondary);
  cursor: pointer;
}

.dialog-close:hover {
  background: rgb(15 23 42 / 6%);
  color: var(--crest-ink);
}

.dialog-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgb(15 23 42 / 18%) transparent;
}

.modal-price-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: var(--crest-card-solid);
}

.modal-plan-label {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--crest-ink);
}

.modal-plan-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.modal-price {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--crest-ink);
  flex: none;
}

.modal-price strong {
  font-size: 26px;
  line-height: 1;
}

.modal-contact-box {
  border: 1px solid var(--crest-line);
  border-radius: var(--radius-md);
  background: var(--crest-card-solid);
  overflow: hidden;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--crest-line);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-label {
  display: block;
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

.contact-row strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--crest-ink);
}

.copy-btn {
  min-width: 64px;
  height: 30px;
  padding-inline: 10px;
  border: 1px solid var(--crest-line-strong);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--crest-ink);
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--crest-page);
}

.modal-hint {
  margin: 0;
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--crest-line);
}

.dialog-footer .btn {
  height: 36px;
  padding-inline: 14px;
  font-size: 13px;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  margin-top: 24px;
  padding-block: 44px 32px;
  border-top: 1px solid var(--crest-line);
  background: rgb(255 254 250 / 72%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-tagline {
  margin: 0;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--crest-ink-muted);
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--crest-ink);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  display: inline-block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--crest-ink-secondary);
  transition: color 140ms ease;
}

.footer-links a:hover {
  color: var(--crest-action-ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--crest-line);
  font-size: 12px;
  color: var(--crest-ink-muted);
}

/* ==========================================================================
   Tablet Breakpoint (<= 920px)
   ========================================================================== */
@media (max-width: 920px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .main-nav {
    display: none;
  }

  .bento-col-4,
  .bento-col-3,
  .bento-col-2 {
    grid-column: span 6;
  }

  .pricing-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

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

  .sim-metric-card--power {
    grid-column: span 2;
  }
}

/* ==========================================================================
   Mobile Breakpoint (<= 640px) — Engineered for 375–430px Phones
   ========================================================================== */
@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .header-inner {
    height: 52px;
    gap: 10px;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .brand-name {
    font-size: 15px;
  }

  .header-cta {
    height: 32px;
    padding-inline: 11px;
    font-size: 12.5px;
  }

  .section {
    padding-block: 36px;
  }

  .section-header {
    margin-bottom: 18px;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .hero-title {
    margin-top: 0;
    font-size: 30px;
  }

  .hero-lead {
    margin-top: 10px;
    font-size: 14px;
  }

  .hero-cta-row {
    flex-direction: column;
    margin-top: 18px;
  }

  .hero-cta-row .btn {
    width: 100%;
    height: 44px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
  }

  .hero-stat {
    padding: 11px 10px;
  }

  .hero-stat strong {
    font-size: 15px;
  }

  .hero-stat:nth-child(2) {
    border-right: 0;
  }

  .hero-stat:nth-child(1),
  .hero-stat:nth-child(2) {
    border-bottom: 1px solid var(--crest-line);
  }

  /* Keep showcase tabs as ONE crisp horizontal segmented bar on mobile */
  .showcase-wrapper {
    margin-top: 22px;
  }

  .showcase-tabs {
    max-width: none;
    margin-bottom: 12px;
  }

  .showcase-tab {
    height: 34px;
    padding-inline: 6px;
    font-size: 12.5px;
  }

  .tab-index {
    display: none;
  }

  /* Clean mobile window topbar: hide dots & host URL so title never clips into dots */
  .device-topbar {
    grid-template-columns: 1fr;
    height: 34px;
    padding-inline: 12px;
  }

  .window-dots,
  .window-spacer,
  .window-host {
    display: none;
  }

  .window-address {
    justify-content: flex-start;
    font-size: 11.5px;
  }

  /* Mobile simulator: Power wide on top, Grade + HR/Cadence 2-col below */
  .sim-stage {
    padding: 12px;
  }

  .sim-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .sim-controls {
    width: 100%;
    justify-content: space-between;
  }

  .sim-hud-grid {
    gap: 10px;
    margin-bottom: 10px;
  }

  .sim-metric-card {
    padding: 12px;
  }

  .sim-metric-value {
    font-size: 26px;
  }

  .sim-metric-companion strong {
    font-size: 15px;
  }

  .sim-chart-box {
    padding: 12px;
  }

  .sim-svg-wrap {
    height: 120px;
  }

  .grade-legend {
    gap: 8px;
    font-size: 11px;
  }

  /* Bento cards tighter on mobile */
  .bento-card {
    padding: 16px;
    gap: 12px;
  }

  .bento-visual {
    padding: 12px;
  }

  /* Keep all 5 KPIs in one balanced compact row on mobile */
  .mini-kpi-row {
    gap: 4px;
  }

  .mini-kpi {
    padding: 6px 4px;
    text-align: center;
  }

  .mini-kpi strong {
    font-size: 11.5px;
  }

  .mini-charts-pair {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sensor-pills {
    gap: 6px;
  }

  .sensor-pill {
    padding: 7px 8px;
    font-size: 11.5px;
  }

  .pricing-card,
  .download-card {
    padding: 18px;
  }

  .setup-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .setup-banner-btn {
    width: 100%;
  }

  .download-mac-row {
    grid-template-columns: 1fr;
  }

  .flagship-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    font-size: 11px;
    text-align: center;
  }

  .flagship-steps > span:not(.step-arrow) {
    padding: 6px 4px;
    border-radius: 7px;
    background: var(--crest-page);
  }

  .step-arrow {
    display: none;
  }

  .faq-item summary {
    padding: 14px 16px;
    font-size: 14px;
  }

  .faq-item p {
    padding: 0 16px 14px;
  }

  .dialog-header,
  .dialog-footer {
    padding-inline: 18px;
  }

  .dialog-body {
    padding: 16px 18px;
  }

  .site-footer {
    padding-block: 32px 24px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 24px;
    padding-top: 16px;
  }
}
