/**
 * Design System Tokens — DPDP Compliance Platform
 * Based on DESIGN.md "Wine Country" palette
 *
 * Usage: load this before site.css in base templates, via a stylesheet link.
 *
 * Note: do not write a literal @import rule for this file here, even inside a
 * comment. Django's ManifestStaticFilesStorage post-processor rewrites @import
 * URLs with a regex that does not skip comments, so a self-referencing example
 * made collectstatic loop until it failed with
 * "Max post-process passes exceeded", which broke production static builds.
 */

/* ─── Light Mode Tokens (default) ─────────────────────────────────────────── */
:root {
  /* Color — Primary palette */
  --color-primary: #3b1520;
  --color-primary-rgb: 59, 21, 32;
  --color-secondary: #8b5e6a;
  --color-tertiary: #b8935f;
  --color-neutral: #f4ebdc;
  --color-surface: #faf3e4;
  --color-surface-bright: #fff8f1;
  --color-surface-container: #f6edde;
  --color-on-primary: #faf3e4;
  --color-on-primary-container: #b17a86;

  /* Color — Borders and outlines */
  --color-border: rgba(59, 21, 32, 0.14);
  --color-border-strong: rgba(59, 21, 32, 0.28);
  --color-muted: rgba(59, 21, 32, 0.72);
  --color-outline: #837376;

  /* Color — Container tones */
  --color-primary-container: #3b1520;
  --color-secondary-container: #fec6d3;
  --color-on-tertiary-container: #a78351;
  --color-tertiary-fixed: #ffddb2;

  /* Color — Severity / status palette */
  --color-bad-fg: #991b1b;
  --color-bad-bg: #dc2626;
  --color-warn-fg: #9a3412;
  --color-warn-bg: #ea580c;
  --color-good-fg: #065f46;
  --color-good-bg: #059669;

  /* Color — Informational */
  --color-info-fg: #1e40af;
  --color-info-bg: #3b82f6;

  /* Typography — Font families */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-label: "Inter", system-ui, sans-serif;

  /* Typography — Font sizes */
  --font-size-display: 5rem;
  --font-size-h1: 2.75rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --font-size-body-lg: 1.125rem;
  --font-size-body-md: 1.05rem;
  --font-size-body-sm: 0.875rem;
  --font-size-label: 0.75rem;
  --font-size-label-sm: 0.6875rem;

  /* Typography — Line heights */
  --line-height-display: 1.1;
  --line-height-heading: 1.2;
  --line-height-body: 1.7;
  --line-height-tight: 1.3;

  /* Typography — Letter spacing */
  --letter-spacing-display: -0.02em;
  --letter-spacing-label: 0.14em;
  --letter-spacing-tight: -0.01em;

  /* Spacing scale */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(59, 21, 32, 0.06);
  --shadow-sm: 0 2px 4px rgba(59, 21, 32, 0.08);
  --shadow-md: 0 4px 12px rgba(59, 21, 32, 0.10);
  --shadow-lg: 0 8px 24px rgba(59, 21, 32, 0.12);
  --shadow-xl: 0 16px 48px rgba(59, 21, 32, 0.14);
  --shadow-soft: 0 22px 48px rgba(59, 21, 32, 0.08);
  --shadow-card: 0 2px 8px rgba(59, 21, 32, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(59, 21, 32, 0.12);

  /* Z-index scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --max-width: 1240px;
  --content-width: 720px;
  --navbar-height: 64px;
  --sidebar-width: 220px;

  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition-base: 0.18s ease;
  --transition-slow: 0.28s ease;

  /* ─── Semantic aliases ─────────────────────────────────────────────────── */
  --color-bg: var(--color-surface-container);
  --color-text: var(--color-primary);
  --color-text-muted: var(--color-muted);
  --color-accent: var(--color-tertiary);
  --color-accent-hover: #a07d4f;

  /* ─── Component: Button — Primary ────────────────────────────────────── */
  --btn-primary-bg: var(--color-tertiary);
  --btn-primary-text: var(--color-on-primary);
  --btn-primary-border: transparent;
  --btn-primary-hover-bg: var(--color-accent-hover);
  --btn-primary-hover-text: var(--color-on-primary);
  --btn-primary-radius: var(--radius-md);
  --btn-primary-padding-x: 20px;
  --btn-primary-padding-y: 12px;
  --btn-primary-font: var(--font-label);
  --btn-primary-weight: 600;
  --btn-primary-letter-spacing: 0.02em;

  /* ─── Component: Button — Secondary ───────────────────────────────────── */
  --btn-secondary-bg: transparent;
  --btn-secondary-text: var(--color-primary);
  --btn-secondary-border: var(--color-primary);
  --btn-secondary-hover-bg: rgba(59, 21, 32, 0.06);
  --btn-secondary-hover-text: var(--color-primary);
  --btn-secondary-radius: var(--radius-md);
  --btn-secondary-padding-x: 20px;
  --btn-secondary-padding-y: 12px;
  --btn-secondary-font: var(--font-label);
  --btn-secondary-weight: 500;

  /* ─── Component: Button — Ghost ───────────────────────────────────────── */
  --btn-ghost-text: var(--color-primary);
  --btn-ghost-hover-bg: rgba(59, 21, 32, 0.06);
  --btn-ghost-hover-underline: underline;

  /* ─── Component: Card ─────────────────────────────────────────────────── */
  --card-bg: var(--color-surface);
  --card-text: var(--color-primary);
  --card-border: var(--color-border);
  --card-radius: var(--radius-lg);
  --card-padding: 24px;
  --card-shadow: var(--shadow-card);
  --card-shadow-hover: var(--shadow-card-hover);
  --card-hover-lift: translateY(-2px);

  /* ─── Component: Card — Accent variant ────────────────────────────────── */
  --card-accent-bg: var(--color-primary);
  --card-accent-text: var(--color-on-primary);

  /* ─── Component: Input ────────────────────────────────────────────────── */
  --input-bg: rgba(250, 243, 228, 0.8);
  --input-border: rgba(59, 21, 32, 0.2);
  --input-border-focus: var(--color-tertiary);
  --input-focus-ring: 0 0 0 2px rgba(184, 147, 95, 0.35);
  --input-radius: var(--radius-md);
  --input-padding-x: 13px;
  --input-padding-y: 10px;
  --input-font: var(--font-body);
  --input-font-size: 0.9375rem;
  --input-placeholder-color: var(--color-muted);

  /* ─── Component: Badge ─────────────────────────────────────────────────── */
  --badge-font: var(--font-label);
  --badge-font-size: var(--font-size-label-sm);
  --badge-weight: 600;
  --badge-letter-spacing: var(--letter-spacing-label);
  --badge-radius: var(--radius-full);
  --badge-padding-x: 7px;
  --badge-padding-y: 2px;

  /* Badge status variants */
  --badge-pending-bg: rgba(184, 147, 95, 0.15);
  --badge-pending-text: #7a5c2e;
  --badge-resolved-bg: rgba(5, 150, 105, 0.12);
  --badge-resolved-text: var(--color-good-fg);
  --badge-closed-bg: rgba(59, 21, 32, 0.08);
  --badge-closed-text: var(--color-muted);
  --badge-critical-bg: rgba(220, 38, 38, 0.12);
  --badge-critical-text: var(--color-bad-fg);
  --badge-high-bg: rgba(234, 88, 12, 0.12);
  --badge-high-text: var(--color-warn-fg);
  --badge-medium-bg: rgba(184, 147, 95, 0.15);
  --badge-medium-text: #7a5c2e;
  --badge-low-bg: rgba(5, 150, 105, 0.10);
  --badge-low-text: var(--color-good-fg);
  --badge-info-bg: rgba(59, 130, 246, 0.12);
  --badge-info-text: #1e40af;
  --badge-legal-bg: rgba(124, 58, 237, 0.12);
  --badge-legal-text: #5b21b6;
  --badge-security-bg: rgba(59, 130, 246, 0.12);
  --badge-security-text: #1e40af;

  /* ─── Component: Navigation — Navbar ──────────────────────────────────── */
  --navbar-bg: var(--color-neutral);
  --navbar-border: var(--color-border);
  --navbar-text: var(--color-primary);
  --navbar-height: var(--navbar-height);
  --navbar-item-font: var(--font-label);
  --navbar-item-weight: 500;
  --navbar-item-letter-spacing: 0.08em;
  --navbar-item-active-color: var(--color-tertiary);

  /* ─── Component: Navigation — Sidebar ────────────────────────────────── */
  --sidebar-bg: var(--color-surface-container);
  --sidebar-width: var(--sidebar-width);
  --sidebar-item-font: var(--font-label);
  --sidebar-item-weight: 500;
  --sidebar-item-size: 14px;
  --sidebar-item-active-bg: var(--color-primary);
  --sidebar-item-active-text: var(--color-on-primary);
  --sidebar-item-hover-bg: rgba(59, 21, 32, 0.06);

  /* ─── Component: Cookie Consent Banner ─────────────────────────────────── */
  --consent-banner-bg: var(--color-surface);
  --consent-banner-border-top: 1px solid var(--color-primary);
  --consent-banner-padding-x: var(--space-4);
  --consent-banner-padding-y: var(--space-4);
  --consent-banner-shadow: 0 -4px 24px rgba(59, 21, 32, 0.12);
  --consent-panel-bg: var(--color-surface);
  --consent-panel-border-top: 3px solid var(--color-tertiary);
  --consent-panel-shadow: 0 -8px 32px rgba(59, 21, 32, 0.10);

  /* Toggle switch */
  --toggle-on-bg: var(--color-tertiary);
  --toggle-off-bg: rgba(59, 21, 32, 0.24);
  --toggle-width: 40px;
  --toggle-height: 22px;
  --toggle-thumb-size: 18px;
  --toggle-thumb-offset: 2px;

  /* ─── Component: Theme Toggle ─────────────────────────────────────────── */
  --theme-toggle-size: 38px;
  --theme-toggle-border: var(--color-border);
  --theme-toggle-hover-border: var(--color-tertiary);
  --theme-toggle-hover-bg: rgba(184, 147, 95, 0.1);
}

/* ─── Dark Mode Tokens ──────────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-primary: #faf3e4;
  --color-primary-rgb: 250, 243, 228;
  --color-secondary: #c4a0a9;
  --color-tertiary: #d4a96a;
  --color-neutral: #1a0d12;
  --color-surface: #2a141e;
  --color-surface-bright: #3a1f2a;
  --color-surface-container: #221318;
  --color-on-primary: #3b1520;
  --color-on-primary-container: #f0d0d8;

  --color-border: rgba(250, 243, 228, 0.14);
  --color-border-strong: rgba(250, 243, 228, 0.28);
  --color-muted: rgba(250, 243, 228, 0.60);
  --color-outline: #b89da4;

  --color-primary-container: #faf3e4;
  --color-secondary-container: #5c3040;
  --color-on-tertiary-container: #f0d8a0;
  --color-tertiary-fixed: #5c3a10;

  --color-bad-fg: #fca5a5;
  --color-bad-bg: #dc2626;
  --color-warn-fg: #fdba74;
  --color-warn-bg: #ea580c;
  --color-good-fg: #6ee7b7;
  --color-good-bg: #059669;
  --color-info-fg: #93c5fd;
  --color-info-bg: #3b82f6;

  /* Dark mode shadows — deeper, warmer */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.50);
  --shadow-soft: 0 22px 48px rgba(0, 0, 0, 0.40);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.45);

  /* Dark mode semantic aliases */
  --color-bg: var(--color-surface-container);
  --color-text: var(--color-primary);
  --color-text-muted: var(--color-muted);
  --color-accent: var(--color-tertiary);
  --color-accent-hover: #e0b878;

  /* Dark mode component overrides */
  --btn-secondary-border: var(--color-primary);
  --btn-secondary-hover-bg: rgba(250, 243, 228, 0.08);
  --btn-ghost-hover-bg: rgba(250, 243, 228, 0.08);
  --card-bg: var(--color-surface);
  --card-border: var(--color-border);

  /* Dark mode navbar */
  --navbar-bg: var(--color-surface-container);
  --navbar-border: var(--color-border);
  --navbar-text: var(--color-primary);

  /* Dark mode sidebar */
  --sidebar-bg: var(--color-surface);
  --sidebar-item-hover-bg: rgba(250, 243, 228, 0.06);
  --sidebar-item-active-bg: var(--color-secondary);
  --sidebar-item-active-text: var(--color-surface);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════════════════ */

/* Display heading — Playfair Display 5rem */
.text-display {
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  font-weight: 500;
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
  color: var(--color-primary);
}

/* Heading levels */
.text-h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-h1);
  font-weight: 500;
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-primary);
}

.text-h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: 500;
  line-height: var(--line-height-heading);
  color: var(--color-primary);
}

.text-h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--color-primary);
}

.text-h4 {
  font-family: var(--font-body);
  font-size: var(--font-size-h4);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--color-primary);
}

/* Body text variants */
.text-body-lg {
  font-family: var(--font-body);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

.text-body-md {
  font-family: var(--font-body);
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

.text-body-sm {
  font-family: var(--font-body);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

/* Label / UI text */
.text-label {
  font-family: var(--font-label);
  font-size: var(--font-size-label);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.text-label-sm {
  font-family: var(--font-label);
  font-size: var(--font-size-label-sm);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Muted / secondary text */
.text-muted {
  color: var(--color-text-muted);
}

/* Prose — max-width for long-form readability */
.prose {
  font-family: var(--font-body);
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--color-text);
  max-width: 65ch;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-bottom: 1em;
}

.prose a {
  color: var(--color-tertiary);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--color-accent-hover);
}

.prose code {
  font-family: monospace;
  font-size: 0.9em;
  background: var(--color-surface-container);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ══════════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.content-width {
  max-width: var(--content-width);
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: BUTTONS
   ══════════════════════════════════════════════════════════════════════════════ */

/* Shared button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--btn-primary-radius);
  padding: var(--btn-primary-padding-y) var(--btn-primary-padding-x);
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base),
    transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

/* Primary button — warm gold bg */
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-border);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg);
  color: var(--btn-primary-hover-text);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Secondary button — transparent, wine border */
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover-bg);
  color: var(--btn-secondary-hover-text);
}

/* Ghost button — text only, underline on hover */
.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--btn-ghost-hover-bg);
  text-decoration: var(--btn-ghost-hover-underline);
}

/* Danger variant */
.btn-danger {
  background: var(--color-bad-bg);
  color: #fff;
  border-color: transparent;
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Disabled state */
.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: CARD
   ══════════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card--hover:hover {
  box-shadow: var(--card-shadow-hover);
  transform: var(--card-hover-lift);
}

.card--accent {
  background: var(--card-accent-bg);
  color: var(--card-accent-text);
  border-color: transparent;
}

.card--editorial {
  padding: 32px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: INPUT
   ══════════════════════════════════════════════════════════════════════════════ */

.input {
  display: block;
  width: 100%;
  background: var(--input-bg);
  color: var(--color-text);
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius);
  padding: var(--input-padding-y) var(--input-padding-x);
  font-family: var(--input-font);
  font-size: var(--input-font-size);
  line-height: 1.5;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.input::placeholder {
  color: var(--input-placeholder-color);
}

.input:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: var(--input-focus-ring);
}

.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Input error state */
.input--error {
  border-color: var(--color-bad-bg);
}

.input--error:focus {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: BADGE / CHIP
   ══════════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--badge-font);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: uppercase;
  background: var(--color-surface-container);
  color: var(--color-text-muted);
  border-radius: var(--badge-radius);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  line-height: 1;
}

.badge--pending {
  background: var(--badge-pending-bg);
  color: var(--badge-pending-text);
}

.badge--resolved,
.badge--active,
.badge--ready {
  background: var(--badge-resolved-bg);
  color: var(--badge-resolved-text);
}

.badge--closed,
.badge--cancelled {
  background: var(--badge-closed-bg);
  color: var(--badge-closed-text);
}

.badge--critical {
  background: var(--badge-critical-bg);
  color: var(--badge-critical-text);
}

.badge--high {
  background: var(--badge-high-bg);
  color: var(--badge-high-text);
}

.badge--medium {
  background: var(--badge-medium-bg);
  color: var(--badge-medium-text);
}

.badge--low {
  background: var(--badge-low-bg);
  color: var(--badge-low-text);
}

.badge--info {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}

.badge--legal {
  background: var(--badge-legal-bg);
  color: var(--badge-legal-text);
}

.badge--security {
  background: var(--badge-security-bg);
  color: var(--badge-security-text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: GAP CARD (Compliance Dashboard)
══════════════════════════════════════════════════════════════════════════════ */

.gap-panels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
}

.gap-card {
  background: var(--color-surface-bright);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.gap-card:hover {
  box-shadow: var(--shadow-md);
}

.gap-card--critical {
  border-left: 4px solid var(--color-bad-bg);
}

.gap-card--warning {
  border-left: 4px solid var(--color-warn-bg);
}

.gap-card--info {
  border-left: 4px solid var(--color-info-bg);
}

.gap-card--legal {
  border-left: 4px solid #7c3aed;
}

.gap-card--security {
  border-left: 4px solid var(--color-info-bg);
}

.gap-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-container);
}

.gap-card__body {
  padding: var(--space-4);
  flex: 1;
}

.gap-card__title {
  font-family: var(--font-body);
  font-size: var(--font-size-body-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-2) 0;
  line-height: var(--line-height-tight);
}

.gap-card__code {
  font-family: var(--font-label);
  font-size: var(--font-size-label);
  color: var(--color-muted);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  margin: 0 0 var(--space-1) 0;
}

.gap-card__obligation {
  font-family: var(--font-label);
  font-size: var(--font-size-label-sm);
  color: var(--color-muted);
  margin: 0 0 var(--space-1) 0;
}

.gap-card__reason {
  font-family: var(--font-body);
  font-size: var(--font-size-body-sm);
  color: var(--color-primary);
  margin: var(--space-2) 0 0 0;
  line-height: var(--line-height-body);
}

.gap-card__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-container);
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: NAVIGATION — NAVBAR
   ══════════════════════════════════════════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--navbar-border);
  backdrop-filter: blur(8px);
  padding-inline: var(--space-4);
}

.navbar__brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-right: var(--space-8);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  font-family: var(--navbar-item-font);
  font-size: 0.8125rem;
  font-weight: var(--navbar-item-weight);
  letter-spacing: var(--navbar-item-letter-spacing);
  text-transform: uppercase;
  color: var(--navbar-text);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-item:hover {
  background: rgba(59, 21, 32, 0.06);
}

.nav-item--active {
  color: var(--navbar-item-active-color);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: NAVIGATION — SIDEBAR
   ══════════════════════════════════════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--sidebar-bg);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: var(--space-4) 0;
  z-index: var(--z-base);
}

.sidebar__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--sidebar-item-font);
  font-size: var(--sidebar-item-size);
  font-weight: var(--sidebar-item-weight);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  transition: background var(--transition-fast);
}

.sidebar-item:hover {
  background: var(--sidebar-item-hover-bg);
}

.sidebar-item--active {
  background: var(--sidebar-item-active-bg);
  color: var(--sidebar-item-active-text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: TOGGLE SWITCH
   ══════════════════════════════════════════════════════════════════════════════ */

.toggle {
  position: relative;
  display: inline-block;
  width: var(--toggle-width);
  height: var(--toggle-height);
  flex-shrink: 0;
}

.toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--toggle-off-bg);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-base);
}

.toggle__slider::before {
  content: '';
  position: absolute;
  width: var(--toggle-thumb-size);
  height: var(--toggle-thumb-size);
  left: var(--toggle-thumb-offset);
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.toggle__input:checked + .toggle__slider {
  background: var(--toggle-on-bg);
}

.toggle__input:checked + .toggle__slider::before {
  transform: translateY(-50%) translateX(18px);
}

.toggle__input:focus-visible + .toggle__slider {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: THEME TOGGLE
   ══════════════════════════════════════════════════════════════════════════════ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--theme-toggle-size);
  height: var(--theme-toggle-size);
  background: transparent;
  border: 1px solid var(--theme-toggle-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--theme-toggle-hover-border);
  background: var(--theme-toggle-hover-bg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPONENT: COOKIE CONSENT BANNER
   ══════════════════════════════════════════════════════════════════════════════ */

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--consent-banner-bg);
  border-top: var(--consent-banner-border-top);
  padding: var(--consent-banner-padding-y) var(--consent-banner-padding-x);
  box-shadow: var(--consent-banner-shadow);
  z-index: var(--z-modal);
  display: none;
}

.consent-banner.is-visible {
  display: block;
}

.consent-banner__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.consent-banner__text {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--font-size-body-sm);
  color: var(--color-text);
  min-width: 200px;
}

.consent-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.consent-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--consent-panel-bg);
  border-top: var(--consent-panel-border-top);
  padding: var(--space-6);
  box-shadow: var(--consent-panel-shadow);
  z-index: calc(var(--z-modal) + 1);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.consent-panel.is-open {
  transform: translateY(0);
}
