/*
 * WEB·KODEX Portal – Gestaltung wie web-kodex.eu (Navy und Silber).
 * Die Variablen --c-* bedienen die Formular-Stile aus dem Kern (rechtstexte.css).
 */
@font-face { font-family: 'Archivo WK'; src: url('fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Inter WK'; src: url('fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --navy-900: #0a1628;
  --navy-800: #0c1b33;
  --navy-700: #112a4d;
  --mark: #10264a;
  --stahl: #2f5f9e;
  --silber: #c3ccd7;

  --c-bg: #ffffff;
  --c-card: #ffffff;
  --c-card-2: #f4f6f9;
  --c-border: #d4dbe5;
  --c-text: #0c1b33;
  --c-text-muted: #4b5a6e;
  --c-text-dim: #5b6a7f;
  --c-primary: #2f5f9e;
  --c-pass: #1d7a4d;
  --c-pass-bg: #e7f4ec;
  --c-warn: #8a5a00;
  --c-warn-bg: #fdf3dd;
  --c-fail: #b42318;
  --c-fail-bg: #fdecec;
  --c-info: #2f5f9e;
  --c-info-bg: #eaf1fb;
  --radius: 12px;

  --font-head: 'Archivo WK', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Inter WK', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #eef1f5; color: var(--c-text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
a { color: var(--stahl); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--stahl); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 850; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); font-weight: 900; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; font-weight: 800; }
img, svg { max-width: 100%; }
code { font-size: .9em; background: #eef1f5; padding: 1px 5px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; font-weight: 600; }
.skip:focus { top: 10px; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Kopf ── */
.kopf { background: linear-gradient(160deg, var(--navy-700), var(--navy-900) 70%); color: #fff; }
.kopf__innen { max-width: 1160px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-height: 64px; }
.kopf :focus-visible { outline-color: #fff; }
.marke { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.marke__wort { font-family: var(--font-head); font-weight: 900; letter-spacing: .06em; font-size: 1.1rem; }
.marke__zusatz { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--silber); border: 1px solid rgba(195,204,215,.45); border-radius: 999px; padding: 2px 8px; }
.kopf nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.kopf nav a { display: block; padding: 8px 12px; border-radius: 8px; color: #d3dbe6; text-decoration: none; font-weight: 550; }
.kopf nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.kopf nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.kopf__konto { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .92rem; color: #d3dbe6; }
.kopf__konto form { margin: 0; }
.link-knopf { background: none; border: 0; padding: 4px; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }

.band-hinweis { background: #e9eef6; border-bottom: 1px solid var(--c-border); padding: 10px 16px; text-align: center; font-size: .93rem; }
.band-hinweis--aus { background: var(--c-warn-bg); }

/* ── Inhalt ── */
.sa-wrap { max-width: 1160px; margin: 0 auto; padding: 32px 16px 56px; }
.kopfbereich { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.kopfbereich p { margin: 0; color: var(--c-text-muted); max-width: 70ch; }
.kopfbereich h1 { margin: 0 0 6px; }
.eyebrow, .rt-eyebrow { margin: 0 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--stahl); }
.sa-hero { margin-bottom: 20px; }
.sa-hero p { color: var(--c-text-muted); margin: 0; }
.sa-hero h1 { margin: 0 0 6px; }
.sa-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }

.karte { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(12,27,51,.05), 0 8px 24px rgba(12,27,51,.06); margin-bottom: 18px; }
.karte > :last-child { margin-bottom: 0; }
.raster2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.sa-note, .sa-error { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: .95rem; }
.sa-note { background: var(--c-info-bg); border: 1px solid #c3d5ee; }
.sa-error { background: var(--c-fail-bg); border: 1px solid #e3a5a5; color: #7a1b1b; }
.sa-empty { padding: 28px; text-align: center; color: var(--c-text-muted); background: #fff; border: 1px dashed var(--c-border); border-radius: var(--radius); }

/* ── Knöpfe ── */
.sa-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .55em 1.25em; border-radius: 999px; border: 2px solid var(--mark); background: var(--mark); color: #fff; font: inherit; font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer; }
.sa-btn:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.sa-btn--ghost { background: #fff; color: var(--c-text); border-color: var(--silber); }
.sa-btn--ghost:hover { background: #fff; color: var(--c-text); border-color: var(--mark); }
.sa-btn--sm { min-height: 36px; padding: .35em 1em; font-size: .88rem; }
.sa-btn[disabled], .sa-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.rt-danger { color: var(--c-fail) !important; }

/* ── Tabellen ── */
.tabelle-rahmen { overflow-x: auto; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); }
.sa-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.sa-table th { text-align: left; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-dim); padding: 12px 14px; border-bottom: 1px solid var(--c-border); background: #f7f9fc; white-space: nowrap; }
.sa-table td { padding: 12px 14px; border-bottom: 1px solid #e6ebf2; vertical-align: middle; }
.sa-table tr:last-child td { border-bottom: 0; }
.rt-states { display: flex; gap: 6px; flex-wrap: wrap; }
.rt-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; border: 1px solid; }
.rt-state--ok { background: var(--c-pass-bg); color: var(--c-pass); border-color: #b9dcc6; }
.rt-state--old { background: var(--c-warn-bg); color: var(--c-warn); border-color: #ecd49b; }
.rt-state--none { background: #f4f6f9; color: var(--c-text-dim); border-color: var(--c-border); }

.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status--angefragt { background: var(--c-info-bg); color: var(--stahl); }
.status--test { background: var(--c-warn-bg); color: var(--c-warn); }
.status--aktiv { background: var(--c-pass-bg); color: var(--c-pass); }
.status--gesperrt, .status--abgelehnt { background: var(--c-fail-bg); color: var(--c-fail); }

/* ── Formulare außerhalb des Kern-Formulars ── */
.feld { display: grid; gap: 6px; margin: 0 0 16px; }
.feld label, .feld legend, .feld > span { font-weight: 600; font-size: .92rem; }
.feld input, .feld select, .feld textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--c-text); background: #fff; border: 1.5px solid #b9c4d2; border-radius: 9px; padding: 10px 12px; min-height: 46px; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible { border-color: var(--stahl); outline: 3px solid rgba(47,95,158,.3); outline-offset: 0; }
.feld small { color: var(--c-text-muted); font-size: .85rem; }
.feld-reihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.feld-reihe .feld { flex: 1 1 260px; margin: 0; }
.wahl { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.wahl input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--mark); flex: none; }

/* Anmelde-Seiten */
.anmelde { max-width: 440px; margin: 24px auto; }
.anmelde .karte { padding: 30px; }
.anmelde h1 { font-size: 1.7rem; }

/* Pakete */
.paketwahl { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 10px 0 16px; }
.paketwahl label { display: block; border: 2px solid var(--c-border); border-radius: 12px; padding: 14px 16px; cursor: pointer; background: #fff; }
.paketwahl label:has(input:checked) { border-color: var(--mark); box-shadow: 0 6px 18px rgba(12,27,51,.12); }
.paketwahl input { accent-color: var(--mark); }
.paketwahl strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.paketwahl .preis { font-family: var(--font-head); font-weight: 900; font-size: 1.6rem; }

/* Siegel */
.siegel-raster { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.siegel-karte { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; }
.siegel-karte--dunkel .siegel-bild { background: var(--navy-800); }
.siegel-bild { background: #f4f6f9; border-radius: 10px; padding: 14px; display: grid; place-items: center; min-height: 150px; }
.siegel-bild img { max-height: 190px; width: auto; }
.siegel-karte p { margin: 0; font-size: .88rem; color: var(--c-text-muted); }
.siegel-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.code { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; border: 1px solid var(--c-border); border-radius: 8px; padding: 8px; background: #f7f9fc; resize: vertical; }

/* Anleitung */
.anleitung ol { padding-left: 1.2em; }
.anleitung li { margin-bottom: .5em; }
.anleitung h2 { margin-top: 1.4em; }

/* Admin */
.anfrage-karte { display: grid; gap: 4px 24px; grid-template-columns: 1fr auto; }
.anfrage-karte h3 { margin: 0; }
.anfrage-karte dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 8px 0 0; font-size: .93rem; }
.anfrage-karte dt { color: var(--c-text-dim); }
.anfrage-karte dd { margin: 0; }
.anfrage-aktionen { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.anfrage-aktionen form { margin: 0; }
@media (max-width: 640px) { .anfrage-karte { grid-template-columns: 1fr; } .anfrage-aktionen { flex-direction: row; flex-wrap: wrap; } }

/* Texte-Vorschau aus dem Kern */
.rt-preview { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 28px; }

.fuss { text-align: center; padding: 24px 16px 40px; font-size: .85rem; color: var(--c-text-dim); }
.fuss p { margin: 0; }
