/* ═══════════════════════════════════════════════════════════════════
   COMPONENTS.CSS · The complete component library
   ───────────────────────────────────────────────────────────────────
   All components reference --accent, --surface-*, --text-*, etc.
   Nothing here is theme-specific. The theme file provides the color,
   this file provides the structure.
   
   Version 1.0 · April 2026
   ═══════════════════════════════════════════════════════════════════ */


/* ─── RESET ──────────────────────────────────────────────────────── */

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

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--size-body);
  line-height: var(--line-body);
  color: var(--text-primary);
  background: var(--surface-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--track-body);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--motion-micro) var(--ease);
}
a:hover { opacity: 0.75; }


/* ─── APP SHELL (canvas grain lives here) ────────────────────────── */

.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  background: var(--surface-page);
}

.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.app-shell > * { position: relative; z-index: 1; }


/* ─── NAVIGATION SIDEBAR ─────────────────────────────────────────── */

.nav {
  width: var(--nav-width);
  background: var(--surface-elevated);
  border-right: 0.5px solid var(--border-rest);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--motion-medium) var(--ease);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.nav[data-collapsed="true"] { width: var(--nav-collapsed); }

.nav-brand {
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-bottom: 0.5px solid var(--border-rest);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}

.nav-wordmark {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.nav-rule {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}
.nav-rule::before {
  content: '';
  display: block;
  width: 14px;
  height: 0.5px;
  background: var(--accent);
}
.nav-rule::after {
  content: '';
  display: block;
  width: 28px;
  height: 0.5px;
  background: var(--accent);
}
.nav-rule .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-tagline {
  font-size: var(--size-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-style: italic;
  transition: opacity var(--motion-short) var(--ease);
}

.nav[data-collapsed="true"] .nav-wordmark,
.nav[data-collapsed="true"] .nav-rule,
.nav[data-collapsed="true"] .nav-tagline {
  opacity: 0;
  pointer-events: none;
}

.nav-items {
  flex: 1;
  padding: var(--space-2) 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  color: var(--text-tertiary);
  border-left: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--size-small);
  transition: color var(--motion-micro) var(--ease), border-color var(--motion-micro) var(--ease), background-color var(--motion-micro) var(--ease);
}

.nav-item:hover {
  color: var(--text-primary);
  border-left-color: var(--border-rest);
}

.nav-item[aria-current="page"] {
  color: var(--accent);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.nav-item .nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-item-label {
  transition: opacity var(--motion-short) var(--ease);
}

.nav[data-collapsed="true"] .nav-item-label { opacity: 0; pointer-events: none; }

.nav-divider {
  margin: var(--space-2) var(--space-4);
  height: 0.5px;
  background: var(--border-rest);
}

.nav-toggle-wrap {
  padding: var(--space-2) var(--space-3);
  border-top: 0.5px solid var(--border-rest);
  flex-shrink: 0;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 0.5px solid var(--border-rest);
  color: var(--text-tertiary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: var(--size-label);
  font-style: italic;
  transition: border-color var(--motion-micro) var(--ease), color var(--motion-micro) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.nav-toggle-arrow {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--motion-medium) var(--ease);
}

.nav[data-collapsed="true"] .nav-toggle-arrow { transform: rotate(180deg); }
.nav[data-collapsed="true"] .nav-toggle { justify-content: center; }


/* ─── CONTENT AREA ───────────────────────────────────────────────── */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  background: var(--surface-elevated);
  border-bottom: 0.5px solid var(--border-rest);
  padding: 0 var(--space-6);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-context {
  font-size: var(--size-eyebrow);
  letter-spacing: var(--track-uppercase);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-style: italic;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--size-eyebrow);
  color: var(--text-tertiary);
}

.page {
  padding: var(--space-6);
  max-width: 1400px;
  width: 100%;
}


/* ─── PAGE HEADER ────────────────────────────────────────────────── */

.page-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 0.5px solid var(--border-rest);
}

.page-eyebrow {
  font-size: var(--size-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: var(--space-2);
}

.page-title {
  font-size: var(--size-title);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-title);
  line-height: var(--line-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.page-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.page-meta {
  font-size: var(--size-eyebrow);
  color: var(--text-tertiary);
  font-style: italic;
  white-space: nowrap;
}


/* ─── SECTION HEADER (with signature rule) ───────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--size-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-style: italic;
  white-space: nowrap;
}

.section-rule { flex: 1; height: 0.5px; background: var(--border-rest); }

.section-meta {
  font-size: var(--size-eyebrow);
  color: var(--text-tertiary);
  font-style: italic;
  white-space: nowrap;
}

.signature-rule {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.signature-rule::before {
  content: '';
  display: block;
  width: 14px;
  height: 0.5px;
  background: var(--accent);
}
.signature-rule::after {
  content: '';
  display: block;
  width: 28px;
  height: 0.5px;
  background: var(--accent);
}
.signature-rule .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}


/* ─── DIVIDERS ───────────────────────────────────────────────────── */

.rule-hair   { height: 0.5px; background: var(--border-rest); }
.rule-mid    { height: 0.5px; background: var(--text-tertiary); }
.rule-anchor { height: 1px;   background: var(--text-primary); }


/* ─── CARDS ──────────────────────────────────────────────────────── */

.card {
  background: var(--surface-raised);
  border: 0.5px solid var(--border-rest);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--motion-short) var(--ease);
}

.card--flat {
  background: var(--surface-flat);
  border: none;
}

.card--accent {
  border-left: 2px solid var(--accent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.card--selected { border: 1px solid var(--border-selected); }

.card--interactive { cursor: pointer; }
.card--interactive:hover { border-color: var(--border-hover); }
.card--interactive:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.card--composite {
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.card--composite > .card-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 0.5px solid var(--border-rest);
}
.card--composite > .card-body   { padding: var(--space-4) var(--space-5); }
.card--composite > .card-footer {
  padding: var(--space-3) var(--space-5);
  background: var(--surface-elevated);
  border-top: 0.5px solid var(--border-rest);
}


/* ─── METRIC DISPLAY ─────────────────────────────────────────────── */

.metric-label {
  font-size: var(--size-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
}

.metric-value {
  font-size: 28px;
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-display);
  line-height: var(--line-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.metric-value--accent   { color: var(--accent); }
.metric-value--positive { color: var(--accent); }

.metric-delta {
  font-size: var(--size-tiny);
  color: var(--accent);
}

.metric-delta--muted { color: var(--text-secondary); }


/* ─── BUTTONS ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  letter-spacing: -0.005em;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity var(--motion-short) var(--ease), background-color var(--motion-short) var(--ease), border-color var(--motion-short) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.btn--primary {
  background: var(--text-primary);
  color: var(--text-on-dark);
}
.btn--primary:hover { opacity: 0.88; }

.btn--accent {
  background: var(--accent);
  color: var(--text-on-dark);
}
.btn--accent:hover { opacity: 0.88; }

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 0.5px solid var(--text-primary);
}
.btn--secondary:hover { background: var(--surface-flat); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 10px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--text-primary);
}
.btn--ghost:hover { opacity: 0.7; }

.btn--destructive {
  background: transparent;
  color: var(--status-error);
  border: 0.5px solid var(--status-error);
}
.btn--destructive:hover { background: color-mix(in srgb, var(--status-error) 8%, transparent); }

.btn:disabled,
.btn--disabled {
  background: transparent;
  color: var(--text-muted);
  border: 0.5px solid var(--border-rest);
  cursor: not-allowed;
  opacity: 1;
}

.btn--sm { font-size: var(--size-tiny); padding: 7px 14px; }
.btn--lg { font-size: var(--size-body); padding: 13px 26px; }


/* ─── INPUTS ─────────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field-label {
  font-size: var(--size-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-uppercase);
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color var(--motion-micro) var(--ease);
}

.field:focus-within .field-label { color: var(--text-primary); }
.field[data-invalid="true"] .field-label { color: var(--status-error); }

.input,
.select,
.textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 0.5px solid var(--border-rest);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  height: 38px;
  font-family: var(--font-sans);
  font-size: var(--size-body);
  color: var(--text-primary);
  transition: border-color var(--motion-short) var(--ease), box-shadow var(--motion-short) var(--ease);
}

.textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  min-height: 80px;
  resize: vertical;
  line-height: var(--line-body);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-muted); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border: 1px solid var(--text-primary);
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.field[data-invalid="true"] .input,
.field[data-invalid="true"] .textarea,
.field[data-invalid="true"] .select {
  border-color: var(--status-error);
}

.field-help {
  font-size: var(--size-label);
  color: var(--text-tertiary);
  font-style: italic;
}

.field-error {
  font-size: var(--size-label);
  color: var(--status-error);
  font-style: italic;
}

.input-with-prefix,
.input-with-suffix {
  display: flex;
  align-items: center;
  background: var(--surface-raised);
  border: 0.5px solid var(--border-rest);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  height: 38px;
  gap: var(--space-3);
  transition: border-color var(--motion-short) var(--ease), box-shadow var(--motion-short) var(--ease);
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within {
  border: 1px solid var(--text-primary);
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.input-with-prefix .input,
.input-with-suffix .input {
  border: none;
  padding: 0;
  height: auto;
  background: transparent;
  flex: 1;
}

.input-with-prefix .input:focus,
.input-with-suffix .input:focus {
  box-shadow: none;
}

.input-prefix,
.input-suffix {
  color: var(--text-tertiary);
  font-size: var(--size-body);
}

.kbd-hint {
  font-size: var(--size-label);
  color: var(--text-tertiary);
  background: var(--surface-flat);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}


/* ─── CONTROLS · toggle, checkbox, radio, segmented ──────────────── */

.toggle {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background: var(--border-rest);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--motion-short) var(--ease);
  border: none;
  padding: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--surface-page);
  border-radius: 50%;
  transition: transform var(--motion-short) var(--ease);
}

.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { transform: translateX(14px); }

.toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.checkbox {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--surface-raised);
  border: 0.5px solid var(--border-rest);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  transition: background-color var(--motion-micro) var(--ease), border-color var(--motion-micro) var(--ease);
}

.checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  width: 4px;
  height: 7px;
  border-right: 1.2px solid var(--text-on-dark);
  border-bottom: 1.2px solid var(--text-on-dark);
  transform: rotate(45deg);
}

.checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.radio {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--surface-raised);
  border: 0.5px solid var(--border-rest);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: border-color var(--motion-micro) var(--ease), border-width var(--motion-micro) var(--ease);
}

.radio:checked {
  border: 1.5px solid var(--accent);
}
.radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-page), 0 0 0 3.5px var(--accent);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-flat);
  border-radius: var(--radius-md);
  padding: 2px;
}

.segmented-option {
  padding: 5px 12px;
  font-size: var(--size-tiny);
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color var(--motion-micro) var(--ease), color var(--motion-micro) var(--ease);
  font-weight: var(--weight-regular);
}

.segmented-option[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}


/* ─── STATUS INDICATORS ──────────────────────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-small);
  color: var(--text-primary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--live       { background: var(--status-live); }
.status-dot--paused     { background: var(--status-paused); }
.status-dot--processing { background: var(--status-processing); }
.status-dot--attention  { background: var(--status-attention); }
.status-dot--error      { background: var(--status-error); }
.status-dot--draft      { background: var(--status-draft); }

.status-dot--pulse { animation: breath var(--motion-breath) var(--ease) infinite; }

@keyframes breath {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}


/* ─── BADGES ─────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: var(--size-label);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 0.5px solid transparent;
  white-space: nowrap;
}

.badge--approved {
  background: var(--badge-approved-bg);
  border-color: var(--badge-approved-bd);
  color: var(--badge-approved-tx);
}

.badge--progress {
  background: var(--badge-progress-bg);
  border-color: var(--badge-progress-bd);
  color: var(--badge-progress-tx);
}

.badge--rejected {
  background: var(--badge-rejected-bg);
  border-color: var(--badge-rejected-bd);
  color: var(--badge-rejected-tx);
}

.badge--draft {
  background: var(--badge-draft-bg);
  border-color: var(--badge-draft-bd);
  color: var(--badge-draft-tx);
}

.badge--neutral {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-tx);
  border: none;
}

.badge--ink {
  background: var(--text-primary);
  color: var(--text-on-dark);
  border: none;
}

.badge--accent {
  background: var(--accent);
  color: var(--text-on-dark);
  border: none;
}


/* ─── TOOLTIPS ───────────────────────────────────────────────────── */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--text-on-dark);
  padding: 5px 10px;
  border-radius: var(--radius-md);
  font-size: var(--size-label);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-short) var(--ease) var(--motion-short);
  z-index: 500;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text-primary);
}

.tooltip:hover .tooltip-content,
.tooltip:focus-within .tooltip-content { opacity: 1; }


/* ─── TYPOGRAPHY UTILITIES ───────────────────────────────────────── */

.display {
  font-size: var(--size-display);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-display);
  line-height: var(--line-tight);
}

.title {
  font-size: var(--size-title);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-title);
  line-height: var(--line-heading);
}

.heading {
  font-size: var(--size-heading);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-body);
}

.eyebrow {
  font-size: var(--size-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-style: italic;
}

.body       { font-size: var(--size-body);   color: var(--text-primary); }
.body-muted { font-size: var(--size-body);   color: var(--text-secondary); }
.meta       { font-size: var(--size-tiny);   color: var(--text-tertiary); }
.caption    { font-size: var(--size-label);  color: var(--text-tertiary); font-style: italic; }


/* ─── MOTION UTILITIES ───────────────────────────────────────────── */

@keyframes settle-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.motion-settle { animation: settle-in var(--motion-medium) var(--ease) both; }

.motion-stagger > * { animation: settle-in var(--motion-medium) var(--ease) both; }
.motion-stagger > *:nth-child(1) { animation-delay:   0ms; }
.motion-stagger > *:nth-child(2) { animation-delay:  60ms; }
.motion-stagger > *:nth-child(3) { animation-delay: 120ms; }
.motion-stagger > *:nth-child(4) { animation-delay: 180ms; }
.motion-stagger > *:nth-child(5) { animation-delay: 240ms; }
.motion-stagger > *:nth-child(6) { animation-delay: 300ms; }


/* ─── GRID UTILITIES ─────────────────────────────────────────────── */

.grid          { display: grid; gap: var(--space-3); }
.grid--2       { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3       { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4       { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5       { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--tight   { gap: var(--space-2); }
.grid--spacious{ gap: var(--space-5); }


/* ─── FLEX UTILITIES ─────────────────────────────────────────────── */

.row       { display: flex; align-items: center; }
.row--between { justify-content: space-between; }
.row--gap     { gap: var(--space-3); }

.stack    { display: flex; flex-direction: column; gap: var(--space-3); }
.stack--tight { gap: var(--space-2); }


/* ─── ACCESSIBILITY ──────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
