@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f4f0;
  --panel: #ffffff;
  --panel-2: #f8f8f5;
  --panel-el: #ffffff;
  --border: #deded7;
  --border-strong: #c5c5bd;
  --text: #111113;
  --text-soft: rgba(17, 17, 19, .76);
  --muted: #626268;
  --muted-2: #6e6e73;
  --accent: #167647;
  --accent-fill: #4ecd89;
  --accent-dim: rgba(78, 205, 137, .12);
  --accent-line: rgba(22, 118, 71, .46);
  --accent-hover: #3fbc78;
  --hover-surface: #eef7f1;
  --hover-surface-strong: #e8f2eb;
  --platinum: #28282b;
  --negative: #a63e2d;
  --warning: #8b5d00;
  --warning-dim: rgba(224, 165, 48, .08);
  --warning-line: rgba(224, 165, 48, .4);
  --radius: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --disp: "Bricolage Grotesque", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0c;
  --panel: #121215;
  --panel-2: #17171b;
  --panel-el: #1c1c21;
  --border: #26262c;
  --border-strong: #34343c;
  --text: #f2f2f4;
  --text-soft: rgba(242, 242, 244, .74);
  --muted: #a0a0aa;
  --muted-2: #86868f;
  --accent: #4ecd89;
  --accent-fill: #4ecd89;
  --accent-dim: rgba(78, 205, 137, .12);
  --accent-line: rgba(78, 205, 137, .34);
  --accent-hover: #6ce8a3;
  --hover-surface: #181d1a;
  --hover-surface-strong: #202823;
  --platinum: #d5d9e2;
  --negative: #d9694f;
  --warning: #e0a530;
}

* { box-sizing: border-box; }
html { min-height: 100%; scrollbar-width: thin; scrollbar-color: rgba(78,205,137,.28) transparent; }
html.auth-pending .protected-view,
html.auth-required .protected-view { display: none !important; }
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; }
button, summary, input { min-height: 44px; }
button { cursor: pointer; }
em { color: var(--accent); font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(78,205,137,.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(78,205,137,.48); }

.corner {
  position: absolute;
  z-index: 50;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .2em;
  text-transform: lowercase;
  color: var(--muted-2);
  pointer-events: none;
}
html.auth-pending .corner, html.auth-required .corner { position: fixed; }
.corner.tl { top: 20px; left: 26px; display: flex; align-items: center; }
.corner.tr { top: 20px; right: 26px; display: flex; align-items: center; gap: 9px; color: var(--accent); }
.atas-logo { display: block; width: 72px; height: auto; filter: invert(1); }
[data-theme="dark"] .atas-logo { filter: none; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .38; } }

.login-page { min-height: 100vh; padding: 96px 24px 64px; display: grid; place-items: center; }
.login-panel { width: min(100%, 440px); padding: 44px 0 48px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.login-panel h1 { margin: 8px 0 12px; font-family: var(--disp); font-size: clamp(36px, 6vw, 56px); font-weight: 650; line-height: .98; letter-spacing: -.03em; text-transform: uppercase; }
.login-panel > p { max-width: 42ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.login-form { margin-top: 34px; display: grid; gap: 18px; }
.login-form label > span { display: block; margin-bottom: 7px; color: var(--muted-2); font-size: 11px; letter-spacing: .04em; }
.login-form input { width: 100%; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel-2); color: var(--text); }
.login-form input:hover { border-color: var(--accent-line); background: var(--hover-surface-strong, #202823); }
.login-form .primary-action { margin-top: 4px; }
.login-error { margin: -4px 0 0; color: var(--negative); font-size: 13px; }

.app-header {
  max-width: 1500px;
  min-height: 76px;
  margin: 46px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.session-identity { max-width: 120px; overflow: hidden; color: var(--muted-2); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.mono-button.compact { min-width: 84px; }
.product-lockup { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.product-kicker, .mono-label {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .13em;
  text-transform: lowercase;
  color: var(--muted-2);
}
.field-label, fieldset legend { color: var(--muted-2); font-size: 11px; line-height: 1.4; letter-spacing: .04em; }
.product-name { color: var(--text); font-family: var(--disp); font-size: 15px; font-weight: 500; white-space: nowrap; }
.mode-switch { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); }
.mode-button { min-width: 136px; padding: 0 14px; border-radius: 2px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; transition: background .2s var(--ease), color .2s var(--ease); }
.mode-button:not(.active):hover { background: var(--hover-surface); color: var(--text-soft); }
.mode-button.active { background: var(--accent-fill); color: #07130f; }
.mono-button, .text-action { justify-self: end; min-width: 144px; padding: 0 15px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.mono-button:hover, .text-action:hover { border-color: var(--accent-line); color: var(--accent); background: var(--hover-surface); transform: translateY(-1px); }

main { max-width: 1500px; margin: 0 auto; padding: 0 32px 48px; }
.app-footer { max-width: 1500px; min-height: 56px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); color: var(--muted-2); font-family: var(--mono); font-size: 10px; line-height: 1.4; letter-spacing: .16em; text-transform: lowercase; }
.app-footer span:last-child { font-variant-numeric: tabular-nums; }
.hero { padding: 28px 0 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 460px); gap: 48px; align-items: end; }
.title-pre { display: block; margin-bottom: 7px; color: var(--text-soft); font-family: var(--disp); font-size: clamp(13px, 1vw, 16px); font-weight: 300; }
.title-punch { margin: 0 0 0 -.04em; display: flex; flex-wrap: wrap; gap: 0 .16em; font-family: var(--disp); font-variation-settings: "opsz" 48, "wdth" 95; font-size: clamp(30px, 3.5vw, 48px); line-height: .95; letter-spacing: -.03em; font-weight: 750; text-transform: uppercase; text-wrap: balance; }
.hero-copy { max-width: 48ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; text-wrap: pretty; }

.data-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.data-point { min-height: 76px; padding: 15px 18px; border-right: 1px solid var(--border); display: flex; align-items: baseline; gap: 10px; }
.data-point:last-child { border-right: 0; }
.data-point span { font-family: var(--disp); font-variation-settings: "opsz" 24; font-size: 24px; line-height: 1; font-weight: 500; color: var(--platinum); font-variant-numeric: tabular-nums; }
.data-point label { color: var(--muted-2); font-size: 10px; letter-spacing: .04em; }
.data-point.active span { color: var(--accent); }
.warning-banner { margin-top: 16px; padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-soft); background: var(--panel); font-size: 13px; }

.workbench { margin-top: 20px; display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: start; min-height: 690px; border: 1px solid var(--border); border-radius: var(--radius); overflow: clip; background: var(--panel); }
.control-panel { padding: 28px 24px; border-right: 1px solid var(--border); background: var(--panel); }
.panel-intro { margin-bottom: 26px; }
.panel-intro h2, .results-header h2, .drawer-header h2 { margin: 5px 0 0; font-family: var(--disp); font-variation-settings: "opsz" 24; font-size: 23px; line-height: 1.1; font-weight: 500; letter-spacing: -.015em; text-wrap: balance; }
.panel-intro p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mobile-filter-toggle { display: none; }
.control-group { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
fieldset legend, .field-label { display: block; margin: 0 0 8px; }
.choice-stack { border-top: 1px solid var(--border); }
.choice-row { min-height: 56px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); cursor: pointer; }
.choice-row input { min-height: auto; accent-color: var(--accent); }
.choice-row strong { display: block; color: var(--text-soft); font-size: 13px; font-weight: 400; line-height: 1.35; }
.choice-row small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 12px; line-height: 1.35; }
.search-field { position: relative; margin-bottom: 20px; }
.search-field svg { position: absolute; left: 13px; top: 50%; width: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted-2); stroke-width: 1.6; }
.search-field input { width: 100%; padding: 0 13px 0 39px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel-2); color: var(--text); font-size: 13px; transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease); }
.search-field input:hover { background: var(--hover-surface-strong); }
.search-field input::placeholder { color: #9b9ba4; }
.search-field input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.select-field, .bulk-toolbar input, .bulk-toolbar select, .operational-form input, .operational-form select, .operational-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; }
.select-field:hover, .bulk-toolbar input:hover, .bulk-toolbar select:hover, .operational-form input:hover, .operational-form select:hover, .operational-form textarea:hover { background: var(--hover-surface-strong); }
.operational-form textarea { resize: vertical; line-height: 1.55; }
.select-field:focus-visible, .bulk-toolbar input:focus-visible, .bulk-toolbar select:focus-visible, .operational-form input:focus-visible, .operational-form select:focus-visible, .operational-form textarea:focus-visible { border-color: var(--accent); }
.secondary-action { min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; }
.secondary-action:hover { border-color: var(--accent-line); color: var(--accent); background: var(--hover-surface); }
.saved-view-controls { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.saved-view-controls .secondary-action { width: 100%; margin-top: 8px; }
.field-help { margin: -8px 0 22px; color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.range-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.range-heading output { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.range { width: 100%; min-height: 44px; accent-color: var(--accent); }
.range-scale { display: flex; justify-content: space-between; margin-top: -2px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; text-transform: lowercase; }
.control-divider { height: 1px; margin: 24px 0; background: var(--border); }
.evidence-choice { margin-top: 16px; }
.sector-filter { margin-top: 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sector-filter summary { display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--text-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; cursor: pointer; }
.sector-filter summary::-webkit-details-marker { display: none; }
.sector-filter summary b { color: var(--accent); font-weight: 400; }
.sector-options { max-height: 220px; overflow-y: auto; padding: 6px 0 12px; }
.sector-option { min-height: 44px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--text-soft); font-size: 12px; }
.sector-option input { min-height: auto; accent-color: var(--accent); }
.sector-option small { color: var(--muted-2); font-family: var(--mono); font-size: 9px; }
.primary-action { width: 100%; margin-top: 22px; padding: 0 18px; border-radius: 4px; background: var(--accent-fill); color: #07130f; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: lowercase; transition: background .2s var(--ease), transform .2s var(--ease); }
.primary-action:hover { background: var(--accent-hover); transform: translateY(-1px); }

.results-panel { position: relative; min-width: 0; min-height: 690px; background: var(--panel-2); }
.results-header { position: sticky; top: 0; z-index: 5; min-height: 105px; padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--panel-2) 94%, transparent); backdrop-filter: blur(12px); }
.results-header h2 { font-size: 25px; }
.results-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.results-header p span { color: var(--platinum); }
.results-actions { display: flex; align-items: center; gap: 12px; }
.result-tally { color: var(--muted); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.result-tally b { color: var(--accent); font-weight: 400; }
.text-action { min-width: auto; white-space: nowrap; }
.bulk-toolbar { min-height: 60px; padding: 8px 16px; display: grid; grid-template-columns: auto minmax(160px,240px) minmax(150px,200px) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); background: var(--panel-el); }
.bulk-toolbar > span { color: var(--accent); font-family: var(--mono); font-size: 10px; }
.bulk-toolbar button { min-height: 44px; padding: 0 14px; border-radius: 4px; background: var(--accent-fill); color: #07130f; font-family: var(--mono); font-size: 10px; }
.table-shell { position: relative; min-height: 320px; overflow-x: auto; overflow-y: visible; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: auto; }
th { position: sticky; top: 0; z-index: 2; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); color: var(--muted-2); text-align: left; font-size: 10px; font-weight: 400; letter-spacing: .04em; }
td { height: 70px; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: middle; font-size: 12px; }
tbody tr { transition: background .2s var(--ease); }
tbody tr:hover { background: rgba(78,205,137,.035); }
.fit-score { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--platinum); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.fit-score.high { border-color: var(--accent-line); color: var(--accent); background: var(--accent-dim); }
.entity-button { min-width: 44px; min-height: 44px; max-width: 280px; padding: 0; color: var(--text); text-align: left; font-family: var(--disp); font-size: 15px; font-weight: 450; }
.entity-button:hover { color: var(--accent); }
.entity-meta { display: block; max-width: 250px; color: var(--muted-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.number-cell { color: var(--platinum); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.number-cell em { display: block; color: var(--muted-2); font-family: var(--sans); font-size: 12px; font-style: normal; }
.company-stack { max-width: 250px; line-height: 1.45; }
.company-stack span { color: var(--text-soft); }
.company-stack small { display: block; margin-top: 4px; color: var(--muted-2); }
.investor-company-lead { min-width: 270px; }
.candidate-company-list { display: flex; flex-wrap: wrap; gap: 4px; }
.candidate-company { min-height: 44px; max-width: 170px; padding: 5px 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 3px; background: var(--panel-el); color: var(--text-soft); text-align: left; }
.candidate-company:hover { border-color: var(--accent-line); background: var(--hover-surface-strong); color: var(--accent); }
.candidate-company span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-company b { color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 400; }
.candidate-empty { color: var(--muted-2); font-size: 11px; }
.stage-label { display: inline-flex; min-height: 28px; align-items: center; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-family: var(--mono); font-size: 11px; }
.table-meta { display: block; margin-top: 4px; color: var(--muted-2); font-size: 11px; }
.status-label { display: inline-flex; min-height: 28px; align-items: center; color: var(--platinum); font-family: var(--mono); font-size: 11px; }
.completion-score { min-width: 58px; }
.completion-score b { display: block; color: var(--platinum); font-family: var(--mono); font-weight: 400; }
.completion-score span { color: var(--muted-2); font-size: 10px; }
.pipeline-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.selection-hit { width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.selection-hit input { min-height: auto; }

.loading-state, .empty-state { position: absolute; inset: 0; min-height: 284px; padding: 38px 24px 32px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; background: var(--panel-2); color: var(--muted); text-align: center; }
.loader-line { width: 120px; height: 1px; overflow: hidden; position: relative; background: var(--border); }
.loader-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: scan 1s var(--ease) infinite; }
@keyframes scan { to { transform: translateX(100%); } }
.loading-state p { margin: 12px 0 0; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: lowercase; }
.empty-state span { color: var(--accent); font-family: var(--disp); font-size: 44px; }
.empty-state h3 { margin: 8px 0 0; font-family: var(--disp); font-size: 19px; font-weight: 450; }
.empty-state p { margin: 5px 0 0; color: var(--muted-2); font-size: 13px; }
.empty-state { z-index: 3; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; align-content: start; align-items: start; padding: 22px 28px; text-align: left; }
.empty-state:not(.hidden) { display: grid; }
.empty-state span { grid-row: 1 / 3; font-size: 32px; line-height: 1; }
.empty-state h3 { margin: 0; }
.empty-state p { margin-top: 3px; }

.detail-drawer { position: fixed; inset: 0 0 0 auto; width: min(900px, 98vw); max-height: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--panel-el); color: var(--text); box-shadow: -28px 0 70px rgba(0,0,0,.42); }
.detail-drawer[open] { display: flex; flex-direction: column; }
.detail-drawer::backdrop { background: rgba(0,0,0,.64); }
.drawer-header { flex: 0 0 auto; min-height: 96px; padding: 18px 26px; display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.drawer-header:not(.has-history) { grid-template-columns: minmax(0, 1fr) 44px; }
.drawer-heading { min-width: 0; }
.drawer-header h2 { font-size: 28px; }
.drawer-back { min-width: 84px; padding: 0 12px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: lowercase; }
.drawer-back:hover { border-color: var(--accent-line); color: var(--accent); background: var(--hover-surface); }
.close-button { width: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--muted); font-size: 21px; }
.close-button:hover { border-color: var(--accent-line); color: var(--accent); }
.drawer-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 26px 48px; }
.drawer-score { min-height: 130px; display: grid; grid-template-columns: 76px 1fr; gap: 20px; align-items: center; border-bottom: 1px solid var(--border); }
.drawer-score .fit-score { width: 72px; height: 72px; font-family: var(--disp); font-size: 25px; }
.drawer-score h3 { margin: 0 0 5px; font-family: var(--disp); font-size: 18px; font-weight: 500; }
.drawer-score p { max-width: 48ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.firm-score { grid-template-columns: 76px minmax(0, 1fr); }
.detail-toolbar { min-height: 70px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); }
.drawer-action { padding: 0 16px; border-radius: 4px; background: var(--accent-fill); color: #07130f; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; }

.theme-toggle { min-width: 82px; }
.theme-toggle span { margin-right: 5px; font-size: 14px; }
[data-access="read"] .form-submit,
[data-access="read"] #saveViewButton,
[data-access="read"] #applyBulkButton { opacity: .45; pointer-events: none; }

@media (max-width: 1280px) {
  .app-header { grid-template-columns: minmax(150px, 1fr) auto auto; gap: 16px; }
  .product-kicker, .session-identity { display: none; }
  .mode-button { min-width: 118px; padding-inline: 10px; }
  .header-actions .mono-button { min-width: 104px; }
  .header-actions .compact { min-width: 76px; }
}

@media (max-width: 1599px) {
  #firmTable th:nth-child(5), #firmTable td:nth-child(5),
  #firmTable th:nth-child(6), #firmTable td:nth-child(6),
  #firmTable th:nth-child(7), #firmTable td:nth-child(7) { display: none; }
}

@media (max-width: 1399px) {
  table { min-width: 760px; }
  #companyTable th:nth-child(6), #companyTable td:nth-child(6),
  #pipelineTable th:nth-child(8), #pipelineTable td:nth-child(8) { display: none; }
}
.drawer-action:hover { background: var(--accent-hover); }
.detail-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.detail-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 10px; text-decoration: none; text-transform: lowercase; }
.detail-link:hover { color: var(--accent); }
.detail-section { padding: 22px 0; border-bottom: 1px solid var(--border); }
.detail-section h3 { margin: 0 0 14px; color: var(--muted-2); font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .11em; text-transform: lowercase; }
.funding-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.funding-item { min-height: 70px; padding: 13px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.funding-item label { display: block; color: var(--muted-2); font-size: 10px; letter-spacing: .04em; }
.funding-item strong { display: block; margin-top: 5px; color: var(--platinum); font-family: var(--mono); font-size: 12px; font-weight: 400; }
.metrics-grid { grid-template-columns: repeat(3, 1fr); }
.detail-prose { max-width: 72ch; margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-tag { display: inline-flex; min-height: 30px; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-soft); font-size: 12px; }
.detail-tag.primary { border-color: var(--accent-line); color: var(--accent); }
.distribution-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.distribution-row { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 12px; }
.distribution-row b { color: var(--platinum); font-family: var(--mono); font-weight: 400; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.team-member { min-height: 150px; padding: 16px; background: var(--panel-el); }
.team-member strong { display: block; color: var(--text); font-family: var(--disp); font-size: 16px; font-weight: 500; }
.team-member small, .team-member p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.team-member p { margin: 10px 0; }
.team-facts { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; color: var(--platinum); font-family: var(--mono); font-size: 11px; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { position: relative; min-height: 38px; padding: 8px 0 8px 18px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 13px; line-height: 1.55; }
.detail-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.compact-list { columns: 2; column-gap: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h3 { margin-bottom: 4px; }
.section-heading p, .source-summary { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-search input { width: min(310px, 42vw); min-height: 44px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 4px; outline: 0; background: var(--panel-2); font-size: 13px; }
.drawer-search input:hover { background: var(--hover-surface-strong); }
.drawer-search input:focus { border-color: var(--accent); }
.firm-portfolio-list { border-top: 1px solid var(--border); }
.portfolio-company { width: 100%; min-height: 66px; padding: 10px 8px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); text-align: left; }
.portfolio-company:hover { background: rgba(78,205,137,.035); }
.portfolio-company strong { display: block; color: var(--text); font-family: var(--disp); font-size: 15px; font-weight: 450; }
.portfolio-company small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.portfolio-company-metrics { min-width: 100px; text-align: right; }
.portfolio-company-metrics b { color: var(--accent); font-family: var(--mono); font-size: 14px; font-weight: 400; }
.detail-table-shell { overflow-x: auto; border: 1px solid var(--border); }
.detail-table { min-width: 620px; }
.detail-table th { position: static; background: var(--panel-el); }
.detail-table td { height: 48px; padding: 9px 12px; font-size: 12px; }
.component { display: grid; grid-template-columns: 130px 1fr 28px; gap: 10px; align-items: center; min-height: 34px; color: var(--text-soft); font-size: 12px; }
.component-track { height: 2px; background: var(--border-strong); overflow: hidden; }
.component-fill { height: 100%; background: var(--accent); }
.component strong { color: var(--platinum); font-family: var(--mono); font-size: 12px; font-weight: 400; }
.sponsor-row { min-height: 64px; padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.sponsor-row strong { display: block; color: var(--text); font-family: var(--disp); font-size: 15px; font-weight: 450; }
.sponsor-row small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 12px; }
.sponsor-detail-link { min-width: 44px; padding: 0; text-align: left; }
.sponsor-detail-link:hover strong { color: var(--accent); }
.sponsor-actions { display: flex; align-items: center; gap: 14px; }
.source-confidence { color: var(--accent); font-family: var(--mono); font-size: 12px; text-transform: lowercase; white-space: nowrap; }
.detail-empty, .detail-error { color: var(--muted); font-size: 13px; }
.drawer-loading { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-family: var(--mono); font-size: 10px; }

.entity-page { max-width: 1500px; min-height: calc(100vh - 140px); padding-top: 28px; }
.entity-page-header { min-height: 128px; display: grid; grid-template-columns: 110px minmax(0,1fr) auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--border); }
.entity-page-header h1 { margin: 5px 0 0; font-family: var(--disp); font-size: clamp(32px,4vw,54px); line-height: 1; font-weight: 600; letter-spacing: -.025em; }
.entity-page-header p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.entity-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.entity-tabs { min-height: 58px; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.entity-tab { min-width: 110px; padding: 0 14px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; border-bottom: 2px solid transparent; }
.entity-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.entity-tab-content { min-height: 620px; padding: 32px 0 64px; }
.entity-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.8fr); gap: 32px; align-items: start; }
.entity-primary, .entity-secondary, .entity-section { min-width: 0; }
.entity-primary > h2, .entity-secondary > h2, .entity-section > h2 { margin: 0 0 18px; font-family: var(--disp); font-size: 24px; font-weight: 500; }
.entity-secondary { padding-left: 28px; border-left: 1px solid var(--border); }
.profile-score-row { min-height: 110px; display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; margin-bottom: 24px; }
.profile-score-row .fit-score { width: 68px; height: 68px; font-size: 20px; }
.profile-score-row h2 { margin: 0 0 5px; font-family: var(--disp); font-weight: 500; }
.profile-score-row p, .section-copy { max-width: 70ch; margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dual-score { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin-bottom: 24px; background: var(--border); border: 1px solid var(--border); }
.dual-score.three-score { grid-template-columns: repeat(3,minmax(0,1fr)); }
.dual-score > div { min-height: 190px; padding: 24px; background: var(--panel); }
.dual-score .fit-score { width: 68px; height: 68px; margin-bottom: 16px; font-size: 18px; }
.dual-score h3 { margin: 0 0 6px; font-family: var(--disp); font-size: 18px; font-weight: 500; }
.dual-score p { margin: 0; color: var(--muted); font-size: 13px; }
.record-warning, .freshness-banner { display: grid; gap: 4px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--warning-line); background: var(--warning-dim); }
.freshness-banner { border-color: var(--border-strong); background: var(--panel-2); }
.record-warning strong, .freshness-banner strong { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: lowercase; }
.record-warning span, .freshness-banner span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.operational-form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.operational-form label { min-width: 0; }
.operational-form label > span { display: block; margin-bottom: 7px; color: var(--muted-2); font-size: 11px; letter-spacing: .04em; }
.operational-form .form-span { grid-column: 1 / -1; }
.operational-form .form-submit { width: auto; margin-top: 18px; }
.profile-list { border-top: 1px solid var(--border); }
.profile-row { width: 100%; min-height: 68px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); text-align: left; }
.profile-row:hover { background: rgba(78,205,137,.035); }
.profile-row strong { display: block; color: var(--text); font-family: var(--disp); font-size: 15px; font-weight: 450; }
.profile-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-row > b { color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 400; }
.activity-row { min-height: 62px; padding: 10px 0; display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 14px; align-items: start; border-bottom: 1px solid var(--border); }
.activity-row > span { color: var(--accent); font-family: var(--mono); font-size: 10px; }
.activity-row strong { color: var(--text-soft); font-size: 13px; font-weight: 400; }
.activity-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.section-title { margin: 0 0 18px; font-family: var(--disp); font-size: 24px; font-weight: 500; }
.load-more { width: 100%; min-height: 52px; border-top: 1px solid var(--border); color: var(--text-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; }
.load-more:hover { color: var(--accent); background: var(--accent-dim); }

.entry-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel-el); color: var(--text); }
.entry-dialog::backdrop { background: rgba(0,0,0,.68); }
.entry-dialog form { padding: 28px; }
.entry-dialog h2 { margin: 6px 0 24px; font-family: var(--disp); font-size: 26px; font-weight: 500; }
.entry-dialog input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel-2); color: var(--text); }
.entry-dialog input:hover { background: var(--hover-surface-strong); }
.entry-dialog-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.entry-dialog-actions button { min-width: 110px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; max-width: min(380px, calc(100vw - 32px)); min-height: 48px; padding: 13px 16px; display: flex; align-items: center; border: 1px solid var(--accent-line); border-radius: 4px; background: var(--panel-el); color: var(--text-soft); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translateY(0); }

.hidden { display: none !important; }
.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; }

@media (max-width: 1060px) {
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .entity-layout { grid-template-columns: 1fr; }
  .entity-secondary { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .entity-page-header { grid-template-columns: 100px minmax(0,1fr); }
  .entity-header-actions { grid-column: 1 / -1; justify-content: flex-start; padding-bottom: 18px; }
}

@media (max-width: 1179px) {
  .workbench { grid-template-columns: 1fr; }
  .control-panel { padding: 20px 24px; border-right: 0; border-bottom: 1px solid var(--border); }
  .panel-intro { position: relative; min-height: 68px; margin: 0; padding-right: 220px; }
  .panel-intro h2 { margin-top: 3px; }
  .panel-intro p { max-width: 62ch; margin-top: 6px; }
  .mobile-filter-toggle { position: absolute; top: 50%; right: 0; width: 190px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; transform: translateY(-50%); }
  .mobile-filter-toggle:hover { background: var(--hover-surface); }
  .control-panel.mobile-collapsed > :not(.panel-intro) { display: none; }
  .table-shell { max-width: calc(100vw - 42px); }
}

@media (max-width: 960px) {
  .app-header { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "product actions" "modes modes"; gap: 10px 16px; padding: 12px 20px; }
  .product-lockup { grid-area: product; }
  .mode-switch { grid-area: modes; width: 100%; }
  .mode-button { flex: 1; min-width: 0; }
  .mono-button { display: none; }
  .header-actions { grid-area: actions; width: auto; justify-self: end; }
  .header-actions .mono-button.compact { display: inline-flex; align-items: center; justify-content: center; }
  main { padding: 0 20px 48px; }
  .app-footer { padding: 0 20px; }
  .hero { gap: 8px; padding: 20px 0 14px; }
  .data-strip { grid-template-columns: repeat(2, 1fr); }
  .data-point { min-height: 60px; padding: 10px 14px; }
  .data-point:nth-child(2) { border-right: 0; }
  .data-point:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .workbench { overflow: clip; }
  .bulk-toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 759px) {
  .corner.tl { top: 14px; left: 16px; }
  .atas-logo { width: 66px; }
  .corner.tr { display: none; }
  .app-header { margin-top: 42px; }
  .hero { padding: 18px 0 16px; }
  .title-pre { display: none; }
  .title-punch { font-size: clamp(28px, 9vw, 38px); }
  .hero-copy { font-size: 14px; }
  .data-point { min-height: 60px; padding: 10px 12px; flex-direction: column; justify-content: center; gap: 3px; }
  .data-point span { font-size: 21px; }
  .control-panel, .results-header { padding-left: 18px; padding-right: 18px; }
  .panel-intro { min-height: 0; padding-right: 0; }
  .mobile-filter-toggle { position: static; width: 100%; margin-top: 16px; transform: none; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .text-action { align-self: stretch; justify-self: auto; }
  .funding-grid { grid-template-columns: 1fr; }
  .metrics-grid, .distribution-grid, .team-grid { grid-template-columns: 1fr; }
  .detail-toolbar, .section-heading { align-items: stretch; flex-direction: column; }
  .drawer-search input { width: 100%; }
  .drawer-header { padding: 14px 16px; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 10px; }
  .drawer-header:not(.has-history) { grid-template-columns: minmax(0, 1fr) 44px; }
  .drawer-back { min-width: 0; padding: 0 8px; }
  .drawer-header h2 { font-size: 22px; }
  .drawer-content { padding-left: 18px; padding-right: 18px; }
  .portfolio-company { align-items: flex-start; }
  .portfolio-company-metrics { min-width: 72px; }
  .sponsor-row { align-items: flex-start; flex-direction: column; }
  .entity-page { padding-top: 18px; }
  .entity-page-header { grid-template-columns: 72px minmax(0,1fr); gap: 12px; }
  .entity-page-header h1 { font-size: 30px; }
  .entity-header-actions { width: 100%; overflow: visible; flex-wrap: wrap; justify-content: flex-start; }
  .entity-header-actions button { flex: 1 1 calc(50% - 4px); }
  .entity-tabs { min-height: 0; margin: 0 -20px; padding: 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .entity-tab { min-width: 0; min-height: 50px; padding: 0 6px; }
  .entity-tab-content { padding-top: 22px; }
  .dual-score, .dual-score.three-score, .form-grid { grid-template-columns: 1fr; }
  .operational-form .form-span { grid-column: auto; }
  .bulk-toolbar { grid-template-columns: 1fr; }
  .results-actions { width: 100%; justify-content: space-between; }
  .workbench { border-left: 0; border-right: 0; border-radius: 0; background: transparent; }
  .results-panel { background: transparent; }
  .table-shell { min-height: 220px; overflow: visible; max-width: none; padding: 10px; }
  #firmTable, #companyTable, #pipelineTable { min-width: 0; display: block; }
  #firmTable thead, #companyTable thead, #pipelineTable thead { display: none; }
  #firmTable tbody, #companyTable tbody, #pipelineTable tbody { display: grid; gap: 10px; }
  #firmTable tr, #companyTable tr, #pipelineTable tr { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-2); }
  #firmTable td, #companyTable td, #pipelineTable td { height: auto; min-width: 0; padding: 7px 4px; border-bottom: 0; font-size: 12px; }
  #firmTable td:nth-child(7), #companyTable td:nth-child(3), #pipelineTable td:nth-child(1), #pipelineTable td:nth-child(6) { display: none; }
  #firmTable td:first-child, #companyTable td:first-child { position: absolute; top: 10px; right: 10px; z-index: 2; }
  #firmTable td:nth-child(2), #firmTable td:nth-child(3), #companyTable td:nth-child(4), #pipelineTable td:nth-child(2) { grid-column: 1 / -1; padding-right: 40px; }
  #firmTable td:not(:first-child)::before, #companyTable td:not(:first-child)::before, #pipelineTable td:not(:first-child)::before { display: block; margin-bottom: 3px; color: var(--muted-2); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: lowercase; }
  #firmTable td:nth-child(2)::before { content: "top company candidates"; } #firmTable td:nth-child(3)::before { content: "VC investor"; } #firmTable td:nth-child(4)::before { content: "firm-fit"; } #firmTable td:nth-child(5)::before { content: "relationship"; } #firmTable td:nth-child(6)::before { content: "owner"; } #firmTable td:nth-child(7)::before { content: "last touch"; } #firmTable td:nth-child(8)::before { content: "active opportunities"; } #firmTable td:nth-child(9)::before { content: "portfolio / high-fit"; }
  #companyTable td:nth-child(2)::before { content: "public score"; } #companyTable td:nth-child(3)::before { content: "qualification"; } #companyTable td:nth-child(4)::before { content: "company"; } #companyTable td:nth-child(5)::before { content: "VC sponsors"; } #companyTable td:nth-child(6)::before { content: "owner / status"; } #companyTable td:nth-child(7)::before { content: "pipeline"; } #companyTable td:nth-child(8)::before { content: "next action"; }
  #pipelineTable td:nth-child(2)::before { content: "company"; } #pipelineTable td:nth-child(3)::before { content: "stage"; } #pipelineTable td:nth-child(4)::before { content: "owner"; } #pipelineTable td:nth-child(5)::before { content: "probability"; } #pipelineTable td:nth-child(6)::before { content: "facility"; } #pipelineTable td:nth-child(7)::before { content: "next task"; } #pipelineTable td:nth-child(8)::before { content: "outcome"; }
  .app-footer { min-height: 72px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 4px; font-size: 9px; }
  .toast { right: 16px; bottom: 16px; }
  .loading-state, .empty-state { inset: 0; min-height: 220px; padding-top: 36px; }
  .empty-state { padding: 22px 18px; }
}

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