/* ============================================================
   EVA — Component layer
   Requires eva-tokens.css. Class prefix: .ev-
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
@font-face {
  font-family: "Albert Sans";
  src: url("assets/AlbertSans-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900; font-display: swap;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-stack);
  font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--ls-body);
  font-weight: var(--w-regular);
  color: var(--ink); background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: rgba(29,106,74,0.15); }
/* Iconography — Lucide at a fine 1.25 stroke (couture monoline) */
svg.lucide { stroke-width: 1.25px; }

/* ---------- Type utilities ---------- */
.ev-metric-num { font-size: var(--fs-metric); line-height: var(--lh-metric); letter-spacing: var(--ls-metric); font-weight: var(--w-semibold); font-variant-numeric: tabular-nums; }
.ev-title-lg { font-size: var(--fs-title-lg); line-height: var(--lh-title-lg); letter-spacing: var(--ls-title-lg); font-weight: var(--w-semibold); margin: 0; }
.ev-title { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--ls-title); font-weight: var(--w-semibold); margin: 0; }
.ev-headline { font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); font-weight: var(--w-semibold); margin: 0; }
.ev-body { font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--ls-body); margin: 0; }
.ev-footnote { font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--ink-muted); margin: 0; }
.ev-caption { font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption); text-transform: uppercase; font-weight: var(--w-semibold); color: var(--ink-muted); margin: 0; }
.ev-muted { color: var(--ink-muted); }

/* ============================================================
   SHELL
   ============================================================ */
.ev-app {
  display: grid; min-height: 100vh;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-areas: "topbar topbar" "sidebar main";
}
.ev-main { grid-area: main; padding: var(--content-pad); min-width: 0; }

/* ---------- Top bar ---------- */
.ev-topbar {
  grid-area: topbar; position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s-4);
  height: var(--topbar-h); padding: 0 var(--s-4);
  background: var(--shell); color: var(--shell-text);
  border-bottom: 1px solid var(--shell-border);
}
.ev-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: var(--w-semibold); font-size: var(--fs-headline); letter-spacing: 0.02em;
  color: var(--shell-text); padding: 6px 8px; margin-left: -8px; border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease);
}
.ev-logo:hover { background: var(--shell-hover); color: var(--shell-text); }
.ev-logo img { height: 15px; width: auto; border-radius: 0; display: block; }
[data-chrome="light"] .ev-logo img { filter: invert(1); }
.ev-logo .lockup-sep { width: 1px; height: 18px; background: rgba(255,255,255,0.25); }
[data-chrome="light"] .ev-logo .lockup-sep { background: rgba(0,0,0,0.18); }
/* EVA wordmark — option F: E V̲ Λ, green V, crossbar-less A */
.ev-wm {
  font-family: "Albert Sans", var(--font-stack);
  font-weight: 500; font-size: 19px; letter-spacing: 0.30em; margin-right: -0.30em;
  color: var(--shell-text); line-height: 1;
}
.ev-wm .accent { color: var(--accent); }
body:not([data-brand]) .ev-wm .accent { color: var(--brand-travel); }

/* Business-line switcher */
.ev-switcher {
  display: inline-flex; align-items: center; gap: var(--s-2);
  white-space: nowrap; flex: none;
  height: 32px; padding: 0 var(--s-3);
  border-radius: var(--r-full); border: 1px solid rgba(255,255,255,0.18);
  background: transparent; color: var(--shell-text);
  font: inherit; font-size: var(--fs-footnote); font-weight: var(--w-semibold);
  cursor: pointer; transition: background var(--t-fast) var(--ease);
}
[data-chrome="light"] .ev-switcher { border-color: var(--separator); }
.ev-switcher:hover { background: var(--shell-hover); }
.ev-switcher .ev-dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--accent); }
.ev-switcher svg { opacity: 0.55; }

/* Search — pill */
.ev-search {
  display: flex; align-items: center; gap: var(--s-2);
  height: 32px; width: 360px; max-width: 38vw; padding: 0 var(--s-3);
  margin-left: auto;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.10); color: var(--shell-text);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
[data-chrome="light"] .ev-search { background: var(--surface-sunken); }
.ev-search:focus-within { background: rgba(255,255,255,0.16); box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }
[data-chrome="light"] .ev-search:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.15); }
.ev-search svg { opacity: 0.55; flex: none; }
.ev-search input {
  all: unset; flex: 1; font-size: var(--fs-footnote); color: inherit; min-width: 0;
}
.ev-search input::placeholder { color: var(--shell-text-muted); }
.ev-search kbd {
  font-family: inherit; font-size: var(--fs-caption); letter-spacing: 0;
  color: var(--shell-text-muted); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px; padding: 1px 5px;
}
[data-chrome="light"] .ev-search kbd { border-color: var(--separator); }

/* Icon buttons in the chrome */
.ev-chrome-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: transparent; border: none; color: var(--shell-text-muted);
  cursor: pointer; position: relative; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ev-chrome-btn:hover { background: var(--shell-hover); color: var(--shell-text); }
.ev-chrome-btn .ev-notif-dot {
  position: absolute; top: 6px; right: 7px; width: 7px; height: 7px;
  border-radius: var(--r-full); background: var(--status-overdue); border: 1.5px solid var(--shell);
}

/* Avatar */
.ev-avatar {
  width: 32px; height: 32px; border-radius: var(--r-full); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-sunken); color: var(--ink);
  font-size: var(--fs-caption); letter-spacing: 0; font-weight: var(--w-semibold);
  overflow: hidden;
}
.ev-avatar.sm { width: 24px; height: 24px; font-size: 9px; }
.ev-avatar.lg { width: 44px; height: 44px; font-size: var(--fs-footnote); }
.ev-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ev-topbar .ev-avatar { background: rgba(255,255,255,0.14); color: var(--shell-text); cursor: pointer; }
[data-chrome="light"] .ev-topbar .ev-avatar { background: var(--surface-sunken); color: var(--ink); }
.ev-avatar-stack { display: flex; }
.ev-avatar-stack .ev-avatar { border: 2px solid var(--surface); }
.ev-avatar-stack .ev-avatar + .ev-avatar { margin-left: -8px; }

/* ---------- Sidebar ---------- */
.ev-sidebar {
  grid-area: sidebar; position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  background: var(--shell); color: var(--shell-text);
  padding: var(--s-4) var(--s-3); display: flex; flex-direction: column; gap: var(--s-1);
  border-right: 1px solid var(--shell-border);
}
.ev-nav-label {
  font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption);
  text-transform: uppercase; font-weight: var(--w-semibold);
  color: var(--shell-text-muted); padding: var(--s-4) var(--s-3) var(--s-2);
}
.ev-nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  height: 36px; padding: 0 var(--s-3); border-radius: var(--r-md);
  color: var(--shell-text-muted); font-size: var(--fs-body); letter-spacing: var(--ls-body);
  position: relative; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ev-nav-item > span:first-of-type { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ev-nav-item svg { flex: none; opacity: 0.8; }
.ev-nav-item:hover { background: var(--shell-hover); color: var(--shell-text); }
.ev-nav-item.active {
  background: var(--shell-active); color: var(--shell-text); font-weight: var(--w-semibold);
}
.ev-nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 2px 2px 0; background: var(--accent);
}
[data-chrome="light"] .ev-nav-item.active::before { left: -12px; }
.ev-nav-item .ev-count {
  margin-left: auto; font-size: var(--fs-caption); letter-spacing: 0;
  color: var(--shell-text-muted); font-variant-numeric: tabular-nums;
}
.ev-sidebar-footer { margin-top: auto; padding-top: var(--s-4); }

/* ---------- Breadcrumb ---------- */
.ev-breadcrumb {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  font-size: var(--fs-footnote); color: var(--ink-muted); margin-bottom: var(--s-5);
}
.ev-breadcrumb a { color: var(--ink-muted); }
.ev-breadcrumb a:hover { color: var(--ink); }
.ev-breadcrumb .sep { color: var(--ink-faint); user-select: none; }
.ev-breadcrumb .current { color: var(--ink); font-weight: var(--w-semibold); }

/* Page header */
.ev-page-head { display: flex; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-6); }
.ev-page-head .ev-spacer { flex: 1; }

/* ============================================================
   CONTROLS
   ============================================================ */

/* ---------- Buttons ---------- */
.ev-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-4); border-radius: var(--r-md);
  font: inherit; font-size: var(--fs-body); font-weight: var(--w-semibold); letter-spacing: var(--ls-body);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.ev-btn:active { transform: scale(0.98); }
.ev-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.ev-btn svg { flex: none; }

.ev-btn.primary { background: var(--ink); color: #fff; }
.ev-btn.primary:hover { background: #000; }
.ev-btn.secondary { background: var(--surface); color: var(--ink); border-color: rgba(60,50,30,0.12); box-shadow: 0 1px 2px rgba(46,38,20,0.05); }
.ev-btn.secondary:hover { border-color: rgba(60,50,30,0.25); }
.ev-btn.ghost { background: transparent; color: var(--ink); }
.ev-btn.ghost:hover { background: rgba(0,0,0,0.05); }
.ev-btn.destructive { background: transparent; color: var(--status-overdue); border-color: rgba(179,38,30,0.35); }
.ev-btn.destructive:hover { background: var(--status-overdue-fill); border-color: var(--status-overdue); }
.ev-btn.accent { background: var(--accent); color: #fff; }
.ev-btn.accent:hover { filter: brightness(1.1); }

.ev-btn.sm { height: 30px; padding: 0 var(--s-3); font-size: var(--fs-footnote); border-radius: 8px; }
.ev-btn.lg { height: var(--hit-target); padding: 0 var(--s-5); }
.ev-btn.icon { width: 36px; padding: 0; color: var(--ink-muted); }
.ev-btn.icon:hover { color: var(--ink); background: rgba(0,0,0,0.05); }
.ev-btn.icon.sm { width: 30px; }

/* ---------- Inputs ---------- */
.ev-field { display: flex; flex-direction: column; gap: var(--s-2); }
.ev-field label {
  font-size: var(--fs-footnote); font-weight: var(--w-semibold); color: var(--ink);
}
.ev-field .ev-help { font-size: var(--fs-footnote); color: var(--ink-muted); }
.ev-field .ev-error-msg { font-size: var(--fs-footnote); color: var(--status-overdue); }
.ev-input, .ev-select, .ev-textarea {
  font: inherit; font-size: var(--fs-body); letter-spacing: var(--ls-body); color: var(--ink);
  height: 38px; padding: 0 var(--s-3); border-radius: var(--r-md);
  border: 1px solid rgba(60,50,30,0.12); background: var(--surface); width: 100%;
  box-shadow: 0 1px 2px rgba(46,38,20,0.04);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ev-textarea { height: auto; padding: var(--s-2) var(--s-3); resize: vertical; min-height: 80px; }
.ev-input::placeholder, .ev-textarea::placeholder { color: var(--ink-faint); }
.ev-input:hover, .ev-select:hover, .ev-textarea:hover { border-color: rgba(60,50,30,0.25); }
.ev-input:focus, .ev-select:focus, .ev-textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.ev-field.error .ev-input, .ev-field.error .ev-select, .ev-field.error .ev-textarea {
  border-color: var(--status-overdue); box-shadow: 0 0 0 3px rgba(179,38,30,0.08);
}
.ev-input:disabled, .ev-select:disabled, .ev-textarea:disabled {
  background: var(--surface-sunken); color: var(--ink-faint); cursor: default;
}
.ev-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: var(--s-6); cursor: pointer;
}

/* Content-area search pill */
.ev-search-pill {
  display: flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-4); border-radius: var(--r-full);
  border: 1px solid rgba(60,50,30,0.12); background: var(--surface);
  box-shadow: 0 1px 2px rgba(46,38,20,0.04);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ev-search-pill svg { color: var(--ink-faint); flex: none; }
.ev-search-pill input { all: unset; flex: 1; font-size: var(--fs-body); color: var(--ink); min-width: 0; }
.ev-search-pill input::placeholder { color: var(--ink-faint); }
.ev-search-pill:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }

/* ---------- Segmented control ---------- */
.ev-segmented {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface-sunken); border-radius: var(--r-full); padding: 3px;
}
.ev-segmented button {
  font: inherit; font-size: var(--fs-footnote); font-weight: var(--w-semibold);
  color: var(--ink-muted); background: transparent; border: none; cursor: pointer;
  height: 28px; padding: 0 var(--s-4); border-radius: var(--r-full);
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.ev-segmented button:hover { color: var(--ink); }
.ev-segmented button.active { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- Tabs (underline) ---------- */
.ev-tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--separator); }
.ev-tabs button {
  font: inherit; font-size: var(--fs-body); letter-spacing: var(--ls-body);
  color: var(--ink-muted); background: none; border: none; cursor: pointer;
  padding: 0 0 var(--s-3); margin-bottom: -1px; border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ev-tabs button:hover { color: var(--ink); }
.ev-tabs button.active { color: var(--ink); font-weight: var(--w-semibold); border-bottom-color: var(--ink); }

/* ---------- Toggle ---------- */
.ev-toggle { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.ev-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ev-toggle .track {
  position: absolute; inset: 0; border-radius: var(--r-full);
  background: rgba(0,0,0,0.16); cursor: pointer; transition: background var(--t) var(--ease);
}
.ev-toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: var(--r-full); background: #fff; box-shadow: var(--e-1);
  transition: transform var(--t) var(--ease-enter);
}
.ev-toggle input:checked + .track { background: var(--status-live); }
.ev-toggle input:checked + .track::after { transform: translateX(18px); }

/* ---------- Checkbox ---------- */
.ev-check { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; font-size: var(--fs-body); }
.ev-check input { appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1.5px solid rgba(0,0,0,0.3); background: var(--surface); cursor: pointer; display: grid; place-content: center; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); flex: none; }
.ev-check input::after { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform var(--t-fast) var(--ease); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.ev-check input:checked { background: var(--ink); border-color: var(--ink); }
.ev-check input:checked::after { transform: scale(1); }

/* ============================================================
   INDICATORS
   ============================================================ */

/* ---------- Status badge ---------- */
.ev-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 var(--s-2) 0 var(--s-2); border-radius: var(--r-sm);
  font-size: var(--fs-footnote); font-weight: var(--w-semibold); white-space: nowrap;
}
.ev-badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-full); background: currentColor; }
.ev-badge.live    { color: var(--status-live); background: var(--status-live-fill); }
.ev-badge.pending { color: var(--status-pending); background: var(--status-pending-fill); }
.ev-badge.info    { color: var(--status-info); background: var(--status-info-fill); }
.ev-badge.overdue { color: var(--status-overdue); background: var(--status-overdue-fill); }
.ev-badge.closed  { color: var(--status-closed); background: var(--status-closed-fill); }
/* quiet variant: dot + text, no fill (for dense tables) */
.ev-badge.quiet { background: transparent; padding: 0; height: auto; }

/* Brand badge */
.ev-brand-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-footnote); font-weight: var(--w-semibold); color: var(--ink);
}
.ev-brand-badge::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* ---------- Delta ---------- */
.ev-delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-footnote); font-weight: var(--w-semibold); font-variant-numeric: tabular-nums; }
.ev-delta.up { color: var(--delta-up); }
.ev-delta.down { color: var(--delta-down); }
.ev-delta.flat { color: var(--ink-muted); font-weight: var(--w-regular); }

/* Soft tints — subtle colour for icon chips & avatars */
.tint-green  { background: var(--status-live-fill) !important;    color: var(--status-live) !important; }
.tint-amber  { background: var(--status-pending-fill) !important; color: var(--status-pending) !important; }
.tint-blue   { background: var(--status-info-fill) !important;    color: var(--status-info) !important; }
.tint-violet { background: #EFEDF8 !important;                    color: var(--brand-elkemist) !important; }
.tint-coral  { background: #F9EDE6 !important;                    color: var(--brand-events) !important; }
.tint-forest { background: #E9F0EC !important;                    color: var(--brand-travel) !important; }

/* ============================================================
   CONTAINERS
   ============================================================ */

.ev-card {
  background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--e-1);
}
.ev-card.pad { padding: var(--s-5); }
.ev-card-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--separator);
}
.ev-card-head .ev-spacer { flex: 1; }

/* ---------- Metric card ---------- */
.ev-metric {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--e-1); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3);
}
.ev-metric .head { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-muted); font-size: var(--fs-footnote); font-weight: var(--w-semibold); }
.ev-metric .head .icon-chip {
  width: 32px; height: 32px; border-radius: var(--r-full); flex: none;
  display: grid; place-content: center;
  background: transparent !important;
  border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
}
.ev-metric .head svg { color: inherit; }
.ev-metric .foot { font-size: var(--fs-footnote); color: var(--ink-muted); display: flex; align-items: center; gap: var(--s-2); }

/* ---------- Table ---------- */
.ev-table-wrap { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e-1); overflow: hidden; }
.ev-table-toolbar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); flex-wrap: wrap; }
.ev-table-toolbar .ev-spacer { flex: 1; }
table.ev-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.ev-table th {
  text-align: left; font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption);
  text-transform: uppercase; font-weight: var(--w-semibold); color: var(--ink-muted);
  padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--separator);
  background: var(--surface-sunken); white-space: nowrap;
}
.ev-table td { padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--separator); vertical-align: middle; }
.ev-table tr:last-child td { border-bottom: none; }
.ev-table tbody tr { transition: background var(--t-fast) var(--ease); cursor: pointer; }
.ev-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.ev-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ev-table .ev-cell-person { display: flex; align-items: center; gap: var(--s-3); }
.ev-table .ev-cell-person .name { font-weight: var(--w-semibold); }
.ev-table .ev-cell-person .sub { font-size: var(--fs-footnote); color: var(--ink-muted); }

/* ---------- List rows (activity feed) ---------- */
.ev-list { display: flex; flex-direction: column; }
.ev-list-row {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-5); min-height: 56px;
  border-bottom: 1px solid var(--separator);
  transition: background var(--t-fast) var(--ease); cursor: pointer;
}
.ev-list-row:last-child { border-bottom: none; }
.ev-list-row:hover { background: rgba(0,0,0,0.02); }
.ev-list-row .grow { flex: 1; min-width: 0; }
.ev-list-row .when { font-size: var(--fs-footnote); color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Pipeline stepper ---------- */
.ev-stepper { display: flex; align-items: center; gap: var(--s-2); }
.ev-step { display: flex; align-items: center; gap: var(--s-2); }
.ev-step .pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 var(--s-3); border-radius: var(--r-full);
  font-size: var(--fs-footnote); font-weight: var(--w-semibold);
  color: var(--ink-muted); background: var(--surface-sunken);
}
.ev-step.done .pill { color: var(--ink); background: transparent; border: 1px solid var(--separator); }
.ev-step.done .pill::before {
  content: ""; width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ev-step.current .pill { color: #fff; background: var(--ink); }
.ev-step .connector { width: 20px; height: 1px; background: var(--separator); }

/* ============================================================
   FEEDBACK
   ============================================================ */

/* ---------- Empty state ---------- */
.ev-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-2); text-align: center; padding: var(--s-8) var(--s-5);
}
.ev-empty .glyph {
  width: 48px; height: 48px; border-radius: var(--r-lg); background: var(--surface-sunken);
  display: grid; place-content: center; color: var(--ink-faint); margin-bottom: var(--s-2);
}
.ev-empty .ev-headline { color: var(--ink); }
.ev-empty .ev-footnote { max-width: 340px; }
.ev-empty .ev-btn { margin-top: var(--s-3); }

/* ---------- Skeleton ---------- */
@keyframes ev-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ev-skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-sunken) 25%, #ECECEE 50%, var(--surface-sunken) 75%);
  background-size: 200% 100%; animation: ev-shimmer 1.6s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .ev-skeleton { animation: none; } }
.ev-skeleton.text { height: 14px; }
.ev-skeleton.title { height: 22px; width: 40%; }
.ev-skeleton.circle { border-radius: var(--r-full); }

/* ---------- Toast ---------- */
.ev-toast {
  display: inline-flex; align-items: center; gap: var(--s-3);
  background: var(--shell); color: var(--shell-text);
  border-radius: var(--r-xl); padding: var(--s-3) var(--s-4); box-shadow: var(--e-3);
  font-size: var(--fs-body);
}
[data-chrome="light"] .ev-toast { background: #16161A; color: rgba(255,255,255,0.92); }
.ev-toast svg { color: #6ECF97; flex: none; }
.ev-toast .action { color: #8AB4F8; font-weight: var(--w-semibold); cursor: pointer; margin-left: var(--s-2); }

/* ============================================================
   PRODUCT CARD (Hosted Experiences)
   ============================================================ */
.ev-product-card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--e-1); overflow: hidden; cursor: pointer;
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.ev-product-card:hover { box-shadow: var(--e-2); transform: translateY(-2px); }
.ev-product-card .photo {
  aspect-ratio: 3 / 2; background: var(--surface-sunken); position: relative;
  display: grid; place-content: center; color: var(--ink-faint); overflow: hidden;
}
.ev-product-card .photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ev-product-card .photo .ev-badge { position: absolute; top: var(--s-3); left: var(--s-3); background: rgba(255,255,255,0.92); }
.ev-product-card .body { padding: var(--s-4) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.ev-product-card .meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-footnote); color: var(--ink-muted); }
.ev-product-card .meta .sep { color: var(--ink-faint); }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.ev-grid { display: grid; gap: var(--s-5); }
.ev-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.ev-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.ev-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.ev-row { display: flex; align-items: center; gap: var(--s-3); }
.ev-row .ev-spacer { flex: 1; }
.ev-stack { display: flex; flex-direction: column; gap: var(--s-5); }
.ev-section-gap { margin-top: var(--s-8); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablet: sidebar collapses to an icon rail */
@media (max-width: 1024px) {
  .ev-app { grid-template-columns: var(--sidebar-w-rail) 1fr; }
  .ev-sidebar { padding: var(--s-4) var(--s-2); align-items: center; }
  .ev-sidebar .ev-nav-item span, .ev-sidebar .ev-nav-item .ev-count, .ev-nav-label { display: none; }
  .ev-nav-item { width: 40px; justify-content: center; padding: 0; }
  .ev-nav-item.active::before { left: -8px; }
  .ev-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .ev-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile: sidebar hides; content stacks */
@media (max-width: 640px) {
  .ev-app { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .ev-sidebar { display: none; }
  .ev-search { display: none; }
  .ev-main { padding: var(--s-4); }
  .ev-grid.cols-4, .ev-grid.cols-3, .ev-grid.cols-2 { grid-template-columns: 1fr; }
  .ev-hamburger { display: inline-flex !important; }
}
.ev-hamburger { display: none; }

/* ============================================================
   SIDEBAR BEHAVIOURS — favourites, drag-reorder, collapse
   (wired by eva-nav.js)
   ============================================================ */
.ev-main { background: var(--canvas); animation: evPageIn 850ms var(--ease-enter) both; }
@keyframes evPageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes evPageFade { from { opacity: 0; } to { opacity: 1; } }
/* repeat views in a session: instant, gentle cross-fade only */
html[data-nav-warm] .ev-main { animation: evPageFade 200ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .ev-main { animation: none; } }

/* ── Smooth cross-page navigation (View Transitions API — Chromium) ──
   Full-document cross-fade + gentle rise between pages, so moving around
   the OS feels continuous instead of a hard reload. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: evVtOut 240ms var(--ease) both; }
::view-transition-new(root) { animation: evVtIn 440ms var(--ease-enter) both; }
@keyframes evVtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes evVtIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* where View Transitions run, let them own the motion (no double-fade on .ev-main) */
@supports (view-transition-name: none) {
  html[data-nav-warm] .ev-main { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.ev-nav-star {
  margin-left: auto; font-size: 12px; line-height: 1; color: var(--shell-text-muted);
  opacity: 0; flex: none; cursor: pointer; padding: 2px 4px; border-radius: 4px;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ev-nav-item:hover .ev-nav-star { opacity: 0.6; }
.ev-nav-star:hover { opacity: 1 !important; }
.ev-nav-star.faved { opacity: 0.85; color: #C9A86B; }
.ev-nav-item .ev-count + .ev-nav-star { margin-left: var(--s-2); }
.ev-nav-item.nav-dragging { opacity: 0.4; }
.ev-fav-block { display: flex; flex-direction: column; gap: var(--s-1); }
.ev-nav-collapse { margin-top: var(--s-1); }
.ev-nav-collapse svg { transition: transform var(--t) var(--ease); }
body.nav-collapsed .ev-nav-collapse svg { transform: rotate(180deg); }
body.nav-collapsed .ev-app { grid-template-columns: var(--sidebar-w-rail) 1fr; }
body.nav-collapsed .ev-sidebar { padding: var(--s-4) var(--s-2); align-items: center; }
body.nav-collapsed .ev-sidebar .ev-nav-item span,
body.nav-collapsed .ev-sidebar .ev-nav-item .ev-count,
body.nav-collapsed .ev-sidebar .ev-nav-star,
body.nav-collapsed .ev-nav-label { display: none; }
body.nav-collapsed .ev-nav-item { width: 40px; justify-content: center; padding: 0; }
body.nav-collapsed .ev-nav-item.active::before { left: -8px; }

/* ---------- embedded mode (tool inside a workspace iframe) ---------- */
html[data-embedded] .ev-topbar, html[data-embedded] .ev-sidebar,
html[data-embedded] .ev-breadcrumb { display: none !important; }
html[data-embedded] .ev-app { display: block; }
html[data-embedded] .ev-main { padding: var(--s-4) var(--s-5); animation: none; }
html[data-embedded] .tabs, html[data-embedded] .os-tabs { top: 0; }
