/* Citizen.P Media – Werte aus dem Design (Zinc-Graustufen, Inter Tight + JetBrains Mono). */
:root {
  --bg: #F4F4F5;
  --fg: #0A0A0A;
  --card: #FFFFFF;
  --muted: #52525B;
  --subtle: #71717A;
  --line: #E4E4E7;
  --line-strong: #D4D4D8;
  --inv-fg: #FAFAFA;
  --inv-muted: #A1A1AA;
  --inv-line: #3F3F46;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 6px;
  --radius-sm: 4px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
/* Dark Mode wie im Design: die ganze Seite wird invertiert. */
html[data-theme="dark"] { background: #0B0B0A; }
html[data-theme="dark"] .page,
html[data-theme="dark"] .toast { filter: invert(1); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
html[data-theme="dark"] body { background: #0B0B0A; }

a { color: var(--fg); }
a:hover { color: var(--muted); }
code { font-family: var(--mono); font-size: 0.92em; }
button, input, select, textarea { font: inherit; color: inherit; }

.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); padding: 0 24px 32px; transition: filter 0.35s ease; }
/* Footer bleibt auch bei kurzen Seiten unten. */
.container { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; }
.container > main { flex: 1; }

/* Kopfzeile */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line-strong); }
.brand { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: 0.14em; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; align-items: center; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.nav-link.is-active { color: var(--fg); font-weight: 600; border-bottom-color: var(--fg); }
.nav-divider { width: 1px; height: 20px; background: var(--line-strong); }
.cart-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fg); color: var(--inv-fg); font-family: var(--mono); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.cart-count[hidden] { display: none; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; }
.theme-icon-light, .theme-icon-dark { display: inline-flex; }
.theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: inline-flex; }

/* Hero */
.hero { padding: 72px 0 48px; display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.hero-wide { max-width: 760px; }
.hero-sub { padding: 96px 0 40px; }
.hero h1 { margin: 0; font-size: clamp(36px, 6vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.hero h2 { margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--muted); }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid-320 { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.grid-260 { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.grid-280 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

/* Paketkarten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.card-dark { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-name { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; }
.card-tag { font-size: 13px; color: var(--muted); }
.card-dark .card-tag { color: var(--inv-muted); }
.pill { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.pill-muted { color: var(--muted); font-size: 11px; padding: 2px 8px; margin-left: 4px; }
.pill-dark { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.price { display: flex; align-items: baseline; gap: 8px; }
.price-val { font-size: 44px; font-weight: 600; letter-spacing: -0.02em; }
.card-compact .price-val { font-size: 40px; }
.price-per { font-size: 14px; color: var(--muted); }
.card-dark .price-per { color: var(--inv-muted); }
.specs { display: flex; flex-direction: column; font-size: 15px; }
.spec { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.card-compact .spec { padding: 10px 0; }
.spec:last-child { border-bottom: 1px solid var(--line); }
.spec-key { color: var(--muted); }
.spec-val { font-family: var(--mono); font-weight: 500; text-align: right; }
.card-dark .spec, .panel-dark .spec { border-color: var(--inv-line); }
.card-dark .spec-key, .panel-dark .spec-key { color: var(--inv-muted); }
.card-cta { margin-top: auto; }

/* Buttons */
.btn { display: block; width: 100%; text-align: center; text-decoration: none; padding: 14px 16px; min-height: 48px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent; background: none; }
.btn-outline { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn-outline:hover { background: var(--fg); color: var(--inv-fg); }
.btn-dark { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.btn-dark:hover { background: #27272A; color: var(--inv-fg); }
.btn-light { background: var(--inv-fg); color: var(--fg); border-color: var(--inv-fg); }
.btn-light:hover { background: #E4E4E7; color: var(--fg); }
.btn-ghost-light { border-color: var(--inv-line); color: var(--inv-fg); }
.btn-ghost-light:hover { border-color: var(--inv-fg); color: var(--inv-fg); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn:disabled:hover { background: inherit; }
.btn-light:disabled:hover { background: var(--inv-fg); }
.btn-dark:disabled:hover { background: var(--fg); }
.btn-ghost-light:disabled:hover { border-color: var(--inv-line); background: none; }
.btn-sm { display: inline-block; width: auto; min-height: 40px; padding: 9px 14px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.panel-dark :focus-visible, .card-dark :focus-visible { outline-color: var(--inv-fg); }

/* Panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-stack { margin-top: 16px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.panel-row { margin-top: 16px; padding: 28px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; font-size: 15px; }
.panel-grid { margin-top: 16px; padding: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.panel-col { display: flex; flex-direction: column; gap: 14px; }
.panel-main { min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.panel-dark { background: var(--fg); color: var(--inv-fg); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.label { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.feature, .fact { display: flex; gap: 12px; align-items: flex-start; }
.feature svg { flex: none; }
.feature-text { display: flex; flex-direction: column; gap: 2px; }
.feature-title { font-weight: 600; }
.feature-sub { font-size: 14px; color: var(--muted); }
.facts { margin-top: 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; align-items: center; gap: 16px; }
.fact svg { flex: none; }
.fact-key { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 13px; }
.chip { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.chip-link { text-decoration: none; padding: 10px 14px; }
.chip-link:hover { border-color: var(--fg); color: var(--fg); }
.plain-list { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.fineprint { margin: 28px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* Konfigurator / Rechner */
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split-stretch { align-items: stretch; }
.split > .panel-main, .split > .stack { flex: 999 1 560px; }
.split > .panel-dark { flex: 1 1 340px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.slider { display: flex; flex-direction: column; gap: 10px; }
.slider-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.slider-head label { font-weight: 600; }
.slider input[type="range"] { width: 100%; accent-color: var(--fg); height: 24px; margin: 0; }
.slider-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--subtle); }
.mono { font-family: var(--mono); font-size: 15px; }
.muted { color: var(--muted); }
.muted-inv { font-size: 14px; color: var(--inv-muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.m0 { margin: 0; }
.terms-wrap { display: flex; flex-direction: column; gap: 10px; }
.terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.term { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 10px 6px; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; background: var(--card); color: var(--fg); border: 1px solid var(--line-strong); }
.term:hover { border-color: var(--fg); }
.term.is-on { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.term-days { font-weight: 600; }
.term-off { font-family: var(--mono); font-size: 13px; }
.total-block { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.total-big { font-size: 48px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.total-huge { font-size: 56px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.push-down { margin-top: auto; }
.calc-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-grow { flex: 1 1 160px; }
.field-unit { flex: 0 1 120px; }
.field-price { flex: 1 1 200px; }
.field label, .field-label { font-size: 14px; color: var(--muted); }
.input-big { font-family: var(--mono); font-size: 28px; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); width: 100%; min-height: 56px; }
.select-big { font-size: 24px; }
.calc-price { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 56px; }
.notice { margin: 0; font-size: 14px; line-height: 1.5; padding: 12px 14px; border: 1px solid var(--fg); border-radius: var(--radius-sm); }
.notice[hidden] { display: none; }
.examples { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.field-full { grid-column: 1 / -1; }
.field input, .field textarea { padding: 12px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); font-size: 16px; width: 100%; }
.field textarea { resize: vertical; }
.field input:disabled { background: var(--bg); cursor: not-allowed; }
.field input.input-big { font-size: 28px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }

/* Warenkorb */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }
.cart-lines { display: flex; flex-direction: column; }
.cart-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 1px solid var(--line); }
.cart-info { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; min-width: 0; }
.cart-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 17px; }
.cart-details { font-size: 13px; color: var(--muted); line-height: 1.5; }
.cart-side { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cart-prices { display: flex; flex-direction: column; align-items: flex-end; min-width: 96px; }
.cart-line-total { font-weight: 600; font-size: 18px; }
.qty { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 44px; min-height: 44px; border: 0; background: var(--card); font-size: 18px; cursor: pointer; }
.qty-btn:hover:not(:disabled) { background: var(--bg); }
.qty-btn:disabled { color: var(--line-strong); cursor: not-allowed; }
.qty-input { width: 48px; text-align: center; border: 0; border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); font-family: var(--mono); background: var(--card); -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sticky { position: sticky; top: 24px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.disabled-action { display: flex; flex-direction: column; gap: 6px; }
.soon { font-size: 12px; color: var(--inv-muted); text-align: center; letter-spacing: 0.02em; }
.empty .lead { max-width: 560px; }

/* Login / Registrierung */
.auth-wrap { display: flex; justify-content: center; padding: 72px 0 24px; }
.auth-card { width: 100%; max-width: 440px; gap: 20px; }
.h-auth { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }

/* Admin */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; }
.table td.mono { font-size: 14px; white-space: nowrap; }
.md-view { margin: 0; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Rechtliches */
.legal { gap: 0; padding-top: 8px; padding-bottom: 8px; }
.legal-sec { padding: 28px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.legal-sec:first-child { border-top: 0; }
.legal-sec h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.legal-sec p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.legal-sec .address { color: var(--fg); }
.legal-list { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

/* Fußzeile */
.site-footer { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: calc(100% - 32px); padding: 14px 18px; background: var(--fg); color: var(--inv-fg); border-radius: var(--radius); font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.toast[hidden] { display: none; }
.toast a { color: var(--inv-fg); font-weight: 600; }

/* Admin */
.admin-bar { margin-bottom: 16px; }
.admin-bar form { display: flex; align-items: center; gap: 12px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.admin-tabs .cart-count { margin-left: 2px; }
.notice-ok { border-color: var(--line-strong); background: var(--card); }
.notice + .panel, .notice + form, .notice + section { margin-top: 16px; }
.banner { margin-top: 16px; background: var(--card); }
.mt16 { margin-top: 16px; }
.chip-on { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.chip-on:hover { color: var(--inv-fg); }
.status { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.status-neu { background: var(--fg); color: var(--inv-fg); border-color: var(--fg); }
.status-in_bearbeitung { border-color: var(--fg); }
.status-erledigt, .status-abgelehnt { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field select { padding: 12px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); font-size: 16px; width: 100%; }
.field-inv label { color: var(--inv-muted); }
.field-inv select, .field-inv textarea { background: #18181B; color: var(--inv-fg); border: 1px solid var(--inv-line); border-radius: var(--radius-sm); padding: 12px; font-size: 15px; width: 100%; }
.field-inv select { min-height: 48px; }
.field-qty { width: 88px; }
.field-qty input { text-align: center; font-family: var(--mono); }
.field-check { justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }
details summary { cursor: pointer; min-height: 24px; }
.danger-zone { margin-top: 16px; padding: 20px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-danger { border-color: #B91C1C; color: #B91C1C; background: transparent; }
.btn-danger:hover { background: #B91C1C; color: #FFFFFF; }
.toggles { display: flex; flex-direction: column; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-row:last-child { border-bottom: 1px solid var(--line); }
.toggle-row.is-disabled { cursor: default; opacity: 0.55; }
.toggle-text { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background 0.2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.switch:checked { background: var(--fg); }
.switch:checked::after { transform: translateX(22px); }
.switch:disabled { cursor: not-allowed; }

@media (max-width: 640px) {
  .page { padding: 0 16px 48px; }
  .site-header { padding: 20px 0; }
  .site-nav { gap: 6px 18px; }
  .nav-divider { display: none; }
  .hero { padding: 48px 0 32px; }
  .panel-main, .panel-dark { padding: 24px; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-val { font-size: 38px; }
  .sticky { position: static; }
}
