/* ═══════════════════════════════════════════════════════════════════════
   NebenkostenCheck — stylesheet
   Clean, trustworthy, legal-tool aesthetic. UTF-8 throughout (ä ö ü ß €).
═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #1a3358;
  --navy-hover:  #243f6e;
  --gold:        #b8690a;
  --gold-hover:  #9a560a;
  --red:         #b33a2e;
  --amber:       #c46b0a;
  --green:       #246e43;
  --bg:          #f2f5f9;
  --card-bg:     #ffffff;
  --blue-light:  #eaf0f8;
  --text:        #1c2b3a;
  --muted:       #5f6e7d;
  --border:      #cfd8e3;
  --shadow:      0 2px 10px rgba(0,0,0,0.07);
  --radius:      10px;
}

/* ── Base ──────────────────────────────────────────────────────────── */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ────────────────────────────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

main { padding: 36px 0 64px; }

/* ── Header ────────────────────────────────────────────────────────── */

header {
  background: var(--navy);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.logo span { color: #7db8e8; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.beta-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: #246e43;
  border-radius: 20px;
  padding: 3px 10px;
}

.new-check-link {
  font-size: 0.825rem;
  color: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.15s;
}
.new-check-link:hover { background: rgba(255,255,255,0.12); }

/* ── Card ──────────────────────────────────────────────────────────── */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
}

/* ── Spacing utilities ─────────────────────────────────────────────── */

.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 20px; }

/* ── Lead text ─────────────────────────────────────────────────────── */

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

/* ── Error toast ───────────────────────────────────────────────────── */

.error-toast {
  background: #fceceb;
  border: 1px solid #f5bcb8;
  color: var(--red);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* ── Drop zone ─────────────────────────────────────────────────────── */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--blue-light);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  margin-bottom: 20px;
  outline: none;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.drag-over {
  border-color: var(--navy);
  background: #d9e8f5;
}

.drop-icon { font-size: 2.8rem; margin-bottom: 10px; }

.drop-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Privacy note ──────────────────────────────────────────────────── */

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--blue-light);
  border: 1px solid #c4d8ee;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.privacy-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }

/* ── Loading ───────────────────────────────────────────────────────── */

.loading-card {
  text-align: center;
  padding: 72px 24px;
}

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 22px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 1rem; font-weight: 600; color: var(--navy); }
.loading-sub  { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

/* ── Ampel (traffic light) ─────────────────────────────────────────── */

.ampel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.ampel::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ampel-rot   { background: #faecea; color: var(--red);   }
.ampel-rot::before   { background: var(--red);   }
.ampel-gelb  { background: #fef6e7; color: var(--amber); }
.ampel-gelb::before  { background: var(--amber); }
.ampel-gruen { background: #e8f6ee; color: var(--green); }
.ampel-gruen::before { background: var(--green); }

/* ── Stats row ─────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 22px;
}

.stat-box {
  background: var(--blue-light);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  word-break: break-word;
}

.stat-value--sm { font-size: 0.85rem; line-height: 1.4; }

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Category list ─────────────────────────────────────────────────── */

.category-list {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}

.category-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--blue-light);
  border-left: 3px solid var(--navy);
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.category-list li::before {
  content: '•';
  color: var(--navy);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Blurred preview rows ──────────────────────────────────────────── */

.blurred-rows {
  position: relative;
  margin: 6px 0 20px;
}

.blurred-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.blurred-row-body { flex: 1; min-width: 0; font-size: 0.875rem; }
.blurred-row-body p { color: var(--muted); margin-top: 4px; }
.blurred-amount { margin-left: auto; font-weight: 700; flex-shrink: 0; }

.blurred-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(234,240,248,0.55);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  pointer-events: none;
}

/* ── Divider ───────────────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
  text-align: center;
  width: 100%;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-hover); }

.btn-cta {
  background: var(--gold);
  color: #fff;
  font-size: 1.05rem;
  padding: 14px 22px;
}
.btn-cta:hover { background: var(--gold-hover); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-secondary:hover { background: var(--blue-light); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--blue-light); }

.price-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ── Beta email gate ───────────────────────────────────────────────── */

.beta-gate-header {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
  background: #e8f6ee;
  border: 1px solid #b6dfcc;
  border-radius: 8px;
  padding: 13px 16px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.email-gate-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.email-input {
  flex: 1;
  min-width: 200px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.email-input:focus { border-color: var(--navy); }

.email-gate-form .btn { flex: 0 0 auto; width: auto; }

.privacy-small {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Finding cards ─────────────────────────────────────────────────── */

.section-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
}

.finding-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.finding-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.finding-category { font-weight: 600; font-size: 0.95rem; }
.finding-amount   { margin-left: auto; font-weight: 700; color: var(--navy); flex-shrink: 0; }
.finding-posten   { font-size: 0.83rem; color: var(--muted); margin-bottom: 10px; }

.finding-explanation {
  font-size: 0.875rem;
  background: var(--blue-light);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  line-height: 1.55;
}

.finding-recommendation {
  font-size: 0.875rem;
  background: #e8f6ee;
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
  color: #1a5432;
  line-height: 1.55;
}

/* ── Severity badges ───────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-hoch    { background: #faecea; color: var(--red);   }
.badge-mittel  { background: #fef6e7; color: var(--amber); }
.badge-niedrig { background: #e8f0fa; color: #2a52a0;      }

/* ── Letter ────────────────────────────────────────────────────────── */

.letter-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.92rem;
  line-height: 1.85;
  background: #fdfdfd;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  max-height: 480px;
  overflow-y: auto;
  word-wrap: break-word;
}

.letter-text p   { margin: 0 0 10px; }
.letter-text hr  { border: none; border-top: 1px solid #d0d7de; margin: 14px 0; }
.letter-text em  { font-style: italic; }

/* ── Button row ────────────────────────────────────────────────────── */

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-row .btn { flex: 1; min-width: 140px; width: auto; }

/* ── Disclaimer ────────────────────────────────────────────────────── */

.disclaimer {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 520px) {
  .card { padding: 20px 18px; }
  .drop-zone { padding: 40px 16px; }
  main { padding: 24px 0 48px; }
  h1 { font-size: 1.2rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .stat-box:last-child { grid-column: 1 / -1; }
  .letter-text { padding: 20px 18px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}
