/* ═══════════════════════════════════════════════════════════════════
   Venture Studio — premium design system  (v9)
   Tokens first, components second, views third. One visual language:
   quiet surfaces, hairline borders, layered elevation, indigo→violet
   accent, tabular numerals, restrained motion.
   Spacing 4·8·12·16·20·24·32·40·48·64 · Radii 6/10/14/18
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s45: 20px;
  --s5: 24px; --s6: 32px; --s65: 40px; --s7: 48px; --s8: 64px;
  --r1: 6px; --r2: 10px; --r3: 14px; --r4: 18px; --rf: 999px;

  /* ---- dark (default) ---- */
  --bg: #0a0b0f;          --surface: #12131a;    --surface-2: #171921;
  --elev: #1c1e28;
  --ink: #f2f3f8;         --ink-2: #aeb1c2;      --ink-3: #7d8093;
  --line: rgba(255,255,255,.085);
  --line-2: rgba(255,255,255,.05);
  --accent: #6d70f4;      --accent-2: #9a6bf5;
  --accent-ink: #aab2ff;  --accent-soft: rgba(109,112,244,.14);
  --good: #3ad598;  --good-soft: rgba(58,213,152,.12);
  --warn: #f2b04e;  --warn-soft: rgba(242,176,78,.13);
  --bad:  #f7796f;  --bad-soft:  rgba(247,121,111,.13);
  --sidebar: #0d0e13;
  --sidebar-ink: #9a9db0; --sidebar-hi: #ffffff;
  --card-hi: inset 0 1px 0 rgba(255,255,255,.035);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
  --shadow-pop: 0 4px 12px rgba(0,0,0,.45), 0 24px 64px rgba(0,0,0,.55);
  --glow: 0 0 0 1px rgba(109,112,244,.35), 0 8px 32px rgba(109,112,244,.14);
  --btn-grad: linear-gradient(180deg, #7c7ff7, #5f62ee);
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --topbar-bg: rgba(10,11,15,.72);
  --console-bg: #0b0c11;
  --font: "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  color-scheme: dark;
}
/* "light" = the memo paper skin (default since 2026-07-17) — the app
   matches the landing memorandum: paper, ink, emerald, hairlines,
   near-flat radii, serif display type. Dark stays one toggle away. */
html[data-theme="light"] {
  --r1: 2px; --r2: 3px; --r3: 3px; --r4: 4px;
  --bg: #f7f4ec;          --surface: #fbf9f4;    --surface-2: #efeadf;
  --elev: #fbf9f4;
  --ink: #1b1a17;         --ink-2: #4c4a44;      --ink-3: #8b877c;
  --line: #d8d2c2;        --line-2: #e6e1d3;
  --accent: #0e7a5f;      --accent-2: #0e7a5f;
  --accent-ink: #0b6a52;  --accent-soft: #e3efe9;
  --good: #0e7a5f;  --good-soft: #e3efe9;
  --warn: #a06a00;  --warn-soft: #f6ecd7;
  --bad:  #a3352b;  --bad-soft:  #f6e2df;
  --sidebar: #efeadf;     --sidebar-ink: #6b675c; --sidebar-hi: #1b1a17;
  --card-hi: inset 0 0 0 0 transparent;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-pop: 4px 4px 0 rgba(27,26,23,.08);
  --glow: 0 0 0 1px rgba(14,122,95,.3);
  --btn-grad: linear-gradient(180deg, #2b2925, #1b1a17);
  --topbar-bg: rgba(247,244,236,.88);
  --console-bg: #14130f;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering:
  optimizeLegibility; }
body { margin: 0; font-family: var(--font); background: var(--bg);
  color: var(--ink); font-size: 14px; line-height: 1.55;
  font-feature-settings: "cv05", "ss01"; }
h1, h2, h3 { margin: 0 0 var(--s3); font-weight: 650;
  letter-spacing: -0.018em; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
h4 { margin: 0 0 var(--s3); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-3); font-weight: 650; }
p { margin: 0 0 var(--s3); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px;
  letter-spacing: -.01em; }
.num, .stat .n, td, .big { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
  border-radius: 4px; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line);
  border-radius: 8px; border: 3px solid transparent;
  background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3);
  background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: var(--sidebar);
  color: var(--sidebar-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; flex-shrink: 0;
  padding: var(--s4) var(--s3);
  border-right: 1px solid rgba(255,255,255,.06); }
.sidebar .logo { display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-hi); font-weight: 650; font-size: 14.5px;
  padding: var(--s2) var(--s2) var(--s45); letter-spacing: -.01em; }
.logo-mark { width: 27px; height: 27px; border-radius: 9px;
  background: var(--accent-grad); display: inline-flex; align-items:
  center; justify-content: center; color: #fff; font-size: 12px;
  font-weight: 700; box-shadow: 0 2px 8px rgba(109,112,244,.35),
  inset 0 1px 0 rgba(255,255,255,.25); flex-shrink: 0; }
.ws-select { display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--r2);
  padding: 7px 10px; color: var(--sidebar-hi); font-size: 12.5px;
  font-weight: 600; margin-bottom: var(--s45); cursor: default;
  line-height: 1.25; }
.ws-select .ws-mark { width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent-grad); flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.ws-select small { color: var(--sidebar-ink); font-weight: 500;
  display: block; font-size: 11px; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar nav a { position: relative; display: flex; align-items: center;
  gap: 11px; color: var(--sidebar-ink); padding: 7.5px 10px;
  border-radius: 8px; font-size: 13.5px; font-weight: 500;
  transition: background .13s, color .13s; }
.sidebar nav a svg { width: 16px; height: 16px; opacity: .7;
  flex-shrink: 0; transition: opacity .13s, color .13s; }
.sidebar nav a:hover { background: rgba(255,255,255,.05);
  color: var(--sidebar-hi); text-decoration: none; }
.sidebar nav a:hover svg { opacity: .95; }
.sidebar nav a.active { background: rgba(255,255,255,.08);
  color: var(--sidebar-hi); font-weight: 600; }
.sidebar nav a.active svg { opacity: 1; color: var(--accent-ink); }
.sidebar nav a.active::before { content: ""; position: absolute;
  left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px
  3px 0; background: var(--accent-grad); }
.sidebar-footer { margin-top: auto; border-top: 1px solid
  rgba(255,255,255,.07); padding-top: var(--s3); display: flex;
  flex-direction: column; gap: var(--s2); font-size: 12.5px; }
.sidebar-footer .who { color: var(--sidebar-hi); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sidebar .collapse-btn { margin-top: var(--s2); }

.content { flex: 1; min-width: 0; display: flex;
  flex-direction: column; }
.topbar { display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s5); background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-2); position: sticky; top: 0;
  z-index: 6; min-height: 54px; }
.topbar .spacer { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-3); min-width: 0;
  overflow: hidden; }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { opacity: .45; }
.kbd-hint { display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r2);
  padding: 6px 8px 6px 11px; color: var(--ink-3); font-size: 12.5px;
  background: var(--surface); cursor: pointer; min-width: 180px;
  transition: border-color .13s, color .13s; }
.kbd-hint:hover { border-color: var(--ink-3); color: var(--ink-2); }
.kbd-hint kbd { font-family: var(--mono); font-size: 10.5px;
  background: var(--line-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; color: var(--ink-2);
  margin-left: auto; }
.icon-btn { width: 33px; height: 33px; display: inline-flex;
  align-items: center; justify-content: center; border-radius:
  var(--r2); border: 1px solid transparent; background: transparent;
  color: var(--ink-2); cursor: pointer; position: relative;
  transition: background .13s, border-color .13s, color .13s; }
.icon-btn:hover { background: var(--surface-2);
  border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 7px;
  height: 7px; border-radius: 50%; background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px rgba(109,112,244,.8); }
.avatar { width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-grad); color: #fff; font-size: 12px;
  font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25),
  0 1px 3px rgba(0,0,0,.3); transition: transform .12s; }
.avatar:hover { transform: scale(1.06); }
.dropdown { position: absolute; top: 44px; right: 0; width: 290px;
  background: var(--elev); border: 1px solid var(--line);
  border-radius: var(--r3); box-shadow: var(--shadow-pop), var(--card-hi);
  padding: var(--s2); z-index: 20; animation: pop .16s cubic-bezier(.2,.9,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px)
  scale(.98); } to { opacity: 1; transform: none; } }
.dropdown .dd-head { padding: var(--s2) var(--s3) var(--s1);
  font-size: 11px; color: var(--ink-3); font-weight: 650;
  text-transform: uppercase; letter-spacing: .08em; }
.dropdown .dd-item { display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  cursor: pointer; color: var(--ink-2); width: 100%; background: none;
  border: none; text-align: left; font-family: inherit;
  line-height: 1.45; transition: background .1s, color .1s; }
.dropdown .dd-item:hover { background: var(--surface-2);
  color: var(--ink); }

main { padding: var(--s6) var(--s5) var(--s8);
  max-width: 1200px; width: 100%; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: viewin .24s
  cubic-bezier(.2,.8,.3,1); }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); }
                    to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: var(--s3);
  margin-bottom: var(--s45); flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head .sub { color: var(--ink-2); font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex;
  gap: var(--s2); }
.big-display { font-size: clamp(24px, 3vw, 30px); font-weight: 700;
  letter-spacing: -.028em; }

/* ---------- cards, grids, elevation ---------- */
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); padding: var(--s4);
  box-shadow: var(--shadow-1), var(--card-hi);
  transition: border-color .18s, box-shadow .18s, transform .18s; }
.card.pad-lg { padding: var(--s5); }
.card h3 { margin-bottom: var(--s2); }
.card.hoverable:hover, tr.clickable:hover .rowcard { border-color:
  color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow:
  var(--glow); transform: translateY(-1px); }
.grid { display: grid; gap: var(--s3); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill,
  minmax(205px, 1fr)); }
.grid.charts { grid-template-columns: repeat(auto-fill,
  minmax(330px, 1fr)); }
.card canvas { width: 100%; height: 190px; display: block; }
/* staggered entrance for card grids */
.grid > .card { animation: cardin .4s cubic-bezier(.2,.8,.3,1) both; }
.grid > .card:nth-child(1) { animation-delay: .02s; }
.grid > .card:nth-child(2) { animation-delay: .06s; }
.grid > .card:nth-child(3) { animation-delay: .10s; }
.grid > .card:nth-child(4) { animation-delay: .14s; }
.grid > .card:nth-child(5) { animation-delay: .18s; }
.grid > .card:nth-child(6) { animation-delay: .22s; }
@keyframes cardin { from { opacity: 0; transform: translateY(8px); }
                    to { opacity: 1; transform: none; } }
.divider { height: 1px; background: var(--line-2);
  margin: var(--s45) 0; border: none; }
.section-row { display: flex; align-items: baseline; gap: var(--s3);
  margin: var(--s6) 0 var(--s3); }
.section-row h4 { margin: 0; }
.section-row .subtle { font-size: 12px; }
.section-row a { margin-left: auto; font-size: 12.5px;
  font-weight: 550; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content:
  center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 7.5px 14px;
  border-radius: var(--r2); font: inherit; font-weight: 550;
  font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .13s, border-color .13s, transform .06s,
  box-shadow .13s, color .13s; box-shadow: var(--shadow-1),
  var(--card-hi); }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3);
  text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn.primary { background: var(--btn-grad); border-color: transparent;
  color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25),
  0 3px 10px rgba(109,112,244,.3), inset 0 1px 0 rgba(255,255,255,.2); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; box-shadow: none;
  background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.sm { padding: 4.5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn svg { width: 14px; height: 14px; }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }

/* quick-action tiles (dashboard) */
.qa-row { display: grid; grid-template-columns: repeat(auto-fill,
  minmax(180px, 1fr)); gap: var(--s3); margin-bottom: var(--s45); }
.qa { display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); padding: 13px 15px; cursor: pointer;
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
  text-align: left; box-shadow: var(--shadow-1), var(--card-hi);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.qa:hover { border-color: color-mix(in srgb, var(--accent) 45%,
  var(--line)); box-shadow: var(--glow); transform: translateY(-1px);
  text-decoration: none; color: var(--ink); }
.qa .qi { width: 34px; height: 34px; border-radius: 10px; display:
  inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--accent-soft);
  color: var(--accent-ink); }
.qa .qi svg { width: 17px; height: 17px; }
.qa small { display: block; color: var(--ink-3); font-weight: 500;
  font-size: 11.5px; margin-top: 1px; }
.qa.good .qi { background: var(--good-soft); color: var(--good); }
.qa.warn .qi { background: var(--warn-soft); color: var(--warn); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px;
  margin-bottom: var(--s3); }
.field > label { font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); }
input[type=text], input[type=email], input[type=password],
input[type=number], textarea, select {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--r2); background: var(--surface-2);
  color: var(--ink); transition: border-color .13s, box-shadow .13s,
  background .13s; width: 100%; }
input:hover, textarea:hover, select:hover { border-color:
  color-mix(in srgb, var(--ink-3) 55%, var(--line)); }
input:focus, textarea:focus, select:focus { outline: none;
  border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 120px; line-height: 1.65; }
input.compact { width: 96px; }
select { appearance: none; background-image:
  url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%23888da0" stroke-width="1.6" stroke-linecap="round"/></svg>');
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; }

.switch { display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer; font-size: 13px; color: var(--ink-2);
  user-select: none; transition: color .12s; }
.switch:hover { color: var(--ink); }
.switch input { position: absolute; opacity: 0; width: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 999px;
  background: var(--line); position: relative;
  transition: background .18s; flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.switch .track::after { content: ""; position: absolute; top: 2px;
  left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: left .18s cubic-bezier(.3,.9,.4,1.2); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { left: 16px; }
.switch input:focus-visible + .track { outline: 2px solid
  var(--accent); outline-offset: 2px; }
.form-error { color: var(--bad); font-size: 12.5px; min-height: 18px;
  margin-top: var(--s2); }

/* ---------- chips & badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--rf); padding: 2.5px 10px; font-size: 11.5px;
  font-weight: 600; line-height: 1.6; white-space: nowrap;
  letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%,
  transparent); }
.chip::before { content: ""; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad  { background: var(--bad-soft);  color: var(--bad); }
.chip.info { background: var(--accent-soft); color: var(--accent-ink); }
.chip.neutral { background: var(--line-2); color: var(--ink-2); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { text-align: left; font-size: 11px; text-transform:
  uppercase; letter-spacing: .07em; color: var(--ink-3);
  font-weight: 650; padding: 11px 14px; border-bottom: 1px solid
  var(--line); position: sticky; top: 0; background: var(--surface);
  z-index: 1; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.table-card { padding: 0; overflow: hidden; }
.table-card table { display: block; overflow-x: auto; }

/* ---------- stats & KPI cards ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 24px; font-weight: 650;
  letter-spacing: -0.02em; }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 550; }
.kpi { position: relative; overflow: hidden; display: flex;
  flex-direction: column; gap: 2px; }
.kpi .kpi-head { display: flex; align-items: center;
  justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kpi .kpi-head .k { font-size: 12px; color: var(--ink-3);
  font-weight: 600; }
.kpi .ki { width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink);
  flex-shrink: 0; }
.kpi .ki svg { width: 15px; height: 15px; }
.kpi .n { font-size: 28px; font-weight: 700; letter-spacing: -.025em;
  line-height: 1.1; }
.kpi .trend { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------- meters (labeled progress rows) ---------- */
.meter { display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; }
.meter .ml { width: 160px; font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex-shrink: 0; }
.meter .mt { flex: 1; height: 6px; background: var(--line-2);
  border-radius: 999px; overflow: hidden; display: block; }
.meter .mb { display: block; height: 100%; border-radius: 999px;
  background: var(--accent-grad); transition: width .6s
  cubic-bezier(.2,.8,.3,1); }
.meter .mb.good { background: linear-gradient(90deg, var(--good),
  #6ee7b7); }
.meter .mb.warn { background: linear-gradient(90deg, var(--warn),
  #fcd34d); }
.meter .mb.bad { background: linear-gradient(90deg, var(--bad),
  #fca5a1); }
.meter .mv { width: 42px; text-align: right; font-family: var(--mono);
  font-size: 11.5px; color: var(--ink-2); flex-shrink: 0; }
.meter .mc { width: 60px; text-align: right; font-size: 10.5px;
  color: var(--ink-3); flex-shrink: 0; }

/* ---------- progress + pipeline timeline ---------- */
.progress { height: 8px; background: var(--line-2);
  border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; width: 0%;
  background: var(--accent-grad); border-radius: 999px;
  transition: width .5s ease; position: relative; }
.progress .bar.live::after { content: ""; position: absolute;
  inset: 0; background: linear-gradient(90deg, transparent,
  rgba(255,255,255,.45), transparent);
  animation: shimmer 1.6s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); }
                     to { transform: translateX(100%); } }
.timeline { display: flex; gap: 0; margin: var(--s4) 0;
  overflow-x: auto; padding-bottom: var(--s1); }
.tl-step { flex: 1; min-width: 92px; text-align: center;
  position: relative; font-size: 11.5px; color: var(--ink-3); }
.tl-step::before { content: ""; position: absolute; top: 9px; left: 0;
  right: 0; height: 2px; background: var(--line); }
.tl-step.done::before { background: color-mix(in srgb, var(--good)
  55%, var(--line)); }
.tl-step:first-child::before { left: 50%; }
.tl-step:last-child::before { right: 50%; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  margin: 0 auto 6px; position: relative; z-index: 1; display: flex;
  align-items: center; justify-content: center; font-size: 10px;
  transition: all .25s; }
.tl-step.done .tl-dot { background: var(--good);
  border-color: var(--good); color: #fff; }
.tl-step.done { color: var(--ink-2); }
.tl-step.current .tl-dot { border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px
  var(--accent-soft); } 50% { box-shadow: 0 0 0 7px
  color-mix(in srgb, var(--accent) 8%, transparent); } }
.tl-step.current { color: var(--accent-ink); font-weight: 600; }

/* ---------- verdict band ---------- */
.verdict { position: relative; display: flex; gap: var(--s5);
  align-items: center; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r4);
  padding: var(--s5) var(--s5); box-shadow: var(--shadow-2),
  var(--card-hi); margin-bottom: var(--s45); overflow: hidden; }
.verdict::before { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(480px 220px at 88% -20%,
      color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(320px 200px at 8% 120%,
      color-mix(in srgb, var(--accent-2) 8%, transparent), transparent 70%);
  pointer-events: none; }
.verdict > * { position: relative; }
.verdict .score-ring { width: 104px; height: 104px; flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.25)); }
.verdict .big { font-size: 36px; font-weight: 700;
  letter-spacing: -.03em; line-height: 1; }
.verdict .next { background: var(--surface-2); border: 1px solid
  var(--line); border-radius: var(--r3); padding: var(--s3) var(--s4);
  max-width: 340px; font-size: 13px; box-shadow: var(--card-hi); }
.verdict .next b { display: block; margin-bottom: 3px; }

/* ---------- console, code, docs ---------- */
pre.console { background: var(--console-bg); color: #9fe0bd;
  padding: var(--s3) var(--s4); border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.06); font-family: var(--mono);
  font-size: 12px; overflow: auto; max-height: 300px;
  line-height: 1.75; margin: 0; }
pre.console .ts { color: #565e70; }
.codeblock { background: var(--console-bg); border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.06); padding: var(--s3)
  var(--s4); font-family: var(--mono); font-size: 12.5px;
  line-height: 1.7; overflow: auto; max-height: 420px;
  color: #d3d5dd; }
.j-key { color: #86b3f7; } .j-str { color: #9fe0bd; }
.j-num { color: #f0b46e; } .j-bool, .j-null { color: #cf8ce6; }

/* report/document typography — "md" premium rendering */
.doc { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); padding: var(--s5); white-space:
  pre-wrap; font-size: 13.5px; overflow-wrap: anywhere;
  line-height: 1.7; box-shadow: var(--shadow-1); }
.md { font-size: 13.5px; line-height: 1.75; overflow-wrap: anywhere;
  color: var(--ink-2); }
.md h1, .md h2 { font-size: 15px; color: var(--ink);
  margin: var(--s45) 0 var(--s2); padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2); letter-spacing: -.01em; }
.md h1:first-child, .md h2:first-child { margin-top: 0; }
.md h3 { font-size: 13.5px; color: var(--ink);
  margin: var(--s4) 0 var(--s1); }
.md p { margin: 0 0 var(--s25, 10px); }
.md ul { margin: 0 0 var(--s3); padding-left: 4px;
  list-style: none; }
.md ul li { position: relative; padding-left: 18px;
  margin-bottom: 5px; }
.md ul li::before { content: ""; position: absolute; left: 2px;
  top: .62em; width: 6px; height: 6px; border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 60%, transparent); }
.md strong { color: var(--ink); font-weight: 650; }
.md code { font-family: var(--mono); font-size: 12px;
  background: var(--line-2); border-radius: 5px; padding: 1px 5px;
  color: var(--ink); }
.md .tag-fact, .md .tag-quote, .md .tag-inference, .md .tag-assume {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; border-radius: 5px; padding: 0 6px;
  vertical-align: 1px; }
.md .tag-fact { background: var(--good-soft); color: var(--good); }
.md .tag-quote { background: var(--accent-soft);
  color: var(--accent-ink); }
.md .tag-inference { background: var(--warn-soft);
  color: var(--warn); }
.md .tag-assume { background: var(--line-2); color: var(--ink-3); }

.callout { display: flex; gap: 10px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%,
  transparent); border-radius: var(--r2); padding: var(--s3)
  var(--s4); font-size: 13px; color: var(--ink); margin-bottom:
  var(--s3); }
.callout svg { width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 2px; color: var(--accent-ink); }

/* ---------- accordions ---------- */
details.panel { background: var(--surface); border: 1px solid
  var(--line); border-radius: var(--r3); margin-bottom: var(--s3);
  box-shadow: var(--shadow-1), var(--card-hi); overflow: hidden; }
details.panel > summary { list-style: none; cursor: pointer;
  padding: var(--s4); display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 13.5px; transition: background .12s;
  user-select: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary:hover { background: var(--surface-2); }
details.panel > summary .chev { margin-left: auto;
  transition: transform .18s; color: var(--ink-3); font-size: 15px; }
details.panel[open] > summary .chev { transform: rotate(90deg); }
details.panel > .panel-body { padding: 0 var(--s4) var(--s4);
  animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- evidence cards ---------- */
.evidence-card { display: flex; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r2);
  margin-bottom: 8px; background: var(--surface-2); font-size:
  12.5px; transition: border-color .13s; }
.evidence-card:hover { border-color: var(--line); }
.evidence-card .eid { font-family: var(--mono);
  color: var(--accent-ink); font-size: 11px;
  background: var(--accent-soft); border-radius: 5px; padding: 1px
  6px; height: fit-content; flex-shrink: 0; }
.evidence-card a { overflow-wrap: anywhere; }

/* ---------- workspace tabs ---------- */
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid
  var(--line); margin: var(--s4) 0; overflow-x: auto;
  scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button { border: none; background: none; font: inherit;
  font-size: 13px; font-weight: 550; color: var(--ink-3);
  padding: 9px 13px; cursor: pointer; border-bottom: 2px solid
  transparent; margin-bottom: -1px; white-space: nowrap;
  border-radius: 8px 8px 0 0;
  transition: color .13s, border-color .13s, background .13s; }
.tabbar button:hover { color: var(--ink); background: var(--line-2); }
.tabbar button.active { color: var(--ink);
  border-bottom-color: var(--accent); background: none; }

/* ---------- states: skeleton / empty / error ---------- */
.skeleton { border-radius: var(--r2); background: linear-gradient(
  90deg, var(--line-2) 25%, var(--surface-2) 42%, var(--line-2) 58%);
  background-size: 400% 100%; animation: sk 1.3s infinite; }
@keyframes sk { from { background-position: 100% 0; }
                to { background-position: 0 0; } }
.empty { text-align: center; padding: var(--s7) var(--s5);
  color: var(--ink-2); }
.empty svg { width: 38px; height: 38px; color: var(--ink-3);
  margin-bottom: var(--s3); }
.empty .t { font-weight: 650; color: var(--ink); margin-bottom: 4px; }
.error-banner { background: var(--bad-soft); color: var(--bad);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  border-radius: var(--r2); padding: 10px 14px; font-size: 13px;
  display: flex; gap: 8px; align-items: center; }
.error-banner svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: var(--s4); right: var(--s4);
  display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--elev); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r2);
  padding: 10px 16px; font-size: 13px; box-shadow: var(--shadow-pop);
  animation: toastin .25s cubic-bezier(.2,.9,.3,1.1);
  max-width: 380px; display: flex; align-items: center; gap: 8px; }
.toast::before { content: ""; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.toast.bad::before { background: var(--bad); }
.toast.good::before { background: var(--good); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px)
  scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- command palette ---------- */
.palette-overlay { position: fixed; inset: 0;
  background: rgba(8,9,12,.5); backdrop-filter: blur(4px);
  z-index: 50; display: flex; justify-content: center;
  padding-top: 12vh; }
.palette { width: 580px; max-width: calc(100vw - 32px);
  background: var(--elev); border-radius: var(--r4);
  box-shadow: var(--shadow-pop), var(--card-hi); overflow: hidden;
  height: fit-content; border: 1px solid var(--line);
  animation: pop .18s cubic-bezier(.2,.9,.3,1); }
.palette input { border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 15px 18px; font-size: 15px;
  background: transparent; }
.palette input:focus { box-shadow: none; background: transparent; }
.palette .results { max-height: 330px; overflow: auto;
  padding: var(--s2); }
.palette .item { display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; }
.palette .item svg { width: 15px; height: 15px;
  color: var(--ink-3); }
.palette .item.sel, .palette .item:hover { background:
  var(--accent-soft); }
.palette .item .k { margin-left: auto; font-family: var(--mono);
  font-size: 11px; color: var(--ink-3); }

/* ---------- auth modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,9,12,.55);
  backdrop-filter: blur(5px); display: flex; align-items: center;
  justify-content: center; z-index: 40; padding: var(--s4); }
.auth-card { width: 384px; background: var(--elev);
  border: 1px solid var(--line); border-radius: var(--r4);
  box-shadow: var(--shadow-pop), var(--card-hi); padding: var(--s6);
  animation: pop .2s cubic-bezier(.2,.9,.3,1); }
.auth-card .logo-row { display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--s45); font-weight: 650; }
.tabs { display: flex; background: var(--line-2);
  border-radius: var(--r2); padding: 3px; margin-bottom: var(--s4); }
.tabs button { flex: 1; border: none; background: transparent;
  padding: 7px; border-radius: 8px; font: inherit; font-weight: 600;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s; }
.tabs button.active { background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-1); }

/* ---------- landing ---------- */
.landing { min-height: 100vh; background: var(--bg); }
.landing .lp-nav { display: flex; align-items: center; gap: 12px;
  padding: 16px clamp(20px, 6vw, 72px); position: sticky; top: 0;
  background: var(--topbar-bg); backdrop-filter: blur(12px)
  saturate(1.4); border-bottom: 1px solid var(--line-2); z-index: 5; }
.landing .lp-nav .brand { font-weight: 700; display: flex; gap: 10px;
  align-items: center; letter-spacing: -.01em; }
.landing .lp-hero { position: relative; }
.landing .lp-hero::before { content: ""; position: absolute;
  inset: -40% -20% auto; height: 150%; pointer-events: none;
  background:
    radial-gradient(640px 340px at 50% 16%,
      color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(440px 280px at 78% 55%,
      color-mix(in srgb, var(--accent-2) 11%, transparent), transparent 70%),
    radial-gradient(380px 240px at 22% 60%,
      color-mix(in srgb, var(--good) 7%, transparent), transparent 70%); }
.landing .lp-hero::after { content: ""; position: absolute; inset: 0;
  pointer-events: none; opacity: .5; background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(65% 60% at 50% 35%, #000 30%,
    transparent 75%);
  mask-image: radial-gradient(65% 60% at 50% 35%, #000 30%,
    transparent 75%); }
.landing .lp-hero > * { position: relative; z-index: 1; }
.lp-hero { text-align: center; padding: clamp(56px, 10vw, 116px)
  clamp(20px, 6vw, 72px) var(--s7); max-width: 880px; margin: 0 auto; }
.lp-hero .eyebrow { display: inline-flex; gap: 8px; align-items:
  center; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: var(--rf); padding: 5px 14px; font-size: 12.5px;
  font-weight: 600; margin-bottom: var(--s4);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%,
  transparent); }
.lp-hero h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.06;
  letter-spacing: -0.032em; margin-bottom: var(--s4); }
.lp-hero .sub { font-size: 17px; color: var(--ink-2);
  max-width: 620px; margin: 0 auto var(--s5); }
.lp-flow { display: flex; align-items: stretch; justify-content:
  center; gap: var(--s2); padding: 0 clamp(20px, 6vw, 72px)
  var(--s7); max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.lp-step { flex: 1; min-width: 150px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r3);
  padding: var(--s4); text-align: left; position: relative;
  box-shadow: var(--shadow-1), var(--card-hi); }
.lp-step .n { font-family: var(--mono); font-size: 11px;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 5px; padding: 2px 7px; }
.lp-step b { display: block; margin: 8px 0 4px; font-size: 14px; }
.lp-step span { font-size: 12.5px; color: var(--ink-2); }
.lp-step:not(:last-child)::after { content: "→"; position: absolute;
  right: -13px; top: 42%; color: var(--ink-3); z-index: 1; }
.lp-section { padding: var(--s7) clamp(20px, 6vw, 72px);
  max-width: 1100px; margin: 0 auto; }
.lp-section.alt { background: var(--bg); max-width: none; }
.lp-section.alt > div { max-width: 1100px; margin: 0 auto; }
.price-card { text-align: left; position: relative; }
.price-card .amount { font-size: 32px; font-weight: 700;
  letter-spacing: -.03em; }
.price-card .amount small { font-size: 13px; color: var(--ink-3);
  font-weight: 500; }
.price-card ul { padding-left: 18px; color: var(--ink-2);
  font-size: 13px; margin: var(--s3) 0; }
.price-card.featured { border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2); }
.lp-footer { padding: var(--s6) clamp(20px, 6vw, 72px);
  border-top: 1px solid var(--line-2); color: var(--ink-3);
  font-size: 12.5px; text-align: center; }
.lp-feature { display: grid; grid-template-columns: 1fr 1.5fr;
  gap: var(--s6); align-items: center; }
.lp-feature.flip .lp-copy { order: 2; }
.lp-feature h2 { font-size: clamp(22px, 2.6vw, 30px); }
.lp-feature p { color: var(--ink-2); font-size: 14.5px; }
.lp-hero-art { max-width: 1100px; margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 72px) var(--s7); }

/* ---------- artwork ---------- */
.hero-art, .feature-art { width: 100%; height: auto; display: block;
  border-radius: var(--r3); border: 1px solid var(--line);
  box-shadow: var(--shadow-2); background: var(--surface); }
.empty-art { width: min(380px, 88%); height: auto; margin: 0 auto
  var(--s3); display: block; border-radius: var(--r3);
  border: 1px solid var(--line); }
#home-hero { margin-bottom: var(--s45); max-height: 220px;
  object-fit: cover; object-position: center 30%; }

/* ---------- onboarding & mission composer ---------- */
.onboard-step { display: flex; gap: 12px; align-items: flex-start;
  padding: var(--s3) 0; border-bottom: 1px solid var(--line-2); }
.onboard-step:last-child { border-bottom: none; }
.onboard-step .dot { width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; display: flex; align-items:
  center; justify-content: center; flex-shrink: 0; margin-top: 2px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%,
  transparent); }
.composer-intro { display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: var(--s4); }
.composer-intro .ci { width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent-grad); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(109,112,244,.35),
  inset 0 1px 0 rgba(255,255,255,.25); }
.composer-intro .ci svg { width: 18px; height: 18px; }
.tmpl-row { display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: var(--s4); }
.tmpl { border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); border-radius: var(--rf); padding: 5px 13px;
  font: inherit; font-size: 12.5px; font-weight: 550; cursor:
  pointer; transition: border-color .13s, color .13s, background
  .13s, transform .1s; }
.tmpl:hover { border-color: color-mix(in srgb, var(--accent) 50%,
  var(--line)); color: var(--ink); background: var(--accent-soft);
  transform: translateY(-1px); }
.hint-row { display: flex; gap: 14px; flex-wrap: wrap;
  margin: 2px 0 var(--s3); }
.hint-row span { font-size: 11.5px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 5px; }
.hint-row svg { width: 12px; height: 12px; }

/* ---------- misc components kept from v8 ---------- */
.attention-item { display: flex; gap: 12px; align-items: flex-start;
  padding: var(--s3) 0; border-bottom: 1px solid var(--line-2);
  border-radius: 6px; transition: background .1s; }
.attention-item:hover { background: var(--surface-2);
  text-decoration: none; }
.attention-item:last-child { border-bottom: none; }
.attention-item svg { width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 2px; color: var(--accent-ink); }
.swatch { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  margin-right: 12px; }
.swatch i { width: 18px; height: 18px; border-radius: 5px;
  display: inline-block; border: 1px solid var(--line); }
.site-frame { width: 100%; height: 460px; border: 1px solid
  var(--line); border-radius: var(--r2); background: #fff; }
.provider-row { display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; padding: var(--s3) 0; border-bottom: 1px solid
  var(--line-2); font-size: 13px; }
.provider-row:last-child { border-bottom: none; }
.provider-row .mono { color: var(--ink-3); }

/* sidebar collapse */
.app.side-collapsed .sidebar { width: 68px; padding: var(--s4) 10px; }
.app.side-collapsed .sidebar .logo span:last-child,
.app.side-collapsed .sidebar nav a .label,
.app.side-collapsed .ws-select > div,
.app.side-collapsed .sidebar-footer { display: none; }
.app.side-collapsed .sidebar nav a { justify-content: center;
  padding: 10px; }
.app.side-collapsed .sidebar nav a.active::before { left: -10px; }
.app.side-collapsed .ws-select { justify-content: center; }

/* ---------- responsive ---------- */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { position: fixed; z-index: 30; height: 100vh; left: 0;
    top: 0; transform: translateX(-100%); transition: transform .22s
    cubic-bezier(.2,.8,.3,1); width: 250px;
    box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .app.side-collapsed .sidebar { width: 250px; padding: var(--s4)
    var(--s3); }
  .app.side-collapsed .sidebar .logo span:last-child,
  .app.side-collapsed .sidebar nav a .label,
  .app.side-collapsed .ws-select > div,
  .app.side-collapsed .sidebar-footer { display: initial; }
  .app.side-collapsed .sidebar nav a { justify-content: flex-start;
    padding: 8px 10px; }
  .menu-btn { display: inline-flex; }
  .collapse-btn { display: none; }
  main { padding: var(--s4) var(--s4) var(--s7); }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .lp-step:not(:last-child)::after { display: none; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .topbar { padding: 8px var(--s4); }
  .kbd-hint { display: none; }
  .crumbs .home-crumb { display: none; }
  .lp-feature, .lp-feature.flip { grid-template-columns: 1fr; }
  .lp-feature.flip .lp-copy { order: 0; }
  .verdict .next { max-width: none; }
  .topbar .btn.primary.sm { padding: 6px 10px; white-space: nowrap; }
  .dropdown { right: -8px; width: min(300px, calc(100vw - 24px)); }
  .site-frame { height: 340px; }
  .meter .ml { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important;
    transition-duration: .01ms !important; }
}

/* ═══════════ cinematic landing (v10) ═══════════ */

.cinema { position: relative; min-height: calc(100svh - 66px);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; max-width: none; padding: var(--s7)
  clamp(20px, 6vw, 72px); overflow: hidden; }
/* .landing .lp-hero > * forces children relative — outrank it */
.landing .cinema > .cinema-bg { position: absolute; inset: 0;
  z-index: 0; }
.landing .cinema > .cinema-content,
.landing .cinema > .scroll-cue { z-index: 2; }
.cinema-bg::before { content: ""; position: absolute; inset: 0;
  background: url("/static/img/hero-cinema.jpg") center / cover
  no-repeat; opacity: .6; }
html[data-theme="light"] .cinema-bg::before { display: none; }
.cinema-bg video { position: absolute; inset: 0; width: 100%;
  height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 1.8s ease; }
.cinema-bg video.playing { opacity: .8; }
.cinema-bg video[poster] { opacity: .5; }
.cinema-bg video.playing[poster] { opacity: .8; }
.cinema-bg canvas { position: absolute; inset: 0; width: 100%;
  height: 100%; }
.cinema-wash { position: absolute; inset: 0; background:
  linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 72%, transparent) 0%,
    color-mix(in srgb, var(--bg) 14%, transparent) 32%,
    color-mix(in srgb, var(--bg) 10%, transparent) 64%,
    var(--bg) 100%),
  radial-gradient(95% 65% at 50% 42%, transparent 55%,
    color-mix(in srgb, var(--bg) 42%, transparent) 100%); }
html[data-theme="light"] .cinema-bg video,
html[data-theme="light"] .cinema-bg canvas { opacity: 0 !important; }
html[data-theme="light"] .cinema-wash { background: var(--bg); }
.cinema-content { position: relative; text-align: center;
  max-width: 780px; animation: herorise 1s cubic-bezier(.2,.8,.25,1)
  both .15s; }
@keyframes herorise { from { opacity: 0; transform:
  translateY(22px); } to { opacity: 1; transform: none; } }
.cinema-content h1 { font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.04; letter-spacing: -.035em;
  margin: 0 0 var(--s4); font-weight: 700; }
.cinema-content h1 em { font-style: normal;
  background: linear-gradient(100deg, var(--accent-ink),
  var(--accent-2) 55%, #d9b8ff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; }
.cinema-content .sub { font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-2); max-width: 640px; margin: 0 auto var(--s5); }
.cinema-ctas { display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: var(--s5); }
.btn.lg { padding: 12px 22px; font-size: 15px;
  border-radius: 12px; }
.btn.glass { background: color-mix(in srgb, var(--surface) 45%,
  transparent); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent); }
.btn.glass:hover { background: color-mix(in srgb, var(--surface)
  70%, transparent); }
.hero-proof { display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); }
.hero-proof i { width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-3); }
.scroll-cue { position: absolute; bottom: 18px; left: 50%;
  transform: translateX(-50%); color: var(--ink-3);
  animation: cue 2.4s ease-in-out infinite; }
.scroll-cue svg { width: 20px; height: 20px; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0);
  opacity: .5; } 50% { transform: translate(-50%, 7px);
  opacity: 1; } }

/* scroll-choreographed reveals */
.reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.8,.3,1),
  transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; } }

/* full-bleed ecosystem band */
.lp-band { position: relative; max-width: 1100px;
  margin: 0 auto; padding: 0 clamp(20px, 6vw, 72px) var(--s7); }
.lp-band img, .lp-band video { width: 100%; height: auto;
  display: block; border-radius: var(--r4);
  border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.lp-band .band-copy { position: absolute; left: clamp(40px, 9vw,
  110px); bottom: clamp(40px, 7vw, 90px); max-width: 420px;
  text-align: left; }
.lp-band .band-copy h2 { color: #fff; font-size: clamp(20px,
  2.4vw, 28px); text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.lp-band .band-copy p { color: rgba(255,255,255,.82); font-size:
  14px; text-shadow: 0 1px 12px rgba(0,0,0,.6); margin: 0; }
@media (max-width: 900px) {
  .cinema { min-height: calc(100svh - 58px); }
  .lp-band .band-copy { position: static; margin-top: var(--s3);
    max-width: none; }
  .lp-band .band-copy h2 { color: var(--ink); text-shadow: none; }
  .lp-band .band-copy p { color: var(--ink-2); text-shadow: none; }
}

/* ═══════════ ambient intelligence layer (v15) ═══════════ */

/* dashboard: a quiet horizon of light behind the command center */
#view-home { position: relative; z-index: 0; }
#view-home::before { content: ""; position: absolute; z-index: -1;
  top: -32px; left: -40px; right: -40px; height: 340px;
  background: url("/static/img/intelligence-horizon.jpg")
  center 30% / cover no-repeat; opacity: .38; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%,
    transparent 96%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 96%); }
html[data-theme="light"] #view-home::before { display: none; }

/* auth: the constellation breathes behind the glass */
.overlay { overflow: hidden; }
.overlay::before { content: ""; position: absolute; inset: 0;
  background: url("/static/img/hero-cinema.jpg") center / cover
  no-repeat; opacity: .28; }
html[data-theme="light"] .overlay::before { opacity: .12; }
.auth-card { position: relative; }

/* ---------- microinteractions ---------- */
.qa .qi { transition: transform .18s cubic-bezier(.3,.9,.4,1.2); }
.qa:hover .qi { transform: scale(1.1) translateY(-1px); }
.sidebar nav a svg { transition: transform .15s, opacity .13s; }
.sidebar nav a:hover svg { transform: translateX(1.5px); }
.btn.primary { transition: filter .13s, transform .06s,
  box-shadow .2s; }
.btn.primary:hover { box-shadow: 0 1px 2px rgba(0,0,0,.25),
  0 6px 20px rgba(109,112,244,.45),
  inset 0 1px 0 rgba(255,255,255,.2); }
details.panel > summary:active { transform: scale(.998); }
.kpi { transition: border-color .18s, box-shadow .18s,
  transform .18s; }
.kpi:hover { transform: translateY(-2px); border-color:
  color-mix(in srgb, var(--accent) 35%, var(--line)); }
.evidence-card { transition: border-color .13s, transform .13s; }
.evidence-card:hover { transform: translateX(2px); }
.tmpl:active { transform: scale(.97); }

/* ================= "THE MEMO" landing (2026-07-17 redesign) =========
   The landing looks like the deliverable: a printed screening
   memorandum. Fixed paper palette in both themes (a document doesn't
   change color); the dark Higgsfield plates sit inside it as framed
   exhibits. Scoped entirely under .landing.memo — the app shell keeps
   its own design system. */
.landing.memo {
  --paper: #f7f4ec; --paper-2: #efeadf; --ink-0: #1b1a17;
  --ink-1: #4c4a44; --ink-faint: #8b877c; --line-ink: #d8d2c2;
  --emerald: #0e7a5f; --amber: #a06a00; --brick: #a3352b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  background: var(--paper); color: var(--ink-0);
  font-variant-numeric: oldstyle-nums; min-height: 100vh; }
.memo .m-nav { display: flex; align-items: center; gap: 12px;
  padding: 18px clamp(20px, 6vw, 72px);
  border-bottom: 1px solid var(--line-ink); }
.memo .m-brand { font-family: var(--serif); font-size: 17px;
  font-weight: 700; letter-spacing: .01em; display: flex; gap: 9px;
  align-items: baseline; }
.memo .m-mark { color: var(--emerald); }
.memo .m-desk { font-family: var(--mono); font-size: 10.5px;
  font-weight: 400; color: var(--ink-faint); letter-spacing: .12em;
  text-transform: uppercase; margin-left: 6px; }
.memo .btn.m-ink { background: var(--ink-0); color: var(--paper);
  border: 1px solid var(--ink-0); border-radius: 3px; }
.memo .btn.m-ink:hover { background: #33312c; }
.memo .btn.m-ghost { background: transparent; color: var(--ink-0);
  border: 1px solid var(--line-ink); border-radius: 3px; }
.memo .btn.m-ghost:hover { border-color: var(--ink-1); }
.memo .btn.lg { padding: 13px 26px; font-size: 15px; }

.memo .m-masthead { max-width: 980px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 72px) 0;
  text-align: left; }
.memo .m-kicker { display: flex; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--line-ink); padding: 8px 2px; }
.memo .m-masthead h1 { font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 6vw, 68px); line-height: 1.04;
  letter-spacing: -.015em; margin: 34px 0 18px; }
.memo .m-masthead h1 em { font-style: italic; color: var(--emerald); }
.memo .m-lede { font-size: 17.5px; line-height: 1.65;
  color: var(--ink-1); max-width: 640px; margin: 0 0 26px; }
.memo .m-ctas { display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 44px; }

.memo .m-exhibit-frame { margin: 0; }
.memo .m-exhibit-frame figcaption { font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 2px 7px; }
.memo .m-exhibit-frame figcaption b { color: var(--ink-0);
  font-weight: 700; }
.memo .m-exhibit-frame video { width: 100%; height: auto;
  display: block; border: 1px solid var(--ink-0); border-radius: 2px;
  box-shadow: 6px 6px 0 rgba(27,26,23,.12); background: #0d0e12; }

.memo .m-section { max-width: 980px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 6vw, 72px) 0; }
.memo .m-rule { border-top: 2px solid var(--ink-0); padding-top: 8px;
  margin-bottom: 26px; }
.memo .m-rule span { font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); }
.memo .m-section h2 { font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.01em;
  margin: 0 0 22px; }
.memo .m-note { font-size: 13.5px; color: var(--ink-faint);
  border-left: 3px solid var(--line-ink); padding-left: 14px;
  max-width: 640px; margin-top: 22px; line-height: 1.6; }

.memo .m-stats { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0; border: 1px solid var(--ink-0); background: var(--ink-0); }
.memo .m-stat { background: var(--paper-2); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px; outline: 1px solid
  var(--ink-0); }
.memo .m-stat .m-n { font-family: var(--serif); font-size: 40px;
  font-weight: 700; letter-spacing: -.02em; }
.memo .m-stat .m-n small { font-size: 18px; color: var(--ink-1); }
.memo .m-stat .m-k { font-size: 13.5px; color: var(--ink-1);
  line-height: 1.5; }
.memo .m-stat .m-src { font-family: var(--mono); font-size: 10px;
  letter-spacing: .06em; color: var(--ink-faint);
  text-transform: uppercase; margin-top: auto; }

.memo .m-verdicts { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; }
.memo .m-verdict { border: 1px solid var(--line-ink); border-radius:
  2px; padding: 20px; background: var(--paper-2); }
.memo .m-verdict p { font-size: 13.5px; color: var(--ink-1);
  line-height: 1.55; margin: 12px 0 0; }
.memo .m-stamp { display: inline-block; font-family: var(--mono);
  font-size: 13px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; padding: 6px 12px;
  border: 2px solid currentColor; border-radius: 2px;
  transform: rotate(-2deg); }
.memo .m-verdict.go .m-stamp { color: var(--emerald); }
.memo .m-verdict.wait .m-stamp { color: var(--amber); }
.memo .m-verdict.no .m-stamp { color: var(--brick); }

.memo .m-feature { display: grid; grid-template-columns: 1fr 1.4fr;
  gap: clamp(20px, 4vw, 44px); align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line-ink); }
.memo .m-feature:last-child { border-bottom: 0; }
.memo .m-feature.flip .m-copy { order: 2; }
.memo .m-copy h3 { font-family: var(--serif); font-size: 23px;
  font-weight: 600; margin: 0 0 10px; }
.memo .m-copy p { font-size: 14.5px; color: var(--ink-1);
  line-height: 1.65; margin: 0; }

.memo .m-ecom { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; }
.memo .m-ecol { border: 1px solid var(--line-ink); background:
  var(--paper-2); padding: 22px; border-radius: 2px; }
.memo .m-ecol h3 { font-family: var(--serif); font-size: 20px;
  margin: 0 0 10px; }
.memo .m-ecol p { font-size: 14px; color: var(--ink-1);
  line-height: 1.6; margin: 0; }

.memo .m-band { max-width: 980px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 6vw, 72px) 0; }

.memo .m-pricing { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; }
.memo .m-pricing .card { background: var(--paper-2);
  border: 1px solid var(--line-ink); border-radius: 2px;
  color: var(--ink-0); box-shadow: none; }
.memo .m-pricing .card.featured { border: 2px solid var(--ink-0);
  box-shadow: 6px 6px 0 rgba(27,26,23,.12); }
.memo .m-pricing h3 { font-family: var(--serif); }
.memo .m-pricing .amount { font-family: var(--serif); font-size: 34px;
  font-weight: 700; }
.memo .m-pricing .amount small { font-size: 14px;
  color: var(--ink-faint); }
.memo .m-pricing ul { padding-left: 18px; color: var(--ink-1);
  font-size: 13px; line-height: 1.7; }
.memo .m-pricing .btn { background: var(--ink-0); color: var(--paper);
  border-radius: 3px; border: 1px solid var(--ink-0); }
.memo .m-pricing .btn:hover { background: #33312c; }

.memo .m-footer { max-width: 980px; margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(20px, 6vw, 72px) 48px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
  border-top: 2px solid var(--ink-0); margin-top: 56px; }

@media (max-width: 820px) {
  .memo .m-feature, .memo .m-feature.flip {
    grid-template-columns: 1fr; }
  .memo .m-feature.flip .m-copy { order: 0; }
}

/* ===== memo paper skin: component overrides (light theme only) ===== */
html[data-theme="light"] .page-head h1,
html[data-theme="light"] .big-display,
html[data-theme="light"] h2 {
  font-family: var(--display); font-weight: 600;
  letter-spacing: -.012em; }
html[data-theme="light"] .card { box-shadow: none; }
html[data-theme="light"] .btn.primary { border-radius: 3px; }
html[data-theme="light"] .btn { border-radius: 3px; }
html[data-theme="light"] .sidebar { border-right: 1px solid var(--line); }
html[data-theme="light"] .topbar { border-bottom: 1px solid var(--line); }
html[data-theme="light"] .chip { border-radius: 2px; }

/* verdict stamps — the memo's language inside the app */
.stamp-sm { display: inline-block; font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; padding: 3px 8px;
  border: 1.5px solid currentColor; border-radius: 2px;
  white-space: nowrap; }
.stamp-sm.go { color: var(--good); }
.stamp-sm.wait { color: var(--warn); }
.stamp-sm.no { color: var(--bad); }
.stamp-sm.run { color: var(--accent-ink); }
.stamp-sm.mut { color: var(--ink-3); }
.verdict-cell { display: flex; flex-direction: column; gap: 3px; }
.verdict-cell small { color: var(--ink-3); font-size: 10.5px;
  font-family: var(--mono); }

/* desk layout helpers */
.desk-capabilities summary { cursor: pointer; user-select: none;
  color: var(--ink-3); font-size: 12px; text-transform: uppercase;
  letter-spacing: .09em; font-weight: 650; padding: 6px 0; }
.desk-capabilities { margin-top: 24px; }
