/* CRO Test Library — prototype design system. Plain CSS, no build. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #1a1d23;
  --text-2: #555d6b;
  --text-3: #8a92a0;
  --accent: #3b5bdb;
  --accent-soft: #edf1fe;
  --win: #1f8a4c;      --win-soft: #e6f5ec;
  --loss: #c92a2a;     --loss-soft: #fdecec;
  --flat: #6b7280;     --flat-soft: #eef0f3;
  --mixed: #b25e09;    --mixed-soft: #fdf2e3;
  --warn: #b25e09;     --warn-soft: #fff6e6;
  --info: #1971c2;     --info-soft: #e7f1fb;
  --violet: #6741d9;   --violet-soft: #f1edfd;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --sidebar-w: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 8px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #11151c;
  color: #c9ced8;
  padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 16px; color: #fff; font-weight: 650; }
.sidebar .brand .logo { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; font-size: 12px; }
.sidebar .section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7383; padding: 14px 8px 6px; }
.sidebar a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #c9ced8; padding: 7px 8px; border-radius: 6px; text-decoration: none;
}
.sidebar a:hover { background: #1c222c; color: #fff; }
.sidebar a.active { background: #252d3a; color: #fff; }
.sidebar .phase { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #252d3a; color: #9aa3b2; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar .crumbs { min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--text-2); }
.topbar .crumbs b { color: var(--text); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .search {
  width: 280px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface-2); color: var(--text-3); font-size: 13px;
}
.content { padding: 24px; max-width: 1440px; width: 100%; }

.proto-bar {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2);
  padding: 4px 8px; border: 1px dashed var(--border-strong); border-radius: 6px; background: #fffdf5;
  white-space: nowrap; flex: 0 0 auto;
}
.proto-bar select { font-size: 12px; padding: 2px 4px; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .title { display: flex; flex-direction: column; gap: 6px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #3049b8; }
.btn.ai { background: var(--violet-soft); border-color: #d6ccfa; color: var(--violet); }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }

/* ---------- Cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

.stat { padding: 14px 16px; }
.stat .label { font-size: 12px; color: var(--text-2); }
.stat .value { font-size: 22px; font-weight: 650; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--text-3); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--flat-soft); color: var(--text-2); white-space: nowrap;
}
.badge.win { background: var(--win-soft); color: var(--win); }
.badge.loss { background: var(--loss-soft); color: var(--loss); }
.badge.flat { background: var(--flat-soft); color: var(--flat); }
.badge.mixed { background: var(--mixed-soft); color: var(--mixed); }
.badge.inconclusive { background: #f3f0e8; color: #7a6a45; }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.live { background: var(--win-soft); color: var(--win); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--win); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ai { background: var(--violet-soft); color: var(--violet); }
.badge.phase { background: #eceef2; color: #5b6472; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; }
.badge.gap { background: #fff0f6; color: #a61e4d; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 5px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 600; }

/* status colors (test lifecycle) */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--text-3); }
.st.idea::before { background: #adb5bd; }
.st.planned::before { background: #74c0fc; }
.st.design::before { background: #9775fa; }
.st.qa::before { background: #f59f00; }
.st.live::before { background: #2f9e44; }
.st.analyzing::before { background: #1c7ed6; }
.st.concluded::before { background: #495057; }
.st.implemented::before { background: #087f5b; }
.st.cancelled::before { background: #e03131; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th {
  text-align: left; font-weight: 550; font-size: 12px; color: var(--text-2);
  padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.t td { padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fafbfc; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t .group-row td { background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--text-2); }
.calc { color: var(--text); background: #f8f9fb; }
th.calc-h { background: #eef1f6 !important; }
.pos { color: var(--win); font-weight: 600; }
.neg { color: var(--loss); font-weight: 600; }
.neutral { color: var(--text-2); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button {
  font: inherit; font-size: 13.5px; padding: 9px 14px; border: 0; background: none; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .count { font-size: 11px; color: var(--text-3); margin-left: 4px; }
[data-panel] { display: none; }
[data-panel].active { display: block; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.select {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
  font-size: 13px; color: var(--text); cursor: pointer;
}
.select::after { content: "▾"; color: var(--text-3); font-size: 11px; }
.select .k { color: var(--text-3); }
.input {
  padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
  font: inherit; font-size: 13px; min-width: 220px;
}

/* ---------- Definition lists ---------- */
.fields { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.fields dt { color: var(--text-2); }
.fields dd { margin: 0; }
.prose { font-size: 14px; }
.prose p:last-child { margin-bottom: 0; }
.label-sm { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.block + .block { margin-top: 18px; }

/* ---------- Variants (text only — no screenshots) ---------- */
.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.variant { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.variant.winner { border-color: #8fd3a8; box-shadow: 0 0 0 2px var(--win-soft); }
.variant-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.shots { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; padding: 10px; }
.shot {
  position: relative; border-radius: 5px; border: 1px solid var(--border); background:
  repeating-linear-gradient(45deg, #f3f4f7, #f3f4f7 8px, #eceef2 8px, #eceef2 16px);
  display: grid; place-items: center; color: var(--text-3); font-size: 11.5px; min-height: 150px;
}
.shot.mobile { min-height: 150px; }
.shot .tag { position: absolute; top: 6px; left: 6px; background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 4px; font-size: 10.5px; color: var(--text-2); }
.variant-desc { padding: 0 12px 12px; font-size: 13px; color: var(--text-2); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.col-head .n { color: var(--text-3); font-weight: 500; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); font-size: 13px; }
.kcard .id { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.kcard .name { font-weight: 550; margin: 2px 0 6px; }
.kcard .meta { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Timeline ---------- */
.timeline { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.tl-grid { display: grid; grid-template-columns: 260px repeat(9, minmax(80px, 1fr)); min-width: 1000px; }
.tl-grid > div { border-bottom: 1px solid var(--border); padding: 8px 10px; font-size: 12.5px; }
.tl-month { background: var(--surface-2); color: var(--text-2); font-weight: 550; border-left: 1px solid var(--border); }
.tl-label { display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { grid-column: 2 / -1; position: relative; padding: 0 !important; height: 34px;
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: calc(100% / 9) 100%; }
.tl-bar { position: absolute; top: 8px; height: 18px; border-radius: 4px; font-size: 11px; color: #fff; padding: 1px 6px; white-space: nowrap; overflow: hidden; }
.tl-bar.win { background: #2f9e44; } .tl-bar.loss { background: #e03131; } .tl-bar.flat { background: #868e96; }
.tl-bar.mixed { background: #e8590c; } .tl-bar.inconclusive { background: #a39274; } .tl-bar.live { background: #1c7ed6; }
.tl-bar.planned { background: transparent; border: 1.5px dashed #74c0fc; color: #1971c2; }
.tl-bar.overlap { outline: 2px solid #f59f00; outline-offset: 1px; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--loss); opacity: .6; }

/* ---------- Callouts ---------- */
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: 6px; font-size: 13px; border: 1px solid; }
.callout.warn { background: var(--warn-soft); border-color: #f5d9a8; color: #7a4a06; }
.callout.info { background: var(--info-soft); border-color: #bcd9f5; color: #154a80; }
.callout.ai { background: var(--violet-soft); border-color: #d6ccfa; color: #4a2fa8; }
.callout .ico { flex: 0 0 auto; font-weight: 700; }

/* ---------- Iteration chain ---------- */
.chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.chain .node { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.chain .node.current { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.chain .arrow { color: var(--text-3); }

/* ---------- Activity ---------- */
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #dbe4ff; color: #364fc7; display: grid; place-items: center; font-size: 11px; font-weight: 650; flex: 0 0 auto; }
.avatar.ai { background: var(--violet-soft); color: var(--violet); }

/* ---------- List rows ---------- */
.rows > * { padding: 10px 0; border-bottom: 1px solid var(--border); }
.rows > *:last-child { border-bottom: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- Role visibility (prototype) ---------- */
body.role-anon .full-only { display: none !important; }
/* admin-only: Admin role only · edit-only: Admin + Editor · viewer-only / nonadmin-only: explanatory notes */
body:not(.role-admin) .admin-only { display: none !important; }
body.role-viewer .edit-only, body.role-anon .edit-only { display: none !important; }
body:not(.role-viewer) .viewer-only { display: none !important; }
body.role-admin .nonadmin-only { display: none !important; }
body:not(.role-viewer):not(.role-anon):not(.role-client) .noedit-only { display: none !important; }
/* Client (external, read-only own tests): client-only shown only to them; client-hide + edit-only + admin-only hidden */
body:not(.role-client) .client-only { display: none !important; }
body.role-client .client-hide, body.role-client .edit-only, body.role-client .admin-only { display: none !important; }
.role-pill { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
body:not(.role-anon) .anon-only { display: none !important; }
.redacted { background: #e9ecef; color: transparent; border-radius: 3px; user-select: none; }

/* ---------- Index ---------- */
.screen-list a.card { display: block; padding: 14px 16px; color: inherit; text-decoration: none; }
.screen-list a.card:hover { border-color: var(--accent); }
.screen-list .todo { opacity: .55; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .topbar .search { display: none; }
}
@media (max-width: 1100px) {
  .layout-side { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .variants { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; gap: 2px 0; }
  .fields dd { margin-bottom: 8px; }
}

/* ---------- AI settings: editor, split panes, settings ---------- */
.editor {
  width: 100%; min-height: 280px; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  padding: 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fcfcfd; color: var(--text);
}
.editor.short { min-height: 160px; }
.var { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: var(--violet-soft); color: var(--violet); white-space: nowrap; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.nav-list a { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: 13px; text-decoration: none; }
.nav-list a:hover { background: var(--surface-2); }
.nav-list a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.setting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.setting label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.setting .select, .setting .input { width: 100%; min-width: 0; justify-content: space-between; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.seg span { padding: 5px 10px; font-size: 12.5px; border-right: 1px solid var(--border-strong); cursor: pointer; }
.seg span:last-child { border-right: 0; }
.seg span.on { background: var(--accent); color: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.toggle i { width: 30px; height: 17px; border-radius: 999px; background: var(--border-strong); position: relative; flex: 0 0 auto; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.toggle.on i { background: var(--win); }
.toggle.on i::after { left: 15px; }
.locked { background: #f8f9fb; border: 1px dashed var(--border-strong); border-radius: 6px; padding: 12px; font-size: 13px; }
.locked li { margin: 2px 0; }
.answer { border: 1px solid var(--border); border-radius: 6px; padding: 12px; font-size: 13px; background: var(--surface); }
.answer .cite { font-family: var(--mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); padding: 0 4px; border-radius: 3px; }
.metric-up { color: var(--win); font-weight: 600; }
.metric-down { color: var(--loss); font-weight: 600; }
.scope-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); margin-bottom: 16px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Forms (Stage 2) ---------- */
.form-section { scroll-margin-top: 72px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.f label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 5px; }
.f .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.f input, .f textarea, .f .control {
  width: 100%; font: inherit; font-size: 13.5px; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text);
}
.f textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.f .control { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 37px; flex-wrap: wrap; cursor: pointer; }
.f .control.list::after { content: "▾"; color: var(--text-3); font-size: 11px; margin-left: auto; }
.f .control .chip { background: var(--accent-soft); border-color: #cdd7fb; color: var(--accent); }
.f .control.readonly { background: #f8f9fb; cursor: default; color: var(--text-2); }
.f .control.readonly::after { content: attr(data-kind); font-size: 10.5px; color: var(--text-3); margin-left: auto; }
.f.req label::after { content: "required"; font-size: 10.5px; font-weight: 600; color: var(--loss); background: var(--loss-soft); padding: 0 5px; border-radius: 4px; }
.f.req.missing input, .f.req.missing textarea, .f.req.missing .control { border-color: #f1a5a5; background: #fffafa; }
.f.ai-suggest .control { border-style: dashed; border-color: #c5b6f7; }
.type-tag { font-size: 10.5px; font-weight: 500; color: var(--text-3); background: var(--surface-2); padding: 0 5px; border-radius: 4px; }
.form-nav { position: sticky; top: 72px; }
.form-nav a { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; color: var(--text-2); font-size: 13px; text-decoration: none; }
.form-nav a:hover { background: var(--surface-2); color: var(--text); }
.check { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.check li { display: flex; gap: 8px; padding: 5px 0; }
.check li::before { content: "✓"; color: var(--win); font-weight: 700; width: 14px; }
.check li.no::before { content: "✕"; color: var(--loss); }
.check li.warn::before { content: "!"; color: var(--warn); }
.stepper { display: flex; flex-wrap: wrap; gap: 4px; }
.stepper span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); cursor: pointer; }
.stepper span.done { color: var(--text-2); }
.stepper span.cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper span.target { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.grid-input input { width: 84px; padding: 4px 6px; font: inherit; font-size: 12.5px; text-align: right; border: 1px solid var(--border-strong); border-radius: 4px; }
.upload { border: 1.5px dashed var(--border-strong); border-radius: 6px; padding: 14px; text-align: center; font-size: 12px; color: var(--text-3); background: #fcfcfd; }
.sticky-foot { position: sticky; bottom: 0; background: rgba(246,247,249,.94); backdrop-filter: blur(4px); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; z-index: 5; }

/* ---------- Library (Stage 2) ---------- */
.facets { position: sticky; top: 72px; font-size: 13px; }
.facet { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.facet:last-child { border-bottom: 0; }
.facet h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 6px; }
.facet label { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.facet label .n { margin-left: auto; color: var(--text-3); font-size: 12px; }
.facet input { margin: 0; }
.layout-lib { display: grid; grid-template-columns: 250px minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.result { padding: 14px 16px; }
.result + .result { border-top: 1px solid var(--border); }
.result .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.result .title { font-weight: 600; font-size: 14.5px; }
.result .learn { font-size: 13px; color: var(--text-2); margin: 6px 0; }
.result .deltas { display: flex; gap: 14px; font-size: 12.5px; flex-wrap: wrap; }
.result .deltas b { font-variant-numeric: tabular-nums; }
mark { background: #fff3bf; color: inherit; padding: 0 1px; border-radius: 2px; }
.summary-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
@media (max-width: 1200px) { .layout-lib { grid-template-columns: 220px minmax(0, 1fr); } .layout-lib > :last-child { grid-column: 1 / -1; } }
@media (max-width: 860px) { .layout-lib { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .facets, .form-nav { position: static; } }
.layout-form { grid-template-columns: 200px minmax(0, 1fr) 300px; }
.layout-wide-side { grid-template-columns: minmax(0, 1fr) 320px; }
.gate { position: sticky; top: 72px; }
@media (max-width: 1280px) { .layout-form { grid-template-columns: minmax(0, 1fr) 300px; } .layout-form > nav { display: none; } }
@media (max-width: 1100px) { .layout-form, .layout-wide-side { grid-template-columns: minmax(0, 1fr); } .gate { position: static; } }
table.t td.wrap { white-space: normal; min-width: 200px; }

/* ---------- Library v2: client context, grouped results, thumbnails ---------- */
.ctx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 16px;
  background: var(--accent-soft); border: 1px solid #cdd7fb; border-radius: var(--radius); font-size: 13px; }
.ctx-bar .select { background: #fff; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.group-head:first-child { border-top: 0; }
.result-row { display: block; }
.kv { font-size: 13px; margin: 4px 0; }
.kv b { font-weight: 600; color: var(--text-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
.sim { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.sim.high { background: var(--win-soft); color: var(--win); }
.sim.med { background: var(--info-soft); color: var(--info); }
.sim.low { background: var(--flat-soft); color: var(--flat); }
.sim.self { background: var(--warn-soft); color: var(--warn); }


/* ---------- Simple result lists (Home, Library v3) ---------- */
.answer-line { font-size: 15px; line-height: 1.5; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.rlist details { border-bottom: 1px solid var(--border); }
.rlist details:last-child { border-bottom: 0; }
.rlist summary { list-style: none; display: grid; grid-template-columns: 150px minmax(0, 1fr) 250px 70px 18px; gap: 12px; align-items: center; padding: 11px 16px; cursor: pointer; }
.rlist summary::-webkit-details-marker { display: none; }
.rlist summary:hover { background: #fafbfc; }
.rlist summary::after { content: "›"; color: var(--text-3); font-size: 16px; transition: transform .15s; }
.rlist details[open] summary::after { transform: rotate(90deg); }
.rlist .name { font-weight: 600; }
.rlist .who { font-size: 12.5px; color: var(--text-2); }
.rlist .head { font-size: 13px; }
.rlist .head b { font-size: 14px; }
.rlist .when { font-size: 12px; color: var(--text-3); text-align: right; }
.rlist .more { padding: 4px 16px 14px 178px; font-size: 13px; color: var(--text-2); }
.rlist .more p { margin: 0 0 6px; }
.out { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; justify-self: start; }
.out.won { background: var(--win-soft); color: var(--win); }
.out.part { background: var(--mixed-soft); color: var(--mixed); }
.out.none { background: var(--flat-soft); color: var(--flat); }
.out.lost { background: var(--loss-soft); color: var(--loss); }
.out.live { background: var(--info-soft); color: var(--info); }
.todo-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.todo-row:last-child { border-bottom: 0; }
.todo-row .ic { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.proj { padding: 16px; }
.proj h3 { font-size: 15px; }
.live-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--info); }
@media (max-width: 900px) {
  .rlist summary { grid-template-columns: 1fr; gap: 4px; }
  .rlist summary::after { display: none; }
  .rlist .when { text-align: left; }
  .rlist .more { padding-left: 16px; }
}
table.home-t td { white-space: normal; }
table.home-t td.wrap { min-width: 170px; }
table.home-t .bar { min-width: 110px; }

/* ---------- Home v3: project tabs ---------- */
.ptabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; border: 0; overflow: visible; }
.ptabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 220px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 0; text-align: left; box-shadow: var(--shadow); }
.ptabs button.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); border-bottom-color: var(--accent); }
.ptabs button .pn { font-size: 15px; font-weight: 650; color: var(--text); }
.ptabs button .pb { display: flex; gap: 4px; flex-wrap: wrap; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.sec-title .n { color: var(--text-3); font-weight: 500; }
.trow { display: grid; grid-template-columns: 120px minmax(0, 1.4fr) minmax(0, 1.3fr) 70px 150px minmax(0, 1.2fr); gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.trow:last-child { border-bottom: 0; }
.trow.alert { background: var(--warn-soft); }
.trow .conf { text-align: right; font-variant-numeric: tabular-nums; }
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1000px) { .trow { grid-template-columns: 1fr; gap: 4px; } .trow .conf { text-align: left; } }
th.proj-col { background: #f3f0ff !important; color: var(--violet); }
td.proj-col { background: #fbfaff; }
.btn.active-sub { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rlist.with-lead summary { grid-template-columns: 140px minmax(0, 1fr) 230px 130px 70px 18px; }
.rlist .lead { font-size: 13px; }
@media (max-width: 900px) { .rlist.with-lead summary { grid-template-columns: 1fr; } }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick label { display: block; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; background: var(--surface); }
.pick label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pick input { margin: 0 6px 0 0; }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-right: 6px; }
@media (max-width: 860px) { .pick { grid-template-columns: 1fr; } }

/* ---------- Working dropdowns (prototype) ---------- */
.control.list[data-options] { position: relative; user-select: none; }
.dd-menu { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 4px; }
.dd-menu div { padding: 7px 10px; border-radius: 4px; font-size: 13.5px; cursor: pointer; display: flex; justify-content: space-between; color: var(--text); }
.dd-menu div:hover { background: var(--surface-2); }
.dd-menu div.sel { color: var(--accent); font-weight: 600; }
.dd-menu div.sel::after { content: "✓"; }
.control .ph { color: var(--text-3); }

/* ---------- Over-time charts (dataviz palette slots 1–3, validated light) ---------- */
.trend-wrap { position: relative; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; }
svg.trend { width: 100%; height: auto; display: block; overflow: visible; }
svg.trend .g { stroke: var(--border); stroke-width: 1; }
svg.trend .g.zero { stroke: var(--border-strong); }
svg.trend .ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }
svg.trend .ax { font-size: 11px; fill: var(--text-3); font-family: var(--font); }
svg.trend .lbl { font-size: 12px; fill: var(--text); font-weight: 600; font-family: var(--font); }
svg.trend .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.trend .ring { stroke: var(--surface); stroke-width: 2; }
svg.trend .xh { stroke: var(--text-3); stroke-width: 1; opacity: 0; pointer-events: none; }
.key { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.key i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.tip { position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 6px 20px rgba(16,24,40,.12); pointer-events: none; width: 220px; }
table.home-t td.mono, table.home-t td.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Test status — one style everywhere (pill + dot). Colors never reuse outcome colors (Won green / Lost red). ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.planned { background: #f4f1fd; color: #6741d9; border-color: #e3dcfb; }
.status.progress { background: var(--info-soft); color: var(--info); border-color: #cfe2f6; }
.status.ready { background: #fff7e6; color: #b25e09; border-color: #f5dfb8; }
.status.done { background: var(--surface-2); color: #495057; border-color: var(--border); }
.status.cancelled { background: #f1f3f5; color: #868e96; border-color: var(--border); text-decoration: line-through; }

/* ---------- Timeline v2: day scale for current tests, month scale with finished ---------- */
.tl2 { min-width: 980px; font-size: 13px; }
.tl2-head, .tl2-row, .tl2-bg { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.tl2-head { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tl2-head .tl2-track { height: 26px; position: relative; }
.tl2-head.days .tl2-track { height: 24px; }
.tl2-head .tl2-name { padding: 6px 12px; }
.tl2-m { position: absolute; top: 0; bottom: 0; padding: 5px 6px; font-weight: 600; color: var(--text-2); border-left: 1px solid var(--border-strong); font-size: 12px; overflow: hidden; white-space: nowrap; }
.tl2-d { position: absolute; top: 0; bottom: 0; text-align: center; font-size: 10.5px; color: var(--text-3); padding-top: 5px; }
.tl2-d.we { color: #b0b6c0; }
.tl2-d.today { color: #fff; background: var(--loss); border-radius: 4px; font-weight: 700; }
.tl2-body { position: relative; }
.tl2-bg { position: absolute; inset: 0; pointer-events: none; }
.tl2-bg .tl2-track { position: relative; }
.tl2-we { position: absolute; top: 0; bottom: 0; background: rgba(16,24,40,.035); }
.tl2-wk { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl2-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--loss); opacity: .7; }
.tl2-today span { position: absolute; bottom: 4px; left: 6px; font-size: 10.5px; color: var(--loss); white-space: nowrap; font-weight: 600; }
.tl2-row { position: relative; border-bottom: 1px solid var(--border); min-height: 52px; }
.tl2-row .tl2-name { padding: 7px 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tl2-row .tl2-name a { color: var(--text); font-weight: 550; }
.tl2-row .tl2-name > div { margin-top: 3px; }
.tl2-row .tl2-track { position: relative; }
.tl2-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 14px; border-radius: 4px; overflow: hidden; }
.tl2-bar.progress { background: #cfe2f6; } .tl2-bar.progress i { display: block; height: 100%; background: var(--info); }
.tl2-bar.ready { background: #f5c46b; }
.tl2-bar.planned { background: #e3dcfb; border: 1.5px dashed #6741d9; }
.tl2-bar.done { background: #ced4da; height: 10px; }
.tl2-bar.overlap { outline: 2px solid #f59f00; outline-offset: 1px; }
.tl2-lab { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; color: var(--text-2); }
.tl2-row.done .tl2-name a { color: var(--text-2); font-weight: 500; }
.tl2-unsched { position: absolute; top: 50%; transform: translateY(-50%); left: 8px; font-size: 12px; color: var(--text-3); }
.tl2-sep { padding: 8px 12px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--border); position: relative; }

/* ---------- Rich text + attachments (idea description) ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); }
.rte-bar { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: 6px 6px 0 0; flex-wrap: wrap; }
.rte-bar button, .rte-attach { font: inherit; font-size: 12.5px; padding: 4px 8px; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--text); }
.rte-bar button:hover, .rte-attach:hover { background: var(--border); }
.rte-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }
.rte-body { min-height: 160px; padding: 12px; outline: none; font-size: 14px; line-height: 1.55; }
.rte-body:empty::before { content: attr(data-ph); color: var(--text-3); }
.rte-body h3 { font-size: 15px; margin: 8px 0 4px; }
.rte-body ul, .rte-body ol { padding-left: 22px; margin: 4px 0; }
.drop { margin: 0 12px 10px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: 6px; text-align: center; font-size: 12px; color: var(--text-3); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.files { list-style: none; margin: 0; padding: 0 12px 10px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.files li span:first-child { flex: 1; }
.select[data-options] { position: relative; user-select: none; }
.select .dd-menu { min-width: 200px; right: auto; }
.seg > span, .toggle { cursor: pointer; }

/* ---------- Client-facing reports (document look, print-friendly) ---------- */
.report-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 10px 24px; background: #11151c; color: #c9ced8; font-size: 13px; }
.report-bar a:not(.btn) { color: #c9ced8; }
.report-bar .btn { background: #252d3a; border-color: #252d3a; color: #fff; }
.report-bar .btn.primary { background: var(--accent); border-color: var(--accent); }
.doc { max-width: 820px; margin: 28px auto 60px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 44px 52px; }
.doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--text); margin-bottom: 26px; }
.doc-top .brand { font-size: 12px; color: var(--text-2); text-align: right; line-height: 1.5; }
.doc h1 { font-size: 26px; margin: 4px 0 6px; letter-spacing: -.01em; }
.doc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin: 28px 0 10px; }
.doc p, .doc li { font-size: 14.5px; line-height: 1.6; }
.doc .eyebrow { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.verdict { display: flex; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 10px; background: var(--win-soft); border: 1px solid #b9e2c7; }
.verdict .big { font-size: 34px; font-weight: 700; color: var(--win); line-height: 1; white-space: nowrap; }
.verdict .what { font-size: 15px; line-height: 1.5; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpis > div { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.kpis b { display: block; font-size: 24px; line-height: 1.1; margin-top: 2px; }
.kpis span { font-size: 12px; color: var(--text-2); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp > div { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.cmp .label-sm { margin-bottom: 4px; }
.doc table.t td, .doc table.t th { font-size: 13.5px; }
.doc-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hbar { height: 8px; background: var(--surface-2); border-radius: 4px; position: relative; min-width: 120px; }
.hbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #2a78d6; }
@media print { .report-bar { display: none; } body { background: #fff; } .doc { box-shadow: none; border: 0; margin: 0; padding: 0; } }
@media (max-width: 700px) { .doc { padding: 24px 18px; margin: 12px; } .kpis { grid-template-columns: 1fr 1fr; } .cmp { grid-template-columns: 1fr; } }
.qchart { display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 80px 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.qrow .ql { color: var(--text-2); }
.qrow .qt { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.qtrack { height: 22px; }
.qbar { display: flex; gap: 2px; height: 100%; }
.qbar i { display: grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 600; color: #fff; border-radius: 4px; }
.qbar i.w, .qlegend i.w { background: #2f9e44; } .qbar i.p, .qlegend i.p { background: #e8a33a; } .qbar i.l, .qlegend i.l { background: #e03131; }
.qlegend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.qlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Ask AI drawer (global chat, REQ-AI-2) ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; z-index: 60; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgba(16,24,40,.12); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; background: #fbfbfd; }
.drawer-foot { border-top: 1px solid var(--border); padding: 12px 16px; background: var(--surface); }
.msg { margin-bottom: 14px; font-size: 13.5px; line-height: 1.55; }
.msg.user { margin-left: 48px; background: var(--accent); color: #fff; padding: 9px 12px; border-radius: 12px 12px 2px 12px; }
.msg.ai { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; border-radius: 12px 12px 12px 2px; }
.msg.ai .who-ai { font-size: 11.5px; font-weight: 600; color: var(--violet); margin-bottom: 4px; }
.msg.ai ul { margin: 6px 0; padding-left: 0; list-style: none; }
.msg.ai li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.msg.ai li:last-child { border-bottom: 0; }
.cite { font-family: var(--mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); padding: 0 5px; border-radius: 3px; white-space: nowrap; text-decoration: none; }
.idea-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 8px; background: #fff; }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.prompt-chips button { font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid #d6ccfa; background: var(--violet-soft); color: var(--violet); cursor: pointer; }
@media (max-width: 600px) { .drawer { width: 100vw; } }
.ask { display: flex; gap: 8px; align-items: flex-end; }
.ask textarea { flex: 1; font: inherit; font-size: 14px; padding: 10px 12px; border: 1.5px solid var(--accent); border-radius: 10px; resize: none; outline: none; min-height: 48px; }
.ask textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.idea-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--border); font-size: 13.5px; }
.msg.ai details summary { cursor: pointer; color: var(--accent); font-size: 12px; margin: 2px 0 4px; }
.msg.ai details { font-size: 12.5px; color: var(--text-2); }
.empty { text-align: center; padding: 40px 12px; }
/* Results reach the client only after the PM confirms (product owner, 2026-10-12) */
body.st-confirmed .unconfirmed-only { display: none !important; }
body:not(.st-confirmed) .confirmed-only { display: none !important; }
body.role-client:not(.st-confirmed) .client-needs-confirm { display: none !important; }
body.role-client .tl2-bar.overlap { outline: none; }
.more-tabs { padding: 0; margin-top: 16px; }
.mt-bar { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; }
.mt-bar button { font: inherit; font-size: 13.5px; padding: 12px 12px; border: 0; background: none; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.mt-bar button:hover { color: var(--text); }
.mt-bar button.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.mt-panel { border-top: 1px solid var(--border); }
