/* PlanToEndure landing page
   Brand: Midnight #122C4F · Pearl Perfect #FBF9E4 · Ocean #5B88B2 · Noir #000000
   Type: Archivo (display) · Instrument Sans (body) · JetBrains Mono (times, data) */

:root {
  --midnight: #122C4F;
  --deep: #0B1D36;
  --pearl: #FBF9E4;
  --busy: #ECE8CF;
  --paper: #FFFEF6;
  --ocean: #5B88B2;
  --noir: #000000;
  --signal: #D99A2B;
  --signal-light: #F2C877;

  --ink-2: #3E4C60;
  --ink-3: #4A5A70;
  --ink-4: #6A7789;
  --label: #3F6A95;
  --mist: #A9C2DA;
  --mist-2: #C9D6E3;
  --rule: #E2DEC3;
  --rule-2: #C9C4A6;
  --grid: #F2EFDC;

  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max: 1200px;
  --gutter: 24px;
  --radius: 8px;
}

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

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

body {
  margin: 0;
  background: var(--pearl);
  color: var(--midnight);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--midnight); }
a:hover { color: var(--ocean); }

:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--midnight);
  color: var(--pearl);
  padding: 10px 16px;
  border-radius: var(--radius);
}
.skip-link:focus { top: 16px; color: var(--pearl); }

.mono { font-family: var(--font-mono); }

.display {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.h2 { font-size: clamp(32px, 3.6vw, 48px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
}

.muted { color: var(--ink-2); }

/* Wordmark */
.wordmark {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wordmark span { font-weight: 400; color: var(--ocean); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--midnight);
  color: var(--pearl);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--deep); color: var(--pearl); }
.btn--sm { min-height: 44px; padding: 11px 18px; font-size: 15px; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 249, 228, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--midnight);
}
.brand .wordmark { font-size: 21px; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.main-nav a:not(.btn) { text-decoration: none; }

@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: nowrap; }
  .main-nav { gap: 16px; flex-wrap: nowrap; }
  .main-nav a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-block: 40px 96px;
}

.hero-copy {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero .lede { max-width: 34em; font-size: 19px; color: var(--ink-2); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding-top: 6px;
}
.hero-actions .text-link { font-weight: 600; font-size: 16px; text-underline-offset: 4px; }

.hero .fine { font-size: 14px; color: var(--ink-3); }

.hero-visual {
  flex: 1.25 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Week calendar mock */
.cal {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 40px 70px -40px rgba(18, 44, 79, 0.45);
  overflow: hidden;
}

.cal-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
}
.cal-head strong { font-weight: 600; }
.cal-head span { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.cal-scroll { overflow-x: auto; }

.cal-grid {
  min-width: 560px;
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(0, 1fr));
  font-size: 11px;
  line-height: 1.25;
}

.cal-day {
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.cal-day.is-key { color: var(--midnight); font-weight: 600; }

/* 05:00–20:00 at 26px per hour */
.cal-gutter {
  position: relative;
  height: 390px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
}
.cal-gutter span { position: absolute; right: 6px; }

.cal-col {
  position: relative;
  height: 390px;
  border-left: 1px solid var(--busy);
  background-image: repeating-linear-gradient(to bottom, transparent 0 25px, var(--grid) 25px 26px);
}

.session {
  position: absolute;
  left: 4px;
  right: 4px;
  background: var(--midnight);
  color: var(--pearl);
  border-radius: 5px;
  padding: 3px 6px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.session small { font-size: inherit; font-weight: 400; }
.session--key { background: var(--ocean); color: var(--noir); padding: 4px 6px; }

.rest {
  position: absolute;
  top: 200px;
  left: 4px;
  right: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.rest::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--midnight);
}

/* Reminder cards overlapping the calendar */
.reminders {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: -34px;
  padding-inline: 12px;
}

.reminder {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 14px 16px;
}
.reminder--dark {
  flex: 0 1 300px;
  background: var(--midnight);
  color: var(--pearl);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5);
}
.reminder--light {
  flex: 0 1 280px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -22px rgba(18, 44, 79, 0.4);
}
.reminder svg { flex: none; margin-top: 2px; }
.reminder .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  margin-top: 6px;
}
.reminder-time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.reminder--dark .reminder-time { color: var(--mist); }
.reminder p { font-size: 14px; line-height: 1.4; }

/* ---------- How it works ---------- */
.how { border-top: 1px solid var(--rule); }
.how .wrap {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-block: 88px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.section-head h2 { max-width: 14em; }
.section-head p { max-width: 26em; }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 3px solid var(--midnight);
}
.step--key { border-top-color: var(--ocean); }
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
}
.step h3 { font-size: 22px; font-weight: 700; line-height: 1.2; }

/* ---------- Features ---------- */
.features { background: var(--midnight); color: var(--pearl); }
.features a { color: var(--pearl); }
.features .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
  padding-block: 96px;
}

.features-copy {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature svg { flex: none; margin-top: 3px; }
.feature h3 { margin-bottom: 4px; font-size: 19px; font-weight: 700; }
.feature p { color: var(--mist-2); }

/* Load chart card */
.load-card {
  flex: 1 1 440px;
  min-width: 0;
  background: var(--deep);
  border: 1px solid #1F3E66;
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.load-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.load-card-head .mono { font-size: 12px; letter-spacing: 0.06em; color: var(--mist); }
.load-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--signal-light);
}
.load-flag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
}

.load-chart {
  position: relative;
  height: 210px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid #2B4A73;
  padding-top: 24px;
}
.load-guide {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 160px;
  border-top: 1px dashed var(--ocean);
}
.load-guide span {
  position: absolute;
  right: 0;
  bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mist);
}
.bar {
  position: relative;
  flex: 1;
  height: var(--h);
  background: #2E5583;
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
}
.bar--last { background: var(--ocean); }
.bar--over { background: var(--signal); }
.bar--over span {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--signal-light);
}

.load-axis {
  display: flex;
  gap: 12px;
  margin-top: -12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8FA7C0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.load-axis span { flex: 1; }
.load-axis .is-over { color: var(--signal-light); }

.load-note {
  font-size: 15px;
  color: var(--mist-2);
  border-top: 1px solid #1F3E66;
  padding-top: 18px;
}

/* Bars grow in when the card scrolls into view (JS adds .is-ready first) */
.load-chart.is-ready .bar { transform: scaleY(0); transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.load-chart.is-ready .bar:nth-child(n) { transition-delay: calc(var(--i, 0) * 60ms); }
.load-chart.is-visible .bar { transform: scaleY(1); }
@media (prefers-reduced-motion: reduce) {
  .load-chart.is-ready .bar { transform: none; transition: none; }
}

/* ---------- Sports strip ---------- */
.sports { border-bottom: 1px solid var(--rule); }
.sports .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 56px;
}
.sports h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.chips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}
.chips li {
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- Pricing ---------- */
.pricing .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
  padding-block: 96px;
}
.pricing-copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pricing-copy p { max-width: 28em; }

.price-card {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.price-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.price-card-head strong { font-size: 18px; }
.price-card-head .mono { font-size: 12px; color: var(--label); letter-spacing: 0.05em; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price strong {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 800;
  font-size: 52px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price span { color: var(--ink-3); }

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
}
.checks li { display: flex; gap: 10px; }
.checks svg { flex: none; margin-top: 4px; }

/* ---------- CTA ---------- */
.cta { background: var(--ocean); color: var(--noir); }
.cta .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding-block: 80px;
}
.cta h2 {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cta h2 span { color: var(--pearl); }

.beta-form {
  flex: 0 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.beta-form label { font-weight: 600; font-size: 15px; }
.beta-form .row { display: flex; flex-wrap: wrap; gap: 10px; }
.beta-form input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--midnight);
  background: var(--pearl);
  color: var(--midnight);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
}
.beta-form input::placeholder { color: var(--ink-3); }
.beta-form input:focus-visible { outline-color: var(--midnight); }
.beta-form button { padding: 12px 20px; }
.beta-form button[disabled] { opacity: 0.7; cursor: progress; }
.beta-form .status { font-size: 13px; min-height: 1.4em; }
.beta-form .status.is-success,
.beta-form .status.is-error { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: var(--mist-2); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 40px;
  font-size: 14px;
}
.site-footer .brand-small { display: flex; align-items: center; gap: 10px; color: var(--pearl); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--mist-2); }
.site-footer a:hover { color: var(--pearl); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Legal pages ---------- */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 48px 96px;
}
@media (min-width: 960px) {
  .legal { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; }
  .legal-toc { position: sticky; top: 104px; align-self: start; }
}

.legal-head {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.legal-head h1 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.legal-head .meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }

.legal-toc { font-size: 15px; }
.legal-toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: toc;
}
.legal-toc li { counter-increment: toc; display: flex; gap: 10px; }
.legal-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--label);
  padding-top: 3px;
}
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

.legal-body { max-width: 44em; display: flex; flex-direction: column; gap: 44px; }
.legal-body section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 96px; }
.legal-body h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.legal-body h3 { font-size: 18px; font-weight: 700; margin-top: 6px; }
.legal-body p, .legal-body li { color: var(--ink-2); }
.legal-body strong { color: var(--midnight); }
.legal-body ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }

.summary {
  background: var(--midnight);
  color: var(--pearl);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary .eyebrow { color: var(--mist); }
.summary ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.summary li { color: var(--mist-2); }
.summary strong { color: var(--pearl); }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}
.data-table td { color: var(--ink-2); }

/* Fill-in placeholders: deliberately visible until replaced */
.ph {
  background: #F6E3B8;
  color: var(--midnight);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}
