/* Canonical site palette: shared semantic roles. Page-specific map and photo colours remain local. */
:root {
  --paper:#f1eee5; --ink:#192d2a; --muted:#5a655f; --line:#d6d8ca;
  --forest:#1b3632; --teal:#156c62; --clay:#a24223;
  --sage:#cbd3c1; --amber:#dda36b; --gold:#fff0b5;
  --surface-wash:8%;
  --surface-green:var(--teal);
  --tyit-text-on-dark:#fff;
  --serif:var(--tyit-font-editorial);
  --tyit-rhomboid-shape:polygon(23% 0,100% 0,77% 100%,0 100%);
  --shadow-overlay:0 10px 26px color-mix(in srgb,var(--ink) 16%,transparent);
}
/* Shared responsive foundation — page-level sizing, not renderer composition.
 * The compact/regular/wide page topology is still owned by each page family.
 * Use container queries for card-count fit and keep map/RouteSpine exceptions local.
 */
:root {
  --tyit-control-surface: #f8f5ed;
  --tyit-control-border: var(--muted);
  --tyit-control-focus: var(--teal);
  --tyit-surface-warm: #e8e1d1; /* Muted sand surface for attached editorial details */
  --radius-surface: 0px;
  --radius-control: 4px;
  --radius-overlay: 8px;
  --tyit-page-gutter: clamp(17px, 3.1vw, 44px);
  --tyit-nav-link-gap: clamp(10px, 2.5vw, 32px);
  --tyit-opening-label-gap:12px;
  --tyit-opening-title-gap:clamp(12px, calc(12px + (100vw - 390px) * .003809524), 16px);
  --tyit-opening-content-gap:clamp(16px, calc(16px + (100vw - 390px) * .007619048), 24px);
  --tyit-heading-content-gap:clamp(20px, calc(20px + (100vw - 390px) * .005714286), 26px);
  --tyit-related-block-gap:clamp(24px, calc(24px + (100vw - 390px) * .011428571), 36px);
  --tyit-editorial-section-gap:clamp(48px, calc(48px + (100vw - 390px) * .022857143), 72px);
  --tyit-editorial-section-half:calc(var(--tyit-editorial-section-gap) / 2);
  --tyit-major-section-gap:clamp(80px, calc(80px + (100vw - 390px) * .03047619), 112px);
  --tyit-major-section-half:calc(var(--tyit-major-section-gap) / 2);
  --tyit-editorial-mark-width:2em;
  --tyit-editorial-mark-height:.22em;
  --tyit-opening-inset: clamp(12px, calc(12px + (100vw - 390px) * .013333333), 26px);
  --tyit-prose-max: 70ch;
  --tyit-prose-paragraph-gap: clamp(12px,1.6vw,22px);
  --tyit-composition-max: 1840px;
  --tyit-media-max: 1920px;
  --tyit-structured-max: 1480px;
  /* Canonical type roles: editorial inherits; structural UI opts into sans. */
  --tyit-font-editorial: Georgia, "Times New Roman", serif;
  --tyit-font-structural: Inter, ui-sans-serif, system-ui, sans-serif;
  --tyit-type-selector-active: 18px;
  --tyit-type-selector-near: 14px;
  --tyit-type-journey-selector: clamp(14px, calc(14px + (100vw - 390px) * .001904762), 16px);
  --tyit-type-selector-far: 11px;
  --tyit-weight-selector-active: 500;
  --tyit-type-display: clamp(36px, calc(38px + min(0px, 100vw - 390px) * 0.03047619 + max(0px, 100vw - 390px) * 0.0222222222), 56px);
  --tyit-type-heading: clamp(21px, calc(22.655px + min(0px, 100vw - 390px) * 0.0145 + max(0px, 100vw - 390px) * 0.0090679012), 30px);
  --tyit-type-discovery-title: clamp(26px, calc(28px + min(0px, 100vw - 390px) * 0.017142857 + max(0px, 100vw - 390px) * 0.0123456790), 38px);
  --tyit-type-section: clamp(20px, calc(21.9px + min(0px, 100vw - 390px) * 0.01 + max(0px, 100vw - 390px) * 0.0050617284), 26px);
  --tyit-type-subheading: clamp(17px, calc(18.145px + min(0px, 100vw - 390px) * 0.0055 + max(0px, 100vw - 390px) * 0.0035246914), 21px);
  /* Masthead dimensions cap discovery marks; structural marks can be smaller. */
  --tyit-masthead-mark-width:calc(.86 * var(--tyit-type-subheading));
  --tyit-masthead-mark-height:calc(.57 * var(--tyit-type-subheading));
  /* Photographed journey-card title scale, shared by Home, Search and Field Guide. */
  --tyit-type-card-title: clamp(22px, min(calc(24px + (100vw - 390px) * .028571429), calc(24px + (100vw - 390px) * .005714286)), 30px);
  --tyit-type-card-title-single-column:clamp(30px,calc(34px + (100vw - 390px) * .057142857),34px);
  --tyit-type-standard: clamp(15px, calc(16.0004px + min(0px, 100vw - 390px) * 0.00286 + max(0px, 100vw - 390px) * 0.0024686420), 18px);
  --tyit-type-small: clamp(11px, calc(0.191vw + 11.255px), 14px);
  --tyit-type-compact: 9px;
  --tyit-type-structural: clamp(11px, calc(12px + min(0px, 100vw - 390px) * 0.006667 + max(0px, 100vw - 390px) * 0.0024691358), 14px);
  --tyit-structural-weight: 800;
  --tyit-structural-tracking: .14em;
  --tyit-type-compact-nav: clamp(9px, calc(9px + (100vw - 390px) * .005), 11px);
  --tyit-leading-body: 1.58;
  --tyit-leading-heading: 1.1;
  --tyit-leading-label: 1.35;
  --tyit-weight-editorial: 500;
  --tyit-weight-body: 400;
  --tyit-weight-label: 650;
}

/* Responsive structural treatment. Use dimensionless viewport progress so
   tracking remains relative to the label's own font size, not the viewport. */
@media(min-width:900px){:root{--tyit-structural-weight:600;--tyit-structural-tracking:.06em}}
@supports (font-weight: calc(800 - 200 * clamp(0, (100vw - 390px) / 810px, 1))) {
  :root{
    --tyit-type-growth:clamp(0, (100vw - 390px) / 810px, 1);
    --tyit-structural-weight:calc(800 - 200 * var(--tyit-type-growth));
    --tyit-structural-tracking:calc(.14em + (.06em - .14em) * var(--tyit-type-growth));
  }
}

/* Editorial typography is inherited across page families. */
html { font-family: var(--tyit-font-editorial); font-size: var(--tyit-type-standard); }
body { color: var(--ink); font-family: inherit; line-height: var(--tyit-leading-body); }
/* Shared semantic type roles. Page composition owns spacing, not type identity. */
h1, h2, h3, h4, h5, h6 { font-family: inherit; font-weight: var(--tyit-weight-editorial); line-height: var(--tyit-leading-heading); }
/* Opt-in semantic roles for migration of existing page typography. */
.tyit-type-display { font-size: var(--tyit-type-display); line-height: var(--tyit-leading-heading); font-weight: var(--tyit-weight-editorial); }
.tyit-type-heading { font-size: var(--tyit-type-heading); line-height: var(--tyit-leading-heading); font-weight: var(--tyit-weight-editorial); }
.tyit-type-section { font-size: var(--tyit-type-section); line-height: var(--tyit-leading-heading); font-weight: var(--tyit-weight-editorial); }
.tyit-type-subheading { font-size: var(--tyit-type-subheading); line-height: var(--tyit-leading-heading); font-weight: var(--tyit-weight-editorial); }
.tyit-type-body { font-size: var(--tyit-type-standard); line-height: var(--tyit-leading-body); font-weight: var(--tyit-weight-body); }
.tyit-type-label { font-family: var(--tyit-font-structural); font-size: var(--tyit-type-small); line-height: var(--tyit-leading-label); font-weight: var(--tyit-weight-label); }
.tyit-type-structural-label { font-family: var(--tyit-font-structural); font-size: var(--tyit-type-structural); line-height: var(--tyit-leading-label); font-weight: var(--tyit-structural-weight); letter-spacing: var(--tyit-structural-tracking); text-transform: uppercase; }
button, input, select, textarea, nav, [role="navigation"] { font-family: var(--tyit-font-structural); }
/* Bordered text-entry controls; compact inline navigation search stays unboxed. */
.tyit-form-control{border:1px solid var(--tyit-control-border);border-radius:var(--radius-control);background:var(--tyit-control-surface);color:var(--ink);font:var(--tyit-weight-body) max(16px,var(--tyit-type-small))/1.4 var(--tyit-font-structural)}
.tyit-form-control:focus-visible{outline:2px solid var(--tyit-control-focus);outline-offset:2px}


/* Shared accessible-only status and control labels. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Shared editorial text-and-photo composition; individual families own media styling. */
.tyit-editorial-spread{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:clamp(24px,3vw,48px);align-items:center;text-align:left}
@media(max-width:760px){.tyit-editorial-spread{grid-template-columns:minmax(0,1fr)}}

/* Shared Atlas discovery grid; editorial cards may use a larger content gap. */
:is(.atlas-discovery-cards,.tyit-discovery-grid){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--discovery-grid-gap,9px);flex:none;min-width:0}
@media(max-width:900px){:is(.atlas-discovery-cards,.tyit-discovery-grid){grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--discovery-grid-gap,7px)}}

/* M172: one heading motif grammar. Local compositions supply an existing semantic
 * accent, never geometry. C2 stays aligned to the title; A marks discovery;
 * B marks a section boundary without participating in grid/flex layout. */
.editorial-title-mark::after{content:"";display:block;width:var(--tyit-editorial-mark-width);height:var(--tyit-editorial-mark-height);margin:.3em var(--tyit-title-mark-end,0) 0 var(--tyit-title-mark-start,0);background:var(--tyit-title-mark-color,var(--clay));clip-path:var(--tyit-rhomboid-shape)}
/* A mark between heading and prose retains balanced spacing. */
.editorial-title-mark--between::after{margin-block:clamp(10px,.48em,12px)}
.tyit-discovery-heading{display:flex;align-items:baseline;gap:.65em;min-width:0}
.tyit-discovery-heading::before{content:"";display:block;align-self:center;flex:none;width:min(max(7px,1.15em),var(--tyit-masthead-mark-width));height:auto;aspect-ratio:86/57;background:var(--tyit-section-accent,var(--clay));clip-path:var(--tyit-rhomboid-shape)}
.tyit-editorial-boundary{position:relative}
.tyit-section-spaced{margin-block-start:var(--tyit-editorial-section-half);padding-block-start:var(--tyit-editorial-section-half)}
.tyit-editorial-boundary::before{content:"";position:absolute;pointer-events:none;inset-block-start:0;inset-inline-start:0;width:clamp(72px,calc(72px + (100vw - 390px) * .026666667),100px);height:5px;background:var(--tyit-section-accent,var(--clay));clip-path:var(--tyit-rhomboid-shape)}
@media(min-width:761px){.tyit-editorial-boundary::before{inset-inline-start:50%;transform:translateX(-50%)}}

/* The three discovery landings share the actual opening layout, not copies
 * of the same margins. The family supplies its own prose colour. */
.tyit-discovery-opening{text-align:center;max-width:820px;margin:0 auto var(--tyit-opening-content-gap)}
.tyit-discovery-opening h1{font:var(--tyit-weight-editorial) var(--tyit-type-discovery-title)/var(--tyit-leading-heading) var(--tyit-font-editorial);letter-spacing:-.035em;margin:0 0 var(--tyit-opening-title-gap)}
.tyit-discovery-opening h1 em{color:var(--clay);font-weight:normal}
.tyit-discovery-opening>p:last-child{font:var(--tyit-weight-body) var(--tyit-type-standard)/var(--tyit-leading-body) var(--tyit-font-editorial);color:var(--field-muted,var(--muted));margin:auto;max-width:650px}

/* Shared photographic atlas annotation. Cover families own its placement, not
 * typography, colour evidence or crosshair construction. */
.photo-locator{position:absolute;z-index:2;display:flex;width:max-content;box-sizing:border-box;background:var(--photo-locator-surface,var(--forest));color:white;font:400 var(--tyit-type-compact)/1.1 Consolas,"Courier New",monospace}
.photo-locator[hidden],.photo-coords[hidden]{display:none}
.photo-cross{position:absolute;pointer-events:none}
.photo-cross::before,.photo-cross::after{content:"";position:absolute;background:var(--photo-locator-cross,var(--gold))}
.field-photo-locator{--photo-locator-surface:color-mix(in srgb,var(--field-heading) 75%,#192d2a);--photo-locator-cross:color-mix(in srgb,var(--field-counterpoint) 32%,#fff9ed);right:0;top:24px;max-width:65%;flex-wrap:wrap;align-items:center;gap:.5em;padding:.65em 1em;white-space:normal}
.field-photo-locator .photo-coords{white-space:nowrap}
/* Mirror the original Home motif for a right-edge bar: long horizontal arm
 * follows the top edge; long vertical arm points out. The narrow orientation
 * exchanges the axes so the longer vertical arm follows the caption. */
.field-photo-locator .photo-cross{width:0;height:0;top:0;left:0;--cross-x-before:.73em;--cross-x-length:2.6em;--cross-y-before:1.1em;--cross-y-length:2em}
.field-photo-locator .photo-cross::before{height:var(--cross-y-length);width:max(1px,.13em);top:calc(-1 * var(--cross-y-before));left:0}
.field-photo-locator .photo-cross::after{height:max(1px,.13em);width:var(--cross-x-length);top:0;left:calc(-1 * var(--cross-x-before))}
@media(max-width:760px){
 .field-photo-locator{writing-mode:vertical-rl;transform:rotate(180deg);max-width:none;max-height:calc(100% - 48px);flex-direction:row;flex-wrap:wrap;gap:.5em;padding:.5em .6em}
 .field-photo-locator .photo-cross{top:auto;left:auto;right:0;bottom:0;transform:rotate(180deg);--cross-x-before:1.1em;--cross-x-length:2em;--cross-y-before:.73em;--cross-y-length:2.6em}
}

/* Section 06 transport modes: canonical route legs, presentation only. */
.journey-transport-modes{display:inline-flex;align-items:center;gap:5px;vertical-align:middle;margin-right:9px;color:var(--muted);white-space:nowrap;line-height:1}.journey-transport-icon{display:block;width:23px;height:23px;flex:none}.journey-transport-modes>span{font:400 14px/1.2 var(--tyit-font-ui, sans-serif)}

/* Pace shares the transport heading icon slot and visual height. */
.journey-pace-modes .journey-transport-icon{width:69px;height:23px}

/* Branded static error document; the shared header and footer remain unchanged. */
.tyit-not-found body{margin:0;min-height:100vh;display:flex;flex-direction:column;background:var(--paper)}
.tyit-not-found body > .tyit-home-header{width:100%}
.tyit-not-found main{flex:1;display:grid;place-items:center;padding:var(--tyit-major-section-half) var(--tyit-page-gutter)}
.not-found-opening{text-align:center;max-width:var(--tyit-prose-max)}
.not-found-opening h1{margin:var(--tyit-opening-title-gap) 0}
.not-found-opening nav{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--tyit-nav-link-gap);margin-top:var(--tyit-opening-content-gap)}
.not-found-opening a{color:var(--teal);text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px}
