/* Strom Spotpreis tool — shared design system (no build step).
   German electricity spot price visualizer. Electric blue + amber on dark. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a1018;
  --bg-soft: #0f1726;
  --card: #131e30;
  --card-2: #18263c;
  --line: #25364f;
  --text: #eaf1fb;
  --dim: #a6bbd8;
  --muted: #6f86a8;
  --brand: #3d9bff;
  --brand-2: #ffd23f;
  --accent: #2fdd85;
  --good: #2fdd85;
  --hot: #ff5470;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(0,0,0,0.5);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 80% -10%, #16335c 0%, var(--bg) 55%) fixed;
  color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.site { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); background: rgba(10,16,24,0.74); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--text); }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 14px rgba(61,155,255,0.5); }
.nav nav a { color: var(--dim); margin-left: 22px; font-size: 0.95rem; font-weight: 600; }
.nav nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 44px 0 8px; }
.crumbs { color: var(--muted); font-size: 0.84rem; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.12; font-weight: 850; letter-spacing: -0.5px; }
h1 .grad { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--dim); font-size: 1.12rem; max-width: 72ch; margin-top: 16px; }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.8rem; font-weight: 700; color: var(--good); background: rgba(47,221,133,0.12); border: 1px solid rgba(47,221,133,0.3); padding: 4px 12px; border-radius: 999px; }
.live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(47,221,133,0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(47,221,133,0.6);} 70%{box-shadow:0 0 0 8px rgba(47,221,133,0);} 100%{box-shadow:0 0 0 0 rgba(47,221,133,0);} }

.app { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; margin-top: 20px; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } }
.card { background: linear-gradient(180deg, var(--card), var(--bg-soft)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card h2 { font-size: 1.04rem; font-weight: 750; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }

#chart3d { width: 100%; height: 380px; display: block; cursor: grab; touch-action: none; }
#chart3d:active { cursor: grabbing; }
.chart-hint { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 6px; }

.result-top { text-align: center; padding: 6px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.result-top .k { color: var(--dim); font-size: 0.9rem; font-weight: 650; }
.result-top .big { font-size: clamp(2.3rem, 7vw, 3.2rem); font-weight: 870; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.05; margin: 4px 0; color: var(--brand); }
.result-top .big small { font-size: 1rem; color: var(--muted); font-weight: 700; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .k { color: var(--muted); font-size: 0.76rem; font-weight: 650; }
.stat .v { font-size: 1.12rem; font-weight: 820; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .v.good { color: var(--good); } .stat .v.hot { color: var(--hot); }
.stat .s { color: var(--muted); font-size: 0.72rem; margin-top: 1px; }

.field { margin-bottom: 16px; }
.field .row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.field label { font-size: 0.9rem; font-weight: 650; color: var(--dim); }
.field .val { font-variant-numeric: tabular-nums; font-weight: 800; }
.inputbox { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; transition: border-color 0.15s; }
.inputbox:focus-within { border-color: var(--brand); }
.inputbox input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; width: 100%; }
.inputbox .post { color: var(--muted); font-weight: 700; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; margin-top: 12px; background: var(--line); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); border: 3px solid #0a1018; box-shadow: 0 2px 10px rgba(61,155,255,0.7); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid #0a1018; border-radius: 50%; background: var(--brand); cursor: pointer; }

.rate-table { margin-top: 8px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 360px; }
table.rate { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
table.rate thead th { position: sticky; top: 0; background: var(--card-2); color: var(--dim); font-weight: 700; text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); }
table.rate td { padding: 8px 14px; border-bottom: 1px solid rgba(37,54,79,0.6); color: var(--dim); }
table.rate td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
table.rate tr.now td { background: rgba(61,155,255,0.12); color: var(--text); }
.barcell { width: 45%; }
.barcell .bar { height: 13px; border-radius: 4px; min-width: 4px; }

section.block { margin: 38px 0; }
section.block h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
section.block p { color: var(--dim); max-width: 78ch; margin-bottom: 12px; }
.formula { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 14px 16px; color: var(--text); font-size: 0.95rem; overflow-x: auto; margin: 14px 0; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 12px; color: var(--dim); }
.note b { color: var(--text); }

details.faq { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--card); overflow: hidden; }
details.faq summary { cursor: pointer; padding: 15px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; font-weight: 400; transition: transform 0.2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .a { padding: 0 18px 16px; color: var(--dim); }

footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: 0.86rem; }
footer.site .disc { max-width: 82ch; margin-bottom: 12px; }
.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.foot-nav a { color: var(--dim); font-weight: 600; }
.prose { max-width: 78ch; }
.prose h2 { font-size: 1.3rem; font-weight: 800; margin: 26px 0 10px; }
.prose p { color: var(--dim); margin-bottom: 12px; }
.prose strong { color: var(--text); }
