:root {
  --bg: #f6f0e8;
  --bg-soft: #fffaf5;
  --panel: #fffdf9;
  --panel-strong: #fff7ef;
  --line: rgba(120, 83, 52, 0.14);
  --line-strong: rgba(120, 83, 52, 0.22);
  --ink: #241b14;
  --muted: #6f645b;
  --accent: #e05b47;
  --accent-soft: rgba(224, 91, 71, 0.1);
  --gold: #a7702c;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(77, 54, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(224, 91, 71, 0.08), transparent 24rem),
    radial-gradient(circle at left top, rgba(167, 112, 44, 0.08), transparent 30rem),
    linear-gradient(180deg, #f8f2eb, #f3ede6);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  padding: clamp(14px, 2vw, 28px);
}

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

button {
  font: inherit;
}

.page {
  width: min(1560px, 100%);
  margin: 0 auto;
}

.topbar,
.hero-panel,
.platform-entry,
.overview-surface,
.platform-panel,
.surface,
.table-shell,
.metric-card,
.empty-state,
.error-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-kicker,
.eyebrow,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--gold);
}

.nav,
.channel-switcher,
.hero-meta,
.panel-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-pill,
.channel-chip,
.ghost-button,
.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.nav-pill:hover,
.channel-chip:hover,
.ghost-button:hover,
.ghost-link:hover,
.primary-link:hover {
  transform: translateY(-1px);
}

.nav-pill.is-active,
.channel-chip.is-active,
.primary-link,
.ghost-button.is-active-toggle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.channel-chip.is-pending {
  color: var(--muted);
  background: rgba(255, 248, 242, 0.9);
}

.ghost-link {
  background: rgba(255, 255, 255, 0.6);
}

.slim-button {
  min-height: 36px;
  padding: 8px 12px;
}

.shell {
  display: grid;
  gap: 26px;
  padding-top: 24px;
}

.hero-panel,
.platform-entry,
.overview-surface,
.platform-panel,
.surface,
.table-shell,
.metric-card,
.empty-state {
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(255, 248, 241, 0.98));
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  padding: clamp(24px, 3vw, 34px);
}

.hero-panel h1 {
  margin: 10px 0 0;
  max-width: 12ch;
  line-height: 0.95;
  font-size: clamp(2.6rem, 5vw, 4.9rem);
}

.hero-copy {
  display: grid;
  align-content: end;
  gap: 16px;
}

.hero-copy p,
.platform-entry p,
.note,
.subcopy,
.empty-state p,
.table-toolbar-copy span {
  color: var(--muted);
}

.hero-meta .chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.platform-entry-grid,
.summary-grid,
.section-grid,
.action-row,
.rail-grid {
  display: grid;
  gap: 20px;
}

.platform-entry-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-entry {
  display: grid;
  gap: 10px;
  padding: 22px;
  cursor: pointer;
}

.platform-entry h3,
.panel-head h2,
.surface h3,
.table-head-copy h3 {
  margin: 0;
}

.platform-panel,
.overview-surface {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 2vw, 28px);
}

.is-hidden {
  display: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.panel-head h2 {
  margin-top: 8px;
  font-size: 1.7rem;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  line-height: 1.05;
}

.metric-card.compact strong {
  font-size: 1.35rem;
}

.section-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.surface {
  padding: 20px;
}

.action-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
  align-items: center;
}

.load-more-shell {
  display: flex;
  justify-content: center;
}

.control-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.control-field input,
.control-field select,
.inline-select {
  min-width: 150px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.inline-select {
  min-width: 82px;
  border-radius: 999px;
}

.simple-chart {
  width: 100%;
  height: 220px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(224, 91, 71, 0.09), rgba(224, 91, 71, 0.02)),
    rgba(255, 255, 255, 0.7);
}

.simple-chart svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.spotlight-card {
  display: grid;
  gap: 14px;
}

.spotlight-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
}

.table-shell {
  overflow: hidden;
}

.table-head-surface {
  display: grid;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.table-toolbar-copy {
  display: grid;
  gap: 4px;
}

.table-scroll {
  overflow-x: auto;
  padding: 0 4px 6px;
}

table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(120, 83, 52, 0.09);
  text-align: left;
  vertical-align: top;
}

th {
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 248, 241, 0.96);
}

tr:last-child td {
  border-bottom: 0;
}

.thumb-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 250px;
}

.thumb-link img {
  width: 92px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.subcopy {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.subcopy.muted {
  opacity: 0.9;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.metric-badge.is-pending {
  background: rgba(167, 112, 44, 0.12);
  border-color: rgba(167, 112, 44, 0.26);
  color: #7f5b28;
}

.metric-badge.is-none {
  background: rgba(111, 100, 91, 0.09);
  border-color: rgba(111, 100, 91, 0.18);
  color: var(--muted);
}

.metric-badge.is-approx {
  background: rgba(224, 91, 71, 0.11);
  border-color: rgba(224, 91, 71, 0.2);
  color: #9f402d;
}

.rail-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.rail-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.muted-card {
  opacity: 0.88;
}

.detail-chart {
  height: 180px;
}

.note-stack {
  display: grid;
  gap: 12px;
}

.empty-state,
.error-banner {
  padding: 20px;
}

.error-banner {
  background: rgba(224, 91, 71, 0.12);
  border-color: rgba(224, 91, 71, 0.24);
  color: #9a3425;
}

@media (max-width: 1180px) {
  .hero-panel,
  .platform-entry-grid,
  .summary-grid,
  .section-grid,
  .action-row,
  .rail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar,
  .panel-head,
  .table-toolbar {
    align-items: flex-start;
  }

  .panel-head {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .topbar {
    border-radius: 28px;
  }

  .hero-panel h1 {
    max-width: none;
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .thumb-link {
    min-width: 220px;
  }

  table {
    min-width: 900px;
  }
}

body[data-view-mode="marketing"] .platform-panel,
body[data-view-mode="marketing"] .platform-entry-grid,
body[data-view-mode="marketing"] .nav[aria-label="Plattformnavigation"],
body[data-view-mode="presentation"] .panel-actions,
body[data-view-mode="presentation"] .nav[aria-label="Plattformnavigation"] {
  display: none !important;
}

body[data-view-mode="presentation"] .topbar {
  justify-content: center;
}
