:root {
  --ink: #172019;
  --muted: #59645d;
  --paper: #ffffff;
  --canvas: #f6f4ee;
  --line: #d2d5cf;
  --line-strong: #9aa39c;
  --track: #e6e9e4;
  --accent: #126b57;
  --accent-dark: #0b4e40;
  --accent-soft: #dcefe8;
  --signal: #ff754d;
  --focus: #67aee4;
  --shadow: 0 6px 0 rgba(23, 32, 25, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.shell { width: min(calc(100% - 28px), 1120px); margin-inline: auto; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.hero { padding: 34px 0 24px; }
.breadcrumb { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.breadcrumb a { text-underline-offset: 3px; }
.product-name,
.step,
.result-kicker,
.control-label {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.product-name { font-size: 13px; }
.hero h1,
.panel-heading h2,
.section-heading h2,
.faq-section > h2,
.guide-grid h2 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.hero h1 { max-width: 760px; font-size: clamp(38px, 10vw, 64px); }
.hero-lead { max-width: 720px; margin: 18px 0 6px; font-size: clamp(18px, 4.6vw, 22px); font-weight: 750; line-height: 1.38; }
.hero-note { margin: 0; color: var(--muted); }

.workspace { padding-bottom: 48px; }
.privacy-note {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 15px 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.privacy-note > span { flex: 0 0 11px; width: 11px; height: 11px; margin-top: 6px; background: var(--accent); border-radius: 50%; }
.privacy-note p { margin: 0; }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { font-size: 16px; }
.privacy-note small { margin-top: 2px; color: var(--muted); font-size: 14px; }

.control-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
}
.control-label { display: block; margin-bottom: 5px; color: var(--muted); letter-spacing: .08em; }
.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-width: 220px;
  padding: 3px;
  background: var(--track);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}
.segmented button {
  min-height: 44px;
  padding: 8px 13px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.segmented.small { min-width: 0; width: 100%; }
.segmented.small button { font-size: 14px; }
.text-button {
  min-height: 44px;
  padding: 7px 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid currentColor;
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: -1px;
  overflow: hidden;
  background: var(--track);
  border: 1px solid var(--ink);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}
.mode-tabs button {
  min-height: 64px;
  padding: 10px 5px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line-strong);
  cursor: pointer;
}
.mode-tabs button:last-child { border-right: 0; }
.mode-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.mode-tabs strong, .mode-tabs span { display: block; }
.mode-tabs strong { font-size: 14px; }
.mode-tabs span { margin-top: 2px; font-size: 11px; }

.calculator-grid { border: 1px solid var(--ink); background: var(--paper); }
.input-panel, .result-panel { min-width: 0; padding: 22px 18px; }
.input-panel { margin: 0; }
.panel-heading { margin-bottom: 22px; }
.panel-heading h2 { font-size: clamp(24px, 6.5vw, 34px); }
.field { margin-bottom: 18px; }
.field > label,
.custom-distance > label,
.time-field legend {
  display: block;
  margin-bottom: 7px;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
}
select,
.input-with-unit,
.time-inputs,
.pace-inputs {
  width: 100%;
  min-height: 54px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
select {
  padding: 0 42px 0 14px;
  color: var(--ink);
  font-weight: 750;
}
.custom-distance { margin: -2px 0 18px; }
.input-with-unit { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; }
.input-with-unit input { width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: 0; font-size: 20px; font-weight: 800; }
.input-with-unit span { padding: 0 14px; color: var(--muted); font-weight: 800; }
.time-field { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.time-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.time-inputs, .pace-inputs { display: grid; align-items: center; padding: 7px; }
.time-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
.pace-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
.time-inputs label, .pace-inputs label { position: relative; min-width: 0; }
.time-inputs label span, .pace-inputs label span {
  position: absolute;
  top: -1px;
  left: 50%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  transform: translateX(-50%);
}
.time-inputs input, .pace-inputs input {
  width: 100%;
  height: 42px;
  padding: 8px 2px 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  text-align: center;
  appearance: textfield;
}
.time-inputs input::-webkit-inner-spin-button,
.pace-inputs input::-webkit-inner-spin-button { appearance: none; }
.time-inputs b, .pace-inputs b { color: var(--muted); font-size: 21px; }
.pace-inputs em { padding: 0 8px; color: var(--muted); font-size: 15px; font-style: normal; font-weight: 800; white-space: nowrap; }
.form-error { min-height: 24px; margin: -7px 0 8px; color: #a62f1d; font-weight: 750; }
.primary-button {
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  background: var(--signal);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}
.primary-button:active { box-shadow: 0 1px 0 var(--ink); transform: translateY(3px); }

.result-panel {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  justify-content: center;
  background: var(--accent-soft);
  border-top: 1px solid var(--ink);
}
.result-kicker { color: var(--accent-dark); }
.primary-result {
  display: block;
  margin: 1px 0;
  color: var(--ink);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(48px, 15vw, 72px);
  letter-spacing: -.07em;
  line-height: 1;
  white-space: nowrap;
}
.primary-result span { font-size: .37em; letter-spacing: -.02em; }
.secondary-result { margin: 8px 0 18px; color: var(--accent-dark); font-size: 22px; font-weight: 900; }
.result-facts { display: grid; grid-template-columns: repeat(2, 1fr); border-block: 1px solid rgba(23,32,25,.25); }
.result-facts div { padding: 10px 6px 10px 0; }
.result-facts div + div { padding-left: 12px; border-left: 1px solid rgba(23,32,25,.25); }
.result-facts span, .result-facts strong { display: block; }
.result-facts span { color: var(--muted); font-size: 12px; }
.result-facts strong { font-size: 15px; }
.pace-adjust { margin-top: 18px; }
.pace-adjust > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.pace-adjust > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pace-adjust button {
  min-height: 42px;
  padding: 5px 2px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.prediction-section { padding: 27px 0 0; }
.section-heading { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.section-heading h2 { font-size: clamp(25px, 7vw, 36px); }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); }
.prediction-list { border-block: 1px solid var(--ink); }
.prediction-row { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 54px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.prediction-row:last-child { border-bottom: 0; }
.prediction-row span { font-weight: 750; }
.prediction-row strong { font-size: 19px; font-variant-numeric: tabular-nums; }

.planning-band { padding: 44px 0; background: #e7e3d9; border-block: 1px solid var(--ink); }
.planning-grid { display: grid; gap: 22px; }
.target-tool, .split-tool { min-width: 0; padding: 22px 18px; background: var(--paper); border: 1px solid var(--ink); border-radius: 16px; }
.planning-fields { display: grid; gap: 0; }
.goal-presets { display: flex; gap: 7px; margin: -1px 0 13px; overflow-x: auto; scrollbar-width: thin; }
.goal-presets button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 7px 11px;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.target-answer { padding: 19px; background: var(--accent-soft); border-left: 5px solid var(--accent); }
.target-answer span, .target-answer strong, .target-answer b, .target-answer small { display: block; }
.target-answer span { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.target-answer strong { margin: 3px 0; font-size: clamp(33px, 10vw, 48px); line-height: 1.05; }
.target-answer b { color: var(--accent-dark); font-size: 19px; }
.target-answer small { margin-top: 10px; color: var(--muted); }
.split-toolbar { display: grid; gap: 9px; margin-bottom: 15px; }
.split-toolbar .text-button { justify-self: start; }
.split-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; font-weight: 850; }
.split-summary span:first-child { color: var(--accent-dark); }
.split-table-wrap { overflow: hidden; border: 1px solid var(--line-strong); }
.split-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.split-table th, .split-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.split-table th + th, .split-table td + td { text-align: right; border-left: 1px solid var(--line); }
.split-table th { background: var(--ink); color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.split-table tbody tr:last-child td { border-bottom: 0; font-weight: 900; }
.show-button { width: 100%; min-height: 46px; margin-top: 10px; background: #fff; border: 1px solid var(--ink); border-radius: 10px; font-weight: 850; cursor: pointer; }

.compare-section { padding: 38px 0; }
.compare-section details { background: #fff; border: 1px solid var(--ink); border-radius: 14px; }
.compare-section summary { min-height: 72px; padding: 15px 50px 15px 17px; cursor: pointer; }
.compare-section summary span, .compare-section summary strong, .compare-section summary small { display: block; }
.compare-section summary strong { font-size: 20px; }
.compare-section summary small { color: var(--muted); font-size: 14px; }
.compare-body { padding: 0 17px 20px; border-top: 1px solid var(--line); }
.compare-body > .field { margin-top: 18px; }
.compare-paces { display: grid; gap: 14px; }
.compare-paces > div { padding: 14px; background: var(--canvas); border: 1px solid var(--line); }
.compare-paces > div span, .compare-paces > div strong { display: block; }
.compare-paces > div span { color: var(--muted); font-size: 13px; }
.compare-paces > div strong { font-size: 24px; }
.compare-answer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 17px; border-block: 1px solid var(--line-strong); }
.compare-answer div { min-width: 0; padding: 11px 5px; }
.compare-answer div + div { padding-left: 10px; border-left: 1px solid var(--line); }
.compare-answer span, .compare-answer strong { display: block; }
.compare-answer span { min-height: 38px; color: var(--muted); font-size: 11px; }
.compare-answer strong { font-size: clamp(15px, 4.2vw, 21px); white-space: nowrap; }

.guide-section { padding: 44px 0; background: #fff; border-block: 1px solid var(--line); }
.guide-grid { display: grid; gap: 30px; }
.guide-grid h2 { margin-bottom: 10px; font-size: 25px; }
.guide-grid p { margin: 0; color: var(--muted); }
.distance-list, .pace-list { margin: 0; border-top: 1px solid var(--line); }
.distance-list div, .pace-list div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.distance-list dt, .pace-list dt { font-weight: 800; }
.distance-list dd, .pace-list dd { margin: 0; color: var(--muted); }
.marathon-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.marathon-examples span { padding: 8px 5px 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.marathon-examples b { display: block; color: var(--ink); font-size: 16px; }

.faq-section { padding: 44px 0 58px; }
.faq-section > h2 { margin-bottom: 20px; font-size: clamp(30px, 8vw, 44px); }
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary { padding: 16px 32px 16px 0; font-size: 17px; font-weight: 850; cursor: pointer; }
.faq-list p { max-width: 780px; margin: -3px 0 18px; color: var(--muted); }
.related-tools { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--ink); }
.related-tools h2 { margin: 0 0 10px; font-size: 19px; }
.related-tools a { display: block; width: fit-content; margin: 6px 0; color: var(--accent-dark); font-weight: 750; text-underline-offset: 3px; }
.print-report { display: none; }

@media (min-width: 720px) {
  .shell { width: min(calc(100% - 48px), 1120px); }
  .mode-tabs button { min-height: 72px; padding: 12px; }
  .mode-tabs strong { font-size: 16px; }
  .mode-tabs span { font-size: 13px; }
  .calculator-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); }
  .input-panel, .result-panel { padding: 30px; }
  .result-panel { border-top: 0; border-left: 1px solid var(--ink); }
  .section-heading { flex-direction: row; align-items: end; justify-content: space-between; }
  .prediction-list { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--ink); }
  .prediction-row { display: block; min-height: 84px; padding: 14px; border-bottom: 0; border-right: 1px solid var(--line); }
  .prediction-row:last-child { border-right: 0; }
  .prediction-row span, .prediction-row strong { display: block; }
  .prediction-row strong { margin-top: 7px; }
  .planning-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: start; }
  .target-tool, .split-tool { padding: 28px; }
  .split-toolbar { grid-template-columns: minmax(260px, .7fr) auto; align-items: center; }
  .split-toolbar .text-button { justify-self: end; }
  .compare-paces { grid-template-columns: repeat(2, 1fr); align-items: end; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid .wide { grid-column: 1 / -1; }
  .marathon-examples { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 560px) {
  .nav-links > a:not(.nav-pill) { display: none; }
  .control-bar { align-items: center; }
  .control-bar .text-button { max-width: 92px; font-size: 13px; }
  .segmented { min-width: 208px; }
  .hero { padding-top: 28px; }
  .privacy-note { box-shadow: 3px 3px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  @page { size: Letter portrait; margin: .55in; }
  body { background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; }
  .site-header, main, .site-footer { display: none !important; }
  .print-report { display: block !important; }
  .print-report header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid #111; }
  .print-report header span { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 900; }
  .print-report header i { display: grid; width: 28px; height: 26px; place-items: center; background: #ffd94f; border: 2px solid #111; border-radius: 50%; font-style: normal; transform: rotate(-6deg); }
  .print-report header > b { font-size: 13px; letter-spacing: .16em; }
  .print-report > p { margin: 28px 0 4px; font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
  .print-report h1 { margin: 0; font-size: 38px; }
  .print-target { display: grid; grid-template-columns: 110px 1fr; margin: 22px 0; border: 1px solid #333; border-collapse: collapse; }
  .print-target span, .print-target strong, .print-target b { padding: 9px 12px; border-bottom: 1px solid #aaa; }
  .print-target strong, .print-target b { border-left: 1px solid #aaa; }
  .print-target b { border-bottom: 0; }
  .print-target span:last-of-type { border-bottom: 0; }
  .print-report table { width: 100%; border-collapse: collapse; }
  .print-report thead { display: table-header-group; }
  .print-report th, .print-report td { padding: 8px 10px; border: 1px solid #777; text-align: left; }
  .print-report th:last-child, .print-report td:last-child { text-align: right; }
  .print-report tr { break-inside: avoid; }
  .print-report footer { margin-top: 18px; padding-top: 10px; border-top: 1px solid #555; font-size: 10px; }
}
