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

:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #ffd633;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img {
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--text);
}

/* Accent */
.accent {
  color: var(--accent);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  max-width: 620px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.6;
}

.early-adopter {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  background: var(--accent);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.badges {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-phone {
  flex-shrink: 0;
}

/* Phone screenshots */
.phone-screenshot {
  width: 300px;
  border-radius: 36px;
  display: block;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* Features */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.feature-reverse {
  flex-direction: row-reverse;
}

.feature-phone {
  flex-shrink: 0;
}

.feature-text {
  flex: 1;
}

.feature-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.feature-text h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.feature-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 440px;
}

/* Callout */
.callout {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  text-align: center;
}

.callout-quote {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.callout-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Testimonial */
.testimonial {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
}

.testimonial-stars {
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-size: 1.4rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.testimonial-author {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

.testimonial-author-text {
  text-align: left;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
}

.testimonial-name a {
  color: inherit;
  text-decoration: none;
}

.testimonial-name a:hover {
  color: var(--accent);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.15rem;
}

/* CTA */
.cta {
  text-align: center;
  padding: 5rem 2rem;
  border-top: 1px solid #1e1e1e;
}

.cta h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.cta .badges {
  justify-content: center;
}

/* Legal pages */
.legal {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.legal p,
.legal li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.legal ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal a {
  color: var(--accent);
}

/* Footer */
footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid #1e1e1e;
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.attribution {
  margin-top: 0.75rem;
  color: #444;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    gap: 3rem;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .subtitle {
    margin: 0 auto 2rem;
  }

  .badges {
    justify-content: center;
  }

  .feature,
  .feature-reverse {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }

  .feature-text p {
    max-width: 100%;
  }

  .features {
    gap: 5rem;
    padding: 3rem 1.5rem;
  }

  .phone-screenshot {
    width: 220px;
  }

  .feature-text h2 {
    font-size: 1.6rem;
  }

  .cta h2 {
    font-size: 1.75rem;
  }
}

/* === Calculator UI === */

:root {
  --surface-2: #232323;
  --border: #2a2a2a;
  --radius: 10px;
}

/* Nav variant — adds a "· Tools" subtitle on the logo */
.logo .muted {
  color: var(--text-muted);
  font-weight: 500;
}

/* Page wrapper for calculator pages */
.calc-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  width: 100%;
}

.calc-page h1 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.6rem;
}

.calc-page .lede {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* Form */
.calc-form {
  display: grid;
  gap: 1rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.calc-field label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.calc-field input,
.calc-field select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-family: inherit;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.calc-field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.calc-field input[type="range"].pace-slider {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  margin-top: 0.6rem;
  width: 100%;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--accent);
}

.calc-field input[type="range"].pace-slider:focus {
  outline: none;
  border-color: transparent;
}

.calc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.calc-field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Segmented toggle */
.seg {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  min-height: 48px;
}

.seg button {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  padding: 0 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: #000;
}

/* Results region */
.results {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
}

.results h2 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.75rem 0 0.5rem;
}

.results h2:first-child {
  margin-top: 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  gap: 1rem;
}

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

.result-row .label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.result-row .label .sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 400;
}

.result-row .value {
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}

.result-row .value .sub {
  display: inline;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.4rem;
}

.results-subhead {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.result-hero {
  text-align: center;
  padding: 1rem 0 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.result-hero .big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.result-hero .hero-unit {
  font-size: 0.4em;
  margin-left: 0.25em;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0;
}

.result-hero .small {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Share row sits at the top of .results */
.share-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.share-row button {
  flex: 1;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.share-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-row button.copied {
  border-color: var(--accent);
  color: var(--accent);
}

/* Tables (splits, zones, fueling rows) */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.calc-table th,
.calc-table td {
  text-align: right;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.calc-table th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: right;
}

.calc-table th:first-child,
.calc-table td:first-child {
  text-align: left;
}

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

.calc-table tr.highlight td {
  background: var(--surface-2);
}

/* Zone rows for HR zones */
.zone-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

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

.zone-row .zname {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.95rem;
}

.zone-row .ztext .zlabel {
  font-weight: 700;
  font-size: 0.95rem;
}

.zone-row .ztext .zdesc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.45;
}

.zone-row .zrange {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1rem;
}

.zone-row .zrange .small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

/* Disclaimer line */
.disclaimer {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
  line-height: 1.5;
}

.disclaimer a {
  color: var(--text);
}

/* Nav CTA — accent button that stands out so visitors see "the app" early.
   Higher specificity (.nav-links .nav-cta) beats the generic .nav-links a
   rule for color/font-size without needing !important. */
.nav-links .nav-cta {
  background: var(--accent);
  color: #000;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.nav-links .nav-cta:hover {
  background: #ffe055;
  color: #000;
}

/* Inline CTA */
.calc-cta {
  margin-top: 2.5rem;
  background: linear-gradient(180deg, #1a1a1a 0%, #131313 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.calc-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.calc-cta p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.calc-cta .badges {
  justify-content: center;
}

/* Feature bullets inside the CTA — tight, scannable, sells the product */
.cta-features {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  max-width: 380px;
  text-align: left;
}

.cta-features li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.4rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
}

.cta-features li::before {
  content: "★";
  color: var(--accent);
  font-size: 0.95rem;
  position: absolute;
  left: 0;
  top: 0.45rem;
}

.cta-features strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

/* One-line testimonial quote inside the CTA, below the badges */
.cta-quote {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

.cta-quote .stars {
  color: var(--accent);
  letter-spacing: 0.15em;
  font-style: normal;
  margin-right: 0.4rem;
}

.cta-quote .who {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.82rem;
  display: block;
  margin-top: 0.35rem;
}

.cta-quote .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Landing-page testimonial block (with avatar, like site/) */
.testimonial-block {
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
}

.testimonial-block .stars {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.85rem;
}

.testimonial-block .quote {
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.testimonial-block .author {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-block .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.testimonial-block .author-text {
  text-align: left;
}

.testimonial-block .name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
}

.testimonial-block .name a { color: inherit; text-decoration: none; }
.testimonial-block .name a:hover { color: var(--accent); }

.testimonial-block .role {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* SEO explainer */
.explainer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #1e1e1e;
}

.explainer h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.explainer p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.calc-page--flush { padding-top: 0; }

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

/* Landing tile grid */
.tile-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  width: 100%;
}

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

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

.tile h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.tile p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Tablet+ */
@media (min-width: 720px) {
  .calc-page h1 { font-size: 2.4rem; }
  .calc-page .lede { font-size: 1.1rem; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
}
