/* ==========================================================================
   vama WorkOS — Design System / Mockup Stylesheet
   v1 — 28 May 2026
   Brand source: VinTech Leaflet Redesign (May 2026)
   Product palette: "vama — Sovereign AI"
   ========================================================================== */

/* ---------- TOKENS ---------- */
:root {
  /* Brand colours (vama palette) */
  --c-near-black: #1F1F1F;
  --c-vama-violet: #6439FB;
  --c-deep-violet: #5D36FF;
  --c-magenta: #D248DD;
  --c-amber: #F9A741;
  --c-navy: #0F1B71;

  /* Neutrals */
  --c-white: #FFFFFF;
  --c-panel: #F7F7FA;
  --c-panel-2: #F0F2FA;
  --c-border: #E4E5EC;
  --c-border-2: #D0D2DC;
  --c-text-primary: #1F1F1F;
  --c-text-secondary: #5C5C70;
  --c-text-tertiary: #8B8FA8;

  /* Alignment tier bands */
  --tier-foundation: #5C5C70;
  --tier-learning: #6439FB;
  --tier-capable: #D248DD;
  --tier-proficient: #F9A741;
  --tier-mirror-bg: linear-gradient(135deg, #6439FB 0%, #D248DD 55%, #F9A741 100%);

  /* Status */
  --c-success: #2E9E6E;
  --c-warning: #F9A741;
  --c-danger: #E0464D;
  --c-info: #6439FB;

  /* Brand gradient (the moment-of-significance gradient) */
  --brand-gradient: linear-gradient(135deg, #6439FB 0%, #D248DD 55%, #F9A741 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(100,57,251,0.08) 0%, rgba(210,72,221,0.06) 55%, rgba(249,167,65,0.06) 100%);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(31, 31, 31, 0.04), 0 1px 3px rgba(31, 31, 31, 0.06);
  --shadow-md: 0 4px 12px rgba(31, 31, 31, 0.06), 0 2px 4px rgba(31, 31, 31, 0.04);
  --shadow-lg: 0 12px 32px rgba(31, 31, 31, 0.08), 0 4px 8px rgba(31, 31, 31, 0.04);

  /* Typography */
  --font-sans: "Manrope", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text-primary);
  background: var(--c-panel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; }

/* ---------- SHELL LAYOUT ---------- */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--c-near-black);
  color: var(--c-white);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  margin-bottom: var(--sp-4);
}
.sidebar-brand .brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  font-weight: 900;
  color: var(--c-white);
  font-size: 14px;
}
.sidebar-brand .brand-text {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.sidebar-brand .brand-text small {
  display: block;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: var(--sp-4) var(--sp-2) var(--sp-2);
}
.nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: all 120ms ease;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--c-white); }
.nav-item.active {
  background: rgba(100, 57, 251, 0.18);
  color: var(--c-white);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--c-vama-violet);
}
.nav-item .icon { width: 16px; height: 16px; opacity: 0.9; }
.nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--c-amber);
  color: var(--c-near-black);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-chip {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.04);
}
.user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  color: var(--c-white); font-weight: 700; font-size: 12px;
}
.user-chip .meta { font-size: 12px; line-height: 1.3; }
.user-chip .name { font-weight: 600; color: var(--c-white); }
.user-chip .role { color: rgba(255,255,255,0.5); font-size: 10px; letter-spacing: 0.04em; }

/* ---------- MAIN ---------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-4) var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 14px; font-weight: 700; color: var(--c-text-primary); }
.topbar-title .crumb { color: var(--c-text-tertiary); font-weight: 500; margin-right: var(--sp-2); }
.topbar-title .crumb::after { content: "›"; margin-left: var(--sp-2); color: var(--c-text-tertiary); }
.topbar-search {
  flex: 1; max-width: 420px;
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--c-text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.topbar-search .kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 2px 6px;
}
.topbar-actions { margin-left: auto; display: flex; gap: var(--sp-3); align-items: center; }
.workos-badge {
  background: var(--brand-gradient);
  color: var(--c-white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tier-chip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(100,57,251,0.08);
  color: var(--c-vama-violet);
}

.canvas {
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

/* ---------- PAGE HEADER ---------- */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-subtitle {
  font-size: 14px;
  color: var(--c-text-secondary);
  margin-top: var(--sp-2);
}
.page-actions { display: flex; gap: var(--sp-3); align-items: center; }

/* Brand-gradient rule under page headers */
.gradient-rule {
  height: 4px;
  border-radius: 4px;
  background: var(--brand-gradient);
  width: 80px;
}

/* ---------- KPI TILES ---------- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.kpi {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
}
.kpi .label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-text-tertiary);
}
.kpi .value {
  font-size: 32px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--c-text-primary);
  margin-top: var(--sp-3);
  line-height: 1;
}
.kpi .delta {
  margin-top: var(--sp-2);
  font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  color: var(--c-text-secondary);
}
.kpi .delta.up { color: var(--c-success); }
.kpi .delta.down { color: var(--c-danger); }
.kpi .delta.neutral { color: var(--c-text-secondary); }
.kpi .spark {
  position: absolute;
  right: var(--sp-5);
  top: var(--sp-5);
  width: 80px; height: 32px;
}
.kpi.highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-gradient-soft);
  pointer-events: none;
}

/* ---------- PANELS ---------- */
.panel {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.panel-title {
  font-size: 14px; font-weight: 700;
}
.panel-subtitle { font-size: 12px; color: var(--c-text-secondary); margin-top: 2px;}
.panel-action {
  font-size: 12px; color: var(--c-vama-violet); font-weight: 600;
}

/* ---------- ALIGNMENT DIAL ---------- */
.dial {
  --val: 50;
  --color: var(--c-vama-violet);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--color) calc(var(--val) * 1%), var(--c-panel-2) 0);
  display: grid; place-items: center;
  position: relative;
}
.dial::after {
  content: "";
  width: 78%; height: 78%;
  background: var(--c-white);
  border-radius: 50%;
  position: absolute;
}
.dial .dial-value {
  position: relative;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dial .dial-value small { font-size: 12px; color: var(--c-text-tertiary); font-weight: 600; }
.dial.large { width: 180px; height: 180px; }
.dial.large .dial-value { font-size: 38px; }
.dial.small { width: 64px; height: 64px; }
.dial.small .dial-value { font-size: 14px; }

/* tier colors */
.dial.tier-foundation { --color: var(--tier-foundation); }
.dial.tier-learning { --color: var(--tier-learning); }
.dial.tier-capable { --color: var(--tier-capable); }
.dial.tier-proficient { --color: var(--tier-proficient); }
.dial.tier-mirror {
  background: conic-gradient(from 0deg,
    #6439FB calc(var(--val) * 0.33%),
    #D248DD calc(var(--val) * 0.66%),
    #F9A741 calc(var(--val) * 1%),
    var(--c-panel-2) 0);
}

/* ---------- TIER PILLS ---------- */
.tier-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}
.tier-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.tier-pill.foundation { background: rgba(92,92,112,0.1); color: var(--tier-foundation); }
.tier-pill.foundation .dot { background: var(--tier-foundation); }
.tier-pill.learning { background: rgba(100,57,251,0.1); color: var(--tier-learning); }
.tier-pill.learning .dot { background: var(--tier-learning); }
.tier-pill.capable { background: rgba(210,72,221,0.1); color: var(--tier-capable); }
.tier-pill.capable .dot { background: var(--tier-capable); }
.tier-pill.proficient { background: rgba(249,167,65,0.15); color: #B07523; }
.tier-pill.proficient .dot { background: var(--tier-proficient); }
.tier-pill.mirror {
  background: var(--brand-gradient);
  color: var(--c-white);
}
.tier-pill.mirror .dot { background: var(--c-white); }

/* Autonomy tier segmented bar */
.autonomy-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  height: 8px;
}
.autonomy-bar .seg {
  background: var(--c-panel-2);
  border-radius: 2px;
}
.autonomy-bar .seg.filled { background: var(--c-near-black); }
.autonomy-bar .seg.current { background: var(--brand-gradient); }
.autonomy-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.autonomy-labels span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-tertiary);
}
.autonomy-labels span.active { color: var(--c-text-primary); }

/* ---------- STATUS DOTS ---------- */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-text-tertiary);
}
.status-dot.live { background: var(--c-success); box-shadow: 0 0 0 3px rgba(46,158,110,0.15); }
.status-dot.idle { background: var(--c-text-tertiary); }
.status-dot.paused { background: var(--c-warning); }
.status-dot.alert { background: var(--c-danger); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-text-primary);
  transition: all 120ms ease;
}
.btn:hover { border-color: var(--c-border-2); }
.btn.primary {
  background: var(--c-near-black);
  border-color: var(--c-near-black);
  color: var(--c-white);
}
.btn.gradient {
  background: var(--brand-gradient);
  border: none;
  color: var(--c-white);
  font-weight: 700;
}
.btn.ghost { background: transparent; border-color: transparent; color: var(--c-text-secondary); }
.btn.sm { font-size: 12px; padding: 6px 10px; }

/* ---------- CARDS ---------- */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex; flex-direction: column;
  gap: var(--sp-3);
}
.card.alert { border-left: 4px solid var(--c-amber); }
.card.threshold {
  position: relative;
  overflow: hidden;
}
.card.threshold::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--brand-gradient);
}

/* ---------- TABLES ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-tertiary);
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}
.table td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.table tr:hover td { background: var(--c-panel); }
.table tr:last-child td { border-bottom: none; }

/* ---------- COMPONENT BARS (alignment components, competency bars, etc.) ---------- */
.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}
.bar-row .label { font-size: 12px; color: var(--c-text-secondary); font-weight: 500; }
.bar-row .track {
  height: 8px;
  background: var(--c-panel-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-row .fill {
  height: 100%;
  background: var(--c-vama-violet);
  border-radius: 4px;
}
.bar-row .fill.gradient { background: var(--brand-gradient); }
.bar-row .fill.foundation { background: var(--tier-foundation); }
.bar-row .fill.learning { background: var(--tier-learning); }
.bar-row .fill.capable { background: var(--tier-capable); }
.bar-row .fill.proficient { background: var(--tier-proficient); }
.bar-row .val { font-size: 12px; font-weight: 700; text-align: right; }

/* ---------- STACKED BAR ---------- */
.stacked-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--c-panel-2);
}
.stacked-bar .seg { height: 100%; }
.stacked-bar .seg.human { background: var(--c-near-black); }
.stacked-bar .seg.ema { background: var(--c-vama-violet); }
.stacked-bar .seg.vanilla { background: var(--c-magenta); }

/* ---------- KANBAN ---------- */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.kanban-col {
  background: var(--c-panel);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  min-height: 300px;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-tertiary);
  padding: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.kanban-col-header .count {
  background: var(--c-white);
  color: var(--c-text-primary);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
}
.kanban-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-size: 12px;
  cursor: grab;
  transition: all 120ms ease;
}
.kanban-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card .title { font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.kanban-card .meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--c-text-secondary);
}
.assignee-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
}
.assignee-badge.human { background: rgba(31,31,31,0.08); color: var(--c-near-black); }
.assignee-badge.ema { background: rgba(100,57,251,0.1); color: var(--c-vama-violet); }
.assignee-badge.vanilla { background: rgba(210,72,221,0.1); color: var(--c-magenta); }

/* ---------- ROSTER ---------- */
.roster {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.roster-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.roster-row:hover { background: var(--c-panel); }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-panel-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--c-text-secondary);
}
.avatar.gradient { background: var(--brand-gradient); color: var(--c-white); }
.roster-row .name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.roster-row .name .ema-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(100,57,251,0.12);
  color: var(--c-vama-violet);
  vertical-align: middle;
  letter-spacing: 0.06em;
}
.roster-row .sub {
  font-size: 11px;
  color: var(--c-text-secondary);
}
.roster-row .indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- HISTOGRAM ---------- */
.histogram {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding: var(--sp-3) 0;
}
.histogram .hist-bar {
  flex: 1;
  background: var(--c-vama-violet);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 4px;
  transition: all 200ms;
}
.histogram .hist-bar:hover { transform: scaleY(1.02); transform-origin: bottom; }
.hist-x-axis {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--c-text-tertiary);
  font-weight: 600;
  margin-top: 6px;
}

/* ---------- AREA CHART (CSS-only) ---------- */
.area-chart {
  position: relative;
  height: 180px;
  background:
    linear-gradient(to top, var(--c-panel) 1px, transparent 1px) 0 25% / 100% 25% repeat-y,
    linear-gradient(to top, var(--c-panel) 1px, transparent 1px) 0 50% / 100% 25% repeat-y,
    linear-gradient(to top, var(--c-panel) 1px, transparent 1px) 0 75% / 100% 25% repeat-y;
  border-bottom: 1px solid var(--c-border);
}

/* ---------- TIMELINE ---------- */
.timeline { position: relative; padding-left: var(--sp-5); }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 0;
  width: 2px;
  background: var(--c-border);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--sp-4);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-vama-violet);
  border: 2px solid var(--c-white);
  box-shadow: 0 0 0 1px var(--c-vama-violet);
}
.timeline-item.major::before { background: var(--c-amber); box-shadow: 0 0 0 1px var(--c-amber); }
.timeline-item .ts { font-size: 11px; color: var(--c-text-tertiary); font-weight: 600; }
.timeline-item .desc { font-size: 13px; margin-top: 2px; }

/* ---------- EXCEPTION BANNER ---------- */
.banner {
  background: var(--brand-gradient);
  color: var(--c-white);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.banner-meta {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.8;
}
.banner-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.banner-actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.banner .btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: var(--c-white); }
.banner .btn.primary { background: var(--c-white); color: var(--c-near-black); border: none; }

/* ---------- GRID UTILS ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-4); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-4); }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--sp-4); }
.row { display: flex; gap: var(--sp-3); align-items: center; }
.col { display: flex; flex-direction: column; gap: var(--sp-3); }
.spacer { flex: 1; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

/* ---------- TYPO HELPERS ---------- */
.label-caps {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-tertiary);
}
.muted { color: var(--c-text-secondary); }
.tiny { font-size: 11px; }
.huge { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- COMPETENCY WHEEL ---------- */
.competency-wheel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.competency-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}
.competency-ring {
  --val: 80;
  --color: var(--c-vama-violet);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--color) calc(var(--val) * 1%), var(--c-panel-2) 0);
  display: grid; place-items: center;
  position: relative;
  flex-shrink: 0;
}
.competency-ring::after {
  content: "";
  width: 70%; height: 70%;
  background: var(--c-white);
  border-radius: 50%;
  position: absolute;
}
.competency-ring .val {
  position: relative;
  font-size: 11px; font-weight: 700;
}
.competency-item .meta { display: flex; flex-direction: column; gap: 2px; }
.competency-item .name { font-size: 12px; font-weight: 600; }
.competency-item .sub { font-size: 10px; color: var(--c-text-tertiary); }

/* ---------- FOOTER ---------- */
.page-foot {
  margin-top: var(--sp-10);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--c-text-tertiary);
}

/* ---------- ENTRY (cockpit cinematic) ---------- */
.entry-hero {
  background: var(--c-near-black);
  border-radius: var(--r-xl);
  padding: var(--sp-12) var(--sp-10);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}
.entry-hero::before {
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(100,57,251,0.4), transparent 60%);
  top: -200px; right: -200px;
  filter: blur(40px);
}
.entry-hero::after {
  content: "";
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(249,167,65,0.3), transparent 60%);
  bottom: -200px; left: 30%;
  filter: blur(40px);
}
.entry-hero .inner { position: relative; z-index: 1; max-width: 720px; }
.entry-hero .overline {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--sp-4);
}
.entry-hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.entry-hero h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.entry-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  margin-top: var(--sp-5);
  max-width: 600px;
  line-height: 1.5;
}
.entry-hero .row { margin-top: var(--sp-6); gap: var(--sp-3); }

/* Mockup cards on index */
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
.mockup-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: all 200ms ease;
  display: block;
}
.mockup-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.mockup-card .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-vama-violet);
  margin-bottom: var(--sp-3);
}
.mockup-card h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}
.mockup-card p {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-4);
}
.mockup-card .arrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-vama-violet);
}

/* Design system swatches */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-3);
}
.swatch {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-white);
}
.swatch .sw-color { height: 80px; }
.swatch .sw-meta { padding: var(--sp-3); }
.swatch .sw-name { font-size: 12px; font-weight: 700; }
.swatch .sw-hex { font-size: 11px; color: var(--c-text-tertiary); font-family: var(--font-mono); }
