/* Walking Calories Calculator — page-specific presentation.

   Shared shell, panels, hero (.rp-hero), stat tiles, FAQs, related cards and Cozy's pick come
   from styles.css and results.css. This file adds the walking form, energy split, pace comparison,
   schematic path and weekly projection. Scoped to .walking-page. */

.walking-page .wk-scope {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- The form */

.walking-page .wk-control { margin-bottom: 18px; }
.walking-page .wk-control-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.walking-page .segmented button:focus-visible,
.walking-page .chips .chip:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}
.walking-page .wk-input-unit { display: flex; align-items: stretch; min-width: 0; }
.walking-page .wk-input-unit input {
  flex: 1;
  min-width: 0;
  border-radius: 10px 0 0 10px;
}
.walking-page .wk-unit {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--accent);
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.walking-page .wk-subhead { margin: 24px 0 10px; font-size: 1rem; }
.walking-page .wk-pace-grid { margin-bottom: 8px; }
.walking-page .wk-pace-grid .chip { min-height: 38px; }
.walking-page .wk-pace-note {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
}
.walking-page .wk-pace-note + .hint { margin-bottom: 18px; }
.walking-page .wk-actions { margin-top: 14px; }

/* ---------------------------------------------------------------- The hero and split */

.walking-page .wk-hero .value { font-size: clamp(2.8rem, 8vw, 4.5rem); line-height: 1; }
.walking-page .wk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.walking-page .wk-stats .stat .value { font-size: 1rem; }
.walking-page .wk-split {
  margin: 12px 0 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent);
}
.walking-page .wk-split-bar {
  display: flex;
  height: 30px;
  overflow: hidden;
  border-radius: 15px;
  background: var(--border);
}
.walking-page .wk-split-active { display: block; width: 74%; background: var(--primary); }
.walking-page .wk-split-rest { display: block; width: 26%; background: var(--fees); }
.walking-page .wk-split-legend { display: grid; gap: 8px; margin-top: 12px; }
.walking-page .wk-split-legend > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
  font-size: 0.84rem;
}
.walking-page .wk-split-legend strong { flex: 1; min-width: 0; }
.walking-page .wk-split-legend span:last-child { font-weight: 700; }
.walking-page .wk-dot { width: 10px; height: 10px; flex: none; border-radius: 3px; align-self: center; }
.walking-page .wk-dot-active { background: var(--primary); }
.walking-page .wk-dot-rest { background: var(--fees); }
.walking-page .wk-split-caption,
.walking-page .wk-split-note { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.walking-page .wk-split-note { margin-top: 6px; }

/* ---------------------------------------------------------------- Pace comparison */

.walking-page .wk-compare-switch { margin: 4px 0 10px; max-width: 380px; }
.walking-page .wk-compare-list { display: grid; gap: 8px; margin-top: 10px; }
.walking-page .wk-compare-row {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.walking-page .wk-compare-row.is-selected { border-color: var(--highlight); }
.walking-page .wk-compare-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.walking-page .wk-compare-head strong { font-size: 0.88rem; }
.walking-page .wk-compare-head span { color: var(--muted); font-size: 0.74rem; }
.walking-page .wk-compare-track {
  height: 10px;
  margin: 7px 0 6px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--accent);
}
.walking-page .wk-compare-track > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--primary);
  opacity: 0.8;
}
.walking-page .wk-compare-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 0.75rem;
}
.walking-page .wk-compare-meta strong { color: var(--text); }
.walking-page .wk-compare-empty { margin: 10px 0; color: var(--muted); font-size: 0.84rem; }

/* ---------------------------------------------------------------- Schematic path */

.walking-page .wk-path { margin: 18px 0 0; padding: 16px 18px 8px; border-radius: var(--radius); background: var(--accent); }
.walking-page .wk-path-line {
  position: relative;
  height: 8px;
  margin: 18px 0 26px;
  border-radius: 4px;
  background: var(--border);
}
.walking-page .wk-path-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 220ms ease;
}
.walking-page .wk-path-walker {
  position: absolute;
  right: -9px;
  top: -22px;
  padding: 1px 3px;
  border-radius: 5px;
  background: var(--card);
  font-size: 1.35rem;
  line-height: 1;
}
.walking-page .wk-path-labels { position: relative; height: 22px; }
.walking-page .wk-path-labels span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}
.walking-page .wk-path-labels span:last-child { transform: translateX(-100%); }
.walking-page .wk-path-note,
.walking-page .wk-fine { margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

/* ---------------------------------------------------------------- Weekly projection */

.walking-page .wk-weekly { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--accent); }
.walking-page .wk-weekly-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.walking-page .wk-weekly-head label { font-size: 0.84rem; font-weight: 700; }
.walking-page .wk-weekly-head select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}
.walking-page .wk-weekly-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.walking-page .wk-weekly-grid > div { padding: 10px; border-radius: 9px; background: var(--card); }
.walking-page .wk-weekly-grid span { display: block; color: var(--muted); font-size: 0.7rem; line-height: 1.25; }
.walking-page .wk-weekly-grid strong { display: block; margin-top: 4px; font-size: 0.9rem; overflow-wrap: anywhere; }
.walking-page .wk-weekly-note { margin: 12px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.walking-page .wk-uncertainty {
  margin: 18px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- Article and table */

.walking-page .wk-table-wrap { overflow-x: auto; margin: 12px 0; }
.walking-page .wk-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.walking-page .wk-table caption { text-align: left; color: var(--muted); font-size: 0.8rem; padding-bottom: 8px; }
.walking-page .wk-table th,
.walking-page .wk-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.walking-page .wk-table th[scope="col"] { color: var(--muted); font-size: 0.76rem; }
.walking-page .wk-table td:nth-child(2),
.walking-page .wk-table td:nth-child(3) { text-align: right; }
.walking-page .wk-source-list { overflow-wrap: anywhere; }
.walking-page .formula { white-space: normal; overflow-wrap: anywhere; }

.walking-page .fact-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.walking-page .fact {
  grid-column: span 3;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent);
}
.walking-page .fact:nth-child(-n+3) { grid-column: span 2; }
.walking-page .fact h3 {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.walking-page .fact-emoji { flex: none; line-height: 1.3; }
.walking-page .fact p { margin: 0; font-size: 0.88rem; line-height: 1.6; }

@media (max-width: 900px) {
  .walking-page .wk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .walking-page .wk-weekly-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .walking-page .fact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .walking-page .fact,
  .walking-page .fact:nth-child(-n+3) { grid-column: auto; }
  .walking-page .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .walking-page .wk-weekly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .walking-page .fact-list { grid-template-columns: minmax(0, 1fr); }
  .walking-page .fact:last-child:nth-child(odd) { grid-column: auto; }
  .walking-page .wk-table { min-width: 430px; }
}

@media (max-width: 520px) {
  .walking-page .wk-stats { grid-template-columns: minmax(0, 1fr); }
  .walking-page .wk-weekly-grid { grid-template-columns: minmax(0, 1fr); }
  .walking-page #mode-switch { flex-direction: column; }
  .walking-page #mode-switch button { min-height: 44px; }
  .walking-page .wk-split-legend strong { flex-basis: 100%; }
  .walking-page .wk-path { padding-inline: 12px; }
  .walking-page .wk-path-labels span { font-size: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .walking-page .wk-path-fill { transition: none; }
}


