/* Nischenfinder · Kundenfluss
   Farben: Tiefsee (Marke), Mint (Akzent), kühles Arbeitsgrau.
   Erkennungszeichen: die vier Faktoren als Pegelstände. */
:root {
  --deep: #0B1F2A;
  --deep-2: #12303F;
  --mint: #34D3AE;
  --mint-ink: #0E7C63;
  --surface: #EEF3F2;
  --panel: #FFFFFF;
  --line: #D5DFDD;
  --ink: #0F2430;
  --ink-2: #4A5F69;
  --ink-3: #7A8C94;
  --gA: #0F9B73; --gB: #5FA834; --gC: #D99A16; --gD: #DD6A2A; --gF: #C9413A;
  --r-lg: 14px; --r-sm: 8px;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--surface); }
body { font-family: var(--font); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--mint-ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
.num, table td.n, table th.n { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ Kopfzeile */
.top { background: var(--deep); color: #E8F4F1; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand svg { width: 26px; height: 26px; }
.brand .wm { font-size: 17px; letter-spacing: -0.01em; }
.brand .wm b { font-weight: 700; color: var(--mint); }
.brand .tool { font-weight: 600; font-size: 15px; color: #B9D3CD; padding-left: 10px; border-left: 1px solid #2C4A58; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: #B9D3CD; text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover { color: #fff; background: var(--deep-2); }
.nav a.on { color: var(--deep); background: var(--mint); font-weight: 600; }
.usage { font-size: 13.5px; color: #9DB8B2; }
.usage strong { color: #fff; font-weight: 600; }
.linkbtn { background: none; border: 0; color: #9DB8B2; cursor: pointer; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: #fff; }

/* ------------------------------------------------ Grundlayout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 34px 22px 90px; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; max-width: 22ch; }
.lead { color: var(--ink-2); margin-top: 8px; max-width: 64ch; }
h2 { font-size: 26px; letter-spacing: -0.015em; line-height: 1.2; }
h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }

/* ------------------------------------------------ Formular */
.form { margin-top: 22px; display: grid; grid-template-columns: 1.1fr 1.2fr auto; gap: 12px; align-items: start; }
.form > .btn { margin-top: 27px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; }
.field input:focus { border-color: var(--mint-ink); outline: none; box-shadow: 0 0 0 3px #34d3ae55; }
.field { position: relative; }
.kwcity { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.kwcity input { width: 150px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px; }
.btn { background: var(--deep); color: #fff; border: 0; border-radius: var(--r-sm); padding: 13px 22px; font-weight: 600; cursor: pointer; white-space: nowrap; font-size: 16px; }
.btn:hover { background: var(--deep-2); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.mint { background: var(--mint); color: var(--deep); }
.btn.mint:hover { background: #2bc29f; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.sugg { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 12px 30px #0b1f2a26; overflow: hidden; }
.sugg button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; cursor: pointer; font-size: 15px; }
.sugg button:hover, .sugg button.on { background: #E5F6F1; }
.sugg .t { color: var(--ink-3); font-size: 13px; }
.msg { margin-top: 12px; }
.err { color: var(--gF); font-weight: 600; }
.note { background: #FFF6E0; border: 1px solid #F0D99A; color: #6A4B00; padding: 10px 14px; border-radius: var(--r-sm); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #E1EEEB; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 14px; }
.chip button { border: 0; background: #C9DEDA; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* ------------------------------------------------ Bericht */
.report { margin-top: 30px; }
.r-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.r-head .place { color: var(--ink-2); margin-top: 2px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #E1EEEB; color: var(--ink-2); }

.hero { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--deep); color: #E8F4F1; border-radius: var(--r-lg); overflow: hidden; }
.score { padding: 28px 28px 26px; border-right: 1px solid #1E3C4B; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.score .big { font-size: 92px; line-height: .9; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.score .of { color: #8FB0A8; font-size: 15px; margin-top: 6px; }
.score .grade { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; }
.score .grade i { font-style: normal; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; }
.score .cap { font-size: 14px; color: #8FB0A8; max-width: 30ch; }

/* Pegel: vier Messlatten */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 22px 18px; gap: 14px; }
.gauge { display: flex; flex-direction: column; align-items: stretch; }
.gauge-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.gauge-top b { font-size: 26px; font-weight: 800; }
.gauge-top span { font-size: 14px; color: #8FB0A8; font-variant-numeric: tabular-nums; }
.staff { position: relative; height: 170px; border-radius: 6px; background:
  repeating-linear-gradient(to top, #2A4A59 0 1px, transparent 1px 17px), #102B38; overflow: hidden; }
.staff::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background:
  repeating-linear-gradient(to top, #5B7C89 0 2px, transparent 2px 17px); opacity: .7; }
.water { position: absolute; left: 0; right: 0; bottom: 0; height: 0; transition: height 1.1s cubic-bezier(.2,.8,.2,1); }
.water::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.55); }
.gauge-lbl { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: #DDEEEA; }
.info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #5B7C89; color: #9DB8B2; font-size: 11px; font-weight: 700; cursor: help; background: none; flex-shrink: 0; }
.info .tip { display: none; position: absolute; z-index: 30; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 250px; background: #fff; color: var(--ink); font-weight: 400; font-size: 13.5px; line-height: 1.45; padding: 10px 12px; border-radius: var(--r-sm); box-shadow: 0 10px 28px #0b1f2a40; text-align: left; }
.info:hover .tip, .info:focus .tip { display: block; }

.verdict { margin-top: 20px; font-size: 17px; line-height: 1.62; max-width: 72ch; }
.notes { margin-top: 14px; display: grid; gap: 8px; max-width: 80ch; }
.notes p { font-size: 14.5px; color: var(--ink-2); padding-left: 14px; border-left: 3px solid var(--line); }

.section { margin-top: 30px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile .v { font-size: 21px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.tile .v { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 15px; font-weight: 500; color: var(--ink-3); }
.tile .l { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.tile.rent { background: #E5F6F1; border-color: #B6E6D9; }
.basis { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); max-width: 90ch; }

.signals { display: grid; gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sig { background: var(--panel); padding: 14px 18px; display: grid; grid-template-columns: 170px 1fr 28px; gap: 16px; align-items: center; }
.sig .sl { font-weight: 600; font-size: 15px; }
.sig .bar { height: 8px; background: #E4ECEA; border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.sig .bar i { display: block; height: 100%; width: 0; transition: width .9s ease; border-radius: 4px; }
.sig .tk { font-size: 14.5px; color: var(--ink-2); }
.sig .sg { font-weight: 800; font-size: 18px; text-align: right; }

.season { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 10px 0 0; }
.season .m { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.season .m i { display: block; width: 100%; max-width: 38px; background: #9FD9CB; border-radius: 4px 4px 0 0; min-height: 2px; }
.season .m.pk i { background: var(--mint-ink); }
.season .m span { font-size: 12px; color: var(--ink-3); }

.list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .kw { font-weight: 600; }
.row .meta { font-size: 13.5px; color: var(--ink-3); }
.lvl-niedrig { color: var(--gA); } .lvl-mittel { color: var(--gC); } .lvl-hoch { color: var(--gF); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

details.raw { margin-top: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
details.raw summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; }
details.raw summary::before { content: "+"; display: inline-block; width: 20px; color: var(--mint-ink); font-weight: 800; }
details.raw[open] summary::before { content: "–"; }
.raw-in { padding: 0 20px 22px; display: grid; gap: 26px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13.5px; padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #E6EDEB; vertical-align: top; }
th.n, td.n { text-align: right; }
.cls { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cls-verzeichnis { background: #E3F4EC; color: #0E6B4F; }
.cls-lokal { background: #EEF2D9; color: #5A6A10; }
.cls-unbekannt { background: #ECEFF1; color: #5A6B73; }
.sugg-err { padding: 12px 14px; color: var(--gF); font-size: 14px; }
.cls-etabliert { background: #F8E5DC; color: #9A3E17; }
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.kv div { padding: 8px 0; border-bottom: 1px solid #E6EDEB; font-size: 14.5px; }
.kv div:nth-child(even) { text-align: right; font-weight: 600; }

.actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.share { display: flex; flex: 1; min-width: 260px; }
.share input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: #fff; font-size: 14px; color: var(--ink-2); }
.share .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ------------------------------------------------ Vergleich & Verlauf */
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); margin-top: 22px; }
.tbl-wrap table td, .tbl-wrap table th { white-space: nowrap; }
.gb { display: inline-grid; place-items: center; min-width: 30px; height: 26px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 14px; padding: 0 6px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.filters input { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 220px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 14px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--deep); color: #fff; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }

/* ------------------------------------------------ Login */
.login { max-width: 420px; margin: 9vh auto 0; }
.login .panel { margin-top: 20px; }
.login .btn { width: 100%; margin-top: 14px; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .form { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .score { border-right: 0; border-bottom: 1px solid #1E3C4B; }
  .gauges { grid-template-columns: repeat(2, 1fr); }
  .staff { height: 110px; }
  .tiles, .two { grid-template-columns: 1fr; }
  .sig { grid-template-columns: 1fr 28px; }
  .sig .sl { grid-column: 1 / -1; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav a { white-space: nowrap; font-size: 14px; padding: 6px 10px; }
  .top-in { gap: 12px 18px; }
  .form > .btn { margin-top: 0; }
  .score .big { font-size: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .water, .sig .bar i { transition: none; }
  .spin { animation: none; }
}
