/* =====================================================================
 * EXIMIE CI v4 — Stealth Black + Tactical Orange, Bebas Neue + Inter
 * ===================================================================== */
@import url('fonts.css');

:root {
  --black:    #0A0A0A;   /* Stealth Black – dominanter Hintergrund */
  --gunmetal: #2A2A2A;   /* Sekundärflächen, Karten */
  --surface:  #161616;   /* Eingabefelder / tiefe Flächen */
  --ash:      #888888;   /* Sekundärtext, Labels */
  --white:    #FFFFFF;   /* Haupttext */
  --orange:   #D4621A;   /* Tactical Orange – Akzent */
  --orange-w: #E87722;   /* Warm Orange – Buttons/CTA */
  --orange-h: #FF9A26;   /* Highlight – Hover/Fokus */
  --inactive: #3A3A3A;
  --line:     #3A3A3A;

  --font-head: 'Bebas Neue', 'Arial Black', Impact, sans-serif;
  --font-body: 'Inter', Arial, 'Helvetica Neue', sans-serif;
  --maxw: 1000px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--black);
  font-size: 15px; line-height: 1.6;
  padding-bottom: 80px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header { background: var(--black); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { display: inline-flex; }
.logo-text { font-family: var(--font-head); font-size: 26px; letter-spacing: .04em; line-height: 1; color: var(--white); text-transform: uppercase; }
.logo-text strong { color: var(--white); font-weight: 400; }
.header-doc { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--ash); }
.header-doc-label { color: var(--ash); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.header-doc-name { color: var(--white); font-weight: 600; }
.header-save { background: none; border: 1px solid var(--line); border-radius: 0; cursor: pointer; padding: 6px; line-height: 0; }
.header-save:hover { border-color: var(--orange); }
.header-save svg path { fill: var(--orange) !important; }

.tour-trigger { background: none; border: none; cursor: pointer; padding: 2px 0; margin-top: 3px; color: var(--ash); font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.tour-trigger:hover { color: var(--orange-h); }
.tour-play { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: var(--orange-w); color: var(--black); font-size: 9px; padding-left: 2px; }

/* ===== Steps ===== */
.step { margin: 40px 0 12px; }
.step-bar {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em;
  color: var(--white); font-size: 28px; line-height: 1; padding: 16px 18px;
  background: var(--gunmetal); border-left: 6px solid var(--orange);
}

/* ===== Suche / Analyse ===== */
.search-row { display: flex; gap: 10px; margin: 16px 0 8px; padding-left: 80px; }
.search-row input { flex: 1; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--white); font-size: 15px; }
.search-row input::placeholder { color: var(--ash); }
.search-row button { background: var(--gunmetal); border: 1px solid var(--line); border-radius: 0; padding: 0 20px; cursor: pointer; color: var(--white); font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; }
.search-row button:hover { border-color: var(--orange); color: var(--orange-h); }
.search-hint { padding-left: 80px; color: var(--ash); font-size: 13px; margin: 2px 0 0; }
#searchResults { padding-left: 80px; margin-top: 8px; }
.search-hit { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); margin-bottom: 6px; background: var(--gunmetal); }
.search-hit small { color: var(--ash); }
.search-hit button { background: var(--orange-w); color: var(--black); border: none; border-radius: 0; padding: 7px 14px; cursor: pointer; font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.search-hit button:hover { background: var(--orange-h); }

.analyse-note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); padding: 10px 14px; font-size: 13px; color: var(--ash); margin: 0 0 16px; }
.analyse-row { display: flex; gap: 10px; margin-bottom: 10px; }
.analyse-row input { flex: 1; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--white); font-size: 14px; }
.analyse-row button { background: var(--orange-w); color: var(--black); border: none; border-radius: 0; padding: 0 18px; cursor: pointer; font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; }
.analyse-row button:hover { background: var(--orange-h); }
.analyse-or { text-align: center; color: var(--ash); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin: 8px 0; }
.analyse-srclink { display: inline-block; margin: 4px 0 0; color: var(--orange); cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; }
.analyse-srclink:hover { color: var(--orange-h); text-decoration: underline; }
.analyse-src-wrap { margin-top: 12px; }
.group-title-static { cursor: default; }
.group.blue .group-title-static:hover { color: var(--white); }
.analyse-source { width: 100%; min-height: 110px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--white); font-family: monospace; font-size: 12.5px; resize: vertical; }
.analyse-go { margin-top: 10px; background: var(--orange-w); color: var(--black); border: none; border-radius: 0; padding: 11px 20px; cursor: pointer; font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; font-size: 16px; }
.analyse-go:hover { background: var(--orange-h); }
.analyse-result { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); padding: 12px 16px; }
.analyse-result ul { margin: 6px 0; padding-left: 20px; }
.analyse-result .analyse-err { color: var(--orange-h); margin: 0; }
.analyse-result .analyse-hint { color: var(--ash); font-size: 12.5px; margin: 8px 0 0; }

/* ===== Gruppen ===== */
.group { display: flex; align-items: flex-start; gap: 14px; margin: 16px 0; }
.group-icon { flex: 0 0 64px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #1c1c1c; border: 1px solid var(--line); }
.group-body { flex: 1; min-width: 0; }
.group-head { display: flex; align-items: stretch; gap: 1px; }
.group-title {
  flex: 1; background: var(--gunmetal); color: var(--white); font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 16px 20px; border: none; border-left: 4px solid var(--inactive); border-radius: 0; cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.group-title:hover { color: var(--orange-h); }
.group.open .group-title { border-left-color: var(--orange); }
.group-count { font-family: var(--font-head); letter-spacing: .06em; font-size: 13px; color: var(--orange); font-weight: 400; }
.group-toggle { flex: 0 0 56px; background: var(--orange-w); color: var(--black); border: none; border-radius: 0; font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.group-toggle:hover { background: var(--orange-h); }
.group.open .group-toggle { background: var(--gunmetal); color: var(--orange); }
.group-content { display: none; padding: 18px 2px 6px; }
.group.open .group-content { display: block; }
.group-intro { color: var(--ash); margin: 0 0 16px; }

/* ===== Module = Ja/Nein-Unterfragen ===== */
.qmodule { background: var(--gunmetal); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 14px; }
.qmodule.mandatory { border-left: 4px solid var(--orange); }
.qtext { font-weight: 600; font-size: 15px; color: var(--white); margin-bottom: 6px; }
.qactions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.ja-nein { display: inline-flex; border: 1px solid var(--line); }
.ja-nein .seg { border: none; cursor: pointer; font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; font-size: 17px; padding: 8px 22px; background: var(--surface); color: var(--ash); min-width: 64px; }
.ja-nein .seg + .seg { border-left: 1px solid var(--line); }
.ja-nein .seg-ja.active { background: var(--orange-w); color: var(--black); }
.ja-nein .seg-nein.active { background: var(--inactive); color: var(--white); }
.ja-nein .seg:not(.active):hover { color: var(--white); }

.pv-mini { background: transparent; border: 1px solid var(--orange); color: var(--orange); border-radius: 0; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pv-mini:hover { background: var(--orange); color: var(--black); }

.module-fields-open { padding: 16px 2px 2px; }
.module-help { margin: 0 0 14px; }
.module-help a { color: var(--orange); cursor: pointer; font-size: 13.5px; text-decoration: underline; }
.module-help a:hover { color: var(--orange-h); }

/* ===== Felder ===== */
.field { margin-bottom: 14px; }
.field > label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; color: var(--white); }
.field .req { color: var(--orange); }
.field .hint { display: block; color: var(--ash); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.field input[type=text], .field input[type=email], .field input[type=url], .field textarea, .field select {
  width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--white); font-size: 14px; font-family: inherit;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ash); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--orange); }
.field textarea { min-height: 90px; resize: vertical; }
.field-check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.field-check input { margin-top: 3px; accent-color: var(--orange-w); }
.field-check .hint { color: var(--ash); }

/* ===== Toolbar ===== */
.toolbar { position: fixed; right: 0; bottom: 0; z-index: 60; display: flex; gap: 1px; background: var(--line); }
.tb-btn { border: none; background: var(--gunmetal); color: var(--white); font-family: var(--font-head); font-size: 15px; letter-spacing: .05em; text-transform: uppercase; padding: 14px 18px; cursor: pointer; }
.tb-btn:hover { background: var(--inactive); color: var(--orange-h); }
.tb-primary { background: var(--orange-w); color: var(--black); }
.tb-primary:hover { background: var(--orange-h); color: var(--black); }

/* ===== Vorschau (Dokument = helles „Papier") ===== */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay[hidden] { display: none; }
.preview-window { background: #fff; width: 100%; max-width: 880px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--black); color: var(--white); padding: 12px 16px; }
.preview-title { font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; font-size: 18px; }
.preview-actions { display: flex; gap: 8px; }
.pv-btn { background: var(--gunmetal); border: 1px solid var(--line); color: var(--white); border-radius: 0; padding: 7px 13px; cursor: pointer; font-size: 13px; }
.pv-btn:hover { border-color: var(--orange); color: var(--orange-h); }
.pv-close { font-weight: 700; }
.preview-content { padding: 30px 36px; overflow: auto; color: #1a1a1a; background: #fff; }
.preview-content h1 { font-size: 25px; }
.preview-content h2 { font-size: 19px; margin-top: 28px; border-bottom: 2px solid var(--orange); padding-bottom: 4px; }
.preview-content h3 { font-size: 16px; margin-top: 18px; }
.preview-content a { color: var(--orange); }
.preview-content .toc { background: #f4f4f4; padding: 14px 18px; border-left: 4px solid var(--orange); }
.preview-content .toc a { color: #b5531a; text-decoration: none; }
.preview-content .toc a:hover { text-decoration: underline; }

/* ===== Erläuterungen-Modal ===== */
.help-window { position: relative; background: var(--gunmetal); width: 100%; max-width: 640px; max-height: 86vh; overflow: auto; border: 1px solid var(--line); padding: 0 28px 22px; }
.help-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; background: var(--surface); border: 1px solid var(--line); color: var(--orange); font-size: 18px; font-weight: 700; cursor: pointer; }
.help-x:hover { border-color: var(--orange); }
.help-head { background: var(--black); color: var(--white); font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; font-size: 18px; padding: 14px 18px; margin: 0 -28px 18px; border-left: 4px solid var(--orange); }
.help-body { color: #ddd; }
.help-body p { margin: 0 0 12px; }
.help-close-link { background: none; border: none; color: var(--orange); cursor: pointer; font-size: 14px; padding: 0; text-decoration: underline; }
.help-close-link:hover { color: var(--orange-h); }

/* ===== Login / Cloud ===== */
.auth-area { display: flex; align-items: center; gap: 12px; }
.auth-user { font-size: 12.5px; color: var(--white); font-weight: 600; }
.auth-link { background: none; border: none; cursor: pointer; color: var(--orange); font-size: 12.5px; padding: 2px 0; text-decoration: underline; }
.auth-link:hover { color: var(--orange-h); }
.auth-login { border: 1px solid var(--orange); border-radius: 0; padding: 6px 12px; color: var(--orange); text-decoration: none; font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; }
.auth-login:hover { background: var(--orange); color: var(--black); }
.auth-overlay { z-index: 120; }
.auth-card { background: var(--gunmetal); width: 100%; max-width: 440px; overflow: hidden; border: 1px solid var(--line); max-height: 88vh; display: flex; flex-direction: column; }
.auth-head { background: var(--black); color: var(--white); font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; font-size: 18px; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid var(--orange); }
.auth-x { background: none; border: none; color: var(--ash); font-size: 18px; cursor: pointer; }
.auth-x:hover { color: var(--orange); }
.auth-body { padding: 18px; overflow: auto; }
.auth-body input { width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--white); font-size: 14px; margin-bottom: 10px; }
.auth-tabs { display: flex; gap: 1px; margin-bottom: 14px; }
.auth-tab { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 0; cursor: pointer; font-size: 14px; color: var(--ash); }
.auth-tab.active { background: var(--orange-w); border-color: var(--orange-w); color: var(--black); font-weight: 600; }
.auth-submit { width: 100%; padding: 12px; border: none; border-radius: 0; background: var(--orange-w); color: var(--black); font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; font-size: 16px; cursor: pointer; }
.auth-submit:hover { background: var(--orange-h); }
.auth-submit.alt { background: transparent; border: 1px solid var(--orange); color: var(--orange); margin-bottom: 8px; }
.auth-submit.alt:hover { background: var(--orange); color: var(--black); }
.auth-note { color: var(--ash); font-size: 12px; margin: 10px 0 0; }
.auth-msg { margin-top: 10px; font-size: 13px; }

.docs-saverow { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.docs-divider { font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; color: var(--white); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 8px; }
.docs-list { display: flex; flex-direction: column; gap: 8px; }
.docs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; }
.docs-row.current { border-color: var(--orange); }
.docs-row small { color: var(--ash); }
.docs-btns { display: flex; gap: 6px; white-space: nowrap; }
.docs-btn { background: var(--orange-w); color: var(--black); border: none; border-radius: 0; padding: 6px 11px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.docs-btn:hover { background: var(--orange-h); }
.docs-btn.danger { background: var(--inactive); color: var(--white); }
.docs-btn.danger:hover { background: #5a2a2a; }

/* ===== Disclaimer-Bestätigung ===== */
.disc-window { background: var(--gunmetal); width: 100%; max-width: 540px; border: 1px solid var(--line); }
.disc-head { background: var(--black); color: var(--white); font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; font-size: 19px; padding: 14px 18px; border-left: 4px solid var(--orange); }
.disc-body { padding: 18px; color: #ddd; }
.disc-body p { margin: 0 0 12px; }
.disc-check { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); padding: 12px; margin: 14px 0; cursor: pointer; }
.disc-check input { margin-top: 3px; accent-color: var(--orange-w); width: 18px; height: 18px; }
.disc-actions { display: flex; justify-content: flex-end; gap: 10px; }
.disc-cancel { background: transparent; border: 1px solid var(--line); color: var(--ash); padding: 11px 18px; cursor: pointer; }
.disc-cancel:hover { color: var(--white); }
.disc-go { background: var(--orange-w); color: var(--black); border: none; padding: 11px 22px; cursor: pointer; font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; font-size: 16px; }
.disc-go:hover { background: var(--orange-h); }
.disc-go:disabled { background: var(--inactive); color: var(--ash); cursor: not-allowed; }

/* ===== Footer ===== */
.footnote { color: var(--ash); font-size: 12.5px; margin: 30px auto; }
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0 60px; }
.site-footer .container { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.footer-logo { height: 30px; filter: invert(1); opacity: .9; }
.footer-text { color: var(--ash); font-size: 12px; max-width: 640px; }
.footer-text a { color: var(--orange); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; width: 100%; margin-top: 4px; }
.footer-links a { color: var(--ash); font-size: 12.5px; text-decoration: none; }
.footer-links a:hover { color: var(--orange); text-decoration: underline; }

/* ===== Geführte Tour ===== */
#tourBlocker { position: fixed; inset: 0; z-index: 1000; background: transparent; }
#tourBlocker.dim { background: rgba(0,0,0,.7); }
#tourSpot { position: absolute; z-index: 1001; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.72); outline: 3px solid var(--orange); outline-offset: 2px; transition: all .25s ease; }
#tourTip { position: fixed; z-index: 1002; background: var(--gunmetal); width: 320px; max-width: calc(100vw - 32px); border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.tour-tip-title { background: var(--black); color: var(--white); font-family: var(--font-head); letter-spacing: .04em; text-transform: uppercase; padding: 12px 16px; font-size: 18px; border-left: 4px solid var(--orange); }
.tour-tip-text { padding: 14px 16px; color: #ddd; font-size: 14px; line-height: 1.55; }
.tour-tip-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 14px; }
.tour-count { color: var(--ash); font-size: 12px; }
.tour-tip-btns { display: flex; gap: 6px; }
.tour-btn { border: 1px solid var(--line); background: var(--surface); color: var(--white); border-radius: 0; padding: 7px 12px; cursor: pointer; font-size: 13px; }
.tour-btn:hover { border-color: var(--orange); color: var(--orange-h); }
.tour-btn-primary { background: var(--orange-w); border-color: var(--orange-w); color: var(--black); font-weight: 600; }
.tour-btn-primary:hover { background: var(--orange-h); }
.tour-btn-ghost { border: none; background: none; color: var(--ash); }
.tour-btn-ghost:hover { background: none; color: var(--orange); text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 680px) {
  .group-icon { flex-basis: 48px; width: 48px; height: 48px; }
  .search-row, .search-hint, #searchResults { padding-left: 0; }
  .step-bar { font-size: 22px; }
  .toolbar { left: 0; right: 0; justify-content: center; }
  .tb-btn { flex: 1; padding: 12px 6px; font-size: 13px; }
  .preview-content { padding: 18px; }
}

@media print {
  body * { visibility: hidden; }
  .preview-content, .preview-content * { visibility: visible; }
  .preview-content { position: absolute; inset: 0; padding: 0; color: #000; }
  .overlay { position: static; background: none; padding: 0; }
  .preview-bar, .toolbar, .site-header, .site-footer { display: none !important; }
}
