/* ==========================================================================
   Designers Toolbox – gemeinsames Stylesheet für Startseite und alle Werkzeuge
   Swiss Design: Linien statt Boxen, keine Schatten, keine runden Ecken,
   Archivo (selbst gehostet), Farben nur über Tokens. Akzent wechselt pro Werkzeug über
   <html data-tool="<slug>"> (Block am Ende wird von build.py aus tools.json erzeugt).
   ========================================================================== */

/* ---------- 0. Schrift: Archivo, selbst gehostet (SIL Open Font License, /assets/fonts/Archivo-OFL.txt).
   Variable Schrift (Gewicht 100–900), keine Anfrage an Fremd-Hosts. Laufweite überall 0, nur die große Headline −0,01 em. ---------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/archivo-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: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/archivo-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; }

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --ink: #262624;
  --muted: #64625d;
  --control: #8e8c86;
  --line: rgba(38, 38, 36, .16);
  --rule: #262624;
  --hover: rgba(38, 38, 36, .05);
  --stage: #e6e4de;
  /* Akzent der Toolbox selbst: Tinte. Werkzeuge überschreiben ihn mit ihrer Farbe. */
  --accent: #262624;          /* weiß darauf 14,6:1 */
  --accent-text: #262624;
  --on-accent: #ffffff;
  --accent-soft: rgba(38, 38, 36, .08);
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --page-pad: 48px;
  --side: 340px;
  --gap: 56px;
  --bar-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1f2022; --ink: #e4e2dc; --muted: #a3a19b; --control: #6f6d68;
    --line: rgba(228, 226, 220, .16); --rule: #e4e2dc; --hover: rgba(228, 226, 220, .06); --stage: #2a2b2e;
    --accent: #e4e2dc; --accent-text: #e4e2dc; --on-accent: #1f2022; --accent-soft: rgba(228, 226, 220, .12);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f2022; --ink: #e4e2dc; --muted: #a3a19b; --control: #6f6d68;
  --line: rgba(228, 226, 220, .16); --rule: #e4e2dc; --hover: rgba(228, 226, 220, .06); --stage: #2a2b2e;
  --accent: #e4e2dc; --accent-text: #e4e2dc; --on-accent: #1f2022; --accent-soft: rgba(228, 226, 220, .12);
}

/* ---------- 2. Grundlagen ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
button { font: inherit; color: inherit; border-radius: 0; }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding-left: var(--page-pad); padding-right: var(--page-pad); }
.no { color: var(--accent-text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. Globale Kopfleiste (Menü) ---------- */
.sitebar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.sitebar .wrap { display: flex; align-items: center; gap: 32px; min-height: var(--bar-h); }
.tb-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; padding: 6px 0; }
.tb-mark { width: 24px; height: 24px; display: block; flex: none; }
.tb-mark .field { fill: var(--bg); }
.tb-mark .glyph { fill: var(--ink); }
.tb-logo b { font-size: 16px; }
.tb-logo b span { font-weight: 400; }

.mainnav { display: flex; align-items: stretch; gap: 4px; flex: 1; align-self: stretch; }
.mainnav > a, .menu-btn {
  display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: var(--bar-h);
  text-decoration: none; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 14px;
  position: relative;
}
.mainnav > a:hover, .menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--ink); }
/* Aktiver Menüpunkt: Unterstrich in Akzent */
.mainnav > a[aria-current="page"], .menu-btn.is-current { color: var(--ink); font-weight: 700; }
.mainnav > a[aria-current="page"]::after, .menu-btn.is-current::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--accent);
}
.menu-btn .chev { width: 10px; height: 10px; transition: transform .2s var(--ease); }
.menu-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Werkzeug-Menü (aufklappend) */
.menu-wrap { position: relative; display: flex; }
.toolmenu {
  position: absolute; top: 100%; left: 0; width: 420px; margin-top: 1px;
  background: var(--bg); border-bottom: 1px solid var(--rule);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .18);
  list-style: none; margin-block: 1px 0; padding: 8px 0;
  opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s;
}
.toolmenu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.toolmenu a {
  display: grid; grid-template-columns: 14px 1fr auto; column-gap: 14px; align-items: baseline;
  padding: 12px 20px; text-decoration: none; border-bottom: 1px solid var(--line);
}
.toolmenu li:last-child a { border-bottom: 0; }
.toolmenu .sq { grid-column: 1; grid-row: 1; width: 12px; height: 12px; background: var(--pa); align-self: center; }
.toolmenu strong { grid-column: 2; grid-row: 1; font-size: 15px; }
.toolmenu strong span { font-weight: 400; }
.toolmenu small { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 12px; }
.toolmenu .arr { grid-column: 3; grid-row: 1 / span 2; align-self: center; color: var(--muted); transition: transform .15s; }
.toolmenu a:hover, .toolmenu a:focus-visible { background: var(--hover); outline: none; }
.toolmenu a:hover .arr { transform: translateX(3px); color: var(--ink); }
.toolmenu a[aria-current="page"] strong { text-decoration: underline; text-decoration-color: var(--pa); text-decoration-thickness: 3px; text-underline-offset: 5px; }

.status-tag { font-size: 11px; font-weight: 700; color: var(--pa-text, var(--accent-text)); vertical-align: super; line-height: 0; margin-left: 2px; }

/* Schalter rechts */
.switches { display: flex; gap: 12px; align-items: center; flex: none; margin-left: auto; }
.seg, .lang { display: flex; border: 1px solid var(--control); flex: none; }
.seg button, .lang a {
  min-width: 44px; min-height: 32px; display: flex; align-items: center; justify-content: center; padding: 0 10px;
  font-size: 13px; color: var(--muted); text-decoration: none; background: transparent; border: 0; border-right: 1px solid var(--control); cursor: pointer;
}
.seg button:last-child, .lang a:last-child { border-right: 0; }
.seg button:hover, .lang a:hover { color: var(--ink); background: var(--hover); }
.seg button[aria-pressed="true"], .lang a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 700; }
.seg.accent button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* Burger für schmale Fenster */
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--control); min-width: 44px; min-height: 36px; cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 18px; height: 18px; }
.burger .b2 { transition: opacity .15s; }
.burger[aria-expanded="true"] .b2 { opacity: 0; }

/* ---------- 4. Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px;
  background: var(--accent); color: var(--on-accent); border: 0; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .12s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px;
  background: transparent; color: var(--ink); border: 1px solid var(--control); cursor: pointer; text-decoration: none; font-size: 13px;
}
.tool:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.linkish { font: inherit; color: inherit; background: none; border: 0; padding: 6px 0; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }

/* ---------- 5. Startseite ---------- */
.hero { --claim-fs: clamp(30px, 4.4vw, 64px); display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: var(--gap); padding-top: 72px; padding-bottom: 16px; }
.hero .kicker { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.hero .claim { margin: 0; font-size: var(--claim-fs); line-height: 1.04; letter-spacing: -.01em; font-weight: 700; max-width: 18ch; }
.hero .claim span { font-weight: 400; color: var(--muted); }
.hero .lead { margin: 28px 0 0; font-size: 18px; line-height: 1.45; max-width: 56ch; color: var(--muted); }
.tb-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.tb-facts dt, .tb-facts dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tb-facts dt { color: var(--muted); padding-right: 24px; }
.tb-facts dd { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Fehlerseite 404 */
.nf-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--rule); max-width: 56ch; }
.nf-list li { border-bottom: 1px solid var(--line); }
.nf-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; font-size: 18px; }
.nf-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nf-list .sq { width: 12px; height: 12px; background: var(--pa); flex: none; }
.hero .lead a { color: var(--ink); }
/* Farbstreifen: eine Fläche je Werkzeug */
.stripes { display: flex; height: 6px; }
.stripes i { flex: 1; background: var(--pa); }
/* Oberkante der Farblinie = Versalhöhe der ersten Headline-Zeile (Archivo bold, line-height 1.04: ≈ .173 em) */
.hero .stripes { margin-top: calc(var(--claim-fs) * .173); }

.section { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: var(--gap); padding-top: 56px; }
.section-head { padding-top: 6px; }
.section-head h2 { font-size: 20px; font-weight: 400; margin: 6px 0 0; line-height: 1.2; }
.section-head p { color: var(--muted); margin: 10px 0 0; max-width: 34ch; }

.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.project a {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 220px 40px; column-gap: 24px; align-items: center;
  padding: 28px 16px 28px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .12s, color .12s, padding .2s var(--ease);
}
.project .no { color: var(--pa-text); align-self: start; padding-top: 8px; }
/* Registermarke: Balken in Werkzeugfarbe auf der Trennlinie, von der Nummer bis zum Beginn der Headline */
.project { position: relative; }
.project::before { content: ""; position: absolute; left: 0; top: -1px; width: 80px; height: 4px; background: var(--pa); z-index: 1; pointer-events: none; }
.project h3 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; }
.project h3 span { font-weight: 400; }
.project p { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font-size: 11px; text-transform: uppercase; border: 1px solid var(--line); padding: 3px 7px; color: var(--muted); }
.thumb { width: 100%; height: auto; display: block; background: var(--stage); }
.arrow { width: 28px; height: 28px; justify-self: end; transition: transform .15s; }
.project a:hover, .project a:focus-visible { background: var(--pa); color: #fff; outline: none; padding-left: 16px; }
.project a:hover :is(.no, p, .status-tag), .project a:focus-visible :is(.no, p, .status-tag) { color: #fff; }
.project a:hover .tags span, .project a:focus-visible .tags span { color: #fff; border-color: rgba(255, 255, 255, .5); }
.project a:hover .thumb, .project a:focus-visible .thumb { background: rgba(0, 0, 0, .18); }
.project a:hover .arrow, .project a:focus-visible .arrow { transform: translateX(4px); }

/* Prinzipien / SEO-Text */
.about .lead { font-size: 18px; line-height: 1.45; margin: 0 0 32px; max-width: 60ch; }
.home-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; border-top: 1px solid var(--rule); }
.home-cols > div { padding-top: 16px; }
.home-cols h3 { font-size: 15px; margin: 6px 0 6px; }
.home-cols p { margin: 0; color: var(--muted); max-width: 40ch; }

/* ---------- 6. Werkzeug-Seiten (gemeinsames Gerüst) ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: var(--gap); padding-top: 40px; flex: 1; align-content: start; }
.app-head { grid-column: 1 / -1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: var(--gap); align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 32px; }
.app-logo { display: flex; align-items: center; gap: 12px; }
.app-logo .mark { width: 32px; height: 32px; flex: none; }
.app-head h1 { margin: 0; font-size: 26px; line-height: 1; font-weight: 700; }
.app-head h1 span { font-weight: 400; }
.app-head .intro { margin: 0; font-size: 22px; line-height: 1.3; max-width: 48ch; }
.app-side { position: sticky; top: calc(var(--bar-h) + 24px); align-self: start; }
.app-side .tabs { display: flex; border-bottom: 1px solid var(--rule); }
.app-side .tabs button { flex: 1; background: none; border: 0; text-align: left; padding: 8px 0 10px; cursor: pointer; color: var(--muted); position: relative; }
.app-side .tabs button .no { display: block; font-size: 11px; }
.app-side .tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.app-side .tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 12px; bottom: -1px; height: 3px; background: var(--accent); }
.app-main .stage { background: var(--stage); min-height: 420px; display: grid; place-items: center; color: var(--muted); }

/* ---------- 6b. Changelog je Werkzeug ---------- */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.log-entry { display: grid; grid-template-columns: 180px minmax(0, 1fr); column-gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.log-ver { font-size: 30px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.log-ver small { display: block; margin-top: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.log-entry h3 { margin: 2px 0 10px; font-size: 18px; }
.log-entry ul { list-style: none; margin: 0; padding: 0; }
.log-entry li { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.log-entry li:first-child { border-top: 0; }
.kind { font-size: 11px; text-transform: uppercase; font-weight: 700; padding-top: 2px; color: var(--muted); }
.kind.k-new { color: var(--accent-text); }
.log-entry.latest .log-ver { color: var(--accent-text); }
.side-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 24px; }

/* ---------- 7. Fußzeile ---------- */
/* Gliederung: Marke | 01 Werkzeuge | 02 Changelog | 03 Projekt | 04 Rechtliches, darunter Absenderzeile */
.site-footer { margin-top: auto; padding-top: 96px; }
/* Footer-Spalten in derselben Flucht wie Inhalt und Prinzipien-Spalten: erste Spalte = Seitenleiste + Abstand */
.foot-grid {
  display: grid; grid-template-columns: calc(var(--side) + var(--gap) - 32px) repeat(3, minmax(0, 1fr)); column-gap: 32px; row-gap: 32px;
  border-top: 1px solid var(--rule); padding-top: 20px; padding-bottom: 40px;
}
.foot-grid > nav { padding-top: 10px; margin-top: 4px; }
.foot-grid h2 { font-size: 12px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.foot-grid h2 .no { margin-right: 6px; }
.foot-brand .coffee { margin-top: 20px; min-height: 44px; padding: 0 18px; gap: 10px; font-size: 15px; }
.foot-brand .coffee svg { width: 24px; height: 24px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li a, .foot-grid li button { display: inline-flex; align-items: center; gap: 10px; min-height: 30px; text-decoration: none; padding: 0; background: none; border: 0; cursor: pointer; font-size: 14px; }
.foot-grid li a:hover, .foot-grid li button:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-grid .sq { width: 10px; height: 10px; background: var(--pa); flex: none; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 12px 0 32px; color: var(--muted); font-size: 12px; }
.foot-start { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.foot-logo-link { display: flex; flex: none; padding: 5px 0; }
.foot-logo { height: 20px; width: auto; display: block; fill: var(--ink); transition: fill .12s; }
.foot-logo-link:hover .foot-logo { fill: var(--muted); }

/* Kaffee-Link mit Pixel-Becher */
.coffee svg { width: 20px; height: 20px; flex: none; shape-rendering: crispEdges; overflow: visible; }
.coffee .cup { fill: currentColor; }
.coffee .brew { fill: var(--accent); }
.coffee .steam rect { fill: currentColor; opacity: 0; animation: steam 2.4s steps(6) infinite; }
.coffee .steam .s2 { animation-delay: .8s; }
.coffee .steam .s3 { animation-delay: 1.6s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .9; } 70% { opacity: .5; } 100% { opacity: 0; transform: translateY(-4px); } }

/* ---------- 8. Dialoge (Impressum, Datenschutz) ---------- */
dialog.imprint { border: 0; padding: 0; width: min(440px, calc(100vw - 48px)); background: var(--bg); color: var(--ink);
  border-top: 6px solid var(--accent); box-shadow: 0 24px 64px rgba(0, 0, 0, .35); }
dialog.imprint::backdrop { background: rgba(12, 12, 12, .55); backdrop-filter: blur(2px); }
dialog.imprint[open] { animation: imIn .3s var(--ease); }
dialog.imprint[open]::backdrop { animation: imFade .3s ease; }
@keyframes imIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes imFade { from { opacity: 0; } }
.imprint-in { padding: 26px 32px 32px; max-height: min(84vh, 820px); overflow-y: auto; scrollbar-width: thin; }
.imprint-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 20px; }
.imprint-head h2 { font-size: 20px; font-weight: 400; margin: 0; }
.imprint .close { font-size: 13px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 0 6px 12px; min-height: 32px; }
.imprint .close:hover { color: var(--ink); }
.imprint .cap { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.imprint address { font-style: normal; font-size: 16px; line-height: 1.5; margin: 0 0 20px; }
.imprint .mail { font-size: 16px; margin: 0; }
.imprint .mail a { color: var(--accent-text); font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }
.imprint .legal { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 4px; }
.imprint .legal h3 { font-size: 14px; font-weight: 700; margin: 18px 0 6px; }
.imprint .legal p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0 0 8px; }
dialog.privacy { width: min(620px, calc(100vw - 48px)); }
.privacy .imprint-in { max-height: min(78vh, 760px); }
.privacy .imprint-head { position: sticky; top: -26px; background: var(--bg); padding-top: 26px; margin-top: -26px; z-index: 1; }
.privacy h3 { font-size: 15px; font-weight: 700; margin: 22px 0 6px; }
.privacy h3:first-of-type { margin-top: 0; }
.privacy p, .privacy li { font-size: 14px; line-height: 1.55; margin: 0 0 8px; max-width: 64ch; }
.privacy ul { margin: 0 0 8px; padding-left: 18px; }
.privacy address { font-size: 14px; margin: 0 0 8px; font-style: normal; }
.privacy .mail, .privacy .mail a { font-size: 14px; }
.privacy .stand { color: var(--muted); font-size: 12px; margin-top: 22px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 9. Breakpoints ---------- */
@media (max-width: 1100px) {
  :root { --side: 300px; --gap: 36px; --page-pad: 28px; }
  .project a { grid-template-columns: 44px minmax(0, 1fr) 160px 32px; column-gap: 18px; }
  .project::before { width: 62px; }
}
@media (max-width: 960px) {
  :root { --side: 264px; --gap: 28px; }
}
@media (max-width: 860px) {
  :root { --page-pad: 16px; }
  .burger { display: inline-flex; }
  .sitebar .wrap { flex-wrap: wrap; gap: 0 16px; }
  .mainnav, .switches { display: none; }
  .sitebar.open .mainnav { display: flex; flex-direction: column; flex-basis: 100%; order: 3; border-top: 1px solid var(--line); padding: 8px 0; }
  .sitebar.open .switches { display: flex; flex-basis: 100%; order: 4; margin: 0 0 16px; }
  .mainnav > a, .menu-btn { min-height: 44px; padding: 0; }
  .mainnav > a[aria-current="page"]::after, .menu-btn.is-current::after { left: -16px; right: auto; width: 3px; top: 10px; bottom: 10px; height: auto; }
  .menu-wrap { flex-direction: column; }
  .toolmenu { position: static; width: auto; box-shadow: none; border-top: 1px solid var(--line); display: none; margin: 0; padding: 0; opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  .toolmenu.open { display: block; }
  .toolmenu a { padding: 10px 0; }
  .hero, .section, .app, .app-head { grid-template-columns: 1fr; row-gap: 24px; }
  .hero { padding-top: 40px; }
  .hero .kicker { order: 2; }
  .hero .stripes { margin-top: 0; }
  .project a { grid-template-columns: 32px minmax(0, 1fr) 28px; column-gap: 12px; }
  .project::before { width: 44px; }
  .project .thumb { display: none; }
  .project h3 { font-size: 24px; }
  .home-cols { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .log-entry { grid-template-columns: 1fr; row-gap: 8px; }
  .app-side { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .coffee .steam rect { animation: none; opacity: .6; }
}
@media print {
  .sitebar, .site-footer, .toast { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 10. Werkzeug-Farben (automatisch aus tools.json) ---------- */
html[data-tool="satzspiegel-generator"] { --accent: #d80011; --accent-text: #c2000f; --on-accent: #fff; --accent-soft: rgba(216,0,17,.12); }
.t-satzspiegel-generator { --pa: #d80011; --pa-text: #c2000f; }
html[data-tool="fontfinder"] { --accent: #1f4fd8; --accent-text: #1f4fd8; --on-accent: #fff; --accent-soft: rgba(31,79,216,.12); }
.t-fontfinder { --pa: #1f4fd8; --pa-text: #1f4fd8; }
html[data-tool="qr-code"] { --accent: #00795c; --accent-text: #00795c; --on-accent: #fff; --accent-soft: rgba(0,121,92,.12); }
.t-qr-code { --pa: #00795c; --pa-text: #00795c; }
@media (prefers-color-scheme: dark) {
  html[data-tool="satzspiegel-generator"]:not([data-theme="light"]) { --accent: #d80011; --accent-text: #ff6b5e; --on-accent: #fff; --accent-soft: rgba(216,0,17,.2); }
  :root:not([data-theme="light"]) .t-satzspiegel-generator { --pa-text: #ff6b5e; }
  html[data-tool="fontfinder"]:not([data-theme="light"]) { --accent: #1f4fd8; --accent-text: #7aa2ff; --on-accent: #fff; --accent-soft: rgba(31,79,216,.2); }
  :root:not([data-theme="light"]) .t-fontfinder { --pa-text: #7aa2ff; }
  html[data-tool="qr-code"]:not([data-theme="light"]) { --accent: #00795c; --accent-text: #4cd39a; --on-accent: #fff; --accent-soft: rgba(0,121,92,.2); }
  :root:not([data-theme="light"]) .t-qr-code { --pa-text: #4cd39a; }
}
html[data-tool="satzspiegel-generator"][data-theme="dark"] { --accent: #d80011; --accent-text: #ff6b5e; --on-accent: #fff; --accent-soft: rgba(216,0,17,.2); }
:root[data-theme="dark"] .t-satzspiegel-generator { --pa-text: #ff6b5e; }
html[data-tool="fontfinder"][data-theme="dark"] { --accent: #1f4fd8; --accent-text: #7aa2ff; --on-accent: #fff; --accent-soft: rgba(31,79,216,.2); }
:root[data-theme="dark"] .t-fontfinder { --pa-text: #7aa2ff; }
html[data-tool="qr-code"][data-theme="dark"] { --accent: #00795c; --accent-text: #4cd39a; --on-accent: #fff; --accent-soft: rgba(0,121,92,.2); }
:root[data-theme="dark"] .t-qr-code { --pa-text: #4cd39a; }
