/* Walk It Off — page styles on top of the Modernist design system (ds.css). */

input[type=range] { accent-color: var(--color-accent); width: 100%; height: 36px; cursor: pointer; }
select.input { appearance: none; background-image: none; }

.page-root { min-height: 100vh; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); display: flex; flex-direction: column; }
/* Short standalone pages: the article stretches so the footer sits at the
   bottom of the viewport instead of leaving dead space below it. */
.page-root > .page-article { flex: 1; }

/* — header — */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
  padding: var(--space-3) var(--space-6);
  border-bottom: 2px solid var(--color-divider); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand-mark { width: 22px; height: 22px; background: var(--color-accent); }
.brand-name {
  font-family: var(--font-heading); font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
  white-space: nowrap;
}
.site-nav {
  display: flex; align-items: center; gap: var(--space-6);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav a { color: var(--color-text); text-decoration: none; }
.site-nav a:hover { color: var(--color-accent-700); }

/* — ad gaps: the reserved advertising bands (#ad-gap-header, #ad-gap-calculator,
   #ad-gap-meals, #ad-gap-method) plus the two side rails — */
.ad-row {
  display: flex; align-items: center; justify-content: center; min-height: 104px;
  padding: var(--space-4) var(--space-6);
  border-bottom: 2px solid var(--color-divider); background: var(--color-neutral-100);
}
/* Invisible ad slots — the reserved space stays, the placeholder UI is gone. */
.ad-slot-banner { width: 100%; max-width: 728px; min-height: 90px; }
.ad-slot-sky { width: 160px; height: 600px; }
/* An ad gap whose preceding section has no bottom border (the prose) gets its
   own top rule; the normal bottom rule separates it from what follows. */
.ad-row-topline { border-top: 2px solid var(--color-divider); }

/* — layout with side rails (collapse below 1040px viewport) — */
.layout { display: flex; align-items: stretch; }
.layout > main { flex: 1 1 auto; min-width: 0; }
.rail {
  flex: 0 0 auto; overflow: hidden; background: var(--color-neutral-100);
  width: clamp(0px, calc((100vw - 1040px) * 999), 200px);
}
/* Full-height rules drawn as inset shadows so they vanish with the collapsed rail. */
.rail-left { box-shadow: inset -2px 0 0 var(--color-divider); }
.rail-right { box-shadow: inset 2px 0 0 var(--color-divider); }
.rail-inner { position: sticky; top: 0; padding: var(--space-4); display: flex; justify-content: center; }

/* — calculator — */
.calc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  border-bottom: 2px solid var(--color-divider);
}
.calc-form {
  padding: 28px 24px; display: flex; flex-direction: column; gap: 24px;
  border-right: 2px solid var(--color-divider);
}
.calc-form h1 { font-size: 38px; margin: 0 0 8px; line-height: 1.05; }
.calc-form .lede { max-width: 44ch; margin: 0; }
.step-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.food-detail { font-size: 12px; margin-top: 6px; }
.slider-readout { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.slider-value { font-family: var(--font-heading); font-weight: 800; font-size: 28px; line-height: 1; }
.slider-value-sm { font-size: 18px; }
.slider-unit { font-size: 13px; }
.slider-scale { display: flex; justify-content: space-between; font-size: 11px; }
.food-select { min-height: 48px; font-size: 16px; font-family: var(--font-heading); font-weight: 800; }
.seg-opt.wclass { padding: 10px 16px; font-size: 13px; }

/* — weight stepper — */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--color-divider); }
.stepper-btn {
  width: 48px; min-height: 48px; padding: 0; cursor: pointer;
  font-family: var(--font-heading); font-weight: 800; font-size: 20px; line-height: 1;
  color: var(--color-text); background: transparent; border: 0;
}
.stepper-btn:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.stepper-btn:active { background: var(--color-accent); color: var(--color-bg); }
.stepper-btn:disabled { opacity: 0.45; cursor: not-allowed; background: transparent; }
.stepper-value {
  display: flex; align-items: center; justify-content: center; min-width: 96px; padding: 0 20px;
  border-left: 1px solid var(--color-divider); border-right: 1px solid var(--color-divider);
  font-family: var(--font-heading); font-weight: 800; font-size: 16px;
}

/* — result panel — */
.result {
  padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; gap: 0;
  background: var(--color-accent); color: var(--color-bg);
}
.result-kicker { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.result-miles { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.result-miles .number {
  font-family: var(--font-heading); font-weight: 800; font-size: 104px;
  line-height: 0.85; letter-spacing: -0.04em;
}
.result-miles .unit { font-family: var(--font-heading); font-weight: 800; font-size: 26px; }
.result-rule { height: 2px; background: color-mix(in srgb, #f3f2f2 55%, transparent); margin: 22px 0; }
.result-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 20px; justify-content: start; }
.result-stats .stat-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.result-stats .stat-value { font-family: var(--font-heading); font-weight: 800; font-size: 26px; }
.result-note { font-size: 11px; line-height: 1.5; margin-top: 22px; opacity: 0.85; max-width: 38ch; }

/* — meal table — */
.meals {
  padding: 28px 24px;
  border-bottom: 2px solid var(--color-divider);
}
.meals h2 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 4px; }
.meals .table-note { font-size: 12px; margin: 0 0 14px; }
.meals .table-footnote { font-size: 12px; margin: 14px 0 0; }
.meals .table-wrap { overflow-x: auto; }
.meals .table td.num, .meals .table th.num { text-align: right; }
.meals .table td.distance { font-family: var(--font-heading); font-weight: 800; }
/* Row headers read as normal body text, not the column-header caps ds.css gives every th. */
.meals .table tbody th, .prose .table tbody th {
  font-size: 14px; font-weight: 400; letter-spacing: normal; text-transform: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
}
.meals .portion { font-size: 12px; }
@media (max-width: 500px) {
  .meals .portion { display: none; }
}

/* Visually hidden, still announced by screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* — in-page prose (methodology section) — */
.prose { padding: 28px 24px; max-width: 70ch; }
.prose h2 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 var(--space-3); }
.prose h2:not(:first-child) { margin-top: var(--space-8); }
.prose p { margin: 0 0 var(--space-3); line-height: 1.6; text-wrap: pretty; }
.prose .table-wrap { overflow-x: auto; margin: var(--space-4) 0; }
.prose .table td.num, .prose .table th.num { text-align: right; }
.prose .table caption {
  caption-side: top; text-align: left; font-size: 12px; padding-bottom: var(--space-2);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* — FAQ (reuses .prose): native details/summary accordions — */
.faq { max-width: none; } /* rows span the full column; answer text stays capped below */
.faq h2 { margin-bottom: var(--space-4); }
.faq details { border-bottom: 1px solid var(--color-divider); }
.faq details:first-of-type { border-top: 1px solid var(--color-divider); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  padding: 14px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 17px; line-height: 1.25; margin: 0; }
.faq summary::after {
  content: "+"; flex: none;
  font-family: var(--font-heading); font-weight: 800; font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover h3 { color: var(--color-accent-700); }
.faq details p { margin: 0 0 var(--space-4); }

/* — static pages (about / disclaimer / privacy / terms) — */
.page-article { padding: var(--space-8) var(--space-6); max-width: 70ch; }
.page-article .kicker {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent-700); margin-bottom: var(--space-2);
}
.page-article h1 { font-size: 38px; margin: 0 0 var(--space-2); line-height: 1.05; }
.page-article .updated { font-size: 12px; margin: 0 0 var(--space-6); }
.page-article .hr { margin: 0 0 var(--space-6); }
.page-article section { margin-bottom: var(--space-8); }
.page-article section h2 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 var(--space-3); }
.page-article section p { margin: 0 0 var(--space-3); line-height: 1.6; text-wrap: pretty; }
.page-article .btn { text-decoration: none; }

/* — footer — */
.site-footer { border-top: 2px solid var(--color-divider); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.footer-cell { padding: var(--space-6); }
.footer-cell + .footer-cell { border-left: 0; }
.footer-cell.ruled { border-right: 2px solid var(--color-divider); }
.footer-brand {
  font-family: var(--font-heading); font-weight: 800; font-size: 16px;
  letter-spacing: -0.02em; margin-bottom: var(--space-2);
}
.footer-cell .cell-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--space-2);
}
.footer-cell p { font-size: 12px; margin: 0; }
.footer-cell .about-copy { max-width: 30ch; }
.footer-cell .method-copy { max-width: 34ch; }
.footer-links { display: grid; gap: 6px; font-size: 12px; }
.footer-links a { color: var(--color-text); text-decoration: none; width: fit-content; }
.footer-links a:hover { color: var(--color-accent-700); }
.footer-bar {
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-3) var(--space-6);
  border-top: 2px solid var(--color-divider); font-size: 11px;
}
.footer-bar .tagline { letter-spacing: 0.1em; text-transform: uppercase; }

[hidden] { display: none !important; }
