﻿:root {
  --bg: #f5f2ee;
  --paper: #ffffff;
  --ink: #1f2429;
  --muted: #5d6570;
  --line: rgba(31, 36, 41, 0.14);
  --orange: #d86b39;
  --orange-deep: #bf4f2a;
  --navy: #102b52;
  --navy-soft: #1d3f6d;
  --blue: #2d76d7;
  --mist: #eef4fb;

  /* ---------- Typography tokens ----------
     One font stack and one letter-spacing scale for the whole site.
     Use these instead of ad-hoc values so every page stays consistent.

     "Inter" is self-hosted from `vendor/fonts/inter.css` (latin subset,
     variable weight 100–900, ~48KB). Every page preloads the woff2 so the
     display type renders in Inter on first paint instead of swapping late.
     CJK glyphs are not in the subset and fall through to PingFang SC /
     Microsoft YaHei, which is intentional — shipping a CJK webfont would
     cost megabytes for a site whose copy is English. */
  --font-sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Display: oversized hero / poster type */
  --track-display: -0.04em;
  /* Heading: h1–h3 and card titles */
  --track-heading: -0.02em;
  /* Body: paragraphs, lists, form text */
  --track-body: 0;
  /* Label: small uppercase kickers, badges, chips */
  --track-label: 0.06em;

  /* ---------- Vertical rhythm tokens ----------
     Headings carry `margin: 0` and sit inside flex/grid columns, so the space
     between a heading and the text under it comes from the parent's `gap`.
     These two values are the single source of truth for that rhythm. */
  --space-after-heading: 20px;
  /* Extra breathing room above a heading that follows body text. */
  --space-before-heading: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings inherit the same stack and a single tracking value. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  letter-spacing: var(--track-heading);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
}

/* Form controls do not inherit the page font by default — force it so buttons,
   selects and inputs match the surrounding text on every page. */
button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px 22px;
}

.site-nav .brand {
  display: flex;
  align-items: center;
}

.site-nav .brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}

.site-nav .brand-mark img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(16, 43, 82, 0.12);
  border: 1px solid rgba(16, 43, 82, 0.1);
  background: #fff;
  flex-shrink: 0;
}

.site-nav .brand-mark span {
  font-size: clamp(1.45rem, 2.1vw, 2.25rem);
  font-weight: 800;
  letter-spacing: var(--track-heading);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* Nav links: no colour change on hover/press. Emphasis comes from weight and
   an underline only, so the row stays calm and readable.

   The weight is fixed at 600 in every state. Animating `font-weight` reflows
   the text and nudges neighbouring links sideways, which reads as jitter even
   with a transition. Hover/active/current are signalled by the underline
   colour alone — zero layout shift. */
.nav-links a {
  color: var(--navy);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: var(--track-heading);
  line-height: 1.2;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--navy);
  border-bottom-color: rgba(16, 43, 82, 0.35);
}

.nav-links a:active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* Current page: solid underline, no colour shift. */
.nav-links a[aria-current="page"],
.nav-links a.is-current {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* Account link: set apart from the page links with a pill, so it reads as an
   action rather than another section. */
.nav-links a.nav-account {
  padding: 7px 15px;
  border: 1px solid rgba(16, 43, 82, 0.22);
  border-radius: 999px;
  font-size: 0.95rem;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links a.nav-account:hover,
.nav-links a.nav-account:focus {
  border-color: rgba(16, 43, 82, 0.5);
  background: rgba(16, 43, 82, 0.05);
}

.nav-links a.nav-account.is-signed-in {
  border-color: rgba(31, 122, 77, 0.35);
  background: rgba(31, 122, 77, 0.08);
  color: #1a6641;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px 64px;
}

.editorial-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.editorial-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.section-kicker {
  font-size: 0.82rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #7b7f86;
  font-weight: 700;
}

.big-hed {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 5rem);
  line-height: 0.98;
  letter-spacing: var(--track-display);
  color: #1f2328;
  font-weight: 800;
}

.big-hed span {
  color: #1f2328;
}

.hero {
  display: block;
  min-height: 420px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1100px;
}

.brand-hero {
  padding-top: 18px;
}

.editorial-hero {
  position: relative;
  overflow: hidden;
  min-height: 700px;
  padding: 28px 32px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.15);
  background-image: url('haihe-riverside-perspective-bg.jpg');
  background-size: cover;
  background-position: center center;
  transform: perspective(1600px) scale(1.03) translateZ(0);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.editorial-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 22, 28, 0.12) 0%, rgba(17, 24, 31, 0.08) 18%, rgba(17, 24, 31, 0.14) 100%);
  z-index: 0;
}

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

.editorial-hero .eyebrow,
.editorial-hero .hero-text,
.editorial-hero h1,
.editorial-hero .primary-btn,
.editorial-hero .secondary-btn,
.editorial-hero .map-point,
.editorial-hero .stat-pill strong,
.editorial-hero .stat-pill span {
  color: #ffffff;
}

.editorial-hero .hero-copy {
  max-width: 1100px;
  padding-top: 22px;
  align-items: flex-start;
  text-align: left;
}

.editorial-hero .eyebrow {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: var(--track-heading);
  opacity: 0.92;
}

.editorial-hero h1 {
  font-size: clamp(4.8rem, 8vw, 11rem);
  letter-spacing: var(--track-display);
  line-height: 0.82;
  margin-top: 8px;
  max-width: 800px;
}

.editorial-hero .hero-text {
  max-width: 66%;
  font-size: clamp(1.5rem, 2.4vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: var(--track-heading);
  margin-top: 8px;
  font-weight: 700;
  text-align: left;
  text-shadow: 0 2px 24px rgba(10, 16, 22, 0.45);
}

.editorial-hero .hero-actions {
  margin-top: 20px;
  gap: 24px;
}

.editorial-hero .primary-btn,
.editorial-hero .secondary-btn {
  font-size: clamp(1.3rem, 2vw, 2.2rem);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}

.editorial-hero .hero-stats {
  margin-top: 30px;
  gap: 16px;
}

.editorial-hero .stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 800px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(4px);
}

.editorial-hero .stat-pill strong,
.editorial-hero .stat-pill span {
  display: inline;
  font-size: clamp(1.7rem, 2.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: var(--track-display);
}

.editorial-hero .stat-pill strong {
  margin-right: 12px;
}

.eyebrow {
  margin: 0;
  color: #5d6470;
  font-size: 0.9rem;
  letter-spacing: var(--track-body);
  font-weight: 700;
}

.hero h1,
.section-block h2,
.story-copy h2,
.detail-copy h1 {
  margin: 0;
  line-height: 0.9;
  letter-spacing: var(--track-display);
  color: #1d2128;
}

.hero h1 {
  font-size: clamp(3.5rem, 6vw, 7rem);
  font-weight: 800;
}

.hero-text {
  max-width: 980px;
  margin: 0;
  color: #2b2f34;
  font-size: clamp(1.35rem, 2vw, 2.3rem);
  line-height: 1.35;
  letter-spacing: var(--track-display);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 6px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  color: #1d2128;
  font-size: clamp(1.1rem, 1.6vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: var(--track-display);
  font-weight: 500;
}

.primary-btn:hover,
.secondary-btn:hover,
.primary-btn:focus,
.secondary-btn:focus {
  color: #d66d3a;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.stat-pill {
  display: block;
  color: #1d2128;
  font-size: clamp(1.4rem, 2vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: var(--track-display);
}

.stat-pill strong {
  font-weight: 800;
  color: #1d2128;
}

.stat-pill span {
  color: #5d6470;
  font-weight: 500;
}

.map-point {
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: var(--track-display);
  color: #2c3137;
}

.map-point.p1,
.map-point.p2,
.map-point.p3,
.map-point.p4 {
  position: static;
}

.section-block,
.editorial-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding-top: 16px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
}

.section-title-row h2 {
  margin: 0;
  color: #1a1d20;
  font-size: clamp(1.75rem, 3vw, 2.9rem);
  letter-spacing: var(--track-display);
  line-height: 1.05;
}

.section-title-row a {
  color: #1a1d20;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- Home: "Start here" three-step block ---------- */
.start-block .section-title-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.section-subtitle {
  margin: 0;
  max-width: 46ch;
  color: #5d6570;
  font-size: 1rem;
  line-height: 1.6;
}

.start-block .section-subtitle {
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .start-block .section-subtitle {
    max-width: 46ch;
    white-space: normal;
  }
}

.start-steps {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.start-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 38, 42, 0.1);
}

.start-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(214, 109, 58, 0.14);
  color: #b85d39;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: var(--track-body);
}

.start-step h3 {
  margin: 0;
  color: #1b1f24;
  font-size: 1.15rem;
  letter-spacing: var(--track-heading);
}

.start-step p {
  margin: 0;
  color: #4f5961;
  font-size: 0.94rem;
  line-height: 1.65;
  flex: 1;
}

.start-step-link {
  color: #b85d39;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.start-step-link:hover,
.start-step-link:focus-visible {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .start-steps {
    grid-template-columns: 1fr;
  }
}

.route-grid,
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.route-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* Compact photo: a fixed-height strip instead of a full-width banner.
   `flex: none` is required — the card is a column flex container, so without
   it the thumb would be shrunk below its declared height by the text below. */
.route-list-card .route-thumb {
  flex: none;
  min-height: 0;
  height: 168px;
  aspect-ratio: auto;
  overflow: hidden;
}

.route-list-card .route-thumb > picture > img {
  transition: transform 0.45s ease, filter 0.25s ease;
}

/* The Haihe photo is portrait (1138x1600) but the thumb is a wide strip, so
   `cover` crops it hard. Bias the crop upward to keep the skyline in frame. */
.route-list-card .thumb-haihe > picture > img {
  object-position: center 38%;
}

/* The TEDA photo is 1290x933 with the top ~55% being empty sky. The wide strip
   only shows ~279px of source height, so default centring lands on sky — push
   the crop down to the buildings. */
.route-list-card .thumb-taida > picture > img {
  object-position: center 100%;
}

.route-list-card:hover .route-thumb > picture > img,
.route-list-card:focus-within .route-thumb > picture > img {
  transform: scale(1.04);
}

.route-list-card .route-body {
  flex: 1;
  padding: 14px 18px 18px;
  gap: var(--space-after-heading);
}

.route-list-card h2 {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  letter-spacing: var(--track-display);
  line-height: 1.2;
}

.route-list-card .route-body > p {
  font-size: 0.92rem;
  line-height: 1.5;
}

.route-list-card .route-meta-list {
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .route-list-card .route-thumb {
    height: 140px;
  }
}

/* ---------- Photo caption: one short line under each route image ---------- */
.route-caption {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 18px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.45;
}

.caption-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--orange);
}

/* Badge over the photo, replaces the old unused data-label attribute. */
.thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 43, 82, 0.78);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* Hover hint over the photo: "Tap for tips". */
.thumb-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #102b52;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.route-list-card:hover .thumb-hint,
.route-list-card:focus-within .thumb-hint {
  opacity: 1;
  transform: none;
}

/* Photo dims slightly while its tips are open. */
.route-list-card.is-open .route-thumb > picture > img {
  filter: brightness(0.82);
}

/* ---------- Expandable quick tips ---------- */
.route-points {
  margin-top: 2px;
  padding: 9px 11px;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: rgba(216, 107, 57, 0.07);
  animation: route-points-in 0.22s ease;
}

.route-points[hidden] {
  display: none;
}

.route-points ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.route-points li + li {
  margin-top: 4px;
}

@keyframes route-points-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 4px;
}

.route-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--navy-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.route-toggle:hover,
.route-toggle:focus-visible {
  border-color: var(--orange);
  color: var(--orange-deep);
}

.route-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.route-toggle[aria-expanded="true"] {
  background: rgba(216, 107, 57, 0.12);
  border-color: rgba(216, 107, 57, 0.4);
  color: var(--orange-deep);
}

.route-toggle-icon {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.route-toggle[aria-expanded="true"] .route-toggle-icon {
  transform: rotate(45deg);
}

/* Keep the "View details" link right under the content instead of pinned to the bottom */
.route-list-card .route-body > a,
.route-actions > a {
  margin-top: 0;
  padding-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  width: auto;
  color: #b85d39;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.route-list-card .route-body > a::after,
.route-actions > a::after {
  content: "→";
  transition: transform 0.18s ease;
}

.route-list-card .route-body > a:hover::after,
.route-list-card .route-body > a:focus-visible::after,
.route-actions > a:hover::after,
.route-actions > a:focus-visible::after {
  transform: translateX(3px);
}

.route-list-card .route-body > a:hover,
.route-list-card .route-body > a:focus-visible,
.route-actions > a:hover,
.route-actions > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Subtle lift when a card is hovered or has its tips open. */
.route-list-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.route-list-card:hover,
.route-list-card:focus-within {
  border-color: rgba(216, 107, 57, 0.35);
  box-shadow: 0 10px 26px rgba(16, 43, 82, 0.08);
  transform: translateY(-2px);
}

.route-list-card.is-open {
  border-color: rgba(216, 107, 57, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .route-list-card,
  .route-toggle,
  .route-toggle-icon,
  .route-points,
  .route-list-card .route-thumb > picture > img,
  .thumb-hint {
    transition: none;
    animation: none;
  }

  .route-list-card:hover,
  .route-list-card:focus-within {
    transform: none;
  }

  .route-list-card:hover .route-thumb > picture > img,
  .route-list-card:focus-within .route-thumb > picture > img {
    transform: none;
  }
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(35, 38, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  overflow: hidden;
}

.route-thumb {
  min-height: 220px;
  background: linear-gradient(135deg, rgba(27,56,77,0.12), rgba(86,126,154,0.2)), linear-gradient(120deg, #dfeefb 0%, #bed1df 35%, #a9c6d8 100%);
}

.route-photo-card {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
}

/* Route thumbnails are real <img> elements so they can lazy-load and be
   announced by screen readers. The gradient stays as a loading placeholder.
   NOTE: the <img> lives inside a <picture> wrapper, so the selector must go
   through <picture> — `.route-thumb > img` would never match. */
.route-thumb > img,
.route-thumb > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* <picture> is a transparent wrapper: keep it out of the layout so the
   absolutely positioned <img> inside still fills the thumb. */
.route-thumb > picture {
  display: contents;
}

.thumb-haihe {
  background: linear-gradient(135deg, rgba(27,56,77,0.12), rgba(86,126,154,0.2)), linear-gradient(120deg, #dfeefb 0%, #c4d9ea 35%, #9bc3d5 100%);
}

.thumb-nancui {
  background: linear-gradient(135deg, rgba(14,44,33,0.08), rgba(75,116,92,0.18)), linear-gradient(120deg, #e4efe6 0%, #d1e4d4 40%, #b9d3c2 100%);
}

.thumb-shuishang {
  background: linear-gradient(135deg, rgba(17,32,41,0.08), rgba(69,86,99,0.22)), linear-gradient(120deg, #dfeef4 0%, #cce1eb 42%, #b0d4c7 100%);
}

.route-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 18px 18px 20px;
}

.route-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 8px;
}

.route-intro p {
  margin: 0;
  color: #46515b;
  font-size: clamp(1.2rem, 1.9vw, 1.8rem);
  letter-spacing: var(--track-display);
  line-height: 1.5;
}

.route-intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.route-intro-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.08);
  color: var(--navy-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.route-meta-list {
  margin: 0;
  padding-left: 18px;
  color: #4f5961;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

.route-comparison {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  align-items: center;
}

.comparison-header {
  background: rgba(45, 118, 215, 0.08);
  font-weight: 800;
  color: var(--navy);
}

.comparison-header span {
  font-size: 0.78rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.comparison-row strong,
.comparison-row span {
  font-size: 0.96rem;
  line-height: 1.5;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.goal-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 20px 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
}

.goal-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(214, 109, 58, 0.1);
  color: #b75d39;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.goal-card h3,
.tip-card h2,
.tip-summary-copy h1 {
  margin: 0;
  color: #1b1f24;
  letter-spacing: var(--track-display);
}

.goal-card h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  line-height: 1.15;
}

.goal-card p,
.tip-card p,
.tip-card li,
.faq-list p {
  margin: 0;
  color: #4f5961;
  font-size: 1.03rem;
  line-height: 1.6;
}

.tip-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.tip-summary-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.tip-summary-copy h1 {
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 1.05;
}

.tip-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(16, 43, 82, 0.05);
  border: 1px solid rgba(16, 43, 82, 0.08);
}

.mini-stat strong {
  color: var(--navy);
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  letter-spacing: var(--track-display);
}

.mini-stat span {
  color: #5d6570;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}

.guide-grid,
.season-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tip-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 20px 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.tip-card h2 {
  font-size: clamp(1.2rem, 1.6vw, 1.65rem);
  line-height: 1.15;
}

.tip-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-card a,
.faq-list a,
.comparison-row a {
  color: var(--navy-soft);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(29, 63, 109, 0.3);
  text-underline-offset: 3px;
}

.tip-card a:hover,
.faq-list a:hover,
.comparison-row a:hover {
  color: var(--orange-deep);
  text-decoration-color: currentColor;
}

/* Run flow timeline — 3 columns */
.run-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.run-flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 22px 20px 24px;
}

/* Vertical divider between columns */
.run-flow-step:nth-child(n + 2) {
  border-left: 1px solid rgba(35, 38, 42, 0.12);
}

/* Connector dot sits on the left edge of every step except the first in a row */
.run-flow-step:nth-child(n + 2)::before {
  content: "";
  position: absolute;
  top: 34px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(216, 107, 57, 0.16);
}

/* Two-column variant (4 steps in a 2x2 grid) */
.run-flow--two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.run-flow--two-col .run-flow-step:nth-child(n + 2) {
  border-left: none;
}

.run-flow--two-col .run-flow-step:nth-child(even) {
  border-left: 1px solid rgba(35, 38, 42, 0.12);
}

.run-flow--two-col .run-flow-step:nth-child(n + 2)::before {
  content: none;
}

.run-flow--two-col .run-flow-step:nth-child(even)::before {
  content: "";
  position: absolute;
  top: 34px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(216, 107, 57, 0.16);
}

.run-flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(16, 43, 82, 0.08);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

.run-flow-step h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.02rem, 1.3vw, 1.22rem);
  letter-spacing: var(--track-display);
  line-height: 1.25;
}

.run-flow-step ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.run-flow-step li {
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.55;
}

/* Training intensity two-column layout */
.intensity-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: start;
}

.intensity-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.intensity-note h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  letter-spacing: var(--track-display);
  line-height: 1.2;
}

.intensity-note p {
  margin: 0;
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.6;
}

.intensity-table .comparison-row {
  grid-template-columns: 1.1fr repeat(4, minmax(0, 1fr));
}

/* Local conditions cards */
.local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.local-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 20px 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.local-tag {
  align-self: flex-start;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.1);
  color: var(--navy-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.local-card h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.1rem, 1.4vw, 1.32rem);
  letter-spacing: var(--track-display);
  line-height: 1.25;
}

.local-card p {
  margin: 0;
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.6;
}

.local-link {
  align-self: flex-start;
  margin-top: 2px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 43, 82, 0.16);
  background: rgba(16, 43, 82, 0.05);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.local-link:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Gear checklist */
.gear-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.gear-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px;
}

.gear-item dt {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1b1f24;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: var(--track-heading);
}

.gear-item dt::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 2px solid rgba(216, 107, 57, 0.55);
  background: rgba(216, 107, 57, 0.12);
}

.gear-item dd {
  margin: 0;
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.6;
}

.faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.qa {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(45, 118, 215, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(222, 236, 255, 0.32));
  box-shadow: 0 12px 24px rgba(16, 43, 82, 0.06);
}

.qa-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.qa-head h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  letter-spacing: var(--track-display);
  line-height: 1.2;
}

.qa-lead {
  margin: 0;
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.6;
}

/* BYOK panel: collapsed by default so the question box stays the focus. */
.qa-setup {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.qa-setup-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.qa-setup-summary::-webkit-details-marker {
  display: none;
}

.qa-setup-summary::before {
  content: "+";
  margin-right: 2px;
  color: var(--muted);
  font-weight: 800;
}

.qa-setup[open] .qa-setup-summary::before {
  content: "−";
}

.qa-setup-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}

.qa-setup-state {
  font-size: 0.82rem;
  color: var(--muted);
}

.qa-setup-state.is-on {
  color: #1f7a4d;
  font-weight: 700;
}

.qa-setup-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.qa-setup-note {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.qa-select {
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

.qa-select:focus {
  outline: 2px solid rgba(45, 118, 215, 0.35);
  outline-offset: 1px;
}

.qa-key-input {
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  padding: 11px 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

.qa-key-input:focus {
  outline: 2px solid rgba(45, 118, 215, 0.35);
  outline-offset: 1px;
  border-color: rgba(45, 118, 215, 0.4);
}

.qa-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.qa-save,
.qa-clear {
  border-radius: 10px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.qa-save {
  border: none;
  background: var(--navy);
  color: #fff;
}

.qa-save:hover {
  opacity: 0.9;
}

.qa-clear {
  border: 1px solid rgba(35, 38, 42, 0.16);
  background: transparent;
  color: var(--muted);
}

.qa-clear:hover {
  border-color: rgba(191, 79, 42, 0.4);
  color: var(--orange-deep);
}

.qa-setup-help {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.qa-setup-help a {
  color: var(--blue);
}

.qa-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #5d6570;
}

.qa-row {
  display: flex;
  gap: 10px;
}

.qa-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  color: #1b1f24;
  background: rgba(255, 255, 255, 0.85);
}

.qa-input:focus {
  outline: 2px solid rgba(45, 118, 215, 0.35);
  outline-offset: 1px;
  border-color: rgba(45, 118, 215, 0.4);
}

.qa-input:disabled {
  opacity: 0.6;
}

.qa-submit {
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--navy), #1d4e96);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.qa-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.qa-submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

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

.ai-chip {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.6);
  color: #1b1f24;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ai-chip:hover {
  background: rgba(45, 118, 215, 0.1);
  border-color: rgba(45, 118, 215, 0.25);
}

.qa-answer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(45, 118, 215, 0.16);
  background: rgba(255, 255, 255, 0.7);
}

.qa-answer[hidden] {
  display: none;
}

.qa-answer.is-error {
  border-color: rgba(191, 79, 42, 0.28);
  background: rgba(214, 109, 58, 0.07);
}

.qa-answer-meta {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #5d6570;
}

.qa-answer.is-error .qa-answer-meta {
  color: var(--orange-deep);
}

.qa-answer-body {
  margin: 0;
  color: #1d2127;
  font-size: 1.02rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* Fallback suggestions: shown only when a search matches nothing, so the
   user always has a clickable next step instead of a dead end. */
.qa-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 38, 42, 0.1);
}

.qa-suggestions[hidden] {
  display: none;
}

.qa-suggestions-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #5d6570;
}

.qa-suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qa-suggestion {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.qa-suggestion:hover,
.qa-suggestion:focus-visible {
  background: rgba(45, 118, 215, 0.1);
  border-color: rgba(45, 118, 215, 0.25);
}

.qa-suggestion:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .qa-row {
    flex-direction: column;
  }

  .qa-submit {
    width: 100%;
  }
}

.compact-row {
  margin: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.faq-list details {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  padding: 0 16px;
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #1c2025;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  padding: 0 0 16px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.about-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 22px 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.about-box h2 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.2rem, 1.6vw, 1.65rem);
  letter-spacing: var(--track-display);
}

.illustration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 8px 0 18px;
}

.illustration-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-after-heading);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.mini-illustration {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(45, 118, 215, 0.15), rgba(214,109,58,0.18));
  color: var(--navy);
  flex-shrink: 0;
}

.illustration-card h3 {
  margin: 0 0 var(--space-after-heading);
  color: #1b1f24;
  font-size: clamp(1.1rem, 1.4vw, 1.45rem);
  letter-spacing: var(--track-display);
}

.illustration-card p {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.about-box-highlight {
  background: linear-gradient(135deg, rgba(16, 43, 82, 0.06), rgba(45, 118, 215, 0.08));
}

.about-list {
  margin: 0;
  padding-left: 18px;
  color: #4f5961;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.6;
}

/* About page: intro */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(238, 244, 251, 0.4));
}

.about-intro-lead {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: var(--track-display);
  line-height: 1.25;
}

.about-intro-body {
  margin: 0;
  max-width: 68ch;
  color: #4f5961;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* About page: at-a-glance stats */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.about-stats .mini-stat {
  padding: 16px 14px;
}

.about-section-note {
  margin: 0 0 16px;
  max-width: 70ch;
  color: #5d6570;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* About page: route score matrix */
.score-table {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}

.score-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 20px;
  align-items: center;
}

.score-header {
  background: rgba(45, 118, 215, 0.08);
  color: var(--navy);
}

.score-header span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.score-row strong {
  color: #1b1f24;
  font-size: 0.98rem;
  letter-spacing: var(--track-heading);
}

.score-dots {
  display: inline-flex;
  gap: 4px;
}

.score-dots::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow:
    13px 0 0 var(--orange),
    26px 0 0 var(--orange),
    39px 0 0 rgba(31, 36, 41, 0.16),
    52px 0 0 rgba(31, 36, 41, 0.16);
}

.score-dots[data-score="2"]::before {
  box-shadow:
    13px 0 0 var(--orange),
    26px 0 0 rgba(31, 36, 41, 0.16),
    39px 0 0 rgba(31, 36, 41, 0.16),
    52px 0 0 rgba(31, 36, 41, 0.16);
}

.score-dots[data-score="3"]::before {
  box-shadow:
    13px 0 0 var(--orange),
    26px 0 0 var(--orange),
    39px 0 0 rgba(31, 36, 41, 0.16),
    52px 0 0 rgba(31, 36, 41, 0.16);
}

.score-dots[data-score="4"]::before {
  box-shadow:
    13px 0 0 var(--orange),
    26px 0 0 var(--orange),
    39px 0 0 var(--orange),
    52px 0 0 rgba(31, 36, 41, 0.16);
}

.score-dots[data-score="5"]::before {
  box-shadow:
    13px 0 0 var(--orange),
    26px 0 0 var(--orange),
    39px 0 0 var(--orange),
    52px 0 0 var(--orange);
}

/* About page: personal timeline */
.about-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.about-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 22px;
}

.about-timeline-item + .about-timeline-item {
  border-left: 1px solid rgba(35, 38, 42, 0.12);
}

.about-timeline-item + .about-timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(216, 107, 57, 0.16);
}

.about-timeline-year {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.about-timeline-item p {
  margin: 0;
  color: #4f5961;
  font-size: 0.96rem;
  line-height: 1.55;
}

/* About page: scope */
.about-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px 20px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.about-scope-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-scope-no li {
  position: relative;
  padding-left: 26px;
  color: #6b747d;
  font-size: 0.98rem;
  line-height: 1.5;
}

.about-scope-no li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: -1px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 36, 41, 0.08);
  color: #8a929a;
  font-size: 0.8rem;
  font-weight: 800;
}

.about-scope-yes {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  border-left: 3px solid var(--orange);
  background: rgba(216, 107, 57, 0.07);
  color: #1b1f24;
  font-size: 1rem;
  line-height: 1.6;
}

.about-scope-yes strong {
  color: var(--orange-deep);
}

/* About page: map card */
.about-map-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.about-map-card:hover {
  border-color: rgba(45, 118, 215, 0.3);
  box-shadow: 0 14px 30px rgba(16, 43, 82, 0.08);
}

.about-map-thumb {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  background: #eef2f6;
}

.about-map-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  object-position: center;
}

/* Soft edge so the map blends into the card instead of ending abruptly. */
.about-map-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 78%, rgba(255, 255, 255, 0.55) 100%);
}

.about-map-pin {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(216, 107, 57, 0.2), 0 2px 6px rgba(16, 43, 82, 0.25);
}

/* Pin positions match the four route areas on the stitched OSM image. */
.about-map-pin-1 {
  left: 47%;
  top: 30%;
}

.about-map-pin-2 {
  left: 44%;
  top: 62%;
}

.about-map-pin-3 {
  left: 50%;
  top: 55%;
}

.about-map-pin-4 {
  left: 88%;
  top: 74%;
}

.about-map-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-after-heading);
  padding: 24px 22px;
}

.about-map-copy h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.1rem, 1.4vw, 1.32rem);
  letter-spacing: var(--track-display);
  line-height: 1.25;
}

.about-map-copy p {
  margin: 0;
  color: #4f5961;
  font-size: 1rem;
  line-height: 1.6;
}

.about-map-link {
  color: var(--navy-soft);
  font-size: 0.94rem;
  font-weight: 800;
}

.about-map-card:hover .about-map-link {
  color: var(--orange-deep);
}

/* About page: contribute */
.about-contribute {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.about-contribute-lead {
  margin: 0;
  max-width: 70ch;
  color: #1b1f24;
  font-size: 1.05rem;
  line-height: 1.65;
}

.about-contribute-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #4f5961;
  font-size: 0.99rem;
  line-height: 1.55;
}

.about-contribute-list strong {
  color: #1b1f24;
}

.about-contribute-note {
  margin: 0;
  padding-top: 12px;
  color: #6b747d;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* About page: two-column grid */
.about-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-box code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(16, 43, 82, 0.07);
  color: var(--navy);
  font-size: 0.92em;
}

/* About page: criteria table */
.criteria-table {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}

.criteria-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 15px 20px;
  align-items: baseline;
}

.criteria-header {
  background: rgba(45, 118, 215, 0.08);
  color: var(--navy);
}

.criteria-header span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.criteria-row strong {
  color: #1b1f24;
  font-size: 1rem;
  letter-spacing: var(--track-heading);
}

.criteria-row span {
  color: #4f5961;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* About page: personal story */
.about-story {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-left: 3px solid var(--orange);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.about-story-lead {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  font-weight: 700;
  letter-spacing: var(--track-display);
  line-height: 1.3;
}

.about-story p {
  margin: 0;
  max-width: none;
  color: #4f5961;
  font-size: 1.03rem;
  line-height: 1.7;
}

.about-story-note {
  padding-top: 12px;
  color: #6b747d !important;
  font-size: 0.92rem !important;
  font-style: italic;
}

/* About page: feedback */
.about-feedback {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 22px;
  border: 1px solid rgba(45, 118, 215, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(222, 236, 255, 0.3));
}

.about-feedback-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.about-feedback-head h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  letter-spacing: var(--track-display);
  line-height: 1.2;
}

.about-feedback-head p {
  margin: 0;
  max-width: 68ch;
  color: #4f5961;
  font-size: 1.02rem;
  line-height: 1.65;
}

.feedback-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feedback-field:nth-of-type(3),
.feedback-field:nth-of-type(4),
.feedback-actions,
.feedback-status {
  grid-column: 1 / -1;
}

.feedback-field label {
  color: #1b1f24;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: var(--track-body);
}

.feedback-optional {
  color: #8a929a;
  font-weight: 600;
}

.feedback-field select,
.feedback-field input,
.feedback-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  color: #1b1f24;
  background: rgba(255, 255, 255, 0.85);
}

.feedback-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.feedback-field select:focus,
.feedback-field input:focus,
.feedback-field textarea:focus {
  outline: 2px solid rgba(45, 118, 215, 0.35);
  outline-offset: 1px;
  border-color: rgba(45, 118, 215, 0.4);
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.feedback-submit {
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}

.feedback-submit:hover {
  background: var(--navy-soft);
}

/* Secondary action: the address as copyable text, for phones with no mail app. */
.feedback-copy {
  border: 1px solid rgba(35, 38, 42, 0.18);
  border-radius: 999px;
  padding: 11px 22px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.feedback-copy:hover {
  background: rgba(45, 118, 215, 0.1);
  border-color: rgba(45, 118, 215, 0.3);
}

.feedback-copy:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.feedback-hint {
  margin: 0;
  flex: 1;
  min-width: 220px;
  color: #6b747d;
  font-size: 0.88rem;
  line-height: 1.5;
}

.feedback-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(45, 118, 215, 0.2);
  background: rgba(45, 118, 215, 0.07);
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 600;
}

.feedback-status[hidden] {
  display: none;
}

.feedback-status.is-error {
  border-color: rgba(191, 79, 42, 0.28);
  background: rgba(214, 109, 58, 0.08);
  color: var(--orange-deep);
}

#route-map {
  width: 100%;
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(35, 38, 42, 0.12);
  box-shadow: 0 16px 34px rgba(16, 43, 82, 0.08);
}

.leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border-radius: 20px;
  background: #edf5fb;
}

.map-layout,
.planner-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 24px;
  align-items: start;
}

/* The map page needs a wider sidebar than the planner: the route detail card
   carries a lot of short label/value pairs that wrap badly in a 0.6fr column. */
.map-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

/* Map page: sticky map stage */
.map-stage {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Leaflet's internal panes use z-index up to 700. Without a stacking context
     here those panes escape the map box and paint over the filter chips and
     ranking list below. z-index: 0 creates the context and traps them inside. */
  z-index: 0;
  isolation: isolate;
}

/* Map page: 2x2 mini map grid */
.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-map-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.mini-map-card .mini-map-info {
  flex: 1;
}

.mini-map-card:hover {
  border-color: rgba(45, 118, 215, 0.32);
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.08);
  transform: translateY(-2px);
}

.mini-map-card.is-selected {
  border-color: rgba(45, 118, 215, 0.55);
  box-shadow: 0 0 0 2px rgba(45, 118, 215, 0.18), 0 10px 28px rgba(16, 24, 32, 0.1);
}

/* A left accent bar makes the active card readable at a glance, even when
   the map tiles behind it are busy. */
.mini-map-card.is-selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--navy);
  z-index: 2;
}

.mini-map-card {
  position: relative;
}

.mini-map-card.is-selected .mini-map-head h3::after {
  content: 'Selected';
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.12);
  color: var(--navy);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  vertical-align: middle;
}

.mini-map-card.is-filtered-out {
  opacity: 0.35;
}

.mini-map,
.mini-map.leaflet-container {
  height: 250px;
  min-height: 250px;
  background: #e8eef4;
  /* Leaflet's map pane is absolutely positioned AND transformed, which makes it
     a containing block that ignores the parent's overflow: hidden. Tiles then
     paint outside the 250px box and cover the chips and ranking list below.
     contain: paint forces the clip regardless of the transformed descendant. */
  contain: paint;
  overflow: hidden;
}

.mini-map .leaflet-container {
  background: #e8eef4;
}

.map-attribution {
  margin: 10px 2px 0;
  color: #7a8492;
  font-size: 0.72rem;
  line-height: 1.5;
}

.map-attribution a {
  color: #2d76d7;
  text-decoration: none;
}

.map-attribution a:hover {
  text-decoration: underline;
}

/* Offline / blocked tiles: keep the route legible on a plain canvas. */
.mini-map.is-offline,
.mini-map.is-offline.leaflet-container {
  background:
    repeating-linear-gradient(45deg, rgba(45, 118, 215, 0.05) 0 8px, transparent 8px 16px),
    #eef3f8;
}

.mini-map.is-offline::after {
  content: 'Map tiles unavailable — route outline shown';
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #5a6472;
  font-size: 0.68rem;
  letter-spacing: var(--track-body);
  pointer-events: none;
}

.mini-map-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 14px 16px 16px;
}

.mini-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mini-map-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: var(--track-heading);
}

.mini-map-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.1);
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mini-map-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.mini-map-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.mini-map-stats small {
  display: block;
  color: #8a929a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.mini-map-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.mini-crowd[data-level="1"] { color: #3e9d74; }
.mini-crowd[data-level="2"] { color: #3e9d74; }
.mini-crowd[data-level="3"] { color: #b8860b; }
.mini-crowd[data-level="4"] { color: var(--orange); }
.mini-crowd[data-level="5"] { color: var(--orange-deep); }

/* ---------- Scenery along the route ---------- */
.mini-map-scenery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  margin-top: auto;
}

.mini-map-scenery:empty {
  display: none;
}

.scenery-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border: 1px solid rgba(216, 107, 57, 0.28);
  border-radius: 999px;
  background: rgba(216, 107, 57, 0.06);
  color: #a04f28;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.scenery-chip:hover {
  background: rgba(216, 107, 57, 0.14);
  border-color: rgba(216, 107, 57, 0.5);
}

.scenery-chip.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.scenery-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Time-of-day hint on the chip: kept small and low-contrast so the landmark
   name still reads first. */
.scenery-chip-when {
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid currentColor;
  opacity: 0.62;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: var(--track-body);
  white-space: nowrap;
}

.scenery-chip.is-active .scenery-chip-when {
  opacity: 0.85;
}

.scenery-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}

.scenery-popup-wrap .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}

.scenery-popup {
  display: flex;
  gap: 10px;
  padding: 12px;
}

.scenery-art {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(216, 107, 57, 0.1);
  color: var(--orange-deep);
}

.scenery-art svg {
  width: 34px;
  height: 34px;
}

.scenery-body {
  min-width: 0;
}

.scenery-kind {
  display: block;
  color: #a04f28;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.scenery-body strong {
  display: block;
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.scenery-when {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(216, 107, 57, 0.12);
  color: #a04f28;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: var(--track-body);
}

.scenery-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* Button inside the Leaflet popup that opens the full photo card. */
.scenery-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(216, 107, 57, 0.4);
  border-radius: 999px;
  background: rgba(216, 107, 57, 0.08);
  color: #a04f28;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: var(--track-body);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.scenery-more:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ---------- Landmark photo drawer ----------
   Slides in from the right when a landmark marker or chip is clicked.
   Kept as one shared element so only a single card is ever open. */
.landmark-scrim {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(24, 26, 29, 0.34);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.landmark-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

.landmark-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1201;
  display: flex;
  flex-direction: column;
  width: min(400px, 92vw);
  height: 100%;
  overflow-y: auto;
  background: #fff;
  box-shadow: -18px 0 48px rgba(24, 26, 29, 0.22);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 0.68, 0.32, 1), visibility 0.32s;
}

.landmark-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.landmark-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(24, 26, 29, 0.2);
  transition: background 0.18s ease, transform 0.18s ease;
}

.landmark-close:hover {
  background: #fff;
  transform: scale(1.06);
}

.landmark-photo {
  position: relative;
  flex-shrink: 0;
  height: 210px;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #e8e2da;
}

.landmark-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 26, 29, 0.42), transparent 58%);
}

.landmark-photo-tag {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #a04f28;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.landmark-content {
  padding: 20px 22px 28px;
}

.landmark-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(216, 107, 57, 0.12);
  color: #a04f28;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: var(--track-body);
}

.landmark-content h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.2;
}

.landmark-lede {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.6;
}

.landmark-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.landmark-fact {
  padding: 9px 11px;
  border: 1px solid rgba(35, 38, 42, 0.1);
  border-radius: 10px;
  background: rgba(35, 38, 42, 0.025);
}

.landmark-fact small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.landmark-fact strong {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
}

.landmark-detail {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.landmark-tip {
  padding: 12px 14px;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: rgba(216, 107, 57, 0.07);
}

.landmark-tip span {
  display: block;
  margin-bottom: 4px;
  color: #a04f28;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.landmark-tip p {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .landmark-drawer {
    width: 100%;
  }

  .landmark-photo {
    height: 180px;
  }

  .landmark-content {
    padding: 18px 18px 24px;
  }
}

.map-overlay-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.heat-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.heat-control label {
  color: #5d6570;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.heat-control input[type="range"] {
  flex: 1;
  min-width: 100px;
  accent-color: var(--orange);
  cursor: pointer;
}

.heat-control output {
  min-width: 52px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.heat-summary {
  margin: 0;
  flex: 1 1 100%;
  color: #4f5961;
  font-size: 0.9rem;
  line-height: 1.5;
}

.map-weather {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(45, 118, 215, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(222, 236, 255, 0.35));
  color: #4f5961;
  font-size: 0.9rem;
  line-height: 1.5;
}

.weather-loading {
  color: #8a929a;
  font-style: italic;
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(35, 38, 42, 0.08);
  color: #1b1f24;
  font-size: 0.82rem;
  font-weight: 700;
}

.weather-chip.is-warn {
  background: rgba(214, 109, 58, 0.12);
  border-color: rgba(214, 109, 58, 0.24);
  color: var(--orange-deep);
}

.weather-advice {
  flex: 1 1 100%;
  margin: 0;
  color: #4f5961;
  font-size: 0.88rem;
}

/* Map page: collapsible sidebar groups */
.side-group {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  /* No overflow clipping: the group must grow with its content, otherwise
     tall panels (route detail card) get cut off mid-way. */
  overflow: visible;
}

.side-group + .side-group {
  margin-top: 14px;
}

.side-group > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.side-group > summary::-webkit-details-marker {
  display: none;
}

.side-group > summary:hover {
  background: rgba(45, 118, 215, 0.05);
}

.side-group-title {
  color: #1b1f24;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: var(--track-heading);
}

.side-group-hint {
  color: #8a929a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.side-group > summary::after {
  content: "+";
  margin-left: 4px;
  color: var(--navy-soft);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.side-group[open] > summary::after {
  content: "−";
}

.side-group-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 18px 18px;
}

.overlay-toggle-row {
  display: flex;
  align-items: center;
}

.overlay-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4f5961;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.overlay-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* Map page: route profile */
.route-profile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.route-profile svg {
  width: 100%;
  height: 64px;
  display: block;
}

.route-profile-caption {
  color: #8a929a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* Map page: route actions */
.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.route-action-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}

.route-action-btn:hover {
  background: var(--navy-soft);
}

.route-action-btn.ghost {
  background: transparent;
  border: 1px solid rgba(16, 43, 82, 0.24);
  color: var(--navy);
}

.route-action-btn.ghost:hover {
  background: rgba(16, 43, 82, 0.06);
}

/* Map page: share card modal */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.share-modal[hidden] {
  display: none;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.55);
  backdrop-filter: blur(3px);
}

.share-modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(16, 24, 32, 0.28);
}

.share-modal-card h2 {
  margin: 0 0 var(--space-after-heading);
  font-size: 1.2rem;
  letter-spacing: var(--track-heading);
}

.share-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 36, 41, 0.06);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.share-modal-close:hover {
  background: rgba(31, 36, 41, 0.12);
}

.share-card {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(160deg, #fdfbf8, #eef4fb);
  border: 1px solid rgba(31, 36, 41, 0.1);
}

.share-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.share-card-brand {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.share-card-hour {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.share-card h3 {
  margin: 0 0 var(--space-after-heading);
  font-size: 1.35rem;
  letter-spacing: var(--track-heading);
}

.share-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.share-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
}

.share-card-stats small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.share-card-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.92rem;
}

.share-card-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.share-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.share-modal-actions .route-action-btn {
  flex: 1;
}

.share-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.82rem;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.map-filter-btn {
  border: 1px solid rgba(35, 38, 42, 0.12);
  background: rgba(255, 255, 255, 0.3);
  color: #1b1f24;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.86rem;
  letter-spacing: var(--track-label);
  font-weight: 700;
  cursor: pointer;
}

.map-filter-btn.active {
  background: rgba(45, 118, 215, 0.12);
  border-color: rgba(45, 118, 215, 0.22);
  color: #1d4e96;
}

.recommendation-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 24px;
  padding: 22px 20px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.52), rgba(222,236,255,0.28));
  box-shadow: 0 12px 22px rgba(16, 43, 82, 0.05);
  /* The map stage below is position: sticky, so it slides up over this panel
     while scrolling and hides the filter chips. Lift the panel above it. */
  position: relative;
  z-index: 2;
}

/* Collapsed by default so the route maps stay above the fold. */
.recommendation-panel:not([open]) {
  gap: 0;
  padding: 14px 18px;
}

/* display: flex on the panel overrides the browser's default rule that hides
   the contents of a closed <details>. Without this the chips, ranking board and
   insight blocks stay laid out below the summary, spill outside the panel box,
   and get covered by the sticky map stage underneath. */
.recommendation-panel:not([open]) > *:not(summary) {
  display: none;
}

.recommendation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  /* Let the whole row react to hover / press, not just the hint pill. */
  margin: -14px -18px;
  padding: 14px 18px;
  border-radius: 16px;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.recommendation-summary:hover {
  background: rgba(45, 118, 215, 0.09);
}

.recommendation-summary:active {
  background: rgba(45, 118, 215, 0.16);
  box-shadow: inset 0 1px 3px rgba(16, 43, 82, 0.12);
}

.recommendation-summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.recommendation-summary::-webkit-details-marker {
  display: none;
}

.recommendation-summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recommendation-summary-text strong {
  color: #1b1f24;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: var(--track-heading);
}

.recommendation-summary-hint {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.1);
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 800;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.recommendation-summary:hover .recommendation-summary-hint {
  background: var(--blue);
  color: #ffffff;
}

.recommendation-summary:active .recommendation-summary-hint {
  background: var(--navy);
  color: #ffffff;
  transform: scale(0.96);
}

.recommendation-panel[open] .recommendation-summary {
  padding-bottom: 4px;
}

.recommendation-panel[open] .recommendation-summary-hint {
  display: none;
}

.recommendation-panel[open] .recommendation-header {
  display: none;
}

.recommendation-header h2 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.4rem, 1.7vw, 1.8rem);
  letter-spacing: var(--track-display);
}

.recommendation-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- Run match: chip picker ---------- */
.match-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-chip-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.match-chip-label {
  color: #5d6570;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.match-chip-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-chip {
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #3f4952;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.match-chip:hover {
  border-color: rgba(214, 109, 58, 0.4);
  color: #b85d39;
}

.match-chip.is-active {
  background: linear-gradient(135deg, var(--orange), #e38c58);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(214, 109, 58, 0.24);
}

.match-chip:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Native selects stay in the DOM for the scoring code but are never shown. */
.match-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Run match: ranked shortlist ---------- */
.match-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 43, 82, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.match-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.match-board-head strong {
  color: #1b1f24;
  font-size: 1rem;
  letter-spacing: var(--track-heading);
}

.match-board-head span {
  color: #5d6570;
  font-size: 0.78rem;
  font-weight: 700;
}

.match-ranking {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.match-rank-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(35, 38, 42, 0.08);
  background: rgba(16, 43, 82, 0.03);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.match-rank-item:hover {
  border-color: rgba(214, 109, 58, 0.35);
  background: rgba(214, 109, 58, 0.05);
}

.match-rank-item.is-top {
  border-color: rgba(214, 109, 58, 0.4);
  background: rgba(214, 109, 58, 0.07);
}

.match-rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 43, 82, 0.08);
  color: #4f5961;
  font-size: 0.72rem;
  font-weight: 800;
}

.match-rank-item.is-top .match-rank-index {
  background: rgba(214, 109, 58, 0.16);
  color: #b85d39;
}

.match-rank-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.match-rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.match-rank-head strong {
  color: #1b1f24;
  font-size: 0.94rem;
}

.match-rank-score {
  color: #b85d39;
  font-size: 0.82rem;
  font-weight: 800;
}

.match-rank-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 43, 82, 0.08);
  overflow: hidden;
}

.match-rank-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), #e38c58);
  transition: width 0.28s ease;
}

.match-rank-body small {
  color: #5d6570;
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .match-chip-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.recommendation-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4f5961;
  font-weight: 700;
}

.recommendation-form select {
  width: 100%;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: #1b1f24;
  background: rgba(255,255,255,0.8);
}

.dashboard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(45, 118, 215, 0.12);
  background: linear-gradient(135deg, rgba(45, 118, 215, 0.06), rgba(214, 109, 58, 0.05));
}

.dashboard-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.1);
  color: #1d4e96;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.dashboard-main strong {
  color: #1b1f24;
  font-size: 1.05rem;
}

.dashboard-main span {
  color: #4f5961;
  font-size: 0.82rem;
}

.map-recommend-btn {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--orange), #e38c58);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(214, 109, 58, 0.22);
}

.recommend-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(45, 118, 215, 0.12);
  background: rgba(45, 118, 215, 0.05);
}

.route-insight {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 43, 82, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.insight-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #4f5961;
  font-weight: 700;
}

.insight-header strong {
  color: #1b1f24;
  font-size: 1.15rem;
  letter-spacing: var(--track-display);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.insight-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.03);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.insight-grid label {
  color: #4f5961;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}

.insight-grid strong {
  color: #1b1f24;
  font-size: 0.96rem;
}

.result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #4f5961;
  font-weight: 700;
}

.result-header strong {
  color: #1b1f24;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: var(--track-display);
}

.recommend-result p {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-tags li {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(45, 118, 215, 0.1);
  color: #1d4e96;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: capitalize;
}

.map-panel,
.side-panel,
.plan-board,
.achievement-card,
.badge-card,
.filter-card {
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.map-panel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(180deg, #edf5fb 0%, #dfeff7 100%);
}

.route-popup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}

.route-popup strong {
  font-size: 1rem;
  color: #1b1f24;
}

.route-popup p,
.route-popup small {
  margin: 0;
  color: #4f5961;
  line-height: 1.5;
}

.route-detail-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(45, 118, 215, 0.05);
  border: 1px solid rgba(45, 118, 215, 0.1);
}

.route-detail-card h3 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  letter-spacing: var(--track-display);
}

.detail-metrics,
.detail-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-metrics span,
.detail-status-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #4f5961;
  font-size: 0.78rem;
  font-weight: 700;
}

.route-detail-card p {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.route-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.route-analysis-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.analysis-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.analysis-row--wide {
  grid-column: 1 / -1;
}

.analysis-row span {
  color: #7b7f86;
  font-size: 0.64rem;
  line-height: 1.3;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.analysis-row strong {
  color: #1b1f24;
  font-size: 0.8rem;
  line-height: 1.35;
}

.breakdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1px 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.breakdown-item strong {
  color: #1b1f24;
}

.breakdown-item span {
  color: #4f5961;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.breakdown-item small {
  grid-column: 1 / -1;
  color: #4f5961;
  font-size: 0.76rem;
  line-height: 1.45;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.risk-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(35, 38, 42, 0.08);
  background: rgba(255,255,255,0.46);
}

.risk-grid small {
  color: #7b7f86;
  font-size: 0.66rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.risk-grid strong {
  color: #1b1f24;
  font-size: 0.8rem;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-label {
  display: block;
}

.upload-label input {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed rgba(35, 38, 42, 0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.56);
  color: #1b1f24;
}

.upload-hint {
  color: #4f5961;
  line-height: 1.5;
}

.detail-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags li {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(214,109,58,0.08);
  color: #b85d39;
  font-size: 0.76rem;
  font-weight: 700;
}

.comparison-panel,
.training-panel,
.suggestion-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.training-suggestion-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 43, 82, 0.04), rgba(45, 118, 215, 0.06));
  border: 1px solid rgba(16, 43, 82, 0.09);
}

.suggestion-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(216, 107, 57, 0.12);
  color: #b45e2e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: var(--track-body);
  text-transform: uppercase;
}

.suggestion-header strong {
  color: #1b1f24;
  font-size: 1.1rem;
  line-height: 1.4;
}

.suggestion-summary {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.suggestion-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.suggestion-grid small {
  color: #7b7f86;
  font-size: 0.62rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.suggestion-grid strong {
  color: #1b1f24;
  font-size: 0.8rem;
  line-height: 1.5;
}

.segment-card,
.suitability-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.segment-row,
.suitability-card > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.segment-row strong,
.suitability-card strong {
  color: #1b1f24;
  font-size: 0.8rem;
}

.segment-row span,
.suitability-card span {
  color: #4f5961;
  line-height: 1.5;
  font-size: 0.78rem;
}

.training-plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 43, 82, 0.04), rgba(45, 118, 215, 0.08));
  border: 1px solid rgba(16, 43, 82, 0.09);
}

.plan-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(45, 118, 215, 0.12);
  color: #1d4e96;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.plan-header strong {
  color: #1b1f24;
  font-size: 1.1rem;
}

.plan-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plan-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(35, 38, 42, 0.08);
  background: rgba(255,255,255,0.52);
}

.plan-meta small {
  color: #7b7f86;
  font-size: 0.6rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.plan-meta strong {
  color: #1b1f24;
  font-size: 0.76rem;
}

.plan-summary,
.plan-goal {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.plan-focus {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.plan-focus strong {
  color: #1b1f24;
  font-size: 0.76rem;
  letter-spacing: var(--track-body);
  text-transform: uppercase;
}

.plan-focus span {
  color: #4f5961;
  line-height: 1.5;
  font-size: 0.8rem;
}

.plan-segments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-segment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.plan-segment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-segment-header strong {
  color: #1b1f24;
  font-size: 0.85rem;
}

.plan-segment-header span {
  color: #4f5961;
  font-size: 0.76rem;
  font-weight: 700;
}

.plan-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plan-mini-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(16, 43, 82, 0.03);
}

.plan-mini-grid small {
  color: #7b7f86;
  font-size: 0.6rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.plan-mini-grid strong {
  color: #1b1f24;
  font-size: 0.76rem;
  line-height: 1.4;
}

.plan-segment p {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
  font-size: 0.75rem;
}

.weekly-plan-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.weekly-mini-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 8px;
  border-radius: 10px;
  background: rgba(16, 43, 82, 0.03);
  border: 1px solid rgba(35, 38, 42, 0.08);
  /* Keep every label inside its own day box instead of spilling out. */
  min-width: 0;
  overflow: hidden;
}

.weekly-mini-item strong,
.weekly-mini-item span,
.weekly-mini-item small {
  color: #1b1f24;
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.weekly-mini-item strong {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: var(--track-body);
  text-transform: none;
}

.weekly-mini-item span {
  font-size: 0.72rem;
  font-weight: 600;
}

.weekly-mini-item small {
  color: #4f5961;
  font-size: 0.68rem;
  font-weight: 600;
}

.suggestion-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.suggestion-note strong {
  color: #1b1f24;
  font-size: 0.8rem;
}

.suggestion-note span {
  color: #4f5961;
  line-height: 1.6;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 6px;
  text-align: left;
  color: #4f5961;
}

.comparison-table th {
  font-size: 0.7rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #7b7f86;
}

.comparison-table tr.is-selected {
  background: rgba(45, 118, 215, 0.06);
}

.comparison-table td:first-child {
  font-weight: 700;
  color: #1b1f24;
}

/* ---------- Map page: full-width band below the map ---------- */
/* Panels stack vertically and each one spans the full row, so a tall panel
   (Training) never leaves a dead column next to a short one (Compare). */
.map-wide-band {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.map-wide-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px 22px 22px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.map-wide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-after-heading);
  flex-wrap: wrap;
}

.map-wide-head h2 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  letter-spacing: var(--track-display);
}

.map-wide-hint {
  color: #8a929a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.comparison-scroll {
  min-width: 0;
  overflow-x: auto;
}

.comparison-scroll .comparison-table {
  min-width: 520px;
}

.comparison-scroll .comparison-table th,
.comparison-scroll .comparison-table td {
  padding: 10px 10px;
  white-space: nowrap;
}

.comparison-scroll .comparison-table td:first-child {
  white-space: normal;
}

.training-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.training-columns-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

@media (max-width: 1100px) {
  .training-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .training-columns {
    grid-template-columns: 1fr;
  }
}

.weekly-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.03);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.weekly-day strong {
  color: #1b1f24;
  font-size: 0.9rem;
}

.weekly-day span,
.weekly-day small {
  color: #4f5961;
}

.history-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.03);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.history-stat small {
  color: #7b7f86;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  font-size: 0.6rem;
}

.history-stat strong {
  color: #1b1f24;
  font-size: 0.9rem;
}

.trend-card,
.smart-summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.trend-header,
.smart-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trend-header strong,
.smart-summary-header strong {
  color: #1b1f24;
  font-size: 0.82rem;
}

.trend-header span,
.smart-summary-header span {
  color: #4f5961;
  font-size: 0.68rem;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 88px;
  padding-top: 8px;
}

.trend-bar-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.trend-bar {
  width: 100%;
  min-height: 18px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #75b4ff, #2d76d7);
  box-shadow: 0 8px 18px rgba(45, 118, 215, 0.18);
}

.trend-bar-wrap small {
  color: #4f5961;
  font-size: 0.62rem;
}

.smart-ops {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.smart-item strong {
  color: #1b1f24;
  font-size: 0.8rem;
}

.smart-item span {
  color: #4f5961;
  line-height: 1.5;
  font-size: 0.75rem;
}

.smart-item.is-good {
  background: rgba(62, 157, 116, 0.08);
  border-color: rgba(62, 157, 116, 0.12);
}

.smart-item.is-warn {
  background: rgba(214, 109, 58, 0.06);
  border-color: rgba(214, 109, 58, 0.12);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.history-item strong {
  color: #1b1f24;
  font-size: 0.82rem;
}

.history-item span,
.history-item small {
  color: #4f5961;
  font-size: 0.76rem;
}

.save-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4f5961;
  font-weight: 700;
}

.plan-form input,
.plan-form select,
.plan-form textarea {
  width: 100%;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: #1b1f24;
  background: rgba(255,255,255,0.74);
  font: inherit;
}

.save-plan-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--navy), #1d4e96);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.saved-plans {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-plan-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.03);
  border: 1px solid rgba(35, 38, 42, 0.1);
}

.saved-plan-item strong,
.saved-plan-item span,
.saved-plan-item small {
  color: #4f5961;
}

.empty-plan {
  color: #4f5961;
  font-style: italic;
}

.city-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29, 78, 144, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 144, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.map-route {
  position: absolute;
  border-radius: 999px;
  opacity: 0.96;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.35);
}

.route-haihe {
  left: 18%;
  top: 18%;
  width: 42%;
  height: 16px;
  background: linear-gradient(90deg, #2d76d7, #77b8ff);
  transform: rotate(16deg);
}

.route-park {
  left: 28%;
  top: 48%;
  width: 30%;
  height: 14px;
  background: linear-gradient(90deg, #3e9d74, #8bc9a4);
  transform: rotate(-10deg);
}

.route-water {
  left: 49%;
  top: 30%;
  width: 26%;
  height: 14px;
  background: linear-gradient(90deg, #e48848, #ffbd7d);
  transform: rotate(6deg);
}

.route-coast {
  left: 60%;
  top: 58%;
  width: 32%;
  height: 16px;
  background: linear-gradient(90deg, #8f5edc, #c9a7ff);
  transform: rotate(-18deg);
}

.map-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 88px;
  height: 38px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1d2128;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(16, 43, 82, 0.1);
  backdrop-filter: blur(3px);
  box-shadow: 0 8px 20px rgba(16, 43, 82, 0.1);
}

.m1 { left: 18%; top: 14%; }
.m2 { left: 29%; top: 44%; }
.m3 { left: 52%; top: 26%; }
.m4 { left: 66%; top: 56%; }

.map-sidebar,
.planner-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* The sidebar is taller than the sticky map stage. Let it scroll with the page
   instead of trapping it in a viewport-height box, so nothing is squeezed. */
.map-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: none;
  overflow: visible;
  padding-right: 4px;
}

.map-sidebar::-webkit-scrollbar {
  width: 6px;
}

.map-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(31, 36, 41, 0.18);
}

.map-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.side-panel {
  padding: 20px 18px;
}

.side-panel h2 {
  margin: 0 0 var(--space-after-heading);
  color: #1b1f24;
  font-size: clamp(1.25rem, 1.6vw, 1.75rem);
  letter-spacing: var(--track-display);
}

.map-legend,
.mini-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #4f5961;
}

.map-legend li,
.mini-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-blue { background: #2d76d7; }
.dot-green { background: #3e9d74; }
.dot-orange { background: #e48848; }
.dot-purple { background: #8f5edc; }

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.04);
}

.mini-item strong {
  color: #1b1f24;
  font-size: 0.96rem;
}

.mini-item span {
  color: #4f5961;
  font-size: 0.92rem;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-btn {
  border: 1px solid rgba(35, 38, 42, 0.12);
  background: rgba(255,255,255,0.3);
  color: #1b1f24;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: rgba(214,109,58,0.12);
  border-color: rgba(214,109,58,0.25);
  color: #b85d39;
}

.filter-grid,
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.filter-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 20px 18px;
}

.filter-card h2 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.25rem, 1.6vw, 1.65rem);
  letter-spacing: var(--track-display);
}

.filter-card p,
.filter-card li {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

.filter-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.3);
}

.plan-intro {
  margin: 0 0 20px;
  max-width: 72ch;
  color: #4f5961;
  font-size: 1.02rem;
  line-height: 1.65;
}

.plan-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.plan-day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(35, 38, 42, 0.1);
  background: rgba(16, 43, 82, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.plan-day:hover {
  border-color: rgba(45, 118, 215, 0.22);
  background: rgba(45, 118, 215, 0.04);
}

.plan-day-name {
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #5d6570;
  font-weight: 700;
}

.plan-day strong {
  color: #1b1f24;
  font-size: 1.15rem;
  letter-spacing: var(--track-heading);
  line-height: 1.25;
}

.plan-day p {
  margin: 0;
  color: #4f5961;
  font-size: 0.94rem;
  line-height: 1.5;
}

.plan-day-tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 43, 82, 0.06);
  color: #5d6570;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.plan-day.active {
  background: rgba(214, 109, 58, 0.08);
  border-color: rgba(214, 109, 58, 0.24);
}

.plan-day.active .plan-day-tag {
  background: rgba(214, 109, 58, 0.16);
  color: var(--orange-deep);
}

.plan-day.active strong {
  color: var(--orange-deep);
}

.achievement-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
}

.achievement-card span,
.achievement-card small {
  color: #5d6570;
}

.achievement-card strong {
  color: #1b1f24;
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  letter-spacing: var(--track-display);
}

.achievement-card.accent {
  background: linear-gradient(135deg, rgba(214,109,58,0.12), rgba(45,118,215,0.10));
}

.badge-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  padding: 20px 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.3);
}

.badge-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(45,118,215,0.14), rgba(214,109,58,0.18));
  color: var(--navy);
  font-weight: 800;
  font-size: 1.8rem;
}

.badge-card h2 {
  margin: 0;
  color: #1b1f24;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  letter-spacing: var(--track-display);
}

.badge-card p {
  margin: 0;
  color: #4f5961;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .goal-grid,
  .guide-grid,
  .season-grid,
  .about-grid,
  .tip-summary,
  .map-layout,
  .planner-layout,
  .filter-grid,
  .achievement-grid,
  .achievement-overview,
  .intensity-layout,
  .local-grid,
  .about-grid-two {
    grid-template-columns: 1fr;
  }

  .criteria-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .criteria-header {
    display: none;
  }

  .feedback-form {
    grid-template-columns: 1fr;
  }

  .run-flow {
    grid-template-columns: 1fr;
  }

  .run-flow-step:nth-child(n + 2) {
    border-left: none;
  }

  .run-flow-step:nth-child(n + 2)::before {
    top: -5px;
    left: 34px;
  }

  .gear-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .faq-two-col {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-header {
    display: none;
  }

  .planner-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .map-stage {
    position: static;
  }

  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-map {
    height: 210px;
  }

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

  .side-group + .side-group {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .route-comparison {
    overflow-x: auto;
  }

  .comparison-row {
    min-width: 420px;
  }

  .intensity-table .comparison-row {
    min-width: 520px;
  }

  .map-panel {
    min-height: 420px;
  }

  .planner-board {
    grid-template-columns: 1fr;
  }

  .plan-board {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 12px;
  }

  .planner-sidebar {
    grid-template-columns: 1fr;
  }

  .map-sidebar {
    grid-template-columns: 1fr;
  }

  .map-grid {
    grid-template-columns: 1fr;
  }

  .mini-map {
    height: 200px;
  }

  .heat-control {
    min-width: 100%;
  }

  .route-actions {
    flex-direction: column;
  }

  .route-action-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .route-comparison {
    overflow-x: auto;
  }

  .comparison-row {
    min-width: 420px;
  }
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #58626b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: var(--track-body);
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(214,109,58,0.1);
  color: #ba5537;
  border-radius: 999px;
  padding: 6px 10px;
}

.route-body h3,
.info-card h3 {
  margin: 0;
  color: #1a1d20;
  font-size: clamp(1.2rem, 1.6vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: var(--track-display);
}

.route-body p,
.info-card p,
.story-copy p,
.about-box p {
  margin: 0;
  color: #4f5961;
  font-size: 1.04rem;
  line-height: 1.6;
}

.route-body a {
  margin-top: 6px;
  color: #1a1d20;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.info-grid-two .info-card {
  padding: 24px 22px;
  gap: var(--space-after-heading);
}

.info-grid-two .info-card h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.24);
  padding: 20px 18px;
}

.story-section,
.editorial-story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
  padding-top: 16px;
}

.story-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.story-copy h2 {
  font-size: clamp(1.8rem, 2.7vw, 2.9rem);
}

.story-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.story-visual > picture {
  display: block;
  min-width: 0;
}

.story-photo {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  display: block;
  background: #dfe6ee;
}

.detail-page {
  padding-top: 20px;
}

.detail-card {
  display: grid;
  grid-template-columns: 1.17fr 0.83fr;
  gap: 26px;
  align-items: start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.detail-visual {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.17fr 0.83fr;
  gap: 26px;
  align-items: start;
  min-height: auto;
}

.detail-visual > .route-visual {
  align-self: start;
}

.route-visual {
  width: 100%;
  height: auto;
  min-height: auto;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  background: transparent;
  cursor: pointer;
}

.route-visual > picture {
  display: block;
}

.route-photo {
  width: 100%;
  height: 100%;
  max-height: 460px;
  display: block;
  object-fit: cover;
  border-radius: 20px;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.route-visual-card {
  margin-top: 12px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.route-visual-card h2 {
  margin: 0 0 var(--space-after-heading);
  color: #1b1f24;
  font-size: clamp(1.08rem, 1.35vw, 1.32rem);
  letter-spacing: var(--track-display);
}

.route-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-visual-grid div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.05);
}

.route-visual-grid span {
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: #5d6570;
  font-weight: 700;
}

.route-visual-grid strong {
  color: #1b1f24;
  font-size: 0.95rem;
  line-height: 1.4;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(214,109,58,0.12);
  color: #b85d39;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.74rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-weight: 700;
}

.detail-info-box {
  grid-column: 1 / -1;
  padding-top: 12px;
}

.detail-info-box h2 {
  margin: 0 0 var(--space-after-heading);
  color: #1d2128;
  font-size: clamp(1.08rem, 1.35vw, 1.35rem);
  letter-spacing: var(--track-display);
}

.detail-info-box ul {
  margin: 0;
  padding-left: 18px;
  color: #4f5961;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 26px;
  line-height: 1.5;
}

.detail-actions {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

/* Share button: quiet secondary action next to "Back to routes". */
.share-route-btn {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.share-route-btn:hover,
.share-route-btn:focus-visible {
  color: var(--orange-deep);
  border-bottom-color: var(--orange-deep);
}

.share-route-btn:disabled {
  cursor: default;
  color: var(--muted);
  border-bottom-color: transparent;
}

/* Related routes: keeps the reader moving instead of dead-ending. */
.detail-block--related {
  grid-column: 1 / -1;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.related-route-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-route-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-route-card:hover,
.related-route-card:focus-visible {
  border-color: rgba(16, 43, 82, 0.35);
  transform: translateY(-1px);
}

.related-route-card strong {
  font-size: 1rem;
  letter-spacing: var(--track-heading);
}

.related-route-card span {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: var(--track-label);
}

/* ---------- Route detail: extra depth blocks ---------- */
.detail-depth {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-top: 20px;
  padding-top: 18px;
}

.detail-block h2 {
  margin: 2px 0 var(--space-after-heading);
  color: #1d2128;
  font-size: clamp(1.08rem, 1.35vw, 1.32rem);
  letter-spacing: var(--track-display);
}

.detail-scenery-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.detail-scenery-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(16, 43, 82, 0.045);
  border: 1px solid rgba(35, 38, 42, 0.08);
}

.detail-scenery-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(214, 109, 58, 0.14);
  color: #b85d39;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: var(--track-body);
}

.detail-scenery-item strong {
  display: block;
  color: #1b1f24;
  font-size: 0.98rem;
  margin-bottom: 2px;
}

.detail-scenery-item p {
  margin: 0;
  color: #4f5961;
  font-size: 0.9rem;
  line-height: 1.5;
}

.detail-splits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.detail-split {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(35, 38, 42, 0.1);
}

.detail-split-range {
  font-size: 0.72rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-weight: 700;
  color: #b85d39;
}

.detail-split strong {
  color: #1b1f24;
  font-size: 1rem;
}

.detail-split p {
  margin: 0;
  color: #4f5961;
  font-size: 0.88rem;
  line-height: 1.5;
}

.detail-block--session {
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(16, 43, 82, 0.06);
  border-left: 3px solid var(--orange, #d86b39);
}

.detail-block--session h2 {
  margin-bottom: var(--space-after-heading);
}

.detail-block--session p {
  margin: 0;
  color: #3f4952;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .detail-depth {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .detail-scenery-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-splits {
    grid-template-columns: 1fr;
  }
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

.image-modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 26, 0.7);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(90vw, 1200px);
  max-height: 85vh;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
}

.modal-image {
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
}

.modal-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #1d2128;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.site-footer {
  padding: 22px 0 28px;
  text-align: center;
  color: #5a6168;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .hero,
  .route-grid,
  .info-grid,
  .story-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-timeline {
    grid-template-columns: 1fr;
  }

  .about-timeline-item + .about-timeline-item {
    border-left: none;
  }

  .about-timeline-item + .about-timeline-item::before {
    top: -5px;
    left: 22px;
  }

  .about-scope,
  .about-map-card {
    grid-template-columns: 1fr;
  }

  .about-map-thumb {
    min-height: 160px;
  }

  .score-row {
    grid-template-columns: minmax(120px, 1.4fr) repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
  }

  .score-header span {
    font-size: 0.62rem;
    letter-spacing: var(--track-body);
  }

  .score-row strong {
    font-size: 0.88rem;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 1.15rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .score-table {
    overflow-x: auto;
  }

  .score-row {
    min-width: 520px;
  }
}

.spec-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 8px;
}

.art-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.art-frame {
  position: relative;
  min-height: 300px;
  background: linear-gradient(135deg, #ef5a2d 0%, #c8452f 100%);
  border-radius: 18px;
  overflow: hidden;
  padding: 32px 26px 22px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.3);
}

.art-pattern {
  position: absolute;
  right: 7%;
  top: 8%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #f7d08e 0%, #efb75b 30%, #f19139 48%, rgba(216,92,34,0.86) 64%, rgba(213,77,40,0.84) 100%);
  opacity: 0.97;
}

.art-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
}

.art-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 260px;
}

.art-title {
  font-size: clamp(2.6rem, 4vw, 5rem);
  line-height: 0.82;
  font-weight: 800;
  letter-spacing: var(--track-display);
  color: #fff9f3;
}

.art-title.second-line {
  margin-top: 8px;
}

.art-subtitle {
  margin-top: 18px;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
}

.art-caption {
  color: #6a6f76;
  font-size: 0.95rem;
  font-style: italic;
}

.spec-table {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(44, 48, 55, 0.2);
  margin-top: 18px;
}

.spec-row {
  display: grid;
  grid-template-columns: 0.7fr 1.6fr;
  align-items: start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(44, 48, 55, 0.2);
  font-size: 1.05rem;
}

.spec-row span {
  font-weight: 700;
  color: #2a2f35;
}

.spec-row strong {
  font-weight: 500;
  color: #1d2024;
  line-height: 1.5;
}

.file-row strong {
  display: inline-block;
  background: rgba(35, 38, 43, 0.06);
  border-radius: 5px;
  padding: 4px 8px;
  font-family: var(--font-mono);
}

.rule-line {
  border-top: 1px solid rgba(26, 30, 34, 0.18);
  width: 100%;
}

.tool-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(26, 30, 34, 0.18);
}

.tool-row {
  display: grid;
  grid-template-columns: 0.9fr 1.7fr;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(26, 30, 34, 0.18);
  align-items: center;
  font-size: clamp(1.1rem, 1.3vw, 1.5rem);
}

.tool-row span {
  font-weight: 800;
  color: #1f2328;
}

.tool-row em {
  font-style: normal;
  color: #4c5258;
  font-weight: 500;
}

.lead-copy {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 3rem);
  line-height: 1.2;
  letter-spacing: var(--track-display);
  color: #1e2329;
}

.code-tag {
  display: inline-block;
  background: rgba(20, 24, 28, 0.08);
  padding: 0.08em 0.22em 0.12em;
  border-radius: 0.18em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.code-block {
  background: #1b2128;
  color: #f2f4f6;
  border-radius: 18px;
  padding: 20px 22px;
  font-size: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 0;
}

.dark-block {
  background: #1d2730;
}

.info-bullets,
.icon-rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: clamp(1.1rem, 1.8vw, 2.1rem);
  line-height: 1.5;
  letter-spacing: var(--track-display);
}

.info-bullets li,
.icon-rules li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #20252c;
}

.bullet {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d96b39;
  margin-top: 0.7em;
  flex-shrink: 0;
}

.bullet.orange {
  background: #d96b39;
}

.icon-showcase {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.45fr;
  gap: 34px;
  align-items: flex-end;
}

.icon-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.poster-card .poster-art {
  background: linear-gradient(135deg, #d75a2a 0%, #c9422e 100%);
  height: 260px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.poster-card .poster-art::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #f4d88f 0%, #efb861 42%, #e98e3a 62%, rgba(217,89,38,0.7) 100%);
  top: -40px;
  right: -30px;
  opacity: 0.9;
}

.poster-word {
  position: relative;
  z-index: 1;
  font-size: clamp(2.4rem, 3.5vw, 4.1rem);
  line-height: 0.9;
  letter-spacing: var(--track-display);
  color: #fffaf2;
  font-weight: 800;
}

.poster-sub {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.app-card .app-icon,
.favicon-card .favicon-icon {
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 6vw, 7rem);
  letter-spacing: var(--track-display);
  font-weight: 800;
  color: #fff8f2;
  background: linear-gradient(135deg, #d75a2a 0%, #c5452d 100%);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.app-card .app-icon {
  height: 180px;
  width: 180px;
}

.favicon-card .favicon-icon {
  height: 56px;
  width: 56px;
  font-size: 2.2rem;
  border-radius: 12px;
}

.icon-meta {
  color: #49525b;
  font-size: 1rem;
  line-height: 1.5;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 26px;
  margin-top: 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(81, 87, 93, 0.25);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 18px;
  align-items: start;
  color: #1f2328;
  font-size: clamp(1.5rem, 2.2vw, 3rem);
  line-height: 1.25;
  letter-spacing: var(--track-display);
}

.timeline-item strong {
  display: inline-block;
  margin-right: 10px;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: #1f2328;
}

.timeline-item span {
  font-weight: 400;
}

.dot {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(79, 87, 94, 0.6);
  background: #f1f0ee;
  margin-top: 0.25em;
}

.dot-orange {
  background: #d96b39;
  border-color: #d96b39;
}

.dot-green {
  background: #2ab4a7;
  border-color: #2ab4a7;
}

.timeline-item.active strong {
  color: #d96b39;
}

.timeline-item.last strong {
  color: #2ab4a7;
}

.two-column-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  border: 1px solid rgba(26, 30, 34, 0.15);
  border-radius: 16px;
  padding: 26px 24px;
  background: rgba(255,255,255,0.55);
}

.panel-title {
  font-size: clamp(2rem, 2.6vw, 3rem);
  margin-bottom: 18px;
  font-weight: 800;
  letter-spacing: var(--track-display);
}

.orange-text {
  color: #d96b39;
}

.text-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: clamp(1.2rem, 1.8vw, 2.2rem);
  line-height: 1.45;
  letter-spacing: var(--track-display);
}

.text-panel li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #1d2127;
}

.text-panel strong {
  font-weight: 800;
}

.site-footer {
  background: var(--navy);
  color: #dfeafc;
  text-align: center;
  padding: 18px 20px;
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .spec-grid,
  .two-column-list,
  .icon-showcase,
  .tool-row {
    grid-template-columns: 1fr;
  }

  .icon-showcase {
    gap: 18px;
  }

  .tool-row {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 10px 14px;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  .page-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .big-hed {
    font-size: 2.5rem;
  }

  .tool-row,
  .spec-row {
    grid-template-columns: 1fr;
  }

  .lead-copy,
  .info-bullets,
  .icon-rules,
  .text-panel ul {
    font-size: 1.2rem;
  }
}

/* ============================================================
   Toast notifications (replaces native alert dialogs)
   ============================================================ */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}

.toast {
  background: #1f2a37;
  color: #f7f9fc;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 100%;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--warn {
  background: #8a4b12;
}

/* ============================================================
   Pace input row (map sidebar)
   ============================================================ */
.pace-input-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 10px;
  margin: 10px 0 4px;
  font-size: 0.9rem;
}

.pace-input-row > span {
  font-weight: 600;
  color: #334155;
}

.pace-input-row input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #0f172a;
}

.pace-input-row input:focus-visible {
  outline: 2px solid #2d76d7;
  outline-offset: 1px;
}

.pace-input-row small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.78rem;
}

/* ============================================================
   Crowd estimate disclaimer
   ============================================================ */
.heat-disclaimer {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

/* ============================================================
   Respect the user's reduced-motion preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .toast {
    transform: none;
  }
}

/* ---------- Skip link: keyboard users jump straight to the content ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- Mobile hero: keep the first screen useful ---------- */
@media (max-width: 900px) {
  .editorial-hero {
    min-height: 0;
    padding: 22px 20px 20px;
    transform: none;
  }

  .editorial-hero h1 {
    font-size: clamp(2.8rem, 12vw, 4rem);
    line-height: 0.92;
    letter-spacing: var(--track-display);
  }

  .editorial-hero .hero-text {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    line-height: 1.45;
    letter-spacing: var(--track-heading);
  }

  .editorial-hero .hero-actions {
    gap: 16px;
    margin-top: 14px;
  }

  .editorial-hero .primary-btn,
  .editorial-hero .secondary-btn {
    font-size: 1.05rem;
  }

  .editorial-hero .hero-stats {
    margin-top: 18px;
    gap: 10px;
  }

  .editorial-hero .stat-pill {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .editorial-hero .stat-pill strong,
  .editorial-hero .stat-pill span {
    font-size: 1rem;
  }

  .editorial-hero .stat-pill strong {
    margin-right: 8px;
  }
}

@media (max-width: 560px) {
  .editorial-hero .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .editorial-hero .stat-pill {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
}

/* ==========================================================================
   Account page
   Sign in / sign up, runner profile, and the synced training log.
   ========================================================================== */

.account-shell {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.account-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-after-heading);
}

.account-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: var(--track-display);
  line-height: 1.15;
  color: var(--ink);
}

.account-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* --- unconfigured notice --- */
.account-notice {
  border: 1px solid rgba(191, 79, 42, 0.28);
  border-radius: 16px;
  padding: 22px 24px;
  background: rgba(214, 109, 58, 0.06);
}

.account-notice h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--orange-deep);
}

.account-notice p {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.6;
}

.account-notice ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.7;
}

.account-notice code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(31, 36, 41, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.account-notice-foot {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- tabs --- */
.account-auth,
.account-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(16, 43, 82, 0.06);
}

.account-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(16, 43, 82, 0.06);
}

.account-tab {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.account-tab.is-active {
  background: var(--paper);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(16, 43, 82, 0.12);
}

/* --- forms --- */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-form h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: var(--track-heading);
  color: var(--ink);
}

.account-label {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.account-input {
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 11px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.account-input:focus {
  outline: 2px solid rgba(45, 118, 215, 0.35);
  outline-offset: 1px;
  border-color: rgba(45, 118, 215, 0.4);
}

.account-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.account-submit {
  border: none;
  border-radius: 11px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--navy), #1d4e96);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.account-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.account-submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.account-link-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--blue);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-link-btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

.account-status {
  margin: 4px 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-status.is-error {
  color: var(--orange-deep);
}

.account-status.is-ok {
  color: #1a6641;
}

/* --- signed-in panel --- */
.account-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.account-panel-head h2 {
  margin: 4px 0 2px;
  font-size: 1.35rem;
  letter-spacing: var(--track-heading);
  color: var(--ink);
}

.account-email {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-signout {
  border: 1px solid rgba(35, 38, 42, 0.16);
  border-radius: 10px;
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.account-signout:hover:not(:disabled) {
  border-color: rgba(191, 79, 42, 0.4);
  color: var(--orange-deep);
}

.account-profile {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

/* --- training log --- */
.account-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.account-log-head h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: var(--track-heading);
  color: var(--ink);
}

.account-log-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.account-log-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.account-log-row > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-run-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.account-run-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.account-run-main strong {
  font-size: 0.98rem;
  color: var(--ink);
}

.account-run-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.account-run-delete {
  flex-shrink: 0;
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 9px;
  padding: 7px 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.account-run-delete:hover:not(:disabled) {
  border-color: rgba(191, 79, 42, 0.4);
  color: var(--orange-deep);
}

.account-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 560px) {
  .account-auth,
  .account-panel {
    padding: 18px;
  }

  .account-run {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-run-delete {
    align-self: flex-end;
  }
}
