/* ============================================================
   AKILI Design System
   Swahili AI linguistic evaluation tooling
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  /* Color — warm earth palette */
  --bg:              #f8f6f2;
  --bg-subtle:       #f0ede8;
  --surface:         #ffffff;
  --surface-raised:  #ffffff;
  --border:          #e2dfd9;
  --border-subtle:   #eeebe5;

  --text:            #1a1a1a;
  --text-secondary:  #4a4540;
  --text-muted:      #8a847c;
  --text-faint:      #b5afa5;

  --green:           #166534;
  --green-hover:     #14532d;
  --green-light:     #dcfce7;
  --green-surface:   #f0fdf4;
  --green-text:      #166534;

  --red:             #991b1b;
  --red-hover:       #7f1d1d;
  --red-light:       #fee2e2;
  --red-surface:     #fef2f2;
  --red-text:        #991b1b;

  --amber:           #92400e;
  --amber-light:     #fef3c7;
  --amber-surface:   #fffbeb;

  --blue:            #1e40af;
  --blue-light:      #dbeafe;
  --blue-surface:    #eff6ff;

  --nav-bg:          #141414;
  --nav-text:        #ffffff;

  /* Typography */
  --font:            system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:       ui-monospace, "SF Mono", "Cascadia Mono", "Fira Code", monospace;

  --text-xs:         0.75rem;   /* 12px */
  --text-sm:         0.8125rem; /* 13px */
  --text-base:       0.9375rem; /* 15px */
  --text-md:         1rem;      /* 16px */
  --text-lg:         1.125rem;  /* 18px */
  --text-xl:         1.25rem;   /* 20px */
  --text-2xl:        1.5rem;    /* 24px */
  --text-3xl:        1.875rem;  /* 30px */
  --text-4xl:        2.25rem;   /* 36px */
  --text-display:    3rem;      /* 48px */

  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  /* Spacing */
  --sp-1:  0.25rem;  --sp-2:  0.5rem;   --sp-3:  0.75rem;
  --sp-4:  1rem;     --sp-5:  1.25rem;   --sp-6:  1.5rem;
  --sp-8:  2rem;     --sp-10: 2.5rem;    --sp-12: 3rem;
  --sp-16: 4rem;     --sp-20: 5rem;      --sp-24: 6rem;

  /* Radius */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-glow-green: 0 0 0 3px rgba(22,101,52,0.15);
  --shadow-glow-red:   0 0 0 3px rgba(153,27,27,0.15);

  /* Transitions */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --duration:    150ms;

  /* Layout */
  --content-width: 720px;
  --wide-width:    960px;
}


/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: var(--leading-tight);
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }


/* --- Nav --------------------------------------------------- */
.nav {
  background: var(--nav-bg);
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  height: 48px;
  gap: var(--sp-1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--nav-text);
  letter-spacing: 0.04em;
  margin-right: auto;
  padding-right: var(--sp-8);
}

.nav-link {
  color: rgba(255,255,255,0.55);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
  text-decoration: none;
}
.nav-link:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.nav-link.active {
  color: var(--nav-text);
  background: rgba(255,255,255,0.12);
}


/* --- Page Shell -------------------------------------------- */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  min-height: 52px;
}

.page-content {
  max-width: var(--content-width);
  margin: var(--sp-6) auto;
  padding: 0 var(--sp-6);
}

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


/* --- Cards ------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-8);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.card-bordered-left {
  border-left: 4px solid var(--border);
}

.card-bordered-left.status-approved {
  border-left-color: var(--green);
}
.card-bordered-left.status-needs_fix {
  border-left-color: var(--red);
}

.card.flash-approved {
  border-color: var(--green);
  box-shadow: var(--shadow-glow-green);
}
.card.flash-fix {
  border-color: var(--red);
  box-shadow: var(--shadow-glow-red);
}

.card-compact {
  padding: var(--sp-4) var(--sp-5);
}


/* --- Stat Cards (dashboard) -------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-4);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  text-align: center;
  transition: box-shadow var(--duration) var(--ease);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-value.green { color: var(--green); }
.stat-value.red   { color: var(--red); }
.stat-value.amber { color: var(--amber); }
.stat-value.blue  { color: var(--blue); }

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: var(--sp-2);
}


/* --- Module Cards (dashboard) ------------------------------ */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}
.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d0cdc7;
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.module-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.module-icon.green  { background: var(--green-light);  color: var(--green); }
.module-icon.amber  { background: var(--amber-light);  color: var(--amber); }
.module-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.module-icon.red    { background: var(--red-light);    color: var(--red); }

.module-title {
  font-size: var(--text-md);
  font-weight: 600;
}

.module-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.module-meta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: auto;
}

.module-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--green);
  margin-top: var(--sp-1);
}
.module-link:hover { text-decoration: underline; }


/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { background: var(--bg-subtle); }
.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

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

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-hover); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.btn-sm {
  font-size: var(--text-xs);
  padding: 0.3rem 0.65rem;
}


/* --- Badges / Pills --------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
}

.badge-green  { background: var(--green-light);  color: var(--green-text); }
.badge-red    { background: var(--red-light);     color: var(--red-text); }
.badge-amber  { background: var(--amber-light);   color: var(--amber); }
.badge-blue   { background: var(--blue-light);     color: var(--blue); }
.badge-muted  { background: var(--bg-subtle);      color: var(--text-muted); }

.pill {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}


/* --- Filter Bar -------------------------------------------- */
.filter-group {
  display: flex;
  gap: 0.3rem;
}

.filter-btn {
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.filter-btn:hover { background: var(--bg-subtle); }
.filter-btn.active {
  background: var(--nav-bg);
  color: #fff;
  border-color: var(--nav-bg);
}


/* --- Progress Bar ------------------------------------------ */
.progress {
  width: 100%;
  height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-lg { height: 6px; }

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease);
}


/* --- Bar Chart --------------------------------------------- */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
}

.bar-label {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.5s var(--ease);
  min-width: 2px;
}
.bar-fill.green { background: var(--green); opacity: 0.8; }
.bar-fill.red   { background: var(--red);   opacity: 0.7; }
.bar-fill.amber { background: var(--amber); opacity: 0.7; }
.bar-fill.blue  { background: #3b82f6; opacity: 0.7; }

.bar-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Stacked variant for comparison */
.bar-stacked {
  display: flex;
  gap: 2px;
}


/* --- Review Card (bench) ----------------------------------- */
.review-id {
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.review-meta {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.review-row {
  margin-bottom: var(--sp-3);
}

.review-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.review-text {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  font-weight: 500;
}
.review-text.good { color: var(--green); }
.review-text.bad  { color: var(--red); }

.review-gloss {
  font-style: italic;
  color: var(--text-muted);
  margin-top: var(--sp-3);
  font-size: var(--text-base);
}

.review-notes {
  background: var(--bg-subtle);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-3);
  border-left: 3px solid var(--border);
  line-height: var(--leading-relaxed);
}

.review-flag {
  background: var(--red-surface);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--red-text);
  font-weight: 500;
  margin-top: var(--sp-2);
}

.review-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  flex-wrap: wrap;
  align-items: center;
}


/* --- Morph Card -------------------------------------------- */
.morph-surface {
  font-size: var(--text-4xl);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.01em;
  margin: var(--sp-4) 0 var(--sp-3);
}

.morph-meaning {
  font-size: var(--text-lg);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-bottom: var(--sp-6);
}

.morph-spec {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-family: var(--font-mono);
  text-align: center;
  margin-top: var(--sp-4);
}


/* --- Forms ------------------------------------------------- */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: var(--sp-1);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font);
  font-size: var(--text-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,101,52,0.1);
}
.form-textarea { resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}


/* --- Tables ------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th {
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

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

tr:hover td { background: rgba(0,0,0,0.01); }

td.num {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}


/* --- Keyboard Hint ----------------------------------------- */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border);
}

.shortcut-bar {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: var(--sp-4);
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.shortcut-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}


/* --- Toast / Flash ----------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-green { background: var(--green); color: #fff; }
.toast-red   { background: var(--red);   color: #fff; }

.flash-banner {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  font-size: var(--text-sm);
  margin-top: var(--sp-4);
}
.flash-banner.green { background: var(--green-light); color: var(--green-text); }
.flash-banner.red   { background: var(--red-light);   color: var(--red-text); }


/* --- Entry List (ASR) -------------------------------------- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--red);
  transition: box-shadow var(--duration) var(--ease);
}
.entry:hover { box-shadow: var(--shadow-sm); }

.entry-id {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.entry-spoken    { color: var(--green); font-size: var(--text-lg); font-weight: 500; }
.entry-transcribed { color: var(--red); font-size: var(--text-lg); font-weight: 500; }
.entry-detail    { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--sp-1); }


/* --- Empty State ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-8);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--sp-3);
  opacity: 0.4;
}

.empty-state-text {
  font-size: var(--text-md);
}


/* --- Dashboard --------------------------------------------- */
.dashboard-hero {
  text-align: center;
  padding: var(--sp-10) var(--sp-6) var(--sp-8);
}

.dashboard-hero h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

.dashboard-hero p {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin: 0;
}

.dashboard-section {
  margin-bottom: var(--sp-8);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}


/* --- Results Comparison ------------------------------------ */
.comparison-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.comparison-label {
  width: 120px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.comparison-track {
  flex: 1;
  height: 28px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.comparison-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  transition: width 0.8s var(--ease);
}
.comparison-fill.green { background: var(--green); }
.comparison-fill.blue  { background: #3b82f6; }

.comparison-pct {
  width: 52px;
  text-align: right;
  font-size: var(--text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


/* --- Run Selector ------------------------------------------ */
.run-selector {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
}

.run-selector select {
  font-family: var(--font);
  font-size: var(--text-sm);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.run-selector select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,101,52,0.1);
}


/* --- Utility ----------------------------------------------- */
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-mono    { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}


/* --- Responsive -------------------------------------------- */
@media (max-width: 640px) {
  .nav { padding: 0 var(--sp-4); }
  .page-header { padding: var(--sp-3) var(--sp-4); }
  .page-content { padding: 0 var(--sp-4); }
  .card { padding: var(--sp-4) var(--sp-5); }
  .review-text { font-size: var(--text-xl); }
  .morph-surface { font-size: var(--text-3xl); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 100px 1fr 40px; }
  .comparison-label { width: 80px; }
  .dashboard-hero h1 { font-size: var(--text-2xl); }
}
