:root {
  --bg: #0a0b0f;
  --bg-raised: #101218;
  --bg-hover: #161923;
  --bg-inset: #0d0e13;
  --line: #1c1f29;
  --line-strong: #2a2e3b;
  --text: #e8eaf0;
  --text-2: #a6abbb;
  --text-3: #7b8196;
  --accent: #2b64f5;
  --accent-hover: #4b7fff;
  --accent-strong: #2257e8;
  --accent-text: #6fa3ff;
  --accent-soft: rgba(43, 100, 245, 0.16);
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.12);
  --warn: #f5b955;
  --warn-soft: rgba(245, 185, 85, 0.12);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, 0.12);
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar: 232px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
a { color: var(--accent-text); }
a:visited { color: var(--accent-text); }
th a, td a, .cell-main a { color: var(--text); text-decoration: none; }
td a:hover { color: var(--accent-text); }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent-text);
}
::selection { background: rgba(43, 100, 245, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.mono, td.num, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }

/* Layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; gap: 20px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; }
.brand-mark .ic { width: 16px; height: 16px; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover, .nav-foot:hover { background: var(--bg-hover); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active .ic { color: var(--accent-text); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.quota { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); display: grid; gap: 8px; }
.quota-row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12px; }
.quota-row .mono { color: var(--text); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; overflow: hidden;
  background: radial-gradient(900px 360px at 12% -8%, rgba(43, 100, 245, 0.10), transparent 70%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; width: min(420px, 100%); padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-inset); color: var(--text-3); transition: border-color 0.2s var(--ease); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--text-3); }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.sample-tag { font-size: 11px; color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: 999px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hover); box-shadow: 0 0 0 2px var(--bg); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; }

.view { flex: 1; overflow: auto; padding: 28px; outline: 0; min-width: 0; }
.view-enter { animation: enter 0.35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-raised); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.btn:hover { background: var(--bg-hover); border-color: #3a3f4f; }
.btn:active { transform: translateY(1px); }
.btn { text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.sm { padding: 4px 10px; font-size: 13px; }

/* Panels */
.panel { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; min-width: 0; transition: border-color 0.2s var(--ease); }
.panel:hover { border-color: var(--line-strong); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-head span { color: var(--text-3); font-size: 12px; }
.panel { display: flex; flex-direction: column; }
.panel-body { padding: 18px; flex: 1; display: flex; align-items: center; }
.panel-body > * { width: 100%; }
.panel-body.health { align-items: center; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }

/* Stat strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.strip dl > div { padding: 14px 18px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.strip dl > div:last-child { border-right: 0; }
.strip dt { color: var(--text-3); font-size: 12px; }
.strip dd { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.strip .val { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; color: var(--ok); }
.delta.down { color: var(--bad); }
.strip { padding: 0; }
.strip dl { display: contents; }

/* Health ring card */
.health { display: flex; align-items: center; gap: 24px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--line-strong); stroke-width: 10; }
.ring .fill { fill: none; stroke: var(--ok); stroke-width: 10; stroke-linecap: round; animation: draw 1.1s var(--ease) 0.15s backwards; }
@keyframes draw { from { stroke-dasharray: 0 100; } }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.health h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.health p { margin: 0 0 12px; color: var(--text-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--bg-hover); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent-text); }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background 0.2s var(--ease); }
.checklist li:last-child { border-bottom: 0; }
.checklist li:hover { background: var(--bg-hover); }
.checklist .lead { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-hover); color: var(--accent-text); flex: none; }
.checklist .lead .ic { width: 15px; height: 15px; }
.checklist .txt { flex: 1; min-width: 0; }
.checklist .txt small { display: block; color: var(--text-3); }
.tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #06150d; flex: none; }
.tick .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.tick.warn { background: var(--warn); }
.tick.bad { background: var(--bad); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { transition: background 0.2s var(--ease); }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.cell-main { display: grid; }
.cell-main small { color: var(--text-3); }
.muted { color: var(--text-3); }

progress.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--line-strong); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.bar.ok::-webkit-progress-value { background: var(--ok); }
progress.bar.ok::-moz-progress-bar { background: var(--ok); }
progress.bar.warn::-webkit-progress-value { background: var(--warn); }
progress.bar.warn::-moz-progress-bar { background: var(--warn); }
progress.bar.bad::-webkit-progress-value { background: var(--bad); }
progress.bar.bad::-moz-progress-bar { background: var(--bad); }
.meter { display: grid; grid-template-columns: 90px auto; align-items: center; gap: 10px; }

/* Chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--text-3); font-family: var(--mono); font-size: 10px; }
.chart .cold { fill: var(--accent); }
.chart .warm { fill: #3b3f55; }
.chart rect { transition: opacity 0.2s var(--ease); }
.chart .col:hover rect { opacity: 0.8; }
.legend { display: flex; gap: 16px; color: var(--text-2); font-size: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend .cold-sw { background: var(--accent); }
.legend .warm-sw { background: #3b3f55; }

/* Toolbar + chips */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease); }
.chip:hover { color: var(--text); background: var(--bg-hover); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.field { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-inset); color: var(--text); font: inherit; }
.field:focus { outline: 0; border-color: var(--accent); }
.empty { padding: 40px 18px; text-align: center; color: var(--text-3); }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch .track { width: 30px; height: 18px; border-radius: 999px; background: var(--line-strong); transition: background 0.2s var(--ease); position: relative; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(12px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Warmup */
.note { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); color: var(--text-2); }
.note .ic { color: var(--ok); }

/* CRM board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.column { background: var(--bg-inset); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 160px; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.column.over { border-color: var(--accent); background: var(--accent-soft); }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; font-weight: 500; }
.column-head .count { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.card { width: 100%; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); color: var(--text); cursor: grab; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.card.dragging { opacity: 0.4; }
.card-open { display: grid; gap: 4px; width: 100%; text-align: left; padding: 12px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.card strong { font-weight: 600; }
.card .co { color: var(--text-3); font-size: 12px; }
.card .nt { color: var(--text-2); font-size: 13px; }
.card .lt { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.card-move { display: block; padding: 0 10px 10px; }
.card-move select { width: 100%; font-size: 12px; background: var(--bg-inset); color: var(--text-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(4, 5, 8, 0.6); backdrop-filter: blur(2px); z-index: 20; animation: fade 0.25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 21; display: flex; flex-direction: column; background: var(--bg-raised); border-left: 1px solid var(--line-strong); box-shadow: -8px 0 20px rgba(0, 0, 0, 0.4); animation: slide 0.35s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer[hidden], .scrim[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-body { flex: 1; overflow: auto; padding: 20px; display: grid; gap: 16px; align-content: start; }
.dropzone { display: grid; place-items: center; gap: 6px; padding: 28px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg-inset); color: var(--text-2); text-align: center; cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 6px; }
.cols code { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg-hover); color: var(--text-2); }
.drawer h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
textarea.field { width: 100%; min-height: 84px; resize: vertical; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-inset); color: var(--text-2); }

/* Toast (floating notification card, from the reference) */
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: grid; gap: 12px; }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; width: min(380px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-raised); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); animation: toast-in 0.5s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.toast .badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.toast strong { display: block; font-weight: 600; }
.toast p { margin: 2px 0 10px; color: var(--text-2); }
.toast .row { display: flex; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Responsive */
@media (max-width: 1100px) {
  .span-5, .span-7 { grid-column: span 12; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { width: 100%; }
  .sidebar { flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand-name, .sidebar-foot { display: none; }
  .nav { flex-direction: row; }
  .nav a span { display: none; }
  .nav a.active span { display: inline; }
  .main { height: auto; min-height: 0; overflow: visible; }
  .app { height: auto; min-height: 100dvh; }
  .view { padding: 18px 16px; overflow: visible; }
  .topbar { padding: 10px 16px; }
  .sample-tag { display: none; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip dl > div:nth-child(2) { border-right: 0; }
  .strip dl > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .sign-out-text { display: none; }
  .health { flex-direction: column; align-items: flex-start; }
}

/* Academy */
.meter.wide { grid-template-columns: minmax(120px, 220px) auto; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.track-body { flex-direction: column; align-items: stretch; gap: 10px; padding: 20px; }
.track-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.track h2 { margin: 6px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.track p { margin: 0; flex: 1; }
.track-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.track-foot .meter { flex: 1; }

.lesson-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.lesson-index { position: sticky; top: 0; padding: 8px; }
.lesson-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lesson-index a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.lesson-index a:hover { background: var(--bg-hover); color: var(--text); }
.lesson-index a.current { background: var(--accent-soft); color: var(--text); }
.lesson-index small { display: block; color: var(--text-3); }
.lesson-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11px; flex: none; }
.lesson-tick.on { background: var(--ok); border-color: var(--ok); color: #06150d; }
.lesson-tick .ic { width: 12px; height: 12px; stroke-width: 2.6; }

.article { display: block; padding: 28px clamp(18px, 4vw, 44px) 24px; }
.article header { display: grid; gap: 10px; margin-bottom: 18px; justify-items: start; }
.article h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.article h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; }
.article p, .article li { color: var(--text-2); line-height: 1.7; max-width: 68ch; }
.article p { margin: 0 0 14px; }
.article strong { color: var(--text); font-weight: 600; }
.article ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.article ul li::marker { color: var(--accent-text); }
.article-table { margin: 6px 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-inset); }
.article-table th, .article-table td { white-space: normal; vertical-align: top; color: var(--text-2); }
.article-table td:first-child { color: var(--text); font-weight: 500; }
.tip { display: flex; gap: 12px; padding: 14px 16px; margin: 18px 0; border-radius: 10px; background: var(--accent-soft); }
.tip .ic { color: var(--accent-text); margin-top: 3px; }
.tip p { margin: 0; color: var(--text); }
.mail { margin: 8px 0 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-inset); overflow: hidden; max-width: 560px; }
.mail-head { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-hover); }
.mail-head span { color: var(--text-3); }
.mail-body { padding: 14px 16px 2px; }
.mail-body p { color: var(--text); margin: 0 0 12px; }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }

@media (max-width: 860px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-index { position: static; }
}

/* ===== Real app additions ===== */
[hidden] { display: none !important; }

.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(900px 400px at 50% -10%, rgba(43, 100, 245, 0.12), transparent 70%), var(--bg); padding: 16px; z-index: 40; }
.login-card { width: min(380px, 100%); display: grid; gap: 12px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-raised); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45); }
.login-card h1 { margin: 6px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.login-card p { margin: 0; color: var(--text-2); }
.login-label { font-size: 13px; color: var(--text-2); }
.login-error { color: var(--bad) !important; }
.field { width: 100%; }

.click { cursor: pointer; }
tbody tr.click:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.hint { font-size: 13px; margin: 6px 0 0; }

.panel-body.form { flex-direction: column; align-items: stretch; gap: 14px; }
.panel-body.form > * { width: auto; }
.panel-body.form .full { width: 100%; }
.stack { display: grid; gap: 6px; color: var(--text-2); font-size: 13px; }
.stack .field { color: var(--text); font-size: 14px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-2); }
.inline .stack { flex: 0 1 auto; }
.field.narrow { width: 84px; }
textarea.field { min-height: 84px; resize: vertical; font: inherit; line-height: 1.5; }
textarea.field.tall { min-height: 150px; }
.section { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--text); }
.stack-col { display: grid; gap: 16px; align-content: start; }
.steps { display: grid; gap: 14px; }
.step { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-inset); display: grid; gap: 12px; min-width: 0; }
.step legend { padding: 0 8px; font-weight: 600; font-size: 13px; }
.step-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--bg-hover); color: var(--text-2); }
.problems { display: grid; gap: 4px; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--text); }
.problems a { color: var(--accent-text); }
.footer-preview { margin: 0; padding: 14px; border-radius: 10px; background: var(--bg-inset); border: 1px solid var(--line); color: var(--text-2); font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

.lead-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-inset); }
.timeline small { grid-column: 1 / -1; color: var(--text-3); }
.timeline a { color: var(--accent-text); text-decoration: none; }
.notes small { display: block; margin-top: 2px; color: var(--text-3); }
.plain { margin: 0 0 12px; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.result { display: grid; gap: 6px; }
.drawer-body .btn { justify-self: start; }

.col-empty { margin: 8px 6px; font-size: 13px; }

.replies { list-style: none; margin: 0; padding: 0; }
.replies li + li { border-top: 1px solid var(--line); }
.reply { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; align-items: start; width: 100%; padding: 14px 18px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background 0.2s var(--ease); }
.reply:hover { background: var(--bg-hover); }
.reply .who, .reply .what { display: grid; gap: 2px; min-width: 0; }
.reply .subj { font-weight: 500; }
.reply .snip { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty p { margin: 0 0 8px; }

.toast-ok .badge, .badge-ok { background: var(--ok-soft); color: var(--ok); }
.toast-bad .badge, .badge-bad { background: var(--bad-soft); color: var(--bad); }
.toast-info .badge, .badge-info { background: var(--accent-soft); color: var(--accent-text); }
.toast .badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.toast p { margin: 2px 0 0; }

@media (max-width: 860px) {
  .reply { grid-template-columns: 1fr; gap: 4px; }
  .facts { grid-template-columns: 1fr; }
}

/* Analytics */
.chart .reply-bar { fill: var(--ok); }
.legend .reply-sw { background: var(--ok); }

/* Conversation reader reuses the dark palette, Geist type and existing spacing scale. */
.conversation-workspace { display:grid;gap:16px;align-items:start;grid-template-areas:"picker" "thread" "context" "list"; }
.conversation-picker { grid-area:picker; }
.conversation-picker .field { min-height:44px; }
.conversation-list { grid-area:list; }
.conversation-thread { grid-area:thread; }
.conversation-context { grid-area:context; }
.conversation-list,.conversation-thread,.conversation-context { min-width:0; }
.conversation-list ul { list-style:none;margin:0;padding:0; }
.conversation-list-title { font-size:13px;padding:16px;margin:0;border-bottom:1px solid var(--line);color:var(--text-2); }
.conversation-link { display:grid;gap:6px;padding:16px;color:var(--text)!important;text-decoration:none;border-bottom:1px solid var(--line);min-height:88px; }
.conversation-link:hover,.conversation-link.selected { background:var(--bg-hover); }
.conversation-link.selected { box-shadow:inset 3px 0 var(--accent); }
.conversation-list-top { display:flex;gap:8px;justify-content:space-between;align-items:baseline; }
.conversation-list-top strong { overflow-wrap:anywhere; }
.conversation-link small { color:var(--text-3);font-size:11px;overflow-wrap:anywhere; }
.conversation-subject { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.conversation-review,.message-availability { color:var(--warn);font-size:12px; }
.conversation-list .btn,.conversation-thread>.btn { margin:12px 16px;min-height:44px; }
.conversation-thread-head { padding:20px;border-bottom:1px solid var(--line); }
.conversation-thread-head h2 { font-size:18px;margin:0 0 12px;overflow-wrap:anywhere; }
.message-address { margin:4px 0;font-size:12px;overflow-wrap:anywhere; }
.message-address span { color:var(--text-3);margin-right:6px; }
.conversation-warning { padding:12px;background:var(--warn-soft);color:var(--warn);border-radius:var(--radius);font-size:13px; }
.conversation-message { padding:20px;border-bottom:1px solid var(--line); }
.conversation-message:last-child { border-bottom:0; }
.conversation-message header { display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;font-size:12px; }
.conversation-message h3 { font-size:14px;margin:12px 0;overflow-wrap:anywhere; }
.message-body summary { min-height:44px;display:list-item;align-content:center;cursor:pointer;color:var(--accent-text);font-size:13px; }
.message-text { font:inherit;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0; }
.message-files { padding-left:20px;font-size:12px;overflow-wrap:anywhere; }
.conversation-context { padding:20px;display:grid;gap:12px; }
.conversation-context h2,.conversation-context h3,.conversation-context p { margin:0;overflow-wrap:anywhere; }
.conversation-context h2 { font-size:16px; }
.conversation-context h3 { font-size:13px;margin-top:8px; }
.conversation-note { display:grid;gap:12px; }
.conversation-note button { justify-self:start;min-height:44px; }
.conversation-context .field { min-height:44px; }
@media (min-width:1000px) {
  .conversation-workspace { grid-template-columns:minmax(220px,0.75fr) minmax(320px,1.6fr);grid-template-areas:"list thread" "list context"; }
  .conversation-picker { display:none; }
}
@media (min-width:1400px) {
  .conversation-workspace { grid-template-columns:minmax(230px,0.8fr) minmax(360px,1.8fr) minmax(230px,0.8fr);grid-template-areas:"list thread context"; }
}

/* One-to-one reply composer */
.reply-composer{border-top:1px solid var(--line);margin-top:24px;padding:24px;min-width:0}.reply-composer .stack{margin-top:16px}.reply-composer textarea{min-height:200px;resize:vertical;width:100%;line-height:1.6}.reply-actions{display:flex;flex-wrap:wrap;gap:8px}.reply-notice{white-space:pre-wrap;overflow-wrap:anywhere}.reply-outcome{border-left:3px solid var(--accent);padding:8px 16px;margin:16px 0}.reply-outcome p{margin:4px 0}.reply-composer .btn{min-height:40px}.reply-composer select{max-width:100%}@media(max-width:600px){.reply-composer .btn{min-height:44px}.reply-actions .btn{flex:1 1 auto}}
.sent-sync-panel{margin-top:12px}.sent-sync-panel .btn{min-height:40px}@media(max-width:600px){.sent-sync-panel .btn{min-height:44px;flex:1 1 auto}}

/* Recorded-outcome review and confirmed conversation association. */
.reply-attention{margin-bottom:20px;display:block}.attention-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 20px}.attention-head h2{font-size:15px;margin:0 0 6px}.attention-head p{margin:0;overflow-wrap:anywhere}.attention-head .btn{flex-shrink:0}.attention-content{padding:0 20px 16px}.attention-list{list-style:none;padding:0;margin:0;max-height:380px;overflow:auto;border-top:1px solid var(--line)}.attention-item{padding:16px 0;border-bottom:1px solid var(--line);min-width:0}.attention-item-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.attention-item-head strong{font-size:13px}.attention-item p{margin:6px 0;overflow-wrap:anywhere}.attention-account{font-size:12px}.attention-actions{margin-top:10px}.attention-checked{margin:12px 0 0}.attention-folder>summary{min-height:44px;align-content:center;cursor:pointer;font-size:12px;color:var(--accent-text)}.attention-folder form{display:grid;gap:10px;margin-top:8px}.attention-folder-confirm{display:flex;align-items:flex-start;gap:8px;font-size:12px}.attention-folder-confirm input{flex:none;margin-top:3px}.attention-folder form>.btn{justify-self:start}.attention-more{margin-top:12px}.reply-attention .btn{min-height:40px}.association-review{margin-top:16px;padding-top:16px;border-top:1px solid var(--line);min-width:0}.association-review h3{font-size:14px;margin:0 0 8px}.association-review p{overflow-wrap:anywhere}.association-search{display:grid;gap:10px;margin:12px 0}.association-search>.btn{justify-self:start}.association-results{display:grid;gap:12px}.association-target-detail{padding:8px 12px;border-left:3px solid var(--accent)}.association-link,.association-copy{justify-self:start}.association-review>.btn{margin-top:8px}.association-source-detail{margin:10px 0}.association-review .field,.attention-folder .field{min-height:44px}.association-review .btn{min-height:40px}@media(max-width:600px){.attention-head{padding:16px;gap:10px;flex-wrap:wrap}.attention-head .btn{min-height:44px}.attention-content{padding:0 16px 16px}.attention-list{max-height:340px}.reply-attention .btn,.association-review .btn{min-height:44px}.attention-actions .btn{flex:1 1 auto}.attention-folder form>.btn,.association-search>.btn,.association-link,.association-copy{justify-self:stretch;width:100%}.attention-item-head{flex-wrap:wrap;gap:6px}}

/* Email verification stays distinct from CRM status and paid-check confirmation. */
.lead-verification-panel { padding: 16px 18px; margin-bottom: 16px; }
.verification-head, .verification-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.verification-head h2 { font-size: 14px; margin: 0; }
.verification-controls { justify-content: flex-start; }
.verification-retry { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.verification-retry input, .lead-select-cell input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.lead-select-cell { width: 44px; min-width: 44px; text-align: center; }
.lead-select-cell input { vertical-align: middle; }
.lead-verification-status { display: grid; justify-items: start; gap: 4px; min-width: 110px; }
.lead-verification-status small { font-size: 11px; max-width: 230px; overflow-wrap: anywhere; }
.lead-verification-filter { min-width: 160px; font-size: 11px; color: var(--text-2); }
.verification-quote, .verification-batch { margin-top: 14px; }
.verification-batch { border-top: 1px solid var(--line); padding-top: 14px; }
.verification-items { list-style: none; padding: 0; max-height: 260px; overflow: auto; }
.verification-items li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.verification-items small { display: block; }
.verification-quote .reply-actions, .verification-batch .reply-actions, .discovery-approval .reply-actions { margin-top: 12px; }
.verification-recent { margin-top: 12px; }
.discovery-approval { margin-top: 12px; }
@media (max-width: 620px) {
  .lead-verification-panel { padding: 14px; }
  .verification-head > *, .verification-controls > * { max-width: 100%; }
  .verification-controls .btn, .verification-quote .btn, .verification-batch .btn, .discovery-approval .btn { min-height: 44px; white-space: normal; }
  .lead-select-cell { padding-left: 10px; padding-right: 10px; }
}

.lead-select-cell label { display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }

/* Saved campaign content and owned-recipient tests. */
.campaign-launch-panel { margin-top: 18px; }
.launch-body { display: grid; gap: 14px; min-width: 0; }
.launch-body > p { margin: 0; }
.launch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.launch-selectors, .launch-messages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.launch-selectors > label, .launch-search-form > label { min-width: 0; }
.launch-selectors select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.launch-search-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.launch-search-form label { flex: 1 1 220px; }
.launch-message { min-width: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.launch-message h3 { margin: 0 0 12px; font-size: 13px; }
.launch-message .facts dd, .launch-headers dd { overflow-wrap: anywhere; }
.launch-message-text { max-height: 380px; overflow: auto; background: var(--bg-inset); padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.launch-preview-result { display: grid; gap: 14px; }
.launch-preview-result > h3 { margin: 0; font-size: 14px; }
.launch-owned { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.launch-owned input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.launch-test-record { border-top: 1px solid var(--line); padding-top: 14px; }
.launch-recent ul { list-style: none; padding: 0; max-height: 260px; overflow: auto; }
.launch-recent li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.launch-recent small { display: block; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .launch-selectors, .launch-messages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .launch-body .btn { min-height: 44px; white-space: normal; }
  .launch-message .facts > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Reusable text is edited separately from campaigns and replies. */
.library-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.library-list-body, .library-editor-body, .sequence-library-tools { display: grid; gap: 14px; min-width: 0; }
.library-editor-fields { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.library-search-form, .sequence-library-search { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.library-search-form > label, .sequence-library-search > label { flex: 1 1 160px; min-width: 0; }
.library-items { list-style: none; margin: 0; padding: 0; max-height: 600px; overflow: auto; }
.library-item { display: grid; gap: 5px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); padding: 14px 10px; text-align: left; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.library-item:hover, .library-item.selected { background: var(--bg-hover); }
.library-item small { color: var(--text-2); }
.library-preview, .sequence-template-steps { max-height: 420px; overflow: auto; }
.library-preview section, .sequence-template-steps section { padding: 10px 0; border-bottom: 1px solid var(--line); }
.library-preview .message-text, .sequence-template-steps .message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sequence-library-tools { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sequence-library-tools h3 { margin: 0; font-size: 13px; }
.sequence-library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sequence-template-select { min-width: 0; width: 100%; }
.sequence-template-save { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.sequence-template-detail .btn { margin-top: 12px; }
@media (min-width: 1000px) { .library-layout { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); } }
@media (max-width: 620px) { .library-workspace .btn, .sequence-library-tools .btn { min-height: 44px; white-space: normal; } }

/* CRM next actions are human planning, separate from email scheduling. */
.crm-work-panel { margin-bottom: 24px; }
.crm-work-body { display: grid; gap: 14px; min-width: 0; }
.crm-work-body > p { margin: 0; }
.crm-work-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: end; }
.crm-work-filters > label { min-width: 0; }
.crm-work-closed { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.crm-work-closed input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.crm-work-list { list-style: none; padding: 0; margin: 0; max-height: 600px; overflow: auto; }
.crm-work-list > li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.crm-work-open { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; display: grid; gap: 8px; text-align: left; padding: 14px 8px; cursor: pointer; overflow-wrap: anywhere; }
.crm-work-open:hover { background: var(--bg-hover); }
.crm-work-open small { display: block; color: var(--text-2); }
.crm-work-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.crm-work-meta .pill, .crm-work-meta .tag { white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
.crm-work-stage { display: grid; gap: 5px; justify-items: end; padding: 10px 8px; flex: none; }
.crm-work-note { max-width: 640px; }
.crm-board-head h2 { font-size: 14px; margin: 0 0 6px; }
.crm-board-status { color: var(--warn); }
.card-open .crm-work-meta { margin-top: 7px; }
@media (min-width: 800px) { .crm-work-filters { grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(160px, 1fr); } }
@media (max-width: 620px) {
  .crm-work-body .btn, .crm-work-views .chip { min-height: 44px; white-space: normal; }
  .crm-work-list { max-height: 520px; }
  .crm-work-list > li { display: block; }
  .crm-work-open { width: 100%; }
  .crm-work-stage { display: flex; justify-content: flex-start; align-items: center; padding-top: 0; }
}

.lead-work-panel { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; min-width: 0; }
.lead-work-fields { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-inline-size: 0; width: 100%; }
.lead-work-fields > label, .lead-work-fields input, .lead-work-fields select { min-width: 0; width: 100%; }
.lead-work-panel .reply-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-work-panel .btn { white-space: normal; max-width: 100%; }
.lead-work-panel .conversation-warning { overflow-wrap: anywhere; }
@media (max-width: 620px) { .lead-work-panel .btn { min-height: 44px; } }

.crm-workspace .card-move { position: relative; }

/* Product-aware Discovery: explicit terms and escaped public evidence. */
.discovery-profile-panel { margin-bottom: 20px; }
.discovery-profile-body, .discovery-profile-fields, .discovery-profile-hit { display: grid; gap: 14px; min-width: 0; }
.discovery-profile-body > p { margin: 0; }
.discovery-profile-fields, .discovery-profile-hit { border: 0; margin: 0; padding: 0; min-inline-size: 0; width: 100%; }
.discovery-profile-fields label, .discovery-profile-hit label { min-width: 0; }
.discovery-profile-enabled { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.discovery-profile-enabled input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.discovery-profile-terms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.discovery-profile-preview { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.discovery-profile-preview h3 { margin: 0; font-size: 14px; }
.discovery-fit-components { display: grid; gap: 10px; max-height: 400px; overflow: auto; }
.discovery-fit-components ul { margin: 10px 0; padding-left: 20px; }
.discovery-fit-components blockquote { margin: 6px 0 12px; border-left: 2px solid var(--line-strong); padding-left: 10px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.discovery-candidate-hint { padding: 0 18px; }
.discovery-workspace .cand-list { list-style: none; margin: 0; padding: 0; }
.discovery-workspace .cand { border-bottom: 1px solid var(--line); padding: 16px 18px; min-width: 0; }
.discovery-workspace .cand-head { display: flex; gap: 10px; align-items: start; }
.discovery-workspace .score { flex: none; font: 12px var(--mono); padding: 5px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); }
.discovery-workspace .cand-title { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.discovery-workspace .src { font-size: 11px; }
.discovery-workspace .cand-meta { display: grid; gap: 8px; font-size: 12px; }
.discovery-workspace .matched { display: flex; gap: 5px; flex-wrap: wrap; }
.discovery-workspace .tag { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-inset); color: var(--text-2); font-size: 11px; }
.discovery-workspace .cand-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.discovery-workspace .cand-actions > span, .discovery-workspace .cand-actions > p { flex-basis: 100%; }
.discovery-candidate-fit { margin: 14px 0; }
.discovery-fit-analysis { overflow-wrap: anywhere; }
@media (min-width: 800px) { .discovery-profile-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .discovery-profile-body .btn, .discovery-workspace .cand .btn, .discovery-candidate-fit > summary, .discovery-fit-components summary { min-height: 44px; white-space: normal; } }
