/* Unterseiten – übernommen aus respect-design/src/_shell.html */
  /* Gemeinsames Layout aller Unterseiten (Campsite-Stil: weiss, ruhig, Pillen, feine Linien).
     Wird von build.py um den Inhalt aus src/<seite>.html gelegt. */
  :root {
    --red: #e01515; --red-logo: #ff0002; --red-deep: #ac0004;
    --ink: #171717; --graphite: #525252; --steel: #737373; --silver: #a3a3a3;
    --fog: #f0f0f0; --mist: #f5f5f5; --white: #ffffff; --wash: #fef3c7;
    --hair: rgba(0, 0, 0, .08);
    --shadow-card: 0 1px 1px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.05), 0 8px 16px rgba(0,0,0,.05);
    --shadow-btn: 0 1px 2px rgba(0,0,0,.06);
    --max: 1040px;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 96px; }
  body {
    margin: 0; background: var(--white); color: var(--ink);
    font-family: "Verdana Pro", "Verdana Pro Light", Verdana, Geneva, "DejaVu Sans", sans-serif;
    font-size: 16px; font-weight: 300; line-height: 1.6;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
    position: relative;
  }
  /* Der Wollfaden: läuft am linken Rand von oben nach unten durch die ganze Seite */
  #thread { position: absolute; top: 0; left: 0; width: 100%; z-index: 1; pointer-events: none; overflow: hidden; }
  #mpath { fill: none; stroke-linejoin: round; }
  @media (max-width: 1199px) { #thread { display: none; } }   /* nur auf breiten Bildschirmen, wo links genug Rand frei ist */
  main { position: relative; z-index: 2; }
  footer { position: relative; z-index: 0; }   /* unter dem Faden, damit die Trennlinie ihn nicht überdeckt */
  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
  .wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
  .narrow { width: min(720px, 100% - 48px); margin-inline: auto; }

  /* ---------- Navigation: schwebende Insel ---------- */
  .island {
    position: fixed; top: 10px; left: 50%; z-index: 40; transform: translateX(-50%);
    width: max-content; max-width: calc(100% - 16px);
    background: var(--white); border-radius: 9999px;
    box-shadow: 0 0 0 1px var(--hair), 0 2px 6px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.10);
    animation: island-in .7s cubic-bezier(.2, 1.35, .35, 1) both;
  }
  @keyframes island-in { from { opacity: 0; transform: translate(-50%, -150%) scale(.6); } }
  .island-inner { display: flex; align-items: center; gap: 18px; padding: 7px 12px 7px 18px; }
  .s-logo { flex: none; display: block; }
  .s-logo img { height: 40px; width: auto; }
  .nav { display: flex; align-items: center; gap: 2px; }
  .nav a, .nav-item {
    font: inherit; font-size: 12px; font-weight: 300; line-height: 28px; color: var(--ink);
    padding: 0 9px; border-radius: 9999px; background: none; border: 0; cursor: pointer;
    transition: background .15s;
  }
  .nav-item { display: inline-flex; align-items: center; gap: 6px; }
  .nav-item svg { flex: none; transition: transform .2s; }
  .nav a:hover, .nav-item:hover, .has-menu:hover .nav-item, .has-menu.open .nav-item, .nav [aria-current="page"] { background: var(--mist); }
  .has-menu:hover .nav-item svg, .has-menu.open .nav-item svg { transform: rotate(180deg); }
  .nav a.pill { margin-left: 2px; box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(0,0,0,.06); }
  .has-menu { position: relative; }
  .menu {
    position: absolute; top: 100%; left: 0; z-index: 30;
    min-width: 178px; margin: 0; padding: 6px; list-style: none;
    background: var(--white); border-radius: 12px;
    box-shadow: 0 0 0 1px var(--hair), 0 4px 10px rgba(0,0,0,.06), 0 14px 30px rgba(0,0,0,.08);
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity .16s, transform .16s, visibility 0s .16s;
  }
  .menu.menu-right { left: auto; right: 0; }
  .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  .has-menu:hover .menu, .has-menu:focus-within .menu, .has-menu.open .menu { opacity: 1; visibility: visible; transform: translateY(12px); transition-delay: 0s; }
  .nav .menu a { display: block; padding: 0 10px; line-height: 32px; border-radius: 8px; white-space: nowrap; font-size: 13px; }
  .nav .menu .sep { height: 1px; margin: 5px 4px; background: var(--fog); }
  /* ---------- Megamenü «Projekte»: Kategorien als Spalten, darunter ihre Projekte ----------
     Wird von build.py in die Startseite und in alle Unterseiten eingesetzt. Die Inhalte erzeugt build.py
     aus den Kategorie-Seiten (src/flachs.html usw.), neue Projekte erscheinen also automatisch. */
  .menu.mega {
    width: min(780px, calc(100vw - 16px)); min-width: 0; padding: 8px; border-radius: 18px;
    max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
  }
  .menu.mega::before { top: calc(-1 * var(--bridge, 14px)); height: var(--bridge, 14px); }   /* Brücke für den Mauszeiger */
  .mega-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 2px; }
  /* Kopf und Projektliste teilen sich die Zeilen aller Spalten: die Listen beginnen auf einer Linie */
  .mega-col { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-content: start; padding: 4px; border-radius: 12px; }
  .mega-col + .mega-col { box-shadow: -1px 0 0 var(--fog); border-radius: 0; }
  .nav .menu.mega a { display: block; white-space: normal; animation: none; border-radius: 10px; transition: background .15s, color .15s; }
  .nav .menu.mega a:hover, .nav .menu.mega a:focus-visible { background: var(--mist); }
  .nav .menu.mega .mega-head { padding: 10px 10px 12px; line-height: 1.4; }
  .mega-head b { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
  .mega-head b small { font-size: 11px; font-weight: 300; letter-spacing: 0; color: var(--silver); }
  .mega-head span { display: block; margin-top: 3px; font-size: 12px; font-weight: 300; color: var(--steel); }
  .mega-col ul { margin: 0; padding: 0; list-style: none; }
  .nav .menu.mega .mega-col li a { position: relative; padding: 7px 10px 7px 24px; font-size: 13px; line-height: 1.35; color: var(--graphite); }
  .mega-col li a::before {   /* kleiner Fadenknoten vor jedem Projekt */
    content: ""; position: absolute; left: 11px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%; box-shadow: 0 0 0 1.5px var(--silver); transition: box-shadow .15s, background .15s;
  }
  .nav .menu.mega .mega-col li a:hover { color: var(--ink); }
  .mega-col li a:hover::before { background: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
  @media (max-width: 860px) {
    .mega-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 6px; }
    .mega-col + .mega-col { box-shadow: none; }
    .mega-col:nth-child(even) { box-shadow: -1px 0 0 var(--fog); border-radius: 0; }
  }


  /* ---------- Seitenkopf (Übersichtsseiten, zentriert) ---------- */
  .page-head { padding: 150px 0 44px; text-align: center; }
  .page-head h1 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
  .page-head .lead { margin: 14px auto 0; max-width: 34em; font-size: clamp(16px, 1.7vw, 20px); font-weight: 400; line-height: 1.5; color: var(--graphite); text-wrap: balance; }
  .rise { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }

  /* ---------- Kacheln (wie die Beitragskarten bei Campsite) ---------- */
  .bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile {
    display: flex; flex-direction: column; justify-content: flex-end; min-height: 244px; overflow: hidden;
    background: #fafafa; border: 1px solid rgba(0, 0, 0, .06); border-radius: 14px;
    transition: background .2s, border-color .2s, transform .2s;
  }
  a.tile:hover { background: var(--mist); border-color: rgba(0, 0, 0, .1); transform: translateY(-2px); }
  .tile.feature { grid-row: span 2; min-height: 500px; }
  .tile.wide { grid-column: 1 / -1; min-height: 0; }
  .tile-media { flex: 1; min-height: 160px; background: var(--fog) center / cover no-repeat; }
  .tile-media.placeholder { display: grid; place-items: center; color: var(--silver); font-size: 13px; }
  .tile-body { padding: 20px 22px 22px; }
  .tile h2, .tile h3 { font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
  .tile p { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tile .meta { margin-top: 6px; font-size: 13px; color: var(--silver); }
  /* ---------- Zeitleiste (Blog): der Faden läuft vom Knäuel durch alle Beiträge ---------- */
  .timeline { list-style: none; margin: 0 auto; padding: 8px 0 0; max-width: 940px; }
  .tl-item { display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); grid-template-areas: "card dot date"; align-items: center; padding: 22px 0; }
  .tl-item:nth-child(odd) { grid-template-areas: "date dot card"; }
  .tl-dot { grid-area: dot; justify-self: center; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); box-shadow: 0 0 0 4px var(--white); }
  .tl-date { grid-area: date; font-size: 14px; color: var(--steel); }
  .tl-date b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; color: var(--ink); }
  .tl-item:nth-child(odd) .tl-date { text-align: right; }
  .tl-card { grid-area: card; min-height: 0; }
  .tl-card .tile-media { flex: none; height: 190px; }
  .tl-item.tl-end { grid-template-areas: ". dot ." "note note note"; row-gap: 12px; padding-bottom: 0; }
  .tl-ball { grid-area: dot; justify-self: center; display: block; width: 84px; max-width: none; height: auto; position: relative; }
  .tl-end .note { grid-area: note; text-align: center; }
  .tl-item.tl-start { grid-template-areas: "note note note" ". dot ."; row-gap: 12px; padding-top: 0; }
  .tl-start .note { grid-area: note; text-align: center; }
  .tl-start .tl-dot { border-color: var(--silver); border-style: dashed; }
  @media (max-width: 860px) {
    .tl-item, .tl-item:nth-child(odd) { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "dot date" "dot card"; column-gap: 16px; row-gap: 10px; padding: 16px 0; }
    .tl-item:nth-child(odd) .tl-date { text-align: left; }
    .tl-date b { display: inline; font-size: 15px; letter-spacing: -.01em; margin-right: 6px; }
    .tl-dot { width: 16px; height: 16px; }
    .tl-item.tl-end, .tl-item.tl-end:nth-child(even) { grid-template-areas: "dot note"; }
    .tl-ball { width: 46px; }
    .tl-end .note { text-align: left; }
    .tl-item.tl-start, .tl-item.tl-start:nth-child(odd) { grid-template-areas: "dot note"; }
    .tl-start .note { text-align: left; }
  }
  .kicker { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 400; color: var(--red); }

  /* Liste mit Linie ("Mehr …") */
  .more { margin-top: 44px; }
  .more-label { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--red); }
  .more-label::after { content: ""; flex: 1; height: 1px; background: var(--fog); }
  .rows { margin-top: 10px; }
  .rows a { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 9px 0; font-size: 16px; font-weight: 400; border-radius: 8px; transition: padding .15s, background .15s; }
  .rows a:hover { background: var(--mist); padding-inline: 10px; }
  .rows a span { flex: none; font-size: 14px; font-weight: 300; color: var(--silver); }

  /* ---------- Artikel-Layout (Detailseiten) ---------- */
  .article { width: min(704px, 100% - 48px); margin-inline: auto; padding-top: 140px; }
  .back { display: inline-block; font-size: 14px; color: var(--silver); transition: color .15s; }
  .back:hover { color: var(--ink); }
  .article h1 { margin-top: 10px; font-size: clamp(32px, 4.6vw, 52px); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
  .article .sub { margin-top: 14px; font-size: clamp(16px, 1.7vw, 19px); font-weight: 400; line-height: 1.5; color: var(--graphite); }
  .hero-img { margin-top: 32px; border-radius: 14px; aspect-ratio: 16 / 9; background: var(--fog) center / cover no-repeat; border: 1px solid rgba(0, 0, 0, .06); }
  .hero-img.placeholder { display: grid; place-items: center; color: var(--silver); font-size: 13px; }
  .prose { margin-top: 32px; font-size: 17px; line-height: 1.7; color: var(--graphite); }
  .prose p + p { margin-top: 18px; }
  .prose h2 { margin: 40px 0 10px; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; color: var(--ink); }
  .prose b, .prose strong { font-weight: 600; color: var(--ink); }
  .prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--silver); }
  .prose ul, .prose ol { margin-top: 14px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
  .prose li { position: relative; padding-left: 22px; }
  .prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--silver); }
  .prose ol { counter-reset: n; }
  .prose ol li { padding-left: 34px; counter-increment: n; }
  .prose ol li::before { content: counter(n); position: absolute; left: 0; top: .28em; width: 22px; height: 22px; border-radius: 50%; background: var(--fog); color: var(--ink); font-size: 12px; font-weight: 400; line-height: 22px; text-align: center; }
  .prose blockquote { margin: 28px 0; padding-left: 18px; border-left: 2px solid var(--red); font-size: 19px; font-weight: 400; line-height: 1.5; color: var(--ink); }
  .prose figure { margin-top: 0; }
  .prose figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--silver); }
  .shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
  .shots .ph { aspect-ratio: 4 / 3; border-radius: 10px; background: #fafafa; border: 1px solid rgba(0, 0, 0, .06); display: grid; place-items: center; font-size: 13px; color: var(--silver); }
  .facts { margin-top: 14px; border-radius: 14px; background: #fafafa; border: 1px solid rgba(0, 0, 0, .06); padding: 4px 20px; }
  .facts div { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px 0; font-size: 15px; line-height: 1.5; }
  .facts div + div { border-top: 1px solid rgba(0, 0, 0, .06); }
  .facts dt { font-weight: 600; color: var(--ink); } .facts dd { margin: 0; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
  .cards > div { padding: 16px 18px; border-radius: 14px; background: #fafafa; border: 1px solid rgba(0, 0, 0, .06); font-size: 15px; line-height: 1.5; }
  .cards b { display: block; margin-bottom: 2px; }
  .callout { margin-top: 40px; padding: 24px; border-radius: 14px; background: var(--ink); color: #d4d4d4; font-size: 16px; line-height: 1.6; }
  .callout b { display: block; margin-bottom: 6px; font-size: 19px; letter-spacing: -.02em; color: var(--white); }
  .note { font-size: 14px; color: var(--silver); }

  /* ---------- Buttons, Formular ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px;
    border-radius: 9999px; font-size: 13px; font-weight: 400; letter-spacing: -.1px;
    border: 1px solid transparent; box-shadow: var(--shadow-btn); cursor: pointer; font-family: inherit;
    transition: background .15s, transform .1s;
  }
  .btn:active { transform: scale(.98); }
  .btn-primary { background: var(--ink); color: var(--white); }
  .btn-primary:hover { background: #2e2e2e; }
  .btn-ghost { background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(0,0,0,.06); }
  .btn-ghost:hover { background: var(--mist); }
  .prose a.btn { text-decoration: none; }
  .prose a.btn-primary { color: var(--white); }
  .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
  form.contact { display: grid; gap: 14px; margin-top: 32px; padding: 22px; border-radius: 14px; background: #fafafa; border: 1px solid rgba(0, 0, 0, .06); }
  form.contact { margin-top: 16px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
  label { display: grid; gap: 6px; font-size: 13px; color: var(--graphite); }
  input, textarea { font: inherit; font-size: 15px; color: var(--ink); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--hair); background: var(--white); }
  input:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
  textarea { min-height: 150px; resize: vertical; }
  main { padding-bottom: 40px; }

  /* ---------- Fusszeile (wie bei Campsite: Logo links, Linkspalten rechts) ---------- */
  .site-footer { margin-top: 56px; border-top: 1px solid var(--fog); padding: 56px 0 64px; text-align: left; font-size: 13px; color: var(--graphite); }
  .footer-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
  .footer-brand img { height: 38px; width: auto; }
  .footer-brand p { margin: 14px 0 0; max-width: 20em; line-height: 1.5; color: var(--steel); }
  .footer-col h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 1.4; color: var(--ink); }
  .footer-col a { display: block; width: fit-content; padding: 5px 0; color: var(--graphite); transition: color .15s; }
  .footer-col a:hover { color: var(--ink); }
  .footer-note { margin-top: 44px; color: var(--silver); }
  @media (max-width: 860px) {
    .site-footer { padding: 40px 0 48px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
    .footer-brand { grid-column: 1 / -1; }
  }

  @media (max-width: 860px) {
    .island-inner { padding: 6px 6px 6px 11px; gap: 6px; }
    .s-logo img { height: 28px; }
    .nav { gap: 0; }
    .nav a, .nav-item { font-size: 11px; line-height: 26px; padding: 0 4px; gap: 3px; }
    .nav a.pill { margin-left: 0; padding: 0 6px; }
    .page-head { padding: 112px 0 32px; }
    .article { padding-top: 108px; }
    .bento, .cards, .shots { grid-template-columns: 1fr; }
    .tile.feature { min-height: 380px; }
    .facts div { grid-template-columns: 1fr; gap: 2px; }
    .rows a { font-size: 15px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .island, .rise { animation: none; }
  }
