:root {
  --primary:         #5e6ad2;
  --primary-glow:    rgba(94, 106, 210, 0.15);
  --ink:             #f7f8f8;
  --ink-muted:       #d0d6e0;
  --ink-subtle:      #8a8f98;
  --ink-tertiary:    #4a4e56;
  --canvas:          #010102;
  --surface-1:       #0f1011;
  --surface-2:       #141516;
  --surface-3:       #1a1b1d;
  --hairline:        #23252a;
  --hairline-strong: #34343a;
  --danger:          #c93c3c;
  --danger-bg:       rgba(201, 60, 60, 0.12);
  --danger-border:   rgba(201, 60, 60, 0.2);

  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --INTERVAL: 9000ms;

  /* Category accent colors */
  --cat-regulation:   #f59e0b;
  --cat-health:       #ef4444;
  --cat-environment:  #22c55e;
  --cat-politics:     #3b82f6;
  --cat-economy:      #eab308;
  --cat-psychology:   #a855f7;
  --cat-privacy:      #06b6d4;
  --cat-safety:       #f97316;
  --cat-urban:        #14b8a6;
  --cat-resources:    #d97706;
  --cat-culture:      #ec4899;
  --cat-alternatives: #84cc16;
  --cat-equity:       #8b5cf6;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ─── Top bar ─────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  pointer-events: none;
}

.topbar-logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: auto;
  cursor: default;
}

.topbar-logo-main {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
}

.topbar-logo-main .logo-icon {
  margin-right: 0.35rem;
  color: var(--ink-tertiary);
  opacity: 0.7;
}

.topbar-logo-sub {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  color: var(--ink-tertiary);
  opacity: 0.45;
  text-transform: uppercase;
}

.topbar-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.db-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 5px 14px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--ink-subtle);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.db-tab:hover {
  border-color: var(--hairline-strong);
  color: var(--ink);
  background: var(--surface-2);
}

.db-count {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
}

/* ─── Language switcher ─────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 1px;
  background: var(--hairline);
  border-radius: 7px;
  overflow: hidden;
}

.lang-btn {
  padding: 4px 10px;
  background: var(--surface-1);
  border: none;
  color: var(--ink-tertiary);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lang-btn:hover { background: var(--surface-2); color: var(--ink-subtle); }
.lang-btn.lang-active {
  background: var(--surface-3);
  color: var(--ink);
}

/* ─── Stage document box ───────────────────────── */
.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5rem 2rem 5rem;
}

.stage:hover .stage-arrow { opacity: 1; }

.claim-stage {
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--surface-1);
  transition: opacity 0.45s ease, transform 0.45s ease;
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

.claim-stage.fade-out {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

.claim-stage.fade-in {
  animation: fadeInUp 0.45s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Document header row */
.stage-doc-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  letter-spacing: 0.3px;
}

.stage-doc-sep {
  margin: 0 0.75rem;
  opacity: 0.35;
}

.stage-cat-icon {
  margin-right: 0.4rem;
  font-size: 12px;
}

.stage-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.stage-az {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-tertiary);
}

.stage-year-doc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-tertiary);
}

.stage-counter {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
}

/* Document body */
.stage-doc-body {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stage-befund-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.stage-befund-label::before {
  content: '⊢ ';
  opacity: 0.5;
}

.stage-title {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--ink);
}

/* Red highlight spans injected by JS */
.highlight-red {
  color: #ef4444;
  font-weight: 700;
}
.highlight-red-word {
  color: #ef4444;
  text-decoration: underline;
  text-decoration-color: rgba(239, 68, 68, 0.4);
  text-underline-offset: 2px;
  font-weight: 600;
}

/* Document footer row */
.stage-doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--hairline);
}

.stage-source-block {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
}

.stage-source-icon {
  color: var(--ink-tertiary);
  font-size: 11px;
}

.stage-severity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.4px;
}

.stage-severity-icon {
  font-size: 12px;
}

.stage-severity-bar {
  letter-spacing: 1px;
  font-size: 10px;
}

.stage-severity-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Severity color variants */
.severity-kritisch .stage-severity-icon,
.severity-kritisch .stage-severity-bar,
.severity-kritisch .stage-severity-label { color: #ef4444; }

.severity-erhoeht .stage-severity-icon,
.severity-erhoeht .stage-severity-bar,
.severity-erhoeht .stage-severity-label  { color: #f97316; }

.severity-mittel .stage-severity-icon,
.severity-mittel .stage-severity-bar,
.severity-mittel .stage-severity-label   { color: #eab308; }

.severity-gering .stage-severity-icon,
.severity-gering .stage-severity-bar,
.severity-gering .stage-severity-label   { color: var(--ink-tertiary); }

/* ─── Arrow nav ────────────────────────────────── */
.stage-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--hairline);
  color: var(--ink-tertiary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s, color 0.15s, border-color 0.15s;
  z-index: 10;
}
.stage-arrow:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.stage-prev { left: 1.5rem; }
.stage-next { right: 1.5rem; }

/* ─── Progress bar ─────────────────────────────── */
.progress-track {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hairline);
  z-index: 100;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width linear;
  opacity: 0.6;
}

/* ─── Database overlay ─────────────────────────── */
.db-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  background: rgba(1, 1, 2, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.db-overlay.open {
  display: flex;
  animation: overlayIn 0.25s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.db-panel {
  margin: auto;
  width: min(1100px, 95vw);
  height: min(90vh, 860px);
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: panelIn 0.3s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes panelIn {
  from { opacity: 0; transform: scale(0.97) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.db-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
  gap: 1rem;
}

.db-panel-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

.db-panel-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

.db-search,
.db-select {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font);
  padding: 5px 10px;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.db-search {
  width: 200px;
}

.db-search::placeholder { color: var(--ink-tertiary); }

.db-search:focus,
.db-select:focus {
  outline: none;
  border-color: var(--primary);
}

.db-select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8f98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  min-width: 140px;
}
.db-select option { background: var(--surface-2); }

.db-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--ink-subtle);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.db-close:hover { color: var(--ink); background: var(--surface-3); }

/* ─── DB List ──────────────────────────────────── */
.db-grid {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
}

.db-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1rem;
  height: 44px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 0.1s;
  flex-shrink: 0;
}
.db-row:hover { background: var(--surface-2); }
.db-row:last-child { border-bottom: none; }

.db-row-cat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 130px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}

.db-row-cat-icon {
  font-size: 11px;
  flex-shrink: 0;
}

.db-row-id {
  width: 90px;
  flex-shrink: 0;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  padding-left: 0.75rem;
}

.db-row-title {
  flex: 1;
  font-size: 13px;
  color: var(--ink-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 1rem;
  min-width: 0;
}
.db-row:hover .db-row-title { color: var(--ink); }

.db-row-sev {
  flex-shrink: 0;
  font-size: 13px;
  width: 20px;
  text-align: center;
}

.db-row-year {
  width: 44px;
  flex-shrink: 0;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  text-align: right;
}

/* ─── Badges ────────────────────────────────────── */
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--ink-subtle);
  border: 1px solid var(--hairline);
}
.badge-high {
  background: var(--danger-bg);
  color: #f87171;
  border-color: var(--danger-border);
}

/* ─── Detail modal ─────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 1, 2, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 500;
  padding: 2rem;
}
.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.2s ease;
}

.modal-content {
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  border-radius: 4px;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: panelIn 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--ink-subtle);
  font-size: 13px;
  cursor: pointer;
  z-index: 1;
  transition: color 0.12s, background 0.12s;
}
.modal-close:hover { color: var(--ink); background: var(--surface-3); }

/* Protocol header */
.modal-proto-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  letter-spacing: 0.3px;
  padding-right: 3rem;
}

.modal-proto-sep {
  margin: 0 0.6rem;
  opacity: 0.35;
}

.modal-proto-cat {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Protocol body */
.modal-proto-body {
  padding: 1.5rem 1.5rem 0;
}

.modal-gegenstand-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 0.4rem;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.modal-section { margin-bottom: 1.25rem; }

.modal-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  margin-bottom: 0.35rem;
}

.modal-section p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.65;
}

.modal-section code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-muted);
}

/* Protocol footer row */
.modal-proto-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--hairline);
  margin-top: 0.25rem;
}

.modal-source-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-source-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.modal-source-meta {
  font-size: 12px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary-glow);
  border: 1px solid rgba(94, 106, 210, 0.2);
  transition: background 0.15s, border-color 0.15s;
}
.modal-link:hover {
  background: rgba(94, 106, 210, 0.22);
  border-color: rgba(94, 106, 210, 0.4);
}

.modal-proto-severity {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.modal-sev-icon { font-size: 12px; }
.modal-sev-bar  { letter-spacing: 1px; font-size: 10px; }
.modal-sev-label { text-transform: uppercase; letter-spacing: 0.5px; }

.severity-kritisch .modal-sev-icon,
.severity-kritisch .modal-sev-bar,
.severity-kritisch .modal-sev-label { color: #ef4444; }

.severity-erhoeht .modal-sev-icon,
.severity-erhoeht .modal-sev-bar,
.severity-erhoeht .modal-sev-label  { color: #f97316; }

.severity-mittel .modal-sev-icon,
.severity-mittel .modal-sev-bar,
.severity-mittel .modal-sev-label   { color: #eab308; }

.severity-gering .modal-sev-icon,
.severity-gering .modal-sev-bar,
.severity-gering .modal-sev-label   { color: var(--ink-tertiary); }

/* Tags */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--hairline);
}

.modal-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--ink-tertiary);
  border: 1px solid var(--hairline);
}

.inline-link {
  color: var(--primary);
  text-decoration: none;
}
.inline-link:hover { text-decoration: underline; }

.modal-id-badge {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ─── Cookie banner ─────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  font-size: 13px;
  color: var(--ink-subtle);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.cookie-banner.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}
.cookie-ok {
  padding: 3px 12px;
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.cookie-ok:hover { background: var(--hairline); }

/* ─── Legal footer ──────────────────────────────── */
.legal-footer {
  position: fixed;
  bottom: 8px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 11px;
  color: var(--ink-tertiary);
  pointer-events: none;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: auto;
}

.legal-link {
  background: none;
  border: none;
  color: var(--ink-tertiary);
  font-size: 11px;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s;
}
.legal-link:hover { color: var(--ink-subtle); }

.legal-sep { color: var(--ink-tertiary); opacity: 0.4; }

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 9999px; }

/* ─── Info panel ───────────────────────────────── */
.info-tab {
  opacity: 0.7;
}
.info-tab:hover { opacity: 1; }

.info-body {
  overflow-y: auto;
  flex: 1;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
}

.info-hero {
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.info-hero-kicker {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  letter-spacing: 0.7px;
  margin-bottom: 0.5rem;
}

.info-about {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.info-section-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--hairline);
}

.info-use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.info-use-card {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.info-use-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.info-use-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.info-use-text {
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.45;
}

.info-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

.info-stat {
  background: var(--surface-2);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--ink);
  letter-spacing: -0.5px;
}

.info-stat-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.info-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.info-cat-pill {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.1s;
}
.info-cat-pill:hover { background: var(--surface-3); color: var(--ink); }

.info-cat-icon { font-size: 11px; }

.info-cat-count {
  font-size: 10px;
  color: var(--ink-tertiary);
  margin-left: 0.2rem;
}

.info-footer {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-tertiary);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}

.info-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.info-file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  text-decoration: none;
}
.info-file-link span {
  color: var(--ink-tertiary);
  font-size: 9px;
  letter-spacing: 0.4px;
}
.info-file-link:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.info-quality-note {
  margin-top: 0.75rem;
  font-size: 12px;
  color: var(--ink-subtle);
  line-height: 1.55;
}

.info-status {
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.info-status .info-section-label {
  margin-bottom: 0.55rem;
}

.info-status p {
  font-size: 12px;
  color: var(--ink-subtle);
  line-height: 1.55;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .stage-title { font-size: clamp(18px, 5.5vw, 28px); }
  .stage { padding: 4rem 1rem 4rem; }
  .stage-prev { left: 0.25rem; }
  .stage-next { right: 0.25rem; }
  .stage-doc-header { padding: 0.5rem 0.85rem; font-size: 10px; }
  .stage-doc-body { padding: 1.25rem 1rem 1rem; }
  .stage-doc-footer { padding: 0.5rem 0.85rem; }
  .db-panel { width: 96vw; height: 92vh; border-radius: 8px; }
  .db-panel-header { align-items: flex-start; flex-direction: column; gap: 0.75rem; }
  .db-panel-controls { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .db-search { width: min(100%, 190px); }
  .db-select { min-width: 150px; }
  .db-row { height: auto; min-height: 52px; padding: 0.5rem 0.75rem; }
  .db-row-cat { width: 94px; font-size: 10px; }
  .db-row-id { width: 74px; padding-left: 0.35rem; }
  .db-row-year { display: none; }
  .db-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 19px; }
  .modal-overlay { padding: 0.75rem; }
  .modal-proto-footer { flex-direction: column; }
  .topbar { padding: 0 0.85rem; }
  .topbar-logo-sub { display: none; }
  .info-body { padding: 1rem; }
  .info-use-grid { grid-template-columns: 1fr; }
  .info-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cookie-banner {
    width: calc(100vw - 1.5rem);
    white-space: normal;
    border-radius: 8px;
    align-items: flex-start;
  }
}
