/* ==========================================================================
   Natyr Foods GmbH — "Rezeptur"
   A formulation sheet on oat paper: the navigation is a component list with
   fill levels, the hero is the Bodensee horizon, the footer a buoy line.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --lake: #2f6f8f;
  --lake-deep: #1f4f66;
  --lake-soft: #6fa3b8;
  --mint: #a8d5c2;
  --mint-soft: #e2f1ea;
  --oat: #f3efe6;
  --oat-deep: #e9e2d3;
  --paper: #fbf9f4;
  --ink: #14262e;
  --ink-soft: #44575f;
  --apricot: #f2a65a;
  --apricot-soft: #fbe7d1;
  --error: #a3271f;
  --line: rgba(20, 38, 46, 0.16);
  --line-strong: rgba(20, 38, 46, 0.42);

  --display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Gelasio', Georgia, 'Times New Roman', serif;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.45rem + 2vw, 2.85rem);
  --step-4: clamp(2.35rem, 1.5rem + 4.2vw, 4.9rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --rail-w: 15.5rem;
  --dock-h: 4.25rem;
  --radius: 0.75rem;
  --radius-s: 0.25rem;
  --shadow: 0 1px 2px rgba(20, 38, 46, 0.08), 0 12px 32px -12px rgba(20, 38, 46, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/familjen-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/familjen-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/gelasio-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/gelasio-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Gelasio';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/gelasio-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Gelasio';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/gelasio-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

a {
  color: var(--lake-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); text-decoration-thickness: 2px; }

svg { flex-shrink: 0; }

:focus-visible {
  outline: 3px solid var(--lake);
  outline-offset: 2px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }

/* ---------- Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn svg { width: 1.15rem; height: 1.15rem; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-lake { background: var(--lake); color: #fff; }
.btn-lake:hover { background: var(--lake-deep); color: #fff; }

.btn-apricot { background: var(--apricot); color: var(--ink); }
.btn-apricot:hover { background: #f7bd80; color: var(--ink); }

.btn-glass { border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }

/* Section label: a formulation component tag ("K-01 | Leistungen"). */
.comp {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  font-family: var(--display);
  font-size: 0.875rem;
  line-height: 1;
}
.comp-code {
  padding: 0.45rem 0.6rem;
  background: var(--ink);
  color: var(--oat);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.comp-name { padding: 0.45rem 0.75rem; font-weight: 600; }

.note {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--apricot);
  background: var(--oat);
  font-size: 0.95rem;
}

.wrap {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  container-type: inline-size;
}

.block { padding-block: clamp(4rem, 9vw, 7.5rem); }

.block-title {
  max-width: 24ch;
  margin-bottom: 1rem;
  font-size: var(--step-3);
}

.block-intro {
  max-width: 60ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.55;
}

/* ---------- Rail: the formulation sheet (desktop) ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: var(--rail-w);
  padding: 1.5rem 1.25rem 1.25rem;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background-color: var(--oat-deep);
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(47, 111, 143, 0.09) 31px 32px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 2.6rem; height: 2.6rem; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.brand-sub { color: var(--ink-soft); font-family: var(--display); font-size: 0.75rem; }

.rail-sheet { display: flex; flex: 1; flex-direction: column; gap: 1.5rem; }

.formula-head {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.formula-list { margin: 0; padding: 0; list-style: none; }
.formula-list + .formula-head { margin-top: 1.25rem; }

.formula-list a,
.formula-total {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.5rem;
  row-gap: 0.35rem;
  padding: 0.65rem 0.4rem 0.7rem;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--ink);
  font-family: var(--display);
  text-decoration: none;
}
.formula-list a { min-height: 44px; border-radius: var(--radius-s); transition: background-color 0.2s var(--ease); }
.formula-list a:hover { background: rgba(255, 255, 255, 0.55); color: var(--ink); }
.formula-list a[aria-current] { background: var(--paper); }
.formula-list a[aria-current] .formula-code { background: var(--lake); color: #fff; }

.formula-code {
  justify-self: start;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  color: var(--lake-deep);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.formula-name { overflow: hidden; font-size: 1rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.formula-pct {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Fill level: ten ticks, filled as the component is read. */
.meter {
  position: relative;
  grid-column: 1 / -1;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.6);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line-strong) calc(10% - 1px) 10%);
}
.meter span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--mint), var(--lake));
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
  transition: transform 0.25s linear;
}

.formula-total {
  margin: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
}
.formula-total .formula-code { color: var(--ink); font-size: 0.95rem; }

.rail-foot { display: grid; gap: 0.6rem; margin-top: auto; }
.rail-cta { width: 100%; }
.rail-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
}
.rail-phone svg { width: 1.1rem; height: 1.1rem; }
.rail-phone:hover { color: var(--lake-deep); text-decoration: underline; }
.rail-note {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.8rem;
  text-align: center;
}

.dock { display: none; }

.page { margin-left: var(--rail-w); }

/* ---------- Rail below 1024px: brand strip + bottom drawer + dock ---------- */
@media (max-width: 1023.98px) {
  .rail {
    position: static;
    width: auto;
    padding: 0.75rem var(--gutter);
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background-image: none;
  }

  /* Dim the page behind the open drawer; a click on it closes the drawer (see main.js). */
  .rail::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(20, 38, 46, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s;
  }
  .nav-open .rail::before { opacity: 1; visibility: visible; }

  .rail-sheet {
    position: fixed;
    inset: auto 0 var(--dock-h) 0;
    z-index: 50;
    max-height: calc(100dvh - var(--dock-h) - 1rem);
    padding: 1.25rem var(--gutter) 1rem;
    overflow-y: auto;
    border-radius: 1.25rem 1.25rem 0 0;
    background: var(--oat-deep);
    box-shadow: 0 -16px 40px -16px rgba(20, 38, 46, 0.4);
    transform: translateY(calc(100% + var(--dock-h)));
    visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0.3s;
  }
  /* Visible at once when opening, so focus can move into the drawer straight away. */
  .rail-sheet.is-open { transform: none; visibility: visible; transition: transform 0.3s var(--ease), visibility 0s; }
  .rail-cta { display: none; }

  .dock {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: var(--dock-h);
    padding: 0.6rem var(--gutter);
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--ink);
  }

  .dock-toggle {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    min-height: 3rem;
    padding: 0.5rem 0.9rem;
    border: 1.5px solid rgba(243, 239, 230, 0.35);
    border-radius: 999px;
    background: transparent;
    color: var(--oat);
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
  }
  .dock-toggle:hover { border-color: var(--oat); }
  .dock-current { display: flex; flex: 1; align-items: center; gap: 0.55rem; min-width: 0; overflow: hidden; white-space: nowrap; }
  .dock-current .formula-code { background: var(--mint); color: var(--ink); }
  .dock-chevron {
    width: 0.6rem;
    height: 0.6rem;
    margin-top: 0.3rem;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease);
  }
  .dock-toggle[aria-expanded="true"] .dock-chevron { margin-top: -0.3rem; transform: rotate(225deg); }
  .dock-cta { min-height: 3rem; padding-inline: 1.15rem; }
  .dock-current [data-dock-name] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  .page { margin-left: 0; padding-bottom: var(--dock-h); }
}

/* Narrow phones: tighter dock so long page names ("Barrierefreiheit") fit in full. */
@media (max-width: 360px) {
  .dock { gap: 0.4rem; }
  .dock-toggle { gap: 0.4rem; padding-inline: 0.65rem; font-size: 0.875rem; }
  .dock-current { gap: 0.4rem; }
  .dock-cta { padding-inline: 0.8rem; font-size: 0.875rem; }
}

/* ---------- Hero: the lake horizon ---------- */
.lake {
  background: linear-gradient(180deg, var(--oat) 0%, #e9efe9 62%, #d9e8e4 100%);
  overflow: hidden;
}

.lake-sky {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(1rem, 2vw, 2rem);
  text-align: center;
}

.lake-title {
  max-width: 15ch;
  margin: 0 auto 1.1rem;
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.lake-title em { color: var(--lake); font-style: normal; }

.lake-sub {
  max-width: 40ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.5;
}

/* All horizon layers share one grid cell so the label can rest on the water line. */
.lake-horizon {
  display: grid;
  grid-template-areas: 'stack';
  padding-top: 1rem;
}
.lake-horizon > * { grid-area: stack; }

.lake-shore {
  align-self: end;
  width: 100%;
  height: 4.5rem;
  margin-bottom: 3.4rem;
}

.lake-water {
  position: relative;
  z-index: 3;
  align-self: end;
  width: 100%;
  height: 4.5rem;
  margin-bottom: -1px;
  overflow: hidden;
  pointer-events: none;
}

.float {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(23rem, calc(100% - 2 * var(--gutter)));
  margin: 0 0 2.6rem;
  padding: 1rem 1.15rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: 0 18px 30px -18px rgba(20, 38, 46, 0.55);
  transform: rotate(-1.2deg);
}
.float figcaption {
  padding-top: 0.45rem;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.8rem;
}

/* The company facts, laid out like a Nährwerttabelle. */
.facts {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--display);
  font-size: 0.95rem;
}
.facts caption { padding-bottom: 0.5rem; border-bottom: 8px solid var(--ink); text-align: left; }
.facts-title {
  display: block;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.facts-sub { display: block; padding-top: 0.3rem; color: var(--ink-soft); font-size: 0.8rem; }
.facts th,
.facts td {
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--ink);
  line-height: 1.3;
  vertical-align: top;
}
.facts th { padding-right: 0.75rem; font-weight: 700; text-align: left; white-space: nowrap; }
.facts td { text-align: right; }
.facts tbody tr:last-child th,
.facts tbody tr:last-child td { border-bottom-width: 4px; }

.float-ripples {
  position: absolute;
  bottom: -1.1rem;
  left: 50%;
  width: 0;
  height: 0;
}
.float-ripples span {
  position: absolute;
  top: -0.6rem;
  left: -9rem;
  width: 18rem;
  height: 1.2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  opacity: 0;
}

.lake-depth {
  background: linear-gradient(180deg, var(--lake) 0%, var(--lake-deep) 100%);
  color: #fff;
}
.lake-depth-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--gutter) clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.lake-lead { margin-bottom: 1.75rem; font-size: var(--step-1); line-height: 1.55; }
.lake-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ---------- K-01 Leistungen: sample vials on a shelf ---------- */
.shelf { margin-top: clamp(2rem, 5vw, 3.5rem); }

.shelf-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 42rem;
  margin-inline: auto;
}

.vial {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.vial:focus-visible { outline: none; }
.vial:focus-visible .vial-tag { outline: 3px solid var(--lake); outline-offset: 3px; }

/* Each stand carries a piece of the shelf board, so the three form one shelf. */
.vial-stand {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 0.75rem;
  border-bottom: 12px solid #d8ccb5;
  box-shadow: 0 6px 0 -1px rgba(20, 38, 46, 0.1);
}
.vial:first-child .vial-stand { border-radius: 0 0 0 6px; }
.vial:last-child .vial-stand { border-radius: 0 0 6px 0; }

.vial-glass {
  width: clamp(3.6rem, 9vw, 5rem);
  height: auto;
  aspect-ratio: 80 / 190;
  transition: transform 0.35s var(--ease);
}
.vial-cap { fill: var(--ink); }
.vial-tube { fill: rgba(255, 255, 255, 0.6); stroke: var(--ink); stroke-width: 2.5; }
.vial-liquid { fill: var(--liquid); transition: transform 0.45s var(--ease); transform-origin: 50% 100%; }
.vial-shine { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: 0.8; }
.vial-ticks { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0.45; }

.vial-mint { --liquid: var(--mint); }
.vial-apricot { --liquid: var(--apricot); }
.vial-lake { --liquid: var(--lake-soft); }

.vial-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: calc(100% - 0.5rem);
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.vial-letter {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--liquid);
  color: var(--ink);
  font-size: 0.8rem;
}

@media (max-width: 559.98px) {
  .vial-tag { flex-direction: column; gap: 0.3rem; padding: 0.45rem 0.4rem; font-size: 0.85rem; }
}

.vial:hover .vial-glass { transform: translateY(-4px); }
.vial[aria-selected="true"] .vial-glass { transform: translateY(-10px); }
.vial[aria-selected="true"] .vial-tag { background: var(--ink); color: var(--oat); }

.sample {
  position: relative;
  max-width: 52rem;
  margin: 2.25rem auto 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.sample + .sample { margin-top: 1.25rem; }
.js .sample + .sample { margin-top: 2.25rem; }
.sample-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-bottom: 0.75rem; font-size: var(--step-2); }
.sample-letter {
  color: var(--lake-deep);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sample p:last-child { margin-bottom: 0; }
.sample-list {
  display: grid;
  gap: 0.5rem 2rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.sample-list li { position: relative; padding-left: 1.5rem; }
.sample-list li::before {
  content: '';
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 0.85rem;
  border-top: 2px solid var(--lake);
}
@container (min-width: 44rem) {
  .sample-list { grid-template-columns: 1fr 1fr; }
}

/* ---------- K-02 Ablauf: the lab pipeline ---------- */
.pipeline-block { background: var(--paper); border-block: 1px solid var(--line); }

.pipeline {
  display: grid;
  gap: 0;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-content: start;
  column-gap: 1.25rem;
  padding-bottom: 2rem;
}
.station > :not(.valve) { grid-column: 2; }
.station:last-child { padding-bottom: 0; }

/* The pipe between two valves. */
.station:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 3rem;
  bottom: 0;
  left: calc(1.5rem - 4px);
  width: 8px;
  border-radius: 4px;
  background-color: var(--mint);
  background-image: repeating-linear-gradient(180deg, var(--lake-soft) 0 12px, transparent 12px 24px);
  background-size: 100% 24px;
}

.valve {
  position: relative;
  grid-row: 1 / span 3;
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--oat);
}
/* The handwheel cross. */
.valve::before,
.valve::after {
  content: '';
  position: absolute;
  inset: 50% 0.45rem auto;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: var(--lake);
}
.valve::after { transform: rotate(90deg); }
.station:hover .valve::before,
.station:hover .valve::after { background: var(--apricot); }

.station-no {
  padding-top: 0.2rem;
  color: var(--lake-deep);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.station h3 { margin: 0.1rem 0 0.4rem; font-size: var(--step-1); }
.station p { max-width: 40ch; margin: 0; color: var(--ink-soft); }

@container (min-width: 60rem) {
  .pipeline { grid-template-columns: repeat(5, 1fr); column-gap: 1.5rem; }
  .station { grid-template-columns: 1fr; padding-bottom: 0; }
  .station > :not(.valve) { grid-column: 1; }
  .valve { grid-row: auto; margin-bottom: 0.9rem; }
  .station:not(:last-child)::before {
    top: calc(1.5rem - 4px);
    right: -1.5rem;
    bottom: auto;
    left: 3rem;
    width: auto;
    height: 8px;
    background-image: repeating-linear-gradient(90deg, var(--lake-soft) 0 12px, transparent 12px 24px);
    background-size: 24px 100%;
  }
}

/* ---------- K-03 FSMP: a calm information memo ---------- */
.memo { background: var(--mint-soft); }

.memo-grid { display: grid; gap: 2rem; }

.memo-duty {
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: var(--radius-s);
  background: var(--paper);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.45;
}

.memo-list { margin: 0; }
.memo-list > div { padding: 1.1rem 0; border-top: 1px solid var(--line-strong); }
.memo-list > div:last-child { border-bottom: 1px solid var(--line-strong); }
.memo-list dt {
  margin-bottom: 0.3rem;
  color: var(--lake-deep);
  font-family: var(--display);
  font-weight: 700;
}
.memo-list dd { margin: 0; }

@container (min-width: 52rem) {
  .memo-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; align-items: start; }
  .memo-head { position: sticky; top: 2rem; }
}

/* ---------- K-04 Fragen: the protocol ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 clamp(1.5rem, 4vw, 2.5rem);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}
.chip span { color: var(--lake-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--mint); color: var(--ink); text-decoration: none; }

.protocol { margin: 0; padding: 0; list-style: none; }

.entry {
  display: grid;
  gap: 0.25rem 2rem;
  padding: 1.75rem 0.75rem;
  border-top: 1px dashed var(--line-strong);
  border-radius: var(--radius-s);
  transition: background-color 0.4s var(--ease);
}
.entry:last-child { border-bottom: 1px dashed var(--line-strong); }
.entry:focus { background: var(--mint-soft); }

.entry-no {
  margin: 0;
  color: var(--lake);
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.entry-body { max-width: 62ch; }
.entry-body h3 { margin-bottom: 0.6rem; font-size: var(--step-1); }
.entry-body p { margin-bottom: 0.6rem; }

.entry-next {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
}
.entry-next svg { width: 1rem; height: 1rem; }

@container (min-width: 40rem) {
  .entry { grid-template-columns: 6rem 1fr; }
  .entry-body { padding-left: 1.5rem; border-left: 2px solid var(--mint); }
}

/* ---------- K-05 Anfrage: the lab request slip ---------- */
.request-block { background: var(--oat-deep); }

.slip {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
  box-shadow: 10px 12px 0 rgba(47, 111, 143, 0.14);
  container-type: inline-size;
}
/* Perforated tear-off edge. */
.slip::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1.4rem;
  border-bottom: 1.5px dashed var(--ink);
  background: radial-gradient(circle at 50% 50%, var(--oat-deep) 0 0.28rem, transparent 0.31rem) 0 0 / 1.25rem 100% repeat-x;
}

.slip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.25rem clamp(1rem, 4cqi, 2rem);
  border-bottom: 3px solid var(--ink);
}
.slip-title {
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.slip-to { color: var(--ink-soft); font-family: var(--display); font-size: 0.9rem; font-style: normal; line-height: 1.45; }

.slip-part {
  min-width: 0;
  margin: 0;
  padding: 1.25rem clamp(1rem, 4cqi, 2rem) 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
}
.slip-part legend {
  display: flex;
  float: left;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
}
.slip-part legend + * { clear: both; }
.slip-no {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 3px;
  background: var(--ink);
  color: var(--oat);
  font-size: 0.9rem;
}

.slip-grid { display: grid; gap: 1rem 1.25rem; }
@container (min-width: 36rem) {
  .slip-grid { grid-template-columns: 1fr 1fr; }
}
@container (min-width: 48rem) {
  .slip-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.cell label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
}
.req { color: var(--error); }
.cell-opt { color: var(--ink-soft); font-weight: 400; }
.cell-hint { margin: 0 0 0.75rem; color: var(--ink-soft); font-size: 0.95rem; }

.cell input,
.cell select,
.cell textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--ink-soft);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cell textarea { min-height: 8rem; resize: vertical; }
.cell input:hover,
.cell select:hover,
.cell textarea:hover { border-color: var(--ink); }
.cell input:focus-visible,
.cell select:focus-visible,
.cell textarea:focus-visible { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px rgba(47, 111, 143, 0.35); }
.cell [aria-invalid="true"] { border-color: var(--error); }

.cell-error {
  margin: 0.4rem 0 0;
  color: var(--error);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
}
.cell-error:empty { display: none; }

.matrix-scroll { overflow-x: auto; }
.matrix {
  width: 100%;
  min-width: 18rem;
  border-collapse: collapse;
  font-family: var(--display);
}
.matrix th,
.matrix td { padding: 0.35rem 0.5rem; border: 1px solid var(--line-strong); }
.matrix thead th {
  background: var(--oat);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  vertical-align: bottom;
}
.matrix thead th:first-child { text-align: left; }
.matrix tbody th { font-size: 0.95rem; font-weight: 600; text-align: left; }
.matrix td { width: 22%; text-align: center; }

/* Narrow screens: all four columns fit without scrolling. */
@container (max-width: 22rem) {
  .matrix { min-width: 0; table-layout: fixed; }
  .matrix th,
  .matrix td { padding: 0.25rem 0.2rem; }
  .matrix thead th {
    font-size: 0.72rem;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .matrix thead th:first-child { width: 34%; }
  .matrix thead th:not(:first-child) { width: 22%; }
  .matrix tbody th { font-size: 0.85rem; hyphens: auto; }
  .tick { min-width: 0; }
}

.tick {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.tick input {
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #fff center / 1rem no-repeat;
  cursor: pointer;
  appearance: none;
  transition: background-color 0.15s var(--ease);
}
.tick input:checked {
  border-color: var(--lake);
  background-color: var(--lake);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.tick:hover input { box-shadow: 0 0 0 4px var(--mint-soft); }
.tick input[aria-invalid="true"] { border-color: var(--error); }

.health-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--apricot);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--apricot-soft);
  font-size: 0.95rem;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.slip-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.25rem clamp(1rem, 4cqi, 2rem) 1.5rem;
}
.slip-legal { max-width: 46ch; margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.form-status {
  margin: 0 clamp(1rem, 4cqi, 2rem) 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-s);
  font-family: var(--display);
}
.form-status:empty { display: none; }
.form-status.is-success { background: var(--mint-soft); }
.form-status.is-error { background: #f8e2df; color: var(--error); }

/* ---------- Footer: lake waves and the buoy line ---------- */
.shore { background: var(--ink); color: var(--oat); }

.shore-waves {
  display: block;
  width: 100%;
  height: clamp(3rem, 6vw, 5rem);
  background: var(--oat);
}
/* On the home page the waves follow the request block's darker oat. */
.page:has(.request-block) .shore-waves { background: var(--oat-deep); }

.shore-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  text-align: center;
}

.buoys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.buoys li { position: relative; padding: 2.1rem 1rem 0; }
/* Rope segment: each item carries its own, so wrapped rows stay roped. */
.buoys li::before {
  content: '';
  position: absolute;
  top: 0.95rem;
  right: 0;
  left: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--mint) 0 7px, transparent 7px 11px);
  opacity: 0.6;
}
.buoys li::after {
  content: '';
  position: absolute;
  top: 0.35rem;
  left: 50%;
  width: 1.3rem;
  height: 1.3rem;
  margin-left: -0.65rem;
  border: 2px solid var(--oat);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--apricot) 0 50%, var(--oat) 50%);
}
.buoys a,
.buoys button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--oat);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(243, 239, 230, 0.4);
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.buoys a:hover,
.buoys button:hover { color: var(--mint); text-decoration-color: var(--mint); }
.buoys :focus-visible { outline-color: var(--mint); }

.shore-firm,
.shore-note,
.shore-legal { max-width: 60ch; margin: 0 auto 0.6rem; color: #cfdad8; font-size: 0.92rem; }
.shore-firm strong { color: var(--oat); }
.shore-firm a { color: var(--mint); white-space: nowrap; }
.shore-firm a:hover { color: #fff; }
.shore-note { font-style: italic; }
.shore-legal { margin-bottom: 0; font-family: var(--display); font-size: 0.85rem; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed;
  right: var(--gutter);
  bottom: 1.5rem;
  left: calc(var(--rail-w) + 1.5rem);
  z-index: 70;
  max-width: 34rem;
  max-height: calc(100dvh - 3rem);
  padding: 1.25rem 1.35rem 1.1rem;
  overflow-y: auto;
  border: 1.5px solid var(--ink);
  border-top: 6px solid var(--lake);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.consent-title { margin-bottom: 0.5rem; font-size: var(--step-1); }
.consent-text { margin-bottom: 1rem; font-size: 0.95rem; line-height: 1.55; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.consent-btn {
  flex: 1 1 10.5rem;
  min-height: 3rem;
  white-space: nowrap;
  padding: 0.6rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--oat);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.consent-btn:hover { background: var(--lake-deep); border-color: var(--lake-deep); }
.consent-btn-save { border-color: var(--lake); background: var(--lake); }
.consent-link {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--lake-deep);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.consent-link:hover { color: var(--ink); }

.consent-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1.5px solid var(--ink);
  border-top: 6px solid var(--lake);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.consent-dialog::backdrop { background: rgba(20, 38, 46, 0.55); }
.consent-dialog-inner { padding: 1.5rem; }
.consent-categories { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.consent-category { padding: 0.9rem 0; border-top: 1px solid var(--line-strong); }
.consent-category:last-child { border-bottom: 1px solid var(--line-strong); }
.consent-category-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-category h3 { font-size: 1.05rem; }
.consent-category p { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.consent-always { color: var(--lake-deep); white-space: nowrap; font-family: var(--display); font-size: 0.85rem; font-weight: 700; }

.consent-switch { position: relative; display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; cursor: pointer; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 3rem;
  height: 1.65rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--oat-deep);
  transition: background-color 0.2s var(--ease);
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.consent-switch input:checked + .consent-switch-track { background: var(--lake); border-color: var(--lake); }
.consent-switch input:checked + .consent-switch-track::after { background: #fff; transform: translateX(1.35rem); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--lake); outline-offset: 3px; }

@media (max-width: 1023.98px) {
  .consent {
    right: 0.75rem;
    bottom: calc(var(--dock-h) + 0.75rem);
    left: 0.75rem;
    max-height: calc(100dvh - var(--dock-h) - 1.5rem);
    margin-inline: auto;
  }
}

/* ---------- Pages: legal documents (Beiblätter) ---------- */
.doc { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6rem); }
.doc .wrap { max-width: 52rem; }
.doc h1 { margin-bottom: 0.75rem; font-size: var(--step-3); }
.doc-stand { margin-bottom: 2rem; color: var(--ink-soft); font-family: var(--display); font-size: 0.95rem; }
.doc-lead { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }

.doc h2 {
  margin: 2.75rem 0 0.85rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-size: var(--step-2);
  overflow-wrap: break-word;
  hyphens: auto;
}
.doc h3 { margin: 1.75rem 0 0.5rem; font-size: var(--step-1); }
.doc ul,
.doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.4rem; }
.doc address { margin-bottom: 1em; font-style: normal; }

.doc-toc {
  margin: 0 0 1rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
}
.doc-toc h2 { margin: 0 0 0.5rem; padding: 0; border: 0; font-size: 1.05rem; }
.doc-toc ol { margin: 0; columns: 2 14rem; column-gap: 2rem; }
.doc-toc li { margin-bottom: 0.25rem; break-inside: avoid; }

.facts-list { margin: 0 0 1.25rem; }
.facts-list > div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-strong);
}
.facts-list dt { font-family: var(--display); font-weight: 700; }
.facts-list dd { margin: 0; }
@container (min-width: 34rem) {
  .facts-list > div { grid-template-columns: 13rem 1fr; }
}

.table-scroll { margin: 1rem 0 1.5rem; overflow-x: auto; }
.cookie-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.45;
}
.cookie-table caption { padding-bottom: 0.5rem; font-family: var(--display); font-weight: 700; text-align: left; }
.cookie-table th,
.cookie-table td { padding: 0.6rem 0.7rem; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.cookie-table thead th { background: var(--oat-deep); font-family: var(--display); }
.cookie-table tbody th { font-weight: 400; }
.cookie-table code { font-size: 0.9em; white-space: nowrap; }

/* Narrow screens: each row becomes a block of "label: value" lines. */
@media (max-width: 47.99rem) {
  .cookie-table { min-width: 0; }
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cookie-table tbody,
  .cookie-table tr,
  .cookie-table th,
  .cookie-table td { display: block; }
  .cookie-table tr { margin-bottom: 0.75rem; border: 1px solid var(--line-strong); }
  .cookie-table tbody th,
  .cookie-table td { border: 0; border-top: 1px solid var(--line); }
  .cookie-table tbody th { border-top: 0; background: var(--oat-deep); font-weight: 600; }
  .cookie-table td::before { content: attr(data-label) ": "; font-family: var(--display); font-weight: 700; }
  .cookie-table code { white-space: normal; overflow-wrap: anywhere; }
}

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: var(--radius-s);
  background: var(--paper);
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.lost { text-align: center; }
.lost .wrap { max-width: 40rem; }
.lost-vial { display: block; width: 5rem; height: auto; margin: 0 auto 1.5rem; }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--oat);
  font-family: var(--display);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { color: var(--oat); transform: none; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .wave-back { animation: drift 14s linear infinite; }
  .wave-front { animation: drift-front 9s linear infinite; }
  .float { animation: bob 6s ease-in-out infinite; }
  .float-ripples span { animation: ripple 6s ease-out infinite; }
  .float-ripples span:nth-child(2) { animation-delay: 2s; }
  .float-ripples span:nth-child(3) { animation-delay: 4s; }
  .station:not(:last-child)::before { animation: flow-down 1.6s linear infinite; }
  .buoys li::after { animation: buoy 4s ease-in-out infinite; }
  .buoys li:nth-child(even)::after { animation-delay: -2s; }

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

  @container (min-width: 60rem) {
    .station:not(:last-child)::before { animation-name: flow-right; }
  }
}

@keyframes drift { to { transform: translateX(-300px); } }
@keyframes drift-front { to { transform: translateX(-240px); } }
@keyframes bob {
  0%, 100% { transform: rotate(-1.2deg) translateY(0); }
  50% { transform: rotate(-0.6deg) translateY(-5px); }
}
@keyframes ripple {
  0% { opacity: 0.8; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.15); }
}
@keyframes flow-down { to { background-position: 0 24px; } }
@keyframes flow-right { to { background-position: 24px 0; } }
@keyframes buoy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  /* The drawer must be visible the moment it opens so focus can move into it. */
  .rail-sheet.is-open,
  .rail-sheet.is-open * { transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .rail,
  .dock,
  .consent,
  .consent-dialog,
  .shore-waves,
  .lake-water,
  .lake-shore,
  .skip-link { display: none; }
  .page { margin: 0; padding: 0; }
  .shore { background: none; color: var(--ink); }
  .shore-firm,
  .shore-note,
  .shore-legal { color: var(--ink); }
  .lake-depth { background: none; color: var(--ink); }
}
