/* ==========================================================================
   vFOC Design-System – Basis & Komponenten
   Unabhängig vom Website-Layout, damit das FOC sie im UI-Update übernehmen kann.
   Benötigt tokens.css.
   ========================================================================== */

/* ---- Basis ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: var(--fs-base)/1.6 var(--font);
	-webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; }
h1, h2, h3 { overflow-wrap: break-word; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: var(--fs-sm); }
.lead { font-size: var(--fs-lg); color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow {
	color: var(--accent); font-weight: 700; font-size: var(--fs-xs);
	letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .8em;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent-strong); color: var(--on-accent); padding: 8px 14px; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---- Icons (Lucide-Stil, inline SVG) ---- */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-box {
	width: 42px; height: 42px; border-radius: var(--radius);
	background: var(--accent-soft); color: var(--accent);
	display: grid; place-items: center;
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
	font: 600 .95rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
	cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
	background: none; color: var(--text);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-icon { padding: 8px; }
.btn-block { width: 100%; }

/* ---- Karten ---- */
.card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: var(--space-5);
}
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.card-link:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.card h3 { margin-top: var(--space-4); }
.card p { color: var(--text-muted); margin: 0; }
.card .more { display: inline-block; margin-top: var(--space-4); color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.card-highlight { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong) inset; }

/* ---- Badges & Pills ---- */
.badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 2px 9px; border-radius: var(--radius-pill);
	font-size: var(--fs-xs); font-weight: 700; line-height: 1.6;
	background: var(--accent-soft); color: var(--accent);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-solid { background: var(--accent-strong); color: var(--on-accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---- Listen ---- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
	content: "✓"; position: absolute; left: 0; top: 2px;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--accent-soft); color: var(--accent);
	font-size: .72rem; font-weight: 800; display: grid; place-items: center;
}
.check-list b { display: block; }
.check-list span { color: var(--text-muted); }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-dim); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .center { text-align: center; }
.table .yes { color: var(--ok); font-weight: 800; }

/* ---- Formulare ---- */
.field { display: grid; gap: 6px; margin-bottom: var(--space-4); }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.input, .select, .textarea {
	width: 100%; padding: 10px 12px; border-radius: 8px;
	border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
	font: inherit;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- Segment-Umschalter ---- */
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 4px; gap: 2px; }
.segmented button {
	background: none; border: 0; color: var(--text-muted); cursor: pointer;
	padding: 8px 16px; border-radius: var(--radius-pill); font: 600 .9rem var(--font);
}
.segmented button.on, .segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--accent-strong); color: var(--on-accent); }
.segmented em { font-style: normal; font-size: .78rem; opacity: .85; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
	border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
	padding: 8px 16px; border-radius: var(--radius-pill); font: 600 .9rem var(--font); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
[role="tabpanel"][hidden] { display: none; }

/* ---- Akkordeon (details/summary) ---- */
.accordion { border-top: 1px solid var(--border); }
.accordion details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.accordion summary {
	cursor: pointer; list-style: none; font-weight: 700;
	display: flex; justify-content: space-between; gap: 20px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; flex: none; }
.accordion details[open] summary::after { content: "–"; }
.accordion details > :not(summary) { color: var(--text-muted); margin: 12px 0 0; }

/* ---- Hinweisboxen ---- */
.callout {
	border: 1px solid var(--border); border-left: 3px solid var(--accent);
	background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px;
}
.callout-warn { border-left-color: var(--warn); background: var(--warn-soft); }

/* ---- Kennzahlen ---- */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi small { color: var(--text-dim); display: block; }
.kpi strong { font-size: 1.5rem; }
