/*
 * Qadah Design System
 * Claude.ai-inspired — warm neutrals, coral accent, restrained
 * No gradients · No glassmorphism · No shadows on resting elements
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Tiempos+Headline:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Surfaces — warm off-white spectrum */
  --c-bg:           #FAF9F5;   /* page background — warm cream */
  --c-surface:      #FFFFFF;   /* cards */
  --c-surface-2:    #F5F4ED;   /* subtle alt surface */
  --c-surface-3:    #EFEEE7;   /* hover, input fill */

  /* Borders — barely there */
  --c-border:       #E8E6DC;   /* default border, 0.5px */
  --c-border-2:     #D9D6CC;   /* hover/emphasis */
  --c-border-focus: #C96442;   /* focus ring (coral) */

  /* Ink — warm charcoal, never pure black */
  --c-ink:          #3D3D3A;   /* primary text */
  --c-ink-2:        #6B6B66;   /* secondary text */
  --c-ink-3:        #9C9A92;   /* tertiary, hints, meta */

  /* Brand — single accent used sparingly */
  --c-coral:        #C96442;   /* primary CTA + accent */
  --c-coral-hover:  #B5573A;
  --c-coral-soft:   #F4E5DD;   /* coral 50 — backgrounds */
  --c-coral-text:   #8A4730;   /* coral on coral-soft */

  /* Semantic — muted, never bright */
  --c-success:      #4A7C59;
  --c-success-soft: #E4EBE4;
  --c-warning:      #B07B30;
  --c-warning-soft: #F2EAD8;
  --c-danger:       #A63D2A;
  --c-danger-soft:  #F2DDD4;
  --c-info:         #5B6B7C;
  --c-info-soft:    #E5E8EC;

  /* Radii — subtle */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-full: 9999px;

  /* Borders */
  --bw: 0.5px;

  /* Shadows — only for focus rings and modals */
  --sh-focus: 0 0 0 3px rgba(201, 100, 66, 0.15);
  --sh-modal: 0 16px 48px rgba(61, 61, 58, 0.12);

  /* Typography */
  --f-display: 'Tiempos Headline', 'Lora', Georgia, serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-arabic:  'Noto Naskh Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Spacing scale — generous */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 180ms ease;
}

/* RTL: swap to Arabic font, mirror layout */
html[dir="rtl"] body { font-family: var(--f-arabic); }
html[dir="rtl"] .display { font-family: var(--f-arabic); }

/* ============================================================
   GLOBAL RESET + BASE
   ============================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  font-feature-settings: 'ss01', 'cv11', 'tnum';  /* Inter optical features */
}

body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* No body background image, no gradient — just warm cream */

a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: var(--c-border-2);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--t-fast);
}
a:hover { text-decoration-color: var(--c-coral); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.display, h1.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--s-4) 0;
  color: var(--c-ink);
  letter-spacing: -0.01em;
}

h1 { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 24px; font-weight: 500; line-height: 1.25; }
h3 { font-size: 18px; font-weight: 500; line-height: 1.35; }
h4 { font-size: 15px; font-weight: 500; line-height: 1.4; }

p { margin: 0 0 var(--s-4) 0; color: var(--c-ink-2); line-height: 1.65; }

.lead { font-size: 18px; color: var(--c-ink-2); line-height: 1.55; max-width: 60ch; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-3);
}

.muted { color: var(--c-ink-2); }
.faint { color: var(--c-ink-3); }

small, .small { font-size: 13px; color: var(--c-ink-2); }

code, kbd, pre {
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--c-surface-2);
  border: var(--bw) solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 2px 6px;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* App shell — sidebar + main.
   With dir="rtl" on <html>, grid auto-flips column order, so the sidebar
   stays on the inline-start in both directions and renders at exactly 240px.
   Do NOT add an html[dir="rtl"] override here — that double-flip caused the
   Phase-10 RTL sidebar-width bug. */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--c-bg);
  border-inline-end: var(--bw) solid var(--c-border);
  padding: var(--s-5) var(--s-3);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.app-main {
  padding: var(--s-7) var(--s-7);
  max-width: 100%;
  overflow-x: hidden;
}

.page-header {
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-5);
  border-bottom: var(--bw) solid var(--c-border);
}
.page-header h1 { margin: 0 0 var(--s-2) 0; }
.page-header .lead { margin: 0; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-6);
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand .mark {
  width: 22px;
  height: 22px;
  background: var(--c-coral);
  border-radius: var(--r-sm);
}
.sidebar-brand .brand-logo {
  height: 22px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
.auth-form-side .auth-brand .brand-logo {
  height: 24px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.sidebar-section {
  margin-bottom: var(--s-5);
}
.sidebar-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  padding: 0 var(--s-3);
  margin-bottom: var(--s-2);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  color: var(--c-ink-2);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.sidebar-link:hover {
  background: var(--c-surface-3);
  color: var(--c-ink);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--c-surface-3);
  color: var(--c-ink);
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: var(--bw) solid var(--c-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
}
.sidebar-user .avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--c-coral-soft);
  color: var(--c-coral-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.sidebar-user .name { font-size: 13px; color: var(--c-ink); font-weight: 500; }
.sidebar-user .role { font-size: 11px; color: var(--c-ink-3); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--c-surface);
  border: var(--bw) solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.card-flat {
  background: var(--c-surface-2);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

/* No glass class. No shadows on hover. Restraint. */

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 9px 16px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border: var(--bw) solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--c-ink);
  color: var(--c-bg);
  border-color: var(--c-ink);
}
.btn-primary:hover { background: #2A2A28; border-color: #2A2A28; text-decoration: none; }

.btn-accent {
  background: var(--c-coral);
  color: white;
  border-color: var(--c-coral);
}
.btn-accent:hover { background: var(--c-coral-hover); border-color: var(--c-coral-hover); text-decoration: none; }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-ink);
  border-color: var(--c-border-2);
}
.btn-secondary:hover { background: var(--c-surface-3); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--c-ink-2);
}
.btn-ghost:hover { background: var(--c-surface-3); color: var(--c-ink); text-decoration: none; }

.btn-danger {
  background: var(--c-danger);
  color: white;
  border-color: var(--c-danger);
}
.btn-danger:hover { background: #8A3220; border-color: #8A3220; text-decoration: none; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ============================================================
   FORMS
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--s-4);
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-ink);
}
.field .hint {
  font-size: 12px;
  color: var(--c-ink-3);
  margin-top: 2px;
}
.field .error {
  font-size: 12px;
  color: var(--c-danger);
  margin-top: 2px;
}

.input, .field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--c-ink);
  background: var(--c-surface);
  border: var(--bw) solid var(--c-border-2);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:hover, .field input:hover, .field select:hover, .field textarea:hover {
  border-color: var(--c-ink-3);
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-coral);
  box-shadow: var(--sh-focus);
}
.field textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239C9A92' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 12px;
  padding-inline-end: 36px;
}
html[dir="rtl"] .field select { background-position: left 12px center; }

.field input:disabled, .field textarea:disabled, .field select:disabled,
.input:disabled {
  background: var(--c-surface-3);
  color: var(--c-ink-3);
  cursor: not-allowed;
}
.field input.invalid, .field textarea.invalid, .field select.invalid {
  border-color: var(--c-danger);
}
.field textarea { font-family: var(--f-body); }

/* ============================================================
   FORM CONTROLS — Phase 10 polish
   Custom checkbox / radio / file upload, all RTL-safe.
   ============================================================ */

.checkbox-field, .radio-field {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
}
.checkbox-field input[type="checkbox"],
.radio-field input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--c-border-2);
  background: var(--c-surface);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  margin-top: 1px;
}
.checkbox-field input[type="checkbox"] { border-radius: 4px; }
.radio-field input[type="radio"] { border-radius: 50%; }
.checkbox-field input[type="checkbox"]:hover,
.radio-field input[type="radio"]:hover { border-color: var(--c-ink-3); }
.checkbox-field input[type="checkbox"]:focus-visible,
.radio-field input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
  border-color: var(--c-coral);
}
.checkbox-field input[type="checkbox"]:checked {
  background: var(--c-coral);
  border-color: var(--c-coral);
}
.checkbox-field input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset-inline-start: 5px;
  top: 1px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.radio-field input[type="radio"]:checked {
  background: radial-gradient(circle at center, var(--c-coral) 0 5px, var(--c-surface) 6px 100%);
  border-color: var(--c-coral);
}
.checkbox-field .label-content,
.radio-field .label-content {
  font-size: 14px;
  color: var(--c-ink);
  line-height: 1.5;
}
.checkbox-field .label-content .hint,
.radio-field .label-content .hint {
  display: block;
  font-size: 12px;
  color: var(--c-ink-2);
  margin-top: 2px;
}

/* File upload — drag-and-drop tile.
   Wraps a hidden <input type="file"> inside a <label class="file-field"> */
.file-field {
  display: block;
  cursor: pointer;
}
.file-field input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  border: 0;
}
.file-field-tile {
  border: 1.5px dashed var(--c-border-2);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  background: var(--c-surface-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.file-field:hover .file-field-tile,
.file-field input[type="file"]:focus-visible + .file-field-tile {
  border-color: var(--c-coral);
  background: var(--c-coral-soft);
}
.file-field-tile .prompt { font-size: 14px; color: var(--c-ink-2); }
.file-field-tile .prompt strong { color: var(--c-coral); font-weight: 500; }
.file-field-tile .hint {
  display: block;
  font-size: 12px;
  color: var(--c-ink-3);
  margin-top: 4px;
}
.file-field-selected {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-coral);
  display: none;
}
.file-field-selected.has-file { display: block; }

/* Required asterisk */
.field label .required { color: var(--c-danger); margin-inline-start: 2px; }

/* Disabled / loading buttons */
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-loading {
  position: relative;
  color: transparent !important;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 14px; height: 14px;
  margin-block-start: -7px;
  margin-inline-start: -7px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  color: var(--c-bg);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--r-full);
  border: var(--bw) solid transparent;
}
.badge-neutral  { background: var(--c-surface-3); color: var(--c-ink-2); }
.badge-coral    { background: var(--c-coral-soft); color: var(--c-coral-text); }
.badge-success  { background: var(--c-success-soft); color: var(--c-success); }
.badge-warning  { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-danger   { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-info     { background: var(--c-info-soft); color: var(--c-info); }

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
  background: var(--c-surface);
  border: var(--bw) solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.stat-card .label {
  font-size: 12px;
  color: var(--c-ink-3);
  margin-bottom: var(--s-2);
}
.stat-card .value {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-card .delta {
  font-size: 12px;
  margin-top: var(--s-2);
}
.stat-card .delta.up { color: var(--c-success); }
.stat-card .delta.down { color: var(--c-danger); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-3);
}

/* ============================================================
   ALERTS / FLASH
   ============================================================ */

.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.5;
  border: var(--bw) solid transparent;
  margin-bottom: var(--s-4);
}
.alert-success { background: var(--c-success-soft); color: var(--c-success); border-color: var(--c-success); border-color: rgba(74, 124, 89, 0.2); }
.alert-warning { background: var(--c-warning-soft); color: var(--c-warning); border-color: rgba(176, 123, 48, 0.2); }
.alert-danger  { background: var(--c-danger-soft); color: var(--c-danger); border-color: rgba(166, 61, 42, 0.2); }
.alert-info    { background: var(--c-info-soft); color: var(--c-info); border-color: rgba(91, 107, 124, 0.2); }

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--s-8) var(--s-5);
  color: var(--c-ink-2);
}
.empty-state h3 { color: var(--c-ink); margin-bottom: var(--s-2); font-family: var(--f-display); font-weight: 500; }
.empty-state p { color: var(--c-ink-2); max-width: 40ch; margin: 0 auto var(--s-5); }

/* Phase 10 Fix 8 — skeleton loaders (no gradient — solid pulse only). */
.skeleton {
  background: var(--c-surface-3);
  border-radius: var(--r-md);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.lg { height: 18px; }
.skeleton-line.short { width: 50%; }
.skeleton-block { height: 96px; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ============================================================
   AUTH SPLIT LAYOUT
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--c-bg);
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell .auth-aside { display: none; }
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-7) var(--s-7);
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}
.auth-form-side .auth-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-bottom: var(--s-7);
}
.auth-form-side .auth-brand .mark {
  width: 24px; height: 24px;
  background: var(--c-coral);
  border-radius: var(--r-sm);
}

.auth-form-side h1 {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}
.auth-form-side .lead {
  font-size: 15px;
  margin-bottom: var(--s-6);
}

.auth-aside {
  background: var(--c-surface-2);
  border-inline-start: var(--bw) solid var(--c-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-8);
  position: relative;
}
.auth-aside-quote {
  max-width: 420px;
}
.auth-aside-quote blockquote {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4) 0;
}
.auth-aside-quote cite {
  font-style: normal;
  font-size: 13px;
  color: var(--c-ink-3);
}

/* ============================================================
   PUBLIC NAV / FOOTER
   ============================================================ */

.public-nav {
  border-bottom: var(--bw) solid var(--c-border);
  background: var(--c-bg);
}
.public-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
}
.public-nav .nav-links {
  display: flex;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.public-nav .nav-links a {
  font-size: 14px;
  color: var(--c-ink-2);
  text-decoration: none;
}
.public-nav .nav-links a:hover { color: var(--c-ink); }

.public-footer {
  margin-top: var(--s-9);
  padding: var(--s-7) 0;
  border-top: var(--bw) solid var(--c-border);
  background: var(--c-bg);
}
.public-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--c-ink-3);
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */

.lang-switch {
  display: inline-flex;
  border: var(--bw) solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  overflow: hidden;
}
.lang-switch a {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-ink-3);
  text-decoration: none;
  transition: all var(--t-fast);
}
.lang-switch a.active {
  background: var(--c-ink);
  color: var(--c-bg);
}
.lang-switch a:not(.active):hover {
  background: var(--c-surface-3);
  color: var(--c-ink);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.mt-3 { margin-top: var(--s-3); }
.mt-5 { margin-top: var(--s-5); }
.mt-7 { margin-top: var(--s-7); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-7 { margin-bottom: var(--s-7); }
.text-center { text-align: center; }
.w-full { width: 100%; }

.divider {
  height: var(--bw);
  background: var(--c-border);
  border: 0;
  margin: var(--s-5) 0;
}

/* Tabular figures everywhere numbers appear */
.tabular { font-variant-numeric: tabular-nums; }

/* Print + reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
