/* ==========================================================================
   portal.css — vorgerenderte Seiten von searchit Models (MASTER-33).
   Werte nach dem Gestaltungssatz marketing/AI/conventions/gestaltung.md (R-GEST-*):
   Schrift Source Sans (lokal), ein Blau (#026CDF / #0147B1 / #DCEBFF), Umbrüche 40/56/72 rem,
   Inhaltsbreite 1180 px, Seitenrand clamp(1rem, 3vw, 2rem), Tabellen R-GEST-067/068.
   Kein Framework, kein Build.
   ========================================================================== */
:root {
  --schrift: 'Source Sans Pro', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace;
  --accent: #026CDF;
  --accent-dark: #0147B1;
  --accent-light: #DCEBFF;
  --text: #2b3033;
  --muted: #61686c;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --line: #d9dde0;
  --card: #ffffff;
  --ok: #1b7f3b;
  --warn: #b3261e;
  --r-2: 6px;
  --r-3: 10px;
  --e-1: 0 1px 2px rgba(0,0,0,.06), 0 1px 6px rgba(0,0,0,.06);
  --rand: clamp(1rem, 3vw, 2rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.55 var(--schrift); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.375rem, 1.9rem + 2vw, 3rem); margin: .4em 0 .4em; }
h2 { font-size: 1.875rem; margin: 1.8em 0 .5em; }
h3 { font-size: 1.5rem; margin: 1.4em 0 .4em; }
p, li { max-width: 72ch; }
.lead { font-size: 1.25rem; color: var(--text); }
.note { color: var(--muted); font-size: .875rem; }
.callout { background: var(--accent-light); padding: .9rem 1.1rem; border-radius: var(--r-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--rand); }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.js .js-hide { display: none; }

/* ---------- Kopf (MASTER-36 §5): Werte aus searchit-agent.ai `.head` und dem Lockup, über portal-tokens.css ---------- */
.top { background: var(--card); position: sticky; top: 0; z-index: 5; box-shadow: var(--head-e-0, 0 1px 2px rgba(43,48,51,.14)); }
.top .wrap { max-width: var(--head-breite, 1180px); padding: var(--head-a-1, .5rem) var(--head-rand-seite, clamp(1rem, 3vw, 2rem)); }
.bar { display: flex; align-items: center; gap: var(--head-a-3, 1rem); min-height: var(--head-ziel, 2.75rem); flex-wrap: wrap; }
.lockup { display: inline-flex; align-items: center; gap: var(--lockup-abstand, .5rem); text-decoration: none; min-height: var(--head-ziel, 2.75rem); }
.lockup__logo { height: var(--lockup-logo-hoehe, 2.75rem); width: auto; display: block; }
.lockup__deskriptor { font-family: var(--schrift); font-size: var(--lockup-schrift-groesse, 1.5rem); font-weight: var(--lockup-schrift-gewicht, 700);
  line-height: 1; color: var(--lockup-farbe, #026CDF); letter-spacing: 0; }
.menu-toggle { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bar { position: relative; }
.menu-toggle:focus-visible + .menu-btn { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-btn { display: none; cursor: pointer; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: var(--r-2); min-height: 44px; }
.nav { display: flex; align-items: center; gap: .25rem 1rem; flex: 1; flex-wrap: wrap; }
.nav { gap: 0; flex: 0 1 auto; } /* Knopf direkt nach dem Menü — gleiche Stelle wie in der App */
/* fünf Punkte, Knopf, Anmelden, Währung und Sprache passen ab 68 rem in eine Zeile; darunter Menüschalter
   (searchit-agent.ai klappt mit weniger Punkten schon bei 56 rem) */
@media (min-width: 68rem) { .bar { flex-wrap: nowrap; gap: var(--head-a-2, .75rem); } .nav { flex-wrap: nowrap; }
  .nav > a, .dd > summary { white-space: nowrap; } }
.nav > a, .dd > summary { display: inline-flex; align-items: center; min-height: var(--head-ziel, 2.75rem); padding: 0 var(--head-a-1, .5rem);
  color: var(--head-grey, #61686c); font-size: var(--head-s-02, 1.0625rem); font-weight: 600; line-height: 1; text-decoration: none;
  border-radius: 999px; cursor: pointer; }
@media (hover: hover) { .nav > a:hover, .dd > summary:hover { color: var(--accent); } }
/* aktiver Menüpunkt (MASTER-36 §4): exakt = page, Bereich darunter = true; Muster marketing gestaltung.md */
.nav > a[aria-current], .dd > summary[aria-current], .dd li a[aria-current] { color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: .35em; }
/* App als hervorgehobener Knopf rechts neben Ebene 1 (E7) */
.app-btn { display: inline-flex; align-items: center; min-height: var(--head-ziel, 2.75rem); padding: 0 1rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: var(--head-e-1, 0 6px 18px rgba(43,48,51,.08)); transition: background-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.app-btn::after { content: "→"; margin-left: .4em; }
/* blau im Ruhezustand; Iphos-Orange nur beim Überfahren und aktiv (in der App), User 2026-10-05 */
@media (hover: hover) { .app-btn:hover { background: var(--head-handlung, #FFA245); color: var(--head-handlung-text, #fff);
  box-shadow: var(--head-e-2, 0 18px 48px rgba(43,48,51,.12)); transform: translateY(-1px); } }
.app-btn:active, .app-btn[aria-current] { background: var(--head-handlung, #FFA245); color: var(--head-handlung-text, #fff); }
.cur { display: flex; }
.login { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--head-ziel, 2.75rem);
  min-width: var(--head-ziel, 2.75rem); padding: 0; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent);
  font-weight: 600; text-decoration: none; white-space: nowrap; }
/* breit: nur das Symbol, der Text bleibt für Screenreader (visuell versteckt) */
.login__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (hover: hover) { .login:hover { background: var(--accent-light); } }
.lockup, .app-btn, .tools-right { flex-shrink: 0; }
/* ===== Kopf-Lockup + Suche hinter dem Logo (§10.10 S73, Wireframe 2026-10-07) ===========================
   Die Kopfplatte (.bar::before) liegt ÜBER der Suchleiste; die Leiste hängt unter dem Logo und schaut nur
   mit einer Lippe (Bohne + Lupe) hervor. Überfahren von Logo oder Lippe, Fokus im Feld oder .is-open (Skript:
   Intro, Tippen) fährt sie aus — über den Seiteninhalt, ohne eigene Zeile — und das Logo leuchtet auf.
   Nur transform/opacity; Schließen mit kurzer Verzögerung, damit der Weg Logo → Feld sie nicht zuklappt.
   Portal-Akzent Magenta-Violett (User 2026-10-07; Orange bleibt Signalfarbe). */
:root { --pop: #C026D3; --pop-dark: #9D1BAD; --pop-light: #FBEAFD; --brain: #4AA3FF; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bar::before { content: ""; position: absolute; inset: 0; background: var(--card); z-index: 1; }
.bar > :not(.cap):not(.menu-toggle) { position: relative; z-index: 2; }
.lockup__badge { display: block; height: 1.5rem; width: auto; mix-blend-mode: multiply; } /* generiertes Bild, weißer Grund */

/* Superkraft: das Gehirn (Bild, weißer Grund → multiply) blüht hinter dem Logo auf */
.lockup__power { position: absolute; left: 50%; top: 50%; width: 19rem; height: 5.4rem; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(.6); background: url(/assets/brand/power-brain.webp) center/contain no-repeat;
  mix-blend-mode: multiply; transition: opacity .35s ease, transform .55s cubic-bezier(.22,1,.36,1); }
.lockup__logo { position: relative; transition: filter .35s ease; }
.top:has(.cap.is-open, .cap:focus-within, .cap:hover, .lockup:hover) .lockup__power { opacity: .6; transform: translate(-50%, -50%) scale(1); }
.top:has(.cap.is-open, .cap:focus-within, .cap:hover, .lockup:hover) .lockup__logo {
  filter: drop-shadow(0 0 6px rgba(74,163,255,.9)) drop-shadow(0 0 2px rgba(192,38,211,.8)) brightness(1.08); }

/* Leiste: hängt unter der Kopfplatte, linksbündig zum Logo */
.cap { --cap-h: 3.1rem; position: absolute; z-index: 0; left: var(--head-rand-seite, clamp(1rem, 3vw, 2rem)); top: 100%;
  width: min(26rem, calc(100vw - 2rem)); transform: translateY(-100%); transition: transform .45s cubic-bezier(.22,1,.36,1) .3s; }
.cap__form { display: flex; align-items: center; gap: .45rem; height: var(--cap-h); box-sizing: border-box; margin: 0; padding: 0 .4rem 0 .5rem; background: #fff;
  border: 2px solid #10243A; border-top: 0; border-radius: 0 0 .9rem .9rem; box-shadow: 0 12px 28px rgba(16,36,58,.16);
  opacity: 0; transition: opacity .3s ease .3s; }
.cap__bean { position: relative; width: 2rem; height: 2rem; flex: none; }
.cap__img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .18s ease; }
.cap[data-mood="idle"] .cap__img--idle, .cap[data-mood="curious"] .cap__img--curious, .cap[data-mood="power"] .cap__img--power,
.cap[data-mood="surprised"] .cap__img--surprised, .cap[data-mood="point"] .cap__img--point { opacity: 1; }
.cap__form input { flex: 1; min-width: 0; height: 2.1rem; border: 1px solid var(--line); border-radius: .5rem; padding: 0 .7rem;
  font: 500 1rem var(--schrift); color: #10243A; background: #fff; }
/* Fokus nur innen: ein Ring außen schob sich in Firefox über den unteren Rahmen der Leiste */
.cap__form input:focus { outline: none; border-color: var(--pop); box-shadow: inset 0 0 0 1px var(--pop); }
.cap__go { width: 2.4rem; height: 2.1rem; border: 0; border-radius: .5rem; background: var(--pop); cursor: pointer; display: grid; place-items: center; }
.cap__go:hover { background: var(--pop-dark); }
.cap__lupe { width: 1rem; height: 1rem; background: #fff; flex: none;
  -webkit-mask: var(--lupe) center/contain no-repeat; mask: var(--lupe) center/contain no-repeat;
  --lupe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='none' stroke='black' stroke-width='3'/%3E%3Cpath d='M15 15l6 6' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* Lippe: das Stück, das unter dem Logo hervorschaut */
.cap__lip { position: absolute; left: 1.2rem; top: 100%; display: flex; align-items: center; gap: .3rem; height: 1.6rem; padding: 0 .55rem 0 .3rem;
  border: 2px solid #10243A; border-top: 0; border-radius: 0 0 .7rem .7rem; background: #fff; cursor: pointer;
  box-shadow: 0 4px 10px rgba(16,36,58,.12); transition: opacity .25s ease .3s, transform .25s ease; }
.cap__lip img { width: 1.3rem; height: 1.3rem; }
.cap__lip .cap__lupe { background: var(--pop); width: .85rem; height: .85rem; }
.cap__lip:hover { transform: translateY(2px); }

/* offen */
.cap.is-open, .cap:hover, .cap:focus-within, .lockup:hover ~ .cap { transform: translateY(0); transition-delay: 0s; }
.cap.is-open .cap__form, .cap:hover .cap__form, .cap:focus-within .cap__form, .lockup:hover ~ .cap .cap__form { opacity: 1; transition-delay: 0s; }
.cap.is-open .cap__lip, .cap:hover .cap__lip, .cap:focus-within .cap__lip, .lockup:hover ~ .cap .cap__lip { opacity: 0; transition-delay: 0s; }
/* klickbar bleibt die Lippe beim Überfahren (sonst fällt der Klick durch); erst offen per Skript nicht mehr */
.cap.is-open .cap__lip { pointer-events: none; }
.cap.is-instant, .cap.is-instant .cap__form, .cap.is-instant .cap__lip, .top:has(.cap.is-instant) .lockup__power,
.top:has(.cap.is-instant) .lockup__logo { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .cap, .cap__form, .cap__lip, .lockup__power, .lockup__logo { transition: none; } }
@media (max-width: 30rem) { .lockup__badge { height: 1.2rem; } }
.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::after { content: "▾"; margin-left: .3em; color: var(--muted); }
.dd > summary::-webkit-details-marker { display: none; }
.dd ul, .lang ul { position: absolute; margin: 0; padding: .4rem 0; list-style: none; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--e-1); min-width: 14rem; z-index: 6; }
.dd li a, .lang li a { display: block; padding: .5rem 1rem; text-decoration: none; color: var(--text); }
.dd li a:hover, .lang li a:hover { background: var(--accent-light); }
.tools-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.cur button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: .35rem .7rem; min-height: 36px; cursor: pointer; }
.cur button:first-child { border-radius: var(--r-2) 0 0 var(--r-2); }
.cur button:last-child { border-radius: 0 var(--r-2) var(--r-2) 0; border-left: 0; }
.cur button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.lang { position: relative; }
.lang > summary { cursor: pointer; list-style: none; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: var(--r-2); }
.lang > summary::-webkit-details-marker { display: none; }
.lang ul { right: 0; min-width: 10rem; }

@media (max-width: 67.99rem) {
  /* zu schmal für die ganze Leiste: alles hinter den Menüschalter, nur „Preisvergleich" bleibt sichtbar (User 2026-10-05) */
  .app-btn { order: 2; margin-left: auto; }
  .menu-btn { display: inline-flex; align-items: center; order: 3; }
  .tools-right { display: none; order: 5; flex-basis: 100%; justify-content: flex-start; padding-bottom: .8rem; }
  .menu-toggle:checked ~ .tools-right { display: flex; }
  .login { padding: 0 .9rem; }
  .login__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: .4rem; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav > a, .dd > summary { padding: .75rem 0; border-bottom: 1px solid var(--line); min-height: 44px; }
  .dd ul { position: static; box-shadow: none; border: 0; padding-left: 1rem; }
}

/* ---------- Pfad, Reiter, Knöpfe ---------- */
.crumbs { font-size: .875rem; color: var(--muted); margin: 1.9rem 0 0; } /* Platz für die Lippe der Suche (S73) */
.crumbs a { color: var(--muted); }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0; }
.tabs a { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 40px; }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; max-width: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 1.0625rem var(--schrift); padding: .6rem 1.1rem;
  min-height: 44px; border-radius: var(--r-2); border: 1px solid var(--accent); color: var(--accent); background: var(--card);
  text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent-dark); color: var(--accent-dark); box-shadow: var(--e-1); }
.btn-primary, .btn.is-on { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Karten, Kacheln ---------- */
.card { background: var(--card); border-radius: var(--r-3); box-shadow: var(--e-1); border: 1px solid var(--line); }
.tiles { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .tiles:not(.tiles-2) { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem; text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.tile strong { color: var(--accent); font-size: 1.25rem; }
.tile-img { width: calc(100% + 2.4rem); max-width: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: -1.2rem -1.2rem .4rem; border-radius: var(--r-3) var(--r-3) 0 0; display: block; }

/* ---------- Tabellen (R-GEST-067/068) ----------
   Ausnahme R-GEST-010/011/040 (marketing gestaltung.md, „Tabellen des Modellportals“): Schrift, Grad und Farben
   der Tabellen kommen aus dem ui-fat-Portal (portal-tokens.css), damit Seite und App gleich aussehen —
   hier keine eigenen Schriftgrade setzen. */
.table-wrap { overflow-x: auto; margin: 1rem 0 .4rem; }
/* Tabellenoptik = ui-fat-Portal (MASTER-36 §3): Werte aus portal-tokens.css */
table { border-collapse: collapse; width: 100%; font-family: var(--models-table-font-family, inherit);
  font-size: var(--models-table-font-size, 1rem); color: var(--models-table-color, var(--text)); background: var(--models-table-bg, transparent); }
caption { text-align: left; font-weight: 700; font-size: 1.25rem; padding: .8rem 1rem .4rem; }
thead th { font-size: inherit; font-weight: var(--models-table-head-font-weight, 700); color: var(--models-table-head-color, var(--muted));
  background: var(--models-table-head-bg, transparent); text-align: left; vertical-align: bottom; padding: .5rem 6px;
  border-bottom: 1px solid var(--models-table-line, var(--text)); }
tbody th, tbody td { padding: var(--models-table-cell-padding, .45rem 1rem); height: var(--models-table-row-height, auto); vertical-align: middle;
  text-align: left; line-height: 1.4; border-bottom: 1px solid var(--models-table-line, transparent); }
tbody th { font-weight: var(--models-table-name-font-weight, 600); }
tbody tr:hover { background: var(--models-table-hover, inherit); }
tbody tr:nth-child(even) { background: var(--models-table-stripe, var(--bg-alt)); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th.num { white-space: normal; }
table.dense thead th { letter-spacing: .06em; }
/* volle Tabelle: immer die kurzen Spaltenkoepfe, mit den langen rollt sie in es/pt/fr seitlich */
table.dense .hl { display: none; }
table.dense .hs { display: inline; }
table.dense thead th, table.dense tbody th, table.dense tbody td { padding-left: .55rem; padding-right: .55rem; }
.hs { display: none; }
.na { color: var(--muted); }
.badge { display: inline-block; padding: 0 .4em; border: 1px solid currentColor; border-radius: .6em; font-size: .85em; white-space: nowrap; }
.badge-free { color: var(--ok); }
/* verkuerzte Tabelle, solange die volle nicht in die Inhaltsbreite passt: Name und Preise, der Rest steht
   auf der Modellseite; unterhalb des Menue-Umbruchs zusaetzlich kurze Spaltenkoepfe */
@media (max-width: 75.99rem) {
  th.wide, td.wide { display: none; }
}
@media (max-width: 55.99rem) {
  .hl { display: none; }
  .hs { display: inline; }
}
@media (max-width: 39.99rem) {
  /* Telefon: zwei Kopfzeilen liefen über 15 % der Höhe mit (R-GEST-039) — der Kopf scrollt mit der Seite */
  .top { position: static; }
  thead th { letter-spacing: .04em; }
  tbody th, tbody td, thead th,
  table.dense thead th, table.dense tbody th, table.dense tbody td { padding-left: .3rem; padding-right: .3rem; }
  tbody th:first-child, thead th:first-child { padding-left: .6rem; max-width: 7.2rem; overflow-wrap: anywhere; }
  tbody th:first-child, thead th:first-child { position: sticky; left: 0; background: inherit; }
  tbody tr:nth-child(odd) th:first-child { background: var(--card); }
  tbody tr:nth-child(even) th:first-child { background: var(--bg-alt); }
  thead th:first-child { background: var(--card); }
}

/* gefilterte Tabelle: Streifen stimmen bei ausgeblendeten Zeilen nicht mehr, daher Linien */
table.filtered tbody tr { background: none; border-bottom: 1px solid var(--line); }
@media (max-width: 39.99rem) { table.filtered tbody tr th:first-child { background: var(--card); } }

/* ---------- Startseite: Suche, Filter, Kennzahlen, Kästen, Schaubild ---------- */
.search { position: relative; max-width: 34rem; margin: 1.2rem 0 .6rem; }
.search label { margin-bottom: .3rem; }
.search-row { display: flex; gap: .5rem; }
.search-row input { flex: 1; min-width: 0; }
.search-row .btn { flex: none; }
.search-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 4; margin: .3rem 0 0; padding: .3rem 0; list-style: none; max-height: 22rem; overflow-y: auto; }
.search-results li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0 1rem; max-width: none; }
.search-results a { flex: 1; padding: .55rem 0; text-decoration: none; }
.search-results li.note { padding: .55rem 1rem; }
.chips, .filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0; max-width: none; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; min-height: 40px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 400; cursor: pointer; }
.chip:hover, .chip.is-on { border-color: var(--accent); color: var(--accent); }
.chip input { width: auto; min-height: 0; padding: 0; margin: 0; }
.figures { display: grid; gap: 1rem; margin: 1rem 0; }
@media (min-width: 40rem) { .figures { grid-template-columns: repeat(3, 1fr); } }
.fig { display: flex; flex-direction: column; padding: 1rem 1.2rem; }
.fig b { font-size: 1.875rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.fig span { color: var(--muted); }
.boxes { display: grid; gap: 1rem; margin: 2rem 0 1rem; }
@media (min-width: 56rem) { .boxes { grid-template-columns: 1fr 1fr; } }
.box { padding: 1.2rem; }
.box > h2 { margin-top: 0; font-size: 1.25rem; } /* h4-Stufe s-03 */
.box .table-wrap { box-shadow: none; }
.box ul { padding-left: 1.1rem; margin-bottom: 0; }
code.copy { font-family: var(--mono); font-size: .875rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-2);
  padding: .3rem .55rem; overflow-wrap: anywhere; user-select: all; }
.flow { display: flex; flex-wrap: wrap; gap: .6rem 1.9rem; list-style: none; padding: 0; margin: 1.2rem 0; max-width: none; }
.flow li { position: relative; padding: .55rem .9rem; border: 1px solid var(--accent); border-radius: var(--r-2); background: var(--accent-light);
  font-weight: 600; max-width: none; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -1.45rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 400; }
@media (max-width: 39.99rem) {
  .flow { flex-direction: column; gap: 1.5rem; }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 1rem; top: auto; bottom: -1.5rem; transform: none; }
}

/* ---------- Formulare, Rechner, Zähler ---------- */
form.card { padding: 1.2rem; margin: 1.2rem 0; display: grid; gap: .9rem; }
label { display: grid; gap: .3rem; font-weight: 600; }
input, textarea, select { font: 400 1.0625rem var(--schrift); padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--r-2);
  background: var(--bg); color: var(--text); min-height: 44px; width: 100%; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: .4rem; }
.presets { display: flex; gap: .5rem; flex-wrap: wrap; }
.fields { display: grid; gap: .9rem; }
@media (min-width: 40rem) { .fields { grid-template-columns: 1fr 1fr; } .pick { grid-template-columns: auto 1fr auto; align-items: end; } }
.error { color: var(--warn); font-weight: 600; }
.tok-stats { color: var(--muted); margin: 0; }
small { color: var(--muted); font-weight: 400; }

/* ---------- Fuß ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .875rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.foot a { color: var(--muted); }

/* ---------- Klickfläche: Tabelle/Kasten → App (MASTER-36 §2, Muster searchit-agent.ai) ---------- */
.app-area { position: relative; margin: 1rem 0; border: 2px solid transparent; border-radius: var(--r-3); }
.app-area > .card, .app-area .table-wrap { margin-top: 0; }
.app-link { margin: .2rem 0 0; font-size: .875rem; max-width: none; }
.excerpt .caption-link { margin: 0 0 .3rem; font-weight: 700; font-size: 1.25rem; }
.app-area.is-live { cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
@media (hover: hover) {
  .app-area.is-live:hover { border-color: var(--accent); box-shadow: var(--head-e-2, 0 18px 48px rgba(43,48,51,.12)); }
  .app-area.is-live:hover::after { content: attr(data-app-hint); position: absolute; right: .6rem; top: -.9rem; z-index: 2;
    background: var(--accent); color: #fff; font-size: .875rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; pointer-events: none; }
}
.app-area.is-live a, .app-area.is-live input, .app-area.is-live label { cursor: pointer; }

/* ---------- Startseite: Bild und Hintergrund (MASTER-36 §6, E8) — nur CSS, kein Rasterbild (LCP) ---------- */
body.home { background:
  radial-gradient(60rem 28rem at 85% -6rem, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
  radial-gradient(40rem 22rem at -10% 12rem, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
  var(--bg); background-repeat: no-repeat; }
.hero-img { margin: 1rem 0 1.5rem; }
.hero-img img { width: 100%; max-width: 36rem; height: auto; display: block; margin: 0 auto; border-radius: var(--r-3); }
/* wide screens: picture right, lead + search + chips run beside it, the table starts below (MASTER-36 E8) */
@media (min-width: 56rem) {
  .hero-img { float: right; width: 42%; margin: 0 0 1rem 2rem; }
  .hero-img img { max-width: none; }
  body.home .app-area, body.home .excerpt { clear: both; }
}
/* start page: "built with searchit" box with the knowledge-archive picture (MASTER-36) */
.built::after { content: ""; display: block; clear: both; }
.built-img { float: right; width: 40%; max-width: 260px; height: auto; margin: 0 0 1rem 1.5rem; border-radius: var(--r-3); }
.built ul { padding-left: 1.1rem; }
.built li { margin-bottom: .4rem; }
