/* ==========================================================================
   Mountain Lion Analytica — the Landeskarte sheet
   One stylesheet for the whole site. Tokens first, then the sheet frame,
   then each region of the map in reading order.
   ========================================================================== */

:root {
  /* pinned brand colours */
  --navy: #00192f;
  --gold: #bb9752;
  --pale: #f9e6aa;

  /* sheet materials derived from them */
  --sheet: #fbfbf8;
  --sheet-2: #f3f1e9;
  --ink: var(--navy);
  --ink-2: #3f5064;             /* secondary on sheet, tinted from navy */
  --gold-deep: #7d5e2a;         /* gold that passes as text on the sheet */
  --line: rgba(0, 25, 47, 0.18);
  --line-strong: rgba(0, 25, 47, 0.55);
  --contour: var(--gold);

  /* on navy */
  --on-navy: var(--pale);
  --on-navy-2: #c9bb92;
  --line-navy: rgba(249, 230, 170, 0.22);
  --line-navy-strong: rgba(249, 230, 170, 0.5);

  /* ground-aware roles: flipped inside .on-navy */
  --ground: var(--sheet);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --accent-text: var(--gold-deep);

  /* type */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wdth-narrow: 72;
  --wdth-text: 100;
  --wdth-wide: 115;

  /* rhythm */
  --frame: 14px;
  --gutter: clamp(20px, 5vw, 80px);
  --measure: 66ch;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 480ms;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Reset and browser surfaces
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--sheet-2);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: "wdth" var(--wdth-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--pale); color: var(--navy); }
.on-navy ::selection, .on-navy::selection { background: var(--gold); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.1; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* label voice: condensed caps like the printed margin of a sheet */
.label {
  font-variation-settings: "wdth" var(--wdth-narrow);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.on-navy .label { color: var(--on-navy-2); }

/* section titles: wide, heavy, sheet-title voice */
.title {
  font-variation-settings: "wdth" var(--wdth-wide);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  letter-spacing: -0.02em;
}

/* text links with an arrow drawn, not typed */
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.15em;
  transition: border-color 200ms var(--ease-out), gap 200ms var(--ease-out);
}
.arrow-link svg { width: 1em; height: 1em; flex: none; }
.arrow-link:hover { border-color: currentColor; gap: 0.7em; }

/* --------------------------------------------------------------------------
   Sheet frame: a fixed border with coordinate margins, the page scrolls
   beneath it like a map under its own edge.
   -------------------------------------------------------------------------- */

.frame {
  position: fixed; inset: var(--frame); pointer-events: none; z-index: 60;
  border: 1px solid var(--line-strong);
  outline: 1px solid var(--line);
  outline-offset: 4px;
  /* the paper margin is opaque at every scroll position: a spread shadow fills the strip outside the frame line */
  box-shadow: 0 0 0 var(--frame) var(--sheet);
}
.frame::before, .frame::after {
  content: ""; position: absolute; pointer-events: none;
}
/* ticks on the top edge */
.frame::before {
  left: 0; right: 0; top: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 64px);
}
/* ticks on the left edge */
.frame::after {
  top: 0; bottom: 0; left: 0; width: 6px;
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 1px, transparent 1px 64px);
}
.frame .tick-b, .frame .tick-r { position: absolute; pointer-events: none; }
.frame .tick-b {
  left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 64px);
}
.frame .tick-r {
  top: 0; bottom: 0; right: 0; width: 6px;
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 1px, transparent 1px 64px);
}
.frame span {
  /* figures live inside the paper margin, never on the content */
  position: absolute; font-size: 0.64rem; letter-spacing: 0.08em; line-height: 1;
  font-variation-settings: "wdth" var(--wdth-narrow); color: var(--ink-2); white-space: nowrap;
}
.frame .e1 { top: calc(-1 * var(--frame) + 2px); left: 18%; }
.frame .e2 { top: calc(-1 * var(--frame) + 2px); left: 50%; transform: translateX(-50%); }
.frame .e3 { top: calc(-1 * var(--frame) + 2px); right: 18%; }
.frame .e1.b, .frame .e2.b, .frame .e3.b { top: auto; bottom: calc(-1 * var(--frame) + 2px); }
.frame .n1, .frame .n2, .frame .n3 { writing-mode: vertical-rl; transform: rotate(180deg); left: calc(-1 * var(--frame) + 2px); }
.frame .n1 { top: 22%; } .frame .n2 { top: 55%; } .frame .n3 { top: 88%; }
.frame .n1.r, .frame .n2.r, .frame .n3.r { left: auto; right: calc(-1 * var(--frame) + 2px); transform: none; }
.frame .readout {
  right: 10px; bottom: calc(-1 * var(--frame) + 2px); font-size: 0.66rem; font-variation-settings: "wdth" 88; color: var(--ink);
}
.frame .readout b { font-weight: 700; color: var(--gold-deep); }

/* sheet index: bottom-left of the frame, home page only */
.sheet-index {
  position: fixed; left: calc(var(--frame) + 14px); bottom: calc(var(--frame) + 14px); z-index: 61;
  display: grid; gap: 0.15rem; padding: 0.4rem 0;
  /* the fixed block itself blends, so the difference is taken against the page, not an isolated group */
  mix-blend-mode: difference;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.sheet-index.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.sheet-index a {
  position: relative; display: block; padding: 0.15rem 0 0.15rem 1.1rem; text-decoration: none;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  font-variation-settings: "wdth" var(--wdth-narrow); color: #fff;
}
.sheet-index a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 1px; background: currentColor; margin-top: -0.5px;
  transition: width 220ms var(--ease-out);
}
.sheet-index a[aria-current="true"] { font-weight: 700; }
.sheet-index a[aria-current="true"]::before { width: 12px; height: 2px; margin-top: -1px; }
@media (max-width: 980px) { .sheet-index { display: none; } }

@media (max-width: 720px) {
  :root { --frame: 8px; }
  .frame { outline: none; }
  .frame span:not(.readout), .frame .tick-b, .frame .tick-r { display: none; }
  .frame .readout { font-size: 0.62rem; }
}
@media print { .frame { display: none; } }

/* --------------------------------------------------------------------------
   Header: the sheet's title strip
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky; top: var(--frame); z-index: 50;
  background: var(--navy);
  color: var(--pale);
  border-bottom: 1px solid var(--line-navy);
  margin: 0 var(--frame);
  --ground: var(--navy); --fg: var(--pale); --fg-2: var(--on-navy-2); --rule: var(--line-navy); --rule-strong: var(--line-navy-strong);
}
.masthead::before {
  /* the sheet margin above the header stays paper while content scrolls under it */
  content: ""; position: absolute; left: 0; right: 0; top: calc(-1 * var(--frame)); height: var(--frame);
  background: var(--sheet);
}
.masthead-inner {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0.65rem var(--gutter);
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  text-decoration: none; margin-right: auto;
}
.brand-mark { display: grid; place-items: center; width: 40px; height: 44px; flex: none; }
.brand-mark img { width: 38px; height: 40px; }
.brand-name {
  font-variation-settings: "wdth" var(--wdth-wide);
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em; line-height: 1.05;
}
.brand-tag {
  display: block; font-weight: 400; font-size: 0.72rem; color: var(--fg-2);
  font-variation-settings: "wdth" var(--wdth-narrow); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.2rem;
}
.nav { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav a {
  display: inline-block; padding: 0.55rem 0.75rem; text-decoration: none;
  font-weight: 500; font-size: 0.95rem; position: relative;
  transition: color 160ms var(--ease-out);
}
.nav a::after {
  content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.3rem; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav .lang a {
  margin-left: 0.5rem; padding: 0.35rem 0.6rem; border: 1px solid var(--rule-strong);
  font-variation-settings: "wdth" var(--wdth-narrow); font-size: 0.8rem; letter-spacing: 0.1em;
}
.nav .lang a::after { display: none; }
.nav .lang a:hover { background: var(--pale); color: var(--navy); border-color: var(--pale); }

.menu-btn {
  display: none; align-items: center; gap: 0.5rem; background: none; border: 1px solid var(--rule-strong);
  padding: 0.45rem 0.7rem; font: inherit; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-variation-settings: "wdth" var(--wdth-narrow); color: var(--fg); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
.menu-btn .close-icon { display: none; }
.menu-btn[aria-expanded="true"] .open-icon { display: none; }
.menu-btn[aria-expanded="true"] .close-icon { display: block; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: 0; z-index: 40;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 0;
    padding: 0 var(--gutter);
    background: var(--navy); color: var(--pale);
    transform: translateY(-6px); opacity: 0; visibility: hidden;
    transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s 240ms;
  }
  .nav::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("/static/imgs/contours.svg") center / cover no-repeat; opacity: 0.22;
    filter: brightness(1.6);
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav li { position: relative; width: 100%; border-bottom: 1px solid var(--line-navy); }
  .nav a { display: block; padding: 1rem 0; font-size: 1.6rem; font-weight: 600; font-variation-settings: "wdth" var(--wdth-wide); }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--pale); padding-left: 1.1rem; }
  .nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: var(--gold); transform: rotate(45deg); }
  .nav .lang { border: 0; margin-top: var(--space-3); }
  .nav .lang a { margin: 0; display: inline-block; font-size: 0.9rem; border-color: var(--on-navy-2); color: var(--pale); padding: 0.5rem 0.9rem; }
  .nav .lang a:hover { background: var(--pale); color: var(--navy); }
  body.menu-open { overflow: hidden; }
  .masthead { z-index: 50; }
  .menu-btn { position: relative; z-index: 51; }
  body.menu-open .masthead { background: transparent; border-color: transparent; }
  body.menu-open .brand { position: relative; z-index: 51; }
}

@media (max-width: 720px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 0.95rem; }
}

/* --------------------------------------------------------------------------
   Page container
   -------------------------------------------------------------------------- */

main { flex: 1; margin: 0 var(--frame); }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1400px; margin-inline: auto; }

.on-navy {
  background: var(--navy); color: var(--on-navy);
  --ground: var(--navy); --fg: var(--pale); --fg-2: var(--on-navy-2);
  --rule: var(--line-navy); --rule-strong: var(--line-navy-strong); --accent-text: var(--gold);
}

/* contour field used behind regions */
.field { position: relative; isolation: isolate; overflow: hidden; }
.field > .contours {
  position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  width: calc(100% + 4px); height: calc(100% + 4px); object-fit: cover; object-position: center;
  opacity: 0.55;
}
.on-navy .contours { filter: brightness(1.55) saturate(0.9); opacity: 0.28; }

/* map-label halo: text that sits on contours gets a pale halo, like printed labels */
.halo, .halo * { text-shadow: 0 0 10px var(--ground), 0 0 18px var(--ground), 0 0 2px var(--ground); }

/* the map draws itself once */
@keyframes plot {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to   { -webkit-mask-position: 0% 0;   mask-position: 0% 0; }
}
.contours.plot { opacity: 0.55; }
.contours.plot {
  -webkit-mask-image: linear-gradient(100deg, #000 45%, transparent 60%);
  mask-image: linear-gradient(100deg, #000 45%, transparent 60%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: plot 2600ms var(--ease-out) both;
}

/* --------------------------------------------------------------------------
   Cover: the sheet title
   -------------------------------------------------------------------------- */

.cover { min-height: min(86vh, 900px); display: grid; align-content: center; }
.cover .wrap {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-4);
  align-items: center; padding-top: var(--space-5); padding-bottom: var(--space-6);
  width: 100%;
}
.cover-text { max-width: 760px; position: relative; }
.cover-text::before {
  content: ""; position: absolute; inset: -6% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 40% 50%, var(--ground) 45%, color-mix(in srgb, var(--ground) 60%, transparent) 65%, transparent 80%);
}
.cover h1 {
  font-size: clamp(1.8rem, 0.9rem + 2.15vw, 3.1rem);
  font-weight: 700; line-height: 1.06; letter-spacing: -0.025em;
  font-variation-settings: "wdth" var(--wdth-wide);
  text-wrap: pretty;
}
.cover .motto {
  margin-top: var(--space-3); font-size: clamp(0.85rem, 0.8rem + 0.3vw, 1rem);
  color: var(--fg-2); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  font-variation-settings: "wdth" var(--wdth-narrow);
}

.coords { margin-top: var(--space-4); border-top: 1px solid var(--rule-strong); padding-top: var(--space-2); }
.coords dl { display: grid; grid-template-columns: max-content 1fr; column-gap: var(--space-3); row-gap: 0.6rem; margin: 0; align-items: baseline; }
.coords dt { align-self: baseline; padding-top: 0.15em; }
.coords dd { margin: 0; }
.coords dd a {
  font-size: clamp(1.1rem, 0.9rem + 1.1vw, 1.55rem); font-weight: 600; text-decoration: none;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%;
  transition: background-size 220ms var(--ease-out);
}
.coords dd a:hover { background-size: 100% 2px; }
.coords .secondary { margin-top: var(--space-3); font-size: 0.95rem; }

.emblem { position: relative; justify-self: end; width: min(100%, 400px); margin: 0; }
.emblem::before {
  content: ""; position: absolute; inset: -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, var(--ground) 40%, color-mix(in srgb, var(--ground) 60%, transparent) 62%, transparent 78%);
}
.emblem-tile { position: relative; padding: 9%; }
.emblem-tile::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--pale); opacity: 0.5; pointer-events: none; }
.emblem-tile img { position: relative; width: 100%; }
.emblem .caption {
  position: absolute; left: 0; bottom: -1.7rem; white-space: nowrap;
  font-size: 0.72rem; color: var(--fg-2); letter-spacing: 0.1em; text-transform: uppercase;
  font-variation-settings: "wdth" var(--wdth-narrow);
}

.scalebar {
  grid-column: 1; align-self: start;
  display: flex; align-items: center; gap: 0.75rem; margin-top: calc(-1 * var(--space-2));
  color: var(--fg-2); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-variation-settings: "wdth" var(--wdth-narrow);
}
.scalebar svg { width: 160px; height: 10px; flex: none; }

@media (max-width: 980px) {
  .cover .wrap { grid-template-columns: 1fr; }
  .emblem { justify-self: center; width: min(60%, 300px); order: 1; margin-top: var(--space-2); margin-bottom: 1.8rem; }
  .emblem .caption { left: 50%; transform: translateX(-50%); }
  .scalebar { order: 2; margin-top: var(--space-2); }
}
@media (max-width: 720px) {
  .scalebar { display: none; }
  .emblem { margin-bottom: 0.4rem; }
  .cover-text { max-width: 640px; }
}
@media (max-width: 720px) {
  .cover { min-height: 0; }
  .cover .wrap { padding-top: var(--space-4); padding-bottom: var(--space-5); }
  .emblem { width: min(52%, 220px); }
  .coords dl { grid-template-columns: 1fr; row-gap: 0.25rem; }
  .coords dt { margin-top: 0.8rem; }
  .coords dt:first-child { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Legend: the three services
   -------------------------------------------------------------------------- */

.legend { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.legend > .contours { opacity: 0.3; }
.legend .wrap { display: grid; gap: var(--space-4); }
.legend-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); border-bottom: 1px solid var(--rule-strong); padding-bottom: var(--space-2); }
.legend-head .title { color: var(--fg); }

.legend-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; }
.legend-entry { padding: 0 var(--space-4) 0 0; margin-right: var(--space-4); border-right: 1px solid var(--rule); display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-2); }
.legend-entry:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.legend-symbol { width: 56px; height: 56px; color: var(--accent-text); }
.legend-entry h3 { font-size: 1.35rem; color: var(--fg); font-variation-settings: "wdth" var(--wdth-wide); }
.legend-entry ul { list-style: none; display: grid; gap: 0; }
.legend-entry li { padding: 0.65rem 0; border-top: 1px solid var(--rule); color: var(--fg); font-size: 0.98rem; line-height: 1.45; display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.6rem; }
.legend-entry li::before { content: ""; width: 7px; height: 7px; margin-top: 0.5em; background: var(--gold); transform: rotate(45deg); }
.legend-entry .arrow-link { color: var(--fg); border-color: var(--gold); justify-self: start; margin-top: var(--space-2); }

@media (max-width: 860px) {
  .legend-list { grid-template-columns: 1fr; gap: var(--space-4); }
  .legend-entry { border-right: 0; margin-right: 0; padding-right: 0; border-top: 1px solid var(--rule); padding-top: var(--space-3); }
  .legend-entry:first-child { border-top: 0; padding-top: 0; }
}

/* --------------------------------------------------------------------------
   Survey points: references
   -------------------------------------------------------------------------- */

.points { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); border-bottom: 1px solid var(--line-strong); padding-bottom: var(--space-2); margin-bottom: var(--space-4); flex-wrap: wrap; }

.points-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); list-style: none; border-top: 1px solid var(--rule-strong); }
.point { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.point-mark { width: 24px; height: 24px; color: var(--accent-text); }
.point-text { display: grid; gap: 0.1rem; min-width: 0; }
.point-text b { font-weight: 600; font-size: 1.02rem; }
.point-text span { font-size: 0.88rem; color: var(--fg-2); }
.point img { max-height: 26px; max-width: 92px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.75; justify-self: end; }
@media (max-width: 860px) { .points-list { grid-template-columns: 1fr; } .point img { max-height: 22px; max-width: 72px; } }
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border: 1px solid var(--line); background: var(--line); gap: 1px; }
.logo-grid li { background: var(--sheet); aspect-ratio: 5 / 3; display: grid; place-items: center; position: relative; padding: 1.5rem; }
.logo-grid li::before {
  /* a survey cross in the corner of each cell */
  content: ""; position: absolute; top: 8px; left: 8px; width: 9px; height: 9px;
  background:
    linear-gradient(var(--gold), var(--gold)) center / 1px 100% no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / 100% 1px no-repeat;
}
.logo-grid img { max-height: 54px; max-width: 78%; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: 0.82; transition: filter 240ms var(--ease-out), opacity 240ms var(--ease-out); }
.logo-grid li:hover img { filter: none; opacity: 1; }
@media (max-width: 860px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } .logo-grid li { padding: 1.1rem; } }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.quote { display: grid; gap: var(--space-2); }
.quote blockquote { margin: 0; font-size: 1.15rem; line-height: 1.45; font-style: italic; text-wrap: pretty; }
.quote blockquote::before { content: ""; display: block; width: 44px; height: 2px; background: var(--gold); margin-bottom: var(--space-2); }
.quote figcaption { font-size: 0.9rem; color: var(--ink-2); }
.quote figcaption b { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   Map author
   -------------------------------------------------------------------------- */

.author { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.author .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); align-items: center; }
.plate { position: relative; }
.plate img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.plate::after { content: ""; position: absolute; inset: 10px; border: 1px solid var(--pale); opacity: 0.6; pointer-events: none; }
.plate figcaption { margin-top: 0.7rem; font-size: 0.78rem; color: var(--on-navy-2); letter-spacing: 0.1em; text-transform: uppercase; font-variation-settings: "wdth" var(--wdth-narrow); }
.author-text { display: grid; gap: var(--space-3); }
.author-text h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.8rem); color: var(--pale); font-variation-settings: "wdth" var(--wdth-wide); }
.author-text .role { font-size: 1.05rem; color: var(--on-navy-2); }
.author-text .links { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.author-text .arrow-link { color: var(--pale); }
@media (max-width: 860px) {
  .author .wrap { grid-template-columns: 1fr; gap: var(--space-4); }
  .plate { max-width: 360px; }
}

/* --------------------------------------------------------------------------
   Posts (home strip and blog index)
   -------------------------------------------------------------------------- */

.posts { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-4); list-style: none; }
.post { display: grid; grid-template-rows: auto auto 1fr auto; gap: 0.7rem; border-top: 1px solid var(--line-strong); padding-top: var(--space-2); }
.post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sheet-2); }
.post h2, .post h3 { font-size: 1.2rem; line-height: 1.25; }
.post h2 a, .post h3 a { text-decoration: none; }
.post h2 a:hover, .post h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.post p { color: var(--ink-2); font-size: 0.95rem; text-wrap: pretty; }
.post .arrow-link { justify-self: start; font-size: 0.9rem; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Closing call and footer imprint
   -------------------------------------------------------------------------- */

.close { padding-top: var(--space-6); padding-bottom: var(--space-6); border-top: 1px solid var(--line-strong); }
.close .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-4); align-items: end; }
.close h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3.2rem); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.025em; }
.close p { margin-top: var(--space-2); font-size: 1.1rem; color: var(--ink-2); max-width: 40ch; }
.close .coords { margin-top: 0; }
@media (max-width: 860px) { .close .wrap { grid-template-columns: 1fr; } }

.imprint { margin: 0 var(--frame); padding: var(--space-4) 0 calc(var(--space-5) + var(--frame)); }
.imprint .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; }
.imprint img { width: 44px; }
.imprint .brand-mark { background: transparent; }
.imprint p { font-size: 0.9rem; color: var(--on-navy-2); }
.imprint .imprint-contact { display: grid; gap: 0.3rem; justify-items: end; text-align: right; }
.imprint .imprint-contact a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.imprint .imprint-contact a svg { width: 16px; height: 16px; color: var(--gold); }
.imprint .imprint-contact a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
@media (max-width: 720px) {
  .imprint .wrap { grid-template-columns: auto 1fr; }
  .imprint .imprint-contact { grid-column: 1 / -1; justify-items: start; text-align: left; }
}

/* --------------------------------------------------------------------------
   Inner pages: shared page head
   -------------------------------------------------------------------------- */

.page-head { padding-top: var(--space-5); padding-bottom: var(--space-4); }
.page-head .wrap { border-bottom: 1px solid var(--line-strong); padding-bottom: var(--space-3); display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.025em; }
.page-body { padding-bottom: var(--space-6); }

/* --------------------------------------------------------------------------
   Article (rendered Markdown)
   -------------------------------------------------------------------------- */

.article { padding-top: var(--space-5); padding-bottom: var(--space-6); }
.article .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.article .content > * + * { margin-top: 1.1em; }
.article h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.025em; margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line-strong); }
.article h2 { font-size: 1.55rem; margin-top: 2.2em; font-variation-settings: "wdth" var(--wdth-wide); }
.article h3 { font-size: 1.2rem; margin-top: 1.8em; }
.article h4 { font-size: 1.05rem; margin-top: 1.5em; }
.article p, .article li { font-size: 1.0625rem; line-height: 1.65; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: 0.35em; }
.article a { text-decoration: underline; }
.article img { margin: 1.8em auto; max-width: min(100%, 560px); border: 1px solid var(--line); background: var(--sheet-2); }
.article blockquote { margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 1px solid var(--gold); font-style: italic; color: var(--ink-2); }
.article code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; background: var(--sheet-2); padding: 0.1em 0.35em; border: 1px solid var(--line); }
.article pre { background: var(--navy); color: var(--pale); padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.5; }
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.article table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.article th, .article td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { border-bottom-color: var(--line-strong); font-weight: 600; }
.article hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2.5em 0; }
.article strong { font-weight: 600; }

/* --------------------------------------------------------------------------
   References page
   -------------------------------------------------------------------------- */

.ref-list { list-style: none; border-top: 1px solid var(--line-strong); }
.ref { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); align-items: start; }
.ref-logo { display: grid; place-items: start; padding-top: 0.2rem; }
.ref-logo img { max-height: 64px; max-width: 170px; width: auto; object-fit: contain; }
.ref h3 { font-size: 1.3rem; }
.ref .who { margin-top: 0.4rem; color: var(--ink-2); font-size: 0.98rem; }
.ref blockquote { margin: var(--space-2) 0 0; font-style: italic; font-size: 1.08rem; line-height: 1.5; max-width: 62ch; text-wrap: pretty; }
.ref blockquote::before { content: ""; display: block; width: 36px; height: 2px; background: var(--gold); margin-bottom: 0.7rem; }
@media (max-width: 720px) {
  .ref { grid-template-columns: 1fr; gap: var(--space-2); }
  .ref-logo img { max-height: 48px; }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact { padding-top: var(--space-6); padding-bottom: var(--space-6); min-height: 70vh; display: grid; align-content: center; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-5); align-items: start; width: 100%; }
.contact h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.025em; }
.contact .intro { margin-top: var(--space-3); font-size: 1.1rem; max-width: 44ch; text-wrap: pretty; }
.contact .outro { margin-top: var(--space-3); color: var(--ink-2); max-width: 44ch; }
.contact .coords { margin-top: 0; border-top: 1px solid var(--line-strong); }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Motion discipline
   -------------------------------------------------------------------------- */

/* one settle: heads and entries ease into place the first time they enter */
.settle { transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out); transform: translateY(14px); opacity: 0.35; }
.settle.settled { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .settle { transform: none; opacity: 1; transition: none; }
  html { scroll-behavior: auto; }
  .contours.plot { opacity: 0.55; }
.contours.plot { animation: none; -webkit-mask-image: none; mask-image: none; }
  .nav { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .masthead, .imprint, .frame, .menu-btn { display: none !important; }
  body { background: #fff; }
}
