/* ==========================================================================
   CARTOGRAPHIC — one page. Loaded on a/cartographic.html.

   Founder, 2026-09-26: the page is Annie's Claude artifact, shell excepted.
   A sheet map: pale survey stock, contour brown, route red, a coordinate
   grid with margin references. The hero is a contour map with the name set
   across it in letterspaced italic Spectral; the record is a walk, each
   section a numbered stop pinned to a dashed red route, beside a boxed
   legend that declares every mark on the sheet and lists the stops. The
   shell (rail, top bar, action cluster, community drawer) is never
   restyled: every rule here is scoped to .cg-hero or .cg-rec.
   ========================================================================== */
@font-face {
  font-family: "SpectralX";
  src: url("fonts/spectral.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "SpectralX";
  src: url("fonts/spectral-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "KarlaX";
  src: url("fonts/karla.woff2") format("woff2-variations");
  font-weight: 300 800;
  font-display: swap;
}

.cg-page {
  --cg-pale: #F2EFE4;   /* pale survey stock */
  --cg-ink: #2E2A20;
  --cg-grey: #6A6350;
  --cg-brown: #A5764C;  /* contour brown */
  --cg-red: #B03A2E;    /* route red */
  --cg-sand: #D8D2BE;
  --cg-paper: #F7F5EC;
  --cg-gold: #C99A2E;
  --cg-serif: "SpectralX", Georgia, serif;
  --cg-sans: "KarlaX", "Helvetica Neue", sans-serif;
  background: var(--paper);
}
.cg-page main { background: var(--cg-pale); }
.cg-hero, .cg-rec { font: 400 17px/1.6 var(--cg-sans); color: var(--cg-ink); font-synthesis: weight style; }
.cg-hero a, .cg-rec a { color: var(--cg-red); }
.cg-hero a:hover, .cg-rec a:hover { color: var(--cg-ink); }
.cg-hero :focus-visible, .cg-rec :focus-visible { outline: 3px solid var(--cg-red); outline-offset: 3px; }
.cg-hero svg, .cg-rec svg { max-width: 100%; }

/* ---- hero: the map ---- */
.cg-hero { background: var(--cg-paper); }
.cg-map { position: relative; container-type: inline-size; border-bottom: 2px solid var(--cg-ink); overflow: hidden; background: var(--cg-paper); }
.cg-map > svg { display: block; width: 100%; height: auto; min-height: 420px; }
.cg-map > svg text { font-family: var(--cg-sans); }
.cg-t { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; }
/* The name in one line across the sheet whatever the sheet's width: sized
   against the map's own inline size (the shell's rail takes 260px of the
   viewport), with a viewport fallback for browsers without container units. */
.cg-h1 { margin: 0; font: italic 400 clamp(34px, 7.2vw, 120px)/1 var(--cg-serif); font-size: clamp(34px, 9.2cqw, 120px); white-space: nowrap; letter-spacing: 0.32em; padding-left: 0.32em; color: var(--cg-ink); text-shadow: 0 0 6px var(--cg-paper), 0 0 12px var(--cg-paper), 0 0 18px var(--cg-paper); }
.cg-desc { display: inline-block; margin: 10px 0 0; background: var(--cg-paper); padding: 4px 10px; font-size: 15px; border: 1px solid var(--cg-ink); }

/* ---- the record: the route and the legend ---- */
/* The contours thin out over the last stretch of the record, so the sheet does not stop on a hard edge above the page foot. */
.cg-rec { background-size: 100% 100%, 900px 900px; background-repeat: no-repeat, repeat; background-color: var(--cg-pale); }
.cg-lay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; max-width: 1300px; margin: 0 auto; }
.cg-route { position: relative; min-width: 0; padding: 40px clamp(14px, 4vw, 48px) 60px clamp(56px, 7vw, 96px); }
.cg-route::before { content: ""; position: absolute; left: clamp(26px, 3.4vw, 46px); top: 0; bottom: 0; border-left: 4px dashed var(--cg-red); }
.cg-stop { position: relative; margin-bottom: 56px; background: rgba(247, 245, 236, 0.94); border: 1px solid var(--cg-ink); padding: 18px clamp(14px, 3vw, 26px); scroll-margin-top: 96px; }
.cg-stop::before { content: attr(data-n); position: absolute; left: calc(-1 * clamp(56px, 7vw, 96px) + clamp(26px, 3.4vw, 46px) - 16px); top: 14px; width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--cg-red); color: transparent; }
.cg-pin { position: absolute; left: calc(-1 * clamp(56px, 7vw, 96px) + clamp(26px, 3.4vw, 46px) - 16px); top: 14px; width: 36px; height: 36px; display: grid; place-items: center; color: #fff; font: 700 14px var(--cg-sans); z-index: 1; }
.cg-ref { position: absolute; right: 10px; top: 8px; font: 500 12px var(--cg-sans); color: var(--cg-grey); letter-spacing: 0.06em; }
.cg-stop h2 { margin: 0 0 12px; font: 600 clamp(24px, 3vw, 34px)/1.15 var(--cg-serif); }
.cg-stop h2 small { display: block; font: 500 12px var(--cg-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cg-grey); }
.cg-stop h3.cg-h3 { margin: 22px 0 8px; font: 600 20px/1.2 var(--cg-serif); }
.cg-stop p { margin: 0 0 12px; }

/* legend */
.cg-legend { border-left: 2px solid var(--cg-ink); background: var(--cg-paper); }
.cg-legend-in { position: sticky; top: 96px; z-index: 1; padding: 22px 20px; }
.cg-legend h2 { margin: 0 0 10px; font: 600 13px var(--cg-sans); letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 2px solid var(--cg-ink); padding-bottom: 6px; }
.cg-key { margin: 0 0 18px; display: grid; grid-template-columns: 44px 1fr; gap: 8px 10px; align-items: center; font-size: 14px; }
.cg-key dt, .cg-key dd { margin: 0; }
.cg-sym { display: block; height: 18px; }
.cg-sym text { font-family: var(--cg-sans); }
.cg-stops { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cg-rec .cg-stops a { display: flex; gap: 10px; align-items: center; padding: 5px 0; text-decoration: none; color: var(--cg-ink); border-bottom: 1px dotted var(--cg-sand); }
.cg-rec .cg-stops a:hover { color: var(--cg-red); }
.cg-stops b { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--cg-red); color: #fff; display: grid; place-items: center; font-size: 12px; }
.cg-stops .cg-g { margin-left: auto; color: var(--cg-grey); font-size: 12px; }
.cg-scalebar { display: flex; margin-top: 16px; }
.cg-scalebar i { flex: 1; height: 8px; border: 1px solid var(--cg-ink); }
.cg-scalebar i:nth-child(odd) { background: var(--cg-ink); }
.cg-north { font: 600 13px var(--cg-sans); margin-top: 10px; display: flex; align-items: center; gap: 8px; }

/* stop: catalogue entry */
.cg-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--cg-sand); }
.cg-meta div { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--cg-sand); }
.cg-meta dt { font: 500 12px var(--cg-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cg-grey); }
.cg-meta dd { margin: 0; font-family: var(--cg-serif); font-size: 18px; }

/* stop: what carries the look */
.cg-tw { overflow-x: auto; }
.cg-ct { width: 100%; border-collapse: collapse; font-size: 15px; }
.cg-ct th, .cg-ct td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--cg-sand); vertical-align: top; }
.cg-ct th { width: 34%; }
.cg-rec .cg-ct th a { display: inline-block; padding: 3px 0; margin: -3px 0; font-weight: 700; color: var(--cg-ink); }
.cg-rec .cg-ct th a:hover { color: var(--cg-red); }
.cg-ct small { display: block; color: var(--cg-red); font-size: 12px; }
.cg-nl { color: var(--cg-grey); font-style: italic; }
.cg-after { margin-top: 10px !important; }
.cg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px !important; }
.cg-rec .cg-tags a { padding: 2px 8px; border: 1px solid var(--cg-ink); text-decoration: none; color: var(--cg-ink); font-size: 14px; }
.cg-rec .cg-tags a:hover { background: var(--cg-ink); color: var(--cg-paper); }
.cg-spec { display: block; font-family: var(--cg-serif); font-size: 22px; line-height: 1.2; margin-bottom: 4px; }
.cg-swatch { display: flex; flex-wrap: wrap; gap: 4px; }
.cg-swatch span { width: 74px; padding: 22px 5px 3px; font-size: 12px; border: 1px solid var(--cg-ink); }

/* stop: what it argues / how you recognise it */
.cg-claim { font-family: var(--cg-serif); font-size: 24px; line-height: 1.35; }
.cg-dx { border-left: 4px solid var(--cg-brown); padding-left: 14px; font-family: var(--cg-serif); font-size: 21px; line-height: 1.45; }
.cg-refuse { background: var(--cg-ink); color: var(--cg-paper); padding: 12px 14px; }
.cg-refuse b { color: var(--cg-gold); text-transform: uppercase; font-size: 13px; letter-spacing: 0.1em; }

/* stop: rules */
.cg-rules { list-style: none; margin: 0; padding: 0; }
.cg-rules li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cg-sand); }
.cg-ar { font: 700 13px var(--cg-sans); letter-spacing: 0.08em; text-transform: uppercase; }
.cg-k { display: inline-block; font-size: 12px; padding: 1px 6px; border: 1px solid var(--cg-grey); border-radius: 10px; margin-bottom: 4px; color: var(--cg-grey); }
.cg-k--p { border-color: var(--cg-brown); color: #7D5533; }
.cg-rules p { margin: 0 !important; }
.cg-rules small { display: block; color: var(--cg-grey); font-style: italic; margin-top: 3px; font-size: 14px; }

/* stop: what stands behind it */
.cg-firm { font-family: var(--cg-serif); font-style: italic; }
.cg-rt { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
.cg-rt th, .cg-rt td { padding: 6px 8px; border-bottom: 1px solid var(--cg-sand); text-align: left; }
.cg-rt thead th { border-bottom: 2px solid var(--cg-ink); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* stop: often confused with */
.cg-conf:last-of-type { margin-bottom: 0 !important; }
.cg-rec .cg-conf a { display: inline-block; padding: 2px 0; margin: -2px 0; }

/* stop: use it */
.cg-use { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cg-rec .cg-use a { display: block; padding: 14px; border: 2px solid var(--cg-red); text-decoration: none; color: var(--cg-ink); background: var(--cg-paper); }
.cg-rec .cg-use a b { display: block; font-family: var(--cg-serif); font-size: 20px; color: var(--cg-red); }
.cg-rec .cg-use a:hover { background: var(--cg-red); color: #fff; }
.cg-rec .cg-use a:hover b { color: #fff; }
.cg-mach { margin: 12px 0 0 !important; }

.cg-dest { text-align: center; padding: 10px 0 40px; margin: 0; }

/* The artifact stacked at 980px; here the shell's rail takes 260px of the
   viewport, so the two-column sheet only has room above 1180px. */
@media (max-width: 1180px) {
  /* minmax(0, 1fr), not 1fr: the research table is 480px wide and scrolls
     inside its wrapper; a plain 1fr column would grow to hold it instead. */
  .cg-lay { grid-template-columns: minmax(0, 1fr); }
  .cg-legend { order: -1; border-left: 0; border-bottom: 2px solid var(--cg-ink); }
  .cg-legend-in { position: static; }
  .cg-rules li { grid-template-columns: 1fr; gap: 2px; }
}
