/* Public marketing site (index.php, page.php via includes/marketingLayout.php).
   Distinct from the app shell in css/main.css -- none of the toolbar/panel
   chrome, its own tokens, its own type scale.

   The palette is not invented for the website: the canopy greens and the sun
   gold below are the exact values the app already uses to encode data
   (SHADE_COLORS in src/legStyle.js, the ramp in includes/canopy.php), so the
   marketing site and the product cannot drift apart on what "shade" looks
   like. Anything here that encodes data -- the demo route line, the legend
   swatches -- must keep taking its colours from those same constants.

   Deliberately single-theme (light). The body background is set explicitly
   rather than left to the browser: an earlier version of this file omitted it
   and pages with explicit dark text rendered dark-on-dark under a dark-mode
   heuristic. Don't remove it. */

/* Design tokens live in css/tokens.css, shared with the app -- see the note
   at the top of that file for why. */

/* -- Base ------------------------------------------------------------------ */

.marketing-body {
  margin: 0;
  background: var(--mk-paper);
  color: var(--mk-ink);
  font-family: var(--mk-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.mk-shell {
  max-width: var(--mk-shell);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

/* :where() so this contributes no specificity at all. As a plain
   `.marketing-body a` rule it outranked every single-class button style, and
   .mk-btn-dark's white text lost to `inherit` -- a black button with black
   text on the homepage hero. Component classes must be able to win here. */
:where(.marketing-body) a { color: inherit; }

.marketing-body :focus-visible {
  outline: 2px solid var(--mk-shade-5);
  outline-offset: 2px;
  border-radius: 3px;
}

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

/* -- Header ---------------------------------------------------------------- */

.marketing-header {
  position: relative;
  z-index: 5;
  background: transparent;
  color: inherit;
}

.marketing-header .mk-shell {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--mk-header-h);
}

.marketing-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 660;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  color: var(--mk-ink);
  flex-shrink: 0;
}

.marketing-logo svg { display: block; flex-shrink: 0; }

.marketing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 14.5px;
}

.marketing-nav a {
  color: var(--mk-ink-2);
  text-decoration: none;
}
.marketing-nav a:hover { color: var(--mk-ink); }
.marketing-nav a.mk-btn { color: var(--mk-ink); }
.marketing-nav a.mk-btn-dark { color: #fff; }
.marketing-nav [aria-current="page"] { color: var(--mk-ink); font-weight: 550; }

/* Wrapper exists purely so the whole link group can be hidden at once on
   narrow screens; it must not introduce a box of its own. */
.mk-nav-links { display: contents; }

/* -- Main ------------------------------------------------------------------ */

.marketing-main { flex: 1; width: 100%; }

/* -- Hero ------------------------------------------------------------------ */

/* --mk-sky is rewritten by src/shadeDemo.js as the time slider moves, so the
   page's own light changes with the sun in the demo. Falls back to the
   daylight gradient when JS never runs. */
.mk-hero {
  position: relative;
  /* padding-top rather than a margin on .mk-hero-copy: a top margin on the
     first child collapses through this box, which moves the hero's own top
     edge down and takes the sky with it. */
  padding: 36px 0 64px;
}

/* Extends one header's worth above the hero so the gradient starts at the very
   top of the page, behind the nav, the way the design does. The header sets
   background: transparent and z-index: 5, so it paints over this rather than
   being hidden by it. Pages without a .mk-hero keep a plain white header. */
.mk-hero::before {
  content: "";
  position: absolute;
  inset: calc(var(--mk-header-h) * -1) 0 0 0;
  background: var(--mk-sky, linear-gradient(180deg, #e7f0f6 0%, #f6f9fa 55%, #fff 100%));
  transition: background 500ms ease;
  z-index: 0;
}

.mk-hero > * { position: relative; z-index: 1; }

.mk-hero-copy {
  text-align: center;
  max-width: 810px;
  margin: 0 auto 30px;
}

.mk-hero h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}

.mk-hero h1 .mk-shadeword { color: var(--mk-shade-5); }

.mk-hero-lede {
  font-size: 17.5px;
  line-height: 1.58;
  color: var(--mk-ink-2);
  margin: 0 auto 26px;
  max-width: 54ch;
}

.mk-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* -- The shade demo -------------------------------------------------------- */

.mk-demo {
  background: var(--mk-paper);
  border: 1px solid var(--mk-line);
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(20, 24, 27, 0.04), 0 30px 60px -32px rgba(20, 24, 27, 0.35);
  overflow: hidden;
}

.mk-demo-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--mk-line);
  flex-wrap: wrap;
}

.mk-demo-title { font-size: 12.5px; font-weight: 620; letter-spacing: 0.01em; }

.mk-demo-hint {
  font-size: 12.5px;
  color: var(--mk-ink-3);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mk-demo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.mk-demo-map {
  border-right: 1px solid var(--mk-line);
  background: #f2f4f2;
  min-width: 0;
}

.mk-demo-map svg { display: block; width: 100%; height: auto; }

.mk-demo-side { padding: 22px; }

.mk-readout-time {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}

.mk-readout-sun { font-size: 13px; color: var(--mk-ink-2); margin: 0 0 20px; }

.mk-stat {
  border: 1px solid var(--mk-line);
  border-radius: 11px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--mk-paper-2);
}

.mk-stat-n {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mk-stat-n span { font-size: 18px; font-weight: 600; }

.mk-stat-c { font-size: 12.5px; color: var(--mk-ink-2); margin-top: 7px; line-height: 1.45; }

.mk-stat-plain { background: var(--mk-paper); }
.mk-stat-label { font-weight: 620; color: var(--mk-ink); margin-bottom: 5px; font-size: 12.5px; }

.mk-bar {
  height: 9px;
  border-radius: 5px;
  background: var(--mk-paper-3);
  overflow: hidden;
  margin-top: 12px;
}

.mk-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mk-shade-3), var(--mk-shade-5));
  transition: width 350ms ease;
}

.mk-slider-wrap { padding: 16px 20px 20px; border-top: 1px solid var(--mk-line); }

.mk-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--mk-ink-3);
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}

/* The track is painted with the day's own night/day split, the same idea as
   the time slider in the app: you can see where darkness is instead of
   dragging into it to find out. */
.mk-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg,
    #20262a 0%, #20262a 4%,
    #cfd8dd 7%, #eef2f4 30%, #eef2f4 70%, #cfd8dd 93%,
    #20262a 96%, #20262a 100%);
  outline: none;
  cursor: pointer;
  display: block;
}

.mk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--mk-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
}

.mk-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--mk-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
}

.mk-suggest {
  margin-top: 14px;
  font-size: 13px;
  color: var(--mk-shade-5);
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.mk-suggest button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--mk-shade-5);
  background: var(--mk-paper-3);
  border: 1px solid #cfe0cd;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.mk-suggest button:hover { background: #e3eee1; }

/* -- Section primitives ---------------------------------------------------- */

.mk-section { padding: 86px 0; }

.mk-band-soft {
  background: var(--mk-paper-2);
  border-top: 1px solid var(--mk-line);
  border-bottom: 1px solid var(--mk-line);
}

.mk-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--mk-shade-4);
  font-weight: 620;
  margin: 0 0 14px;
}

/* A {{wide}} page brings its own sections, so its <h1> lives inside one
   rather than in the prose column. */
.mk-section h1 {
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 14px;
  text-wrap: balance;
}

.mk-section h2,
.mk-band h2 {
  font-size: clamp(27px, 3.4vw, 37px);
  line-height: 1.11;
  letter-spacing: -0.03em;
  font-weight: 680;
  margin: 0 0 14px;
  text-wrap: balance;
}

.mk-section h3 {
  font-size: 19px;
  font-weight: 640;
  letter-spacing: -0.015em;
  margin: 0 0 9px;
}

.mk-head { max-width: 62ch; margin: 0 0 52px; }
.mk-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.mk-head p { font-size: 17px; line-height: 1.6; color: var(--mk-ink-2); margin: 0; }

/* -- Facts strip ----------------------------------------------------------- */

.mk-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--mk-line);
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-radius);
  overflow: hidden;
  margin: 8px 0 0;
}

.mk-fact { background: var(--mk-paper-2); padding: 24px 26px; }

.mk-fact-v {
  font-size: 25px;
  font-weight: 660;
  letter-spacing: -0.025em;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.mk-fact-k { font-size: 13px; color: var(--mk-ink-2); line-height: 1.45; }

/* -- Cards ----------------------------------------------------------------- */

.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.mk-card {
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  padding: 26px;
  background: var(--mk-paper);
}

.mk-card-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mk-paper-2);
  border: 1px solid var(--mk-line);
  margin-bottom: 16px;
}

.mk-card p { font-size: 14.5px; line-height: 1.6; color: var(--mk-ink-2); margin: 0; }

/* Example-route cards: a map thumbnail, then the same shade strip the app
   draws under the elevation profile. */
.mk-card-thumb {
  border-radius: 10px;
  overflow: hidden;
  margin: -6px 0 16px;
  background: #f2f4f2;
  border: 1px solid var(--mk-line);
}
.mk-card-thumb svg { display: block; width: 100%; height: auto; }

.mk-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--mk-ink-2);
  margin: 0 0 14px;
  font-variant-numeric: tabular-nums;
}
.mk-card-stats b { color: var(--mk-ink); font-weight: 620; }

.mk-strip {
  display: flex;
  height: 10px;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0 8px;
}
.mk-strip i { display: block; height: 100%; }

.mk-strip-caption { font-size: 12px; color: var(--mk-ink-3); margin: 0 0 14px; }

/* -- Feature rows ---------------------------------------------------------- */

.mk-rows {
  display: grid;
  gap: 1px;
  background: var(--mk-line);
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  overflow: hidden;
}

.mk-row {
  background: var(--mk-paper);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  padding: 44px;
  align-items: center;
}

.mk-row-flip .mk-row-text { order: 2; }

.mk-row h3 { font-size: 22px; letter-spacing: -0.018em; font-weight: 640; margin: 0 0 12px; }
.mk-row p { font-size: 15px; line-height: 1.65; color: var(--mk-ink-2); margin: 0 0 18px; }
.mk-row p:last-child { margin-bottom: 0; }
.mk-row svg { display: block; width: 100%; height: auto; }

.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.mk-chip {
  font-size: 12px;
  color: var(--mk-ink-2);
  background: var(--mk-paper-2);
  border: 1px solid var(--mk-line);
  padding: 4px 10px;
  border-radius: 6px;
}

.mk-chip-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mk-chip-key::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--mk-chip-colour, var(--mk-ink-3));
}

/* -- Method chain ---------------------------------------------------------- */

.mk-chain { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.mk-node {
  background: var(--mk-paper);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  padding: 22px;
  position: relative;
}

.mk-node-idx {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mk-ink-3);
  margin-bottom: 14px;
  font-weight: 600;
}

.mk-node h3 { font-size: 16.5px; font-weight: 620; margin: 0 0 8px; }
.mk-node p { font-size: 13.5px; line-height: 1.6; color: var(--mk-ink-2); margin: 0 0 16px; }

.mk-node-src {
  font-size: 11.5px;
  color: var(--mk-shade-4);
  border-top: 1px solid var(--mk-line);
  padding-top: 12px;
  font-weight: 550;
}

/* The chain is a real pipeline -- cover and height in, shade on the road out --
   so the arrows between the steps are information, not decoration. */
.mk-node::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--mk-line-strong);
  border-right: 1.5px solid var(--mk-line-strong);
  transform: translateY(-50%) rotate(45deg);
}
.mk-node:last-child::after { display: none; }

/* -- Limits ---------------------------------------------------------------- */

.mk-limits {
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  background: var(--mk-paper);
  padding: 4px 26px;
  margin: 0;
  list-style: none;
}

.mk-limits li {
  padding: 18px 0;
  border-bottom: 1px solid var(--mk-line);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--mk-ink-2);
}
.mk-limits li:last-child { border-bottom: 0; }
.mk-limits b { color: var(--mk-ink); font-weight: 620; display: block; margin-bottom: 3px; }

.mk-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: start;
}


/* -- CTA band -------------------------------------------------------------- */

.mk-band {
  background: var(--mk-ink);
  color: #fff;
  text-align: center;
  padding: 86px 0;
}

.mk-band h2 { color: #fff; }
.mk-band p {
  color: var(--mk-on-ink-2);
  font-size: 17px;
  max-width: 50ch;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* -- Prose (raw-HTML page bodies from the CMS) ----------------------------- */

/* Everything under here styles arbitrary HTML typed into
   admin.runmapapp.com/pages.php, so it has to look right for plain <h2>/<p>/
   <ul> with no classes at all. */
.mk-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.mk-prose > h1 {
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}

.mk-prose > h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.022em;
  font-weight: 660;
  margin: 44px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--mk-line);
}

.mk-prose > h2:first-child,
.mk-prose > h1 + h2 { border-top: 0; padding-top: 0; margin-top: 28px; }

.mk-prose h3 { font-size: 18px; font-weight: 620; letter-spacing: -0.012em; margin: 28px 0 8px; }

.mk-prose p { font-size: 16.5px; line-height: 1.68; color: var(--mk-ink-2); margin: 0 0 18px; }
.mk-prose > p:first-of-type { font-size: 18px; color: var(--mk-ink-2); }

.mk-prose strong { color: var(--mk-ink); font-weight: 620; }
.mk-prose a { color: var(--mk-shade-5); text-decoration: underline; text-underline-offset: 2px; }
.mk-prose a:hover { color: var(--mk-ink); }

.mk-prose ul, .mk-prose ol { margin: 0 0 18px; padding-left: 22px; }
.mk-prose li { font-size: 16.5px; line-height: 1.68; color: var(--mk-ink-2); margin-bottom: 8px; }
.mk-prose li::marker { color: var(--mk-shade-3); }

.mk-prose blockquote {
  margin: 24px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--mk-shade-3);
  font-size: 18px;
  line-height: 1.5;
  color: var(--mk-ink);
}

.mk-prose hr { border: 0; border-top: 1px solid var(--mk-line); margin: 40px 0; }

.mk-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 0 0 22px;
}
.mk-prose th, .mk-prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--mk-line);
  vertical-align: top;
}
.mk-prose th { font-weight: 620; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mk-ink-3); }
.mk-prose td { color: var(--mk-ink-2); }

/* A wide block a page author drops in scrolls inside itself rather than
   pushing the whole page sideways. */
.mk-prose pre { overflow-x: auto; }

.mk-prose details {
  border-bottom: 1px solid var(--mk-line);
  padding: 4px 0;
}
.mk-prose details summary {
  cursor: pointer;
  padding: 16px 30px 16px 0;
  font-size: 16.5px;
  font-weight: 570;
  color: var(--mk-ink);
  list-style: none;
  position: relative;
}
.mk-prose details summary::-webkit-details-marker { display: none; }
.mk-prose details summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 24px;
  width: 8px; height: 8px;
  border-right: 1.8px solid var(--mk-ink-3);
  border-bottom: 1.8px solid var(--mk-ink-3);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.mk-prose details[open] summary::after { transform: rotate(-135deg); top: 27px; }
.mk-prose details p:last-child { margin-bottom: 18px; }

.mk-note {
  background: var(--mk-paper-2);
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-radius);
  padding: 20px 22px;
  margin: 0 0 22px;
}
.mk-note p:last-child { margin-bottom: 0; }
.mk-note p { font-size: 15px; }

/* -- Pricing --------------------------------------------------------------- */

.mk-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0 0 28px;
}

.mk-plan {
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  padding: 26px;
  background: var(--mk-paper);
  display: flex;
  flex-direction: column;
}

.mk-plan-featured { border-color: var(--mk-shade-4); box-shadow: 0 0 0 1px var(--mk-shade-4); }

.mk-plan-name { font-size: 13px; font-weight: 620; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mk-ink-3); margin: 0 0 12px; }

.mk-plan-price {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}
.mk-plan-price span { font-size: 15px; font-weight: 500; color: var(--mk-ink-3); letter-spacing: 0; }

.mk-plan ul { list-style: none; margin: 18px 0 22px; padding: 0; }
.mk-plan li {
  font-size: 14.5px;
  color: var(--mk-ink-2);
  padding: 7px 0 7px 24px;
  position: relative;
  line-height: 1.5;
  margin: 0;
}
.mk-plan li::before {
  content: "";
  position: absolute;
  left: 2px; top: 13px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--mk-shade-4);
  border-bottom: 2px solid var(--mk-shade-4);
  transform: rotate(-45deg);
}
.mk-plan .mk-btn { margin-top: auto; justify-content: center; }

/* -- Footer ---------------------------------------------------------------- */

.marketing-footer {
  border-top: 1px solid var(--mk-line);
  padding: 52px 0 36px;
  font-size: 13.5px;
  background: var(--mk-paper);
}

.marketing-footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  max-width: var(--mk-shell);
  margin: 0 auto;
  padding: 0 32px;
}

.marketing-footer-cols h2 {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mk-ink-3);
  margin: 0 0 14px;
  font-weight: 620;
}

.marketing-footer-cols a {
  display: block;
  color: var(--mk-ink-2);
  text-decoration: none;
  padding: 5px 0;
}
.marketing-footer-cols a:hover { color: var(--mk-ink); }

.marketing-footer-note {
  font-size: 13px;
  color: var(--mk-ink-3);
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 32ch;
}

.marketing-footer-bottom {
  max-width: var(--mk-shell);
  margin: 40px auto 0;
  padding: 22px 32px 0;
  border-top: 1px solid var(--mk-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--mk-ink-3);
  font-size: 12.5px;
}

/* -- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
  .mk-demo-body { grid-template-columns: minmax(0, 1fr); }
  .mk-demo-map { border-right: 0; border-bottom: 1px solid var(--mk-line); }
  .mk-facts { grid-template-columns: repeat(2, 1fr); }
  .mk-cards { grid-template-columns: minmax(0, 1fr); }
  .mk-chain { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .mk-node::after { display: none; }
  .mk-row, .mk-row-flip .mk-row-text { grid-template-columns: minmax(0, 1fr); order: 0; gap: 28px; padding: 30px; }
  .mk-split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .marketing-footer-cols { grid-template-columns: 1fr 1fr; }
}

/* BETWEEN PHONE AND DESKTOP THE SIGNED-IN HEADER RAN OUT OF ROOM, and the
   only give left was the nav links wrapping: at 800px "How it works" broke
   onto three lines (seen 2026-09-26, building /how-it-works). The two
   buttons with a glyph drop their label here, the same trade the 720px rule
   below makes for phones, and no link is allowed to wrap. */
@media (max-width: 1080px) {
  .marketing-nav { gap: 18px; }
  .marketing-nav a { white-space: nowrap; }
  .marketing-nav .app-nav-feedback span,
  .marketing-nav .mk-routes-btn span { display: none; }
  .marketing-nav .app-nav-feedback,
  .marketing-nav .mk-routes-btn { padding: 10px 12px; }
  .marketing-nav .mk-routes-btn svg { margin: 0; }
  /* Account's -16px pull towards the CTA (css/tokens.css) assumed desktop's
     24px gap; against 18px it left the two buttons touching. */
  .marketing-nav .mk-account-btn { margin-right: -10px; }
}

@media (max-width: 720px) {
  .mk-shell { padding: 0 20px; }
  .mk-section { padding: 60px 0; }
  .marketing-nav { gap: 14px; }
  .marketing-nav .mk-nav-links { display: none; }
  /* THE SIGNED-IN HEADER DID NOT FIT AT 375px EVEN BEFORE FEEDBACK JOINED
     IT -- measured at 404px of content in a 375px shell, so "My routes" was
     already running off the right edge with nothing to scroll it back. Both
     buttons that have a glyph drop their label here and the one that does
     not (Account) keeps its, which brings the row to 346px. */
  .marketing-nav .app-nav-feedback span,
  .marketing-nav .mk-routes-btn span { display: none; }
  .marketing-nav .app-nav-feedback,
  .marketing-nav .mk-routes-btn { padding: 10px 12px; }
  .marketing-nav .mk-routes-btn svg { margin: 0; }
  /* This gap is already tighter than desktop's 24px -- .mk-account-btn's
     -16px (css/tokens.css) would overlap the CTA instead of just sitting
     close to it, so it's cancelled at this width. */
  .marketing-nav .mk-account-btn { margin-right: 0; }
  .marketing-header .mk-shell { gap: 12px; }
  .mk-prose { padding: 40px 20px 64px; }
  .marketing-footer-cols, .marketing-footer-bottom { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-body *,
  .mk-hero::before,
  .mk-bar i { transition: none !important; animation: none !important; }
}
