/* Gemeinsame Layout-/Komponenten-Styles der Produktivversion.
 * Baut auf den Design-Tokens aus colors_and_type.css auf (siehe dortige
 * Custom Properties --prostep-blue, --gray-*, --grad-brand, --shadow-*, …).
 * Bewusst schlank gehalten: kein CSS-Framework, kein Build-Step nötig. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gray-50);
}

a { color: var(--prostep-blue); text-decoration: none; }
a:hover { color: var(--prostep-blue-deep); }

.page {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--fg-primary);
  position: relative;
}

.brand-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--grad-brand);
  z-index: 60;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) 24px 80px;
}
.container--wide { max-width: 1000px; }

.header-bar {
  position: sticky;
  top: 6px;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.header-bar__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-bar img { height: 26px; width: auto; }

.chapters { flex: 1; display: flex; gap: 10px; }
.chapter { flex: 1; min-width: 0; }
.chapter__label-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.chapter__dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff; flex: 0 0 20px;
}
.chapter__name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter__track { height: 4px; background: var(--gray-200); border-radius: 2px; overflow: hidden; }
.chapter__fill { height: 100%; transition: width .4s ease; }

.eyebrow-tag {
  display: inline-block;
  background: var(--prostep-blue);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 22px 5px 12px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.counter { font-size: 13.5px; color: var(--gray-500); font-weight: 600; margin-left: 12px; }

h1.title, h2.title {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.22;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.hint { font-size: 13px; color: var(--gray-500); margin-bottom: 26px; }

.options { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }

.option-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  font-family: inherit; font-size: 15.5px; color: var(--gray-900);
  background: #fff; border: 1.5px solid var(--gray-200);
  padding: 16px 18px; cursor: pointer;
}
.option-btn.selected { background: #EAF3F8; border-color: var(--prostep-blue); box-shadow: var(--shadow-1); }
.option-btn__letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: var(--prostep-blue); background: var(--gray-100);
}
.option-btn.selected .option-btn__letter { color: #fff; background: var(--prostep-blue); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.row-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 26px; border: none; color: #fff; cursor: pointer;
  background: var(--prostep-blue);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding-right: 34px;
}
.btn[disabled] { background: var(--gray-300); cursor: not-allowed; }
.btn--ghost {
  background: none; border: none; color: var(--gray-500); font-weight: 600; font-size: 14px;
  padding: 8px 0; clip-path: none;
}
.btn--wn {
  font-family: inherit; font-weight: 600; font-size: 14px; padding: 10px 18px; cursor: pointer;
  background: transparent; color: var(--gray-500); border: 1.5px solid var(--gray-300); clip-path: none;
}
.btn--wn.selected { background: var(--gray-200); }
.btn--outline {
  background: none; border: 1.5px solid var(--gray-300); color: var(--gray-700);
  font-family: inherit; font-weight: 600; font-size: 14px; padding: 12px 22px; cursor: pointer; clip-path: none;
}

.inline-form { display: inline; margin: 0; padding: 0; }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="tel"] {
  width: 100%; font-family: inherit; font-size: 15px; padding: 12px 14px;
  border: 1.5px solid var(--gray-300); background: #fff; color: var(--gray-900); outline: none;
}
textarea { min-height: 74px; resize: vertical; line-height: 1.5; }
label.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }

.landkarte-board {
  position: relative; padding: clamp(16px,2.5vw,24px);
  background: linear-gradient(160deg, #0A1E3A 0%, #123258 100%);
}
/* Feste 2 Spalten wie im Klickdummy (dort ergab sich das aus der schmaleren
   max-width:900px für die Landkarte-Ansicht; hier explizit statt zufällig
   von der Containerbreite abhängig). Auf schmalen Bildschirmen 1 Spalte. */
.landkarte-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) {
  .landkarte-grid { grid-template-columns: 1fr; }
}
.region-tile { background: #fff; border: 1px solid var(--gray-200); border-top: 3px solid var(--prostep-blue); padding: 16px; }
.region-tile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.region-tile__name { font-weight: 700; font-size: 16px; color: var(--gray-900); line-height: 1.2; }
.region-tile__examples { font-size: 12px; color: var(--gray-500); line-height: 1.4; margin-bottom: 12px; }
.status-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; white-space: nowrap; }
/* Status-Buttons sind direkte Grid-Kinder (kein form-Wrapper je Button) —
   dadurch stretchen sie per Grid-Default auf gleiche Höhe je Reihe. */
.status-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; margin: 0; }
.status-btn, .auto-btn {
  font-family: inherit; font-weight: 600; padding: 9px 8px; cursor: pointer; text-align: center; line-height: 1.15;
  font-size: 12.5px; border-width: 1.5px; border-style: solid; transition: all .15s;
}
.auto-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--gray-200); }
.auto-btn { font-size: 12px; padding: 7px 12px; }
.auto-label { font-size: 12.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }

.comment-pencil-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 26px;
  cursor: pointer; font-size: 13px; line-height: 1; font-family: inherit; transition: all .15s;
  border: 1.5px solid var(--gray-300); background: #fff; color: var(--gray-500);
}
.comment-pencil-btn.has-comment { border-color: var(--prostep-blue); background: var(--prostep-blue); color: #fff; }

/* Kommentar-Popup je Region — natives <dialog>, geöffnet/geschlossen über
   public/app.js (data-open-dialog / data-close-dialog / Backdrop-Klick). */
.sheet-dialog {
  width: min(480px,94vw); max-height: 88vh; overflow: auto; border: none; padding: 0;
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
}
.sheet-dialog::backdrop { background: rgba(6,18,36,0.55); backdrop-filter: blur(3px); }
.sheet-dialog[open] { animation: ki-sheet .28s cubic-bezier(.2,.8,.2,1) both; }

.hero {
  position: relative; background: #0A1E3A; padding: 56px 24px 64px; overflow: hidden; color: #fff;
}
.hero__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #7FC4E8; margin-bottom: 14px; }
.hero__name { margin: 0 0 8px; font-size: clamp(30px,5vw,52px); line-height: 1.05; font-weight: 700; color: #fff; }
.hero__quadrant { font-size: clamp(15px,2vw,18px); color: rgba(255,255,255,0.82); font-weight: 500; margin-bottom: 12px; }
.hero__desc { margin: 0; font-size: clamp(14px,1.6vw,17px); line-height: 1.5; color: rgba(255,255,255,0.9); max-width: 560px; }
.hero__badge { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); padding: 18px 22px; color: #fff; }
.hero__warn { margin-top: 20px; display: inline-flex; gap: 10px; background: rgba(183,11,52,0.18); border: 1px solid rgba(183,11,52,0.5); color: #FFD3DD; padding: 10px 18px; font-size: 14px; font-weight: 600; }

.quad-plot { position: relative; aspect-ratio: 1/1; border: 1px solid var(--gray-200); background: var(--gray-50); }
.quad-cell { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 11.5px; font-weight: 600; color: var(--gray-500); line-height: 1.2; }
.quad-cell.active { font-weight: 700; color: var(--prostep-blue); background: rgba(5,101,143,0.1); }
.quad-cell.active.risk { color: var(--accent-red); background: rgba(183,11,52,0.1); }
.quad-point { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--prostep-blue); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.3); transform: translate(-50%,50%); z-index: 5; }
.quad-point.risk { background: var(--accent-red); }

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.bar-row__label { width: 130px; flex: 0 0 130px; font-size: 12.5px; color: var(--gray-700); text-align: right; }
.bar-row__track { flex: 1; height: 14px; background: var(--gray-100); position: relative; overflow: hidden; }
.bar-row__fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--prostep-blue); }
.bar-row__fill--praxis { background: var(--accent-sky); }
.bar-row__val { width: 60px; flex: 0 0 60px; font-size: 12px; font-weight: 600; color: var(--gray-700); }

.gate-cta {
  background: var(--grad-brand); color: #fff; padding: clamp(26px,4vw,36px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.gate-cta__text { max-width: 560px; }
.gate-cta__title { font-size: clamp(20px,2.6vw,24px); font-weight: 700; margin-bottom: 8px; }
.gate-cta__sub { font-size: 15px; color: rgba(255,255,255,0.88); line-height: 1.5; }

.card { background: #fff; border: 1px solid var(--gray-200); padding: 18px 20px; }
.card--tension-high { border-left: 4px solid var(--accent-red); background: #FBECEF; }
.card--tension-mid { border-left: 4px solid var(--accent-yellow); background: #FEF7E4; }
.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; padding: 3px 9px; white-space: nowrap;
}

.map-card { background: #fff; border: 1px solid var(--gray-200); padding: 14px 16px; }

.step-card { background: #fff; border: 1px solid var(--gray-200); padding: 20px; position: relative; }
.step-card__n { font-size: 26px; font-weight: 700; color: var(--prostep-blue); line-height: 1; margin-bottom: 10px; }

.footer-note { text-align: center; margin-top: 34px; font-size: 11px; color: var(--gray-500); }

.banner-success { background: var(--accent-green); color: #fff; }
.banner-success__inner { max-width: 1000px; margin: 0 auto; padding: 14px 24px; font-size: 14px; font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 28px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; }

.form-error { font-size: 12px; color: var(--accent-red); min-height: 18px; margin-top: 6px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-200); }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
