/* Wattkoffer - Designidee: Typenschild und Gerätefront.
   Helles Aluminium, Graphit als Schrift, Signalgelb nur für Ladung/Leistung. */
@import url('/fonts/fonts.css');

:root {
  --alu: #e3e6e9;
  --alu-tief: #c9ced3;
  --platte: #f6f7f8;
  --graphit: #20252b;
  --grau: #56606a;
  --signal: #f2b300;
  --signal-hell: #ffe08a;
  --rot: #b42318;
  --gruen: #2f7d4a;
  --display: #1b2026;
  --display-text: #e9edf1;
  --display-dim: #8d98a3;
  --schmal: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --r-gehaeuse: 18px;
  --r-klein: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--alu);
  color: var(--graphit);
  font: 400 1.0625rem/1.55 var(--text);
  font-feature-settings: 'tnum' 1;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.lese { max-width: 68ch; }
.wrap.lese { max-width: none; }
.wrap.lese > * { max-width: 68ch; }

/* Kopf */
.kopf { padding: 18px 0; }
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.6rem/1 var(--schmal); letter-spacing: .01em; }
.marke svg { flex: none; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font: 500 1.05rem/1 var(--schmal); }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current='page'] { border-color: var(--graphit); }

/* Überschriften */
h1, h2, h3 { font-family: var(--schmal); line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }
.einleitung { font-size: 1.2rem; color: var(--grau); max-width: 52ch; }

/* Gerätefront (Rechner) */
.hero { padding: 24px 0 56px; }
.hero h1 { max-width: 16ch; text-wrap: balance; }
.front {
  margin-top: 28px;
  background: linear-gradient(180deg, #fbfcfc, #eef0f2);
  border: 1px solid var(--alu-tief);
  border-radius: var(--r-gehaeuse);
  box-shadow: inset 0 1px 0 #fff, 0 18px 40px -24px rgba(32, 37, 43, .45);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.front-links { padding: 24px; border-right: 1px solid var(--alu-tief); }
.front-rechts { padding: 24px; display: flex; flex-direction: column; gap: 18px; }

.szenarien { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.szenario {
  font: 600 1rem/1 var(--schmal);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--graphit);
  background: transparent;
  color: var(--graphit);
  cursor: pointer;
}
.szenario[aria-pressed='true'] { background: var(--graphit); color: var(--platte); }

.geraete { width: 100%; border-collapse: collapse; }
.geraete th { font: 500 .9rem/1.2 var(--schmal); color: var(--grau); text-align: left; padding: 0 6px 8px; }
.geraete td { padding: 6px; border-top: 1px solid var(--alu); vertical-align: middle; }
.geraete td:first-child { width: 100%; }
.geraete .name { display: flex; align-items: center; gap: 10px; }
.geraete input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--graphit); flex: none; }
.geraete input[type='number'], .geraete input[type='text'] {
  font: 500 1rem/1 var(--text);
  width: 5.2em;
  padding: 7px 8px;
  border: 1px solid var(--alu-tief);
  border-radius: var(--r-klein);
  background: #fff;
  color: var(--graphit);
}
.geraete input[type='text'] { width: 100%; }
.geraete .aus { color: var(--grau); }
.geraete .aus input[type='number'] { opacity: .55; }
.entfernen { border: 0; background: none; color: var(--grau); font-size: 1.3rem; cursor: pointer; padding: 4px 6px; }
.hinzu { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hinzu select, .knopf {
  font: 600 1rem/1 var(--schmal);
  padding: 10px 14px;
  border-radius: var(--r-klein);
  border: 1.5px solid var(--graphit);
  background: #fff;
  color: var(--graphit);
}
.knopf { cursor: pointer; text-decoration: none; display: inline-block; }
.knopf-voll { background: var(--graphit); color: var(--platte); }
.notiz { font-size: .92rem; color: var(--grau); margin-top: 14px; }

/* Display */
.display {
  background: var(--display);
  color: var(--display-text);
  border-radius: 12px;
  padding: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .5);
}
.display-zeile { display: flex; justify-content: space-between; gap: 12px; font: 500 1.05rem/1.3 var(--schmal); color: var(--display-dim); }
.display-zeile b { color: var(--display-text); font-weight: 600; }
.laufzeit { font: 700 clamp(2.6rem, 6vw, 3.6rem)/1 var(--schmal); margin: 14px 0 4px; color: var(--signal); }
.laufzeit-text { font: 500 1.05rem/1.3 var(--schmal); color: var(--display-dim); margin: 0 0 14px; }
.segmente { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; height: 26px; }
.segmente span { background: #2c333b; border-radius: 3px; }
.segmente span.an { background: var(--signal); }
.segmente span.teil { background: linear-gradient(90deg, var(--signal) var(--teil, 50%), #2c333b var(--teil, 50%)); }
.segment-legende { display: flex; justify-content: space-between; font: 500 .85rem/1 var(--schmal); color: var(--display-dim); margin-top: 6px; }

.regler label { font: 600 1.1rem/1.2 var(--schmal); display: flex; justify-content: space-between; }
.regler input[type='range'] { width: 100%; accent-color: var(--graphit); margin-top: 8px; }
.tage { display: flex; gap: 6px; margin-top: 6px; }
.tage button { flex: 1; font: 600 1rem/1 var(--schmal); padding: 9px 0; border: 1.5px solid var(--graphit); background: #fff; border-radius: var(--r-klein); cursor: pointer; color: var(--graphit); }
.tage button[aria-pressed='true'] { background: var(--graphit); color: var(--platte); }

.treffer h3 { margin-bottom: 8px; }
.treffer .treffer-liste { margin-top: 10px; }
.nach-liste { margin-top: 24px; }
.treffer ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.treffer li a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 10px 12px; border-radius: var(--r-klein); background: #fff; border: 1px solid var(--alu-tief); text-decoration: none;
}
.treffer li a:hover { border-color: var(--graphit); }
.treffer .t-name { font: 600 1.1rem/1.2 var(--schmal); }
.treffer .t-werte { grid-column: 1 / -1; font-size: .92rem; color: var(--grau); }
.treffer .t-wh { font: 700 1.1rem/1.2 var(--schmal); }
.warnung { color: var(--rot); font-weight: 500; }

/* Abschnitte */
.abschnitt { padding: 56px 0; }
.abschnitt-hell { background: var(--platte); border-block: 1px solid var(--alu-tief); }
.zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.formel { font: 600 1.3rem/1.35 var(--schmal); background: #fff; border-left: 4px solid var(--signal); padding: 14px 18px; margin: 0 0 1em; }

/* Vergleichstabelle */
.filter { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin: 18px 0; }
.filter label { display: flex; align-items: center; gap: 8px; font: 500 1.05rem/1 var(--schmal); }
.filter input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--graphit); }
.filter select { font: 500 1rem var(--text); padding: 6px 8px; border-radius: var(--r-klein); border: 1px solid var(--alu-tief); }
.tabelle-rahmen { overflow-x: auto; border: 1px solid var(--alu-tief); border-radius: 10px; background: #fff; }
table.vergleich { border-collapse: collapse; width: 100%; min-width: 940px; font-size: .98rem; }
.vergleich th {
  position: sticky; top: 0; background: var(--graphit); color: var(--platte);
  font: 600 1rem/1.15 var(--schmal); text-align: right; padding: 0; white-space: nowrap;
}
.vergleich th button { all: unset; cursor: pointer; display: block; padding: 12px 10px; width: 100%; box-sizing: border-box; }
.vergleich th button:focus-visible { outline: 3px solid var(--signal); outline-offset: -3px; }
.vergleich th[aria-sort='ascending'] button::after { content: ' ▲'; font-size: .7em; }
.vergleich th[aria-sort='descending'] button::after { content: ' ▼'; font-size: .7em; }
.vergleich th:first-child, .vergleich td:first-child { text-align: left; }
.vergleich td { padding: 10px; border-top: 1px solid var(--alu); text-align: right; white-space: nowrap; }
.vergleich tbody tr:hover { background: #fbf6e3; }
.vergleich td:first-child a { font: 600 1.08rem/1.2 var(--schmal); text-decoration: none; }
.vergleich td:first-child small { display: block; color: var(--grau); font-size: .85rem; }
.leer { color: var(--alu-tief); }

/* Typenschild */
.schild {
  position: relative;
  background: linear-gradient(135deg, #f4f5f6 0%, #dfe3e6 55%, #eceef0 100%);
  border: 1px solid #b9bfc5;
  border-radius: 10px;
  padding: 28px 32px;
  box-shadow: inset 0 1px 0 #fff, 0 10px 30px -20px rgba(32, 37, 43, .5);
}
.schild::before, .schild::after, .schild .schraube-u::before, .schild .schraube-u::after {
  content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #9aa2aa 60%, #6c747c);
}
.schild::before { top: 10px; left: 10px; }
.schild::after { top: 10px; right: 10px; }
.schild .schraube-u::before { bottom: 10px; left: 10px; }
.schild .schraube-u::after { bottom: 10px; right: 10px; }
.schild-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--graphit); padding-bottom: 10px; margin-bottom: 16px; }
.schild-kopf h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.schild-kopf .marke-klein { font: 600 1.2rem/1 var(--schmal); color: var(--grau); }
.werte { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; margin: 0; }
.werte div { padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(32, 37, 43, .18); }
.werte dt { font: 500 .95rem/1.2 var(--schmal); color: var(--grau); }
.werte dd { margin: 2px 0 0; font: 700 1.5rem/1.15 var(--schmal); }
.werte dd small { font-size: .7em; font-weight: 600; }
.schild-fuss { margin-top: 14px; font-size: .9rem; color: var(--grau); }

.alltag { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.alltag li { background: #fff; border: 1px solid var(--alu-tief); border-radius: 10px; padding: 16px; }
.alltag b { display: block; font: 700 2rem/1.05 var(--schmal); }
.alltag span { color: var(--grau); }

.hinweis-box { background: var(--signal-hell); border-left: 4px solid var(--signal); padding: 12px 16px; border-radius: var(--r-klein); max-width: 68ch; }
.nach-schild { margin-top: 20px; }
.kaufen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.anzeige { font: 500 .85rem/1 var(--text); color: var(--grau); border: 1px solid var(--alu-tief); border-radius: 4px; padding: 3px 6px; margin-left: -6px; }
.quellen { font-size: .92rem; color: var(--grau); }
.quellen li { margin-bottom: 4px; overflow-wrap: anywhere; }

/* Fuß */
.fuss { padding: 40px 0 56px; font-size: .95rem; color: var(--grau); }
.fuss .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; border-top: 1px solid var(--alu-tief); padding-top: 24px; }
.fuss nav { display: flex; gap: 18px; flex-wrap: wrap; }

.rechtstext h2 { font-size: 1.6rem; margin-top: 1.4em; }

@media (max-width: 860px) {
  .front { grid-template-columns: 1fr; }
  .front-links { border-right: 0; border-bottom: 1px solid var(--alu-tief); }
}
@media (max-width: 520px) {
  .front-links, .front-rechts { padding: 16px; }
  .geraete input[type='number'] { width: 4.2em; padding: 7px 5px; }
  .geraete td { padding: 6px 3px; }
  .schild { padding: 24px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .segmente span { transition: background-color .25s ease; }
}
