/* Metrik · Web-Analytics-Dashboard (Demo)
   Petrol statt Standard-Grün, damit das Ding nicht nach Template aussieht.
   Stand 06/2026, v1.8.2 */

:root {
  --accent: #0d5c56;
  --accent-strong: #0a4640;
  --accent-soft: #eaf3f1;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-soft: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.04);
  --font:
    -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

/* Das hidden-Attribut muss auch Elemente mit eigener display-Regel
   (z. B. .topbar-actions mit display: flex) zuverlässig ausblenden. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: top 0.15s ease;
}
.skip-link:focus-visible {
  top: 8px;
}

/* ---------- App-Shell ---------- */

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.main {
  min-width: 0;
}

/* ---------- Sidebar ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Unten Platz lassen, damit die fixe Demo-Ribbon nichts überdeckt */
  padding: 20px 14px 64px;
  background: var(--card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
}

.brand-logo {
  display: inline-flex;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-badge {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.demo-badge svg {
  flex: none;
  margin-top: 2px;
}

.build-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}

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

.btn-ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg);
  border-color: #cbd5e1;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.icon-btn:hover {
  background: var(--bg);
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: none;
}

.topbar-title {
  min-width: 0;
}
.topbar-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.period-label {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.segmented button {
  border: 0;
  padding: 6px 13px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button[aria-pressed="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

/* ---------- Inhalt ---------- */

.content {
  padding: 24px;
  display: block;
  max-width: 1320px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-sub {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- KPI-Karten ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Absichtlich unsymmetrisch: die Umsatz-Karte bekommt mehr Platz und
   einen Petrol-Ton, die drei anderen bleiben schlicht. */
@media (min-width: 1121px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr 1fr 1.45fr;
  }
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card-revenue {
  background: var(--accent-soft);
  border-color: #9ccfc3;
}
.kpi-card-revenue .kpi-label {
  color: var(--accent-strong);
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.kpi-value {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.kpi-delta svg {
  flex: none;
}
.kpi-delta.up {
  color: var(--accent-strong);
}
.kpi-delta.down {
  color: var(--danger);
}
.kpi-delta.flat {
  color: var(--muted);
}

/* ---------- Diagramme ---------- */

.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 16px;
}

.chart-wrap {
  position: relative;
}

.chart-host {
  width: 100%;
  touch-action: pan-y;
}
.chart-host svg {
  display: block;
}

.chart-svg text {
  font-family: var(--font);
  font-size: 11px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}

.grid-line {
  stroke: var(--border-soft);
}
.grid-base {
  stroke: var(--border);
}

.line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-line {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.bar-rect {
  fill: var(--accent);
  opacity: 0.78;
  transition: opacity 0.12s ease;
}
.bar-rect.is-active {
  opacity: 1;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  font-variant-numeric: tabular-nums;
}
.chart-tooltip .tip-title {
  color: #cbd5e1;
  font-size: 11.5px;
}
.chart-tooltip .tip-value {
  font-weight: 700;
}

/* ---------- Kanäle ---------- */

.channel-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.channel-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.channel-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.channel-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.channel-name {
  font-weight: 600;
}
.channel-figures {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.channel-figures strong {
  color: var(--text);
  font-weight: 700;
}

.channel-bar {
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}
.channel-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ---------- Top-Seiten ---------- */

.table-wrap {
  overflow-x: auto;
}

.pages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pages-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.pages-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.pages-table tbody tr:last-child td {
  border-bottom: 0;
}
.pages-table tbody tr {
  transition: background-color 0.12s ease;
}
.pages-table tbody tr:hover {
  background: var(--bg);
}

.pages-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pages-table .path {
  font-family: var(--mono);
  font-size: 12.5px;
}
.pages-table .trend-col {
  text-align: right;
}
.pages-table td.trend-col {
  line-height: 0;
}

.sparkline {
  display: inline-block;
}

/* ---------- Platzhalter (Berichte / Einstellungen) ---------- */

.placeholder-panel {
  max-width: 480px;
  margin: 48px auto;
  padding: 44px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 4px;
}

.placeholder-panel h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.placeholder-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Responsiv ---------- */

@media (max-width: 1120px) {
  .charts-grid,
  .lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 268px;
    height: 100%;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.25);
  }

  .backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(15, 23, 42, 0.42);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .topbar {
    padding: 12px 16px;
  }
  .content {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .kpi-value {
    font-size: 24px;
  }
  .card {
    padding: 15px 16px;
  }
}

/* ---------- Vergleichsmodus (Vorperiode) ---------- */

.kpi-prev {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.line-path-prev {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.8;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bar-rect-prev {
  fill: #cbd5e1;
  opacity: 0.9;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}
.toggle-btn:hover {
  color: var(--text);
}
.toggle-btn[aria-pressed="true"] {
  color: var(--accent-strong);
  border-color: #9ccfc3;
  background: var(--accent-soft);
}

.toggle-track {
  position: relative;
  flex: none;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.15s ease;
}
.toggle-btn[aria-pressed="true"] .toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.toggle-btn[aria-pressed="true"] .toggle-thumb {
  transform: translateX(12px);
}

/* ---------- Benutzerdefinierter Zeitraum ---------- */

.custom-range {
  position: relative;
}

.custom-range .btn.is-active {
  border-color: #9ccfc3;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 268px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popover-fields {
  display: flex;
  gap: 10px;
}
.popover-fields label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.popover input[type="date"] {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card);
  min-width: 0;
}

.popover-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.popover-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}
.popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 560px) {
  .popover {
    right: auto;
    left: 0;
  }
}

/* ---------- Funnel & Heatmap ---------- */

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 1120px) {
  .insight-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.funnel-host svg {
  display: block;
}

.funnel-svg .funnel-name {
  font-size: 12px;
  font-weight: 600;
  fill: var(--text);
}
.funnel-svg .funnel-value {
  font-size: 12px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}
.funnel-svg .funnel-pct {
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--accent-strong);
}
.funnel-link {
  fill: #9ccfc3;
  opacity: 0.45;
}

.funnel-stage:focus {
  outline: none;
}
.funnel-stage:focus-visible rect {
  stroke: #0f172a;
  stroke-width: 2;
}

.heat-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.heat-cell {
  cursor: pointer;
}
.heat-cell:focus {
  outline: none;
}
.heat-cell:focus-visible {
  stroke: #0f172a;
  stroke-width: 1.6;
}

.heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.heat-legend span:first-child {
  margin-right: 4px;
}
.heat-legend span:last-child {
  margin-left: 4px;
}

.heat-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}
.heat-swatch.l0 {
  background: #cfe6e0;
}
.heat-swatch.l1 {
  background: #9ccfc3;
}
.heat-swatch.l2 {
  background: #67b9a8;
}
.heat-swatch.l3 {
  background: #4a9d92;
}
.heat-swatch.l4 {
  background: #0d5c56;
}

/* ---------- Anomalien & Tastatur-Fokus in Diagrammen ---------- */

.anomaly-dot {
  fill: #d97706;
  stroke: #fff;
  stroke-width: 1.5;
}

/* Fußnote unterm Besucher-Chart; der Punkt davor greift die Farbe
   der Anomalie-Markierungen auf */
.chart-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.chart-note::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  margin-right: 6px;
}

.focus-point {
  fill: transparent;
}
.focus-point:focus {
  outline: none;
}
.focus-point:focus-visible {
  stroke: var(--accent);
  stroke-width: 2;
  fill: rgba(13, 92, 86, 0.12);
}

.bar-rect:focus {
  outline: none;
}
.bar-rect:focus-visible {
  opacity: 1;
  stroke: #0f172a;
  stroke-width: 1.5;
}

.chart-tooltip .tip-sub {
  color: #cbd5e1;
  font-size: 11.5px;
}
.chart-tooltip .tip-note {
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* ---------- Kanal-Zeilen (Drilldown-Auslöser) ---------- */

.channel-item {
  padding: 0;
}

.channel-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.channel-btn:hover {
  background: var(--bg);
}

.channel-chevron {
  display: inline-flex;
  margin-left: 6px;
  color: var(--muted);
  vertical-align: middle;
}

/* ---------- Segment-Drilldown (Detail-Panel) ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(400px, 100vw);
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.2);
  transform: translateX(102%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
}
.drawer.is-open {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.drawer-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.drawer-body {
  padding: 16px 20px 70px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.drawer-kpi {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.drawer-kpi .label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.drawer-kpi .value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.drawer-h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.drawer-chart svg {
  display: block;
}

.drawer-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-page .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.drawer-page .path {
  font-family: var(--mono);
  font-size: 12.5px;
}
.drawer-page .views {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.drawer-page .bar {
  height: 6px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
  margin-top: 4px;
}
.drawer-page .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- Demo-Ribbon (einheitliche Portfolio-Rückleiste) ---------- */

.demo-ribbon {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 18, 22, 0.85);
  color: #fff;
  font:
    500 12px/1 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.demo-ribbon:hover,
.demo-ribbon:focus-visible {
  opacity: 1;
}
@media print {
  .demo-ribbon {
    display: none;
  }
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
