/* ============================================================
   APPENDIX A — tokens.css  (canonical, dark default :root)
   ============================================================ */
:root{
  /* brand */
  --color-brand:#3A5BFF; --color-brand-hover:#2E49E0; --color-brand-active:#2238C2;
  --color-brand-subtle:rgba(58,91,255,.14); --color-iris:#7C5CFF;
  --color-accent:#FF6A1A; --color-accent-hover:#E85C12; --color-accent-subtle:rgba(255,106,26,.14);
  --gradient-brand:linear-gradient(135deg,#3A5BFF 0%,#7C5CFF 100%);
  /* surfaces (dark default) */
  --bg:#0C0D14; --surface-1:#14151F; --surface-2:#1C1E2B; --surface-3:#262839;
  --surface-inset:#0A0B11; --overlay-scrim:rgba(8,9,14,.64);
  --border-subtle:rgba(255,255,255,.08); --border-default:rgba(255,255,255,.12); --border-strong:rgba(255,255,255,.18);
  /* text */
  --text-primary:#F4F5FA; --text-secondary:#A7AABC; --text-tertiary:#71748A; --text-disabled:#4C4F61;
  --text-on-brand:#FFFFFF; --text-on-accent:#160A03;
  /* status */
  --success:#1FBF75; --success-subtle:rgba(31,191,117,.14); --on-success:#04130C;
  --warning:#FFB020; --warning-subtle:rgba(255,176,32,.14); --on-warning:#1A1200;
  --danger:#FF4D5E;  --danger-subtle:rgba(255,77,94,.14);   --on-danger:#FFFFFF;
  --info:#3A5BFF;    --info-subtle:rgba(58,91,255,.14);
  /* category */
  --cat-1:#3A5BFF; --cat-2:#7C5CFF; --cat-3:#FF6A1A; --cat-4:#1FBF75;
  --cat-5:#FF4D8B; --cat-6:#15C2C2; --cat-7:#FFB020; --cat-8:#B45CFF;
  /* health */
  --health-ok:#1FBF75; --health-watch:#FFB020; --health-risk:#FF8A1A; --health-crit:#FF4D5E;
  /* phase colors (project phase rainbow — 10 hues for color-coding) */
  --phase-1:#6366F1; --phase-2:#8B5CF6; --phase-3:#EC4899; --phase-4:#F43F5E; --phase-5:#F97316;
  --phase-6:#EAB308; --phase-7:#22C55E; --phase-8:#14B8A6; --phase-9:#06B6D4; --phase-10:#3B82F6;
  /* type */
  --font-display:"Clash Display","Satoshi",system-ui,sans-serif;
  --font-sans:"Satoshi","Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-mono:"Geist Mono","JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --text-2xs:.6875rem; --text-xs:.75rem; --text-sm:.875rem; --text-base:1rem; --text-lg:1.125rem;
  --text-xl:1.375rem; --text-2xl:1.75rem; --text-3xl:2.25rem; --text-4xl:3rem; --text-5xl:3.75rem;
  /* space */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px;
  --space-8:32px; --space-10:40px; --space-12:48px; --space-16:64px; --space-20:80px; --space-24:96px; --space-32:128px;
  /* radius */
  --radius-xs:6px; --radius-sm:8px; --radius-input:10px; --radius-button:10px; --radius-md:12px;
  --radius-card:16px; --radius-lg:16px; --radius-xl:24px; --radius-pill:999px;
  /* elevation */
  --shadow-sm:0 1px 2px rgba(0,0,0,.40); --shadow-md:0 4px 16px rgba(0,0,0,.45);
  --shadow-lg:0 12px 40px rgba(0,0,0,.55);
  --shadow-glow:0 0 0 1px rgba(58,91,255,.40),0 8px 30px rgba(58,91,255,.25);
  /* motion */
  --ease-standard:cubic-bezier(.2,0,0,1); --ease-decelerate:cubic-bezier(0,0,0,1);
  --ease-accelerate:cubic-bezier(.3,0,1,1); --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --dur-instant:80ms; --dur-fast:140ms; --dur-base:200ms; --dur-slow:300ms; --dur-slower:450ms;
  /* z + icon */
  --z-sticky:100; --z-sidebar:200; --z-dropdown:300; --z-drawer:400; --z-modal:500;
  --z-toast:600; --z-command:700; --z-tooltip:800;
  --icon-sm:16px; --icon-md:20px; --icon-lg:24px; --icon-xl:32px;
}
[data-theme="light"]{
  --bg:#FBFBFD; --surface-1:#FFFFFF; --surface-2:#F5F6FA; --surface-3:#EDEFF5;
  --surface-inset:#F0F1F6; --overlay-scrim:rgba(12,13,20,.40);
  --border-subtle:rgba(12,13,20,.08); --border-default:rgba(12,13,20,.12); --border-strong:rgba(12,13,20,.18);
  --text-primary:#14151F; --text-secondary:#565973; --text-tertiary:#8A8DA3; --text-disabled:#B4B7C6;
  --shadow-sm:0 1px 2px rgba(12,13,20,.08); --shadow-md:0 4px 16px rgba(12,13,20,.10);
  --shadow-lg:0 12px 40px rgba(12,13,20,.14);
  --shadow-glow:0 0 0 1px rgba(58,91,255,.40),0 8px 30px rgba(58,91,255,.18);
}
[data-skin="portal"]{ --color-accent:var(--color-brand); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms!important; transition-duration:.01ms!important; }
}

/* ============================================================
   APPENDIX B — Base + component CSS (extended)
   ============================================================ */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{ background:var(--bg); color:var(--text-primary); font-family:var(--font-sans);
  font-size:var(--text-base); line-height:1.55; -webkit-font-smoothing:antialiased;
  transition:background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard); }
.num{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
h1,h2{ font-family:var(--font-display); letter-spacing:-.02em; line-height:1.15; margin:0; }
h3,h4{ margin:0; }
a{ color:var(--color-brand); text-decoration:none; }
:focus-visible{ outline:2px solid var(--color-brand); outline-offset:2px; border-radius:var(--radius-xs); }
svg.ico{ width:1em; height:1em; display:inline-block; flex:none; vertical-align:-.125em; }

/* skip link */
.skip{ position:absolute; left:var(--space-4); top:-60px; background:var(--color-brand); color:#fff;
  padding:var(--space-2) var(--space-4); border-radius:var(--radius-sm); z-index:999;
  transition:top var(--dur-fast); }
.skip:focus{ top:var(--space-4); }

/* ---------- App shell ---------- */
.app{ display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.sidebar{ background:var(--surface-1); border-right:1px solid var(--border-subtle);
  position:sticky; top:0; height:100vh; z-index:var(--z-sidebar); display:flex; flex-direction:column;
  padding:var(--space-4); gap:var(--space-2); overflow-y:auto; }
.brand-row{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2) var(--space-2) var(--space-4); }
.brand-mark{ width:34px; height:34px; border-radius:var(--radius-sm); background:var(--gradient-brand);
  display:grid; place-items:center; color:#fff; font-family:var(--font-display); font-weight:700; font-size:18px;
  box-shadow:var(--shadow-glow); }
.brand-name{ font-family:var(--font-display); font-weight:600; font-size:var(--text-lg); letter-spacing:-.01em; }
.brand-name span{ color:var(--text-tertiary); font-weight:500; font-size:var(--text-2xs); display:block; letter-spacing:.04em; text-transform:uppercase; }
.org-switch{ display:flex; align-items:center; gap:var(--space-2); height:40px; padding:0 var(--space-3);
  background:var(--surface-2); border:1px solid var(--border-default); border-radius:var(--radius-sm);
  cursor:pointer; color:var(--text-primary); font-size:var(--text-sm); font-weight:500; width:100%; }
.org-switch .av{ width:22px; height:22px; font-size:11px; }
.org-switch .ico:last-child{ margin-left:auto; color:var(--text-tertiary); }
.kbar{ display:flex; align-items:center; gap:var(--space-2); height:36px; padding:0 var(--space-3);
  background:var(--surface-inset); border:1px solid var(--border-default); border-radius:var(--radius-sm);
  color:var(--text-tertiary); font-size:var(--text-sm); cursor:text; width:100%; }
.kbar .kbd{ margin-left:auto; }
.kbd{ font-family:var(--font-mono); font-size:var(--text-2xs); color:var(--text-secondary);
  background:var(--surface-3); border:1px solid var(--border-default); border-radius:var(--radius-xs);
  padding:1px 6px; }
.nav-group-label{ font-size:var(--text-2xs); font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-tertiary); padding:var(--space-4) var(--space-3) var(--space-2); }
.nav-item{ display:flex; align-items:center; gap:var(--space-3); height:40px; padding:0 var(--space-3);
  border-radius:var(--radius-sm); color:var(--text-secondary); cursor:pointer; font-size:var(--text-sm);
  font-weight:500; transition:background var(--dur-fast) var(--ease-standard), color var(--dur-fast); position:relative; }
.nav-item .ico{ font-size:var(--icon-lg); }
.nav-item:hover{ background:var(--surface-2); color:var(--text-primary); }
.nav-item--active{ background:var(--color-brand-subtle); color:var(--color-brand);
  box-shadow:inset 2px 0 0 var(--color-brand); }
.nav-item .badge{ margin-left:auto; }
.sidebar-foot{ margin-top:auto; display:flex; flex-direction:column; gap:var(--space-3); padding-top:var(--space-4); }

/* sidebar timer widget */
.timerw{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3);
  background:var(--surface-2); border:1px solid var(--border-default); border-radius:var(--radius-md); }
.timerw .dot{ width:8px; height:8px; border-radius:50%; background:var(--color-brand); flex:none;
  box-shadow:0 0 0 4px var(--color-brand-subtle); }
.timerw.running .dot{ animation:pulse 1.6s var(--ease-standard) infinite; }
.timerw .tt{ display:flex; flex-direction:column; min-width:0; }
.timerw .tt b{ font-family:var(--font-mono); font-size:var(--text-sm); letter-spacing:.02em; }
.timerw .tt small{ color:var(--text-tertiary); font-size:var(--text-2xs); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; }
.timerw .stop{ margin-left:auto; width:28px; height:28px; border-radius:var(--radius-xs); border:none;
  background:var(--color-brand); color:#fff; cursor:pointer; display:grid; place-items:center; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.35;} }
@keyframes pulseAmber{ 0%,100%{box-shadow:0 0 0 0 var(--warning-subtle);} 50%{box-shadow:0 0 0 6px var(--warning-subtle);} }

.user-foot{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2);
  border-radius:var(--radius-sm); cursor:pointer; }
.user-foot:hover{ background:var(--surface-2); }
.user-foot .meta{ display:flex; flex-direction:column; min-width:0; }
.user-foot .meta b{ font-size:var(--text-sm); }
.user-foot .meta small{ color:var(--text-tertiary); font-size:var(--text-2xs); }
.user-foot .ico:last-child{ margin-left:auto; color:var(--text-tertiary); }

/* ---------- Topbar + main ---------- */
.main{ min-width:0; }
.topbar{ position:sticky; top:0; z-index:var(--z-sticky); height:64px; background:color-mix(in srgb,var(--bg) 82%, transparent);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--border-subtle);
  display:flex; align-items:center; gap:var(--space-4); padding:0 var(--space-8); }
.topbar .crumbs{ display:flex; align-items:center; gap:var(--space-2); font-size:var(--text-sm); color:var(--text-tertiary); }
.topbar .crumbs .ico{ font-size:var(--icon-sm); }
.topbar .crumbs .cur{ color:var(--text-primary); font-weight:500; }
.topbar .spacer{ flex:1; }
.icon-btn{ width:40px; height:40px; border-radius:var(--radius-sm); border:1px solid var(--border-default);
  background:var(--surface-1); color:var(--text-secondary); cursor:pointer; display:grid; place-items:center;
  font-size:var(--icon-md); position:relative; transition:background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.icon-btn:hover{ background:var(--surface-2); color:var(--text-primary); border-color:var(--border-strong); }
.icon-btn .nub{ position:absolute; top:7px; right:8px; width:8px; height:8px; border-radius:50%;
  background:var(--color-brand); border:2px solid var(--surface-1); }
.kmini{ display:flex; align-items:center; gap:var(--space-2); height:40px; padding:0 var(--space-3);
  background:var(--surface-1); border:1px solid var(--border-default); border-radius:var(--radius-sm);
  color:var(--text-tertiary); font-size:var(--text-sm); cursor:text; }
.kmini:hover{ border-color:var(--border-strong); }

.content{ max-width:1200px; margin:0 auto; padding:var(--space-8); }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-6); margin-bottom:var(--space-8); flex-wrap:wrap; }
.page-title{ font-size:var(--text-2xl); font-weight:600; font-family:var(--font-display); }
.page-sub{ color:var(--text-secondary); font-size:var(--text-sm); margin-top:var(--space-2); max-width:60ch; }

/* section scaffolding for the gallery */
.sec{ margin-bottom:var(--space-16); scroll-margin-top:80px; }
.sec-head{ display:flex; align-items:baseline; gap:var(--space-3); margin-bottom:var(--space-5);
  padding-bottom:var(--space-3); border-bottom:1px solid var(--border-subtle); }
.sec-num{ font-family:var(--font-mono); font-size:var(--text-xs); color:var(--color-brand);
  background:var(--color-brand-subtle); padding:2px 8px; border-radius:var(--radius-pill); }
.sec-title{ font-size:var(--text-xl); font-weight:600; font-family:var(--font-display); letter-spacing:-.01em; }
.sec-note{ color:var(--text-tertiary); font-size:var(--text-sm); margin-left:auto; }
.eyebrow{ font-size:var(--text-2xs); font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-tertiary); margin:var(--space-6) 0 var(--space-3); }
.eyebrow:first-child{ margin-top:0; }
.row{ display:flex; flex-wrap:wrap; gap:var(--space-3); align-items:center; }
.row.tight{ gap:var(--space-2); }
.grid{ display:grid; gap:var(--space-6); }
.cols-2{ grid-template-columns:repeat(2,1fr); }
.cols-3{ grid-template-columns:repeat(3,1fr); }
.cols-auto{ grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); }
@media(max-width:900px){ .cols-2,.cols-3{ grid-template-columns:1fr; } }

/* ---------- Buttons (5.1) ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); height:40px; padding:0 var(--space-4);
  border-radius:var(--radius-button); font:500 var(--text-sm)/1 var(--font-sans); cursor:pointer;
  border:1px solid transparent; white-space:nowrap;
  transition:background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast), color var(--dur-fast); }
.btn .ico{ font-size:var(--icon-md); }
.btn--primary{ background:var(--color-brand); color:var(--text-on-brand); }
.btn--primary:hover{ background:var(--color-brand-hover); }
.btn--primary:active{ background:var(--color-brand-active); }
.btn--secondary{ background:var(--surface-2); color:var(--text-primary); border-color:var(--border-default); }
.btn--secondary:hover{ border-color:var(--border-strong); }
.btn--ghost{ background:transparent; color:var(--text-secondary); }
.btn--ghost:hover{ background:var(--surface-2); color:var(--text-primary); }
.btn--danger{ background:var(--danger); color:var(--on-danger); }
.btn--danger:hover{ filter:brightness(.94); }
.btn--accent{ background:var(--color-accent); color:var(--text-on-accent); }
.btn--accent:hover{ background:var(--color-accent-hover); }
.btn--link{ background:transparent; color:var(--color-brand); height:auto; padding:0; border:none; }
.btn--link:hover{ text-decoration:underline; }
.btn--sm{ height:32px; font-size:var(--text-sm); padding:0 var(--space-3); }
.btn--sm .ico{ font-size:var(--icon-sm); }
.btn--lg{ height:48px; font-size:var(--text-base); padding:0 var(--space-5); }
.btn--block{ width:100%; }
.btn[disabled],.btn.is-disabled{ opacity:.45; pointer-events:none; }
.btn.is-loading{ position:relative; color:transparent !important; pointer-events:none; }
.btn.is-loading .spin{ position:absolute; inset:0; margin:auto; }
.spin{ width:16px; height:16px; border-radius:50%; border:2px solid currentColor; border-top-color:transparent;
  animation:spin .7s linear infinite; display:inline-block; }
.btn--primary.is-loading .spin,.btn--accent.is-loading .spin,.btn--danger.is-loading .spin{ border-color:#fff; border-top-color:transparent; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---------- Inputs (5.2) ---------- */
.field{ display:flex; flex-direction:column; gap:var(--space-2); }
.field__label{ font:500 var(--text-xs)/1.2 var(--font-sans); color:var(--text-secondary); }
.field__label .req{ color:var(--danger); margin-left:2px; }
.input{ height:40px; padding:0 var(--space-3); background:var(--surface-inset); color:var(--text-primary);
  border:1px solid var(--border-default); border-radius:var(--radius-input); font-size:var(--text-sm);
  font-family:var(--font-sans); transition:border-color var(--dur-fast), box-shadow var(--dur-fast); width:100%; }
.input::placeholder{ color:var(--text-tertiary); }
.input:hover{ border-color:var(--border-strong); }
.input:focus{ border-color:var(--color-brand); box-shadow:var(--shadow-glow); outline:none; }
.input[aria-invalid="true"]{ border-color:var(--danger); }
textarea.input{ height:auto; min-height:88px; padding:var(--space-3); resize:vertical; line-height:1.5; }
.input[readonly]{ border-color:transparent; background:transparent; padding-left:0; }
.input:disabled{ opacity:.5; cursor:not-allowed; }
.field__help{ font-size:var(--text-xs); color:var(--text-tertiary); }
.field__error{ font-size:var(--text-xs); color:var(--danger); display:flex; align-items:center; gap:6px; }
.input-wrap{ position:relative; display:flex; align-items:center; }
.input-wrap .lead{ position:absolute; left:var(--space-3); color:var(--text-tertiary); font-size:var(--icon-md); pointer-events:none; }
.input-wrap .lead + .input{ padding-left:38px; }
.input-currency{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; text-align:right; padding-right:62px; }
.cur-chip{ position:absolute; right:var(--space-2); font-family:var(--font-mono); font-size:var(--text-xs);
  color:var(--text-secondary); background:var(--surface-3); border:1px solid var(--border-default);
  border-radius:var(--radius-xs); padding:2px 6px; }

/* ---------- Select / combobox (5.3) ---------- */
.select{ position:relative; }
.select__trigger{ display:flex; align-items:center; gap:var(--space-2); height:40px; padding:0 var(--space-3);
  background:var(--surface-inset); border:1px solid var(--border-default); border-radius:var(--radius-input);
  color:var(--text-primary); font-size:var(--text-sm); cursor:pointer; width:100%; transition:border-color var(--dur-fast); }
.select__trigger:hover{ border-color:var(--border-strong); }
.select.open .select__trigger{ border-color:var(--color-brand); box-shadow:var(--shadow-glow); }
.select__trigger .ph{ color:var(--text-tertiary); }
.select__trigger .ico{ margin-left:auto; color:var(--text-tertiary); font-size:var(--icon-md); transition:transform var(--dur-fast); }
.select.open .select__trigger .ico{ transform:rotate(180deg); }
.select__menu{ position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--surface-2);
  box-shadow:var(--shadow-md); border:1px solid var(--border-subtle); border-radius:var(--radius-md);
  z-index:var(--z-dropdown); padding:var(--space-1); display:none; max-height:260px; overflow:auto; }
.select.open .select__menu{ display:block; animation:popIn var(--dur-fast) var(--ease-standard); }
@keyframes popIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.opt{ display:flex; align-items:center; gap:var(--space-2); height:36px; padding:0 var(--space-3);
  border-radius:var(--radius-xs); cursor:pointer; font-size:var(--text-sm); color:var(--text-primary); }
.opt:hover{ background:var(--surface-3); }
.opt.sel{ background:var(--color-brand-subtle); color:var(--color-brand); }
.opt .ico{ margin-left:auto; font-size:var(--icon-sm); opacity:0; }
.opt.sel .ico{ opacity:1; }
.opt .dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.chips{ display:flex; flex-wrap:wrap; gap:6px; }

/* ---------- Checkbox / radio / toggle (5.4) ---------- */
.ctl{ display:inline-flex; align-items:center; gap:var(--space-3); cursor:pointer; font-size:var(--text-sm); color:var(--text-primary); }
.ctl input{ position:absolute; opacity:0; width:0; height:0; }
.box,.circle{ width:18px; height:18px; border:1.5px solid var(--border-strong); flex:none;
  display:grid; place-items:center; transition:background var(--dur-fast), border-color var(--dur-fast); }
.box{ border-radius:var(--radius-xs); }
.circle{ border-radius:50%; }
.box .ico{ font-size:13px; color:#fff; opacity:0; transform:scale(.6); transition:opacity var(--dur-fast), transform var(--dur-fast); }
.circle .pip{ width:8px; height:8px; border-radius:50%; background:#fff; opacity:0; transform:scale(.5); transition:opacity var(--dur-fast), transform var(--dur-fast); }
.ctl input:checked + .box{ background:var(--color-brand); border-color:var(--color-brand); }
.ctl input:checked + .box .ico{ opacity:1; transform:none; }
.ctl input:checked + .circle{ background:var(--color-brand); border-color:var(--color-brand); }
.ctl input:checked + .circle .pip{ opacity:1; transform:none; }
.ctl input:focus-visible + .box,.ctl input:focus-visible + .circle,.ctl input:focus-visible + .track{ outline:2px solid var(--color-brand); outline-offset:2px; }
.track{ width:36px; height:20px; border-radius:var(--radius-pill); background:var(--surface-3);
  border:1px solid var(--border-default); position:relative; flex:none; transition:background var(--dur-base) var(--ease-standard); }
.track::after{ content:""; position:absolute; top:1px; left:1px; width:16px; height:16px; border-radius:50%;
  background:#fff; box-shadow:var(--shadow-sm); transition:transform var(--dur-base) var(--ease-spring); }
.ctl input:checked + .track{ background:var(--color-brand); border-color:var(--color-brand); }
.ctl input:checked + .track::after{ transform:translateX(16px); }
.ctl.is-disabled{ opacity:.45; pointer-events:none; }
fieldset.group{ border:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--space-3); }
fieldset.group legend{ font:500 var(--text-xs)/1 var(--font-sans); color:var(--text-secondary); padding:0; margin-bottom:var(--space-1); }

/* ---------- Cards (5.6) ---------- */
.card{ background:var(--surface-1); border:1px solid var(--border-subtle); border-radius:var(--radius-card);
  padding:var(--space-6); box-shadow:var(--shadow-sm); }
.card--2{ background:var(--surface-2); }
.card__head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-4); }
.card__title{ font-size:var(--text-lg); font-weight:500; }
.card--interactive{ cursor:pointer; transition:transform var(--dur-fast) var(--ease-standard), border-color var(--dur-fast), box-shadow var(--dur-fast); }
.card--interactive:hover{ transform:translateY(-2px); border-color:var(--border-default); box-shadow:var(--shadow-md); }
.metric{ display:flex; flex-direction:column; gap:var(--space-2); }
.metric .label{ font-size:var(--text-xs); color:var(--text-tertiary); display:flex; align-items:center; gap:6px; text-transform:uppercase; letter-spacing:.04em; }
.metric .big{ font-family:var(--font-display); font-size:var(--text-3xl); font-weight:700; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums; }
.metric .big.mono{ font-family:var(--font-mono); font-weight:600; }
.metric .delta{ font-size:var(--text-xs); display:inline-flex; align-items:center; gap:4px; font-weight:500; }
.metric .delta.up{ color:var(--success); }
.metric .delta.down{ color:var(--danger); }

/* ---------- Table + scope tree (5.7) ---------- */
.table-wrap{ border:1px solid var(--border-subtle); border-radius:var(--radius-card); overflow:hidden; background:var(--surface-1); }
table.tbl{ width:100%; border-collapse:collapse; font-size:var(--text-sm); }
.tbl thead th{ text-align:left; font-size:var(--text-xs); font-weight:500; text-transform:uppercase; letter-spacing:.04em;
  color:var(--text-tertiary); padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--border-subtle);
  background:var(--surface-2); position:sticky; top:0; }
.tbl tbody td{ padding:var(--space-4); border-bottom:1px solid var(--border-subtle); height:52px; }
.tbl tbody tr:last-child td{ border-bottom:none; }
.tbl tbody tr{ transition:background var(--dur-fast); }
.tbl tbody tr:hover{ background:var(--surface-2); }
.tbl tbody tr.sel{ background:var(--color-brand-subtle); }
.tbl .right{ text-align:right; }
.tbl .amt{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
.cell-client{ display:flex; align-items:center; gap:var(--space-3); }
.row-actions{ display:flex; gap:var(--space-1); opacity:0; transition:opacity var(--dur-fast); justify-content:flex-end; }
.tbl tbody tr:hover .row-actions{ opacity:1; }
.mini-act{ width:28px; height:28px; border:none; background:transparent; color:var(--text-tertiary);
  border-radius:var(--radius-xs); cursor:pointer; display:grid; place-items:center; font-size:var(--icon-sm); }
.mini-act:hover{ background:var(--surface-3); color:var(--text-primary); }

.tree{ display:flex; flex-direction:column; }
.tree-row{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) var(--space-4);
  border-bottom:1px solid var(--border-subtle); transition:background var(--dur-fast); }
.tree-row:hover{ background:var(--surface-2); }
.tree-row .grip{ color:var(--text-tertiary); font-size:var(--icon-md); cursor:grab; }
.tree-row .caret{ color:var(--text-tertiary); font-size:var(--icon-sm); }
.tree-row .name{ font-size:var(--text-sm); }
.tree-row .name.muted{ color:var(--text-tertiary); }
.tree-row .spacer{ flex:1; }
.indent-1{ padding-left:var(--space-4); }
.indent-2{ padding-left:calc(var(--space-4) + 32px); }

/* ---------- Pills / badges / tags / chips (5.8) ---------- */
.pill{ display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:var(--radius-pill);
  font:500 var(--text-xs)/1.4 var(--font-sans); white-space:nowrap; }
.pill .ico{ font-size:11px; }
.pill .fdot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.pill--success{ background:var(--success-subtle); color:var(--success); }
.pill--warning{ background:var(--warning-subtle); color:var(--warning); }
.pill--danger{ background:var(--danger-subtle); color:var(--danger); }
.pill--brand{ background:var(--color-brand-subtle); color:var(--color-brand); }
.pill--accent{ background:var(--color-accent-subtle); color:var(--color-accent); }
.pill--neutral{ background:var(--surface-3); color:var(--text-secondary); }
.pill--info{ background:var(--info-subtle); color:var(--info); }
/* ── status-dot — visual indicator dots used in task rows and dropdowns ── */
.status-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; flex-shrink:0;
  background:var(--text-tertiary); vertical-align:middle; }
.status-dot--not_started{ background:var(--text-tertiary); }
.status-dot--in_progress{ background:var(--info); }
.status-dot--in_review{ background:var(--warning); }
.status-dot--completed{ background:var(--success); }
.status-dot--disputed{ background:var(--danger); }
.status-dot--blocked{ background:var(--danger); }
.status-dot--draft{ background:var(--text-tertiary); }
.status-dot--active{ background:var(--success); }
.status-dot--pending_approval{ background:var(--warning); }
.status-dot--on_hold{ background:var(--warning); }
.status-dot--archived{ background:var(--text-tertiary); }
.status-dot--cancelled{ background:var(--text-tertiary); }
.health{ display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:var(--radius-pill);
  font:500 var(--text-xs)/1.4 var(--font-sans); }
.health .fdot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.chip{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:var(--radius-pill);
  font-size:var(--text-xs); font-weight:500; border:1px solid var(--border-default); color:var(--text-primary);
  background:var(--surface-2); }
.chip .cdot{ width:8px; height:8px; border-radius:50%; }
.tag{ display:inline-flex; align-items:center; gap:6px; padding:3px 6px 3px 10px; border-radius:var(--radius-pill);
  font-size:var(--text-xs); background:var(--surface-3); color:var(--text-secondary); }
.tag button{ border:none; background:transparent; color:var(--text-tertiary); cursor:pointer; display:grid; place-items:center;
  width:16px; height:16px; border-radius:50%; font-size:11px; }
.tag button:hover{ background:var(--surface-1); color:var(--text-primary); }
.badge{ min-width:18px; height:18px; padding:0 5px; border-radius:var(--radius-pill); background:var(--color-brand);
  color:#fff; font-size:var(--text-2xs); font-weight:600; display:inline-grid; place-items:center; }

/* ---------- Avatars (5.9) ---------- */
.av{ border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:700; flex:none;
  font-size:var(--text-xs); position:relative; overflow:visible; }
.av.s24{ width:24px; height:24px; font-size:10px; }
.av.s32{ width:32px; height:32px; font-size:12px; }
.av.s40{ width:40px; height:40px; font-size:14px; }
.av .status{ position:absolute; bottom:-1px; right:-1px; width:10px; height:10px; border-radius:50%;
  border:2px solid var(--surface-1); }
.av .status.on{ background:var(--success); }
.av .status.away{ background:var(--warning); }
.av-stack{ display:flex; }
.av-stack .av{ box-shadow:0 0 0 2px var(--surface-1); margin-left:-8px; }
.av-stack .av:first-child{ margin-left:0; }
.av-more{ background:var(--surface-3); color:var(--text-secondary); }

/* ---------- Banners (5.13) ---------- */
.banner{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) var(--space-4);
  border-radius:var(--radius-md); font-size:var(--text-sm); border:1px solid transparent; }
.banner .ico{ font-size:var(--icon-md); flex:none; }
.banner .spacer{ flex:1; }
.banner--info{ background:var(--info-subtle); color:var(--text-primary); border-color:rgba(58,91,255,.3); }
.banner--info .ico{ color:var(--color-brand); }
.banner--warning{ background:var(--warning-subtle); color:var(--text-primary); border-color:rgba(255,176,32,.35); }
.banner--warning .ico{ color:var(--warning); }
.banner--danger{ background:var(--danger-subtle); color:var(--text-primary); border-color:rgba(255,77,94,.35); }
.banner--danger .ico{ color:var(--danger); }
.banner--success{ background:var(--success-subtle); color:var(--text-primary); border-color:rgba(31,191,117,.35); }
.banner--success .ico{ color:var(--success); }

/* ---------- Breadcrumbs (5.16) ---------- */
.crumbs-demo{ display:flex; align-items:center; gap:var(--space-2); font-size:var(--text-sm); color:var(--text-tertiary); }
.crumbs-demo a{ color:var(--text-tertiary); }
.crumbs-demo a:hover{ color:var(--text-secondary); }
.crumbs-demo .ico{ font-size:var(--icon-sm); }
.crumbs-demo .cur{ color:var(--text-primary); font-weight:500; }

/* ---------- Tabs (5.17) ---------- */
.tabs{ display:flex; gap:var(--space-5); border-bottom:1px solid var(--border-subtle); }
.tab{ padding:var(--space-3) 0; font-size:var(--text-sm); font-weight:500; color:var(--text-tertiary);
  cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:color var(--dur-fast), border-color var(--dur-fast); background:none; border-top:none; border-left:none; border-right:none; }
.tab:hover{ color:var(--text-secondary); }
.tab.active{ color:var(--text-primary); border-bottom-color:var(--color-brand); }
.tabpanel{ padding-top:var(--space-5); color:var(--text-secondary); font-size:var(--text-sm); display:none; }
.tabpanel.active{ display:block; }

/* ---------- Progress + gauge (5.20) ---------- */
.bar{ height:8px; background:var(--surface-3); border-radius:var(--radius-pill); overflow:hidden; }
.bar > i{ display:block; height:100%; background:var(--color-brand); border-radius:var(--radius-pill);
  transition:width var(--dur-slow) var(--ease-standard); }
.bar.accent > i{ background:var(--color-accent); }
.progress-line{ display:flex; align-items:center; gap:var(--space-3); }
.progress-line .pct{ font-family:var(--font-mono); font-size:var(--text-sm); color:var(--text-secondary); min-width:42px; text-align:right; }
.ring-wrap{ display:flex; align-items:center; gap:var(--space-4); }
.ring{ transform:rotate(-90deg); }
.ring circle{ fill:none; stroke-width:10; }
.ring .track{ stroke:var(--surface-3); }
.ring .val{ stroke:var(--color-brand); stroke-linecap:round; transition:stroke-dashoffset var(--dur-slower) var(--ease-spring); }
.ring-center{ display:flex; flex-direction:column; }
.ring-center b{ font-family:var(--font-display); font-size:var(--text-2xl); font-weight:700; }
.ring-center small{ color:var(--text-tertiary); font-size:var(--text-xs); }
.gauge-card{ display:flex; flex-direction:column; align-items:center; gap:var(--space-3); }
.gauge{ position:relative; }
.gauge .arc-bg{ fill:none; stroke:var(--surface-3); stroke-width:14; stroke-linecap:round; }
.gauge .arc-val{ fill:none; stroke-width:14; stroke-linecap:round; transition:stroke-dashoffset var(--dur-slower) var(--ease-spring), stroke var(--dur-slow); }
.gauge-read{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding-bottom:8px; }
.gauge-read b{ font-family:var(--font-mono); font-size:var(--text-3xl); font-weight:600; letter-spacing:-.02em; }
.gauge-read small{ font-size:var(--text-2xs); color:var(--text-tertiary); }

/* ---------- Stepper (5.21) ---------- */
.stepper{ display:flex; align-items:flex-start; }
.step{ display:flex; flex-direction:column; align-items:center; gap:var(--space-2); flex:1; position:relative; }
.step .dot{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-family:var(--font-mono);
  font-size:var(--text-sm); font-weight:600; background:var(--surface-3); color:var(--text-tertiary);
  border:2px solid transparent; z-index:1; transition:all var(--dur-fast); }
.step.done .dot{ background:var(--color-brand); color:#fff; }
.step.current .dot{ background:var(--surface-1); color:var(--color-brand); border-color:var(--color-brand); box-shadow:var(--shadow-glow); }
.step .lbl{ font-size:var(--text-xs); color:var(--text-tertiary); text-align:center; }
.step.done .lbl,.step.current .lbl{ color:var(--text-primary); }
.step::before{ content:""; position:absolute; top:16px; left:-50%; width:100%; height:2px; background:var(--border-default); z-index:0; }
.step:first-child::before{ display:none; }
.step.done::before,.step.current::before{ background:var(--color-brand); }

/* ---------- File upload (5.22) ---------- */
.dropzone{ border:1.5px dashed var(--border-default); border-radius:var(--radius-md); background:var(--surface-inset);
  padding:var(--space-8); text-align:center; cursor:pointer; transition:border-color var(--dur-fast), background var(--dur-fast); }
.dropzone:hover,.dropzone.drag{ border-color:var(--color-brand); background:var(--color-brand-subtle); }
.dropzone .ico{ font-size:32px; color:var(--text-tertiary); }
.dropzone h4{ font-size:var(--text-sm); font-weight:500; margin:var(--space-3) 0 var(--space-1); }
.dropzone p{ font-size:var(--text-xs); color:var(--text-tertiary); margin:0; }
.file-chip{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3); background:var(--surface-2);
  border:1px solid var(--border-subtle); border-radius:var(--radius-sm); }
.file-chip .ico{ font-size:var(--icon-lg); color:var(--color-brand); }
.file-chip .fmeta{ display:flex; flex-direction:column; }
.file-chip .fmeta b{ font-size:var(--text-sm); font-weight:500; }
.file-chip .fmeta small{ font-size:var(--text-2xs); color:var(--text-tertiary); }
.file-chip .ok{ margin-left:auto; color:var(--success); font-size:var(--icon-md); }

/* ---------- Notification item (5.23) ---------- */
.note{ display:flex; align-items:flex-start; gap:var(--space-3); padding:var(--space-3) var(--space-4);
  border-bottom:1px solid var(--border-subtle); cursor:pointer; transition:background var(--dur-fast); }
.note:hover{ background:var(--surface-2); }
.note .body{ flex:1; min-width:0; }
.note .body p{ margin:0; font-size:var(--text-sm); }
.note .body p b{ font-weight:600; }
.note .body small{ font-size:var(--text-2xs); color:var(--text-tertiary); }
.note .unread{ width:8px; height:8px; border-radius:50%; background:var(--color-brand); margin-top:6px; flex:none; }

/* ---------- Tooltip / popover (5.24) ---------- */
.tip{ position:relative; display:inline-flex; }
.tip .bubble{ position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%) translateY(4px);
  background:var(--surface-3); color:var(--text-primary); font-size:var(--text-xs); padding:6px 10px;
  border-radius:var(--radius-sm); box-shadow:var(--shadow-md); white-space:nowrap; opacity:0; pointer-events:none;
  transition:opacity var(--dur-fast), transform var(--dur-fast); z-index:var(--z-tooltip); border:1px solid var(--border-subtle); }
.tip:hover .bubble{ opacity:1; transform:translateX(-50%); }
.tip .bubble::after{ content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-top-color:var(--surface-3); }
.popover{ background:var(--surface-2); border:1px solid var(--border-subtle); border-radius:var(--radius-md);
  box-shadow:var(--shadow-md); padding:var(--space-4); width:260px; }

/* ---------- Loading (5.25) ---------- */
.sk{ background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 50%,var(--surface-2) 75%);
  background-size:200% 100%; animation:shimmer 1.4s linear infinite; border-radius:var(--radius-sm); }
@keyframes shimmer{ to{ background-position:-200% 0; } }
.sk-line{ height:12px; margin-bottom:var(--space-2); }
.sk-line.w60{ width:60%; } .sk-line.w40{ width:40%; } .sk-line.w80{ width:80%; }
.sk-circle{ width:40px; height:40px; border-radius:50%; }
@media (prefers-reduced-motion: reduce){ .sk{ animation:none; } }

/* ---------- Schedule blocks (5.26) ---------- */
.sched{ display:flex; flex-direction:column; gap:var(--space-2); }
.sblock{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3); border-radius:var(--radius-sm);
  border-left:3px solid var(--color-brand); background:var(--surface-2); }
.sblock .stime{ font-family:var(--font-mono); font-size:var(--text-xs); color:var(--text-tertiary); min-width:62px; }
.sblock .stitle{ font-size:var(--text-sm); font-weight:500; }
.sblock.done{ opacity:.55; }
.sblock.done .stitle{ text-decoration:line-through; }

/* ---------- Empty state (5.19) ---------- */
.empty{ text-align:center; padding:var(--space-12) var(--space-6); display:flex; flex-direction:column; align-items:center; gap:var(--space-3); }
.empty .glyph{ width:72px; height:72px; border-radius:50%; background:var(--color-brand-subtle); color:var(--color-brand);
  display:grid; place-items:center; font-size:40px; }
.empty h4{ font-size:var(--text-lg); font-weight:600; }
.empty p{ font-size:var(--text-sm); color:var(--text-secondary); max-width:38ch; margin:0; }

/* ---------- Modal / drawer / toast / command (overlays) ---------- */
.scrim{ position:fixed; inset:0; background:var(--overlay-scrim); z-index:var(--z-modal); display:none;
  align-items:center; justify-content:center; padding:var(--space-4); animation:fade var(--dur-base); }
.scrim.show{ display:flex; }
@keyframes fade{ from{ opacity:0; } to{ opacity:1; } }
.modal{ background:var(--surface-2); border:1px solid var(--border-subtle); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg); max-width:480px; width:100%; padding:var(--space-6);
  animation:modalIn var(--dur-base) var(--ease-decelerate); }
.modal.wide{ max-width:640px; }
@keyframes modalIn{ from{ opacity:0; transform:translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }
.modal h3{ font-size:var(--text-xl); font-weight:600; font-family:var(--font-display); margin-bottom:var(--space-3); }
.modal p{ color:var(--text-secondary); font-size:var(--text-sm); margin:0 0 var(--space-5); }
.modal .foot{ display:flex; justify-content:flex-end; gap:var(--space-3); margin-top:var(--space-5); }
.modal .confirm-gate{ display:flex; align-items:center; gap:var(--space-2); padding:var(--space-3);
  background:var(--surface-inset); border-radius:var(--radius-sm); margin-bottom:var(--space-4); }

.drawer-scrim{ position:fixed; inset:0; background:var(--overlay-scrim); z-index:var(--z-drawer); display:none; }
.drawer-scrim.show{ display:block; animation:fade var(--dur-base); }
.drawer{ position:fixed; top:0; right:0; height:100dvh; width:min(480px,92vw); background:var(--surface-2);
  box-shadow:var(--shadow-lg); z-index:calc(var(--z-drawer) + 1); transform:translateX(100%);
  transition:transform var(--dur-slow) var(--ease-decelerate); display:flex; flex-direction:column; }
.drawer.show{ transform:none; }
.drawer__head{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-5) var(--space-6);
  border-bottom:1px solid var(--border-subtle); }
.drawer__head h3{ font-size:var(--text-lg); font-weight:600; }
.drawer__head .close{ margin-left:auto; }
.drawer__body{ padding:var(--space-6); overflow:auto; flex:1; display:flex; flex-direction:column; gap:var(--space-5); }
.drawer__foot{ padding:var(--space-4) var(--space-6); border-top:1px solid var(--border-subtle);
  display:flex; gap:var(--space-3); justify-content:flex-end; }

.toast-stack{ position:fixed; bottom:var(--space-6); left:50%; transform:translateX(-50%); z-index:var(--z-toast);
  display:flex; flex-direction:column; gap:var(--space-2); align-items:center; }
.toast{ display:flex; align-items:center; gap:var(--space-3); background:var(--surface-3); color:var(--text-primary);
  box-shadow:var(--shadow-lg); border:1px solid var(--border-subtle); border-radius:var(--radius-md);
  padding:var(--space-3) var(--space-4); font-size:var(--text-sm); min-width:300px; max-width:420px;
  animation:toastIn var(--dur-base) var(--ease-decelerate); }
@keyframes toastIn{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:none; } }
.toast .ico{ font-size:var(--icon-md); flex:none; }
.toast.success .ico{ color:var(--success); }
.toast.danger .ico{ color:var(--danger); }
.toast .msg{ flex:1; }
.toast .undo{ color:var(--color-brand); font-weight:500; cursor:pointer; background:none; border:none; font-size:var(--text-sm); }
.toast .tclose{ color:var(--text-tertiary); cursor:pointer; background:none; border:none; display:grid; place-items:center; }

.cmd-scrim{ position:fixed; inset:0; background:var(--overlay-scrim); z-index:var(--z-command); display:none;
  align-items:flex-start; justify-content:center; padding-top:12vh; animation:fade var(--dur-fast); }
.cmd-scrim.show{ display:flex; }
.cmd{ width:min(640px,92vw); background:var(--surface-2); border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden;
  animation:modalIn var(--dur-fast) var(--ease-decelerate); }
.cmd__input{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-4) var(--space-5);
  border-bottom:1px solid var(--border-subtle); }
.cmd__input .ico{ font-size:var(--icon-lg); color:var(--text-tertiary); }
.cmd__input input{ flex:1; background:none; border:none; outline:none; color:var(--text-primary);
  font-size:var(--text-base); font-family:var(--font-sans); }
.cmd__input input::placeholder{ color:var(--text-tertiary); }
.cmd__results{ max-height:50vh; overflow:auto; padding:var(--space-2); }
.cmd__group{ font-size:var(--text-2xs); font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-tertiary); padding:var(--space-3) var(--space-3) var(--space-1); }
.cmd__item{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2) var(--space-3);
  border-radius:var(--radius-sm); cursor:pointer; font-size:var(--text-sm); }
.cmd__item[aria-selected="true"],.cmd__item:hover{ background:var(--color-brand-subtle); color:var(--color-brand); }
.cmd__item .ico{ font-size:var(--icon-md); color:var(--text-tertiary); }
.cmd__item[aria-selected="true"] .ico,.cmd__item:hover .ico{ color:var(--color-brand); }
.cmd__item .sc{ margin-left:auto; }

/* ---------- Foundations: color swatches ---------- */
.swatches{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:var(--space-3); }
.sw{ border:1px solid var(--border-subtle); border-radius:var(--radius-md); overflow:hidden; background:var(--surface-1); }
.sw .chip{ height:64px; border:none; border-radius:0; display:block; }
.sw .meta{ padding:var(--space-2) var(--space-3); }
.sw .meta b{ font-size:var(--text-xs); font-weight:500; display:block; }
.sw .meta code{ font-family:var(--font-mono); font-size:var(--text-2xs); color:var(--text-tertiary); }

/* ---------- Foundations: type scale ---------- */
.type-row{ display:flex; align-items:baseline; gap:var(--space-5); padding:var(--space-3) 0; border-bottom:1px solid var(--border-subtle); }
.type-row .tk{ font-family:var(--font-mono); font-size:var(--text-xs); color:var(--text-tertiary); min-width:96px; }
.type-row .sample{ flex:1; }
.disp{ font-family:var(--font-display); }

/* ---------- Foundations: icon grid ---------- */
.icon-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:var(--space-2); }
.icell{ display:flex; flex-direction:column; align-items:center; gap:var(--space-2); padding:var(--space-3);
  border:1px solid var(--border-subtle); border-radius:var(--radius-sm); background:var(--surface-1); }
.icell .ico{ font-size:24px; color:var(--text-secondary); }
.icell small{ font-size:9px; color:var(--text-tertiary); font-family:var(--font-mono); text-align:center; word-break:break-word; }

/* ---------- lifecycle signature ---------- */
.lifecycle{ display:flex; align-items:center; gap:0; background:var(--surface-1); border:1px solid var(--border-subtle);
  border-radius:var(--radius-card); padding:var(--space-6); overflow:hidden; }
.lc-stage{ flex:1; display:flex; flex-direction:column; align-items:center; gap:var(--space-2); position:relative; }
.lc-stage .lc-dot{ width:44px; height:44px; border-radius:50%; display:grid; place-items:center; color:#fff; font-size:var(--icon-lg); z-index:1; }
.lc-stage .lc-lbl{ font-size:var(--text-xs); font-weight:600; }
.lc-stage .lc-sub{ font-size:var(--text-2xs); color:var(--text-tertiary); }
.lc-stage::after{ content:""; position:absolute; top:22px; left:50%; width:100%; height:3px;
  background:var(--gradient-brand); opacity:.4; z-index:0; }
.lc-stage:last-child::after{ display:none; }
.gradient-hero{ background:var(--gradient-brand); border-radius:var(--radius-card); padding:var(--space-8);
  color:#fff; box-shadow:var(--shadow-glow); }
.gradient-hero .eyebrow{ color:rgba(255,255,255,.8); margin-top:0; }
.gradient-hero h2{ font-size:var(--text-3xl); font-weight:700; margin:var(--space-2) 0 var(--space-3); }
.gradient-hero p{ color:rgba(255,255,255,.88); font-size:var(--text-sm); margin:0; max-width:46ch; }

/* mobile tab bar preview */
.phone{ width:300px; border:8px solid var(--surface-3); border-radius:36px; overflow:hidden; background:var(--bg);
  box-shadow:var(--shadow-lg); }
.phone-screen{ height:200px; background:var(--bg); position:relative; padding:var(--space-4); }
.tabbar{ position:absolute; bottom:0; left:0; right:0; height:64px; background:var(--surface-2);
  border-top:1px solid var(--border-subtle); display:flex; align-items:center; justify-content:space-around; }
.tabbar .tabb{ display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--text-tertiary); font-size:9px; }
.tabbar .tabb.active{ color:var(--color-brand); }
.tabbar .tabb .ico{ font-size:20px; }
.tabbar .fab{ width:48px; height:48px; border-radius:50%; background:var(--color-brand); color:#fff;
  display:grid; place-items:center; font-size:22px; margin-top:-20px; box-shadow:var(--shadow-glow); border:3px solid var(--bg); }

/* theme toggle pill */
.theme-toggle{ display:inline-flex; align-items:center; background:var(--surface-2); border:1px solid var(--border-default);
  border-radius:var(--radius-pill); padding:3px; gap:2px; }
.theme-toggle button{ border:none; background:none; cursor:pointer; width:34px; height:30px; border-radius:var(--radius-pill);
  display:grid; place-items:center; color:var(--text-tertiary); font-size:var(--icon-sm); }
.theme-toggle button.on{ background:var(--surface-1); color:var(--color-brand); box-shadow:var(--shadow-sm); }

/* gallery side index */
.toc{ position:sticky; top:88px; align-self:start; display:flex; flex-direction:column; gap:2px;
  max-height:calc(100vh - 120px); overflow:auto; padding-right:var(--space-2); }
.toc a{ font-size:var(--text-xs); color:var(--text-tertiary); padding:5px var(--space-2); border-radius:var(--radius-xs); }
.toc a:hover{ background:var(--surface-2); color:var(--text-primary); }
.layout-2{ display:grid; grid-template-columns:1fr; gap:var(--space-8); }

.muted{ color:var(--text-tertiary); font-size:var(--text-xs); }
.divider{ height:1px; background:var(--border-subtle); margin:var(--space-4) 0; }
.stack{ display:flex; flex-direction:column; gap:var(--space-4); }
.stack-sm{ display:flex; flex-direction:column; gap:var(--space-2); }

@media(max-width:1024px){
  .app{ grid-template-columns:1fr; }
  .sidebar{ display:none; }
  .topbar{ padding:0 var(--space-4); }
  .content{ padding:var(--space-4); }
}
