/* ==========================================================================
   Waymark Walks — route board stylesheet.

   A paper-map palette, dashed rules and a tab bar that lives at the bottom of
   the viewport on a phone and at the top of the page on a wide screen. The
   class prefix is .wm- throughout; the only bare element selectors are the
   resets at the top. No web font is fetched — Bitter and Work Sans are named
   first so a reader who already has them gets them, and every fallback below
   is a system face, which is what keeps the privacy page's "no third-party
   requests" line true.
   ========================================================================== */

:root {
  --trailhead-moss: #4b5d3a;
  --waymark-clay: #b9714a;
  --paper-map: #f4efe4;
  --blaze-yellow: #e9c46a;
  --ink-bark: #2f3a26;
  --ink-faint: #6b7259;
  --rule-line: rgba(75, 93, 58, 0.28);
  --shade-card: #fbf8f0;
  --moss-deep: #3a4a2c;
  --serif: Bitter, Rockwell, 'Noto Serif', Georgia, serif;
  --sans: 'Work Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-plate: 3px;
  --bar-height: 58px;
  --rail-width: 306px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper-map);
  background-image: url('/assets/waymark/paper-grain.svg');
  background-size: 120px 120px;
  color: var(--ink-bark);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.22; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.72rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--trailhead-moss); text-decoration-color: rgba(185, 113, 74, 0.55); text-underline-offset: 3px; }
a:hover { color: var(--waymark-clay); }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.15em; }
li { margin-bottom: 0.35em; }
button { font: inherit; }

.wm-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--blaze-yellow); color: var(--ink-bark);
  padding: 10px 16px; z-index: 40; font-weight: 600;
}
.wm-skip:focus { left: 8px; top: 8px; }

.wm-shell { width: min(1180px, 100% - 2.4rem); margin-inline: auto; }

/* --------------------------------------------------------------- masthead */

.wm-masthead {
  border-bottom: 1px dashed var(--rule-line);
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: blur(3px);
  position: relative;
  z-index: 12;
}
.wm-masthead-in {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--bar-height);
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 6px 0;
}
.wm-mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.wm-mark strong { font-family: var(--serif); font-size: 1.32rem; letter-spacing: -0.015em; }
.wm-mark strong i { font-style: normal; color: var(--waymark-clay); }
.wm-mark span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.wm-masthead-side { display: flex; align-items: center; gap: 14px; font-size: 0.86rem; }
.wm-lang a {
  border: 1px solid var(--rule-line); border-radius: 999px;
  padding: 3px 12px; text-decoration: none; font-weight: 600; letter-spacing: 0.04em;
}
.wm-lang a:hover { background: var(--blaze-yellow); border-color: var(--blaze-yellow); color: var(--ink-bark); }
.wm-mail { color: var(--ink-faint); text-decoration: none; border-bottom: 1px dashed var(--rule-line); }

/* ------------------------------------------------------------------- tabs */

.wm-tabs { position: sticky; top: 0; z-index: 14; background: var(--moss-deep); }
.wm-tabs ul {
  display: flex; list-style: none; margin: 0 auto; padding: 0;
  width: min(1180px, 100% - 1.2rem);
}
.wm-tabs li { flex: 1 1 0; margin: 0; }
.wm-tabs a {
  display: block; text-align: center; padding: 13px 6px;
  color: #e8e4d6; text-decoration: none; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.03em; border-bottom: 3px solid transparent;
}
.wm-tabs a:hover { background: rgba(233, 196, 106, 0.14); color: #fff; }
.wm-tabs a[aria-current='page'] { border-bottom-color: var(--blaze-yellow); color: var(--blaze-yellow); }

/* ------------------------------------------------------------------- hero */

.wm-hero { position: relative; background: var(--paper-map); border-bottom: 1px dashed var(--rule-line); }
.wm-hero-board { position: relative; height: clamp(300px, 56vh, 560px); overflow: hidden; }
.wm-hero-board svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wm-hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(244, 239, 228, 0.97), rgba(244, 239, 228, 0));
  padding: 34px 0 14px; font-size: 0.84rem; color: var(--ink-faint);
}
.wm-hero-cap b { color: var(--ink-bark); }

/* --------------------------------------------------------------- headings */

.wm-pagehead { padding: 38px 0 16px; border-bottom: 1px dashed var(--rule-line); }
.wm-kicker {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--waymark-clay); font-weight: 700;
  border-bottom: 2px solid var(--blaze-yellow); padding-bottom: 2px; margin-bottom: 14px;
}
.wm-lede { font-size: 1.06rem; max-width: 68ch; color: #3d472f; }
.wm-sub { font-size: 0.92rem; color: var(--ink-faint); max-width: 66ch; margin-top: -0.3em; }
.wm-note { font-size: 0.82rem; color: var(--ink-faint); }

/* ------------------------------------------------------- facets and cards */

.wm-facets { padding: 26px 0 8px; }
.wm-facetbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wm-facetbar + .wm-facetbar { margin-top: 10px; }
.wm-facetbar b {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-right: 2px;
}
.wm-facet {
  border: 1px dashed var(--rule-line); border-radius: 999px;
  padding: 4px 13px; font-size: 0.86rem; text-decoration: none; color: var(--ink-bark);
  background: var(--shade-card);
}
.wm-facet:hover { background: var(--blaze-yellow); border-style: solid; }
.wm-switch { display: block; height: 0; overflow: hidden; scroll-margin-top: 76px; }

.wm-deck {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; padding: 18px 0 46px;
}
.wm-card {
  display: grid; grid-template-columns: 74px 1fr; gap: 14px;
  background: var(--shade-card); border: 1px solid var(--rule-line);
  border-radius: var(--radius-plate); padding: 16px 18px 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 0 rgba(75, 93, 58, 0.06);
  position: relative;
}
.wm-card::after {
  content: ''; position: absolute; inset: 6px; border: 1px dashed rgba(185, 113, 74, 0.25);
  border-radius: 2px; pointer-events: none;
}
.wm-card-pin {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--blaze-yellow); border: 2px solid var(--trailhead-moss);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink-bark);
}
.wm-card h3 { margin: 0 0 4px; font-size: 1.06rem; }
.wm-card h3 a { text-decoration: none; }
.wm-card-place { font-size: 0.8rem; color: var(--ink-faint); margin: 0 0 8px; }
.wm-card-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.78rem; }
.wm-card-facts li {
  margin: 0; border: 1px solid var(--rule-line); border-radius: 2px;
  padding: 1px 7px; background: var(--paper-map); color: #40492f;
}

/* CSS-only facets. The seven empty .wm-switch spans sit between the facet bars
   and the deck, so a :target on one of them is a sibling combinator away from
   the cards. With no switch targeted — or with the section's own #wm-board
   targeted by "All routes" — every card is shown. General sibling combinator
   only: nothing here needs :has(). */
#wm-f-city:target ~ .wm-deck .wm-card,
#wm-f-park:target ~ .wm-deck .wm-card,
#wm-f-forest:target ~ .wm-deck .wm-card,
#wm-f-water:target ~ .wm-deck .wm-card,
#wm-f-short:target ~ .wm-deck .wm-card,
#wm-f-mid:target ~ .wm-deck .wm-card,
#wm-f-long:target ~ .wm-deck .wm-card { display: none; }
#wm-f-city:target ~ .wm-deck .wm-card[data-terrain='city'],
#wm-f-park:target ~ .wm-deck .wm-card[data-terrain='park'],
#wm-f-forest:target ~ .wm-deck .wm-card[data-terrain='forest'],
#wm-f-water:target ~ .wm-deck .wm-card[data-terrain='water'],
#wm-f-short:target ~ .wm-deck .wm-card[data-band='short'],
#wm-f-mid:target ~ .wm-deck .wm-card[data-band='mid'],
#wm-f-long:target ~ .wm-deck .wm-card[data-band='long'] { display: grid; }

/* ------------------------------------------------------ the full register */

.wm-register { padding: 26px 0 44px; }
.wm-register-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); border-bottom: 2px solid var(--rule-line); padding-bottom: 8px;
}
.wm-register-list { list-style: none; margin: 0; padding: 0; }
.wm-entry {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 190px; gap: 20px;
  align-items: start; padding: 22px 0; margin: 0;
  border-bottom: 1px dotted rgba(75, 93, 58, 0.24);
}
.wm-entry-no {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--waymark-clay);
  border-right: 2px solid var(--blaze-yellow); padding-right: 12px; line-height: 1.1;
}
.wm-entry-body h2 { margin: 0 0 3px; font-size: 1.16rem; }
.wm-entry-body h2 a { text-decoration: none; }
.wm-entry-place { font-size: 0.82rem; color: var(--ink-faint); margin: 0 0 6px; }
.wm-entry-open { font-size: 0.94rem; color: #444e37; max-width: 68ch; margin: 0 0 9px; }
.wm-entry-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 0.76rem; }
.wm-entry-tags li {
  margin: 0; border: 1px dashed var(--rule-line); border-radius: 999px;
  padding: 1px 9px; color: #4a5340; background: var(--shade-card);
}
.wm-entry-nums { margin: 0; display: grid; gap: 5px; font-size: 0.84rem; }
.wm-entry-nums div { display: flex; justify-content: space-between; gap: 10px; }
.wm-entry-nums dt { color: var(--ink-faint); }
.wm-entry-nums dd { margin: 0; font-weight: 600; }

/* ------------------------------------------------------- grouped listings */

.wm-groups { padding: 22px 0 48px; }
.wm-group { padding: 26px 0 10px; border-bottom: 1px dashed var(--rule-line); }
.wm-group:last-child { border-bottom: 0; }
.wm-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wm-group-head h2 { margin: 0; }
.wm-group-count {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--waymark-clay);
}
.wm-group-lede { font-size: 0.96rem; color: #444e37; max-width: 74ch; margin: 8px 0 14px; }
.wm-group-list { list-style: none; margin: 0; padding: 0; }
.wm-group-list li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px;
  align-items: baseline; padding: 10px 0; margin: 0;
  border-bottom: 1px dotted rgba(75, 93, 58, 0.2);
}
.wm-group-list li:last-child { border-bottom: 0; }
.wm-group-no { font-family: var(--serif); font-weight: 700; color: var(--waymark-clay); }
.wm-group-list a { text-decoration: none; font-weight: 600; }
.wm-group-meta { font-size: 0.78rem; color: var(--ink-faint); text-align: right; }

.wm-paces {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 0 0; font-size: 0.82rem;
}
.wm-paces b { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.wm-paces ul { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.wm-paces li {
  margin: 0; display: flex; gap: 7px; align-items: baseline;
  border: 1px solid var(--rule-line); border-radius: 2px; padding: 2px 10px; background: var(--shade-card);
}
.wm-paces em { font-style: normal; font-family: var(--serif); font-weight: 700; color: var(--waymark-clay); }

/* ---------------------------------------------------------- route detail */

.wm-route { padding: 30px 0 56px; }
.wm-route-in {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 0 44px;
  align-items: start;
}
.wm-route-head { grid-column: 2; grid-row: 1; }
.wm-route-head h1 { margin-bottom: 6px; }
.wm-route-place { font-size: 0.94rem; color: var(--ink-faint); margin: 0; }

/* The byline sits directly under the dateline, which is where the publish
   date is printed, so date and desk are read as one line of attribution.
   It is a desk, not a person: the link goes to the page that says how a
   route is written and checked, not to a biography. */
.wm-byline {
  font-size: 0.84rem; color: var(--ink-bark); margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.wm-byline a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(75, 93, 58, 0.4); }
.wm-byline a:hover { border-bottom-style: solid; }
.wm-plate { grid-column: 2; grid-row: 2; margin: 20px 0 26px; }
.wm-plate img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule-line); border-radius: var(--radius-plate); background: var(--shade-card);
}
.wm-plate figcaption { font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }
.wm-route-main { grid-column: 2; grid-row: 3; }

.wm-rail { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 74px; }
.wm-rail-in {
  background: var(--shade-card); border: 1px solid var(--rule-line);
  border-radius: var(--radius-plate); padding: 18px 18px 16px;
  box-shadow: 0 2px 0 rgba(75, 93, 58, 0.07);
}
.wm-rail h2 {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--waymark-clay); margin-bottom: 12px;
}
.wm-rail h3 {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--waymark-clay); margin: 16px 0 8px; border-top: 1px dashed var(--rule-line); padding-top: 14px;
}
.wm-rail svg { width: 100%; height: auto; display: block; border: 1px dashed var(--rule-line); }
.wm-facts { margin: 0; display: grid; gap: 7px; font-size: 0.92rem; }
.wm-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted rgba(75, 93, 58, 0.18); padding-bottom: 5px; }
.wm-facts dt { color: var(--ink-faint); }
.wm-facts dd { margin: 0; font-weight: 600; text-align: right; }

.wm-prose { max-width: 74ch; }
.wm-prose p { font-size: 0.98rem; }

.wm-anchorblock { margin: 30px 0 0; padding-top: 22px; border-top: 1px dashed var(--rule-line); }
.wm-scriptblock { margin: 34px 0 0; padding-top: 22px; border-top: 1px dashed var(--rule-line); }
.wm-anchors { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.wm-anchors li {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px;
  margin: 0; padding: 10px 12px; background: var(--shade-card);
  border: 1px dashed var(--rule-line); border-left: 3px solid var(--waymark-clay);
  border-radius: 2px; font-size: 0.93rem;
}
.wm-anchor i {
  font-style: normal; font-weight: 700; color: var(--waymark-clay);
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 3px;
}

.wm-script { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: wmstep; }
.wm-step { border-left: 2px solid var(--rule-line); padding: 0 0 4px 22px; margin: 0 0 26px; position: relative; }
.wm-step:last-child { margin-bottom: 0; }
.wm-step p {
  font-family: var(--serif); font-style: italic; font-size: 1.06rem;
  line-height: 1.74; color: #333d27; margin-bottom: 10px;
}
.wm-step-no {
  position: absolute; left: -14px; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper-map); border: 2px solid var(--trailhead-moss); color: var(--trailhead-moss);
  font-size: 0.72rem; font-family: var(--sans); font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.wm-step:hover { border-left-color: var(--waymark-clay); }
.wm-step-tag {
  display: inline-block; font-style: normal;
  background: var(--paper-map); border: 1px dashed var(--waymark-clay);
  border-radius: 999px; padding: 2px 13px; font-size: 0.78rem; color: #4a3826;
}

.wm-caution {
  border: 1px dashed var(--waymark-clay); background: rgba(233, 196, 106, 0.16);
  border-radius: var(--radius-plate); padding: 16px 18px; font-size: 0.92rem; margin: 32px 0 0;
}
.wm-caution h2 { font-size: 1rem; margin-bottom: 8px; }
.wm-caution p:last-child { margin-bottom: 0; color: var(--ink-faint); font-size: 0.86rem; }

.wm-turn { display: flex; gap: 14px; margin-top: 30px; border-top: 1px dashed var(--rule-line); padding-top: 20px; flex-wrap: wrap; }
.wm-turn a, .wm-turn-blank {
  flex: 1 1 240px; border: 1px solid var(--rule-line); border-radius: var(--radius-plate);
  background: var(--shade-card); padding: 12px 15px; text-decoration: none; color: inherit;
  display: block; font-size: 0.94rem;
}
.wm-turn a:hover { border-color: var(--waymark-clay); background: var(--blaze-yellow); }
.wm-turn span { display: block; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--waymark-clay); margin-bottom: 4px; }
.wm-turn em { font-style: normal; font-family: var(--serif); font-weight: 700; }
.wm-turn a.next { text-align: right; }
.wm-turn-blank { color: var(--ink-faint); font-style: italic; border-style: dashed; }

.wm-back {
  display: inline-block; margin-top: 14px; font-size: 0.84rem; font-weight: 600;
  text-decoration: none; border-bottom: 2px solid var(--blaze-yellow); padding-bottom: 2px;
}

/* ----------------------------------------------------------- focus mode */

body.wm-focus .wm-rail-in { opacity: 0.34; }
body.wm-focus .wm-step { border-left-color: rgba(75, 93, 58, 0.12); }
body.wm-focus .wm-step p { color: #23291c; }

.wm-tools { display: flex; gap: 8px; align-items: center; margin: 16px 0 0; flex-wrap: wrap; }
.wm-tool {
  font-size: 0.8rem; background: var(--paper-map); color: var(--ink-bark);
  border: 1px dashed var(--rule-line); border-radius: 999px; padding: 4px 13px; cursor: pointer;
}
.wm-tool:hover { background: var(--blaze-yellow); border-style: solid; }
.wm-tool[aria-pressed='true'] { background: var(--blaze-yellow); border-style: solid; }

/* ------------------------------------------------------------ legal pages */

.wm-pagehead-doc { padding-bottom: 12px; }
.wm-docmeta { font-size: 0.82rem; color: var(--ink-faint); margin: 0; }
.wm-doc { padding: 24px 0 30px; max-width: 74ch; }
.wm-doc h2 { margin-top: 1.9em; font-size: 1.2rem; }
.wm-doc h2:first-child { margin-top: 0; }
.wm-doc h3 { margin-top: 1.4em; font-size: 1.02rem; }
.wm-doc p, .wm-doc li { font-size: 0.97rem; }
.wm-doc ul { padding-left: 1.2em; }
.wm-doc code {
  font-size: 0.9em; background: var(--shade-card);
  border: 1px solid var(--rule-line); border-radius: 2px; padding: 0 4px;
}
.wm-doc-foot {
  border-top: 1px dashed var(--rule-line); padding: 18px 0 56px;
  font-size: 0.86rem; color: var(--ink-faint); max-width: 74ch;
}

/* ------------------------------------------------------------------- 404 */

.wm-404 { padding: 70px 0 90px; max-width: 68ch; }
.wm-404-links { display: flex; gap: 22px; margin-top: 22px; }

/* ----------------------------------------------------------------- footer */

.wm-foot { border-top: 1px dashed var(--rule-line); background: rgba(58, 74, 44, 0.06); margin-top: 20px; }
.wm-foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; padding: 34px 0 18px; }
.wm-foot h3 { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--waymark-clay); }
.wm-foot ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.wm-foot p { font-size: 0.86rem; color: var(--ink-faint); max-width: 46ch; }
.wm-foot-base {
  border-top: 1px dotted rgba(75, 93, 58, 0.25); padding: 12px 0 74px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--ink-faint);
}
/* The editorial disclaimer sits above the copyright strip, on every page.
   Its own rule follows `.wm-foot p`, so the narrower column width used by the
   footer prose does not apply here. */
.wm-foot-disclaimer { padding: 14px 0 0; }
.wm-foot-disclaimer p {
  font-size: 0.78rem; line-height: 1.5; color: var(--ink-faint);
  max-width: 88ch; margin: 0; padding-top: 12px;
  border-top: 1px dotted rgba(75, 93, 58, 0.25);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .wm-entry { grid-template-columns: 52px minmax(0, 1fr); }
  .wm-entry-nums { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wm-entry-nums div { flex-direction: column; gap: 0; }
  .wm-entry-nums dd { text-align: left; }
  .wm-group-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .wm-group-meta { grid-column: 2; text-align: left; }
}

@media (max-width: 900px) {
  /* One column: title, plate, facts, then the script underneath. */
  .wm-route-in { grid-template-columns: minmax(0, 1fr); }
  .wm-route-head { grid-column: 1; grid-row: 1; }
  .wm-plate { grid-column: 1; grid-row: 2; }
  .wm-rail { grid-column: 1; grid-row: 3; position: static; margin: 0 0 30px; }
  .wm-route-main { grid-column: 1; grid-row: 4; }
  .wm-deck { grid-template-columns: 1fr; }
  .wm-foot-in { grid-template-columns: 1fr; gap: 18px; }
  .wm-anchors li { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  /* The board keeps its own proportions on a phone rather than being cropped. */
  .wm-hero-board { height: auto; }
  .wm-hero-board svg { position: static; height: auto; width: 100%; }
  .wm-hero-cap { position: static; background: none; padding: 10px 0 14px; }

  /* Tab bar drops to the bottom of the viewport, app-style. */
  .wm-tabs {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    border-top: 1px solid rgba(233, 196, 106, 0.35);
    box-shadow: 0 -2px 10px rgba(47, 58, 38, 0.18);
  }
  .wm-tabs ul { width: 100%; }
  .wm-tabs a { padding: 10px 4px 8px; font-size: 0.78rem; border-bottom: 0; border-top: 3px solid transparent; }
  .wm-tabs a[aria-current='page'] { border-top-color: var(--blaze-yellow); border-bottom-color: transparent; }
  .wm-foot-base { padding-bottom: 86px; }
  .wm-masthead-side { font-size: 0.8rem; gap: 10px; }
  .wm-turn a.next { text-align: left; }
  .wm-card { grid-template-columns: 58px 1fr; }
  .wm-card-pin { width: 50px; height: 50px; font-size: 1.1rem; }
}

@media print {
  .wm-tabs, .wm-masthead-side, .wm-turn, .wm-tools, .wm-foot, .wm-plate, .wm-anchorblock { display: none; }
  body { background: #fff; font-size: 11.5pt; }
  .wm-route-in { display: block; }
  .wm-rail { position: static; margin-bottom: 16px; }
  .wm-step { break-inside: avoid; }
  .wm-step p { color: #000; }
}
