/* Liquidrechner.com – Stylesheet 2026 */
:root {
	--bg: #0f0f12;
	--surface: #18181d;
	--surface-2: #212128;
	--border: #2e2e37;
	--text: #f2f2f5;
	--muted: #a3a3ad;
	--accent: #e0263a;
	--accent-soft: rgba(224, 38, 58, .14);
	--ok: #2fbf71;
	--warn: #f0a020;
	--radius: 14px;
	--shadow: 0 6px 24px rgba(0, 0, 0, .35);
	color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root {
		--bg: #f4f4f7;
		--surface: #ffffff;
		--surface-2: #f0f0f4;
		--border: #dcdce3;
		--text: #17171c;
		--muted: #52525c;
		--accent: #c81d30;
		--accent-soft: rgba(200, 29, 48, .09);
		--shadow: 0 4px 18px rgba(20, 20, 40, .08);
		color-scheme: light;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
a { color: var(--accent); }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 10;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: .2px; }
.brand img { width: 34px; height: 34px; }
.brand span b { color: var(--accent); font-weight: 800; }

.tabs { display: flex; gap: 4px; margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.tabs a {
	text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem;
	padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; }
@media (max-width: 520px) {
	.tabs { margin-left: 0; width: 100%; }
	.tabs a { flex: 1; text-align: center; padding: 8px 6px; }
}

main { flex: 1; padding: 24px 0 40px; }
@media (max-width: 520px) { .card { padding: 14px; } .wrap { padding: 0 12px; } .field label, .field .label { font-size: .95rem; } }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 22px; }

/* Karten */
.card {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 18px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.sticky-result { position: sticky; top: 76px; }
@media (max-width: 819px) { .sticky-result { position: static; } }

/* Formular */
.field { padding: 12px 0; border-bottom: 1px solid var(--border); }
.field:last-child { border-bottom: 0; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.field-head label { display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.field label, .field .label { font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.num { display: flex; align-items: center; gap: 6px; }
.num input {
	width: 78px; flex: none; text-align: right; font: inherit; font-weight: 700;
	background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
	border-radius: 10px; padding: 7px 9px;
}
.num input:focus, select:focus { outline: 2px solid var(--muted); outline-offset: 1px; border-color: transparent; }
.unit { color: var(--muted); font-size: .9rem; width: 46px; flex: none; }
select {
	font: inherit; background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
	border-radius: 10px; padding: 9px 10px; width: 100%;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; margin: 0; }
input[type=range] { --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; border: 1px solid var(--border); background: linear-gradient(to right, var(--accent) var(--p), var(--surface-2) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: pointer; }
input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--accent-soft); }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 400 !important; padding: 4px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex: none; }

details.more { margin-top: 6px; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
	border-radius: 10px; padding: 9px 14px; border: 1px solid var(--border);
	background: var(--surface-2); color: var(--text);
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-small { padding: 5px 10px; font-size: .88rem; }
.btn-icon { padding: 4px 10px; font-size: 1.1rem; line-height: 1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Ergebnis */
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.result-list li:last-child { border-bottom: 0; }
.result-list .name { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.result-list .val { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; text-align: right; }
.result-list .sub { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; }
.big { font-size: 2.4rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); margin: 8px 0 4px; }
.bar span { display: block; height: 100%; transition: width .2s; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.kpi .k { color: var(--muted); font-size: .8rem; }
.kpi .v { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.alert { border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: .92rem; }
.alert-warn { background: rgba(240, 160, 32, .12); border: 1px solid rgba(240, 160, 32, .45); }
.alert-info { background: var(--accent-soft); border: 1px solid var(--border); }
[hidden] { display: none !important; }

table.wraps { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.wraps th, table.wraps td { text-align: right; padding: 7px 6px; border-bottom: 1px solid var(--border); }
table.wraps th:first-child, table.wraps td:first-child { text-align: left; }
table.wraps th { color: var(--muted); font-weight: 600; font-size: .85rem; }
table.wraps tr.best td { background: var(--accent-soft); font-weight: 800; }

/* Startseite */
.hero { text-align: center; padding: 18px 0 8px; }
.hero img { width: 96px; height: 96px; }
.tool-cards { display: grid; gap: 16px; margin: 24px 0; }
@media (min-width: 680px) { .tool-cards { grid-template-columns: 1fr 1fr; } }
.tool-card { display: block; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-card .ico { font-size: 2rem; }
.tool-card h2 { margin: 8px 0 6px; }
.tool-card p { color: var(--muted); margin: 0 0 12px; }
.tool-card .go { color: var(--accent); font-weight: 700; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 28px; }
.prose ul { padding-left: 20px; }
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding-top: 16px; padding-bottom: 20px; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 14px; }

.toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
	background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
	font-weight: 600; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media print {
	.site-header, .site-footer, .actions, .no-print { display: none !important; }
	body { background: #fff; color: #000; }
	.card { box-shadow: none; border-color: #ccc; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Mobile: Ergebnisleiste unten */
.mobile-sum { display: none; }
@media (max-width: 819px) {
	.mobile-sum {
		display: flex; gap: 12px; justify-content: space-between; align-items: center;
		position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
		background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
		padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 20;
		font-variant-numeric: tabular-nums; font-size: .95rem; transition: opacity .2s, transform .2s;
	}
	.mobile-sum.off { opacity: 0; transform: translateY(20px); pointer-events: none; }
	.mobile-sum::after { content: "↓"; }
	body.has-sum { padding-bottom: 70px; }
}
@media print { .mobile-sum { display: none !important; } }
