/* =============================================================
   DBA Tools – gemeinsames Design für Auswahlseite, Bereiche und Doku
   ============================================================= */
:root{
  --navy:#0f2340; --navy-2:#16335c; --navy-3:#1e4176;
  --gold:#c8a24a; --gold-2:#e0c078; --gold-soft:#e9d9ac;
  --ink:#111c2e; --muted:#5d6a7e; --line:#e4e8f0;
  --bg:#f4f6fa; --card:#ffffff; --card-2:#fbfcfe;
  --green:#1f7a56; --amber:#a8700f; --slate:#546076;
  --shadow-s:0 1px 2px rgba(15,35,64,.06), 0 4px 12px rgba(15,35,64,.05);
  --shadow-m:0 10px 34px rgba(15,35,64,.13);
  --r-s:10px; --r-m:14px; --r-l:20px;
}
@media (prefers-color-scheme:dark){
  :root{
    --ink:#e7ecf5; --muted:#93a0b6; --line:#22304a;
    --bg:#070e1a; --card:#0f1a2d; --card-2:#132038;
    --green:#4fc79a; --amber:#e0a94a;
  }
}
:root[data-theme="light"]{
  --ink:#111c2e; --muted:#5d6a7e; --line:#e4e8f0;
  --bg:#f4f6fa; --card:#ffffff; --card-2:#fbfcfe;
  --green:#1f7a56; --amber:#a8700f;
}
:root[data-theme="dark"]{
  --ink:#e7ecf5; --muted:#93a0b6; --line:#22304a;
  --bg:#070e1a; --card:#0f1a2d; --card-2:#132038;
  --green:#4fc79a; --amber:#e0a94a;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--ink);line-height:1.5;
  -webkit-font-smoothing:antialiased;min-height:100vh;
}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
svg{display:block}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}

/* ---------- Kopfleiste ---------- */
.topbar{
  background:linear-gradient(120deg,var(--navy) 0%,var(--navy-2) 62%,var(--navy-3) 100%);
  color:#fff;position:relative;overflow:hidden;
}
.topbar::after{
  content:"";position:absolute;right:-90px;top:-140px;width:380px;height:380px;border-radius:50%;
  background:radial-gradient(circle,rgba(200,162,74,.22),transparent 68%);pointer-events:none;
}
.topbar .wrap{display:flex;align-items:center;gap:16px;padding-top:18px;padding-bottom:18px;position:relative;z-index:1}
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.brand img{height:38px;width:auto;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35))}
.brand .txt{min-width:0}
.brand .name{font-size:15px;font-weight:800;letter-spacing:.2px;line-height:1.15}
.brand .area{font-size:12px;color:var(--gold-soft);font-weight:600;letter-spacing:.4px}
.topbar nav{margin-left:auto;display:flex;align-items:center;gap:8px}
.nav-link{
  font-size:13px;font-weight:600;color:#c9d5e8;padding:8px 13px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);transition:background .15s,color .15s,border-color .15s;
  display:inline-flex;align-items:center;gap:7px;white-space:nowrap;
}
.nav-link:hover{background:rgba(255,255,255,.11);color:#fff;border-color:rgba(255,255,255,.28)}
.nav-link svg{width:15px;height:15px;stroke:currentColor;stroke-width:2;fill:none}
.icon-btn{
  width:36px;height:36px;border-radius:999px;border:1px solid rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;color:#c9d5e8;transition:.15s;flex:none;
}
.icon-btn:hover{background:rgba(255,255,255,.11);color:#fff}
.icon-btn svg{width:17px;height:17px;stroke:currentColor;stroke-width:2;fill:none}

/* ---------- Seitenkopf im Inhalt ---------- */
.page-head{padding:36px 0 4px}
.page-head h1{font-size:clamp(24px,3.4vw,31px);font-weight:800;letter-spacing:-.3px}
.page-head p{color:var(--muted);font-size:14.5px;margin-top:7px;max-width:62ch}

/* ---------- Steuerleiste ---------- */
.controls{display:flex;gap:10px;align-items:center;margin:24px 0 6px;flex-wrap:wrap}
.field{position:relative;flex:1 1 260px;max-width:420px}
.field > svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:16px;height:16px;stroke:var(--muted);stroke-width:2;fill:none;pointer-events:none}
.field input{
  width:100%;background:var(--card);border:1px solid var(--line);border-radius:var(--r-m);
  padding:11px 14px 11px 40px;font:inherit;font-size:14px;color:var(--ink);outline:none;transition:.15s;
}
.field input::placeholder{color:var(--muted)}
.field input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,162,74,.16)}
.chips{display:flex;gap:7px;flex-wrap:wrap}
.chip{
  font-size:12.5px;font-weight:700;color:var(--muted);background:var(--card);
  border:1px solid var(--line);border-radius:999px;padding:8px 15px;transition:.15s;
}
.chip:hover{color:var(--ink);border-color:var(--muted)}
.chip[aria-pressed="true"]{background:var(--navy);color:#fff;border-color:var(--navy)}
:root[data-theme="dark"] .chip[aria-pressed="true"]{background:var(--gold);color:#10182a;border-color:var(--gold)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .chip[aria-pressed="true"]{background:var(--gold);color:#10182a;border-color:var(--gold)}}

/* ---------- Gruppen & Karten ---------- */
.group{margin-top:30px}
.group-head{display:flex;align-items:baseline;gap:10px;margin:0 2px 13px}
.group-head h2{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.1px;color:var(--muted)}
.group-head .count{font-size:12px;color:var(--muted);opacity:.7}
.group-head .rule{flex:1;height:1px;background:var(--line)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(304px,1fr));gap:15px}

.card{
  display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-l);padding:19px 20px 17px;box-shadow:var(--shadow-s);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;position:relative;
}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow-m);border-color:rgba(200,162,74,.55)}
.card:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.ic{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:0 0 42px}
.ic svg{width:21px;height:21px;stroke-width:1.9;fill:none}
.ic-merge{background:rgba(47,109,246,.12)}   .ic-merge svg{stroke:#2f6df6}
.ic-broom{background:rgba(192,57,43,.12)}    .ic-broom svg{stroke:#c0392b}
.ic-doc{background:rgba(217,138,41,.14)}     .ic-doc svg{stroke:#d98a29}
.ic-pin{background:rgba(28,58,99,.12)}       .ic-pin svg{stroke:#2b558f}
.ic-find{background:rgba(31,122,86,.13)}     .ic-find svg{stroke:#1f7a56}
.ic-chart{background:rgba(122,85,176,.14)}   .ic-chart svg{stroke:#7a55b0}
:root[data-theme="dark"] .ic-pin svg{stroke:#7ba3dd}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ic-pin svg{stroke:#7ba3dd}}

.badge{font-size:10.5px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;padding:4px 9px;border-radius:999px;white-space:nowrap;flex:none}
.badge-live{background:rgba(31,122,86,.13);color:var(--green)}
.badge-doku{background:rgba(93,106,126,.14);color:var(--muted)}
.badge-demo{background:rgba(168,112,15,.14);color:var(--amber)}

.card .tag{font-size:10.5px;font-weight:800;letter-spacing:.9px;text-transform:uppercase;color:var(--gold);display:block;margin-bottom:3px}
.card h3{font-size:16.5px;font-weight:700;letter-spacing:-.15px;line-height:1.3}
.card p{font-size:13.5px;color:var(--muted);margin-top:8px;flex:1}
.card .go{
  margin-top:15px;padding-top:13px;border-top:1px solid var(--line);
  display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:var(--navy);
}
:root[data-theme="dark"] .card .go{color:var(--gold)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .card .go{color:var(--gold)}}
.card .go svg{width:15px;height:15px;stroke:currentColor;stroke-width:2.3;fill:none;transition:transform .16s}
.card:hover .go svg{transform:translateX(3px)}

.empty{display:none;text-align:center;color:var(--muted);font-size:14px;padding:56px 20px;border:1px dashed var(--line);border-radius:var(--r-l);margin-top:26px}

/* ---------- Fuß ---------- */
.foot{margin-top:52px;padding:22px 0 40px;border-top:1px solid var(--line);color:var(--muted);font-size:12.5px;display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.foot b{color:var(--ink);font-weight:700}
.foot .sep{opacity:.4}

/* ---------- Auswahlseite ---------- */
.choice-page{min-height:100vh;display:flex;flex-direction:column;background:
  radial-gradient(900px 460px at 50% -8%,rgba(200,162,74,.10),transparent 62%),var(--bg)}
.choice-main{flex:1;display:flex;align-items:center;padding:52px 0 60px}
.choice-head{text-align:center;margin-bottom:38px}
.choice-head img{height:66px;width:auto;margin:0 auto 18px;display:block}
.choice-head h1{font-size:clamp(26px,4vw,36px);font-weight:800;letter-spacing:-.6px}
.choice-head p{color:var(--muted);font-size:15px;margin-top:9px}
.choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;max-width:820px;margin:0 auto}
.choice{
  display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-l);padding:26px 26px 22px;box-shadow:var(--shadow-s);
  transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease;
}
.choice:hover{transform:translateY(-3px);box-shadow:var(--shadow-m);border-color:rgba(200,162,74,.6)}
.choice:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.choice .em{width:52px;height:52px;border-radius:15px;display:flex;align-items:center;justify-content:center;margin-bottom:16px;
  background:linear-gradient(140deg,var(--navy),var(--navy-3))}
.choice .em svg{width:25px;height:25px;stroke:var(--gold-soft);stroke-width:1.8;fill:none}
.choice h2{font-size:20px;font-weight:800;letter-spacing:-.3px}
.choice p{color:var(--muted);font-size:13.8px;margin-top:8px;flex:1}
.choice .meta{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:var(--navy)}
:root[data-theme="dark"] .choice .meta{color:var(--gold)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .choice .meta{color:var(--gold)}}
.choice .meta svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.2;fill:none}
.choice .meta .lock{margin-left:auto;color:var(--muted);font-weight:600;display:inline-flex;align-items:center;gap:5px}
.choice-extra{margin:26px auto 0;max-width:820px;text-align:center}
.choice-extra a{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--muted);
  border:1px solid var(--line);background:var(--card);border-radius:999px;padding:9px 18px;transition:.15s}
.choice-extra a:hover{color:var(--ink);border-color:var(--muted)}
.choice-extra a svg{width:15px;height:15px;stroke:currentColor;stroke-width:2;fill:none}
.choice-foot{text-align:center;color:var(--muted);font-size:12.5px;padding:0 24px 34px}

/* ---------- Zugangsabfrage ---------- */
.gate{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:24px;
  background:radial-gradient(760px 420px at 50% 0%,rgba(200,162,74,.12),transparent 60%),var(--bg)}
.gate-box{width:100%;max-width:386px;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-l);padding:30px 28px 26px;box-shadow:var(--shadow-m);text-align:center}
.gate-box img{height:52px;width:auto;margin:0 auto 16px;display:block}
.gate-box h1{font-size:19px;font-weight:800;letter-spacing:-.2px}
.gate-box p{color:var(--muted);font-size:13.5px;margin-top:8px}
.gate-form{margin-top:20px;display:flex;flex-direction:column;gap:10px}
.gate-form input{
  width:100%;background:var(--card-2);border:1px solid var(--line);border-radius:var(--r-m);
  padding:12px 14px;font:inherit;font-size:15px;color:var(--ink);outline:none;text-align:center;letter-spacing:.4px;
}
.gate-form input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,162,74,.16)}
.gate-form button{
  background:var(--navy);color:#fff;border-radius:var(--r-m);padding:12px 16px;font-size:14.5px;font-weight:700;
  transition:.15s;
}
.gate-form button:hover{background:var(--navy-2)}
.gate-err{color:#c0392b;font-size:13px;font-weight:600;min-height:19px}
:root[data-theme="dark"] .gate-err{color:#ff8a7a}
.gate-back{margin-top:16px;font-size:12.5px;color:var(--muted);display:inline-flex;align-items:center;gap:6px}
.gate-back:hover{color:var(--ink)}
.gate-back svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.2;fill:none}
body.locked > *:not(.gate){display:none}

/* ---------- Doku-Liste ---------- */
.doclist{display:flex;flex-direction:column;gap:11px;margin-top:26px}
.doc{
  display:flex;align-items:center;gap:15px;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-m);padding:16px 18px;box-shadow:var(--shadow-s);transition:.16s;
}
.doc:hover{border-color:rgba(200,162,74,.55);transform:translateX(2px)}
.doc .ic{width:38px;height:38px;flex:0 0 38px;border-radius:11px}
.doc .ic svg{width:19px;height:19px}
.doc .t{min-width:0;flex:1}
.doc .t h3{font-size:15px;font-weight:700}
.doc .t p{font-size:13px;color:var(--muted);margin-top:3px}
.doc .arr{color:var(--muted);flex:none}
.doc .arr svg{width:17px;height:17px;stroke:currentColor;stroke-width:2.2;fill:none;transition:transform .16s}
.doc:hover .arr{color:var(--gold)}
.doc:hover .arr svg{transform:translateX(3px)}

/* ---------- Fließtext-Seiten (Doku) ---------- */
.prose{max-width:74ch;margin-top:8px}
.prose h2{font-size:19px;font-weight:800;letter-spacing:-.2px;margin:34px 0 10px;display:flex;align-items:center;gap:10px}
.prose h2 .num{width:26px;height:26px;flex:none;border-radius:8px;background:var(--navy);color:#fff;font-size:13px;
  display:flex;align-items:center;justify-content:center;font-weight:800}
:root[data-theme="dark"] .prose h2 .num{background:var(--gold);color:#10182a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .prose h2 .num{background:var(--gold);color:#10182a}}
.prose h3{font-size:15px;font-weight:700;margin:22px 0 7px}
.prose p{font-size:14.5px;color:var(--muted);margin:9px 0}
.prose p strong,.prose li strong{color:var(--ink);font-weight:700}
.prose ul,.prose ol{margin:9px 0 9px 20px;font-size:14.5px;color:var(--muted)}
.prose li{margin:5px 0}
.prose a{color:var(--navy);text-decoration:underline;text-underline-offset:3px;font-weight:600}
:root[data-theme="dark"] .prose a{color:var(--gold)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .prose a{color:var(--gold)}}
kbd{display:inline-block;font:inherit;font-size:12.5px;font-weight:700;background:var(--card-2);border:1px solid var(--line);
  border-bottom-width:2px;border-radius:6px;padding:2px 7px;color:var(--ink);white-space:nowrap}

.note{background:var(--card);border:1px solid var(--line);border-left:3px solid var(--gold);
  border-radius:var(--r-m);padding:14px 17px;margin:16px 0;font-size:14px;color:var(--muted)}
.note b{color:var(--ink)}

.example{border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden;margin:14px 0;background:var(--card)}
.example > .lbl{display:flex;align-items:center;gap:8px;padding:10px 15px;font-size:12.5px;font-weight:800;
  letter-spacing:.4px;text-transform:uppercase;border-bottom:1px solid var(--line)}
.example > .lbl svg{width:15px;height:15px;stroke:currentColor;stroke-width:2.4;fill:none;flex:none}
.example.good > .lbl{background:rgba(31,122,86,.10);color:var(--green)}
.example.bad  > .lbl{background:rgba(192,57,43,.10);color:#c0392b}
:root[data-theme="dark"] .example.bad > .lbl{color:#ff8a7a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .example.bad > .lbl{color:#ff8a7a}}
.mail{padding:15px 17px;font-size:14px}
.mail .h{font-size:13px;color:var(--muted);padding-bottom:9px;margin-bottom:11px;border-bottom:1px dashed var(--line)}
.mail .h span{display:block;margin:2px 0}
.mail .h b{color:var(--ink);font-weight:700}
.mail .body{white-space:pre-wrap;font-size:14px;color:var(--ink);line-height:1.6}
.mail .why{margin-top:12px;padding-top:11px;border-top:1px dashed var(--line);font-size:13px;color:var(--muted)}
.shot{margin-top:12px;border:1px dashed var(--line);border-radius:10px;padding:11px 14px;font-size:13px;color:var(--muted);
  display:flex;align-items:center;gap:9px}
.shot svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.9;fill:none;flex:none}

.checklist{list-style:none;margin:14px 0 0;padding:0}
.checklist li{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:14.5px;color:var(--ink)}
.checklist li:last-child{border-bottom:none}
.checklist svg{width:17px;height:17px;stroke:var(--green);stroke-width:2.6;fill:none;flex:none;margin-top:3px}
.checklist span{color:var(--muted);font-size:13.5px;display:block;margin-top:2px}

.actions{display:flex;gap:10px;flex-wrap:wrap;margin:26px 0 6px}
.btn-main,.btn-side{display:inline-flex;align-items:center;gap:9px;border-radius:var(--r-m);padding:12px 18px;
  font-size:14px;font-weight:700;transition:.16s;border:1px solid transparent;cursor:pointer}
.btn-main{background:var(--navy);color:#fff}
.btn-main:hover{background:var(--navy-2)}
.btn-side{background:var(--card);border-color:var(--line);color:var(--ink)}
.btn-side:hover{border-color:var(--gold)}
.btn-main svg,.btn-side svg{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}

@media (max-width:560px){
  .wrap{padding:0 16px}
  .topbar .wrap{gap:10px}
  .nav-link span{display:none}
  .nav-link{padding:8px 10px}
  .grid{grid-template-columns:1fr}
}
