/* Debrief — "field notes" design system.
   Customers' words are set in an editorial serif; the instrument around them is precise sans + mono.
   Warm neutrals, monochrome ink actions, one signal-orange accent used only for what matters.
   Every colour is a token; components never use raw hex. */

:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --hover: #eef0f3;
  --border: #e6e8eb;
  --border-strong: #d5d8dd;
  --text: #0b0c0e;
  --text-2: #3c4149;
  --text-muted: #5f6670;
  --ink: #0b0c0e;
  --ink-hover: #26282d;
  --on-ink: #ffffff;
  --accent: #2563eb;
  --accent-text: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --ring: #2563eb;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #a16207;
  --warning-soft: #fef9c3;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --seg-1: #3c4149;
  --seg-2: #7c838d;
  --seg-3: #aab0b8;
  --seg-4: #d5d8dd;
  --scrim: rgba(11, 12, 14, 0.45);
  --shadow-pop: 0 16px 48px rgba(11, 12, 14, 0.14), 0 0 0 1px var(--border-strong);
  --skeleton: #eceef1;
  --glow: rgba(37, 99, 235, 0.10);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar: 240px;
  --icon: 16px;
  --dur-fast: 120ms;
  --dur: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090a;
  --surface: #0f1011;
  --surface-2: #141517;
  --hover: #1a1b1e;
  --border: #212327;
  --border-strong: #2e3036;
  --text: #f7f8f8;
  --text-2: #d0d6e0;
  --text-muted: #8a8f98;
  --ink: #f7f8f8;
  --ink-hover: #ffffff;
  --on-ink: #08090a;
  --accent: #4f8cff;
  --accent-text: #8ab4ff;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --ring: #6b9fff;
  --success: #4cc38a;
  --success-soft: rgba(76, 195, 138, 0.12);
  --warning: #f2c94c;
  --warning-soft: rgba(242, 201, 76, 0.12);
  --danger: #ff7a7a;
  --danger-soft: rgba(255, 122, 122, 0.12);
  --seg-1: #c9ccd3;
  --seg-2: #8a8f98;
  --seg-3: #5a5e66;
  --seg-4: #34373d;
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border-strong);
  --skeleton: #17181b;
  --glow: rgba(79, 140, 255, 0.16);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* component display rules must never un-hide */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 0.875rem/1.55 var(--font-sans);
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
svg.icon { width: var(--icon); height: var(--icon); flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--text-muted); }
.eyebrow { font: 500 0.75rem/1.4 var(--font-sans); color: var(--text-muted); letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; }
.skip-link:focus { top: var(--space-2); }
kbd { font: 500 0.6875rem/1 var(--font-mono); color: var(--text-muted); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--surface); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
@media (min-width: 1024px) { .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); } }

.sidebar {
  display: none; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  flex-direction: column; gap: var(--space-5); padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--border); background: var(--bg);
}
@media (min-width: 1024px) { .sidebar { display: flex; } }
.sidebar.open { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; box-shadow: var(--shadow-pop); animation: slide-in var(--dur) var(--ease-out); }
@keyframes slide-in { from { transform: translateX(-12px); opacity: 0; } }
.sidebar-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 55; animation: fade var(--dur) var(--ease); }
@keyframes fade { from { opacity: 0; } }

.brand { display: flex; align-items: center; gap: 10px; padding: var(--space-1) var(--space-2); text-decoration: none; min-height: 36px; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.brand-name { font-weight: 600; letter-spacing: -0.02em; font-size: 0.9375rem; }
.brand-workspace { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 400; line-height: 1.2; }

.search-trigger {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 34px; padding: 0 var(--space-2) 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted);
  cursor: pointer; text-align: left; transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text); }
.search-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-group { display: grid; gap: 1px; }
.nav-label { padding: 0 var(--space-2) var(--space-1); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 var(--space-2);
  border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 450;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.nav-item .count { margin-left: auto; font: 0.75rem var(--font-mono); color: var(--text-muted); }
.nav-item .swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; margin: 0 4px; }

.sidebar-foot { margin-top: auto; display: grid; gap: 1px; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex: none; margin: 0 5px; }
.status-dot.on { background: var(--success); }
.nav-button { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }

.mobilebar { display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-3); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.mobilebar .brand { margin-right: auto; }
@media (min-width: 1024px) { .mobilebar { display: none; } }

.content { min-width: 0; }
main { max-width: 1080px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); }
@media (min-width: 768px) { main { padding: var(--space-7) var(--space-6) var(--space-8); } }
main:focus { outline: none; }
.page-enter { animation: enter 320ms var(--ease-out) both; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Page header ---------- */
.page-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-6); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: 0.8125rem; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
.page-title { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.025em; }
.page-sub { color: var(--text-muted); margin-top: var(--space-1); max-width: 56ch; }

/* ---------- Editorial headline (overview) ---------- */
.headline { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.875rem, 3.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.035em; max-width: 24ch; text-wrap: balance; color: var(--text); }
.headline em { font-style: normal; color: var(--accent-text); }
.statline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.stat { display: grid; gap: 2px; }
.stat-value { font: 500 1.125rem/1.2 var(--font-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 0.75rem; }

.section { margin-top: var(--space-7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.section-title { font-size: 0.875rem; font-weight: 500; }
.split { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); } }

/* Weekly trend (HTML columns) */
.trend { margin: 0; }
.trend-cols { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 14px); align-items: end; }
.trend-col { display: grid; grid-template-rows: 16px 112px auto; gap: 6px; text-align: center; animation: enter 500ms var(--ease-out) both; }
.trend-num { font: 500 0.6875rem/16px var(--font-mono); color: var(--text-2); }
.trend-track { position: relative; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); }
.trend-total { position: relative; width: 100%; border-radius: 3px 3px 0 0; background: var(--seg-4); display: flex; align-items: flex-end; overflow: hidden; transform-origin: bottom; animation: rise 600ms var(--ease-out) both; transition: background-color var(--dur-fast) var(--ease); }
.trend-done { width: 100%; background: var(--seg-2); }
.trend-col:hover .trend-total { background: var(--seg-3); }
.trend-col.now .trend-done { background: var(--accent); }
.trend-label { font: 0.6875rem var(--font-mono); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes rise { from { transform: scaleY(0.4); opacity: 0; } }
.legend { display: inline-flex; gap: var(--space-4); font-size: 0.75rem; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.key-total { background: var(--seg-4); }
.key-done { background: var(--seg-2); }

/* Reasons: one stacked bar + ranked legend (numbers always visible) */
.stack-bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.stack-bar span { display: block; height: 100%; transform-origin: left; animation: grow 700ms var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.reasons { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.reason-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); min-height: 40px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; padding: 0 var(--space-1); border-radius: 0; transition: background-color var(--dur-fast) var(--ease); }
.reason-row:hover { background: var(--hover); }
.reason-row .swatch { width: 10px; height: 10px; border-radius: 2px; }
.reason-row .label { font-weight: 450; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reason-row .num { color: var(--text-muted); font-size: 0.8125rem; }
.reason-row .num strong { color: var(--text); font-weight: 500; }

/* Quotes: the customers' own words, set large */
.quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.pull { margin: 0; position: relative; padding-left: 18px; }
.pull::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--accent); }
.pull p { font: 500 1.125rem/1.4 var(--font-sans); letter-spacing: -0.015em; color: var(--text); text-wrap: pretty; }
.pull footer { margin-top: var(--space-2); font-size: 0.8125rem; color: var(--text-muted); }
.pull footer a { text-decoration: none; color: var(--text-2); }
.pull footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- List (Linear-style rows, no card chrome) ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.segmented { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { border: 0; background: transparent; min-height: 28px; padding: 0 10px; border-radius: 4px; color: var(--text-muted); cursor: pointer; font-weight: 450; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.segmented .num { font-size: 0.6875rem; color: var(--text-muted); margin-left: 4px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.8125rem; }
.filter-chip a { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; color: var(--text-muted); }
.filter-chip a:hover { background: var(--hover); color: var(--text); }

.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search input { padding-left: 32px; min-height: 32px; width: 220px; max-width: 100%; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.list-row { border-bottom: 1px solid var(--border); animation: enter 360ms var(--ease-out) both; }
.list-row a { display: grid; grid-template-columns: 28px minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 96px 72px 64px; align-items: center; gap: var(--space-3); min-height: 52px; padding: 0 var(--space-2); text-decoration: none; color: inherit; transition: background-color var(--dur-fast) var(--ease); }
.list-row a:hover { background: var(--hover); }
.list-row .who { min-width: 0; }
.list-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list-row .sub { color: var(--text-muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list-row .num { text-align: right; color: var(--text-2); font-size: 0.8125rem; }
.list-row .date { text-align: right; color: var(--text-muted); font-size: 0.8125rem; }
@media (max-width: 767px) {
  .list-row a { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 2px; padding: var(--space-3) var(--space-2); }
  .list-row .col-reason, .list-row .date, .list-row .col-score { display: none; }
  .list-row .col-status { grid-column: 2; grid-row: 2; }
  .list-row .num { grid-column: 3; grid-row: 1; }
}
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font: 500 0.6875rem var(--font-mono); color: var(--text-2); text-transform: uppercase; }

/* ---------- Status & tags ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; }
.status svg.icon { width: 14px; height: 14px; }
.status-completed svg { color: var(--success); }
.status-in_progress svg { color: var(--warning); }
.status-sent svg { color: var(--text-muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); font-size: 0.75rem; font-weight: 450; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag .swatch { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.tag-empty { color: var(--text-muted); font-size: 0.8125rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 500 0.8125rem var(--font-sans); cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn kbd { margin-left: 2px; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover:not(:disabled) { background: var(--ink-hover); }
.btn-primary kbd { background: transparent; color: inherit; opacity: 0.7; border-color: currentColor; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--hover); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.icon-btn { min-width: 32px; padding: 0; }
.btn-lg { min-height: 44px; padding: 0 18px; font-size: 0.875rem; }
@media (pointer: coarse) { .btn, .nav-item, .segmented button, .search-trigger { min-height: 44px; } .icon-btn { min-width: 44px; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field > label { font-weight: 500; font-size: 0.8125rem; color: var(--text-2); }
.hint { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 400 16px/1.5 var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (min-width: 768px) { .input, select.input, textarea.input { font-size: 0.875rem; } }
.input::placeholder { color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.6; }
.input:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-muted)); }
.input:focus { outline: none; border-color: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 0.8125rem; font-weight: 500; }
.field-error svg.icon { width: 14px; height: 14px; }
.form-grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* ---------- Dialogs, palette, toasts ---------- */
dialog { border: 0; padding: 0; border-radius: 12px; width: min(480px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: var(--scrim); }
dialog[open] { animation: pop 220ms var(--ease-out); }
dialog[open]::backdrop { animation: fade 220ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.dialog-body { padding: var(--space-5); display: grid; gap: var(--space-4); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.dialog-title { font-size: 1rem; font-weight: 500; }
.dialog-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 12px 12px; }

.palette { width: min(560px, calc(100% - 24px)); margin-top: 12vh; }
.palette-input { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.palette-input .icon { color: var(--text-muted); }
.palette-input input { flex: 1; min-height: 52px; border: 0; background: transparent; color: var(--text); font: 400 1rem var(--font-sans); outline: none; }
.palette-list { list-style: none; margin: 0; padding: var(--space-2); max-height: min(52vh, 420px); overflow-y: auto; }
.palette-group { padding: var(--space-2) var(--space-2) var(--space-1); }
.palette-item { display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2); }
.palette-item[aria-selected="true"] { background: var(--hover); color: var(--text); }
.palette-item .meta { margin-left: auto; display: flex; gap: 4px; color: var(--text-muted); font-size: 0.75rem; }
.palette-empty { padding: var(--space-5); text-align: center; color: var(--text-muted); }
.palette-foot { display: flex; gap: var(--space-4); padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.75rem; }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }

.toast { position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: var(--space-2); padding: 10px 14px; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); font-size: 0.8125rem; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); animation: toast-in 260ms var(--ease-out); }
.toast svg.icon { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Empty & loading ---------- */
.empty { padding: var(--space-8) var(--space-4); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty .serif { font-size: 1.5rem; line-height: 1.15; }
.empty p { color: var(--text-muted); margin: var(--space-2) auto 0; max-width: 42ch; }
.empty .row { justify-content: center; margin-top: var(--space-5); }
.skeleton { background: var(--skeleton); border-radius: 4px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.error-state { padding: var(--space-6); border: 1px solid var(--danger-soft); background: var(--danger-soft); border-radius: var(--radius); color: var(--danger); display: flex; gap: var(--space-2); align-items: flex-start; }

/* ---------- Detail page ---------- */
.detail { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .detail { grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-8); } }
.person { display: flex; align-items: center; gap: var(--space-3); }
.person .avatar { width: 40px; height: 40px; font-size: 0.8125rem; }
.person h1 { font-size: 1.375rem; letter-spacing: -0.025em; }
.verdict { margin-top: var(--space-6); padding: var(--space-5) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.verdict .pull p { font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.22; font-weight: 600; letter-spacing: -0.03em; }
.verdict .pull { padding-left: 20px; }
.verdict-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); padding-left: 20px; color: var(--text-2); }
.verdict-meta strong { font-weight: 500; color: var(--text); }
.waiting { margin-top: var(--space-6); padding: var(--space-5); border: 1px dashed var(--border-strong); border-radius: var(--radius); display: grid; gap: var(--space-3); }

.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.turn { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); }
.turn-who { font: 500 0.6875rem/1.9 var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn-q .turn-text { color: var(--text-2); }
.turn-a .turn-text { font: 500 1rem/1.5 var(--font-sans); color: var(--text); letter-spacing: -0.01em; }
.turn-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.props { display: grid; gap: var(--space-5); align-content: start; }
@media (min-width: 1024px) { .props { position: sticky; top: var(--space-6); border-left: 1px solid var(--border); padding-left: var(--space-5); } }
dl.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px var(--space-3); margin: 0; font-size: 0.8125rem; }
dl.facts dt { color: var(--text-muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; color: var(--text); }
.link-box { display: flex; gap: var(--space-2); align-items: center; }
.link-box .input { font: 0.75rem var(--font-mono); min-height: 32px; }

/* ---------- Win-back ---------- */
.composer-grid { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .composer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); } }
.preview { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; align-self: start; }
@media (min-width: 1024px) { .preview { position: sticky; top: var(--space-6); } }
.preview-head { display: grid; gap: 6px; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.preview-head div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-2); }
.preview-head dt, .preview-head .k { color: var(--text-muted); }
.preview-subject { font-weight: 500; color: var(--text); }
.preview-body { padding: var(--space-5); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.65; color: var(--text-2); min-height: 220px; }
.preview-body mark { background: var(--accent-soft); color: var(--text); border-radius: 3px; padding: 0 2px; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3) var(--space-2) var(--space-5); border-top: 1px solid var(--border); background: var(--bg); font-size: 0.75rem; color: var(--text-muted); }
.recipients { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.recipients li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history li { grid-template-columns: minmax(0, 1fr) auto; }
.audience { font: 600 1.25rem/1.25 var(--font-display); letter-spacing: -0.025em; }
.audience em { font-style: normal; font-family: var(--font-mono); font-size: 0.85em; letter-spacing: -0.03em; color: var(--accent-text); }

/* ---------- Customer interview (public) ---------- */
.iv { max-width: 600px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); min-height: 100dvh; display: flex; flex-direction: column; }
.iv-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-8); font-size: 0.8125rem; color: var(--text-muted); }
.iv-product { color: var(--text); font-weight: 500; }
.steps { display: flex; gap: 4px; align-items: center; }
.steps span { width: 20px; height: 3px; border-radius: 2px; background: var(--border-strong); transition: background-color var(--dur) var(--ease); }
.steps span.done { background: var(--text); }
.steps span.now { background: var(--accent); }
.iv-earlier { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-3); }
.iv-earlier li { display: grid; gap: 2px; padding-left: var(--space-3); border-left: 2px solid var(--border-strong); font-size: 0.8125rem; color: var(--text-muted); }
.iv-earlier li strong { font-weight: 450; color: var(--text-2); }
.iv-from { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: var(--space-3); display: flex; align-items: center; gap: var(--space-2); }
.iv-from .avatar { width: 22px; height: 22px; font-size: 0.625rem; }
.iv-question { font: 600 clamp(1.5rem, 4.6vw, 2.125rem)/1.15 var(--font-display); letter-spacing: -0.035em; text-wrap: balance; color: var(--text); }
.iv-question.swap { animation: enter 420ms var(--ease-out) both; }
.iv-thinking { display: grid; gap: 10px; padding: 6px 0; }
.iv-thinking .skeleton { height: 28px; }
.iv-form { margin-top: var(--space-6); display: grid; gap: var(--space-3); }
.iv-form textarea.input { min-height: 140px; font-size: 1.0625rem; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.iv-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.iv-hint { color: var(--text-muted); font-size: 0.75rem; display: flex; align-items: center; gap: 6px; }
@media (pointer: coarse), (max-width: 640px) { .iv-hint { display: none; } }
.iv-done { margin: var(--space-4) 0 var(--space-7); animation: enter 480ms var(--ease-out) both; }
.iv-done .iv-question { margin-bottom: var(--space-3); }
.iv-done p:not(.iv-question) { color: var(--text-muted); font-size: 1rem; max-width: 44ch; }
.iv-foot { margin-top: auto; padding-top: var(--space-8); font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.iv-foot .brand-mark { width: 14px; height: 14px; }

/* ---------- Settings ---------- */
.settings { max-width: 720px; }
.settings-group { margin-top: var(--space-7); display: grid; gap: 0; }
.settings-group > .section-title { margin-bottom: var(--space-1); }
.settings-note { margin-bottom: var(--space-3); font-size: 0.8125rem; }
.settings-group .row.end { margin-top: var(--space-4); }
.setting { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2) var(--space-6); align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.settings-group > .setting:first-of-type { border-top: 1px solid var(--border); }
@media (min-width: 640px) { .setting { grid-template-columns: minmax(0, 1fr) minmax(0, 280px); } }
.setting-title { font-size: 0.875rem; font-weight: 500; }
.setting p { font-size: 0.8125rem; margin-top: 2px; }
.setting-control { display: flex; justify-content: flex-start; }
@media (min-width: 640px) { .setting-control { justify-content: flex-end; } }
.setting-control .field { width: 100%; }
.input:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Auth ---------- */
.auth { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.auth-main { display: flex; flex-direction: column; padding: var(--space-5) var(--space-4); max-width: none; margin: 0; }
@media (min-width: 768px) { .auth-main { padding: var(--space-6) var(--space-7); } }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: var(--space-7) 0; display: grid; gap: var(--space-5); animation: enter 420ms var(--ease-out) both; }
.auth-head { display: grid; gap: var(--space-2); }
.auth-title { font-size: 2.25rem; line-height: 1.05; letter-spacing: -0.02em; }
.auth-submit { width: 100%; margin-top: var(--space-2); }
.auth-switch { color: var(--text-muted); font-size: 0.8125rem; }
.auth-switch a { color: var(--text); text-underline-offset: 3px; }
.auth-legal { color: var(--text-muted); font-size: 0.75rem; }
.pw { position: relative; }
.pw .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 28px; font-size: 0.75rem; }
.pw-toggle:active:not(:disabled) { transform: translateY(-50%); }
.setup-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--space-2); color: var(--text-2); }
.setup-steps a { color: var(--text); }
.auth-art { display: none; position: relative; overflow: hidden; padding: var(--space-8) var(--space-7); background: var(--surface-2); border-left: 1px solid var(--border); flex-direction: column; justify-content: center; gap: var(--space-8); }
@media (min-width: 1024px) { .auth-art { display: flex; } }
.auth-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 30% 20%, var(--glow), transparent 70%), linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 48px 48px; mask-image: radial-gradient(70% 70% at 40% 40%, #000 30%, transparent 85%); opacity: 0.7; }
.auth-art::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--gx, 40%) var(--gy, 35%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
/* Card deck: drag the top card away, tilt follows the pointer (see auth-art.js). */
.deck-wrap { position: relative; z-index: 1; width: min(100%, 440px); perspective: 1100px; }
.deck { position: relative; height: 260px; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 300ms var(--ease-out); touch-action: none; }
.deck-card { --depth: 0; position: absolute; inset: 0; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.45); transform: translateY(calc(var(--depth) * -14px)) scale(calc(1 - var(--depth) * 0.05)); opacity: calc(1 - var(--depth) * 0.28); transition: transform 420ms var(--ease-out), opacity 420ms var(--ease-out), box-shadow 200ms; user-select: none; }
.deck-card.is-top { cursor: grab; }
.deck-card > * { transition: opacity 260ms var(--ease-out); }
.deck-card:not(.is-top) > * { opacity: 0; }
.deck-card.is-top:hover { box-shadow: 0 32px 64px -24px rgb(0 0 0 / 0.55); }
.deck-card.is-dragging { cursor: grabbing; transition: none; }
.deck-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.deck-card .pull { margin: 0; flex: 1; }
.deck-card .pull p { margin: 0; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.deck-top, .deck-foot { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: 0.75rem; }
.deck-meta, .deck-hint { margin-left: auto; }
.deck-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); animation: pulse 1.8s ease-in-out infinite; }
.deck-hint { opacity: 0; transition: opacity 200ms; }
.deck-card.is-top:hover .deck-hint { opacity: 1; }
.deck-caption { margin: var(--space-5) 0 0; color: var(--text-muted); font-size: 0.75rem; text-align: center; }
@media (prefers-reduced-motion: reduce) { .deck, .deck-card { transition: none; } .deck-dot { animation: none; } }
.auth-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); color: var(--text-2); position: relative; z-index: 1; }
.auth-steps .mono { color: var(--accent-text); margin-right: var(--space-3); font-size: 0.75rem; }

/* ---------- Landing page (Linear / Framer direction) ---------- */
.lp main { max-width: none; padding: 0; margin: 0; }
.lp { overflow-x: clip; }
.lp-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
@media (min-width: 768px) { .lp-wrap { padding-inline: 32px; } }

.lp-nav { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.lp-nav.scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--border); }
.lp-nav-inner { display: flex; align-items: center; gap: var(--space-6); min-height: 60px; }
.lp-links { display: none; gap: var(--space-5); }
.lp-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8125rem; font-weight: 500; transition: color var(--dur-fast) var(--ease); }
.lp-links a:hover { color: var(--text); }
@media (min-width: 860px) { .lp-links { display: flex; } }
.lp-actions { margin-left: auto; display: flex; gap: var(--space-2); }

/* Hero */
.lp-hero { position: relative; text-align: center; padding-top: clamp(64px, 11vw, 128px); }
.lp-hero::before { content: ""; position: absolute; inset: -120px 0 auto; height: 720px; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 55% at 50% 0%, var(--glow), transparent 70%); }
.lp-pill { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 30px; padding: 0 12px 0 6px; border: 1px solid var(--border-strong); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text-2); font-size: 0.8125rem; text-decoration: none; transition: border-color var(--dur-fast) var(--ease); }
.lp-pill:hover { border-color: var(--text-muted); }
.lp-pill .new { font: 500 0.6875rem var(--font-mono); padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.lp-display { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.75rem, 8vw, 5.5rem); line-height: 0.98; letter-spacing: -0.045em; margin: var(--space-5) auto 0; max-width: 15ch; text-wrap: balance;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 52%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lede { font-size: clamp(1rem, 1.5vw, 1.1875rem); line-height: 1.55; color: var(--text-muted); max-width: 52ch; margin: var(--space-5) auto 0; }
.lp-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-6); }
.lp-fine { color: var(--text-muted); font-size: 0.8125rem; margin-top: var(--space-3); }
.btn-pill { border-radius: 999px; }

/* Product video frames */
.lp-stage { perspective: 1800px; margin-top: clamp(48px, 7vw, 88px); }
.lp-frame { position: relative; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent), 0 40px 120px -40px rgba(0, 0, 0, 0.7);
  transform-origin: 50% 0; transform: rotateX(var(--tilt, 0deg)); transition: transform 120ms linear; }
.lp-stage .lp-frame { --tilt: 14deg; }
.lp-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent); }
.lp-frame-glow { position: relative; }
.lp-frame-glow::before { content: ""; position: absolute; inset: 8% 6% -6%; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 70%); filter: blur(30px); }
.lp-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); }
.lp-media video, .lp-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-toggle { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px); color: var(--text); cursor: pointer; opacity: 0; transition: opacity var(--dur) var(--ease); }
.lp-media:hover .vid-toggle, .vid-toggle:focus-visible, .lp-media.paused .vid-toggle { opacity: 1; }
@media (pointer: coarse) { .vid-toggle { opacity: 1; width: 44px; height: 44px; } }
.vid-toggle svg.icon { width: 14px; height: 14px; }
.lp-caption { margin-top: var(--space-3); font-size: 0.75rem; color: var(--text-muted); text-align: center; }

/* Sections */
.lp-section { padding-block: clamp(80px, 11vw, 140px); }
.lp-section + .lp-section { border-top: 1px solid var(--border); }
.lp-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.lp-head.center { margin-inline: auto; text-align: center; }
.lp-eyebrow { font: 500 0.75rem var(--font-mono); color: var(--accent-text); letter-spacing: 0.02em; margin-bottom: var(--space-3); display: block; }
.lp-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance;
  background: linear-gradient(180deg, var(--text) 40%, color-mix(in srgb, var(--text) 58%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-head .lp-lede { margin-left: 0; margin-right: 0; }
.lp-head.center .lp-lede { margin-inline: auto; }

/* Feature grid with live video cards */
.lp-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .lp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lp-card { border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(180deg, var(--surface), var(--bg)); overflow: hidden; display: flex; flex-direction: column; transition: border-color var(--dur) var(--ease); }
.lp-card:hover { border-color: var(--border-strong); }
.lp-card .lp-media { border-bottom: 1px solid var(--border); }
.lp-card-body { padding: var(--space-5); display: grid; gap: var(--space-2); }
.lp-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.lp-card p { color: var(--text-muted); font-size: 0.875rem; }
.lp-card.wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .lp-card.wide { flex-direction: row; } .lp-card.wide .lp-media { flex: 1.6; border-bottom: 0; border-right: 1px solid var(--border); } .lp-card.wide .lp-card-body { flex: 1; align-content: center; padding: var(--space-7); } .lp-card.wide h3 { font-size: 1.375rem; } }

/* Split rows */
.lp-split { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .lp-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); } .lp-split .lp-head { margin-bottom: 0; } }
.kbd-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.kbd-row span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.8125rem; }
.lp-checks { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.lp-checks li { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--text-2); }
.lp-checks svg.icon { color: var(--accent-text); margin-top: 2px; }

/* Comparison */
.lp-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 600px; }
.lp-table th, .lp-table td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.lp-table tr:last-child th, .lp-table tr:last-child td { border-bottom: 0; }
.lp-table thead th { font-weight: 500; font-size: 0.8125rem; color: var(--text-muted); background: var(--surface); }
.lp-table thead th:last-child { color: var(--text); }
.lp-table tbody th { font-weight: 400; color: var(--text-muted); width: 26%; }
.lp-table tbody td { color: var(--text-muted); }
.lp-table tbody td:last-child { color: var(--text); background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* Pricing */
.lp-plans { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); max-width: 880px; margin: 0 auto; }
@media (min-width: 768px) { .lp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-plan { border: 1px solid var(--border); border-radius: 14px; padding: var(--space-6); background: var(--surface); display: grid; gap: var(--space-3); align-content: start; }
.lp-plan-pro { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 30px 80px -40px var(--glow); }
.lp-plan h3 { font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: var(--space-2); }
.lp-plan h3 .tag { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.lp-price { font: 600 2.75rem/1 var(--font-display); letter-spacing: -0.045em; }
.lp-price small { font: 400 0.875rem var(--font-sans); color: var(--text-muted); letter-spacing: 0; }
.lp-plan ul { list-style: none; margin: var(--space-2) 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); color: var(--text-2); font-size: 0.875rem; }
.lp-plan li { display: flex; gap: var(--space-2); align-items: center; }
.lp-plan li svg.icon { color: var(--text-muted); width: 14px; height: 14px; }
.lp-plan .btn { width: 100%; }

/* Closing + footer */
.lp-close { position: relative; text-align: center; padding-block: clamp(100px, 14vw, 180px); border-top: 1px solid var(--border); overflow: hidden; }
.lp-close::before { content: ""; position: absolute; inset: auto 0 -40%; height: 80%; background: radial-gradient(45% 60% at 50% 100%, var(--glow), transparent 70%); pointer-events: none; }
.lp-close .lp-display { font-size: clamp(2.25rem, 6vw, 4.25rem); max-width: 18ch; }
.lp-foot { border-top: 1px solid var(--border); }
.lp-foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); min-height: 72px; font-size: 0.8125rem; }
.lp-foot nav { display: flex; gap: var(--space-5); margin-left: auto; }
.lp-foot nav a { color: var(--text-muted); text-decoration: none; }
.lp-foot nav a:hover { color: var(--text); }

.js .reveal { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), filter 800ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .lp-stage .lp-frame { --tilt: 0deg !important; } .js .reveal { filter: none; } }

/* =====================================================================
   v2: interaction layer, new app surfaces, settings, auth providers
   ===================================================================== */

/* Motion primitives */
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes bar-in { from { transform: scaleX(0); } }
.panel-enter { animation: rise-in 280ms var(--ease-out) both; }

/* Spotlight: a soft light follows the cursor on .spot surfaces */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity var(--dur) var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%); }
.spot:hover::before { opacity: 1; }

/* Buttons: tactile press, danger variants */
.btn-primary { box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }

/* Sidebar extras */
.nav-new { margin-left: auto; font: 500 0.625rem/1 var(--font-mono); padding: 3px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.nav-item svg.icon { transition: transform var(--dur) var(--ease-out); }
.nav-item:hover svg.icon { transform: translateX(1px) scale(1.06); }

/* Toasts */
.toast.toast-error { background: var(--danger); color: #fff; max-width: min(560px, calc(100% - 32px)); }
.toast.out { animation: toast-out 220ms var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }

/* Callouts, banners, pills */
.callout { display: flex; gap: var(--space-2); align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font-size: 0.8125rem; line-height: 1.5; }
.callout svg.icon { margin-top: 2px; color: var(--text-muted); }
.callout a { color: var(--text); text-underline-offset: 3px; }
.callout-ok { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: var(--success-soft); }
.callout-ok svg.icon { color: var(--success); }

/* ---------- Plan & billing, Stripe connect ---------- */
.usage { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.usage-top { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.usage-count { margin-left: auto; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.usage-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: grow 600ms var(--ease-out) both; }
.usage-bar.warn span { background: var(--warning); }
.usage-bar.full span { background: var(--danger); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.seg-btn { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.8125rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background 150ms, color 150ms; }
.seg-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bill-plans { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .bill-plans { grid-template-columns: 1fr 1fr; } }
.bill-plan { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color 150ms, transform 200ms var(--ease-out); }
.bill-plan:hover { border-color: var(--text-muted); }
.bill-plan.current { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.bill-plan h3 { margin: 0; font-size: 1rem; }
.bill-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.bill-price { margin: 0; }
.bill-price span { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bill-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.875rem; color: var(--text-2); flex: 1; }
.bill-perks li { display: flex; gap: 8px; align-items: center; }
.bill-perks svg.icon { color: var(--accent-text); flex: none; }
.bill-plan .btn { width: 100%; justify-content: center; }
.advanced summary { cursor: pointer; color: var(--text-2); font-size: 0.875rem; }
.advanced summary:hover { color: var(--text); }
.plan-banner { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.plan-banner .btn { margin-left: auto; }
.callout-bad { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-soft); color: var(--text); }
.callout-bad svg.icon { color: var(--danger); }
.banner { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px 10px 14px; margin-bottom: var(--space-5); border-radius: var(--radius); font-size: 0.8125rem; animation: rise-in 360ms var(--ease-out) both; }
.banner > span { flex: 1; }
.banner-warn { background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); color: var(--text); }
.banner-warn > svg.icon { color: var(--warning); }
.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 10px 0 6px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.75rem; color: var(--text-muted); }
.pill-on { color: var(--text); border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }

/* Status: failed invite */
.status-failed { color: var(--danger); }
.status-failed svg { color: var(--danger); }

/* Win-back likelihood meter */
.score { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-2); white-space: nowrap; }
.score-bar { width: 32px; height: 4px; border-radius: 2px; background: var(--seg-4); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 2px; transform-origin: left; animation: bar-in 700ms var(--ease-out) both; }
.score-high .score-bar i { background: var(--success); }
.score-mid .score-bar i { background: var(--warning); }
.score-low .score-bar i { background: var(--seg-2); }

/* Overview: biggest-opportunity card */
.insight { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); text-decoration: none; color: inherit; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out); animation: rise-in 500ms 120ms var(--ease-out) both; }
.insight:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.insight-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.insight-icon svg.icon { width: 18px; height: 18px; }
.insight-body { display: grid; gap: 2px; min-width: 0; }
.insight-title { font-weight: 600; font-size: 1rem; letter-spacing: -0.015em; }
.insight-sub { color: var(--text-2); font-size: 0.8125rem; }
.insight-sub strong { color: var(--text); font-weight: 500; }
.insight-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; }
.insight:hover .insight-cta { color: var(--text); }
.insight:hover .insight-cta svg { transform: translateX(2px); }
.insight-cta svg { transition: transform var(--dur) var(--ease-out); }
@media (max-width: 640px) { .insight { grid-template-columns: auto minmax(0, 1fr); } .insight-cta { display: none; } }

/* Customer page: invite delivery */
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.invite-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 0.8125rem; margin-right: auto; }
.invite-email .invite-label svg { color: var(--success); }
.invite-failed { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-soft); }
.invite-failed .invite-label, .invite-failed .invite-label svg { color: var(--danger); }
.invite-logged .invite-label svg { color: var(--warning); }
.invite-error { flex-basis: 100%; order: 3; font-size: 0.8125rem; color: var(--text); }
.invite-error a { color: var(--text); text-underline-offset: 3px; }
.theme-link { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.theme-link:hover { border-bottom-color: var(--text); }

/* Roadmap */
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.rm-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--space-4); align-items: start; padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); animation: rise-in 420ms var(--ease-out) both; transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.rm-card:hover { border-color: var(--border-strong); }
.rm-card[data-status="shipped"] { background: linear-gradient(135deg, var(--success-soft), var(--surface) 60%); border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.rm-rank { font-size: 0.8125rem; color: var(--text-muted); padding-top: 3px; }
.rm-main { display: grid; gap: var(--space-3); min-width: 0; }
.rm-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.rm-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.rm-card[data-status="shipped"] .rm-title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--success) 70%, transparent); text-decoration-thickness: 2px; }
.rm-meter { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto auto; align-items: center; gap: var(--space-3); font-size: 0.8125rem; }
.rm-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rm-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); transform-origin: left; animation: bar-in 900ms var(--ease-out) both; }
.rm-mrr { font-weight: 500; color: var(--text); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { width: 22px; height: 22px; font-size: 0.5625rem; margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.rm-details summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-muted); font-size: 0.8125rem; list-style: none; border-radius: 4px; }
.rm-details summary::-webkit-details-marker { display: none; }
.rm-details summary:hover { color: var(--text); }
.rm-details summary svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease-out); }
.rm-details[open] summary svg { transform: rotate(90deg); }
.rm-people { list-style: none; margin: var(--space-2) 0 0; padding: 0; border-top: 1px solid var(--border); animation: rise-in 260ms var(--ease-out) both; }
.rm-people a { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; font-size: 0.8125rem; }
.rm-people a:hover .rm-quote { color: var(--text); }
.rm-quote { color: var(--text-2); }
.rm-ship { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); font-size: 0.8125rem; animation: rise-in 300ms var(--ease-out) both; }
.rm-ship > span { display: inline-flex; align-items: center; gap: 6px; }
.rm-ship > span svg { color: var(--success); }
.status-seg button[data-status="shipped"][aria-pressed="true"] { color: var(--success); }
.status-seg button[data-status="planned"][aria-pressed="true"] { color: var(--accent-text); }
@media (max-width: 767px) { .rm-card { grid-template-columns: minmax(0, 1fr); } .rm-rank { display: none; } .rm-meter { grid-template-columns: 1fr auto; } .avatar-stack, .rm-count { display: none; } }

/* Ask Debrief */
.ask { max-width: 760px; }
.ask-stage { display: grid; gap: var(--space-4); }
.ask-box { display: flex; align-items: flex-end; gap: var(--space-3); padding: 12px 12px 12px 16px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 40px -24px var(--glow); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ask-box:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border-strong)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 16%, transparent), 0 18px 50px -24px var(--glow); }
.ask-box > svg.icon { color: var(--accent-text); margin-bottom: 9px; width: 18px; height: 18px; }
.ask-input { flex: 1; border: 0; background: transparent; color: var(--text); font: 400 1rem/1.5 var(--font-sans); resize: none; outline: none; padding: 6px 0; max-height: 160px; }
.ask-input::placeholder { color: var(--text-muted); }
.ask-send { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--ink); color: var(--on-ink); cursor: pointer; transition: transform var(--dur-fast) var(--ease), opacity var(--dur) var(--ease); }
.ask-send:hover { transform: translateY(-1px); }
.ask-send:disabled { opacity: 0.4; cursor: wait; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; min-height: 32px; padding: 0 14px; font-size: 0.8125rem; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); animation: rise-in 400ms var(--ease-out) both; }
.chip:nth-child(2) { animation-delay: 60ms; } .chip:nth-child(3) { animation-delay: 120ms; } .chip:nth-child(4) { animation-delay: 180ms; }
.chip:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.thread { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-6); }
.turn-pair { display: grid; gap: var(--space-3); animation: rise-in 380ms var(--ease-out) both; }
.q-bubble { justify-self: end; max-width: 80%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.answer { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-3); }
.answer-mark .brand-mark { width: 24px; height: 24px; }
.answer-body { display: grid; gap: var(--space-2); font-size: 0.9375rem; line-height: 1.65; color: var(--text); }
.answer-body.typing > :last-child::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: pulse 0.9s steps(2) infinite; }
.answer-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.cite { display: inline-flex; align-items: center; min-height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font: 500 0.6875rem var(--font-mono); text-decoration: none; vertical-align: 1px; }
.cite:hover { background: var(--accent); color: #fff; }
.thinking { display: inline-flex; gap: 5px; padding: 8px 0; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: 0.15s; } .thinking i:nth-child(3) { animation-delay: 0.3s; }
.answer-meta { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.badge { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font: 500 0.6875rem var(--font-mono); color: var(--text-muted); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); }
.badge-ai { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.badge svg.icon { width: 12px; height: 12px; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sources a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; font-size: 0.8125rem; border: 1px solid var(--border); background: var(--surface); transition: border-color var(--dur-fast) var(--ease); }
.sources a:hover { border-color: var(--border-strong); }
.src-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Settings v2: tabbed */
.settings { max-width: 1040px; }
.settings-layout { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-5); }
@media (min-width: 900px) { .settings-layout { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-7); } }
.tabs-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 900px) { .tabs-nav { flex-direction: column; position: sticky; top: var(--space-6); align-self: start; } }
.tabs-nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-weight: 450; white-space: nowrap; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.tabs-nav a:hover { color: var(--text); background: var(--hover); }
.tabs-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 500; }
.tabs-nav a[aria-current="page"] svg { color: var(--accent-text); }
#panel .settings-group:first-child { margin-top: 0; }
.save-row { margin-top: var(--space-4); }
.field.stacked { padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.field.stacked textarea { font: 400 0.875rem/1.6 var(--font-mono); }
.inline-form { display: flex; gap: var(--space-2); width: 100%; }
.inline-form .field { flex: 1; }
.test-result:not(:empty) { margin-top: var(--space-3); animation: rise-in 240ms var(--ease-out) both; }
.settings-split { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
.settings-split .iv-preview { max-width: 420px; }
@media (min-width: 1600px) { .settings-split { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .settings-split .iv-preview { position: sticky; top: var(--space-6); } }
.iv-preview { margin: 0; padding: var(--space-5); border: 1px solid var(--border); border-radius: 14px; background: var(--bg); display: grid; gap: var(--space-3); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.6); }
.iv-preview-top { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: var(--text); font-weight: 500; }
.iv-preview-q { font: 600 1.125rem/1.25 var(--font-display); letter-spacing: -0.025em; color: var(--text); text-wrap: balance; animation: rise-in 300ms var(--ease-out); }
.iv-preview-input { display: flex; justify-content: space-between; align-items: center; min-height: 64px; padding: 10px 10px 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text-muted); font-size: 0.8125rem; align-items: flex-end; }
.iv-preview-send { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; transition: background-color var(--dur) var(--ease); }
.iv-preview-send svg.icon { width: 14px; height: 14px; }
.iv-preview-thanks { font-size: 0.75rem; color: var(--text-2); padding: 8px 10px; border-left: 2px solid var(--accent); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.iv-preview figcaption { font-size: 0.6875rem; text-align: center; }
.range-row { display: flex; align-items: center; gap: var(--space-3); width: 100%; }
.range-row .field { flex: 1; }
.range { width: 100%; accent-color: var(--accent); }
.range-out { min-width: 1.5ch; text-align: right; font-size: 0.875rem; }
.color-input { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.switch { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--seg-4); position: relative; cursor: pointer; transition: background-color var(--dur) var(--ease); margin: 0; }
.switch::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, 0.3); transition: transform var(--dur) var(--ease-out); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.switch:disabled { opacity: 0.4; cursor: not-allowed; }
.switch-wrap { display: inline-flex; }
.danger-zone .setting { border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.danger-zone > .section-title { color: var(--danger); }
dl.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 10px var(--space-5); margin: var(--space-3) 0 0; font-size: 0.8125rem; }
dl.shortcuts dt { display: flex; gap: 4px; }
dl.shortcuts dd { margin: 0; color: var(--text-2); }

/* Auth: providers, divider, onboarding */
.oauth { display: grid; gap: var(--space-3); }
.oauth-grid { display: grid; gap: var(--space-2); }
.oauth-btn { width: 100%; justify-content: center; gap: 10px; position: relative; overflow: hidden; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.oauth-btn:hover:not(:disabled) { border-color: var(--text-muted); transform: translateY(-1px); }
.oauth-logo { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.oauth-btn { min-height: 48px; font-size: 0.9375rem; }
/* "Last used" marker, like Supabase's dashboard sign-in */
.oauth-btn, .auth-submit { position: relative; }
.last-used { position: absolute; top: -9px; right: 10px; font: 500 0.625rem/1 var(--font-mono); letter-spacing: 0.02em; padding: 4px 7px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--bg); animation: rise-in 360ms var(--ease-out) both; }
.oauth-github { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.oauth-github:hover:not(:disabled) { background: var(--hover); }
.oauth-hint { font-weight: 400; color: var(--text-2); }
.oauth-hint svg { color: var(--warning); }
.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: 0.75rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.onboarding-dialog { width: min(420px, calc(100% - 32px)); }
.onboarding { gap: var(--space-4); padding: var(--space-6); }
.onboarding-mark .brand-mark { width: 36px; height: 36px; animation: rise-in 500ms var(--ease-out) both; }

/* Landing v2 */
.lp-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.lp-beams { position: absolute; inset: -80px 0 auto; height: 640px; z-index: -1; pointer-events: none; overflow: hidden; mask-image: linear-gradient(#000 40%, transparent); }
.lp-beams span { position: absolute; top: -20%; width: 1px; height: 140%; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 60%, transparent), transparent); opacity: 0.5; animation: beam 7s linear infinite; }
.lp-beams span:nth-child(1) { left: 22%; animation-delay: -1s; }
.lp-beams span:nth-child(2) { left: 50%; animation-delay: -3.5s; animation-duration: 9s; }
.lp-beams span:nth-child(3) { left: 78%; animation-delay: -5s; }
@keyframes beam { from { transform: translateY(-40%); } to { transform: translateY(40%); } }
.lp-rotate { display: inline-block; color: var(--accent-text); -webkit-text-fill-color: var(--accent-text); transition: opacity 260ms var(--ease), transform 260ms var(--ease-out), filter 260ms var(--ease); }
.lp-rotate.out { opacity: 0; transform: translateY(-0.25em); filter: blur(6px); }
.magnetic { transition: transform 220ms var(--ease-out), background-color var(--dur-fast) var(--ease); }
.lp-works { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-6); margin-top: clamp(40px, 6vw, 64px); font: 500 0.875rem var(--font-sans); color: var(--text-2); letter-spacing: -0.01em; }
.lp-works span:not(.muted) { opacity: 0.75; transition: opacity var(--dur) var(--ease); }
.lp-works span:not(.muted):hover { opacity: 1; }
.lp-marquee { overflow: hidden; border-block: 1px solid var(--border); padding-block: var(--space-4); margin-top: clamp(56px, 8vw, 96px); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.lp-marquee-track { display: flex; gap: var(--space-7); width: max-content; animation: marquee 48s linear infinite; }
.lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }
.lp-marquee-track span { white-space: nowrap; color: var(--text-muted); font-size: 0.9375rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.lp-card { transition: border-color var(--dur) var(--ease), transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out); }
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5); }
.lp-card .lp-media video { transition: transform 900ms var(--ease-out); }
.lp-card:hover .lp-media video { transform: scale(1.015); }
.lp-card .lp-media { overflow: hidden; }
@media (min-width: 900px) { .lp-card.wide.reverse { flex-direction: row-reverse; } .lp-card.wide.reverse .lp-media { border-right: 0; border-left: 1px solid var(--border); } }

/* Try-it demo */
.lp-try { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); max-width: 1040px; margin: 0 auto; }
@media (min-width: 900px) { .lp-try { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.try-customer, .try-founder { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: var(--space-6); display: grid; gap: var(--space-5); align-content: start; }
.try-founder { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.try-top { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem; }
.try-top .steps { margin-left: auto; }
.try-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.try-q { font: 600 clamp(1.25rem, 2.4vw, 1.625rem)/1.2 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; min-height: 2.4em; }
.try-q.swap { animation: rise-in 420ms var(--ease-out) both; }
.try-form { display: flex; gap: var(--space-2); }
.try-form .input { min-height: 44px; }
.try-suggest { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.try-card { display: grid; gap: var(--space-3); border-radius: 12px; padding: var(--space-4); border: 1px solid var(--border); background: var(--bg); min-height: 220px; align-content: start; }
.try-card.pulse { animation: card-pulse 900ms var(--ease-out); }
@keyframes card-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.try-card > * { animation: rise-in 360ms var(--ease-out) both; }
.try-card > *:nth-child(2) { animation-delay: 60ms; } .try-card > *:nth-child(3) { animation-delay: 120ms; } .try-card > *:nth-child(4) { animation-delay: 180ms; } .try-card > *:nth-child(5) { animation-delay: 240ms; }
.try-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 0.8125rem; padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.try-quote p { font-size: 1.0625rem; }
.try-empty { align-self: center; text-align: center; font-size: 0.875rem; }

/* ROI */
.roi { display: grid; gap: var(--space-5); padding: var(--space-6); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.roi-field { display: grid; gap: var(--space-2); }
.roi-field label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; color: var(--text-2); font-size: 0.875rem; }
.roi-field output { color: var(--text); font-size: 0.9375rem; }
.roi-out { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.roi-out > div { display: grid; gap: 4px; }
.roi-big { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.04em; color: var(--text); transition: color var(--dur) var(--ease); }
.roi-good { color: var(--success); }
.roi-out .muted { font-size: 0.8125rem; }

/* Pricing toggle, FAQ */
.billing-toggle { display: inline-flex; margin-top: var(--space-5); padding: 3px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); }
.billing-toggle button { border: 0; background: transparent; min-height: 32px; padding: 0 16px; border-radius: 999px; color: var(--text-muted); cursor: pointer; font-weight: 500; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.billing-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.billing-toggle .save { font: 500 0.6875rem var(--font-mono); color: var(--success); margin-left: 4px; }
.billing-toggle button[aria-pressed="true"] .save { color: inherit; opacity: 0.8; }
#pro-price { display: inline-block; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
#pro-price.flip { opacity: 0; transform: translateY(-6px); }
.lp-plan { transition: transform 400ms var(--ease-out), border-color var(--dur) var(--ease); }
.lp-plan:hover { transform: translateY(-3px); }
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-5) 0; cursor: pointer; list-style: none; font-weight: 500; font-size: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.25rem var(--font-mono); color: var(--text-muted); transition: transform var(--dur) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--space-5); color: var(--text-muted); max-width: 62ch; animation: rise-in 280ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .lp-marquee-track { animation: none; flex-wrap: wrap; width: auto; } .lp-beams { display: none; } }

/* =====================================================================
   v3: site chrome (nav menus, footer), marketing pages, showcase, developers
   ===================================================================== */

/* Cross-page transitions: nav and sidebar hold still while content cross-fades */
@view-transition { navigation: auto; }
.site-nav { view-transition-name: site-nav; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
.sidebar-skeleton { display: grid; gap: 10px; padding: 4px 8px; }

.center-text { text-align: center; }
.btn-sm { min-height: 26px; padding: 0 8px; font-size: 0.75rem; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* Nav menus */
.site-menu { display: none; align-items: center; gap: 2px; }
@media (min-width: 900px) { .site-menu { display: flex; } .menu-toggle { display: none; } }
.menu-item { position: relative; }
.menu-trigger, .menu-link { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: 500 0.8125rem var(--font-sans); text-decoration: none; cursor: pointer; transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.menu-trigger:hover, .menu-link:hover, .menu-trigger[aria-expanded="true"] { color: var(--text); background: var(--hover); }
.chev { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform var(--dur) var(--ease-out); }
.menu-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drop { position: absolute; top: calc(100% + 8px); left: -8px; width: 340px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 14px; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; transform: translateY(6px) scale(0.98); transform-origin: top left; transition: opacity 160ms var(--ease), transform 220ms var(--ease-out), visibility 0s linear 220ms; z-index: 50; }
.drop::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; } /* hover bridge */
.drop-wide { width: 560px; }
.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.menu-trigger[aria-expanded="true"] + .drop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) { .menu-item:hover .drop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } .menu-item:hover .chev { transform: rotate(180deg); } }
.drop-link { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); transition: background-color var(--dur-fast) var(--ease); }
.drop-link:hover, .drop-link:focus-visible { background: var(--hover); }
.drop-link strong { display: block; font-size: 0.8125rem; font-weight: 600; }
.drop-link small { display: block; color: var(--text-muted); font-size: 0.75rem; line-height: 1.4; margin-top: 2px; }
.drop-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--accent-text); }
.drop-ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-link:hover .drop-ic { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.drop-foot { display: flex; justify-content: space-between; margin: 6px 2px 0; padding: 10px 10px 4px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.75rem; font-weight: 500; text-decoration: none; }
.drop-foot:hover { color: var(--text); }
.mobile-menu { display: grid; gap: 2px; padding: 8px 20px 16px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu a { padding: 12px 4px; color: var(--text-2); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* Footer */
.site-foot { position: relative; overflow: hidden; border-top: 1px solid var(--border); padding-top: clamp(56px, 8vw, 96px); background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--surface) 70%, var(--bg))); }
.foot-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--border); border-radius: 20px; background: radial-gradient(80% 140% at 0% 0%, var(--glow), transparent 60%), var(--surface); }
.foot-cta-title { font: 600 clamp(1.5rem, 3vw, 2.25rem)/1.1 var(--font-display); letter-spacing: -0.035em; max-width: 22ch; }
.foot-cta .muted { margin-top: 8px; }
.foot-cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.foot-grid { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: repeat(2, minmax(0, 1fr)); padding: clamp(48px, 7vw, 80px) 0 var(--space-7); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); } }
.foot-brand { grid-column: 1 / -1; display: grid; gap: var(--space-4); align-content: start; max-width: 380px; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }
.foot-brand .brand { padding: 0; }
.foot-brand > p { font-size: 0.875rem; line-height: 1.6; }
.foot-news { display: grid; gap: 8px; }
.foot-news label { font-size: 0.75rem; font-weight: 500; color: var(--text-2); }
.foot-news-row { display: flex; gap: 8px; }
.foot-news-row .input { min-height: 36px; }
.foot-news-msg { font-size: 0.75rem; min-height: 1.2em; color: var(--text-muted); }
.foot-news-msg[data-state="ok"] { color: var(--success); }
.foot-news-msg[data-state="error"] { color: var(--danger); }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col h3 { font: 500 0.75rem var(--font-mono); color: var(--text); letter-spacing: 0.02em; margin-bottom: 4px; }
.foot-col a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 6px; width: fit-content; transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.foot-col a:hover { color: var(--text); transform: translateX(2px); }
.foot-badge { font: 500 0.625rem var(--font-mono); padding: 2px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) 0; border-top: 1px solid var(--border); font-size: 0.8125rem; }
.foot-bottom-links { display: flex; align-items: center; gap: var(--space-5); }
.foot-bottom-links a { color: var(--text-muted); text-decoration: none; }
.foot-bottom-links a:hover { color: var(--text); }
.foot-theme { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; }
.foot-theme:hover { color: var(--text); border-color: var(--border-strong); }
.foot-theme svg.icon { width: 14px; height: 14px; }
.foot-wordmark { margin: 0 0 -0.18em; font: 700 clamp(5rem, 21vw, 18rem)/0.8 var(--font-display); letter-spacing: -0.07em; text-align: center; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 14%, transparent), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Marketing page hero */
.page-hero { text-align: center; padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(40px, 6vw, 64px); position: relative; }
.page-hero::before { content: ""; position: absolute; inset: -80px 0 auto; height: 520px; z-index: -1; pointer-events: none; background: radial-gradient(45% 55% at 50% 0%, var(--glow), transparent 70%); }
.page-hero .lp-display { font-size: clamp(2.5rem, 6.5vw, 4.5rem); max-width: 18ch; margin-top: var(--space-3); }
.page-hero .lp-eyebrow { margin-bottom: 0; }
.page-hero .billing-toggle, .page-hero .lp-cta { margin-top: var(--space-6); }

/* Pricing page */
.plans3 { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); max-width: 1120px; margin: 0 auto; align-items: start; }
@media (min-width: 960px) { .plans3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { position: relative; display: grid; gap: var(--space-4); padding: var(--space-6); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: transform 400ms var(--ease-out), border-color var(--dur) var(--ease); }
.plan:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.plan-featured { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 45%); box-shadow: 0 40px 100px -50px var(--glow), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.plan-badge { position: absolute; top: -11px; left: var(--space-6); font: 500 0.6875rem var(--font-mono); padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; }
.plan-name { font-size: 1rem; font-weight: 600; }
.plan-for { color: var(--text-muted); font-size: 0.875rem; margin-top: -10px; }
.plan-price { font: 600 3rem/1 var(--font-display); letter-spacing: -0.05em; }
.plan-price span { display: inline-block; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.plan-price span.flip { opacity: 0; transform: translateY(-6px); }
.plan-price small { font: 400 0.875rem var(--font-sans); color: var(--text-muted); letter-spacing: 0; }
.plan .btn { width: 100%; }
.plan-plus { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.875rem; color: var(--text-2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg.icon { color: var(--accent-text); width: 15px; height: 15px; margin-top: 3px; flex: none; }
.plan-table td { text-align: center; color: var(--text-2) !important; background: none !important; }
.plan-table thead th:not(:first-child) { text-align: center; }
.plan-table thead th:nth-child(3) { color: var(--accent-text); }
.plan-table td:nth-child(3) { background: color-mix(in srgb, var(--accent) 5%, transparent) !important; }
.plan-table tr.group th { font: 500 0.75rem var(--font-mono); color: var(--text) !important; background: var(--surface-2); padding-top: 12px; padding-bottom: 12px; }
.pricing-teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.pricing-teaser .lp-lede { margin: var(--space-3) 0 0; max-width: 56ch; }
.pricing-teaser-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Product showcase: tabs + one player */
.showcase { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .showcase { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-7); } }
.showcase-tabs { display: grid; gap: 4px; }
@media (max-width: 1023px) { .showcase-tabs { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; scrollbar-width: none; } }
.showcase-tab { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; text-align: left; padding: 14px 16px 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-muted); cursor: pointer; overflow: hidden; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.showcase-tab:hover { background: var(--hover); color: var(--text-2); }
.showcase-tab[aria-selected="true"] { background: var(--surface); border-color: var(--border); color: var(--text); }
.st-num { font-size: 0.75rem; padding-top: 2px; }
.showcase-tab[aria-selected="true"] .st-num { color: var(--accent-text); }
.st-body strong { display: block; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.st-body small { display: block; margin-top: 4px; font-size: 0.8125rem; line-height: 1.45; color: var(--text-muted); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 320ms var(--ease-out), opacity 240ms var(--ease); }
.showcase-tab[aria-selected="true"] small { max-height: 4.5em; opacity: 1; }
.st-bar { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--border); opacity: 0; }
.st-bar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 250ms linear; }
.showcase-tab[aria-selected="true"] .st-bar { opacity: 1; }
.showcase-panel .lp-frame { box-shadow: 0 40px 120px -50px rgba(0, 0, 0, 0.7), 0 0 0 1px color-mix(in srgb, var(--text) 4%, transparent); }

/* Feature rows with images */
.feature-rows { display: grid; gap: clamp(64px, 9vw, 120px); margin-top: clamp(80px, 11vw, 140px); }
.feature-row { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .feature-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); } .feature-row.flip .feature-copy { order: 2; } }
.feature-copy { display: grid; gap: var(--space-3); align-content: center; }
.feature-copy .lp-eyebrow { margin-bottom: 0; }
.feature-title { font: 600 clamp(1.5rem, 2.8vw, 2.25rem)/1.1 var(--font-display); letter-spacing: -0.035em; text-wrap: balance; }
.feature-copy .lp-checks { margin-top: var(--space-2); }
.feature-copy .btn { justify-self: start; margin-top: var(--space-2); }
.feature-shot { margin: 0; border-radius: 16px; border: 1px solid var(--border-strong); overflow: hidden; background: var(--surface); box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.7); transition: transform 600ms var(--ease-out); }
.feature-shot:hover { transform: translateY(-4px) scale(1.005); }
.feature-shot img { display: block; width: 100%; height: auto; }
.code-card { margin: 0; border-radius: 16px; border: 1px solid var(--border-strong); background: #0b0c0e; overflow: hidden; box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.7); }
.code-top { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.code-top i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.code-top span { margin-left: auto; font-size: 0.6875rem; color: #8a8f98; }
.code-card pre { margin: 0; padding: 20px; color: #d0d6e0; font-size: 0.8125rem; line-height: 1.7; overflow-x: auto; }
.c-mute { color: #5a5e66; } .c-acc { color: #8ab4ff; } .c-ok { color: #4cc38a; }
.slack-card { margin: 0; padding: var(--space-5); border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; gap: 10px; font-size: 0.9375rem; box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.7); max-width: 560px; }
.slack-head { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.slack-app { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 0.8125rem; }
.slack-tag { font: 600 0.625rem var(--font-sans); padding: 1px 4px; border-radius: 3px; background: var(--surface-2); color: var(--text-muted); }
.slack-card blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.slack-link { color: var(--accent-text); font-size: 0.875rem; }

/* Docs, developers, legal: a sticky contents rail + readable prose */
.docs-layout { display: grid; gap: var(--space-7); grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(80px, 10vw, 140px); }
@media (min-width: 960px) { .docs-layout { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-8); } }
.docs-toc { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (min-width: 960px) { .docs-toc { flex-direction: column; flex-wrap: nowrap; gap: 2px; position: sticky; top: 84px; align-self: start; } }
.docs-toc a { color: var(--text-muted); text-decoration: none; font-size: 0.8125rem; padding: 5px 10px; border-radius: 6px; border-left: 2px solid transparent; transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.docs-toc a:hover { color: var(--text); background: var(--hover); }
.docs-toc a.active { color: var(--text); border-left-color: var(--accent); background: var(--surface-2); }
.toc-label { font: 500 0.6875rem var(--font-mono); color: var(--text); padding: 12px 10px 4px; }
.prose { max-width: 760px; font-size: 0.9375rem; line-height: 1.7; color: var(--text-2); }
.prose section { scroll-margin-top: 90px; padding-bottom: var(--space-7); margin-bottom: var(--space-7); border-bottom: 1px solid var(--border); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 var(--space-4); color: var(--text); }
.prose h3 { font-size: 1rem; font-weight: 600; margin: var(--space-6) 0 var(--space-2); color: var(--text); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-4); }
.prose ol, .prose ul { padding-left: 1.3rem; display: grid; gap: 8px; }
.prose li::marker { color: var(--text-muted); }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { font: 0.8125rem var(--font-mono); padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); overflow-wrap: anywhere; }
.prose pre { margin: 0 0 var(--space-4); padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; }
.prose pre code { padding: 0; border: 0; background: none; font-size: 0.8125rem; line-height: 1.7; overflow-wrap: normal; }
.prose .note { padding: 12px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--accent-soft); color: var(--text); font-size: 0.875rem; }
.prose .lp-table-wrap { margin-bottom: var(--space-4); }
.prose .lp-table { min-width: 520px; }
.prose .lp-table tbody td { background: none; color: var(--text-2); }
.prose .lp-table tbody th { width: auto; white-space: nowrap; }
.verb { display: inline-block; min-width: 46px; font: 600 0.6875rem var(--font-mono); color: var(--success); }
.verb.post { color: var(--accent-text); } .verb.put { color: var(--warning); } .verb.del { color: var(--danger); }
.legal { padding-bottom: clamp(80px, 10vw, 140px); }
.legal-todo { background: var(--warning-soft); color: var(--warning); border: 1px dashed var(--warning); border-radius: 4px; padding: 0 4px; font: 500 0.8125rem var(--font-mono); }
.legal h2 { font-size: 1.125rem; margin-top: var(--space-6); }

/* Changelog + about */
.changelog { max-width: 900px; padding-bottom: clamp(80px, 10vw, 140px); }
.cl-entry { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); padding: var(--space-7) 0; border-top: 1px solid var(--border); }
@media (min-width: 768px) { .cl-entry { grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-7); } }
.cl-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font: 0.8125rem var(--font-mono); color: var(--text-muted); }
@media (min-width: 768px) { .cl-meta { position: sticky; top: 90px; align-self: start; } }
.cl-entry .prose h2 { font-size: 1.375rem; }
.about-grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(80px, 10vw, 140px); }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.principles { display: grid; gap: var(--space-3); align-content: start; }
.principle { padding: var(--space-5); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: grid; gap: 6px; }
.principle .mono { font-size: 0.75rem; color: var(--accent-text); }
.principle h3 { font-size: 1rem; font-weight: 600; }

/* Settings → Developers */
.keys { list-style: none; margin: var(--space-4) 0 0; padding: 0; border-top: 1px solid var(--border); }
.keys li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-4); align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.key-name { display: flex; gap: 10px; align-items: baseline; font-weight: 500; }
.key-meta { grid-column: 1; font-size: 0.75rem; }
.keys li .btn { grid-column: 2; grid-row: 1 / span 2; }
.key-reveal { margin-top: var(--space-4); }
.code-wrap { position: relative; }
.code-block { margin: 0; padding: 12px 84px 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 0.75rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.copy-btn { position: absolute; top: 6px; right: 6px; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .page-top { margin-bottom: var(--space-5); }
  .statline { gap: var(--space-3) var(--space-5); }
  .search input { width: 100%; }
  .toolbar .search { flex: 1 1 100%; }
  .turn { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .btn kbd { display: none; }
}
@media (pointer: coarse) { .btn kbd, .search-trigger kbd { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Admin ---------- */
.admin-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.admin-stat { display: grid; gap: 4px; padding: var(--space-4); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.admin-stat strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-stat > span:first-child, .admin-sub { font-size: 0.75rem; }
.admin-table td { font-size: 0.8125rem; white-space: nowrap; }

/* ---------- Support ---------- */
.support-grid { display: grid; gap: var(--space-5); padding-bottom: var(--space-9, 96px); }
@media (min-width: 900px) { .support-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.support-card { display: grid; gap: var(--space-4); padding: var(--space-6); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.support-card .btn { justify-self: start; }
.support-side { display: grid; gap: var(--space-3); }
.support-link { display: grid; gap: 4px; padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 150ms, transform 200ms var(--ease-out); }
.support-link:hover { border-color: var(--text-muted); transform: translateY(-1px); }
.support-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.support-link .muted { font-size: 0.875rem; }
.support-mail { font-size: 0.875rem; padding: 0 var(--space-2); }
@media (prefers-reduced-motion: reduce) { .support-link { transition: none; } .support-link:hover { transform: none; } }
.support-inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.support-inbox li { padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: grid; gap: 6px; }
.support-inbox-top { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; font-size: 0.8125rem; }
.support-inbox-top .muted { margin-left: auto; }
.support-inbox p { margin: 0; font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Support chat bubble (helpbot.js) ---------- */
#hb-root { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--font-sans, Inter, system-ui, sans-serif); }
.hb-launch { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: var(--accent); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent), 0 2px 6px rgb(0 0 0 / 0.25); transition: transform 200ms var(--ease-out), box-shadow 200ms; }
.hb-launch:hover { transform: translateY(-2px) scale(1.04); }
.hb-launch:active { transform: scale(0.96); }
.hb-launch:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.hb-launch svg { transition: transform 240ms var(--ease-out); }
#hb-root.is-open .hb-launch svg { transform: rotate(90deg); }
.hb-panel { width: min(380px, calc(100vw - 32px)); height: min(580px, calc(100dvh - 110px)); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--bg); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6), 0 0 0 1px color-mix(in srgb, #fff 4%, transparent) inset; overflow: hidden; transform-origin: bottom right; animation: hb-in 260ms var(--ease-out) both; }
.hb-panel[hidden] { display: none; }
@keyframes hb-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
.hb-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.hb-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #0b0c0e; color: var(--accent); font: 700 13px/1 var(--font-mono, monospace); flex: none; border: 1px solid var(--border); }
.hb-title { display: grid; gap: 2px; min-width: 0; }
.hb-title strong { font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.hb-title span { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.hb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.hb-close { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--text-muted); display: grid; place-items: center; cursor: pointer; }
.hb-close:hover { background: var(--surface-2); color: var(--text); }
.hb-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.hb-msg { display: grid; gap: 6px; max-width: 88%; animation: hb-msg 240ms var(--ease-out) both; }
@keyframes hb-msg { from { opacity: 0; transform: translateY(4px); } }
.hb-user { align-self: flex-end; justify-items: end; }
.hb-assistant { align-self: flex-start; }
.hb-bubble { padding: 10px 13px; border-radius: 14px; font-size: 0.875rem; line-height: 1.5; color: var(--text); background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; }
.hb-bubble p { margin: 0; }
.hb-bubble p + p { margin-top: 8px; }
.hb-bubble a { color: var(--accent-text, var(--accent)); text-underline-offset: 2px; }
.hb-user .hb-bubble { background: var(--accent); border-color: transparent; color: #fff; border-bottom-right-radius: 4px; }
.hb-user .hb-bubble a { color: #fff; }
.hb-assistant .hb-bubble { border-bottom-left-radius: 4px; }
.hb-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-sources a { font-size: 0.75rem; color: var(--text-2); text-decoration: none; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.hb-sources a:hover { color: var(--text); border-color: var(--text-muted); }
.hb-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-chip { font: inherit; font-size: 0.8125rem; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; text-align: left; transition: border-color 150ms, color 150ms; justify-self: start; }
.hb-chip:hover { border-color: var(--text-muted); color: var(--text); }
.hb-chip-strong { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 500; }
.hb-chip-strong:hover { color: var(--bg); opacity: 0.9; }
.hb-chip:disabled { opacity: 0.6; cursor: default; }
.hb-typing .hb-bubble { display: flex; gap: 4px; padding: 13px 14px; }
.hb-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite; }
.hb-typing i:nth-child(2) { animation-delay: 0.15s; }
.hb-typing i:nth-child(3) { animation-delay: 0.3s; }
.hb-handoff { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); animation: hb-msg 240ms var(--ease-out) both; }
.hb-handoff strong { font-size: 0.875rem; color: var(--text); }
.hb-muted { font-size: 0.8125rem; color: var(--text-muted); }
.hb-field { font: inherit; font-size: 0.875rem; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); resize: vertical; }
.hb-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hb-err { margin: 0; font-size: 0.8125rem; color: var(--danger); }
.hb-foot { border-top: 1px solid var(--border); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--surface); }
.hb-form { display: flex; gap: 8px; align-items: flex-end; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); transition: border-color 150ms, box-shadow 150ms; }
.hb-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.hb-input { flex: 1; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.875rem; line-height: 1.45; resize: none; padding: 6px 0; max-height: 120px; outline: none; }
.hb-send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.hb-send:disabled { opacity: 0.5; cursor: default; }
.hb-human { justify-self: center; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.75rem; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.hb-human:hover { color: var(--text); }
.hb-human:focus-visible, .hb-chip:focus-visible, .hb-send:focus-visible, .hb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) {
  #hb-root { right: 12px; bottom: 12px; }
  #hb-root.is-open { left: 12px; }
  .hb-panel { width: 100%; height: calc(100dvh - 96px); }
}
@media (prefers-reduced-motion: reduce) { .hb-panel, .hb-msg, .hb-handoff { animation: none; } .hb-launch, .hb-launch svg { transition: none; } }
@media print { #hb-root { display: none; } }

/* "Works with" logos: brand marks from Simple Icons (CC0), one colour to match the page */
.lp-works .lp-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); opacity: 0.7; transition: opacity 200ms var(--ease-out), color 200ms var(--ease-out), transform 200ms var(--ease-out); }
.lp-works .lp-logo svg { flex: none; }
.lp-works .lp-logo:hover { opacity: 1; color: var(--text); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .lp-works .lp-logo { transition: none; } .lp-works .lp-logo:hover { transform: none; } }

/* ---------- Roadmap board (roadmap.js) ---------- */
.rm-tip { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; margin: var(--space-5) 0 var(--space-3); }
.rm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
@media (max-width: 960px) { .rm-board { grid-template-columns: repeat(3, 82%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-3); } .rm-col { scroll-snap-align: start; } }
.rm-col { display: grid; gap: var(--space-3); padding: var(--space-3); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 55%, transparent); border: 1px solid var(--border); min-height: 220px; align-content: start; transition: border-color 160ms, background 160ms, box-shadow 160ms; }
.rm-board.is-dragging .rm-col { border-style: dashed; }
.rm-col.over { border-color: var(--accent); border-style: solid; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent), 0 24px 40px -20px rgb(0 0 0 / 0.6); transform: perspective(1000px) translateZ(18px); }
.rm-col { transition: border-color 160ms, background 160ms, box-shadow 160ms, transform 220ms var(--ease-out); }
.rm-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 0; }
.rm-col-head h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.rm-col-head .num { font-size: 0.75rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.rm-col-mrr { margin-left: auto; font-size: 0.75rem; }
.rm-col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.rm-col-planned .rm-col-dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.rm-col-shipped .rm-col-dot { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.rm-col-hint { margin: 0; padding: 0 4px; font-size: 0.75rem; }
.rm-col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.rm-col-empty { padding: var(--space-5) var(--space-3); text-align: center; font-size: 0.8125rem; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 10px; }
/* 3D: --rx/--ry are set by tilt() in roadmap.js from the pointer position; perspective() keeps the vanishing point on each card's own centre. */
.rm-tile { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: grab; user-select: none; transform-style: preserve-3d; transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 160ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 160ms, opacity 160ms; }
.rm-tile:hover { border-color: var(--border-strong); transform: perspective(800px) translateY(-4px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: var(--sx, 0px) var(--sy, 20px) 36px -16px rgb(0 0 0 / 0.6); }
.rm-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgb(255 255 255 / 0.13), transparent 60%); opacity: 0; transition: opacity 200ms; }
.rm-tile:hover::after { opacity: 1; }
.rm-tile > * { transition: transform 220ms var(--ease-out); }
.rm-tile:hover .rm-tile-top { transform: translateZ(14px); }
.rm-tile:hover .rm-tile-title { transform: translateZ(26px); }
.rm-tile:hover .rm-tile-meter { transform: translateZ(18px); }
.rm-tile:hover .rm-tile-foot, .rm-tile:hover .rm-tell { transform: translateZ(10px); }
.rm-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rm-tile:active { cursor: grabbing; }
.rm-tile.dragging { opacity: 0.35; transform: perspective(800px) rotateZ(1.5deg) scale(0.98); }
.rm-tile.just-moved { animation: rm-flip 620ms var(--ease-out); }
@keyframes rm-flip { 0% { transform: perspective(800px) rotateY(-110deg) scale(0.9); opacity: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 60% { opacity: 1; } 100% { transform: perspective(800px); box-shadow: none; } }
.rm-enter .rm-tile { animation: rm-in 620ms var(--ease-out) calc(var(--c, 0) * 90ms + var(--i, 0) * 70ms) backwards; transform-origin: 50% 0; }
@keyframes rm-in { from { transform: perspective(800px) rotateX(-75deg) translateY(10px); opacity: 0; } }
.rm-col-shipped .rm-tile { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.rm-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rm-tile-top .rm-rank { padding: 0; font-size: 0.75rem; }
.rm-tile-title { margin: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.rm-col-shipped .rm-tile-title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--success) 60%, transparent); text-decoration-thickness: 1.5px; }
.rm-tile-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; font-size: 0.8125rem; }
.rm-col-shipped .rm-bar i { background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 60%, #fff)); }
.rm-tile-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.75rem; }
.rm-tile-foot .avatar-stack .avatar { width: 20px; height: 20px; font-size: 0.5625rem; }
.rm-chips { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.rm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 0.6875rem; font-variant-numeric: tabular-nums; line-height: 18px; }
.rm-chip.late { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.rm-prog-bar { display: inline-block; width: 28px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.rm-prog-bar i { display: block; height: 100%; background: var(--success); border-radius: inherit; transition: width 300ms var(--ease-out); }
.rm-prog-bar.big { width: 100%; height: 6px; border-radius: 3px; }
.rm-tell { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 8px; font-size: 0.8125rem; font-weight: 500; text-decoration: none; color: #fff; background: var(--success); }
.rm-tell:hover { filter: brightness(1.08); }

/* Drawer: the fix plan for one theme */
dialog.rm-drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); border-radius: 16px 0 0 16px; border-left: 1px solid var(--border); background: var(--bg); overflow-y: auto; }
dialog.rm-drawer[open] { animation: rm-swing 460ms var(--ease-out); transform-origin: 100% 50%; }
@keyframes rm-swing { from { transform: perspective(1400px) rotateY(-32deg) translateX(30px); opacity: 0; } }
.rm-drawer-body { display: grid; gap: var(--space-5); padding: var(--space-5); }
.rm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.rm-drawer-head > div { display: grid; gap: 6px; justify-items: start; }
.rm-drawer-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.rm-drawer-head .rm-rank { padding: 0; font-size: 0.75rem; }
.rm-drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.rm-drawer-stats > div { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transform-style: preserve-3d; transform: perspective(500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 160ms var(--ease-out), box-shadow 180ms; }
.rm-drawer-stats > div:hover { box-shadow: 0 14px 26px -14px rgb(0 0 0 / 0.55); }
.rm-drawer-stats > div:hover strong { transform: translateZ(18px); }
.rm-drawer-stats strong { transition: transform 220ms var(--ease-out); }
.rm-drawer-stats strong { font-size: 1.0625rem; }
.rm-drawer-stats span { font-size: 0.75rem; }
.rm-d-sec { display: grid; gap: var(--space-3); }
.rm-d-sec h3 { margin: 0; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.rm-d-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.rm-d-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.rm-d-grid > div { display: grid; gap: var(--space-2); justify-items: start; }
.rm-plan-meter { display: grid; gap: 6px; font-size: 0.8125rem; }
.rm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rm-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); animation: hb-msg 220ms var(--ease-out) both; }
.rm-steps li.done .rm-step-text { color: var(--text-muted); text-decoration: line-through; }
.rm-check { width: 18px; height: 18px; accent-color: var(--success); flex: none; cursor: pointer; }
.rm-step-text { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.875rem; line-height: 1.45; padding: 4px 2px; border-radius: 6px; resize: none; overflow: hidden; }
.rm-step-text:focus { outline: none; background: var(--surface-2); }
.rm-step-del { opacity: 0; transition: opacity 120ms; }
.rm-steps li:hover .rm-step-del, .rm-step-del:focus-visible { opacity: 1; }
.rm-add { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.rm-add .input { flex: 1; }
.rm-ship-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rm-ship-cta .btn { margin-left: auto; }
.rm-drawer .rm-people { display: grid; gap: 4px; }

/* Ship burst */
.rm-burst { position: fixed; z-index: 80; pointer-events: none; }
.rm-burst { perspective: 400px; }
.rm-burst i { position: absolute; width: 7px; height: 11px; border-radius: 2px; background: hsl(var(--h) 85% 62%); animation: rm-pop 1100ms var(--ease-out) var(--d) forwards; opacity: 0; }
@keyframes rm-pop { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate3d(1, 1, 0, 0deg); } 100% { opacity: 0; transform: translate3d(var(--x), calc(var(--y) + 40px), var(--z, 0px)) rotate3d(1, 0.6, 0.2, 900deg) scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .rm-tile, .rm-tile:hover, .rm-tile > *, .rm-col.over, .rm-drawer-stats > div, .rm-drawer-stats strong { transition: none; transform: none !important; } dialog.rm-drawer[open], .rm-steps li, .rm-enter .rm-tile { animation: none; } }
@media (max-width: 560px) { .rm-d-grid { grid-template-columns: 1fr; } dialog.rm-drawer { border-radius: 0; } }

/* ---------- Plans: locked features, plan contents (common.js planBadge/upgradeNote, settings billing) ---------- */
.plan-lock { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 500 0.625rem/1 var(--font-mono); padding: 3px 6px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.plan-lock svg.icon { width: 10px; height: 10px; }
.plan-note { align-items: center; margin-bottom: var(--space-4); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.plan-note svg.icon { margin-top: 0; color: var(--accent-text); }
.plan-note a { font-weight: 500; color: var(--accent-text); }
.plan-includes { display: grid; gap: var(--space-3); }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; font-size: 0.8125rem; }
.plan-features li { display: flex; align-items: center; gap: 8px; }
.plan-features li.on svg.icon { color: var(--success); }
.plan-features li.off { color: var(--text-muted); }
.plan-features li.off > span:last-child { margin-left: auto; font-size: 0.6875rem; font-family: var(--font-mono); }
.plan-perk { align-items: center; flex-wrap: wrap; }
.plan-perk > span { flex: 1; min-width: 200px; }
.plan-perk svg.icon { margin-top: 0; }
.input-sm { padding: 4px 8px; font-size: 0.75rem; min-height: 0; height: auto; width: auto; }
.ask-stage.is-locked { opacity: 0.55; pointer-events: none; }
.plan-ent { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; max-width: 1120px; margin: var(--space-4) auto 0; padding: var(--space-5) var(--space-6); border: 1px dashed var(--border-strong); border-radius: 18px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.plan-ent > div { display: grid; gap: 6px; max-width: 640px; }
.plan-ent .plan-for { margin: 0; }
