/* ====== Benehab Components · v2 ====== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-2);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--d-fast) var(--ease-out), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast), box-shadow var(--d-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(0.5px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--ink-1); color: var(--ink-on-accent);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: oklch(from var(--ink-1) calc(l + 0.06) c h); }

.btn-accent {
  background: var(--accent); color: var(--ink-on-accent);
  box-shadow: var(--shadow-1), 0 0 0 1px oklch(from var(--accent) calc(l - 0.06) c h) inset;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--bg-elev); color: var(--ink-1);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--bg-sunken); border-color: var(--line-strong); }

.btn-quiet {
  background: transparent; color: var(--ink-2);
}
.btn-quiet:hover { background: var(--bg-sunken); color: var(--ink-1); }

.btn-danger {
  background: var(--alert); color: white;
  box-shadow: var(--shadow-1), 0 0 0 1px oklch(from var(--alert) calc(l - 0.08) c h) inset;
}
.btn-danger:hover { background: var(--alert-hover); }

.btn-danger-soft {
  background: var(--alert-soft); color: var(--alert-ink);
  border-color: oklch(from var(--alert) calc(l + 0.05) c h / 0.4);
}
[data-theme="dark"] .btn-danger-soft {
  background: var(--alert-softer); border-color: oklch(from var(--alert) l c h / 0.3);
}
.btn-danger-soft:hover { background: var(--alert); color: white; border-color: var(--alert); }

.btn-toggle {
  background: var(--bg-sunken); color: var(--ink-1);
  border-color: var(--line-1);
}
.btn-toggle.on {
  background: var(--ink-1); color: var(--ink-on-accent); border-color: var(--ink-1);
}
.btn-toggle:hover { border-color: var(--line-strong); }
.btn-toggle.on:hover { background: oklch(from var(--ink-1) calc(l + 0.06) c h); }

.btn-lg { height: 44px; padding: 0 20px; font-size: var(--t-base); }
.btn-xl { height: 56px; padding: 0 28px; font-size: var(--t-lg); border-radius: var(--r-3); }
.btn-sm { height: 28px; padding: 0 10px; font-size: var(--t-xs); }
.btn-icon { width: 36px; padding: 0; }
.btn-icon-sm { width: 28px; height: 28px; padding: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px;
  border-radius: var(--r-1);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  color: var(--ink-2);
  background: var(--bg-sunken);
  white-space: nowrap; flex-shrink: 0;
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 99px;
  background: currentColor; opacity: 0.7;
}
.badge-accent  { color: var(--accent-ink);  background: var(--accent-soft); }
.badge-alert   { color: var(--alert-ink);   background: var(--alert-soft); }
.badge-success { color: var(--success-ink); background: var(--success-soft); }
.badge-warn    { color: var(--warn-ink);    background: var(--warn-soft); }
.badge-solid-alert {
  color: white; background: var(--alert);
}
.badge-solid-alert::before { background: white; opacity: 1; }
.badge-no-dot::before { display: none; }

/* ---------- Live dot ---------- */
.live-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: blink-dot 1.4s ease-in-out infinite;
  position: relative;
}
.live-dot::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--live);
  opacity: 0.35;
  animation: blink-dot 1.4s ease-in-out infinite reverse;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-elev);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
}
.card-elev {
  background: var(--bg-elev);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-2);
}

/* ---------- Task / checklist ---------- */
.task {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-2);
  background: var(--bg-elev);
  box-shadow: var(--shadow-1);
  position: relative;
  transition: background var(--d-fast), box-shadow var(--d-fast);
}
.task + .task { margin-top: 8px; }
.task .check {
  width: 20px; height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  display: grid; place-items: center;
  margin-top: 1px;
  background: var(--bg-elev);
  transition: all var(--d-fast);
}
.task .check svg { opacity: 0; transition: opacity var(--d-base) var(--ease-out); }
.task.done .check { background: var(--success); border-color: var(--success); }
.task.done .check svg { opacity: 1; }
.task.done .label-text { color: var(--ink-3); }
.task.done { animation: pulse-success 1.1s var(--ease-out) 1; }
.task .label-text { font-size: var(--t-sm); color: var(--ink-1); line-height: 1.4; }
.task .value {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--success-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

/* ---------- Coach card ---------- */
.coach-current {
  position: relative;
  padding: 22px 22px 20px 26px;
  border-radius: var(--r-4);
  background: var(--bg-elev);
  box-shadow: var(--shadow-coach);
  animation: coach-in var(--d-base) var(--ease-out);
}
.coach-current::before {
  content: ""; position: absolute; left: 14px; top: 22px; bottom: 20px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent), oklch(from var(--accent) calc(l - 0.1) c h));
}
.coach-current .when {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--accent-ink);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.coach-current .when::before {
  content: ""; width: 5px; height: 5px; border-radius: 99px;
  background: var(--accent);
  animation: blink-dot 1.4s ease-in-out infinite;
}
.coach-current .text {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: var(--t-coach);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  font-weight: 400;
  text-wrap: balance;
}
.coach-history {
  margin-top: 14px;
  padding: 14px 4px 0;
  border-top: 1px solid var(--line-1);
}
.coach-history .row {
  display: grid; grid-template-columns: 80px 1fr; gap: 10px;
  padding: 7px 0;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.coach-history .when {
  font-size: var(--t-xs);
  color: var(--ink-4);
  padding-top: 1px;
}

/* ---------- Red flag ---------- */
.redflag {
  border-radius: var(--r-3);
  background: var(--alert-soft);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  animation: pulse-alert 2.4s ease-in-out infinite;
  box-shadow: var(--shadow-flag);
  position: relative;
}
.redflag .icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--alert);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px oklch(58% 0.18 28 / 0.18);
}
.redflag .head {
  font-size: 11px;
  color: var(--alert-ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.redflag .text {
  font-size: var(--t-base);
  color: var(--ink-1);
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: -0.005em;
}
.redflag .actions { display: flex; gap: 6px; }
.redflag .trace {
  position: absolute; bottom: -22px; left: 56px;
  width: 2px; height: 22px;
  background: linear-gradient(to bottom, var(--alert), oklch(from var(--alert) l c h / 0));
  pointer-events: none;
}

/* ---------- Biomarker strip ---------- */
.biomarkers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line-1);
  padding: 0;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  position: relative;
}
.bio {
  padding: 14px 18px 12px;
  background: var(--bg-panel);
  display: grid;
  grid-template-rows: 16px 32px 12px 26px;
  row-gap: 6px;
  position: relative;
  min-width: 0;
}
.bio .k {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.01em;
  align-self: center;
}
.bio .v {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.025em;
  align-self: center;
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
  color: var(--ink-1);
  display: flex; align-items: baseline; gap: 4px;
  font-weight: 400;
  font-feature-settings: "tnum";
}
.bio .v.text {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.bio .unit {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
  font-family: var(--font-sans);
  font-weight: 400;
}
.bio .sub {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-sans);
  letter-spacing: 0;
  align-self: center;
}
.bio .viz {
  height: 26px;
  align-self: end;
}
.bio.spike {
  background: var(--alert-softer);
  z-index: 1;
}
.bio.spike .v { color: var(--alert-ink); }
.bio.spike .sub { color: var(--alert-ink); opacity: 0.7; }
.bio.spike::before {
  content: ""; position: absolute; inset: 0;
  border-top: 2px solid var(--alert); border-bottom: 2px solid var(--alert);
  pointer-events: none;
  animation: spike-glow 2.4s ease-in-out infinite;
}
.bio.warn .v { color: var(--warn-ink); }
.bio .delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--alert);
  color: white;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  align-self: center;
  width: fit-content;
}

/* ---------- Transcript ---------- */
.transcript {
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 28px 36px;
}
.bubble {
  display: grid; grid-template-columns: 80px 1fr; gap: 20px;
  position: relative;
}
.bubble .who {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-weight: 400;
  padding-top: 4px;
}
.bubble .who-name {
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0;
}
.bubble.you .who-name { color: var(--ink-3); }
.bubble .who-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity var(--d-fast);
}
.bubble:hover .who-time { opacity: 1; }
.bubble .what {
  font-size: var(--t-lg);
  line-height: 1.45;
  color: var(--ink-1);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.bubble.you .what { color: var(--ink-2); }
.bubble.live-now .what {
  border-left: 2px solid var(--ink-2);
  padding-left: 14px;
  margin-left: -16px;
}
.bubble.trigger .what {
  border-left: 3px solid var(--alert);
  padding-left: 14px;
  margin-left: -17px;
  color: var(--ink-1);
}
.bubble.trigger .what b {
  font-weight: 600;
  color: inherit;
}
.bubble.silence {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
}
.bubble.silence .what {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--ink-3);
  display: flex; align-items: center; gap: 12px;
  padding-top: 4px;
  grid-column: 2;
}
.bubble.silence .what::before,
.bubble.silence .what::after {
  content: ""; flex: 1; height: 1px; background: var(--line-1);
}

/* ---------- Live listening indicator ---------- */
.live-listen {
  display: flex; align-items: center; gap: 12px;
  padding: 0 36px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-panel);
  height: 44px;
  flex-shrink: 0;
}
.live-listen .ll-dot {
  width: 6px; height: 6px; border-radius: 99px;
  background: var(--alert);
  box-shadow: 0 0 0 0 oklch(58% 0.18 28 / 0.4);
  animation: ll-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ll-pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(58% 0.18 28 / 0.4); }
  50%      { box-shadow: 0 0 0 5px oklch(58% 0.18 28 / 0); }
}
.live-listen .ll-label {
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-weight: 500;
}
.live-listen .ll-wave {
  flex: 1;
  height: 24px;
  display: flex; align-items: center; gap: 2px;
  overflow: hidden;
  min-width: 0;
}
.live-listen .ll-wave span {
  flex: 1;
  background: var(--ink-3);
  opacity: 0.4;
  border-radius: 1px;
  min-width: 1px;
  transition: height 0.2s linear;
}
.live-listen .ll-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ---------- AI Co-pilot card ---------- */
.coach-cmd {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  margin-top: 4px;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.coach-bullets {
  margin: 0; padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.coach-bullets li {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--ink-1);
  position: relative;
  padding-left: 18px;
}
.coach-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.7;
}

.coach-earlier {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line-1);
}
.coach-earlier .earlier-label {
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.coach-earlier .earlier-list {
  display: flex; flex-direction: column; gap: 4px;
}
.coach-earlier .earlier-list > div {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.45;
}

/* ---------- Outcome chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px;
  border-radius: var(--r-2);
  background: var(--bg-elev);
  box-shadow: var(--shadow-1);
  font-size: var(--t-sm);
  cursor: pointer;
  user-select: none;
  white-space: nowrap; flex-shrink: 0;
  transition: all var(--d-fast);
  font-weight: 500;
}
.chip .dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  position: relative;
  flex-shrink: 0;
}
.chip:hover { background: var(--bg-sunken); }
.chip.selected {
  background: var(--ink-1); color: var(--ink-on-accent);
  box-shadow: var(--shadow-2);
}
.chip.selected .dot { border-color: var(--ink-on-accent); }
.chip.selected .dot::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--ink-on-accent);
}

/* ---------- Field ---------- */
.field-label {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: 8px;
  font-weight: 500;
}
.field-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink-1);
  background: var(--bg-elev);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: 14px 16px;
  resize: vertical;
  box-shadow: var(--shadow-1);
}
.field-textarea:focus {
  outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-softer);
}

/* ---------- Drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 80;
  animation: overlay-in var(--d-base) var(--ease-out);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-drawer);
  z-index: 81;
  display: flex; flex-direction: column;
  animation: drawer-in var(--d-base) var(--ease-out);
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-1);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-1); padding: 0 18px; }
.tab {
  height: 38px;
  padding: 0 14px;
  font-size: var(--t-sm);
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center;
  margin-bottom: -1px;
  transition: color var(--d-fast), border-color var(--d-fast);
}
.tab:hover { color: var(--ink-1); }
.tab.active { color: var(--ink-1); border-bottom-color: var(--ink-1); }

/* ---------- Avatar ---------- */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pt-bg);
  color: var(--pt-fg);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.avatar.xl { width: 64px; height: 64px; font-size: 24px; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.staff {
  background: var(--accent-soft); color: var(--accent-ink);
}
.avatar img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.avatar .ring-status {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--success);
  pointer-events: none;
}
.avatar .ring-status.alert { border-color: var(--alert); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  height: 32px; padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--line-1);
}
.theme-toggle button {
  width: 30px; height: 24px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: all var(--d-fast);
}
.theme-toggle button:hover { color: var(--ink-1); }
.theme-toggle button.active {
  background: var(--bg-elev);
  color: var(--ink-1);
  box-shadow: var(--shadow-1);
}

/* ---------- Phase toggle (demo) ---------- */
.phase-toggle {
  position: fixed; bottom: 16px; right: 16px;
  z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 14px;
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  box-shadow: var(--shadow-3);
}
.phase-toggle .ptl {
  font-size: 11px; color: var(--ink-3); font-weight: 500;
}
.phase-toggle .pt-group { display: inline-flex; gap: 2px; }
.phase-toggle button {
  height: 28px; padding: 0 12px;
  font-size: 12px;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  font-weight: 500;
  transition: all var(--d-fast);
}
.phase-toggle button:hover { color: var(--ink-1); background: var(--bg-sunken); }
.phase-toggle button.active {
  background: var(--accent); color: white;
  box-shadow: var(--shadow-1);
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-bottom: 1px solid var(--line-1);
  display: flex; align-items: center;
  padding: 0 18px 0 0;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 10;
}
[data-theme="light"] .topbar { background: oklch(98% 0.005 270 / 0.88); }
[data-theme="dark"] .topbar,
:root:not([data-theme="light"]) .topbar { background: oklch(16% 0.04 270 / 0.85); }
.topbar .brand {
  height: 100%;
  width: var(--nav-w);
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--line-1);
  flex-shrink: 0;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--ink-1);
  color: var(--ink-on-accent);
  display: grid; place-items: center;
  position: relative;
  box-shadow: var(--shadow-1);
}
.brand-mark::after {
  content: ""; position: absolute; bottom: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--accent);
  border: 2px solid var(--bg-panel);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.025em;
  color: var(--ink-1);
}
.wordmark .b-dot { color: var(--accent); }
.topbar .crumbs {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--t-sm);
  color: var(--ink-2);
  white-space: nowrap; flex-shrink: 0;
}
.topbar .crumbs > * { white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .right { display: flex; align-items: center; gap: 12px; }

/* ---------- Nav rail (zonal) ---------- */
.navrail {
  width: var(--nav-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--line-1);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}
.navrail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px 16px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.nav-zone { display: flex; flex-direction: column; }
.nav-zone-head {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  border-radius: var(--r-2);
  transition: color var(--d-fast), background var(--d-fast);
}
.nav-zone-head:hover:not([disabled]) { color: var(--ink-1); background: var(--bg-sunken); }
.nav-zone-head[disabled] { cursor: default; }
.nav-chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px;
  color: var(--ink-3);
  transition: transform var(--d-fast) var(--ease-out);
}
.nav-chev.open { transform: rotate(90deg); }
.nav-zone-label { flex: 1; text-align: left; }
.nav-zone-empty {
  font-size: 9px;
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--bg-sunken);
  text-transform: lowercase;
}
.nav-zone-items {
  list-style: none;
  margin: 2px 0 6px;
  padding: 0;
  display: flex; flex-direction: column;
  gap: 1px;
}
.nav-item-row {
  display: flex; align-items: center; gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--r-2);
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--d-fast), color var(--d-fast);
  position: relative;
}
.nav-item-row:hover { background: var(--bg-sunken); color: var(--ink-1); }
.nav-item-row.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.nav-item-row.active::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-item-row.disabled {
  color: var(--ink-4);
}
.nav-item-row.disabled:hover { background: transparent; color: var(--ink-3); }
.nav-item-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  color: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}
.nav-item-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--bg-sunken);
  border: 1px solid var(--line-1);
  text-transform: uppercase;
  flex-shrink: 0;
}
.nav-divider {
  height: 1px; background: var(--line-1);
  margin: 12px 4px;
}
.nav-zone-mini { display: flex; flex-direction: column; gap: 4px; }
.nav-mini-label {
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 0 8px;
  margin-bottom: 2px;
}
.nav-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-sunken);
}
.nav-profile-text { min-width: 0; line-height: 1.2; }
.nav-profile-name {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-profile-role {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Cockpit screen ---------- */
.ck-main {
  flex: 1;
  padding: 32px 48px 80px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 36px;
  min-width: 0;
  max-width: 1280px;
}
.ck-head { display: flex; flex-direction: column; gap: 8px; }
.ck-eyebrow {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
}
.ck-title {
  font-family: var(--font-display);
  font-size: 46px;
  letter-spacing: -0.024em;
  font-weight: 500;
  margin: 0;
  color: var(--ink-1);
  line-height: 1;
}
.ck-zone { display: flex; flex-direction: column; gap: 14px; }
.ck-zone-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
}
.ck-zone-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
}
.ck-zone-eyebrow .accent { color: var(--alert-ink); }
.ck-zone-meta {
  font-size: var(--t-xs);
  color: var(--ink-3);
}

/* Zone 1 — hero */
.ck-hero {
  position: relative;
  padding: 28px 32px 26px;
  border-radius: var(--r-4);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.ck-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--alert), var(--warn));
}
.ck-hero-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.ck-hero h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.018em;
  font-weight: 500;
  margin: 0;
  color: var(--ink-1);
}
.ck-hero-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ck-hero-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-1);
}
.ck-hero-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ck-warn-glyph {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--alert-soft);
  color: var(--alert-ink);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}
.ck-hero-item .lead {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  line-height: 1.35;
  text-wrap: pretty;
}
.ck-hero-item .lead b { font-weight: 600; }
.ck-hero-item .sub {
  font-size: var(--t-sm);
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.5;
}
.ck-hero-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-1);
  display: flex; justify-content: flex-end;
}
.ck-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  transition: gap var(--d-fast);
}
.ck-link:hover { gap: 10px; }
.ck-link.alert { color: var(--alert-ink); }

/* Zone 2 — three cards */
.ck-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ck-card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--r-3);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 200px;
}
.ck-card-head {
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.005em;
}
.ck-figure {
  display: flex; align-items: baseline; gap: 10px;
}
.ck-num {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1;
  color: var(--ink-1);
  font-feature-settings: "tnum";
}
.ck-delta {
  display: inline-flex; align-items: center; gap: 3px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}
.ck-delta.up { color: var(--success-ink); background: var(--success-soft); }
.ck-delta.flat { color: var(--ink-3); background: var(--bg-sunken); }
.ck-delta.down { color: var(--alert-ink); background: var(--alert-soft); }
.ck-context {
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.ck-context b { color: var(--ink-1); font-weight: 600; }
.ck-caption {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: -6px;
}
.ck-progress {
  position: relative;
  height: 8px;
  background: var(--bg-sunken);
  border-radius: 99px;
  overflow: hidden;
}
.ck-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(to right, var(--accent), var(--accent-2));
  border-radius: 99px;
}
.ck-progress-target {
  position: absolute; top: -3px; bottom: -3px;
  width: 2px;
  background: var(--ink-2);
  border-radius: 2px;
}
.ck-progress-target::after {
  content: attr(data-label);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.ck-card-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex; justify-content: flex-end;
}

.ck-num.ck-num-md { font-size: 34px; }

/* Operational snapshot */
.ck-snap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ck-snap-card {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: var(--r-3);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 130px;
}
.ck-risk-row {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin-top: 2px;
}
.ck-risk-cell {
  display: flex; align-items: baseline; gap: 6px;
}
.ck-risk-dot {
  width: 8px; height: 8px; border-radius: 99px;
  align-self: center;
}
.ck-risk-dot.high { background: var(--alert); }
.ck-risk-dot.med  { background: var(--warn); }
.ck-risk-dot.low  { background: var(--success); }
.ck-risk-n {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  font-feature-settings: "tnum";
}
.ck-risk-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.ck-stack {
  display: flex;
  height: 6px;
  width: 100%;
  border-radius: 99px;
  overflow: hidden;
  background: var(--bg-sunken);
  margin-top: 2px;
}
.ck-stack > div { height: 100%; }
.ck-snap-lead {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.014em;
  color: var(--ink-1);
  font-weight: 500;
  margin-top: 2px;
}
.ck-snap-line {
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.ck-snap-line .mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* Trends */
.ck-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ck-trend-card {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: var(--r-3);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 180px;
  text-decoration: none; color: inherit;
  transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast);
}
.ck-trend-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.ck-trend-spark {
  height: 64px;
  width: 100%;
  margin-top: auto;
}
.ck-spark-svg { display: block; width: 100%; height: 100%; }
.ck-period {
  position: relative;
  padding: 28px 32px 22px;
  border-radius: var(--r-4);
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-1);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "left right"
    "spark spark"
    "foot foot";
  gap: 24px 32px;
}
.ck-period-left { grid-area: left; display: flex; flex-direction: column; gap: 10px; }
.ck-period-right { grid-area: right; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.ck-period .ck-num { font-size: 62px; }
.ck-period-status {
  font-size: var(--t-sm);
  color: var(--success-ink);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.ck-period-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 99px;
  background: var(--success);
}
.ck-period-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-1);
  font-size: var(--t-sm);
}
.ck-period-row:first-of-type { border-top: 0; padding-top: 0; }
.ck-period-row .k { color: var(--ink-3); }
.ck-period-row .v {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--ink-1);
  font-feature-settings: "tnum";
}
.ck-period-row.risk .v { color: var(--alert-ink); }
.ck-period-spark {
  grid-area: spark;
  display: flex; flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-1);
}
.ck-period-spark-label {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ck-period-spark-svg {
  height: 64px;
  width: 100%;
  display: block;
}
.ck-period-foot {
  grid-area: foot;
  display: flex; justify-content: flex-end;
}

/* ---------- Section headers ---------- */
.t-section {
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.t-section .accent {
  color: var(--accent-ink);
}

/* ---------- Quote / opening line ---------- */
.quote {
  position: relative;
  padding: 16px 18px 16px 22px;
  border-radius: var(--r-3);
  background: var(--accent-softer);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--ink-1);
  letter-spacing: -0.005em;
  box-shadow: 0 0 0 1px oklch(from var(--accent) l c h / 0.18) inset;
}
.quote::before {
  content: ""; position: absolute; left: 10px; top: 18px; bottom: 18px;
  width: 2px; background: var(--accent); border-radius: 2px;
}
.quote .head {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  color: var(--accent-ink);
  margin-bottom: 6px;
  font-weight: 500;
}
.quote .body {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---------- Bullet list ---------- */
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets li {
  padding: 8px 0 8px 20px;
  position: relative;
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.5;
}
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 8px; height: 1px; background: var(--ink-3);
}
.bullets.warn li::before { background: var(--alert); }
.bullets b { color: var(--ink-1); font-weight: 600; }

/* ---------- Activity row ---------- */
.activity {
  display: grid;
  grid-template-columns: 64px 1fr 18px;
  gap: 12px;
  padding: 10px 0;
  align-items: start;
  border-top: 1px solid var(--line-1);
  font-size: var(--t-sm);
}
.activity:first-of-type { border-top: 0; }
.activity .when {
  font-size: var(--t-xs);
  color: var(--ink-3);
  padding-top: 1px;
  line-height: 1.4;
}
.activity .text { color: var(--ink-1); }
.activity .text small { display: block; color: var(--ink-3); font-size: var(--t-xs); margin-top: 2px; }
.activity .ok  { color: var(--success); }
.activity .bad { color: var(--ink-mute); }

/* ---------- Timeline (call events) ---------- */
.timeline {
  position: relative;
  padding: 18px 36px 24px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-sunken);
}
.timeline-track {
  position: relative; height: 36px;
  background: linear-gradient(to right, var(--line-1), var(--line-1)) center / 100% 1px no-repeat;
}
.timeline .ev {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.timeline .ev .ic {
  width: 22px; height: 22px; border-radius: 99px;
  background: var(--bg-elev); box-shadow: var(--shadow-1);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.timeline .ev.ok    .ic { color: var(--success); }
.timeline .ev.alert .ic { color: var(--alert); box-shadow: 0 0 0 4px oklch(58% 0.18 28 / 0.12); }
.timeline .ev.warn  .ic { color: var(--warn-ink); }
.timeline .ev .lbl {
  font-size: 10px; color: var(--ink-3);
  white-space: nowrap;
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
}
.timeline .now-marker {
  position: absolute; top: -6px; bottom: -6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--alert), oklch(from var(--alert) l c h / 0));
}
.timeline .now-marker::before {
  content: ""; position: absolute; top: -4px; left: -4px;
  width: 10px; height: 10px; border-radius: 99px;
  background: var(--alert);
  box-shadow: 0 0 0 4px oklch(58% 0.18 28 / 0.18);
  animation: blink-dot 1.4s ease-in-out infinite;
}
.timeline .scale {
  display: flex; justify-content: space-between;
  margin-top: 30px;
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-4);
}

/* ---------- Mini visualizations ---------- */
.viz-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.viz-bars i {
  flex: 1; background: var(--ink-3); border-radius: 1px;
  transform-origin: bottom;
}
.viz-spark { display: block; width: 100%; height: 100%; }

/* ---------- Causal trace lines (cross-component) ---------- */
.trace-line {
  position: absolute;
  background: var(--alert);
  pointer-events: none;
  opacity: 0.5;
}

/* ============== Queue screen ============== */
.q-main {
  flex: 1;
  padding: 32px 40px 80px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.q-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.q-title {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: -0.022em;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--ink-1);
}
.q-sub {
  font-size: var(--t-base);
  color: var(--ink-2);
  margin: 0;
  max-width: 540px;
}
.q-kpis {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  padding: 4px;
}
.q-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  min-width: 76px;
  border-right: 1px solid var(--line-1);
}
.q-kpi:last-child { border-right: 0; }
.q-kpi-v {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-1);
}
.q-kpi-k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 500;
}
.q-kpi-alert   .q-kpi-v { color: var(--alert-ink); }
.q-kpi-warn    .q-kpi-v { color: var(--warn-ink); }
.q-kpi-success .q-kpi-v { color: var(--success-ink); }

.q-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
}
.q-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.q-filter-l {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.q-select {
  background: var(--bg-elev);
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 7px 28px 7px 12px;
  font-size: var(--t-sm);
  color: var(--ink-1);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='gray' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--d-fast);
}
.q-select:hover { border-color: var(--line-strong); }
.q-select:focus { outline: 0; border-color: var(--accent); }

.q-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-card {
  position: relative;
  display: block;
  background: var(--bg-panel);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast);
}
a.q-card { cursor: pointer; }
a.q-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
a.q-card:hover .q-arrow {
  background: var(--accent-soft);
  color: var(--accent-ink);
  transform: translateX(2px);
}
.q-bar {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 4px;
}
.q-bar-high    { background: var(--alert); }
.q-bar-med     { background: var(--warn); }
.q-bar-low     { background: var(--success); }

.q-card-body {
  padding: 16px 20px 18px 24px;
}
.q-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.q-card-name {
  flex: 1;
  min-width: 0;
}
.q-name-line {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: wrap;
}
.q-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  white-space: nowrap;
}
.q-age {
  font-size: var(--t-base);
  color: var(--ink-3);
  font-weight: 400;
  white-space: nowrap;
}
.q-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.q-risk {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 600;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-1);
}
.q-risk-high { background: var(--alert-soft);   color: var(--alert-ink); }
.q-risk-med  { background: var(--warn-soft);    color: var(--warn-ink); }
.q-risk-low  { background: var(--success-soft); color: var(--success-ink); }
.q-tasks {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.q-arrow {
  width: 32px; height: 32px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: var(--bg-sunken);
  flex-shrink: 0;
  transition: all var(--d-fast);
}
.q-narrative {
  font-size: var(--t-base);
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 12px;
  margin-left: 54px;
}
.q-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-left: 54px;
}
.q-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: var(--r-1);
  background: var(--bg-sunken);
  color: var(--ink-3);
  border: 1px solid var(--line-1);
}
.q-tag-high { color: var(--alert-ink); border-color: oklch(from var(--alert) l c h / 0.3); background: var(--alert-softer); }
.q-tag-med  { color: var(--warn-ink);  border-color: oklch(from var(--warn) l c h / 0.3);  background: var(--warn-softer); }
.q-tag-low  { color: var(--success-ink); border-color: oklch(from var(--success) l c h / 0.3); background: var(--success-softer); }

.q-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  margin-left: 54px;
  font-size: var(--t-sm);
  color: var(--ink-3);
  font-weight: 500;
  padding: 4px 0;
  white-space: nowrap;
}
.q-more-toggle:hover { color: var(--ink-1); }
.q-chev {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform var(--d-fast);
}
.q-chev.open { transform: rotate(90deg); }
.q-more-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 12px 0 4px 54px;
  border-top: 1px dashed var(--line-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-more-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.5;
}
.q-dot {
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 99px;
  background: var(--accent);
  margin-top: 7px;
}


/* ====================================================== */
/* ====== Landing page (.lp-*) — dark-locked marketing  == */
/* ====================================================== */

/* === Puzzle-inspired re-skin === */
.lp-page {
  color: var(--ink-1);
  font-family: var(--font-sans);
  overflow-x: hidden;
  background: oklch(10% 0.04 275);
}
/* Concentric radar rings + soft glows */
.lp-page::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 900px at 15% 5%, oklch(40% 0.18 295 / 0.55), transparent 60%),
    radial-gradient(1000px 900px at 95% 35%, oklch(40% 0.18 270 / 0.45), transparent 55%),
    radial-gradient(900px 700px at 50% 130%, oklch(46% 0.18 320 / 0.35), transparent 60%),
    oklch(10% 0.04 275);
}
.lp-page::after {
  content: "";
  position: fixed; left: 50%; top: 50%; width: 2000px; height: 2000px;
  transform: translate(-50%, -50%);
  background-image:
    radial-gradient(circle, transparent 0, transparent 100px, oklch(88% 0.18 175 / 0.05) 100px, transparent 102px),
    radial-gradient(circle, transparent 0, transparent 220px, oklch(88% 0.18 175 / 0.04) 220px, transparent 222px),
    radial-gradient(circle, transparent 0, transparent 360px, oklch(88% 0.18 175 / 0.035) 360px, transparent 362px),
    radial-gradient(circle, transparent 0, transparent 520px, oklch(88% 0.18 175 / 0.03) 520px, transparent 522px),
    radial-gradient(circle, transparent 0, transparent 700px, oklch(88% 0.18 175 / 0.025) 700px, transparent 702px),
    radial-gradient(circle, transparent 0, transparent 900px, oklch(88% 0.18 175 / 0.02) 900px, transparent 902px);
  pointer-events: none; z-index: 0;
  mask-image: radial-gradient(closest-side, oklch(0% 0 0 / 0.9) 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(closest-side, oklch(0% 0 0 / 0.9) 30%, transparent 75%);
  opacity: 0.9;
}

/* Pill nav like Puzzle */
.lp-nav {
  position: sticky; top: 18px; z-index: 50;
  width: calc(100% - 64px);
  max-width: 1280px;
  margin: 18px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 22px;
  border-radius: 99px;
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  background: oklch(14% 0.04 275 / 0.6);
  border: 1px solid oklch(96% 0.02 270 / 0.10);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.05) inset, 0 10px 40px -10px oklch(0% 0 0 / 0.6);
}
.lp-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 19px;
  letter-spacing: -0.018em;
  text-decoration: none; color: inherit;
}
.lp-nav-brand .lp-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(140deg, oklch(86% 0.22 165), oklch(70% 0.20 195));
  display: grid; place-items: center;
  color: oklch(14% 0.04 270);
  font-size: 14px; font-weight: 700;
  font-family: var(--font-display);
  box-shadow: 0 0 22px oklch(80% 0.22 175 / 0.55);
}
.lp-nav-links { display: flex; gap: 6px; align-items: center; }
.lp-nav-links a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 450;
  padding: 8px 14px;
  border-radius: 99px;
  transition: color var(--d-fast), background var(--d-fast);
}
.lp-nav-links a:hover {
  color: var(--ink-1);
  background: oklch(96% 0.02 270 / 0.06);
}
.lp-nav-cta { display: flex; align-items: center; gap: 8px; }
@media (max-width: 880px) {
  .lp-nav { width: calc(100% - 24px); padding: 10px 10px 10px 18px; }
  .lp-nav-links { display: none; }
}

/* Sections */
.lp-section {
  position: relative; z-index: 1;
  padding: 96px 48px;
  max-width: 1280px; margin: 0 auto;
}
.lp-screen-section { padding: 72px 48px; }
@media (max-width: 1024px) { .lp-section, .lp-screen-section { padding: 80px 28px; } }
@media (max-width: 768px) { .lp-section, .lp-screen-section { padding: 56px 18px; } }

.lp-section-head { max-width: 880px; margin-bottom: 44px; }

.lp-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(96% 0.01 270 / 0.55);
  font-weight: 500;
  margin: 0 0 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.lp-eyebrow::before {
  content: ""; width: 22px; height: 1px;
  background: oklch(96% 0.01 270 / 0.3); opacity: 1;
}

.lp-h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 6.2vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.036em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.lp-h1 em { font-style: normal; color: inherit; font-weight: inherit; }
.lp-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.026em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.lp-h2 em { font-style: normal; color: inherit; font-weight: inherit; }
.lp-h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.016em;
  margin: 0 0 10px;
}
.lp-sub {
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 560px;
  text-wrap: pretty;
}
.lp-body {
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 16px;
  text-wrap: pretty;
}

/* Glass card — Puzzle-style rim highlight */
.lp-card {
  position: relative;
  background:
    linear-gradient(160deg, oklch(20% 0.04 275 / 0.7), oklch(14% 0.04 275 / 0.85));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid oklch(96% 0.02 270 / 0.08);
  border-radius: 22px;
  padding: 28px;
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.06) inset,
    0 0 0 1px oklch(100% 0 0 / 0.02) inset,
    0 30px 60px -20px oklch(0% 0 0 / 0.55);
  transition: transform var(--d-base) var(--ease-out), border-color var(--d-base);
}
.lp-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, oklch(96% 0.02 270 / 0.10), transparent 30%);
  opacity: 0.6;
}
.lp-card:hover { border-color: oklch(96% 0.02 270 / 0.16); }
.lp-card .lp-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, oklch(35% 0.12 175 / 0.5), oklch(28% 0.10 305 / 0.4));
  color: oklch(88% 0.16 175);
  margin-bottom: 18px;
  border: 1px solid oklch(96% 0.02 270 / 0.10);
  box-shadow: 0 0 20px oklch(80% 0.18 175 / 0.18), inset 0 1px 0 oklch(100% 0 0 / 0.15);
  position: relative; z-index: 1;
}
.lp-card .lp-card-body {
  font-size: var(--t-sm); color: var(--ink-2);
  line-height: 1.55; margin: 0;
  position: relative; z-index: 1;
}
.lp-card .lp-h3 { position: relative; z-index: 1; }

/* Buttons */
.lp-btn-primary {
  background: linear-gradient(180deg, oklch(90% 0.22 165), oklch(76% 0.22 168));
  color: oklch(14% 0.04 270);
  height: 46px; padding: 0 20px; border-radius: 99px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid oklch(70% 0.20 168);
  box-shadow:
    0 0 30px oklch(80% 0.22 168 / 0.45),
    0 6px 18px oklch(0% 0 0 / 0.35),
    inset 0 1px 0 oklch(100% 0 0 / 0.4);
  transition: transform var(--d-fast), filter var(--d-fast);
  cursor: pointer; font-family: inherit; text-decoration: none;
}
.lp-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.lp-btn-primary.lp-btn-lg { height: 56px; padding: 0 32px; font-size: 16px; }

.lp-btn-ghost {
  background: transparent;
  color: oklch(88% 0.16 175);
  height: 46px; padding: 0 20px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid oklch(80% 0.18 175 / 0.45);
  transition: background var(--d-fast), border-color var(--d-fast);
  cursor: pointer; font-family: inherit; text-decoration: none;
}
.lp-btn-ghost:hover { background: oklch(80% 0.18 175 / 0.08); border-color: oklch(80% 0.18 175 / 0.7); }

/* HERO */
.lp-hero { padding-top: 60px; padding-bottom: 60px; }
.lp-hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px;
  align-items: center;
}
@media (max-width: 1024px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.lp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-hero-meta {
  margin-top: 32px;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.lp-hero-meta span { display: flex; align-items: center; gap: 6px; }
.lp-hero-meta span::before {
  content: ""; width: 4px; height: 4px; border-radius: 99px;
  background: oklch(80% 0.22 168);
  box-shadow: 0 0 8px oklch(80% 0.22 168 / 0.7);
}

/* Atmospheric hero — orbit with scattered UI bits */
.lp-hero-orbit {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  min-height: 460px;
}
.lp-hero-orbit::before {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(50% 50% at 50% 50%, oklch(46% 0.20 200 / 0.30), transparent 70%),
    radial-gradient(60% 60% at 70% 30%, oklch(50% 0.20 310 / 0.18), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}
.lp-orbit-svg { position: relative; z-index: 1; width: 100%; height: 100%; max-width: 600px; }
.lp-orbit-rotor {
  transform-box: fill-box; transform-origin: 280px 280px;
  animation: lp-rotor 24s linear infinite;
}
.lp-rotor-rev { animation-duration: 36s; animation-direction: reverse; }
@keyframes lp-rotor { to { transform: rotate(360deg); } }

/* Floating UI fragment chips in hero */
.lp-hero-frag {
  position: absolute;
  background: oklch(16% 0.04 275 / 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid oklch(96% 0.02 270 / 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.08) inset,
    0 18px 40px -10px oklch(0% 0 0 / 0.6);
  z-index: 2;
}

/* Screenshot frame */
.lp-shot {
  position: relative;
  border-radius: 14px;
  background: oklch(16% 0.04 275 / 0.5);
  border: 1px solid oklch(96% 0.02 270 / 0.12);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.06) inset,
    0 50px 100px -20px oklch(0% 0 0 / 0.6),
    0 0 60px oklch(46% 0.20 200 / 0.18);
  padding: 8px;
  overflow: hidden;
}
.lp-shot img { display: block; width: 100%; border-radius: 8px; }
.lp-shot-caption {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 14px;
}
.lp-shot-glow {
  position: absolute; inset: -10% -8% -20% -8%;
  background: radial-gradient(60% 50% at 50% 40%, oklch(46% 0.20 200 / 0.30), transparent 70%);
  filter: blur(40px);
  pointer-events: none; z-index: 0;
}

/* WHAT IT IS — 3 cards */
.lp-three {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 880px) { .lp-three { grid-template-columns: 1fr; } }

/* BEHAVIORAL LAYER — patient stack */
.lp-stack-card {
  padding: 36px 40px 28px;
  margin-top: 8px;
}
.lp-stack-card svg { width: 100%; height: auto; display: block; }

.lp-bridge {
  margin-top: 48px;
  padding: 28px 40px;
  border-top: 1px solid oklch(96% 0.02 270 / 0.10);
  border-bottom: 1px solid oklch(96% 0.02 270 / 0.10);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  text-align: center;
  text-wrap: balance;
  font-weight: 400;
}
.lp-bridge em { color: inherit; font-style: normal; font-weight: inherit; }
.lp-bridge strong { color: var(--ink-1); font-weight: 600; }

/* TWO MODES */
.lp-two-modes {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 8px;
  border: 1px solid oklch(96% 0.02 270 / 0.10);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, oklch(20% 0.04 275 / 0.7), oklch(14% 0.04 275 / 0.85));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.06) inset,
    0 30px 70px -20px oklch(0% 0 0 / 0.55);
}
.lp-mode-col { padding: 40px 32px; position: relative; }
.lp-mode-col + .lp-mode-col { border-left: 1px solid oklch(96% 0.02 270 / 0.10); }
.lp-mode-tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.lp-mode-tag .lp-dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: oklch(80% 0.22 168);
  box-shadow: 0 0 12px oklch(80% 0.22 168 / 0.7);
}
.lp-mode-col.lp-mode-augmented .lp-mode-tag .lp-dot {
  background: oklch(74% 0.22 305);
  box-shadow: 0 0 12px oklch(74% 0.22 305 / 0.7);
}
.lp-mode-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 500;
}
.lp-mode-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-mode-list li {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
  padding-left: 24px;
  position: relative;
}
.lp-mode-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 12px; height: 1px; background: oklch(96% 0.02 270 / 0.3);
}
.lp-mode-list li.lp-mode-highlight {
  color: var(--ink-1); font-weight: 500;
}
.lp-mode-list li.lp-mode-highlight::before {
  background: oklch(74% 0.22 305); height: 2px;
  box-shadow: 0 0 8px oklch(74% 0.22 305 / 0.7);
}
.lp-mode-axis {
  margin: 32px auto 0;
  max-width: 880px;
  text-align: center;
  padding: 22px 32px;
  border: 1px solid oklch(96% 0.02 270 / 0.10);
  border-radius: 99px;
  background: oklch(20% 0.04 275 / 0.7);
  backdrop-filter: blur(12px);
  position: relative;
}
.lp-mode-axis::before, .lp-mode-axis::after {
  content: "";
  position: absolute; top: 50%; width: 48px; height: 1px;
  background: linear-gradient(90deg, transparent, oklch(96% 0.02 270 / 0.25));
}
.lp-mode-axis::before { left: -48px; }
.lp-mode-axis::after { right: -48px; transform: scaleX(-1); }
.lp-mode-axis-text {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  font-weight: 400;
}
.lp-mode-axis-text strong { color: var(--ink-1); font-weight: 600; }
@media (max-width: 880px) {
  .lp-two-modes { grid-template-columns: 1fr; }
  .lp-mode-col + .lp-mode-col { border-left: 0; border-top: 1px solid oklch(96% 0.02 270 / 0.10); }
  .lp-mode-axis { border-radius: 16px; padding: 22px; }
}

/* DIFFERENTIATION band */
.lp-band {
  margin: 0;
  padding: 56px 48px;
  border-top: 1px solid oklch(96% 0.02 270 / 0.10);
  border-bottom: 1px solid oklch(96% 0.02 270 / 0.10);
  background: linear-gradient(180deg, oklch(16% 0.04 275 / 0.25), oklch(10% 0.04 275 / 0.15));
}
.lp-band-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px;
  align-items: center;
}
.lp-band h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.024em;
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}
.lp-band p {
  font-size: var(--t-lg); color: var(--ink-2);
  line-height: 1.5; margin: 0; text-wrap: pretty;
}
@media (max-width: 880px) {
  .lp-band-inner { grid-template-columns: 1fr; gap: 20px; }
  .lp-band { padding: 44px 24px; }
}

/* SCREEN WALKTHROUGHS */
.lp-screen-row {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px;
  align-items: center;
}
.lp-screen-row.reverse { grid-template-columns: 1.2fr 1fr; }
.lp-screen-row.reverse .lp-screen-copy { order: 2; }
.lp-screen-row.reverse .lp-screen-image { order: 1; }
.lp-screen-copy .lp-h2 { margin-bottom: 18px; }
@media (max-width: 1024px) {
  .lp-screen-row, .lp-screen-row.reverse { grid-template-columns: 1fr; gap: 36px; }
  .lp-screen-row.reverse .lp-screen-copy,
  .lp-screen-row.reverse .lp-screen-image { order: 0; }
}

/* HOW IT FITS */
.lp-fits {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px;
  align-items: end;
  padding: 56px 0;
  border-top: 1px solid oklch(96% 0.02 270 / 0.10);
  border-bottom: 1px solid oklch(96% 0.02 270 / 0.10);
}
.lp-fits h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.1; letter-spacing: -0.024em;
  margin: 0; font-weight: 500; text-wrap: balance;
}
.lp-fits-body p {
  font-size: var(--t-base); color: var(--ink-2);
  line-height: 1.6; margin: 0 0 14px;
}
.lp-fits-body p strong { color: var(--ink-1); font-weight: 600; }
.lp-fits-compliance {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed oklch(96% 0.02 270 / 0.10);
}
@media (max-width: 880px) {
  .lp-fits { grid-template-columns: 1fr; gap: 20px; }
}

/* WHO IT'S FOR — ROI pill */
.lp-card .lp-roi {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.10em;
  color: oklch(14% 0.04 270);
  padding: 5px 12px; border-radius: 99px;
  background: linear-gradient(180deg, oklch(90% 0.22 165), oklch(76% 0.22 168));
  border: 1px solid oklch(70% 0.20 168);
  text-transform: uppercase; font-weight: 600;
  box-shadow: 0 0 16px oklch(80% 0.22 168 / 0.35);
  position: relative; z-index: 1;
}

/* FINAL CTA */
.lp-cta {
  text-align: center;
  padding: 112px 48px 88px;
  max-width: 760px; margin: 0 auto;
  position: relative; z-index: 1;
}
.lp-cta .lp-h1 { font-size: clamp(48px, 5.6vw, 76px); }
.lp-cta .lp-sub { margin-left: auto; margin-right: auto; }
.lp-cta-bullets {
  list-style: none; padding: 0; margin: 20px auto 32px;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 440px; text-align: left;
}
.lp-cta-bullets li {
  font-size: var(--t-sm); color: var(--ink-3);
  padding-left: 22px; position: relative;
  line-height: 1.5;
}
.lp-cta-bullets li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 12px; height: 1px;
  background: oklch(80% 0.22 168); opacity: 0.8;
}

/* FOOTER */
.lp-footer {
  position: relative; z-index: 1;
  border-top: 1px solid oklch(96% 0.02 270 / 0.10);
  padding: 56px 48px 40px;
  background: oklch(8% 0.04 275 / 0.6);
  backdrop-filter: blur(20px);
}
.lp-footer-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px;
}
.lp-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; margin: 0 0 16px;
}
.lp-footer-contact {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px; font-size: var(--t-sm); color: var(--ink-2); margin: 0;
}
.lp-footer-contact dt {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 4px;
}
.lp-footer-contact dd { margin: 0; color: var(--ink-2); line-height: 1.5; }
.lp-footer-contact a { color: var(--ink-1); text-decoration: none; }
.lp-footer-contact a:hover { color: oklch(88% 0.16 175); }
.lp-footer-bottom {
  max-width: 1280px; margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid oklch(96% 0.02 270 / 0.10);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: var(--t-xs); letter-spacing: 0.05em;
  color: var(--ink-4); text-transform: uppercase;
}
.lp-footer-bottom a { color: var(--ink-3); text-decoration: none; margin-left: 16px; }
.lp-footer-bottom a:hover { color: var(--ink-1); }
@media (max-width: 880px) {
  .lp-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .lp-footer-bottom { flex-direction: column; gap: 12px; }
}


/* ---------- Navrail · collapsed rail mode ---------- */
.navrail { position: relative; transition: width var(--d-fast) ease; }
.navrail-toggle {
  position: absolute; top: 10px; right: 8px;
  width: 22px; height: 22px; padding: 0;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--ink-3); cursor: pointer;
  transition: background var(--d-fast), color var(--d-fast);
  z-index: 2;
}
.navrail-toggle:hover { background: var(--bg-sunken); color: var(--ink-1); }
.navrail.is-rail { width: 56px; }
.navrail.is-rail .navrail-toggle { right: 50%; transform: translateX(50%); }
.navrail.is-rail .nav-zone-head,
.navrail.is-rail .nav-zone-empty,
.navrail.is-rail .nav-mini-label,
.navrail.is-rail .nav-item-label,
.navrail.is-rail .nav-item-tag,
.navrail.is-rail .nav-profile-text { display: none; }
.navrail.is-rail .navrail-scroll { padding: 36px 6px 6px; }
.navrail.is-rail .nav-zone-items { margin: 4px 0; }
.navrail.is-rail .nav-item-row {
  justify-content: center; padding: 0; height: 40px; width: 44px; margin: 0 auto;
}
.navrail.is-rail .nav-item-row.active::before { left: -6px; top: 8px; bottom: 8px; }
.navrail.is-rail .nav-divider { margin: 8px 8px; }
.navrail.is-rail .nav-profile { justify-content: center; padding: 8px 0; }
.navrail.is-rail .nav-profile > *:not(:first-child) { display: none; }


/* ---------- Hero timeline visual (v3) ---------- */
.lp-hero-timeline {
  position: relative;
  width: 100%; max-width: 620px;
  margin: 0 auto;
}
.lp-tl-svg { display: block; width: 100%; height: auto; }

/* ---------- Patient stack — compact rows (v3) ---------- */
.lp-stack {
  position: relative;
  margin: 0 auto;
  max-width: 880px;
  padding-left: 32px;
}
.lp-stack-spine {
  position: absolute;
  left: 12px; top: 40px; bottom: 18px;
  width: 1px;
  background: linear-gradient(to bottom,
    oklch(96% 0.01 270 / 0.05),
    oklch(96% 0.01 270 / 0.25) 30%,
    oklch(96% 0.01 270 / 0.25) 70%,
    oklch(96% 0.01 270 / 0.05));
}
.lp-stack-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(96% 0.01 270 / 0.45);
  margin-bottom: 14px;
}
.lp-stack-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: oklch(20% 0.03 270 / 0.45);
  border: 1px solid oklch(96% 0.01 270 / 0.06);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  position: relative;
}
.lp-stack-row.is-base { background: oklch(22% 0.02 270 / 0.32); }
.lp-stack-marker {
  position: absolute;
  left: -26px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 99px;
  background: oklch(14% 0.04 270);
  border: 1.5px solid oklch(96% 0.01 270 / 0.45);
}
.lp-stack-row.is-base .lp-stack-marker {
  border-color: oklch(96% 0.01 270 / 0.25);
}
.lp-stack-text { min-width: 0; }
.lp-stack-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  line-height: 1.2;
}
.lp-stack-sub {
  font-size: 13px;
  color: oklch(96% 0.01 270 / 0.55);
  line-height: 1.4;
  margin: 2px 0 0;
}
.lp-stack-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(96% 0.01 270 / 0.5);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid oklch(96% 0.01 270 / 0.12);
  background: oklch(96% 0.01 270 / 0.03);
  white-space: nowrap;
}
.lp-stack-row.is-base .lp-stack-tag {
  color: oklch(96% 0.01 270 / 0.4);
  background: transparent;
}
@media (max-width: 720px) {
  .lp-stack-tag { display: none; }
}


/* ---------- Biomarker trend indicator (unified, replaces graphics) ---------- */
.bio-trend {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  align-self: center;
}
.bio-trend-glyph {
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  font-family: var(--font-sans);
  font-weight: 600;
}
.bio-trend.tone-stable { color: var(--ink-3); }
.bio-trend.tone-bad    { color: var(--alert-ink); }
.bio-trend.tone-good   { color: var(--success-ink); }
[data-theme="dark"] .bio-trend.tone-stable { color: oklch(70% 0 0 / 0.6); }

/* ---------- Landing Form ---------- */
.lp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 36px auto 0;
}
.lp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lp-form input,
.lp-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: oklch(96% 0.01 270 / 0.04);
  border: 1px solid oklch(96% 0.01 270 / 0.12);
  border-radius: var(--r-2);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: var(--t-base);
  outline: none;
  transition: border-color var(--d-fast) var(--ease-out), background var(--d-fast);
  box-sizing: border-box;
}
.lp-form input::placeholder,
.lp-form textarea::placeholder {
  color: oklch(96% 0.01 270 / 0.35);
}
.lp-form input:focus,
.lp-form textarea:focus {
  border-color: var(--accent);
  background: oklch(96% 0.01 270 / 0.07);
}
.lp-form textarea {
  resize: vertical;
  min-height: 84px;
  font-family: var(--font-body);
}
.lp-form button {
  margin-top: 12px;
  align-self: center;
}
.lp-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.lp-form-success {
  max-width: 560px;
  margin: 36px auto 0;
  text-align: center;
  padding: 28px 24px;
  background: oklch(82% 0.16 195 / 0.08);
  border: 1px solid oklch(82% 0.16 195 / 0.28);
  border-radius: var(--r-3);
}
.lp-form-success h3 {
  margin: 0 0 8px;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: 500;
  letter-spacing: -0.018em;
}
.lp-form-success p {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--t-base);
}
.lp-form-success a {
  color: var(--accent);
  text-decoration: none;
}
.lp-form-success a:hover {
  text-decoration: underline;
}
.lp-form-error {
  margin: 14px 0 0;
  color: oklch(72% 0.18 25);
  font-size: var(--t-sm);
  text-align: center;
}
.lp-form-error a {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .lp-form-row { grid-template-columns: 1fr; }
}
