:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #121821;
  --muted: #5b6573;
  --line: #e3e7ec;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --neg: #b42318;
  --pos: #067647;
  --chart-line: #0f766e;
  --chart-area: rgba(15, 118, 110, 0.10);
  --signal: #c2410c;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720;
    --surface: #16202b;
    --text: #e6ebf1;
    --muted: #94a0ae;
    --line: #26323f;
    --accent: #2dd4bf;
    --accent-ink: #062521;
    --neg: #f97066;
    --pos: #47cd89;
    --chart-line: #2dd4bf;
    --chart-area: rgba(45, 212, 191, 0.12);
    --signal: #fb923c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2rem 0 .6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
h3 { font-size: 1rem; margin: 0 0 .3rem; }
p { margin: .4rem 0; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.thin { font-weight: 400; }
.small { font-size: .875rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.cur { color: var(--muted); font-size: .8em; }
.error { color: var(--neg); }
.tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
       background: var(--line); color: var(--muted); border-radius: 4px; padding: 2px 6px; vertical-align: middle; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

main { padding-bottom: 2rem; min-height: 70vh; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.card.narrow { max-width: 520px; }
.card.empty { text-align: center; padding: 28px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 14px; align-items: center; }

button, .button {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; display: inline-block;
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.linklike { background: none; padding: 0; color: var(--accent); font-weight: 500; }
button.danger, .danger { color: var(--neg); }

input, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 500; font-size: .95rem; }
.form label.check, label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; }
legend { font-weight: 500; padding: 0 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.hero { padding: 1.5rem 0 .5rem; max-width: 720px; }
.hero h1 { font-size: 2rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.login .row input { flex: 1 1 240px; }
.login label { font-weight: 600; display: block; margin-bottom: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid3 .card { margin: 0; }
.devnote { background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 10px; }

.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tablewrap { overflow-x: auto; }
table.hits { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hits th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.hits td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hits tr:last-child td { border-bottom: 0; }
.hits .r, .r { text-align: right; }
.tk { font-weight: 700; font-family: var(--mono); }
.nm { color: var(--muted); font-size: .85rem; margin-left: 6px; }

.price { text-align: right; }
.big { font-size: 1.6rem; font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.ch-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; }
.ch-area { fill: var(--chart-area); stroke: none; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-label { fill: var(--muted); font: 11px var(--font); }
.ch-signal-line { stroke: var(--signal); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-signal-dot { fill: var(--signal); }
.ch-signal-label { fill: var(--signal); font-weight: 600; }
.block-head a { white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.stats.inner { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.stats.inner.four { grid-template-columns: repeat(4, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.stats.inner .stat { background: var(--bg); }
.stat .lbl { color: var(--muted); font-size: .8rem; }
.stat .val { font-size: 1.15rem; font-weight: 600; }

.prose { max-width: 760px; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .3rem 0; }

.foot { border-top: 1px solid var(--line); padding: 18px 0 28px; }
.disclaimer { font-size: .85rem; color: var(--muted); max-width: 760px; }

@media (max-width: 720px) {
  .grid3, .stats { grid-template-columns: 1fr 1fr; }
  .stats.inner, .stats.inner.four { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .hits .nm { display: block; margin-left: 0; font-size: .8rem; }
  .hits .cur { display: none; }
  .price { text-align: left; }
  .ch-label { font-size: 15px; }
  .hero h1 { font-size: 1.6rem; }
  .nav { gap: 12px; }
}
@media (max-width: 420px) {
  .grid3 { grid-template-columns: 1fr; }
  .stats.inner, .stats.inner.four { grid-template-columns: 1fr 1fr; }
}
.ch-high { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }

/* Login-Optionen (Sitzungsdauer, Neuigkeiten) und Hinweise im Konto */
.login-options { display: grid; gap: 10px; margin-top: 12px; }
.login-options label.inline { display: flex; gap: 8px; align-items: center; font-weight: 400; flex-wrap: wrap; }
.login-options select { width: auto; }
label.check { align-items: flex-start; }
label.check input { margin-top: 4px; flex: none; }
.notice { padding: 12px 16px; }

/* Impressum / Datenschutz */
.legal .prose { margin: 0 auto; }
.legal h1 { margin-bottom: .2rem; }
.legal .card h2 { margin-bottom: .5rem; }
.legal .card p { margin: .5rem 0; line-height: 1.6; }
.legal .card p:first-of-type { margin-top: 0; }
.legal .card.highlight { border-left: 4px solid var(--accent); }
.legal code { font-size: .9em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } }
