/* Kideon-Marken-Tokens (Skill kc-kideon-brand), ohne externe Fonts:
   System-Fallbacks statt Google Fonts (keine IP-Übertragung an Dritte). */
:root {
  --navy: #0f2137; --navy-mid: #1a3352;
  --accent: #c49a6c; --accent-dark: #a8804f; --accent-bg: rgba(196, 154, 108, 0.09); --accent-line: rgba(196, 154, 108, 0.28);
  --bg: #faf9f7; --bg-alt: #f3f1ed; --white: #ffffff;
  --border: #e5e2dc; --border-strong: #d9d5cc;
  --text: #0f2137; --text-secondary: #4d5f73; --text-muted: #7a8a9a;
  --status-red: #c94a3d; --status-amber: #c08a2b; --status-green: #4a7a4d;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --radius-md: 10px; --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15,33,55,.04), 0 1px 2px rgba(15,33,55,.06);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.5; }
main { flex: 1; width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; }
h1 { font-size: 2rem; margin: 0 0 .75rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 .5rem; }
a { color: var(--accent-dark); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .9rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--white); }
.logo { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; color: var(--navy); }
.eyebrow { display: inline-flex; align-items: center; gap: .7rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--accent-dark); font-weight: 600; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-dark); display: inline-block; }
main.narrow { max-width: 760px; margin: 2rem auto; padding: 0 1.5rem; }
main.wide { max-width: 1400px; margin: 1.5rem auto; padding: 0 1.5rem; }
.footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; font-size: .85rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.25rem; margin-bottom: 1rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; font-size: .9rem; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; word-break: break-all; }
.mono, code, textarea { font-family: var(--font-mono); font-size: .85rem; }
textarea { width: 100%; min-height: 10rem; padding: .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--white); color: var(--text); }
input[type=email], input[type=password], input[type=text] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); font: inherit; }
button { font: inherit; padding: .55rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; }
button.secondary { background: var(--white); color: var(--navy); }
button.danger { background: var(--white); color: var(--status-red); border-color: var(--status-red); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.ok { background: rgba(74,122,77,.12); color: var(--status-green); }
.badge.bad { background: rgba(201,74,61,.1); color: var(--status-red); }
.badge.warn { background: rgba(192,138,43,.12); color: var(--status-amber); }
.ready { font-family: var(--font-display); font-size: 1.35rem; }
.ready.ok { color: var(--status-green); }
.ready.bad { color: var(--status-red); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
/* Breite Tabellen (Admin) scrollen in ihrem Container, nicht die Seite. */
.table-wrap { overflow-x: auto; max-width: 100%; }
.confirm { font-size: .8rem; white-space: nowrap; }
th { color: var(--text-secondary); font-weight: 500; }
.st-ok { color: var(--status-green); }
.st-bad { color: var(--status-red); }
.st-empty { color: var(--text-muted); }
.notice { border-left: 3px solid var(--accent); background: var(--accent-bg); padding: .75rem 1rem; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.error { border-left-color: var(--status-red); background: rgba(201,74,61,.06); }
.inline { display: inline; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* Agent-Antworten und Anleitung: ein Textdokument, leicht gesetzt. */
main.doc { max-width: 76ch; margin: 2rem auto 3rem; padding: 0 1.5rem; }
.doc h1 { font-size: 1.85rem; margin: .5rem 0 1rem; }
.doc h2 { font-size: 1.35rem; margin: 2.25rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.doc h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; margin: 1.5rem 0 .4rem; }
.doc p, .doc li { font-size: .97rem; }
.doc li { margin: .2rem 0; }
.doc pre { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .75rem 1rem; overflow-x: auto; line-height: 1.45; }
.doc code { background: var(--bg-alt); padding: .05em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin: 1rem 0; padding: .3rem 1rem; border-left: 3px solid var(--accent); color: var(--text-secondary); }
.doc blockquote p { margin: .3rem 0; }
.doc table { font-size: .84rem; margin: 1rem 0; display: block; overflow-x: auto; }
.doc th, .doc td { overflow-wrap: normal; }
.doc td:first-child { white-space: nowrap; }
.doc td code, .doc th code { white-space: nowrap; overflow-wrap: normal; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.notice.human { margin: 0 0 2rem; font-size: .95rem; }
.notice.human p { margin: .4rem 0; }

/* Vorschau: Die Seite ist das Bild. Eine Leiste oben, darunter der Rahmen auf voller
   Höhe; Details, Löschen und Upgrade sind Aufklapper in der Leiste (kein Skript). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main.preview { display: flex; flex-direction: column; max-width: none; margin: 0; padding: 0; }
.view-radio { position: absolute; opacity: 0; pointer-events: none; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .55rem 1.5rem; background: var(--white); border-bottom: 1px solid var(--border); }
.bar .ready { font-size: 1.05rem; margin: 0; }
.bar .meta { margin: 0; font-size: .85rem; }
.view-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; font-size: .82rem; }
.view-toggle label { padding: .25rem .8rem; cursor: pointer; color: var(--text-secondary); }
#view-desktop:checked ~ .bar .view-toggle label[for="view-desktop"],
#view-phone:checked ~ .bar .view-toggle label[for="view-phone"] { background: var(--navy); color: #fff; }
.menus { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; font-size: .9rem; padding: .45rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--white); color: var(--navy); }
.menu > summary::-webkit-details-marker { display: none; }
.menu.primary > summary { background: var(--navy); border-color: var(--navy); color: #fff; }
.menu[open] > summary { box-shadow: 0 0 0 2px var(--accent-line); }
.menu .panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; width: min(460px, calc(100vw - 2rem)); max-height: calc(100vh - 9rem); overflow-y: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(15,33,55,.14); padding: 1rem 1.25rem; font-size: .92rem; }
.menu .panel h2 { font-size: 1.15rem; margin: .75rem 0 .4rem; }
.menu .panel h2:first-child { margin-top: 0; }
.menu .panel p, .menu .panel li { margin: .35rem 0; }
.choice { border: 0; padding: 0; margin: .75rem 0; }
.choice legend { font-weight: 600; padding: 0; margin-bottom: .35rem; }
.choice label { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: baseline; padding: .55rem .7rem; margin: .35rem 0; border: 1px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; }
.choice label:has(:checked) { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.choice label span { grid-column: 2; color: var(--text-muted); font-size: .88rem; }
.more { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .6rem; }
.more > summary { cursor: pointer; color: var(--text-muted); font-size: .88rem; }
.more h3 { font-size: 1rem; margin: .9rem 0 .3rem; }
.tiers { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; margin: .5rem 0; }
.tiers dt { font-weight: 600; }
.tiers dd { margin: 0; }
.strip { margin: 0; border-radius: 0; border-left: 0; border-bottom: 1px solid var(--border); padding: .6rem 1.5rem; }
.prompt-strip[hidden] { display: none; }
.prompt-strip { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: .5rem 1.5rem; align-items: start; background: rgba(201,74,61,.05); }
.prompt-strip h2 { font-size: 1.05rem; margin: 0 0 .2rem; }
.prompt-strip p { margin: 0; font-size: .88rem; }
.prompt-strip textarea { min-height: 6.5rem; margin: 0; }
/* Feste Höhe statt flex: 1 — sonst löst sich die Prozent-Höhe des Iframes nicht auf und er fällt auf 150 px. */
.stage { --stage-height: max(70vh, calc(100dvh - 8.5rem)); display: flex; justify-content: center; background: var(--bg-alt); height: var(--stage-height); }
.stage .card { align-self: center; }
.frame { width: 100%; height: var(--stage-height); border: 0; background: var(--white); transition: width .2s; }
#view-phone:checked ~ .stage .frame { width: 390px; margin: 1rem 0; height: calc(var(--stage-height) - 2rem); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: var(--shadow-sm); }
@media (max-width: 720px) {
  .prompt-strip { grid-template-columns: 1fr; }
  .menus { margin-left: 0; width: 100%; }
  .menu .panel { position: fixed; left: 1rem; right: 1rem; top: auto; width: auto; max-height: 70vh; }
}

/* Admin: eine gespeicherte Fassung */
main.wide .frame { height: 60vh; border: 1px solid var(--border); }
pre.source { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .75rem 1rem; line-height: 1.45; }
