@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --bg: #05070e;
  --bg-2: #070b16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --ink: #f4f7fb;
  --muted: rgba(226, 232, 240, 0.62);
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.07);
  --blue: #2257e8;
  --blue-soft: #5b84f2;
  --orange: #fe6a1e;
  --orange-dark: #e2540c;
  --cyan: #37b6d3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  /* legacy aliases mapped to brand */
  --red: var(--orange);
  --red-dark: var(--orange);
  --teal: var(--blue);
  --amber: var(--orange);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  background:
    radial-gradient(1200px 620px at 80% -8%, rgba(34, 87, 232, 0.28), transparent 60%),
    radial-gradient(900px 520px at 2% 2%, rgba(34, 87, 232, 0.12), transparent 55%),
    radial-gradient(1100px 760px at 95% 108%, rgba(254, 106, 30, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.4px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(1400px 900px at 75% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(1400px 900px at 75% 0%, #000 0%, transparent 70%);
  opacity: 0.7;
}

a {
  color: var(--orange);
  font-weight: 500;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- Brand header ---------- */
.site-header {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 1480px;
  padding: 26px 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__icon { width: 40px; height: 40px; display: block; }
.brand__word {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand__word b { font-weight: 800; }
.brand__tag {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 auto;
  max-width: 1480px;
  padding: 14px 22px 40px;
}

.hero-band,
.panel,
.mini-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hero-band { overflow: hidden; }

.hero-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  padding: 40px;
  background:
    radial-gradient(700px 380px at 100% 0%, rgba(34, 87, 232, 0.22), transparent 62%),
    transparent;
}

.hero-copy { max-width: 920px; }

.eyebrow {
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.03;
  margin-bottom: 18px;
  max-width: 900px;
  color: #fff;
}
h1 strong { font-weight: 800; color: var(--blue-soft); }

h2 {
  font-size: clamp(1.22rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.14;
  margin-bottom: 0;
  color: #fff;
}

h3 { font-size: 1rem; font-weight: 700; margin: 22px 0 8px; color: var(--ink); }

.thesis {
  color: rgba(226, 232, 240, 0.78);
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
  max-width: 860px;
}

.hero-metric {
  align-self: stretch;
  background:
    linear-gradient(150deg, rgba(34, 87, 232, 0.30), rgba(254, 106, 30, 0.12)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(91, 132, 242, 0.35);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 250px;
  padding: 28px;
}

.hero-metric span, .mini-stat span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-metric strong {
  color: #fff;
  font-size: clamp(3.6rem, 8.5vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.9;
  margin: 12px 0 16px;
  text-shadow: 0 0 40px rgba(34, 87, 232, 0.5);
}

.hero-metric p, .mini-stat p, .panel p, .insight-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.period-strip {
  align-items: center;
  background: rgba(2, 4, 10, 0.55);
  border-top: 1px solid var(--line-soft);
  color: #e8eef7;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 15px 40px;
}
.period-strip span {
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.period-strip strong { font-weight: 500; }
.period-strip a { color: var(--orange); }

.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-stat {
  box-shadow: none;
  min-height: 150px;
  padding: 22px;
}
.mini-stat strong {
  color: #fff;
  display: block;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin: 12px 0;
}

.section-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.section-grid--wide { grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr); }

.panel { min-width: 0; padding: 24px; }
.panel--large { min-height: 420px; }

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.badge, .pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.72);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 12px;
  white-space: nowrap;
}
.pill {
  background: rgba(254, 106, 30, 0.12);
  border-color: rgba(254, 106, 30, 0.4);
  color: #ffb184;
  white-space: normal;
}

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 250px) 1fr 58px;
}
.bar-row__meta {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}
.bar-row__meta span { font-weight: 500; overflow-wrap: anywhere; color: rgba(233, 238, 247, 0.9); }
.bar-row__meta strong, .topic-row em { font-style: normal; font-weight: 700; color: #fff; }

.bar-track {
  align-self: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 11px;
  overflow: hidden;
}
.bar-track span {
  background: linear-gradient(90deg, var(--blue), var(--blue-soft));
  border-radius: inherit;
  display: block;
  height: 100%;
}
.bar-row.is-highlight .bar-track span {
  background: linear-gradient(90deg, var(--orange), #ffa15e);
}
.bar-row.is-highlight .bar-row__meta span,
.bar-row.is-highlight .bar-row__meta strong { color: var(--orange); }
.bar-row small { color: var(--muted); font-weight: 600; text-align: right; }

.interpretation {
  background:
    linear-gradient(180deg, rgba(34, 87, 232, 0.12), transparent),
    var(--surface);
}
.interpretation h2 { color: var(--blue-soft); margin-bottom: 18px; }
.interpretation p + p { margin-top: 14px; }

.insight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.insight-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 14px;
  min-height: 176px;
  padding: 18px;
}
.insight-card span {
  color: rgba(233, 238, 247, 0.86);
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.28;
  margin-bottom: 12px;
}
.insight-card strong {
  color: #fff;
  display: block;
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.tone-contrast { border-left-color: var(--blue); }
.tone-narrow { border-left-color: #ffb15e; }
.tone-reading { border-left-color: var(--cyan); }

.chart-panel { min-height: 310px; }
.month-chart { display: block; height: auto; width: 100%; }
.month-chart line { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.month-total { fill: rgba(91, 132, 242, 0.30); }
.month-ai-line {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}
.month-ai-dot { fill: var(--bg); stroke: var(--orange); stroke-width: 4; }
.month-chart text { fill: var(--muted); font-size: 20px; font-weight: 600; }
.month-ai-label { fill: #ffb184 !important; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.chart-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 8px;
}
.chart-legend i { border-radius: 999px; display: inline-block; height: 10px; width: 24px; }
.legend-total { background: rgba(91, 132, 242, 0.55); }
.legend-ai { background: var(--orange); }

.table-panel { padding-bottom: 10px; }
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 760px;
  overflow: auto;
}
table { border-collapse: collapse; min-width: 1180px; width: 100%; }
th, td {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background: rgba(10, 14, 26, 0.96);
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(4px);
}
td { color: rgba(226, 232, 240, 0.82); font-size: 0.92rem; }
td strong {
  color: #fff;
  display: block;
  font-weight: 600;
  line-height: 1.35;
  max-width: 470px;
}
td small { color: var(--muted); display: block; font-weight: 400; line-height: 1.35; margin-top: 6px; }
tbody tr:hover td { background: rgba(34, 87, 232, 0.08); }

.topic-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.topic-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) 88px 72px;
  padding: 12px 14px;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row span { color: var(--orange); font-weight: 700; }
.topic-row strong { overflow-wrap: anywhere; color: rgba(233, 238, 247, 0.9); font-weight: 500; }
.topic-row small { color: var(--muted); font-weight: 600; text-align: right; }

.method-panel p { margin-bottom: 14px; }
.method-panel ul { color: var(--muted); line-height: 1.5; margin: 0; padding-left: 20px; }
.method-panel li + li { margin-top: 8px; }
.source-note { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }

.site-footer {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 1480px;
  padding: 8px 22px 40px;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--orange); }

@media (max-width: 1180px) {
  .kpi-grid, .section-grid, .section-grid--wide, .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-shell { padding: 12px; }
  .site-header { padding: 18px 14px 4px; }
  .hero-grid, .kpi-grid, .section-grid, .section-grid--wide, .insight-grid { grid-template-columns: 1fr; }
  .hero-grid, .period-strip, .panel, .mini-stat { padding: 20px; }
  .hero-metric { min-height: auto; }
  .period-strip { align-items: flex-start; flex-direction: column; }
  .section-heading { flex-direction: column; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-row small { text-align: left; }
  .table-wrap { border: 0; max-height: none; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; min-width: 0; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
  td { border-bottom: 1px solid var(--line-soft); display: grid; gap: 10px; grid-template-columns: 105px minmax(0, 1fr); }
  td:last-child { border-bottom: 0; }
  td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  td strong { max-width: none; }
  .topic-row { grid-template-columns: 34px minmax(0, 1fr) 70px; }
  .topic-row small { grid-column: 2 / 4; text-align: left; }
}

/* ---------- Konkrete KI-Themen ---------- */
.topic-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}
.topic-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topic-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.topic-card__head h3 { margin: 0; font-size: 1.02rem; font-weight: 700; color: #fff; line-height: 1.25; }
.topic-card .cnt {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.8);
  white-space: nowrap;
}
.topic-card .stance { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.topic-card .stance i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.topic-card .ex {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.topic-card .ex a { color: rgba(226, 232, 240, 0.85); font-weight: 500; font-size: 0.85rem; line-height: 1.35; text-decoration: none; }
.topic-card .ex a:hover { color: var(--orange); }
.topic-card .ex a .num { color: var(--orange); font-weight: 700; margin-right: 6px; }
@media (max-width: 1180px) { .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .topic-grid { grid-template-columns: 1fr; } }

/* ---------- Passwortschutz-Overlay ---------- */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 600px at 75% 0%, rgba(34, 87, 232, 0.25), transparent 60%),
    rgba(5, 7, 14, 0.97);
  backdrop-filter: blur(8px);
}
.lock-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.lock-brand { color: #fff; font-weight: 300; font-size: 1.7rem; line-height: 1; margin-bottom: 2px; }
.lock-brand b { font-weight: 800; }
.lock-card h2 { color: #fff; font-weight: 500; margin: 0; font-size: 1.3rem; }
.lock-card p { color: var(--muted); margin: 0; font-size: 0.92rem; line-height: 1.5; }
.lock-card input {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.lock-card input:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 3px rgba(34, 87, 232, 0.25); }
.lock-card button {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 0;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}
.lock-card button:hover { background: var(--orange-dark); }
.lock-card button:disabled { opacity: 0.6; cursor: default; }
.lock-error { color: #ff9a6b; font-size: 0.86rem; font-weight: 600; min-height: 18px; }
