/* ==========================================================================
   Hochrhein Bau
   Swiss-grid typography for a building association on the German/Swiss border.
   Native CSS, no framework. One accent, one radius (0), one theme per viewer.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-var.woff2') format('woff2');
  font-weight: 300 700;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geistmono-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper:      #edefee;
  --paper-2:    #e2e5e2;
  --ink:        #14181a;
  --ink-2:      #5b6367;
  /* Red oxide, the primer colour on structural steel. Deep enough that the
     small mono labels set in it clear 4.5:1 on paper, and white clears it. */
  --accent:     #b8402a;
  --accent-ink: #ffffff;
  --line:       rgb(20 24 26 / .17);
  --line-soft:  rgb(20 24 26 / .09);

  --f-sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* The vh term keeps the display line from crowding out the CTA on short
     laptop screens; the low floor lets "Gemeinsam bauen." hold one line on a
     phone. */
  --t-display: clamp(2.35rem, min(7.2vw, 10.5vh), 6.4rem);
  --t-h2:      clamp(1.85rem, 3.5vw, 3.15rem);
  --t-h3:      clamp(1.05rem, 1.2vw, 1.3rem);
  --t-lead:    clamp(1.1rem, 1.45vw, 1.4rem);
  --t-body:    1.0625rem;
  --t-label:   .6875rem;

  --wrap: 1440px;
  --gut:  clamp(20px, 4.6vw, 76px);
  --bar:  72px;
  --ease: cubic-bezier(.2, .7, .25, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #101314;
    --paper-2:    #191d1e;
    --ink:        #e7eae8;
    --ink-2:      #939b9e;
    --accent:     #e2643f;
    --accent-ink: #12100f;
    --line:       rgb(231 234 232 / .18);
    --line-soft:  rgb(231 234 232 / .09);
  }
}

/* --- base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  z-index: 100;
  top: 12px; left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: .875rem;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* --- shared type --------------------------------------------------------- */

.kicker {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.45;
  letter-spacing: -.011em;
  max-width: 46ch;
}

/* --- wordmark ------------------------------------------------------------ */
/* No logo image. The identity is the name plus a short accent rule that
   echoes the river line running through the page. */

.mark {
  display: inline-grid;
  gap: 6px;
  text-decoration: none;
  justify-items: start;
}
.mark-name {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -.012em;
  white-space: nowrap;
}
.mark-rule {
  width: 34px;
  height: 2px;
  background: var(--accent);
  transition: width .32s var(--ease);
}
.mark:hover .mark-rule { width: 100%; }

/* --- top bar ------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: var(--bar);
  padding: 0 var(--gut);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s linear;
}
.topbar.is-stuck { border-bottom-color: var(--line); }

.topnav {
  display: flex;
  gap: clamp(14px, 2.2vw, 34px);
  margin-inline-start: auto;
  font-size: .9375rem;
}
.topnav a {
  position: relative;
  padding: 4px 0;
  text-decoration: none;
  white-space: nowrap;
}
.topnav a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .24s var(--ease);
}
.topnav a:hover::after,
.topnav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .18s linear, color .18s linear,
              border-color .18s linear, transform .12s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

.btn-sm { min-height: 38px; padding: 0 16px; font-size: .875rem; }

.btn-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(18px, 2.4vh, 30px);
  min-height: min(76vh, 700px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(48px, 7vh, 88px) var(--gut) clamp(40px, 6vh, 72px);
}

.hero h1 {
  font-size: var(--t-display);
  font-variation-settings: 'wdth' 106;
  line-height: .95;
  letter-spacing: -.035em;
}
.hero .lead { color: var(--ink-2); }
.hero .btn { margin-top: clamp(6px, 1.4vh, 16px); }

/* --- map band ------------------------------------------------------------ */
/* The drawing is generated from real WGS84 coordinates (see src/make_map.py),
   so this is the actual river, border and town geography, not an ornament. */

.mapband {
  margin: 0;
  padding: clamp(30px, 5vw, 64px) var(--gut) clamp(20px, 2.6vw, 32px);
  background: var(--paper-2);
  border-block: 1px solid var(--line-soft);
  overflow: hidden;
}
.mapband .map {
  width: 100%;
  height: auto;
  max-width: calc(var(--wrap) - 2 * var(--gut));
  margin-inline: auto;
}
.mapband figcaption {
  max-width: calc(var(--wrap) - 2 * var(--gut));
  margin: clamp(8px, 1.4vw, 18px) auto 0;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.map-grid line { stroke: var(--ink); stroke-width: .5; opacity: .1; }
.map-border {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-dasharray: 7 5;
  opacity: .42;
}
.map-trib path { fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: .22; }
.map-water { fill: none; stroke: var(--ink); stroke-width: 2.2; opacity: .22; }
.map-rhein {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-survey line,
.map-survey circle { stroke: var(--accent); stroke-width: 1.3; fill: none; }
.map-town circle { fill: var(--ink); }
.map-town.is-key circle { fill: var(--accent); }
.map-town text {
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  fill: var(--ink);
}
.map-town.is-key text {
  font-size: 16px;
  font-weight: 600;
  font-variation-settings: 'wdth' 104;
}
.map-region text {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  fill: var(--ink-2);
  opacity: .8;
}

/* --- section shell ------------------------------------------------------- */

.band {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(64px, 9vw, 132px) var(--gut);
}

.band-head h2 {
  font-size: var(--t-h2);
  font-variation-settings: 'wdth' 103;
  line-height: 1.04;
  letter-spacing: -.026em;
  max-width: 18ch;
}
.band-head .lead {
  margin-top: clamp(18px, 2vw, 28px);
  color: var(--ink-2);
}
/* The line break in this heading is authored in the markup, so the ch cap that
   shapes the running headings would only fight it. */
.band-head-split { display: grid; gap: 14px; }
.band-head-split h2 { max-width: none; }

/* --- principles ---------------------------------------------------------- */

.principles {
  list-style: none;
  margin: clamp(44px, 6vw, 84px) 0 0;
  padding: 0;
}
.principles li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 12rem) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: start;
  padding: clamp(24px, 3vw, 40px) 0;
  border-top: 1px solid var(--line);
}
.principles li:last-child { border-bottom: 1px solid var(--line); }

.principles-idx {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--accent);
  padding-top: .55em;
}
.principles h3 {
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-variation-settings: 'wdth' 104;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.principles p { color: var(--ink-2); max-width: 48ch; }

/* --- statement band ------------------------------------------------------ */

.statement {
  position: relative;
  display: grid;
  isolation: isolate;
  min-height: min(76vh, 680px);
  padding: var(--gut);
  align-content: end;
  color: #f2f3f2;
}
.statement > picture,
.statement img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
/* Two scrims: one lifts the copy off the bottom of the frame, one keeps the
   left column dark enough for the label whatever the photo is doing there. */
.statement::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      rgb(8 10 11 / .84) 0%, rgb(8 10 11 / .6) 42%, rgb(8 10 11 / .22) 100%),
    linear-gradient(to right,
      rgb(8 10 11 / .5) 0%, rgb(8 10 11 / .12) 55%, transparent 78%);
}
.statement-copy { max-width: var(--wrap); margin-inline: auto; width: 100%; }
.statement h2 {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #cfd3d2;
}
.statement p {
  margin-top: clamp(14px, 1.8vw, 24px);
  max-width: 24ch;
  font-size: var(--t-h2);
  font-variation-settings: 'wdth' 103;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.026em;
}

/* --- Kompetenzen grid ---------------------------------------------------- */
/* Six items, six cells, three row rhythms. Two cells carry a fill so the
   block does not read as six identical white boxes. */

.grid-komp {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  margin-top: clamp(44px, 6vw, 84px);
  background: var(--line);
  border: 1px solid var(--line);
}
.komp {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1vw, 14px);
  min-height: 11.5rem;
  padding: clamp(20px, 2.1vw, 30px);
  background: var(--paper);
  transition: background-color .2s linear, color .2s linear;
}
.komp h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.komp p { color: var(--ink-2); font-size: .9375rem; line-height: 1.5; max-width: 42ch; }

.komp-a { grid-column: span 5; }
.komp-b { grid-column: span 4; }
.komp-c { grid-column: span 3; }
.komp-d { grid-column: span 4; }
.komp-e { grid-column: span 3; }
.komp-f { grid-column: span 5; }

/* Body copy on the two filled tiles stays at full strength; dimming it drops
   the accent tile under the 4.5:1 contrast floor. */
.komp.is-accent { background: var(--accent); color: var(--accent-ink); }
.komp.is-accent p { color: var(--accent-ink); }
.komp.is-ink { background: var(--ink); color: var(--paper); }
.komp.is-ink p { color: color-mix(in srgb, var(--paper) 84%, transparent); }

.komp:not(.is-accent):not(.is-ink):hover { background: var(--paper-2); }

/* --- region split -------------------------------------------------------- */

.region {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(28px, 4.4vw, 76px);
  align-items: center;
}
.region-figure { margin: 0; }
.region-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.region-figure figcaption {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.region-copy h2 {
  font-size: var(--t-h2);
  font-variation-settings: 'wdth' 103;
  line-height: 1.04;
  letter-spacing: -.026em;
}
.region-copy p {
  margin-top: clamp(16px, 1.8vw, 24px);
  max-width: 52ch;
  color: var(--ink-2);
}

.coords {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 48px);
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line);
}
.coords dt {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.coords dd {
  margin: 6px 0 0;
  font-family: var(--f-mono);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
}

/* --- closing ------------------------------------------------------------- */

.closing {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(72px, 10vw, 152px) var(--gut);
  border-top: 1px solid var(--line);
}
.closing h2 {
  font-size: var(--t-h2);
  font-variation-settings: 'wdth' 104;
  line-height: 1.04;
  letter-spacing: -.028em;
  max-width: 20ch;
}
.closing p {
  margin-top: clamp(18px, 2vw, 28px);
  max-width: 52ch;
  font-size: var(--t-lead);
  line-height: 1.45;
  color: var(--ink-2);
}
.mailto {
  display: inline-block;
  margin-top: clamp(32px, 4vw, 56px);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  font-weight: 500;
  font-variation-settings: 'wdth' 102;
  letter-spacing: -.02em;
  text-decoration: none;
  transition: color .18s linear;
}
.mailto:hover { color: var(--accent); }

/* --- footer -------------------------------------------------------------- */

.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 4vw, 64px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 64px) var(--gut) clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.foot-brand { display: grid; gap: 6px; justify-items: start; }
.foot-brand p { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }

.foot-nav { display: grid; gap: 10px; justify-items: end; font-size: .9375rem; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }

.foot-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line-soft);
  font-size: .8125rem;
  color: var(--ink-2);
}
.credits { max-width: 62ch; }
.foot-legal a { text-decoration: underline; text-underline-offset: 3px; }
.foot-legal a:hover { color: var(--accent); }

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
  align-items: center;
}
/* Standalone links, so they get a real target rather than the height of the
   text alone. */
.foot-meta a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.foot-meta span { display: inline-flex; align-items: center; min-height: 24px; }

/* --- legal pages --------------------------------------------------------- */

.legal {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(48px, 7vw, 96px) var(--gut) clamp(64px, 8vw, 120px);
}
.legal-doc { max-width: 74ch; }

.legal-head { margin-bottom: clamp(40px, 5vw, 72px); }
.legal-head h1 {
  margin: 14px 0 0;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-variation-settings: 'wdth' 104;
  line-height: 1.02;
  letter-spacing: -.03em;
  hyphens: auto;
}
.legal-head .lead { margin-top: clamp(18px, 2vw, 26px); color: var(--ink-2); }

.legal-doc section {
  padding-top: clamp(26px, 3vw, 40px);
  margin-top: clamp(26px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.legal-doc section:first-of-type { margin-top: 0; }

.legal-doc h2 {
  margin-bottom: clamp(14px, 1.6vw, 20px);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 600;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -.015em;
  line-height: 1.25;
}
.legal-doc p { margin-bottom: 1em; max-width: 68ch; }
.legal-doc p:last-child { margin-bottom: 0; }
.legal-doc a { text-underline-offset: 3px; }
.legal-doc a:hover { color: var(--accent); }

.legal-address {
  font-style: normal;
  line-height: 1.75;
}

.legal-list {
  margin: 0 0 1em;
  padding-left: 1.15em;
  max-width: 68ch;
}
.legal-list li { margin-bottom: .4em; }
.legal-list li::marker { color: var(--accent); }

.legal-dl { margin: 0 0 1em; display: grid; gap: clamp(14px, 1.6vw, 20px); }
.legal-dl > div {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 4px clamp(18px, 2.4vw, 36px);
}
.legal-dl dt {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: .35em;
}
.legal-dl dd { margin: 0; }

.legal-stand {
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

@media (max-width: 720px) {
  .legal-dl > div { grid-template-columns: 1fr; }
  .legal-dl dt { padding-top: 0; }
}

/* --- reveal -------------------------------------------------------------- */
/* Driven by IntersectionObserver in site.js. Sections settle in once; it marks
   the boundary between blocks while reading, nothing more.
   Everything here is gated behind .js so that a failed or blocked script
   leaves the page fully readable rather than blank. */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* River draw-in: the region gets drawn the way a plan is drawn. */
.js .mapband .map-rhein {
  stroke-dasharray: var(--len, 2600);
  stroke-dashoffset: var(--len, 2600);
}
.js .mapband.is-in .map-rhein {
  transition: stroke-dashoffset 2.1s var(--ease);
  stroke-dashoffset: 0;
}
.js .mapband .map-towns,
.js .mapband .map-survey,
.js .mapband .map-region { opacity: 0; transition: opacity .7s linear .95s; }
.js .mapband.is-in .map-towns,
.js .mapband.is-in .map-survey,
.js .mapband.is-in .map-region { opacity: 1; }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1080px) {
  .komp-a, .komp-b, .komp-c, .komp-d, .komp-e, .komp-f { grid-column: span 6; }
  .komp { min-height: 13.5rem; }
}

@media (max-width: 900px) {
  :root { --bar: 64px; }

  .region { grid-template-columns: 1fr; align-items: start; }
  .region-copy h2 { max-width: 16ch; }

  .principles li {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 10px 20px;
  }
  .principles-idx { grid-row: span 2; padding-top: .35em; }

  .site-foot { grid-template-columns: 1fr; }
  .foot-nav { justify-items: start; }

  /* Secondary town labels stop being legible once the drawing is this small,
     so the map falls back to the three places the association names. */
  .map-town:not(.is-key) text,
  .map-region text { display: none; }
  .map-town.is-key text { font-size: 30px; }
  .map-town.is-key circle { r: 8; }
  .map-rhein { stroke-width: 6; }
  .map-border { stroke-width: 2.4; stroke-dasharray: 12 9; }
  .map-water { stroke-width: 4; }
  .map-trib path { stroke-width: 2.6; }
  .map-survey line, .map-survey circle { stroke-width: 2.4; }
  .map-grid line { stroke-width: 1; }
}

@media (max-width: 700px) {
  .komp-a, .komp-b, .komp-c, .komp-d, .komp-e, .komp-f { grid-column: span 12; }
  .komp { min-height: 0; }
  .komp p { margin-top: 4px; }

  /* Phones want the headline near the top, not optically centred in a tall
     empty column. */
  .hero {
    min-height: 0;
    align-content: start;
    padding-block: clamp(48px, 9vh, 80px) clamp(56px, 10vh, 96px);
  }
  .hero .btn { width: 100%; }

  .statement { min-height: min(70vh, 560px); }
  .statement p { max-width: 18ch; }

  .foot-legal { flex-direction: column; }
}

@media (max-width: 560px) {
  /* The wordmark, three section links and the contact button cannot share one
     line at phone widths. Rather than dropping the links, the bar takes a
     second row so every destination stays reachable. */
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'mark action' 'nav nav';
    align-items: center;
    row-gap: 8px;
    min-height: 0;
    padding-block: 10px;
  }
  .mark { grid-area: mark; }
  .topbar > .btn-sm { grid-area: action; }
  .topnav {
    grid-area: nav;
    margin-inline-start: 0;
    gap: 20px;
    font-size: .8125rem;
  }
  .mark-name { font-size: 1rem; }
  .map-town.is-key text { font-size: 38px; }
}

/* --- motion / contrast preferences --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .mapband .map-rhein { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .mapband .map-towns,
  .js .mapband .map-survey,
  .js .mapband .map-region { opacity: 1; }
}

@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --line: currentColor; }
}

@media print {
  .topbar, .skip { display: none; }
  body { background: #fff; color: #000; }
}
