/* Tandemwerk · gemeinsamer Kopf, Fuß, Daumen-Leiste, Menü-Blatt und Pause für alle 12 Seiten.
   Reparatur „gemeinsam“ (02.11.2026, G1–G10): Vorbild ist die Startseite. Maße, Farben und Zustände stehen nur hier,
   keine Seite überschreibt sie. Farben nur Kobalt, Neongrün, Tiefsee, Weiß. Kopf und Fuß: Knöpfe 4 px; Daumen-Leiste und
   Menü-Blatt: Pille. Das Verhalten (Menü, Pause, Licht in der Pille) steht in kopf.js. */
:root {
  --kopf: 68px;
  --h-leiste-h: 56px; --h-leiste-abstand: 12px;
  --h-unten: calc(var(--h-leiste-h) + var(--h-leiste-abstand) * 2 + env(safe-area-inset-bottom, 0px));
}

/* ---------- Kopf ---------- */
html body .site-header.tw-header {
  position: absolute; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 64px; height: auto; margin: 0; padding: 0; background: transparent; color: #f4f4ef; pointer-events: none; transform: none; box-sizing: border-box;
}
html body .site-header.tw-header::before, html body .site-header.tw-header::after { display: none !important; }
html body .tw-header > * { pointer-events: auto; }
html body .tw-header .tw-nav-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 18px; width: 100%; margin: 0;
  padding: 8px clamp(20px, 2.78vw, 64px); box-sizing: border-box;
}
html body .tw-header .tw-brand {
  flex: 0 0 auto; margin: 0; padding: 10px 12px; border-radius: 4px; background: #2442eb; color: #f4f4ef; text-decoration: none; white-space: nowrap;
  font: 500 25px/1 'Familjen Grotesk', Familjen, sans-serif; letter-spacing: -1px;
}
.tw-header .menu-toggle { display: none !important; }

/* Pille mit den Leistungen: Glas der Startseite (ohne Unschärfe dahinter), Licht unter dem Zeiger, aktiver Punkt als Pille */
html body .tw-header .tw-links {
  position: relative; inset: auto; display: flex !important; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 0; max-width: 100%;
  margin: 0 0 0 auto; padding: 4px; border: 1px solid #ffffff2e; border-radius: 999px; color: #f4f4ef; visibility: visible; opacity: 1; transform: none;
  /* Kobalt-Ton statt der früheren Unschärfe dahinter (Muster 11): auf der Startseite gemessen fast dieselbe Farbe wie vorher */
  background: linear-gradient(180deg, #ffffff2a, #ffffff0c), #2442eb33; box-shadow: inset 0 1px 0 #ffffff4a, inset 0 -1px 0 #ffffff10, 0 14px 36px -16px #000a1fd9;
  -webkit-backdrop-filter: none; backdrop-filter: none; font: 400 13px/1.3 'Instrument Sans', Instrument, sans-serif; text-transform: none; letter-spacing: 0;
}
html body .tw-header .tw-links a {
  position: relative; z-index: 1; display: flex; align-items: center; min-height: 42px; padding: 0 15px; border-radius: 999px; color: #eef2fb;
  text-decoration: none; font: inherit; white-space: nowrap;
}
html body .tw-header .tw-links a::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 200ms cubic-bezier(.23, 1, .32, 1);
}
html body .tw-header .tw-links a[aria-current=page] { background: #f4f4ef1f; box-shadow: inset 0 0 0 1px #d7f52a8c; color: #eef2fb; text-decoration: none; }
html body .tw-header .tw-links a:focus-visible::after { transform: scaleX(1); }
html body .tw-header .tw-links .hn-licht {
  position: absolute; inset: 0; z-index: 0; border-radius: 999px; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 160% at 50% 0%, #ffffff47, #ffffff12 62%), #2442eb66; box-shadow: inset 0 1px 0 #ffffff59;
  clip-path: inset(3px 50% 3px 50% round 999px); transition: clip-path .24s cubic-bezier(.23, 1, .32, 1), opacity .16s ease;
}
html body .tw-header .tw-links .hn-licht.is-an { opacity: 1; }

html body .tw-header .tw-contact {
  display: flex; align-items: center; flex: 0 0 auto; min-height: 44px; margin: 0; padding: 0 15px; border: 0; border-radius: 4px; background: #d7f52a;
  color: #20211f; text-decoration: none; white-space: nowrap; font: 400 13px/1.3 'Instrument Sans', Instrument, sans-serif; transition: background-color .2s ease;
}
html body .tw-header .tw-contact[aria-current=page] { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  html body .tw-header .tw-links a:hover { color: #fff; }
  html body .tw-header .tw-links a:hover::after { transform: scaleX(1); }
  html body .tw-header .tw-contact:hover { background: #e4ff52; }
}

/* Fokus: Kobalt mit hellem Rand an Wortmarke, Knöpfen und Fuß; Neon in der Pille */
html body .tw-header a:focus-visible, html body .tw-header button:focus-visible, html body .tw-footer a:focus-visible {
  outline: 3px solid #2442eb !important; outline-offset: 3px; box-shadow: 0 0 0 6px #f4f4ef !important;
}
html body .tw-header .tw-links a:focus-visible { outline: 2px solid #d7f52a !important; outline-offset: -2px; box-shadow: none !important; }

/* Sprunglinks: Form wie Kopf (4 px) */
html body :is(.skip-link, .w-sprung, .ws-sprung, .sprung, .ka-sprung, .pg-sprung, .kk-sprung, .uu-sprung) { border-radius: 4px; }
html body .skip:focus, html body .skip-link:focus { z-index: 60; }

/* ---------- Pause: 44 px, rund, ein Druckzustand (weiß mit Tiefsee-Dreieck) ---------- */
html body .tw-header .tw-motion { position: static; display: flex; flex-shrink: 0; }
html body .tw-header .tw-pause[data-pause] {
  position: relative; inset: auto; z-index: auto; flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px;
  margin: 0; padding: 0; border: 1px solid #c8dfeb66; border-radius: 50%; background: #08213adb; color: #f4f4ef; font-size: 0; line-height: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .14s cubic-bezier(.23, 1, .32, 1);
}
html body .tw-header .tw-pause[data-pause][hidden] { display: none; }
html body .tw-header .tw-pause[data-pause]::before { content: ''; flex: none; box-sizing: content-box; width: 10px; height: 13px; margin: 0; border: 0; border-inline: 3px solid currentColor; }
html body .tw-header .tw-pause[data-pause][aria-pressed=true] { background: #f4f4ef; border-color: #f4f4ef; color: #061528; }
html body .tw-header .tw-pause[data-pause][aria-pressed=true]::before { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-block: 7px solid transparent; margin-left: 3px; }
html body .tw-header .tw-pause[data-pause]:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { html body .tw-header .tw-pause[data-pause]:hover { border-color: #f4f4ef; } }
/* Endlose CSS-Bewegung der Wissensseiten hält mit an */
html.tw-pausiert .w-ring-lauf { animation-play-state: paused; }

/* ---------- Fuß ---------- */
.tw-footer {
  position: relative; z-index: 11; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px clamp(24px, 4vw, 80px); align-items: start;
  padding: clamp(48px, 7vw, 110px) clamp(20px, 5vw, 96px) 48px; background: linear-gradient(180deg, #0a2442, #061528); color: #e9f1f8;
  border-top: 1px solid #2c5375; font: 400 14px/1.5 'Instrument Sans', Instrument, sans-serif;
}
.tw-footer nav { display: flex; flex-direction: column; gap: 2px; }
.tw-footer nav p { margin: 0 0 8px; color: #8fb3cf; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.tw-footer nav span { color: #8fb3cf; font-size: 12px; margin-top: 8px; }
.tw-footer a { color: inherit; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.tw-footer .tw-foot-mark { font: 500 clamp(48px, 7vw, 120px)/.9 'Familjen Grotesk', Familjen, sans-serif; letter-spacing: -.05em; min-height: 0; }
.tw-foot-mark span { color: #d7f52a; }
.tw-foot-brand p { margin: 14px 0 22px; color: #a9c3d8; }
.tw-footer .tw-foot-cta { min-height: 44px; padding: 0 18px; border-radius: 4px; background: #d7f52a; color: #0a1a14; font-weight: 500; }
@media (hover: hover) { .tw-footer a:not(.tw-foot-cta):hover { color: #d7f52a; } }
/* Eigene Seitenfüße weichen dem gemeinsamen Fuß; Fußleisten in Beispiel-Welten (quell, Demo) bleiben. */
footer.site-footer, body > footer:not(.tw-footer) { display: none !important; }
@media (max-width: 900px) { .tw-footer { grid-template-columns: 1fr 1fr; } .tw-foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .tw-footer { grid-template-columns: 1fr; } }

/* ---------- Rechtsseiten (heller Grund): der Kopf steht als dunkles Band im Fluss ---------- */
html body.detail-page .site-header.tw-header { position: relative; background: #061528; }
/* Der Schatten unter der Pille fiele dort auf den hellen Grund */
html body.detail-page .tw-header .tw-links { box-shadow: inset 0 1px 0 #ffffff4a, inset 0 -1px 0 #ffffff10; }

/* ---------- 901–1100 px: zwei Zeilen wie auf der Startseite ---------- */
@media (min-width: 901px) and (max-width: 1100px) {
  :root { --kopf: 119px; }
  html body .tw-header .tw-nav-inner { flex-wrap: wrap; gap: 6px 10px; }
  html body .tw-header .tw-links { order: 3; flex-basis: 100%; justify-content: space-between; margin: 0; }
  html body .tw-header .tw-contact { margin-left: auto; }
}

/* ---------- Handy: Kopf nur mit Wortmarke; Menü, Projekt starten und Pause sitzen in Daumen-Leiste und Menü-Blatt ---------- */
html body .h-daumen, html body .h-blatt { display: none; }
@media (max-width: 900px) {
  :root { --kopf: 64px; }
  html { scroll-padding-bottom: calc(var(--h-unten) + 24px); }
  html body .tw-header .tw-nav-inner { justify-content: flex-start; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) clamp(20px, 4.4vw, 76px) 0; }
  html body .tw-header .tw-brand { font-size: 21px; padding: 9px 10px; }
  html body .tw-header .tw-links, html body .tw-header .tw-contact, html body .tw-header .tw-motion, html body .tw-header .tw-pause { display: none !important; }
  .tw-footer { padding-bottom: calc(var(--h-unten) + 40px); }
  .tw-footer nav { gap: 16px; }

  html body .h-daumen {
    position: fixed; z-index: 45; left: 50%; bottom: calc(var(--h-leiste-abstand) + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px;
    width: min(100% - 24px, 406px); margin: 0; padding: 0; transform: translateX(-50%); pointer-events: none;
  }
  html body .h-daumen::before, html body .h-daumen::after {
    content: ''; position: absolute; z-index: -1; left: -12px; right: -12px; bottom: calc(-1 * var(--h-leiste-abstand) - env(safe-area-inset-bottom, 0px));
    height: calc(var(--h-unten) + 40px); pointer-events: none; transition: opacity .22s ease;
  }
  html body .h-daumen::before { background: linear-gradient(180deg, #040c1a00 0, #040c1ad1 30px, #040c1af7 46px); }
  /* Heller Grund (Rechtsseiten): heller Verlauf; über dem dunklen Fuß wieder dunkel (kopf.js setzt data-hell) */
  html body .h-daumen::after { background: linear-gradient(180deg, #f4f4ef00 0, #f4f4efd9 30px, #f4f4effa 46px); opacity: 0; }
  html body .h-daumen[data-hell]::before { opacity: 0; }
  html body .h-daumen[data-hell]::after { opacity: 1; }
  html body .h-daumen > * { pointer-events: auto; }
  html body .h-daumen :focus-visible { outline: 3px solid #f4f4ef; outline-offset: 3px; }
  html body .h-daumen__menue {
    display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; height: var(--h-leiste-h); margin: 0; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
    background: #0f1c33; color: #f4f4ef; font: 500 16px/1 'Instrument Sans', sans-serif; text-decoration: none; cursor: pointer;
    box-shadow: inset 0 0 0 1px #f4f4ef2e, 0 12px 30px -10px #000000bf; transition: transform .14s cubic-bezier(.23, 1, .32, 1);
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  html body .h-daumen__menue:active { transform: scale(.96); }
  html body .h-daumen__striche { display: grid; gap: 5px; }
  html body .h-daumen__striche i { display: block; width: 16px; height: 2px; border-radius: 1px; background: currentColor; }
  html body .h-daumen__striche i + i { width: 11px; }
  html body .h-daumen__los {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; height: var(--h-leiste-h); margin: 0; padding: 0 16px; border: 0; border-radius: 999px;
    background: #d7f52a; color: #20211f; font: 500 16px/1 'Instrument Sans', sans-serif; text-decoration: none; white-space: nowrap;
    box-shadow: 0 12px 30px -10px #000000b3; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(.96);
    transition: opacity .2s cubic-bezier(.23, 1, .32, 1), transform .3s cubic-bezier(.23, 1, .32, 1), visibility 0s linear .3s;
  }
  html body .h-daumen[data-los] .h-daumen__los {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .24s cubic-bezier(.23, 1, .32, 1), transform .36s cubic-bezier(.23, 1, .32, 1), visibility 0s;
  }
  html body .h-daumen[data-los] .h-daumen__los:active { transform: scale(.97); transition-duration: .14s; }

  html body .h-blatt {
    display: block; position: fixed; inset: auto 0 0; width: 100%; max-width: 430px; max-height: min(88svh, 720px); margin: 0 auto; padding: 0;
    border: 0; border-radius: 28px 28px 0 0; background: #0f1c33; color: #f4f4ef; overflow: hidden;
    box-shadow: 0 -1px 0 #f4f4ef24, 0 -30px 60px #00000073; transform: translateY(100%); transition: transform .42s cubic-bezier(.32, .72, 0, 1);
  }
  html body .h-blatt:not([open]) { display: none; }
  html body .h-blatt[data-offen] { transform: none; }
  html body .h-blatt[data-zu] { transform: translateY(100%); transition: transform .26s cubic-bezier(.23, 1, .32, 1); }
  html body .h-blatt[data-zieht] { transition: none; }
  html body .h-blatt::backdrop { background: #020710a3; opacity: 0; transition: opacity .32s ease; }
  html body .h-blatt[data-offen]::backdrop { opacity: 1; }
  html body .h-blatt[data-zu]::backdrop { opacity: 0; transition-duration: .24s; }
  html body .h-blatt__griff { display: grid; place-items: center; height: 30px; touch-action: none; cursor: grab; }
  html body .h-blatt__griff i { width: 42px; height: 5px; border-radius: 3px; background: #f4f4ef52; }
  /* Unten bleibt der Platz der Daumen-Leiste frei: Ein zweiter Tipp auf „Menü“ trifft keinen Knopf im Blatt, sondern schließt es (kopf.js) */
  html body .h-blatt__innen { max-height: calc(min(88svh, 720px) - 30px); overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(var(--h-unten) + 14px); }
  html body .h-blatt__titel { margin: 0; color: #a9bbcf; font: 400 13px/1.4 'Instrument Sans', sans-serif; }
  html body .h-blatt__nav { display: grid; margin-top: 6px; }
  html body .h-blatt__nav a {
    display: flex; align-items: center; min-height: 58px; border-bottom: 1px solid #f4f4ef24; color: #f4f4ef;
    font: 500 28px/1 'Familjen Grotesk', sans-serif; letter-spacing: -.035em; text-decoration: none;
  }
  html body .h-blatt__nav a[aria-current=page] { color: #d7f52a; }
  html body .h-blatt__fuss { display: grid; gap: 10px; margin-top: 22px; }
  html body .h-blatt__start {
    display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 999px; background: #d7f52a; color: #20211f;
    font: 500 17px/1 'Instrument Sans', sans-serif; text-decoration: none;
  }
  html body .h-blatt__mail { display: flex; align-items: center; justify-content: center; min-height: 48px; color: #f4f4ef; font: 400 16px/1 'Instrument Sans', sans-serif; }
  html body .h-blatt__bewegung {
    min-height: 48px; margin: 0; border: 0; border-radius: 999px; background: none; color: #a9bbcf; font: 500 15px/1 'Instrument Sans', sans-serif;
    box-shadow: inset 0 0 0 1px #f4f4ef2e; cursor: pointer;
  }
  html body .h-blatt__bewegung[aria-pressed=true] { background: #f4f4ef; color: #061528; box-shadow: none; }
  html body .h-blatt__bewegung[hidden] { display: none; }
  html body .h-blatt__zu {
    position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: #f4f4ef1a; color: #f4f4ef; cursor: pointer;
  }
  html body .h-blatt__zu svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }
  html body .h-blatt :focus-visible { outline: 3px solid #d7f52a; outline-offset: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html body .tw-header .tw-links a::after, html body .tw-header .tw-links .hn-licht, html body .tw-header .tw-pause[data-pause], html body .h-daumen__menue,
  html body .h-blatt, html body .h-blatt[data-zu], html body .h-blatt::backdrop, html body .h-daumen__los, html body .h-daumen[data-los] .h-daumen__los,
  html body .h-daumen::before, html body .h-daumen::after { transition: none; }
}
