/* =========================================================================
   Jumi Chäsi GmbH — "Käsekeller"
   Cellar shelves, rind stamps, labels and a cheese-wheel menu.
   Blocks: fonts → tokens → base → components → header → sections →
           pages → consent → utilities → motion → print
   ========================================================================= */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/zilla-slab-500-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: 'Zilla Slab';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/zilla-slab-500-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: 'Zilla Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/zilla-slab-700-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: 'Zilla Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/zilla-slab-700-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: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/public-sans-var-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: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/public-sans-var-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;
}

/* ---------- Tokens ---------- */
:root {
  --charcoal: #2a2420;
  --charcoal-2: #4a3f37;
  --cream: #fbf6ea;
  --paper: #fffdf6;
  --cellar-paper: #f3ead6;
  --kraft: #ece0c4;
  --gold: #f2c14e;
  --gold-soft: #f6d98b;
  --gold-shadow: #b8892a;
  --rind: #8a5a2b;
  --rind-dark: #6e431d;
  --wood: #b98250;
  --wood-edge: #8c5c2e;
  --groove: #3b2412;
  --red: #c8102e;
  --red-dark: #8e0b20;
  --meadow: #4a7c3f;
  --ink-soft: #5e534a;
  --line: rgba(42, 36, 32, 0.18);

  --font-display: 'Zilla Slab', Rockwell, Georgia, serif;
  --font-text: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.6vw, 1.7rem);
  --step-4: clamp(1.9rem, 1.5rem + 2vw, 3.1rem);

  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --bar-h: 70px;
  --radius: 6px;
  --shadow: 0 10px 28px rgba(42, 36, 32, 0.14);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
}

body.wheel-open { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}

h2 {
  margin: 0 0 16px;
  font-size: var(--step-4);
}

p, li, dd, dt {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Long German compounds in narrow legal text and the stock ledger may break. */
.doc p,
.doc li,
.ledger dt {
  hyphens: auto;
  /* At least 3 letters on each side, so abbreviations like "DSGVO" stay whole. */
  hyphenate-limit-chars: 7 3 3;
}

img, svg { max-width: 100%; }

a {
  color: var(--rind);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--red); }

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

[tabindex="-1"]:focus { outline: none; }

button { font: inherit; }

section[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 0 4px 0 var(--gold-shadow);
}

.btn-gold:hover {
  background: var(--gold-soft);
  color: var(--charcoal);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--gold-shadow);
}

.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--gold-shadow);
}

.btn-gold:focus-visible { outline-color: var(--cream); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.text-link-light { color: var(--cream); }
.text-link-light:hover { color: var(--gold); }
.text-link-light:focus-visible { outline-color: var(--gold); }

/* Section label: a little shelf tag with a punched hole */
.shelf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 3px 14px 3px 10px;
  border: 1.5px solid var(--rind);
  border-radius: 3px 16px 16px 3px;
  color: var(--rind);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.shelf-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.shelf-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.shelf-head p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--step-1);
}

/* ---------- Header: wedge bar + wheel button ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--charcoal);
  color: var(--cream);
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; }

.cellar-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--bar-h);
  padding-inline: var(--gutter);
  background: var(--cream);
  border-bottom: 6px solid var(--wood);
  box-shadow: 0 4px 14px rgba(42, 36, 32, 0.12);
}

.wedge-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wedge-list {
  display: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each link is a cheese wedge lying on its side: thick rind end left, tapering right. */
.wedge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 24px 0 18px;
  background: var(--gold);
  box-shadow: inset 6px 0 0 var(--rind);
  clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.wedge:hover {
  background: var(--gold-soft);
  color: var(--charcoal);
  transform: translateX(2px);
}

.wedge:focus-visible { outline-offset: -7px; }

.wedge[aria-current="true"] { box-shadow: inset 6px 0 0 var(--red); }

.wedge-brand {
  padding-left: 12px;
  background: var(--charcoal);
  box-shadow: inset 6px 0 0 var(--rind-dark);
  color: var(--cream);
  font-size: 1.2rem;
}

.wedge-brand:hover {
  background: var(--charcoal-2);
  color: var(--cream);
}

.wedge-brand:focus-visible { outline-color: var(--gold); }

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.mark-wheel {
  fill: var(--gold);
  stroke: var(--rind);
  stroke-width: 4;
  stroke-linejoin: round;
}

.mark-eye { fill: #d9a536; }

.wedge-action {
  background: var(--red);
  box-shadow: inset 6px 0 0 var(--red-dark);
  color: #fff;
}

.wedge-action:hover {
  background: var(--red-dark);
  color: #fff;
}

.wheel-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 2px;
  border: 0;
  border-radius: 28px;
  background: none;
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.wheel-progress {
  width: 48px;
  height: 48px;
  transition: transform 0.4s ease;
}

.wheel-toggle:hover .wheel-progress { transform: rotate(36deg); }

.wheel-progress-rind { fill: var(--rind); }

.wheel-progress [data-wedge] {
  fill: var(--gold);
  transition: fill 0.25s ease, opacity 0.25s ease;
}

.wheel-progress .is-passed { fill: #d99a3b; }
.wheel-progress .is-current { fill: var(--red); }

.wheel-progress-close {
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 3.5;
  stroke-linecap: round;
  opacity: 0;
}

.wheel-toggle[aria-expanded="true"] [data-wedge] { opacity: 0.35; }
.wheel-toggle[aria-expanded="true"] .wheel-progress-close { opacity: 1; }

/* The opened wheel: five wedges, each a real link, around a rind hub */
.laibkarte {
  position: fixed;
  inset: var(--bar-h) 0 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px var(--gutter) 32px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(242, 193, 78, 0.16), transparent 70%),
    var(--charcoal);
  color: var(--cream);
}

.laibkarte[hidden] { display: none; }

.laibkarte-inner {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.laibkarte-title {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.wheel {
  --d: clamp(260px, min(86vw, calc(100dvh - 260px)), 460px);
  position: relative;
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  background: var(--rind);
  box-shadow: 0 0 0 6px var(--rind-dark), 0 24px 60px rgba(0, 0, 0, 0.5);
}

.wheel-list {
  position: absolute;
  inset: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wheel-list li {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-wedge {
  position: absolute;
  inset: 0;
  background: var(--gold);
  clip-path: polygon(50% 50%, 21.68% 8.79%, 28.18% 5.01%, 35.17% 2.25%, 42.5% 0.57%, 50% 0%, 57.5% 0.57%, 64.83% 2.25%, 71.82% 5.01%, 78.32% 8.79%);
  color: var(--charcoal);
  text-decoration: none;
  pointer-events: auto;
  transform: rotate(calc(var(--i) * 72deg));
  transition: background-color 0.15s ease;
}

.wheel-list li:nth-child(even) .wheel-wedge { background: var(--gold-soft); }

.wheel-wedge:hover,
.wheel-wedge:focus-visible {
  background: var(--red);
  color: #fff;
}

.wheel-list li:nth-child(even) .wheel-wedge:hover,
.wheel-list li:nth-child(even) .wheel-wedge:focus-visible { background: var(--red); }

.wheel-wedge:focus-visible { outline: none; }

.wheel-wedge:focus-visible .wheel-label {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.wheel-label {
  position: absolute;
  top: 13%;
  left: 50%;
  display: grid;
  justify-items: center;
  width: 40%;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.6rem + 1.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  hyphens: manual;
  transform: translateX(-50%) rotate(calc(var(--i) * -72deg));
}

.wheel-num {
  font-family: var(--font-text);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--rind-dark);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.45), 0 0 0 4px var(--rind);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 700;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.laibkarte-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin: 6px 0 0;
}

.laibkarte-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  font-weight: 600;
}

.laibkarte-contact a:hover { color: var(--gold); }
.laibkarte-contact a:focus-visible { outline-color: var(--gold); }

/* ---------- Hero: the cellar shelf ---------- */
.cellar {
  position: relative;
  background-color: var(--charcoal);
  background-image:
    radial-gradient(ellipse 55% 60% at 50% 42%, rgba(242, 193, 78, 0.2), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cpath d='M0 39.5H160M0 79.5H160M40.5 0V40M120.5 40V80' stroke='%23000' stroke-opacity='.28' fill='none'/%3E%3C/svg%3E");
  color: var(--cream);
}

.cellar-wall {
  display: grid;
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
  align-items: end;
  gap: clamp(16px, 3vw, 44px);
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) 0;
}

.cellar-rack { display: none; }

.rack-post,
.rack-board { fill: var(--wood-edge); }
.rack-board { fill: var(--wood); }
.rack-wheel-young { --top: #e8c46c; --side: #c99a3f; }
.rack-wheel-mid { --top: #d39b45; --side: #a8722c; }
.rack-wheel-old { --top: #a86f30; --side: #74491f; }
.rack-top { fill: var(--top); }
.rack-side { fill: var(--side); }

.stamp-wheel {
  position: relative;
  margin: 0;
  container-type: inline-size;
}

.stamp-wheel-art {
  display: block;
  width: 100%;
  height: auto;
}

.wheel-shadow { fill: rgba(0, 0, 0, 0.45); }

.wheel-cloth {
  fill: none;
  stroke: rgba(60, 30, 8, 0.22);
  stroke-width: 2;
}

.wheel-ring {
  fill: none;
  stroke: rgba(110, 67, 29, 0.35);
  stroke-width: 2;
}

/* The casein plate, pressed into the rind of the wheel's side */
.rind-stamp {
  position: absolute;
  top: 69%;
  left: 50%;
  display: grid;
  gap: 0.6cqi;
  width: 68%;
  padding: 2.4cqi 3cqi;
  border-radius: 1.2cqi;
  background: #c8934f;
  box-shadow:
    inset 0 3px 6px rgba(40, 20, 5, 0.55),
    inset 0 -2px 0 rgba(255, 225, 170, 0.35),
    0 1px 0 rgba(255, 220, 160, 0.3);
  outline: 1.5px solid rgba(59, 36, 18, 0.45);
  outline-offset: -1.4cqi;
  color: var(--groove);
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 230, 185, 0.45);
  transform: translate(-50%, -50%);
}

.rind-stamp-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 5.2cqi, 2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rind-stamp-place span { white-space: nowrap; }

.rind-stamp-place {
  font-size: clamp(0.72rem, 2.7cqi, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
}

.shelf-board {
  position: relative;
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(18px, 3vw, 30px) var(--gutter);
  background-color: var(--wood);
  background-image:
    linear-gradient(180deg, rgba(255, 230, 190, 0.28), transparent 35%),
    repeating-linear-gradient(180deg, rgba(90, 50, 20, 0.1) 0 2px, transparent 2px 9px);
  border-bottom: 14px solid var(--wood-edge);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.carved {
  margin: 0;
  color: var(--groove);
  font-size: clamp(2.1rem, 1rem + 5.4vw, 5.2rem);
  line-height: 1.02;
  text-shadow: 0 1px 0 rgba(255, 228, 190, 0.55), 0 -1px 0 rgba(40, 20, 5, 0.3);
  /* Break long compounds only at the soft hyphens set in the markup. */
  hyphens: manual;
}

.cellar-floor {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(64px, 8vw, 96px);
  text-align: center;
}

.cellar-lede {
  margin: 0 0 14px;
  color: #efe6d2;
  font-size: var(--step-1);
}

.cellar-b2b {
  margin: 0 0 28px;
  color: var(--gold);
}

.cellar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
}

/* ---------- Reifung: ageing shelves ---------- */
.ripening { padding-block: var(--section); }

.ageing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(16px, 2.5vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.age { text-align: center; }

.age-wheel {
  display: block;
  width: 100%;
  max-width: 220px;
  margin-inline: auto;
  transition: transform 0.25s ease;
}

.age:hover .age-wheel { transform: translateY(-5px); }

.age-side { fill: var(--rind-dark); }
.age-top { fill: var(--rind); }
.age-board { fill: var(--wood); }

.age-name {
  margin: 14px 0 6px;
  font-size: var(--step-2);
}

.age p {
  margin: 0;
  color: var(--ink-soft);
}

.ageing-axis { display: none; }

.ledger-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: clamp(56px, 7vw, 88px);
}

.ledger-title {
  margin: 0;
  font-size: var(--step-2);
}

.ledger {
  position: relative;
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* The red margin rule of a ledger page */
.ledger::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 52px;
  width: 2px;
  background: rgba(200, 16, 46, 0.55);
}

.ledger-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 20px;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid rgba(138, 90, 43, 0.25);
}

.ledger-row:last-child { border-bottom: 0; }

.ledger dt {
  display: contents;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
}

.ledger-slot {
  color: var(--red);
  font-size: 1.4rem;
  line-height: 1.2;
  text-align: center;
}

.ledger dd {
  grid-column: 2;
  margin: 0;
  color: var(--ink-soft);
}

.cellar-note {
  padding: 22px 24px;
  background: #eef2e6;
  border-left: 6px solid var(--meadow);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.cellar-note h3 {
  margin: 0 0 8px;
  font-size: var(--step-1);
}

.cellar-note p { margin: 0; }

/* ---------- Handelswege: three-country flow ---------- */
.routes {
  padding-block: var(--section);
  background: var(--cellar-paper);
}

.routes-board {
  display: grid;
  gap: 28px;
  align-items: center;
}

.routes-map {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
  border: 2px solid var(--charcoal);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.land-de { fill: #f4e8c8; }
.land-fr { fill: #e9e2d2; }
.land-ch { fill: #f2dcd2; }

.border-fr-ch {
  fill: none;
  stroke: rgba(42, 36, 32, 0.4);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.rhine {
  fill: none;
  stroke: #7fa7bd;
  stroke-width: 12;
  stroke-linecap: round;
}

.map-river {
  fill: #2f5d73;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

.map-country {
  fill: var(--charcoal-2);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.route {
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 3;
  stroke-dasharray: 10 8;
  opacity: 0.5;
  transition: opacity 0.2s ease, stroke 0.2s ease;
}

.route-via { stroke-dasharray: 3 7; }

.route-head { fill: var(--charcoal); }

.route.is-active {
  stroke: var(--red);
  stroke-width: 4;
  opacity: 1;
}

.map-node {
  fill: var(--gold);
  stroke: var(--charcoal);
  stroke-width: 2.5;
}

.map-base {
  fill: var(--red);
  stroke: var(--charcoal);
  stroke-width: 2.5;
}

.map-base-label {
  fill: var(--charcoal);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.route-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-btn {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  background: var(--paper);
  border: 1.5px solid rgba(42, 36, 32, 0.2);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-btn:hover { border-color: var(--charcoal); border-left-color: var(--gold); }

.route-btn[aria-pressed="true"] {
  border-color: var(--charcoal);
  border-left-color: var(--red);
  background: #fff;
  box-shadow: var(--shadow);
}

.route-pair {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
}

.route-text {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.routes-customs {
  max-width: 860px;
  margin: 32px 0 0;
  padding: 18px 22px;
  background: rgba(255, 253, 246, 0.7);
  border: 1.5px dashed var(--rind);
  border-radius: var(--radius);
}

/* ---------- Anlagen: exploded cheese vat ---------- */
.equipment { padding-block: var(--section); }

.vat-board {
  display: grid;
  gap: 28px;
  align-items: center;
}

.vat {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-inline: auto;
}

.vat-axis {
  fill: none;
  stroke: var(--rind);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  opacity: 0.6;
}

.vat-part {
  fill: #e6e0d4;
  stroke: var(--charcoal);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill 0.2s ease, transform 0.25s ease;
}

.vat-part.is-active { fill: var(--gold); }

.vat-wires { stroke-width: 1.2; }

.vat-inner-wall,
.vat-link {
  fill: none;
  stroke-dasharray: 5 4;
}

.vat-screen { fill: #9fb7a0; }

.vat-callouts path {
  fill: none;
  stroke: var(--rind);
  stroke-width: 1.2;
  stroke-dasharray: 2 4;
}

.vat-callouts circle { fill: var(--charcoal); }

.vat-callouts text {
  fill: var(--cream);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}

.vat-legend {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vat-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vat-btn:hover,
.vat-btn[aria-pressed="true"] {
  background: #fff3cf;
  border-color: var(--gold);
}

.vat-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
}

.vat-btn[aria-pressed="true"] .vat-num { background: var(--red); }

.equipment-scope {
  max-width: 780px;
  margin: 32px 0 0;
  font-size: var(--step-1);
}

/* ---------- Anfrage: the freight declaration ---------- */
.declaration {
  padding-block: var(--section);
  background-color: var(--kraft);
  background-image: repeating-linear-gradient(135deg, rgba(138, 90, 43, 0.05) 0 2px, transparent 2px 14px);
}

.req-mark {
  color: var(--red);
  font-weight: 700;
}

.manifest {
  max-width: 980px;
  margin-inline: auto;
  background: var(--paper);
  border: 2px solid var(--charcoal);
  border-radius: 4px;
  box-shadow: 10px 10px 0 rgba(42, 36, 32, 0.16);
}

.manifest-head {
  display: grid;
  border-bottom: 2px solid var(--charcoal);
}

.manifest-code {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 2px solid var(--charcoal);
  background: repeating-linear-gradient(-45deg, rgba(200, 16, 46, 0.08) 0 8px, transparent 8px 16px);
  color: var(--red-dark);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
}

.manifest-recipient {
  padding: 14px 20px;
  font-size: 0.97rem;
}

.manifest-recipient p { margin: 0; }
.manifest-recipient .box-label { margin-bottom: 6px; }

/* 1.5px gaps over a charcoal background draw the form's ruled boxes. */
.manifest-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5px;
  background: var(--charcoal);
}

.box {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 12px 16px 16px;
  border: 0;
  background: var(--paper);
}

.box-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

/* A floated legend stops sitting on the fieldset border, so the box stays a plain cell. */
legend.box-label {
  float: left;
  width: 100%;
}

.box-no {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 3px;
  border: 1.5px solid var(--charcoal);
  border-radius: 2px;
  font-size: 0.78rem;
}

.box-optional {
  color: var(--ink-soft);
  font-weight: 400;
}

.box input[type="text"],
.box input[type="email"],
.box input[type="tel"],
.box select,
.box textarea {
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid rgba(42, 36, 32, 0.45);
  border-radius: 3px 3px 0 0;
  background: #f7f0de;
  color: var(--charcoal);
  font: inherit;
}

.box select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%232a2420' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.box textarea {
  min-height: 112px;
  resize: vertical;
}

.box input:focus-visible,
.box select:focus-visible,
.box textarea:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 2px;
  border-bottom-color: var(--charcoal);
}

.box [aria-invalid="true"] {
  border-bottom-color: var(--red);
  background-color: #fbe9e9;
}

.box-goods[aria-invalid="true"] { background: #fdf3f2; }

.field-error {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.92rem;
  font-weight: 600;
}

.field-error:empty { display: none; }

.box-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.goods-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--charcoal);
}

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

.manifest-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  padding: 22px 20px;
  border-top: 2px solid var(--charcoal);
}

/* The submit button is the customs office's stamp. */
.stamp-btn {
  min-height: 56px;
  padding: 12px 24px;
  border: 3px solid var(--red);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--red);
  color: var(--red);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transform: rotate(-1.5deg);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.stamp-btn:hover {
  background: var(--red);
  box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 5px #fff;
  color: #fff;
}

.stamp-btn:active { transform: rotate(0) scale(0.97); }

.stamp-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  flex: 1 1 260px;
  margin: 0;
}

.form-status.is-success { color: #3a6631; font-weight: 600; }
.form-status.is-error { color: var(--red-dark); font-weight: 600; }
.form-status:empty { display: none; }

/* ---------- Fragen: labels hanging from the shelf ---------- */
.labels { padding-block: var(--section); }

.label-rail {
  position: relative;
  display: grid;
  gap: 14px;
}

.label-h {
  margin: 0;
  font-size: inherit;
}

.label-tag {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  background: var(--gold);
  border: 0;
  border-radius: 10px;
  color: var(--charcoal);
  font-family: var(--font-text);
  text-align: left;
  cursor: pointer;
}

.label-key {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
}

.label-q {
  hyphens: manual;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.35;
}

.label-panel {
  padding: 18px 22px;
  background: var(--paper);
  border: 2px solid var(--charcoal);
  border-top: 6px solid var(--red);
  border-radius: var(--radius);
  font-size: var(--step-1);
}

.label-panel p { margin: 0; }

/* With JavaScript the labels hang from a shelf edge and open one at a time. */
.js .label-rail {
  gap: 0 14px;
  padding-top: 26px;
}

.js .label-rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  background-color: var(--wood);
  background-image: linear-gradient(180deg, rgba(255, 230, 190, 0.3), transparent 60%);
  border-bottom: 6px solid var(--wood-edge);
  border-radius: 3px;
  box-shadow: 0 8px 14px rgba(42, 36, 32, 0.18);
}

.js .label-h {
  position: relative;
  padding-top: 26px;
}

/* the string from the shelf to the label's hole */
.js .label-h::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 28px;
  width: 2px;
  height: 46px;
  background: var(--rind);
}

.js .label-tag {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 16px 16px 16px 48px;
  border-radius: 8px 14px 14px 8px;
  box-shadow: 0 3px 0 rgba(42, 36, 32, 0.18);
  transform-origin: 29px -24px;
  transition: transform 0.25s ease, background-color 0.15s ease;
}

/* punched hole */
.js .label-tag::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 22px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--rind);
  border-radius: 50%;
  background: var(--cream);
}

.js .label-h:nth-of-type(3n + 2) .label-tag {
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 rgba(42, 36, 32, 0.18);
}

.js .label-h:nth-of-type(3n) .label-tag { background: var(--gold-soft); }

.js .label-tag:hover { transform: rotate(-2deg); }

.js .label-tag[aria-expanded="true"],
.js .label-h:nth-of-type(n) .label-tag[aria-expanded="true"] {
  background: var(--red);
  box-shadow: 0 3px 0 var(--red-dark);
  color: #fff;
  transform: none;
}

.js .label-panel {
  margin: 14px 0 24px;
  animation: label-open 0.25s ease;
}

@keyframes label-open {
  from { opacity: 0; transform: translateY(-6px); }
}

/* ---------- Footer: alpine silhouette + three-country line ---------- */
.site-footer {
  background: var(--charcoal);
  color: #e9dfca;
}

.alps {
  display: block;
  width: 100%;
  height: clamp(90px, 12vw, 180px);
  background: var(--cream);
}

.alps-far { fill: var(--charcoal-2); }
.alps-near { fill: var(--charcoal); }
.alps-snow { fill: var(--cream); opacity: 0.85; }

.footer-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 1180px;
  margin-inline: auto;
  padding: 4px var(--gutter) 40px;
  text-align: center;
}

.country-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(0.94rem, 0.6rem + 2vw, 1.7rem);
  font-weight: 700;
}

.country-line li {
  display: flex;
  align-items: center;
}

.country-line li + li::before {
  content: "";
  width: clamp(12px, 5vw, 110px);
  height: 2px;
  margin-inline: clamp(6px, 1.5vw, 14px);
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 14px);
}

.country-home {
  color: var(--cream);
  text-decoration: underline 3px var(--red);
  text-underline-offset: 8px;
}

.footer-company {
  margin: 0;
  font-size: 0.97rem;
}

.footer-company a,
.footer-legal a,
.footer-consent {
  color: var(--cream);
}

.footer-company a:hover,
.footer-legal a:hover,
.footer-consent:hover { color: var(--gold); }

.site-footer :focus-visible { outline-color: var(--gold); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal a,
.footer-consent {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.footer-register {
  margin: 0;
  color: #cbbfa8;
  font-size: 0.88rem;
}

/* ---------- Pages: legal documents and 404 ---------- */
.doc-board {
  padding: clamp(36px, 6vw, 64px) var(--gutter) 0;
  background-color: var(--charcoal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cpath d='M0 39.5H160M0 79.5H160M40.5 0V40M120.5 40V80' stroke='%23000' stroke-opacity='.28' fill='none'/%3E%3C/svg%3E");
}

.doc-board .shelf-board { max-width: 960px; }

.doc-stand {
  margin: 0;
  padding: 16px var(--gutter) 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
}

.doc {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) var(--section);
}

.doc > p:first-child { font-size: var(--step-1); }

.doc h2 {
  margin: 48px 0 12px;
  font-size: var(--step-2);
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: var(--step-1);
}

.doc ul,
.doc ol { padding-left: 1.3em; }

.doc li + li { margin-top: 6px; }

.doc address {
  margin: 0 0 16px;
  font-style: normal;
}

.doc-toc {
  margin: 28px 0 0;
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
}

.doc-toc h2 {
  margin: 0 0 6px;
  font-size: var(--step-1);
}

.doc-toc ol { margin: 0; }

.doc-dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 24px;
  margin: 0 0 16px;
}

.doc-dl dt { font-weight: 700; }
.doc-dl dd { margin: 0 0 10px; }

.doc-highlight {
  margin: 24px 0;
  padding: 18px 22px;
  background: #fff4f2;
  border: 3px solid var(--red);
  border-radius: var(--radius);
}

.doc-highlight h3 { margin-top: 0; }
.doc-highlight p:last-child { margin-bottom: 0; }

.table-scroll {
  margin: 16px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cookie-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.93rem;
}

.cookie-table caption {
  padding: 12px 14px;
  font-weight: 700;
  text-align: left;
}

.cookie-table th,
.cookie-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.cookie-table thead th { background: var(--cellar-paper); }

/* Narrow screens: each row becomes a stacked card with "label / value" pairs. */
@media (max-width: 719px) {
  .table-scroll { overflow-x: visible; }

  .cookie-table,
  .cookie-table caption,
  .cookie-table tbody,
  .cookie-table tr,
  .cookie-table td { display: block; }

  .cookie-table { min-width: 0; }

  .cookie-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .cookie-table tr { border-top: 1px solid var(--line); }

  .cookie-table td {
    padding: 4px 14px;
    border-top: 0;
    overflow-wrap: break-word;
    hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
  }

  .cookie-table td:first-child { padding-top: 12px; }
  .cookie-table td:last-child { padding-bottom: 12px; }

  .cookie-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--rind);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

.lost {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) var(--section);
  text-align: center;
}

.lost-wheel {
  width: min(220px, 60vw);
  height: auto;
}

.lost h1 {
  margin: 0;
  font-size: var(--step-4);
}

.lost p { margin: 0; }

.lost .shelf-tag { margin: 0; }

/* ---------- Consent banner and dialog ---------- */
.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  max-width: 680px;
  max-height: calc(100dvh - 32px);
  margin-inline: auto;
  overflow-y: auto;
  padding: 22px 24px;
  background: var(--paper);
  border: 2px solid var(--charcoal);
  border-top: 8px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(42, 36, 32, 0.35);
}

.consent-title {
  margin: 0 0 8px;
  font-size: var(--step-2);
}

.consent-text {
  margin: 0 0 16px;
  font-size: 0.97rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.consent-btn {
  min-height: 46px;
  padding: 0 22px;
  background: var(--charcoal);
  border: 2px solid var(--charcoal);
  border-radius: var(--radius);
  color: var(--cream);
  font-weight: 700;
  cursor: pointer;
}

.consent-btn:hover {
  background: var(--charcoal-2);
  border-color: var(--charcoal-2);
}

.consent-btn-save {
  background: var(--gold);
  color: var(--charcoal);
}

.consent-btn-save:hover {
  background: var(--gold-soft);
  border-color: var(--charcoal);
}

.consent-link {
  min-height: 46px;
  padding: 0 6px;
  background: none;
  border: 0;
  color: var(--rind);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.consent-link:hover { color: var(--red); }

.consent-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--charcoal);
  border-radius: 10px;
  color: var(--charcoal);
}

.consent-dialog::backdrop { background: rgba(42, 36, 32, 0.62); }

.consent-dialog-inner { padding: 24px 26px; }

.consent-categories {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.consent-category {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.consent-category p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.consent-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.consent-category h3 {
  margin: 0;
  font-size: var(--step-1);
}

.consent-always {
  color: #3a6631;
  font-size: 0.9rem;
  font-weight: 700;
}

.consent-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 56px;
  height: 44px;
  align-items: center;
}

.consent-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.consent-switch-track {
  position: relative;
  width: 56px;
  height: 30px;
  border-radius: 15px;
  background: #b8ad99;
  transition: background-color 0.2s ease;
}

.consent-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.consent-switch input:checked + .consent-switch-track { background: var(--meadow); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(26px); }

.consent-switch input:focus-visible + .consent-switch-track {
  outline: 3px solid var(--charcoal);
  outline-offset: 2px;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 599px) {
  .wheel-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 399px) {
  .wedge { padding: 0 18px 0 14px; }
  .wedge-brand { padding-left: 10px; font-size: 1.05rem; }
  .wedge-action { font-size: 1rem; }
  .brand-mark { width: 26px; height: 26px; }
}

@media (max-width: 359px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 640px) {
  .manifest-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .manifest-code {
    border-bottom: 0;
    border-right: 2px solid var(--charcoal);
  }

  .manifest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .box-wide { grid-column: 1 / -1; }

  .doc-dl { grid-template-columns: minmax(150px, max-content) minmax(0, 1fr); }
  .doc-dl dd { margin: 0 0 10px; }
}

@media (min-width: 700px) {
  .js .label-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .js .label-h { grid-row: 1; }
  .js .label-h:nth-of-type(n + 4) { grid-row: 3; }
  .js .label-panel { grid-column: 1 / -1; grid-row: 2; margin: 22px 0 30px; }
  .js .label-panel:nth-of-type(n + 4) { grid-row: 4; margin-bottom: 0; }

  .js .label-h::before { left: calc(50% - 1px); }

  .js .label-tag {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: start;
    height: 100%;
    min-height: 136px;
    padding: 40px 14px 18px;
    border-radius: 12px 12px 18px 18px;
    text-align: center;
    transform-origin: 50% -24px;
  }

  .js .label-tag::before {
    top: 12px;
    left: calc(50% - 6px);
  }

  /* little pointer from the open label down to its answer */
  .js .label-tag[aria-expanded="true"]::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: calc(50% - 12px);
    border: 12px solid transparent;
    border-top-color: var(--red);
    border-bottom: 0;
  }

  .ledger-row { grid-template-columns: 52px minmax(160px, 260px) minmax(0, 1fr); }
  .ledger dd { grid-column: 3; }
}

@media (min-width: 760px) {
  .ageing { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* time axis under the shelves */
  .ageing-axis {
    position: relative;
    display: block;
    height: 2px;
    margin: 28px 12px 0;
    background: var(--rind);
  }

  .ageing-axis::after {
    content: "";
    position: absolute;
    top: -7px;
    right: -2px;
    border: 8px solid transparent;
    border-left: 12px solid var(--rind);
    border-right: 0;
  }

  .ageing-axis span {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 0 14px;
    background: var(--cream);
    color: var(--rind);
    font-family: var(--font-display);
    font-weight: 700;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 900px) {

  .routes-board { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .vat-board { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

  .ledger-block {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .ledger-title { grid-column: 1 / -1; }
}

/* Keep in sync with FULL_NAV_QUERY in main.js: the full wedge nav replaces the wheel. */
@media (min-width: 1000px) {
  .wedge-list { display: flex; }

  .wheel-toggle,
  .laibkarte { display: none; }
}

@media (min-width: 1100px) {
  .cellar-wall { grid-template-columns: minmax(0, 1fr) minmax(0, 620px) minmax(0, 1fr); }

  .cellar-rack {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
  }

  .cellar-rack-right { justify-self: end; }
}

@media (min-width: 1100px) {
  .js .label-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .js .label-h:nth-of-type(n) { grid-row: 1; }
  .js .label-panel:nth-of-type(n) { grid-row: 2; margin-bottom: 0; }
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.stamp-wheel { animation: wheel-settle 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.rind-stamp { animation: stamp-press 0.7s 0.7s ease-out both; }

@keyframes wheel-settle {
  from { opacity: 0; transform: translateY(-28px); }
}

@keyframes stamp-press {
  from { box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); transform: translate(-50%, -50%) scale(1.08); }
}

.route.is-active { animation: route-flow 1.2s linear infinite; }

@keyframes route-flow {
  to { stroke-dashoffset: -36; }
}

.js .laibkarte:not([hidden]) .wheel { animation: wheel-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes wheel-in {
  from { opacity: 0; transform: rotate(-40deg) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .cellar-bar,
  .alps,
  .consent,
  .footer-legal { display: none; }

  body { background: #fff; }
  .site-footer { background: #fff; color: #000; }
  .country-line { color: #000; }
}
