/* ============================================================
   RicoOS Field Notes — fieldnotes.css
   Route Sheet & Elevation Profile — a printed navigation
   instrument for systems, AI, and the road.
   ============================================================ */

/* ── 1. Design tokens ─────────────────────────────────────────
   Contrast notes (WCAG, measured against --paper #F3EFE6):
     --ink        #1C1B18  ≈ 14.9:1  body text
     --ink-soft   #5A564A  ≈  6.4:1  secondary text
     --ink-faint  #6B6558  ≈  5.0:1  meta text (smallest use ≥ 13px)
     --blaze      #B4451F  ≈  4.8:1  accent as text/links
     --contour-deep #55624A ≈ 5.7:1  sage when used as text
     --contour    #6B7A5E  ≈  4.0:1  graphics + large text only
     Category hues (text on cream / cream text on fill, all ≥ 4.5:1):
     field #4A6B2A 5.3 · builder #2E5E73 6.2 · road #8A5A18 5.2
     photo #6D4E7E 6.0 · decision #47545C 6.8
*/
:root {
  --paper:         #F3EFE6;   /* aged topo-map cream */
  --paper-raised:  #FAF7F0;   /* cards, route cards */
  --paper-sunken:  #EAE4D4;   /* recessed rows, code, thumbnails */
  --ink:           #1C1B18;   /* warm near-black */
  --ink-soft:      #5A564A;
  --ink-faint:     #6B6558;
  --rule:          #D9D2C2;   /* hairline rules */
  --rule-strong:   #B9B09A;
  --contour:       #6B7A5E;   /* sage — contour-line material, not a UI accent */
  --contour-deep:  #55624A;
  --blaze:         #B4451F;   /* wayfinding accent: "you are here" / actionable */
  --blaze-deep:    #8F3413;

  /* Map-legend category hues */
  --cat-field:     #4A6B2A;   /* terrain green  — Field Notes    */
  --cat-builder:   #2E5E73;   /* survey blue    — Builder Log    */
  --cat-road:      #8A5A18;   /* road ochre     — Road Notes     */
  --cat-photo:     #6D4E7E;   /* boundary violet— Photo Notes    */
  --cat-decision:  #47545C;   /* junction slate — Decision Notes */

  --font-body:     'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-label:    'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-mono:     ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --track-label:   0.08em;    /* caps-label letterspacing */
  --max-w:         1088px;
  --max-w-prose:   728px;

  /* One easing, one duration — mechanical, instrument-like */
  --ease:          cubic-bezier(0.2, 0, 0, 1);
  --dur:           140ms;
}

/* ── 2. Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body.ricoos {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--blaze); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur) var(--ease); }
a:hover { color: var(--blaze-deep); }

::selection { background: var(--contour); color: var(--paper); }

/* ── 3. Utilities ────────────────────────────────────────────── */
.rft-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Survey-map caps label — condensed face, earned by the route-sheet concept */
.rft-mono,
.rft-label {
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* Tabular figures for mileage-table numerals (dates, read time, counts) */
.rft-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ── 4. Header — route sheet masthead ────────────────────────── */
.rft-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
}
.rft-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.rft-header__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-family: var(--font-label);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.rft-header__brand:hover { color: var(--blaze); }
.rft-header__brand-mark { flex-shrink: 0; color: var(--blaze); display: block; }
/* Explicit sizing on every header icon svg — width/height attributes alone are
   not reliable inside flex buttons across browsers (mobile Safari in
   particular can collapse an un-css-sized svg to near-zero width even though
   the height attribute is respected). Belt-and-suspenders fix. */
.rft-nav__toggle svg,
.rft-search__toggle svg,
.rft-search__submit svg {
  flex-shrink: 0;
  width: 18px;
  height: 14px;
}
.rft-search__submit svg,
.rft-search__toggle svg { width: 16px; height: 16px; }
.rft-header__right { display: flex; align-items: center; gap: 4px; }

/* Elevation profile strip — the one authored motif. Runs under the
   masthead on every template; on single posts the blaze path fills
   with reading progress (assets/js/fieldnotes.js). */
.rft-elevation {
  height: 26px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}
.rft-elevation svg { width: 100%; height: 100%; display: block; }
.rft-elevation__base {
  fill: none;
  stroke: var(--contour);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
}
.rft-elevation__progress {
  fill: none;
  stroke: var(--blaze);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* ── 5. Navigation ───────────────────────────────────────────── */
.rft-nav { display: flex; align-items: center; }
.rft-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.rft-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.rft-nav__link:hover { color: var(--ink); }
/* Active = a mark, not a hue: filled waypoint dot + route-line underline */
.rft-nav__link::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: transparent;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.rft-nav__link:hover::before { opacity: 0.5; }
.rft-nav__link.active,
.rft-nav__link[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blaze);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.rft-nav__link.active::before,
.rft-nav__link[aria-current="page"]::before {
  opacity: 1;
  background: var(--blaze);
  border-color: var(--blaze);
}
.rft-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.rft-nav__toggle:hover { border-color: var(--rule-strong); }

/* ── 6. Search ───────────────────────────────────────────────── */
.rft-search { display: flex; align-items: center; }
.rft-search__input {
  width: 170px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-right: none;
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--dur) var(--ease), width var(--dur) var(--ease);
}
.rft-search__input::placeholder { color: var(--ink-faint); }
.rft-search__input:focus { outline: none; border-color: var(--ink); width: 210px; }
.rft-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-sunken);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rft-search__submit:hover { background: var(--ink); color: var(--paper); }
.rft-search__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.rft-search__toggle:hover { border-color: var(--rule-strong); }

/* ── 7. Hero — route sheet title block ───────────────────────── */
.rft-hero {
  position: relative;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
/* 3D wireframe city — decorative WebGL canvas (city-hero.js, three.js),
   same slot as the old 2D diorama. three renders straight into this
   canvas; the JS sizes the backing store from this rule's computed box
   (clientWidth/clientHeight × devicePixelRatio, capped at 2) and never
   touches the CSS size, so layout stays fully CSS-controlled here.
   Scales with viewport width above the 620px floor so it doesn't stay
   pinned at mobile-era size on wide laptop/desktop screens (fixed
   2026-08-23). Aspect ratio locked to the original 620:520. The scene
   background is painted to match --paper, so the canvas rectangle stays
   invisible against the page. */
.rft-hero__terrain {
  position: absolute;
  top: -60px;
  right: -140px;
  width: clamp(620px, 55vw, 980px);
  aspect-ratio: 620 / 520;
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.rft-hero > .rft-container { position: relative; z-index: 1; }
.rft-hero__headline {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  max-width: 15ch;
}
.rft-hero__subtitle {
  margin-top: 20px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--contour-deep);
  max-width: 46ch;
}
.rft-hero__intro {
  margin-top: 28px;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 17px;
}
.rft-hero__intro p + p { margin-top: 14px; }

/* ── 8. Section headings ─────────────────────────────────────── */
.rft-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule-strong);
}
.rft-section-head__label,
.rft-signal__label,
.rft-related__label {
  font-family: var(--font-label);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}
.rft-section-head__link {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blaze);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.rft-section-head__link:hover { color: var(--blaze-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ── 9. Current position (Current Signal data) ───────────────── */
.rft-signal { padding: 48px 0; border-bottom: 1px solid var(--rule); }
.rft-signal__card {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  max-width: 780px;
}
.rft-signal__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
}
/* "You are here" — a filled wayfinding marker, deliberately static */
.rft-signal__indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blaze);
  outline: 1px solid var(--blaze);
  outline-offset: 2px;
  flex-shrink: 0;
}
.rft-signal__grid { padding: 8px 20px 14px; }
.rft-signal__row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 9px 0;
}
.rft-signal__row + .rft-signal__row { border-top: 1px dashed var(--rule); }
.rft-signal__key {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.rft-signal__val { color: var(--ink); font-size: 16px; }

/* ── 10. Route legend (homepage category key) ────────────────── */
.rft-legend { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.rft-legend__list { list-style: none; }
.rft-legend__entry {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 18px 8px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--rule-strong);
  transition: background-color var(--dur) var(--ease);
}
li:last-child > .rft-legend__entry { border-bottom: none; }
a.rft-legend__entry:hover { background: var(--paper-raised); }
.rft-legend__swatch {
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border: 1px solid var(--ink);
  position: relative;
}
.rft-legend__swatch::after {
  content: '';
  position: absolute;
  inset: 3px;
}
.swatch--field::after    { background: var(--cat-field); }
.swatch--builder::after  { background: var(--cat-builder); }
.swatch--road::after     { background: var(--cat-road); }
.swatch--photo::after    { background: var(--cat-photo); }
.swatch--decision::after { background: var(--cat-decision); }
.rft-legend__name {
  display: block;
  font-family: var(--font-label);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}
a.rft-legend__entry:hover .rft-legend__name { text-decoration: underline; text-decoration-color: var(--blaze); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rft-legend__desc {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 62ch;
}
.rft-legend__count {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 5px;
}
.rft-legend__entry--dim .rft-legend__name,
.rft-legend__entry--dim .rft-legend__desc { color: var(--ink-faint); }
.rft-legend__entry--dim .rft-legend__swatch::after { opacity: 0.35; }
.rft-legend__soon {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--rule-strong);
  padding: 2px 8px;
  margin-left: 10px;
  vertical-align: 2px;
}

/* ── 11. Note cards — route log with waypoint markers ────────── */
.rft-feed { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.rft-feed__list { position: relative; }
/* The route line: a vertical dashed path connecting waypoint dots */
.rft-feed__list::before {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 10px;
  border-left: 1px dashed var(--rule-strong);
}
.rft-note-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 20px 12px 20px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--dur) var(--ease);
}
.rft-note-card:last-child { border-bottom: none; }
.rft-note-card:hover { background: var(--paper-raised); }
/* Waypoint marker column */
.rft-wpt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-top: 4px;
}
.rft-wpt__dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background-color: var(--paper);  /* hollow = unvisited */
  position: relative;
  z-index: 1;
}
/* Visited = filled mark (state is a mark, not a hue). :visited only
   permits color-type properties; if a browser declines the descendant
   rule the dot simply stays hollow. */
a.rft-note-card:visited .rft-wpt__dot { background-color: #1C1B18; } /* literal: var() may be ignored in :visited */
a.rft-note-card:hover .rft-wpt__dot { border-color: var(--blaze); }
.rft-wpt__num {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.rft-note-card__left { min-width: 0; }
.rft-note-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 6px;
}
.rft-note-card__date,
.rft-note-card__read,
.rft-article__date,
.rft-article__read {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.rft-note-card__title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.rft-note-card:hover .rft-note-card__title { text-decoration: underline; text-decoration-color: var(--blaze); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rft-note-card__excerpt {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 68ch;
}
.rft-note-card__thumb {
  width: 96px;
  height: 68px;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  background: var(--paper-sunken);
  flex-shrink: 0;
}
.rft-thumb-ph { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rft-thumb-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Empty states — designed, not browser default */
.rft-empty {
  padding: 56px 24px;
  border: 1px dashed var(--rule-strong);
  text-align: center;
  background: var(--paper-raised);
}
.rft-empty__mark {
  width: 18px;
  height: 18px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px dashed var(--ink-faint);
}
.rft-empty__title {
  font-family: var(--font-label);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}
.rft-empty__text { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; }
.rft-empty__links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  list-style: none;
}
.rft-empty__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── 12. Category badges — legend keys ───────────────────────── */
.rft-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  padding: 4px 0;
}
.rft-badge::before {
  content: '';
  width: 9px;
  height: 9px;
  background: currentColor;
  outline: 1px solid var(--ink);
  outline-offset: 1px;
  flex-shrink: 0;
}
a.rft-badge { min-height: 30px; }
a.rft-badge:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* Legacy class names kept (rft_category_class in functions.php);
   values re-derived for the map-legend palette:
   amber→Field Notes, teal→Builder Log, rose→Road Notes,
   violet→Photo Notes, slate→Decision Notes. */
.badge--amber   { color: var(--cat-field); }
.badge--teal    { color: var(--cat-builder); }
.badge--rose    { color: var(--cat-road); }
.badge--violet  { color: var(--cat-photo); }
.badge--slate   { color: var(--cat-decision); }
.badge--default { color: var(--ink-soft); }

/* ── 13. Photo strip — contact prints ────────────────────────── */
.rft-photos { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.rft-photos__strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory; /* snap, not glide — instrument motion */
}
.rft-photos__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  padding: 6px 6px 20px; /* print border */
  transition: border-color var(--dur) var(--ease);
}
.rft-photos__item:hover { border-color: var(--ink); }
.rft-photos__item img {
  width: 220px;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* ── 14. Breadcrumbs — the route trail ───────────────────────── */
.rft-breadcrumb { margin-bottom: 28px; }
.rft-breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rft-breadcrumb__item { display: inline-flex; align-items: center; color: var(--ink-faint); }
/* Waypoint-dot separator: passed waypoints are hollow dots on the trail */
.rft-breadcrumb__item + .rft-breadcrumb__item::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  margin: 0 12px;
  flex-shrink: 0;
}
/* Current position: the trail ends at a filled blaze marker */
.rft-breadcrumb__item[aria-current="page"]::before {
  border-color: var(--blaze);
  background: var(--blaze);
}
.rft-breadcrumb__item a {
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.rft-breadcrumb__item a:hover { color: var(--blaze); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rft-breadcrumb__item[aria-current="page"] {
  color: var(--ink);
  max-width: 44ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  line-height: 44px;
}

/* ── 15. Single article ──────────────────────────────────────── */
.rft-article-wrap {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.rft-article__header { margin-bottom: 32px; }
.rft-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.rft-article__title {
  font-family: var(--font-body);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.rft-article__excerpt {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
}
/* At-a-glance abstract — same excerpt treatment, small caption-style label */
.rft-article__glance { margin-top: 16px; }
.rft-article__glance .rft-article__excerpt { margin-top: 4px; }
.rft-article__glance-label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rft-article__featured { margin: 28px 0; }
.rft-article__featured img {
  width: 100%;
  border: 1px solid var(--rule-strong);
}

/* Article body — the reading face, real prose measure */
.rft-article__body {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 70ch;
}
.rft-article__body > * + * { margin-top: 1.15em; }
.rft-article__body h2,
.rft-article__body h3,
.rft-article__body h4 {
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 1.9em;
}
.rft-article__body h2 { font-size: 26px; }
.rft-article__body h3 { font-size: 21px; }
.rft-article__body h4 { font-size: 18px; }
.rft-article__body a { color: var(--blaze); }
.rft-article__body a:hover { color: var(--blaze-deep); }
.rft-article__body ul,
.rft-article__body ol { padding-left: 1.4em; }
.rft-article__body li + li { margin-top: 0.4em; }
.rft-article__body img { border: 1px solid var(--rule-strong); }
.rft-article__body hr {
  border: none;
  border-top: 1px dashed var(--rule-strong);
  margin: 2.2em 0;
}
/* Pull-quote as a surveyed margin note: hairline rules above/below,
   contour-deep ink — no fat accent bars (craft-floor: ≤1px) */
.rft-article__body blockquote {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  border-left: 1px solid var(--contour);
  padding: 18px 0 18px 20px;
  margin: 1.6em 0;
  color: var(--contour-deep);
  font-size: 18.5px;
  line-height: 1.6;
}
.rft-article__body blockquote p:last-child { margin-bottom: 0; }
.rft-article__body blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-label);
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rft-article__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-sunken);
  border: 1px solid var(--rule);
  padding: 1px 5px;
}
.rft-article__body pre {
  background: var(--paper-sunken);
  border: 1px solid var(--rule-strong);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14.5px;
  line-height: 1.6;
}
.rft-article__body pre code { background: none; border: none; padding: 0; }

/* ── 16. Sign-off — end-of-leg marker ────────────────────────── */
.rft-signoff {
  margin-top: 56px;
  padding-top: 24px;
  position: relative;
}
/* The route line runs out and terminates at a filled waypoint */
.rft-signoff::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--rule-strong);
}
.rft-signoff::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--paper);
  outline: 1px solid var(--ink);
}
.rft-signoff__prompt {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rft-signoff__byline {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 58ch;
}
.rft-signoff__name { color: var(--ink); font-weight: 700; }
.rft-signoff__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blaze);
  text-decoration: none;
}
.rft-signoff__link:hover { color: var(--blaze-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ── 17. Prev/next — adjacent waypoints ──────────────────────── */
.rft-article__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.rft-article__nav-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease);
}
.rft-article__nav-item:hover { border-color: var(--ink); }
.rft-article__nav-label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rft-article__nav-title {
  margin-top: 4px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.rft-article__nav-item:hover .rft-article__nav-title { color: var(--blaze); }

/* ── 18. Related notes ───────────────────────────────────────── */
.rft-related { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.rft-related__label { display: block; margin-bottom: 8px; }

/* ── 19. Archive & search ────────────────────────────────────── */
.rft-archive-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.rft-archive__header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-strong);
}
.rft-archive__title {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}
/* Route stats line — leg data below the title, tabular numerals */
.rft-archive__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.rft-archive__desc {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 16.5px;
  max-width: 64ch;
}
.rft-archive-wrap .rft-feed__list { margin-top: 0; }

/* ── 20. Pagination — mileage table ──────────────────────────── */
.rft-pagination { margin-top: 40px; }
.rft-pagination .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.rft-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rft-pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.rft-pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.rft-pagination .page-numbers.dots { border: none; background: none; }

/* ── 21. Static pages ────────────────────────────────────────── */
.rft-page-wrap {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.rft-page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-strong);
}
.rft-page__title {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
}
.rft-page__body {
  font-size: 17.5px;
  line-height: 1.7;
  max-width: 70ch;
}
.rft-page__body > * + * { margin-top: 1.15em; }
.rft-page__body h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; margin-top: 1.9em; }
.rft-page__body h3 { font-size: 21px; font-weight: 700; margin-top: 1.6em; }
.rft-page__body ul, .rft-page__body ol { padding-left: 1.4em; }

/* "Now" page theme list (content pattern from prior pass) */
.rft-now-themes { margin: 1.6em 0; border: 1px solid var(--rule-strong); background: var(--paper-raised); padding: 18px 20px; }
.rft-now-themes__label {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.rft-now-themes__list { list-style: none; padding: 0; }
.rft-now-themes__item { padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.rft-now-themes__item:last-child { border-bottom: none; }

/* ── 22. 404 — off route ─────────────────────────────────────── */
.rft-404-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 88px 24px 104px;
  text-align: center;
}
.rft-404__code {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(4rem, 12vw, 6rem); /* display ceiling per craft floor */
  line-height: 1;
  color: var(--rule-strong);
  font-variant-numeric: tabular-nums;
  position: relative;
  display: inline-block;
}
/* The route breaks off: dashed trail ends at a hollow marker */
.rft-404__trail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 18px auto 26px;
  max-width: 280px;
}
.rft-404__trail-line { flex: 1; border-top: 1px dashed var(--rule-strong); }
.rft-404__trail-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px dashed var(--blaze);
  margin-left: 8px;
  flex-shrink: 0;
}
.rft-404__msg {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--ink);
}
.rft-404__sub { margin-top: 12px; color: var(--ink-soft); font-size: 16.5px; }

/* ── 23. Buttons ─────────────────────────────────────────────── */
.rft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  margin-top: 28px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rft-btn:hover { background: var(--blaze); border-color: var(--blaze); color: var(--paper); }

/* ── 24. Footer — map margin / colophon ──────────────────────── */
.rft-footer {
  border-top: 1px solid var(--rule-strong);
  background: var(--paper-sunken);
  margin-top: 0;
}
.rft-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px 48px;
  align-items: start;
}
.rft-footer__brand {
  font-family: var(--font-label);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.rft-footer__brand a { color: var(--ink); text-decoration: none; }
.rft-footer__brand a:hover { color: var(--blaze); }
.rft-footer__note { color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; max-width: 40ch; }
.rft-footer__legend { list-style: none; }
.rft-footer__legend-title {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.rft-footer__legend a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 0;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.rft-footer__legend a:hover { color: var(--blaze); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rft-footer__legend-swatch {
  width: 9px;
  height: 9px;
  outline: 1px solid var(--ink);
  outline-offset: 1px;
  flex-shrink: 0;
}
.rft-footer__meta {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px dashed var(--rule-strong);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.rft-footer__tags { color: var(--ink-faint); }

/* ── 25. WordPress block re-skins ────────────────────────────── */
.wp-block-image img  { border: 1px solid var(--rule-strong); }
.wp-block-code {
  background: var(--paper-sunken) !important;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--font-mono);
}
.wp-block-pullquote  { border-top: 1px solid var(--rule-strong) !important; border-bottom: 1px solid var(--rule-strong) !important; color: var(--contour-deep); }
.wp-block-separator  { border-color: var(--rule-strong) !important; }
.wp-block-quote      { border-left: 1px solid var(--contour) !important; }
.wp-block-table td,
.wp-block-table th   { border-color: var(--rule-strong) !important; font-variant-numeric: tabular-nums; }

.editor-styles-wrapper { background: var(--paper); color: var(--ink); font-family: var(--font-body); }

/* ── 26. Focus & assistive ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--blaze);
  outline-offset: 2px;
}
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/* ── 26b. V4 — reading-elevation strip & archive terrain ─────
   Feature A: thin content-derived profile in the single-post header
   (elevation-strip.js). Heights are fixed here so the canvases
   reserve their space and never shift layout while JS draws.
   Feature B: Road/Photo Notes archive banner (terrain-archive.js). */
.rft-strip { margin: 0 0 20px; }
.rft-strip__canvas {
  display: block;
  width: 100%;
  height: 56px;
  pointer-events: none;
}
.rft-strip__caption {
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rft-archive__terrain {
  display: block;
  width: 100%;
  height: 200px;
  margin: 0 0 36px;
  pointer-events: none;
}

/* ── 27. Responsive ──────────────────────────────────────────── */
/* Raised from 860px 2026-08-23: nav's natural content width (brand + 7
   links + search, all no-wrap) needs ~1070-1105px depending on brand
   text length; 860px left a broken zone (~861-1105px, e.g. iPad landscape
   1194px with browser chrome/split-view) where the desktop nav neither
   fit on one line nor got the mobile hamburger, causing individual nav
   words to wrap mid-label. 1100px clears the measured worst case with
   margin. */
@media (max-width: 1100px) {
  .rft-nav__toggle { display: inline-flex; }
  .rft-nav { position: relative; }
  .rft-nav__list {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: 6px;
    display: none;
    z-index: 110;
    box-shadow: none;
  }
  .rft-nav__list.open { display: flex; }
  .rft-nav__list .rft-nav__link { width: 100%; min-height: 44px; }

  .rft-search { display: none; position: absolute; top: 60px; left: 0; right: 0; padding: 10px 24px; background: var(--paper); border-bottom: 1px solid var(--ink); z-index: 105; }
  .rft-search.open { display: flex; }
  .rft-search__input { flex: 1; width: auto; }
  .rft-search__input:focus { width: auto; }
  .rft-search__toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  body.ricoos { font-size: 16px; }
  .rft-hero { padding: 56px 0 48px; }
  /* Mobile: keep the terrain visible but as a full-width background band
     behind the headline rather than the desktop's top-right blob — smaller
     canvas footprint, lower opacity so type stays fully legible on top. */
  .rft-hero__terrain {
    top: -20px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 240px;
    opacity: 0.55;
  }
  .rft-elevation { height: 18px; }             /* simplify the profile strip */
  .rft-signal__row { grid-template-columns: 1fr; gap: 2px; }
  .rft-legend__entry { grid-template-columns: 30px 1fr; }
  .rft-legend__count { display: none; }        /* counts drop before type shrinks */
  .rft-note-card { grid-template-columns: 32px 1fr; }
  .rft-note-card__thumb { display: none; }
  .rft-feed__list::before { left: 8px; }
  .rft-wpt__num { display: none; }
  .rft-article__nav { grid-template-columns: 1fr; }
  /* Reading strip stays on mobile (static, one draw) but slims down so
     it doesn't crowd the meta row; archive terrain drops entirely,
     matching the hero-terrain precedent. */
  .rft-strip { margin-bottom: 16px; }
  .rft-strip__canvas { height: 40px; }
  .rft-archive__terrain { display: none; }
  .rft-footer__inner { grid-template-columns: 1fr; }
  .rft-photos__item img { width: 170px; height: 118px; }
  .rft-breadcrumb__item[aria-current="page"] { max-width: 24ch; }
}

/* ── 28. Motion discipline ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ── 29. Print — it is already a printed instrument ──────────── */
@media print {
  .rft-header, .rft-elevation, .rft-footer, .rft-search, .rft-nav { display: none; }
  body.ricoos { background: #fff; }
}
