/* TASK 133 (T133): Inter, bundled locally (SIL OFL 1.1 — fonts/Inter-LICENSE.txt). No CDN at runtime. */
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Takeout — company UI skin. TASK 49b base; TASK 67 facelift (T97): slate tokens, 8px cards,
   IBM Plex Sans + tabular nums, 48px navy bar. Skin only: class names / ids unchanged. */
:root {
  /* TASK 135 (T135) palette — calm finance desk: page #f6f7f5 · cards #fff · hairline #e6e6e2 · ink #1a1a1a ·
     muted #6b6b66 · teal #0f6e6b ONLY on primary buttons and the active tab · green #0e7a43 only on a positive
     net · red #b42318 only on a negative net · amber only on CAUTION chips. Everything else neutral. */
  --navy: #1a1a1a;
  --teal: #0f6e6b;
  --teal-hover: #0c5b58;
  --teal-tint: #eef5f4;
  --page: #f6f7f5;
  --card: #ffffff;
  --line: #e6e6e2;
  --line-strong: #d9d9d4;
  --ink: #1a1a1a;
  --ink-2: #3d3d39;
  --muted: #6b6b66;
  --dim: #9b9b95;
  --soft: #f2f2ef;
  --hover: #fafaf8;
  --banner-bg: #ffffff;
  --banner-ink: #1a1a1a;
  --dscr-bg: #f2f2ef;
  --dscr-ink: #3d3d39;
  --ltv-bg: #f2f2ef;
  --ltv-ink: #3d3d39;
  --path-75: #eef5f4;
  --blocked-bg: #ffffff;
  --blocked-ink: #1a1a1a;
  --amber-bg: #fdf3d7;
  --amber-ink: #8a4b0f;
  --amber-line: #f0d48a;
  --neg: #b42318;
  --pos: #0e7a43;
  /* legacy aliases (inline styles / older rules) */
  --paper: var(--page);
  --bg: var(--page);
  --accent: var(--teal);
  --accent-soft: var(--ltv-bg);
  --warn-bg: var(--banner-bg);
  --warn-ink: var(--banner-ink);
  --sent-bg: var(--ltv-bg);
  --sent-ink: var(--ink);
  --draft-bg: #f2f2ef;
  --draft-ink: #3d3d39;
  --dscr-amber: var(--dscr-ink);
  --dscr-amber-bg: var(--dscr-bg);
  --font-ui: Inter, "Segoe UI", system-ui, sans-serif;
  --font-brand: var(--font-ui);
  --radius: 12px;       /* cards */
  --radius-ctl: 8px;    /* buttons, fields, banners */
  --shadow: none;
  --btn-h: 36px;
  --pad: 16px;
  --gap: 24px;
  --page-max: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink);
  background: var(--page);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
input, button, select, textarea { font-family: inherit; font-variant-numeric: tabular-nums; }
code { font-family: inherit; }

/* —— Header: TAKEOUT · file id · address · one status pill —— */
.shell-top {
  background: var(--navy);
  color: #fff;
  height: 48px;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.shell-top .shell-brand {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 18px;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
  line-height: 1;
}
.shell-top .shell-sep { opacity: 0.35; }
.shell-top .shell-meta { opacity: 0.9; overflow: hidden; text-overflow: ellipsis; }
.shell-top #shell-file { font-weight: 500; opacity: 1; }
.shell-top a { color: #fff; text-decoration: none; }

.shell-nav {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  display: flex;
  gap: 4px;
  align-items: stretch;
}
.shell-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.shell-nav a:first-child { margin-left: -12px; }
.shell-nav a:hover { color: var(--ink); }
.shell-nav a.active { color: var(--teal); border-bottom-color: var(--teal); }

.shell-page, .shell-page.wide { max-width: 1160px; margin: 0 auto; padding: 24px 20px 32px; }

.shell-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

/* Status pill (header + list) */
.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 0 10px;
  height: 22px;
  line-height: 22px;
  font-size: 11px;
  font-weight: 500;
  background: var(--draft-bg);
  color: var(--draft-ink);
  vertical-align: middle;
  white-space: nowrap;
}
.status-chip.draft { background: var(--draft-bg); color: var(--draft-ink); }
.status-chip.sent,
.status-chip.sent_to_broker { background: var(--ltv-bg); color: var(--teal); }
.status-chip.counter_sent { background: var(--banner-bg); color: var(--banner-ink); }
.shell-top .status-chip.draft { background: rgba(255,255,255,0.14); color: #fff; }

/* Page title 22/28 — no second TAKEOUT */
.page-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.page-heading { display: none; }
.page-meta { display: none; } /* file · address already in the header */

.meta { color: var(--muted); font-size: 13px; line-height: 20px; }
.subject-line { color: var(--muted); font-size: 13px; margin-bottom: 16px; white-space: pre-line; }
.path-meta { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  margin-bottom: var(--gap);
  min-width: 0;
}

/* Card title 13/18 medium */
h2 {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: 0;
}
h3.compare-h { font-size: 12px; line-height: 18px; margin: 0 0 6px; color: var(--muted); font-weight: 500; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

/* Labels 10px uppercase 0.08em #6B7280 */
.kv .k, th, .intake-field .intake-label, .photo-label, .chip-label,
.subject-card .subject-kv .k, .details-row .k {
  font-size: 10px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}
.kv .v { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.kv .v.small { font-size: 13px; line-height: 20px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }

/* 75% path row */
tr.path-75 td { background: var(--path-75); font-weight: 600; }
tr.path-75 td:first-child { box-shadow: inset 3px 0 0 var(--teal); }

/* Killed comps — 45% opacity + strike price */
tr.dim td, tr.excluded td { opacity: 0.45; }
tr.dim td.price-strike, tr.excluded td.price-strike,
tr.dim td.price-strike *, tr.excluded td.price-strike * { text-decoration: line-through; }

.comps-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

/* Chips: DSCR #F3E4B8 · LTV #D7EDE8 */
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--ltv-bg);
  color: var(--ltv-ink);
  vertical-align: middle;
  white-space: nowrap;
}
.pill.binding-ltv { background: var(--ltv-bg); color: var(--ltv-ink); }
.pill.binding-dscr { background: var(--dscr-bg); color: var(--dscr-ink); }
.pill.est-pill { background: var(--dscr-bg); color: var(--dscr-ink); font-size: 10px; height: 18px; line-height: 18px; letter-spacing: 0.04em; }

/* Banner #F4E7C4 / #6B4E12 */
.banner {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: var(--gap);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  background: var(--banner-bg);
  color: var(--banner-ink);
}
.banner.info, .banner.sent { background: var(--ltv-bg); color: var(--teal); }
.banner.warn { background: var(--banner-bg); color: var(--banner-ink); }
.banner.blocked { background: var(--blocked-bg); color: var(--blocked-ink); }

.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

/* Buttons 36px · primary teal filled · secondary outline */
button, .btn {
  appearance: none;
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 0 14px;
  height: 36px;
  min-height: 36px;
  font-weight: 500;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
button.secondary, .btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover, .btn.secondary:hover { border-color: #CBD5E1; background: #fff; }
button.warn, .btn.warn { background: var(--dscr-bg); color: var(--dscr-ink); border-color: #EBD9A6; }
button:disabled, button:disabled:hover { opacity: 0.5; cursor: default; }
button.secondary:disabled { background: #fff; border-color: var(--line); }

.keep label { font-size: 12px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); }

/* Inputs 36px */
.intake-field input, input.field, .addr-row input, textarea.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  width: 100%;
  min-width: 0;
}
textarea.field { height: auto; padding: 8px 10px; }
.intake-field input:focus, input.field:focus, .addr-row input:focus, textarea.field:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  outline-offset: 0;
  border-color: var(--teal);
}
input.field[readonly] { background: #F8FAFC; color: var(--muted); }
.intake-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.intake-field .optional { text-transform: none; letter-spacing: 0; color: var(--dim); }
.intake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.addr-row { display: flex; gap: 8px; align-items: center; }

.chip-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0 12px;
  height: 28px;
  min-height: 28px;
  font-size: 12px;
  font-weight: 500;
}
.chip:hover { background: #fff; border-color: #CBD5E1; }
.chip.active, .chip.active:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* List */
.list-table td { height: 44px; padding-top: 0; padding-bottom: 0; }
.list-table td.small { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-table a { color: var(--teal); font-weight: 500; text-decoration: none; }
.list-table a:hover { text-decoration: underline; }
.list-table td strong { font-weight: 500; }

/* —— Photos: dashed frames, small labels —— */
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-slot { min-width: 0; }
.photo-frame {
  position: relative;
  height: 72px;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
}
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame.has-photo { border-style: solid; border-color: var(--line); }
.photo-slot > img { display: none; } /* legacy */
.photo-label { margin: 6px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.photo-upload { font-size: 11px; color: var(--teal); cursor: pointer; font-weight: 500; text-transform: none; letter-spacing: 0; }
.photo-upload input { display: none; }

/* —— Docs: compact rows, teal check = received, muted = missing —— */
.docs { display: grid; gap: 0; }
.doc-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.doc-slot:last-child { border-bottom: none; }
.doc-slot .doc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-slot.miss .doc-name { color: var(--muted); }
.doc-mark {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.doc-slot.ok .doc-mark, .docs-check li.ok .mark { background: var(--teal); color: #fff; border: none; }
.doc-slot.miss .doc-mark { border: 1px solid #CBD5E1; }
.doc-status { font-size: 12px; color: var(--muted); }
.doc-link { color: var(--teal); font-weight: 500; text-decoration: none; font-size: 12px; }
.doc-missing { color: var(--dim); font-size: 12px; }

.docs-check { list-style: none; margin: 0; padding: 0; display: grid; }
.docs-check li {
  display: flex; align-items: center; gap: 10px;
  height: 36px; font-size: 13px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.docs-check li:last-child { border-bottom: none; }
.docs-check li.miss { color: var(--muted); }
.docs-check .mark {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.docs-check li.miss .mark { color: transparent; border: 1px solid #CBD5E1; }
.docs-check .state { margin-left: auto; font-size: 11px; color: inherit; }
.docs-check li.ok .state { color: var(--teal); }

.compare { display: grid; grid-template-columns: 1fr; gap: 12px; }

.lock-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.lock-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* —— Layout rows (1280 viewport, 1120 content) —— */
.row { display: grid; gap: var(--gap); align-items: start; margin-bottom: var(--gap); }
.row > * { min-width: 0; }
.row > .card, .row > .col > .card:last-child { margin-bottom: 0; }
.row .col > .card { margin-bottom: var(--gap); }
.wk-row1 { grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1.3fr); }
.wk-row4 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.dk-row1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
.dk-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wk-intake { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
/* Task 71: subject-as-stated intake next to Address; deal inputs on the row below */
.wk-intake.wk-intake-subject { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)); }
.wk-intake.wk-intake-deal { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; margin-top: 12px; }
.intake-hint { font-size: 11px; line-height: 16px; color: var(--dim); margin-top: 6px; }
.wk-intake .run-cell { display: flex; align-items: center; gap: 8px; }
@media (max-width: 960px) {
  .wk-row1, .wk-row4, .dk-row1, .dk-row3, .wk-intake { grid-template-columns: 1fr; }
  .wk-intake.wk-intake-subject, .wk-intake.wk-intake-deal { grid-template-columns: 1fr; }
}

.subject-card .subject-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.subject-card .subject-kv > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.subject-card .subject-kv .v { font-size: 13px; line-height: 20px; font-weight: 500; }

/* Desk deal inputs */
.deal-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 12px; margin-bottom: 12px; }
.kv input.field { max-width: 150px; }
.rate-lock-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 12px; }
.lock-path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lock-path label, label.lock-path { font-size: 13px; color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.path-arv-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 12px 16px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.path-arv-row .kv { margin: 0; }
.est-note { margin: -6px 0 12px; font-size: 12px; }
input.sold-price { height: 32px; width: 110px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 13px; }

/* Path matrix (hero) + net block, same rail, 13px */
#paths-table, #paths-single table, #inv-paths table, #desk-paths table { font-size: 13px; }
#paths-table td, #paths-table th { padding: 0 6px; white-space: nowrap; }
#paths-table td { height: 40px; }
#paths-table th { padding-bottom: 8px; }
.net-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.net-block .kv .k { white-space: nowrap; }
.net-block .kv .v, .net-block .kv .v.small { font-size: 13px; line-height: 20px; font-weight: 600; }
/* Task 59: Net to investor is the hero (what he takes home / puts in). */
.net-block .kv.net-hero { grid-column: 1 / -1; }
.net-block .kv.net-hero .v { line-height: 38px; }
.net-hero-v { font-family: var(--font-ui); font-size: 32px; line-height: 38px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.net-hero-v.net-pos { color: var(--pos); }
.net-hero-v.net-neg { color: var(--neg); }
.net-hero-v.net-none { color: var(--ink); }
.packet-page .net-hero-v { font-size: 18pt; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.net-sub { margin: 6px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.neg { color: var(--neg); }
.wk-row1 .net-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dk-row1 .net-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Comps: 44px rows, 13px, one-line address, 36px thumb */
#comps-wrap, .comps-scroll, #pk-comps { overflow-x: auto; }
#comps-wrap table, #comps-table { font-size: 13px; table-layout: auto; }
#comps-wrap td, #comps-table td { height: 44px; padding: 0 8px; white-space: nowrap; vertical-align: middle; }
#comps-wrap th, #comps-table th { padding: 0 8px 8px; }
.comp-addr { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comp-addr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; display: inline-block; }
.comp-thumb {
  width: 36px; height: 36px; object-fit: cover; border-radius: 6px;
  background: #EEF2F6; vertical-align: middle; display: inline-block;
}
.comp-thumb-ph { background: #EEF2F6; border: 1px dashed #CBD5E1; }
.td-thumb, .th-thumb { width: 44px; padding-right: 0 !important; }
.th-spec, .td-spec { white-space: nowrap; text-align: right; }
.td-price, .th-price { text-align: right; }
td.keep, .td-keep { width: 72px; }

/* Desk Details (collapsed) */
details.desk-details { padding: 0; }
details.desk-details > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink);
  padding: var(--pad);
}
details.desk-details > summary::-webkit-details-marker { display: none; }
details.desk-details > summary::after { content: "Show"; float: right; font-size: 12px; color: var(--teal); }
details.desk-details[open] > summary::after { content: "Hide"; }
details.desk-details .details-body, details.desk-details .details-empty { padding: 0 var(--pad) var(--pad); }
.details-kv { display: grid; gap: 8px; }
.details-row .v { font-size: 13px; font-weight: 500; }
.details-row .src { font-size: 11px; color: var(--muted); font-weight: 400; }

.avm-label { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.avm-label .pill-avm { background: var(--draft-bg); color: var(--draft-ink); }
.fact-chips { display: none !important; }

button.working, button[aria-busy="true"] { opacity: 0.75; cursor: progress; }
button.working::after { content: "…"; }
.empty-lock-note { color: var(--blocked-ink); font-size: 12px; font-weight: 500; }

/* —— HTML packet: letter-style content (unchanged look), Plex type —— */
.packet-page {
  background: #fff;
  max-width: 7.5in;
  margin: 0 auto;
  padding: 0.45in 0.5in;
  color: var(--ink);
  font-size: 11pt;
  line-height: 1.35;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.packet-page .meta { font-size: 10pt; line-height: 1.35; }
.packet-page h2 {
  font-size: 10pt; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 12px 0 6px; font-weight: 600;
}
.packet-page .kv .k { font-size: 8pt; }
.packet-page .kv .v { font-size: 11.5pt; line-height: 1.35; }
.packet-page table { font-size: 10pt; }
.packet-page th, .packet-page td { padding: 5px 6px; }
.packet-page .grid { gap: 8px 14px; }
.packet-page .banner { margin-bottom: 10px; padding: 8px 10px; font-size: 10pt; }
.packet-page .net-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.packet-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.packet-header .brand { font-family: var(--font-brand); font-size: 14pt; font-weight: 600; letter-spacing: 0.1em; color: var(--navy); }
.packet-header .right { text-align: right; color: var(--navy); font-weight: 500; font-size: 10pt; }
.packet-footer { margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 8pt; color: var(--muted); }
.packet-page .comps-empty { padding: 8px 10px; font-size: 10pt; }
.packet-page #pk-comps td { height: auto; }

@media print {
  body { background: #fff; }
  .shell-top, .shell-nav, .actions, .photo-upload, .addr-row, .shell-footer,
  .chip-row, button, .btn, .keep input, .lock-toggle { display: none !important; }
  .shell-page { max-width: none; padding: 0; }
  .card { break-inside: avoid; border-color: #ccc; box-shadow: none; }
  .packet-page { padding: 0.4in; max-width: none; border: none; }
  a { color: inherit; text-decoration: none; }
}
.net-block .kv .v .est-pill { margin-left: 4px; font-weight: 500; }

/* Live switch note next to Use live (10px label style) */
.live-note { font-size: 10px; line-height: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }

/* Task 66: target rent to hold 75% LTV (Workup net hero, display only) */
.net-block .target-rent { grid-column: 1 / -1; font-size: 13px; line-height: 20px; color: var(--ink); margin-top: -4px; }
.net-block .target-rent .target-x { font-weight: 600; font-variant-numeric: tabular-nums; }
.net-block .target-rent .pill { margin-left: 6px; }

/* Task 67: Workup monthly EST negative = amber (DSCR chip ink) */
.net-block .monthly-neg { color: var(--dscr-ink); }

/* Task 70: tax source label under the Tax $/yr field (Workup + Desk) */
.tax-src { display: block; margin-top: 4px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; }
.tax-src.tax-unknown { color: var(--dscr-ink); }

/* Task 71: subject as stated vs public record (subject card) */
.subject-card .subject-stated { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--ink); }
.subject-card .subject-record { font-size: 12px; line-height: 18px; color: var(--muted); margin-bottom: 10px; }
.subject-card .subject-stated + .subject-kv { margin-top: 10px; }

/* Task 74: EST adds (comps ARV) */
.est-adds { border: 1px solid #d7dee6; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; background: #f8fafc; }
.est-adds .est-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.est-adds .est-recipe { font-weight: 700; font-size: 14px; color: #0b1f33; margin: 2px 0 8px; }
.est-adds .est-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.est-adds .est-table th, .est-adds .est-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid #e5e9ef; }
.est-adds .est-val { font-weight: 600; white-space: nowrap; }
.est-adds tr.est-off td { color: #8a97a6; }
.est-flag { color: #92400e; background: #fef3c7; padding: 3px 6px; border-radius: 4px; font-size: 12px; margin-top: 6px; }
.est-adds.est-thin .est-recipe { color: #b91c1c; }

/* Task 78: New file control (List + Workup header) and the one-line address warning */
.shell-top .shell-new {
  height: 26px; min-height: 26px; padding: 0 10px; font-size: 12px; border-radius: 6px;
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35);
}
.shell-top .shell-new:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row .page-title { margin: 0; }
.addr-warn {
  margin-top: 8px; padding: 6px 10px; border-radius: 6px; font-size: 12px; line-height: 18px;
  background: var(--banner-bg); color: var(--banner-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Task 81: desk owns the file after Send counter — locked Workup controls (greyed) */
td.keep.keep-locked label { opacity: .45; cursor: not-allowed; }
td.keep.keep-locked input[type=checkbox] { cursor: not-allowed; filter: grayscale(1); }
input.counter-locked, button.counter-locked { background: #eceff2 !important; color: #8a94a0 !important; cursor: not-allowed; border-color: #d5dae0 !important; }
.counter-lock-note { font-size: 12.5px; }
.kv-working .v { color: #115E59; }

/* Task 81c — address → Google Maps link (inherits text color; works on dimmed / locked rows) */
a.map-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(15, 118, 110, 0.35); text-underline-offset: 2px; cursor: pointer; }
a.map-link:hover, a.map-link:focus-visible { color: var(--teal); text-decoration-color: currentColor; }
.shell-top a.map-link { text-decoration-color: rgba(255, 255, 255, 0.35); }
.shell-top a.map-link:hover, .shell-top a.map-link:focus-visible { color: #fff; text-decoration-color: #fff; }
@media print { a.map-link { color: inherit; text-decoration: none; } }

/* Task 82 — 2 s toasts, top-right under the navy bar. OK = teal, blocked/failed = 49b amber */
.toast-host { position: fixed; top: 64px; right: 16px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { font: 500 13px/1.35 var(--font-ui); padding: 8px 14px; border-radius: 8px; max-width: 420px; box-shadow: 0 4px 14px rgba(11, 31, 51, 0.14); opacity: 0; transform: translateY(-4px); transition: opacity 0.18s ease, transform 0.18s ease; }
.toast.in { opacity: 1; transform: none; }
.toast-ok { background: var(--teal); color: #fff; }
.toast-warn { background: var(--banner-bg); color: var(--banner-ink); border: 1px solid #EBD9A6; }

/* Task 82b — client name in headers + List search */
.hdr-client { font-weight: 600; }
.hdr-dot { opacity: 0.7; }
.wk-intake.wk-intake-client { margin-bottom: 12px; }
.dk-client { margin-bottom: 12px; }
.list-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.list-tools input[type=search] { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: 400 14px var(--font-ui); width: 320px; max-width: 100%; background: #fff; color: var(--ink); }
.list-tools input[type=search]:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
.list-table td.num, .list-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.list-table td.client { font-weight: 600; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-table td .file-links { font-size: 12px; color: var(--muted); }
.list-table td.file-cell { line-height: 1.35; }

/* Task 83 — Close (funded | dead): chips, CLOSED banner, Desk close row, List view toggle */
.status-chip.dead { background: var(--blocked-bg); color: var(--blocked-ink); }
.status-chip.funded { background: var(--ltv-bg); color: var(--teal); }
.banner.closed { font-weight: 600; letter-spacing: 0.01em; }
.banner.closed.dead { background: var(--blocked-bg); color: var(--blocked-ink); }
.banner.closed.funded { background: var(--ltv-bg); color: var(--teal); }
.closed-locked { opacity: 0.55; cursor: not-allowed; }
.close-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.close-row select.field, .close-row input.field { height: 36px; }
.close-row input.field { flex: 1 1 180px; min-width: 140px; }
.list-tools .chip-row { margin: 0; }
.list-table .close-reason { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Task 84 — in-page send confirm (Workup Send to broker · Desk Send counter) */
.confirm-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(11, 31, 51, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.confirm-panel { background: var(--card); border-radius: var(--radius); box-shadow: 0 18px 48px rgba(11, 31, 51, 0.28); padding: 20px 22px; width: 600px; max-width: 100%; font-family: var(--font-ui); color: var(--ink); }
.confirm-title { font: 600 12px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.confirm-text { font: 600 16px/1.45 var(--font-ui); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.confirm-extra { margin: 0 0 6px; color: var(--banner-ink); background: var(--banner-bg); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Task 85 — two one-line notes (Workup banner · Desk banner · Packet) + packet filename */
.banner.notes-banner { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.note-line { display: flex; gap: 10px; align-items: baseline; line-height: 20px; }
.note-k { flex: 0 0 120px; font: 600 11px/20px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.note-v { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.note-edit { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.note-edit-label { flex: 0 0 120px; font: 600 11px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.note-edit input { flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: 400 13px var(--font-ui); color: var(--ink); background: #fff; }
.note-edit input:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.pk-filename { font-size: 11px; font-variant-numeric: tabular-nums; }
.pk-notes { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; font-size: 10pt; }

/* Task 86 — packet "Docs & photos on file" (disk truth) */
.pk-attach .docs-check li { font-size: 10pt; }

/* Task 87: Desk working LTV chips + custom %, Workup "Desk structure", List cash % */
#ltv-chips .ltv-custom { width: 92px; height: 28px; min-height: 28px; padding: 0 8px; font-size: 12px; }
.desk-structure {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #E6F4F1;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
}
.cash-ltv { color: var(--muted); font-weight: 400; font-size: 12px; }

/* Task 89: comp Type column (Sold / Ask / Unverified) — 49b skin pills */
.th-type, .td-type { white-space: nowrap; }
.ctype { display: inline-block; font-size: 10px; line-height: 16px; padding: 0 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; border: 1px solid var(--line); }
.ctype-sold { background: var(--ltv-bg); color: var(--teal); border-color: transparent; }
.ctype-ask, .ctype-unverified { background: #fff; color: var(--muted); }
.ctype-ask.ctype-kept, .ctype-unverified.ctype-kept { background: var(--banner-bg); color: var(--banner-ink); border-color: transparent; }
.ctype-date { color: var(--muted); }
tr.row-nonsold-off td { color: var(--muted); }
tr.row-nonsold-off .comp-addr, tr.row-nonsold-off .td-price { text-decoration: line-through; }
/* Task 89: packet comps table fits the sheet with the Type column */
.packet-page #pk-comps table { font-size: 11px; }
.packet-page #pk-comps th, .packet-page #pk-comps td { padding: 6px 4px; }
.packet-page #pk-comps th { font-size: 9px; letter-spacing: 0.04em; }
.packet-page #pk-comps td:nth-child(2) { min-width: 110px; }
.packet-page #pk-comps td:nth-child(5) { min-width: 62px; }  /* Task 91: Date moved right of Source */
.packet-page #pk-comps .ctype { padding: 0 5px; font-size: 9px; }

/* Task 91: comp Source chip (PropStream / live / manual / PropStream + live) — 49b skin */
.th-src, .td-src { white-space: nowrap; }
.csrc { display: inline-block; font-size: 10px; line-height: 16px; padding: 0 7px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.02em; border: 1px solid var(--line); background: #fff; color: var(--draft-ink); }
.csrc-propstream { background: var(--draft-bg); color: var(--navy); border-color: transparent; }
.csrc-live { background: #fff; color: var(--teal); border-color: var(--ltv-bg); }
.csrc-manual { background: #fff; color: var(--muted); }
.csrc-multi { background: var(--ltv-bg); color: var(--navy); border-color: transparent; }
.packet-page #pk-comps .csrc { padding: 0 5px; font-size: 9px; }
/* Task 91: Workup Import solds panel */
.import-panel { margin: 0 0 12px; }
.comps-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comps-head-row h2 { margin-bottom: 0; }

/* Task 93: import review strip (Suggested in / Suggested out) */
.import-review { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: 10px; padding: 12px 14px; margin: 10px 0 14px; }
.import-review .ir-head { margin-bottom: 8px; }
.import-review .ir-h { font-weight: 700; color: var(--navy); font-size: 14px; }
.import-review .ir-stacks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.import-review .ir-stack { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--page); }
.import-review .ir-in { background: var(--path-75); }
.import-review .ir-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); margin-bottom: 6px; }
.import-review .ir-out .ir-title { color: var(--neg); }
.import-review .ir-list { list-style: none; margin: 0; padding: 0; }
.import-review .ir-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 2px 8px; align-items: center;
  padding: 5px 0; border-top: 1px solid var(--line); font-size: 12px; }
.import-review .ir-row:first-child { border-top: 0; }
.import-review .ir-keep { font-size: 11px; color: var(--muted); white-space: nowrap; }
.import-review .ir-addr { font-weight: 600; color: var(--ink); }
.import-review .ir-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.import-review .ir-reason { grid-column: 2 / -1; color: var(--muted); font-size: 11px; }
.import-review .ir-out .ir-reason { color: var(--neg); }
.import-review .ir-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-review .ir-hint { font-size: 11px; }
@media (max-width: 760px) { .import-review .ir-stacks { grid-template-columns: 1fr; } }
.import-review .ir-rules { margin-top: 4px; font-size: 11px; }
.path-meta.paths-banner-warn { color: var(--neg); font-weight: 600; }  /* Task 95: thin tape / kept suggested-out row */

/* ================================================================================
   TASK 67 facelift (T97) — skin only. Same 1120 layout; math / numbers untouched.
   ================================================================================ */
/* Money: IBM Plex Sans with tabular figures everywhere a number sits */
.kv .v, td, th, .net-hero-v, .net-eq, .list-table td.num, .import-chip, .pill, .status-chip,
input[type=number] { font-variant-numeric: tabular-nums; }

/* 48px navy bar: TAKEOUT wordmark left (+ address, muted) · New file + file id + status pill right.
   Markup unchanged — flex order only; the "·" separators are not needed any more. */
.shell-top { gap: 10px; }
.shell-top .shell-sep { display: none; }
.shell-top .shell-brand {
  order: 0; font-family: var(--font-ui); font-variant-caps: normal;
  font-size: 15px; font-weight: 600; letter-spacing: 0.18em;
}
.shell-top #shell-addr {
  order: 1; margin-right: auto; min-width: 0; flex: 0 1 auto;
  padding-left: 12px; margin-left: 4px; border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12.5px; opacity: 0.72;
}
.shell-top .shell-new { order: 2; height: 28px; min-height: 28px; border-radius: 8px; }
.shell-top #shell-file { order: 3; font-weight: 600; letter-spacing: 0.01em; }
.shell-top #shell-status { order: 4; }
.shell-nav a.active { font-weight: 600; }

/* 8px cards, 1px #E2E8F0, no heavy shadow */
.card, .import-review, .packet-page, .confirm-panel { border-radius: var(--radius); box-shadow: none; }
.card { border: 1px solid var(--line); }
.confirm-panel { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16); }
.toast { box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12); }
.page-title { color: var(--ink); letter-spacing: -0.005em; }
h2 { font-weight: 600; }

/* Buttons 36px, sentence case (never ALL CAPS) */
button, .btn { height: 36px; min-height: 36px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; border-radius: 8px; }
button.secondary, .btn.secondary { color: var(--ink); border-color: var(--line); }
button.secondary:hover, .btn.secondary:hover { border-color: #CBD5E1; background: #F8FAFC; }

/* Hero: NET after rehab — 32px / 600, green ≥ 0 or red < 0; cash at close sits beside it, own label */
.net-hero-v { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; }
.net-hero-v.net-pos { color: var(--pos); }
.net-hero-v.net-neg { color: var(--neg); }
.net-block .kv.net-hero .v { line-height: 38px; }
.net-eq { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 2px; }
.net-block .kv.cash-kv .v { color: var(--ink); }
.packet-page .net-hero-v { font-size: 18pt; line-height: 1.2; font-weight: 600; }
.packet-page .net-eq { font-size: 9pt; }
.list-net { font-size: 12px; line-height: 16px; font-weight: 500; margin-top: 1px; }
.list-net.net-neg { color: var(--neg); }
.list-net.net-pos { color: var(--pos); }

/* Comp rows 44px; a removed (Keep off) row is struck through + muted */
#comps-wrap td, #comps-table td { height: 44px; }
tr.dim td, tr.excluded td { opacity: 1; color: var(--muted); }
tr.excluded td:not(.keep):not(.td-thumb):not(.td-type):not(.td-src),
tr.excluded .comp-addr span, tr.excluded a.map-link {
  text-decoration: line-through; text-decoration-color: rgba(100, 116, 139, 0.75);
}
tr.excluded a.map-link { color: var(--muted); }
tr.excluded .comp-thumb, tr.excluded .ctype, tr.excluded .csrc { opacity: 0.55; }
tr.excluded td.keep label { color: var(--muted); }

/* Import: file row first; raw CSV paste box + format notes behind "Paste CSV instead";
   the result is one chip in the Comps header */
.import-panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #F8FAFC; margin: 0 0 12px; }
.import-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.import-row input[type=file] { font-size: 12px; color: var(--muted); max-width: 260px; }
details.import-paste { margin-top: 10px; }
details.import-paste > summary { cursor: pointer; list-style: none; font-size: 12px; font-weight: 500; color: var(--teal); user-select: none; }
details.import-paste > summary::-webkit-details-marker { display: none; }
details.import-paste > summary::before { content: "▸ "; }
details.import-paste[open] > summary::before { content: "▾ "; }
.import-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--draft-bg); color: var(--draft-ink);
}
.import-chip:empty { display: none; }
.import-chip.pending { background: var(--banner-bg); color: var(--banner-ink); }
.import-chip.done { background: var(--ltv-bg); color: var(--teal); }
.import-chip.fail { background: var(--blocked-bg); color: var(--blocked-ink); }
.comps-head-row { margin-bottom: 12px; justify-content: flex-start; flex-wrap: wrap; }
.comps-head-row h2 { margin-right: auto; }

/* "Pulls RentCast (billed)" = a 10px mute note under Use live (not a caps label beside it) */
.live-stack { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.live-note {
  position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  font-size: 10px; line-height: 12px; text-transform: none; letter-spacing: 0;
  color: var(--muted); font-weight: 400; white-space: nowrap;
}
.actions:has(.live-stack) { row-gap: 22px; }

/* Workup: ONE intake card (middle of row 1) — intake fields, Run / Use live, App results inputs */
.intake-card .in-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.intake-card .in-grid .in-span2 { grid-column: 1 / -1; }
.intake-card .in-deal { margin-top: 12px; }
.intake-card .intake-field input { height: 36px; }
.intake-card .run-cell { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding-bottom: 14px; }
.intake-card .in-results { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.intake-card .in-sub { font-size: 12px; font-weight: 600; color: var(--ink); margin: 0 0 10px; }
.intake-card .tax-src { white-space: normal; }

/* Packet stays a letter sheet; nothing but the sheet prints (no nav / buttons / notes chrome) */
@page { size: letter; margin: 0.5in; }
@media print {
  .shell-top, .shell-nav, .shell-footer, .actions, .toast-host, .confirm-backdrop { display: none !important; }
  body { background: #fff; }
  .packet-page { border: none; border-radius: 0; padding: 0; max-width: none; }
}

/* TASK 67 amend: "Rehab included in payoff" (intake; net line only) */
.rip-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.rip-toggle input { width: 16px; height: 16px; margin: 0; }
.rip-hint { margin-top: 4px; }
.rehab-kv .rehab-note { font-size: 11px; line-height: 14px; font-weight: 400; color: var(--muted); }

/* ------------------------------------------------------------------
   TASK 69 (T98): comp set tools — review row facts, Lot column, radius chips
   ------------------------------------------------------------------ */
.import-review .ir-row { grid-template-columns: auto 1fr auto; }
.import-review .ir-facts { grid-column: 2 / -1; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.import-review .ir-facts .ir-price { font-weight: 600; }
.radius-row { margin: 4px 0 10px; }
.radius-row .chip-unit { font-size: 12px; color: var(--muted); margin-left: -2px; }
.radius-row .radius-banner { margin-left: 8px; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums;
  background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.radius-row .chip:disabled { opacity: .55; cursor: not-allowed; }
th.th-lot, td.td-lot { white-space: nowrap; }
/* TASK 69: the packet prints no formula line — hero, cash-out and rehab lines only */
.packet-page .net-eq { display: none; }

/* —— TASK 70 (T99): product pass —— */
.photo-frame { flex-direction: column; gap: 2px; }
.photo-frame .ph-name { font-size: 12px; font-weight: 600; color: #64748B; letter-spacing: 0.01em; }
.photo-frame .ph-sub { font-size: 10px; color: #94A3B8; }
.photo-frame.has-photo .ph-name, .photo-frame.has-photo .ph-sub { display: none; }
.banner .gate-import { margin-left: 10px; padding: 3px 10px; font-size: 12px; vertical-align: middle; }
.packet-page .pk-addr { font-size: 13pt; font-weight: 600; color: var(--ink, #0B1F33); margin: 2px 0 2px; }
.packet-page .pk-deal { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.packet-page .pk-deal .meta { font-size: 8.5pt; margin-top: 1px; }
.packet-page #pk-comps td:nth-child(5) { min-width: 0; }
.packet-page #pk-comps .pk-comps-table td:nth-child(n+3), .packet-page #pk-comps .pk-comps-table th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.pk-attach-card { max-width: 7.5in; margin: 14px auto 0; }
@media print { .pk-attach-card { display: none; } }

/* TASK 70 (T100): recommend chips + header / banners (same type scale as the 67 skin) */
.rec-chip { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; line-height: 16px; cursor: help; white-space: nowrap; }
.rec-keep { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.rec-caution { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.rec-out, .rec-dump { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.rec-rule { font-size: 11px; color: #64748B; line-height: 1.3; margin-top: 1px; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.rec-rule-out, .rec-rule-dump { color: #991B1B; }
.rec-rule-caution { color: #92400E; }
/* TASK 70 (T100): the Flags chip stays in view — tighter comps cells, address capped */
#comps-wrap td, #comps-table td, #comps-wrap th, #comps-table th { padding-left: 6px; padding-right: 6px; }
#comps-wrap .comp-addr span, #comps-table .comp-addr span { max-width: 250px; }
#comps-wrap td.td-rec, #comps-table td.td-rec { width: 1%; }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 6px; }
.rec-counts { font-weight: 600; font-size: 13px; color: #0B1F33; }
.rec-toggle { font-size: 12px; color: #334155; display: inline-flex; align-items: center; gap: 4px; }
.rec-gate { font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.rec-gate-ok { background: #DCFCE7; color: #166534; }
.rec-gate-no { background: #FEE2E2; color: #991B1B; }
.rec-banners .banner { margin: 4px 0; }
.banner.ok { background: #ECFDF3; color: #166534; border: 1px solid #A7F3D0; }
.pk-comps-table td.td-rec { text-align: center; }

/* TASK 71 (T101): radius pills = view filter only — rows beyond the pill are dimmed
   (Keep box stays full strength so its state is visible; nothing is unchecked) */
tr.radius-view-out > td:not(.keep) { opacity: 0.32; }
tr.radius-view-out > td.keep { box-shadow: inset 3px 0 0 #CBD5E1; }
/* TASK 111 (T111): Show KEEP + CAUTION | All (view only) */
.show-row { margin: 4px 0 2px; }
.show-row .show-banner { margin-left: 8px; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums;
  background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
tr.show-hidden { display: none; }
.show-hint { display: inline-block; margin-left: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* TASK 74 (T104): list check stamp — text only */
.list-check-stamp { color: #92400e; font-weight: 600; }

/* ==================================================================================
   TASK 135 (T135) — product finish. Calm underwriting desk (Stripe / Linear density).
   Look only: ids, handlers, button jobs, ticks, ARV and loans untouched.
   Page max 1180 · 24px between the two columns · 16px card padding · 12px card radius ·
   no shadow · 1px hairline · Inter · ARV 40/560 · net 28/560 · everything else 13–14px.
   ================================================================================== */
body { font-family: var(--font-ui); font-size: 13px; line-height: 20px; color: var(--ink); background: var(--page);
  font-feature-settings: "tnum" 1, "cv11" 1; letter-spacing: 0; }
.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; }

/* —— Top bar: mark · address + facts (center) · file id + status (right) —— */
.shell-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  height: 52px; background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line);
  padding: 0 max(24px, calc((100% - var(--page-max)) / 2)); overflow: hidden; white-space: nowrap; }
.shell-top .shell-sep { display: none; }
.shell-top .shell-brand { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui);
  font-variant-caps: normal; font-size: 14px; line-height: 1; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); order: 0; }
.shell-top .shell-brand::before { content: ""; display: inline-block; width: 8px; height: 16px; border-radius: 2px; background: var(--teal); }
.shell-top .shell-center { justify-self: center; min-width: 0; max-width: 100%; display: inline-flex; align-items: baseline; gap: 0;
  overflow: hidden; text-overflow: ellipsis; }
.shell-top #shell-addr { order: 0; margin: 0; padding: 0; border: 0; opacity: 1; font-size: 15px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.shell-top #shell-addr a { color: var(--ink); text-decoration: none; }
.shell-top #shell-addr a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.shell-top .shell-facts { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; cursor: default; }
.shell-top .shell-facts::before { content: "\00a0·\00a0"; }
.shell-top .shell-facts:empty { display: none; }
.shell-top .shell-record { font-size: 12px; color: var(--muted); margin-left: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 18px; cursor: help; }
.shell-top .shell-right { justify-self: end; display: inline-flex; align-items: center; gap: 10px; }
.shell-top #shell-file, .shell-top .shell-fid { order: 0; font-size: 13px; font-weight: 500; color: var(--ink); opacity: 1;
  letter-spacing: 0; font-feature-settings: "tnum" 0, "case" 0; font-variant-numeric: normal; white-space: nowrap; }
.shell-top .shell-new { order: 0; height: 28px; min-height: 28px; padding: 0 10px; font-size: 12px; font-weight: 500; border-radius: var(--radius-ctl);
  background: transparent; color: var(--muted); border: 1px solid var(--line); }
.shell-top .shell-new:hover { background: var(--hover); color: var(--ink); border-color: var(--line-strong); }
.status-chip, .status-chip.draft, .shell-top .status-chip.draft { height: 22px; line-height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--soft); color: var(--ink-2); }
.status-chip.sent, .status-chip.sent_to_broker, .status-chip.funded, .status-chip.counter_sent { background: var(--soft); color: var(--ink); font-weight: 600; }
.status-chip.dead { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* Tabs under the bar: active = ink + 2px teal underline; inactive muted; no pills, no boxes */
.shell-nav { background: var(--card); border-bottom: 1px solid var(--line); gap: 20px;
  padding: 0 max(24px, calc((100% - var(--page-max)) / 2)); }
.shell-nav a { color: var(--muted); font-size: 13px; font-weight: 500; padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.shell-nav a:first-child { margin-left: 0; }
.shell-nav a:hover { color: var(--ink); }
.shell-nav a.active { color: var(--ink); border-bottom-color: var(--teal); font-weight: 500; }

/* —— Page + cards —— */
.shell-page, .shell-page.wide { max-width: calc(var(--page-max) + 48px); margin: 0 auto; padding: 24px 24px 32px; }
.shell-footer { max-width: calc(var(--page-max) + 48px); padding: 0 24px 24px; color: var(--muted); font-size: 12px; }
.page-title, .page-meta, .subject-line { display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; padding: var(--pad); margin-bottom: var(--gap); }
.import-review, .confirm-panel { border-radius: var(--radius); }
.row { gap: var(--gap); margin-bottom: var(--gap); align-items: stretch; }
.row > .card { margin-bottom: 0; }
h2 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); margin: 0 0 14px; letter-spacing: -0.005em; }
h2.eyebrow { font-size: 11px; line-height: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 6px; }
.kv .k, th, .intake-field .intake-label, .photo-label, .chip-label, .details-row .k {
  font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; }
.kv .v { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.kv .v.small { font-size: 14px; line-height: 20px; font-weight: 500; }
.kv .v .meta, .kv .v.small .meta { font-weight: 400; font-size: 13px; line-height: 18px; color: var(--muted); }
.meta { color: var(--muted); font-size: 13px; line-height: 20px; }
.quiet-line { color: var(--muted); font-size: 13px; line-height: 20px; margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiet-line:empty { display: none; }

/* —— Workup: two columns, 42% intake | 58% paths —— */
.wk-row1 { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); align-items: start; }  /* the Paths card hugs its content */
.dk-row1 { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); align-items: start; }
.intake-card .in-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 12px; }
.intake-card .in-grid .in-span2 { grid-column: 1 / -1; }
.intake-card .in-deal { margin-top: 12px; }
.intake-field { gap: 6px; }
.intake-field .optional { display: none; }
.intake-field input, input.field, .addr-row input, textarea.field, select.field {
  height: 36px; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: #fff;
  color: var(--ink); font-size: 13px; padding: 0 10px; box-shadow: none; }
textarea.field { height: auto; padding: 8px 10px; }
.intake-field input:hover, input.field:hover { border-color: #c9c9c3; }
.intake-field input:focus, input.field:focus, .addr-row input:focus, textarea.field:focus, select.field:focus {
  outline: 3px solid rgba(26, 26, 26, 0.06); outline-offset: 0; border-color: #8f8f89; }  /* neutral focus — teal stays on primary + active tab */
input.field[readonly] { background: var(--page); color: var(--ink-2); }
.kv input.field { max-width: none; }
.rip-toggle { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; font-weight: 400; color: var(--ink); }
.intake-card .run-cell { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 0; }
.intake-card .in-results { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.intake-card .in-sub { font-size: 11px; line-height: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 12px; }
.intake-card #deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 12px; }
.intake-card #deal-grid .kv .k { margin-bottom: 6px; }
.intake-card #deal-grid .intake-field { display: block; }
.intake-card .tax-src, .intake-card #market-rent-note { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 4px; font-weight: 400; white-space: normal; }
.tax-src.tax-unknown { color: var(--ink); font-weight: 600; }
.live-note { font-size: 11px; color: var(--muted); }
.addr-warn { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: var(--radius-ctl);
  padding: 6px 10px; margin-top: 10px; font-size: 13px; }

/* —— Buttons: one height (36px); teal fill = primary; quiet border = secondary; text button —— */
button, .btn { height: var(--btn-h); min-height: var(--btn-h); padding: 0 14px; border-radius: var(--radius-ctl); font-size: 13px; font-weight: 500;
  background: var(--teal); border: 1px solid var(--teal); color: #fff; box-shadow: none; text-transform: none; letter-spacing: 0; }
button:hover, .btn:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
button.secondary, .btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--hover); border-color: #c4c4be; }
button.secondary:disabled, button.secondary:disabled:hover { background: var(--card); border-color: var(--line); }
button.warn, .btn.warn { background: var(--card); color: var(--ink); border: 1px solid var(--ink); }
button.warn:hover, .btn.warn:hover { background: var(--hover); }
.btn.text-btn, button.text-btn { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 6px; }
.btn.text-btn:hover, button.text-btn:hover { background: transparent; border-color: transparent; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); }
.banner .gate-import { height: 28px; min-height: 28px; }
.actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; align-items: center; }

/* —— Banners: quiet, still visible. Info = hairline; warn = dark left rule; blocked = ink border —— */
.banner { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-ctl);
  padding: 8px 12px; margin-bottom: 16px; font-size: 13px; line-height: 20px; font-weight: 500; }
.banner.info, .banner.sent, .banner.ok, .banner.notes-banner, .banner.closed.funded { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.banner.warn { border-left: 3px solid var(--ink); }
.banner.blocked, .banner.closed.dead { border: 1px solid var(--ink); border-left: 3px solid var(--ink); font-weight: 600; }
.confirm-extra { background: var(--soft); color: var(--ink); border-radius: var(--radius-ctl); }
.toast-ok { background: var(--ink); color: #fff; }
.toast-warn { border: 1px solid var(--ink); }
.empty-lock-note, .path-meta.paths-banner-warn { color: var(--ink); font-weight: 600; }

/* —— Pills: neutral —— */
.pill, .pill.binding-ltv { height: 20px; line-height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 500;
  background: var(--soft); color: var(--ink-2); letter-spacing: 0.02em; }
.pill.binding-dscr { background: var(--ink); color: #fff; }
.pill.est-pill { background: transparent; color: var(--muted); padding: 0; height: auto; line-height: inherit; font-size: 12px; letter-spacing: 0; }
.pill.review-pill { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); text-transform: none; }
.desk-structure { background: var(--soft); color: var(--ink); border-radius: var(--radius-ctl); padding: 4px 10px; display: inline-block; margin-bottom: 8px; }
.kv-working .v { color: var(--ink); }
.import-chip, .import-chip.done, .import-chip.pending { height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: transparent; color: var(--muted); }
.import-chip.pending { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.import-chip.fail { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.list-check-stamp { color: var(--ink); font-weight: 500; }
.docs-check li.ok .state { color: var(--ink); }
.doc-slot.ok .doc-mark, .docs-check li.ok .mark { background: var(--ink); }
.photo-upload, .doc-link { color: var(--ink-2); }
details.desk-details > summary::after, details.import-paste > summary { color: var(--ink-2); }
a.map-link { color: inherit; text-decoration: none; }
a.map-link:hover, a.map-link:focus-visible { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); }
.neg, .net-block .monthly-neg, .money-neg { color: inherit; }

/* —— Paths card: eyebrow · ARV 40/560 · one muted line · table · net 28/560 · three quiet stats —— */
.arv-hero { display: block; margin: 0 0 16px; }
.arv-hero .arv-hero-k { display: block; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; }
.arv-hero .arv-hero-k .pill { margin-left: 6px; vertical-align: 1px; }
#arv-hero-v, .desk-arv-v { display: block; font-size: 40px; line-height: 48px; font-weight: 560; letter-spacing: -0.025em; color: var(--ink); margin-top: 2px; }
#arv-hero-v #arv-pending { font-size: 28px; }
#arv-hero-sub, .desk-arv-hero .meta { display: block; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#arv-hero-sub[title] { cursor: help; }
.arv-hero + .quiet-line { margin: -10px 0 16px; }
#paths-single table, #inv-paths table, #desk-paths table, #paths-table { font-size: 13px; border-collapse: collapse; }
#paths-single th, #inv-paths th, #desk-paths th, #paths-table th { padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
#paths-single td, #inv-paths td, #desk-paths td, #paths-table td { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#paths-single tbody tr:last-child td, #paths-table tbody tr:last-child td { border-bottom: none; }
tr.path-75 td { background: var(--path-75); font-weight: 500; }
tr.path-75 td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
#paths-table td.cap-binding { font-weight: 600 !important; }
.net-block { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.net-block .kv.net-hero .k { font-size: 11px; }
.net-block .kv.net-hero .v { line-height: 36px; margin-top: 2px; }
.net-hero-v { font-size: 28px; line-height: 36px; font-weight: 560; letter-spacing: -0.02em; }
.net-hero-v.net-pos { color: var(--pos); }
.net-hero-v.net-neg { color: var(--neg); }
.net-hero-v.net-none { color: var(--ink); }
.net-block .target-rent { color: var(--muted); font-size: 13px; line-height: 20px; margin-top: 2px; font-weight: 400; }
.net-block .target-rent .target-x { color: var(--ink); font-weight: 500; }
.net-block .target-rent .pill { margin-left: 4px; }
.net-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.net-stats .kv .k { white-space: nowrap; }
.net-stats .kv .v, .net-stats .kv .v.small { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); margin-top: 2px; }
.net-stats .rehab-note { font-size: 12px; color: var(--muted); font-weight: 400; }
.net-sub, .net-block .net-sub { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-sub .pill { height: 18px; line-height: 18px; }
.net-eq { display: none; }

/* —— Tables (shared) —— */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom-color: var(--line); }
th { font-size: 11px; font-weight: 500; color: var(--muted); text-align: left; }

/* —— Comps card —— */
.comps-head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; justify-content: flex-start; }
.comps-head-row h2 { margin: 0 4px 0 0; order: 0; }
.comps-head-row .recommend-bar, .comps-head-row .rec-head { display: contents; }
.comps-head-row .rec-counts { order: 1; font-size: 13px; font-weight: 400; color: var(--muted); margin-right: auto; }
.comps-head-row:not(:has(.rec-counts)) h2, .comps-head-row:has(.recommend-bar[style*="none"]) h2 { margin-right: auto; }
.comps-head-row .import-chip { order: 2; }
.comps-head-row #import-btn { order: 3; }
.comps-head-row #review-rows-btn { order: 4; }
.comps-head-row .rec-toggle { order: 5; font-size: 13px; color: var(--ink-2); gap: 6px; margin: 0 2px 0 6px; }
.comps-head-row #rec-apply-btn { order: 6; }
.comps-head-row .rec-status { order: 7; }
.rec-counts { color: var(--muted); font-weight: 400; }
.rec-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.comps-status { margin: 0 0 10px; }
.rec-status { display: block; font-size: 13px; line-height: 20px; padding: 0; border-radius: 0; background: transparent; color: var(--ink-2);
  box-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-status.rec-status-warn, .rec-status.rec-status-blocked { color: var(--ink); font-weight: 600; }
.rec-head .rec-status { display: inline-block; }
.rec-banners { display: none; }
/* view filters (Show / radius) — quiet: one line, small chips, muted status text */
.comps-view { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0 0 8px; }
.comps-view .chip-row { margin: 0; gap: 4px; }
.comps-view .chip-label { margin-right: 4px; }
.chip { height: 26px; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: transparent; color: var(--muted); border: 1px solid transparent; }
.chip:hover { background: var(--hover); color: var(--ink); border-color: var(--line); }
.chip.active, .chip.active:hover { background: var(--soft); color: var(--ink); border-color: var(--line-strong); }
.radius-row .radius-banner, .show-row .show-banner { margin-left: 6px; font-size: 12px; color: var(--muted); background: transparent; border: 0; padding: 0; }
.radius-row .chip-unit { font-size: 12px; color: var(--muted); margin-left: 2px; }
/* the table: fixed 44px rows, one-line address, right-aligned tabular prices, no zebra, hover #fafaf8 */
#comps-wrap, .comps-scroll { overflow-x: auto; }
table.comps-table, #comps-table { table-layout: fixed; width: 100%; font-size: 13px; }
table.comps-table th, #comps-table th { height: 32px; padding: 0 8px; vertical-align: middle; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.comps-table td, #comps-table td { height: 44px; padding: 0 8px; vertical-align: middle; border-bottom: 1px solid var(--line); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--ink); background: var(--card); }
table.comps-table tbody tr:last-child td, #comps-table tbody tr:last-child td { border-bottom: none; }
table.comps-table tbody tr:hover td, #comps-table tbody tr:hover td { background: var(--hover); }
table.comps-table .th-keep, table.comps-table td.keep, #comps-table .th-keep, #comps-table td.keep { width: 56px; }
table.comps-table .th-date, #comps-table .th-date { width: 104px; }
table.comps-table .th-spec, #comps-table .th-spec { width: 52px; text-align: right; }
table.comps-table .th-spec:nth-child(6), #comps-table .th-spec:nth-child(6) { width: 72px; }
table.comps-table .th-spec:nth-child(7), #comps-table .th-spec:nth-child(7) { width: 68px; }
table.comps-table .th-price, #comps-table .th-price { width: 104px; text-align: right; }
table.comps-table .th-flag, #comps-table .th-flag { width: 232px; padding-left: 20px; }
table.comps-table td.td-rec, #comps-table td.td-rec { width: auto; padding-left: 20px; }
td.td-spec, td.td-price { text-align: right; font-variant-numeric: tabular-nums; }
td.td-price { font-weight: 500; color: var(--ink); }
td.td-date { color: var(--ink-2); }
.comp-addr { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-addr a.map-link { color: var(--ink); }
td.keep label { display: inline-flex; align-items: center; gap: 0; color: var(--ink); }
td.keep input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
/* no strikethrough anywhere: an unchecked row keeps full ink (the checkbox is the state) */
tr.unchecked td, tr.dim td, tr.excluded td, tr.row-nonsold-off td { opacity: 1; color: var(--ink); text-decoration: none; }
tr.row-nonsold-off .comp-addr, tr.row-nonsold-off .td-price, tr.excluded .comp-addr span, tr.excluded a.map-link,
.price-strike, .price-strike * { text-decoration: none !important; }
tr.radius-view-out > td:not(.keep) { opacity: 0.4; }
tr.radius-view-out > td.keep { box-shadow: inset 3px 0 0 var(--line-strong); }
/* Flag: a small pill — KEEP (neutral) · CAUTION (amber, the only amber) · OUT / DUMP (muted grey); tags beside it */
.rec-chip { display: inline-block; height: 20px; line-height: 18px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.03em; white-space: nowrap; cursor: help; vertical-align: middle; }
.rec-keep { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.rec-caution { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line); }
.rec-out, .rec-dump { background: var(--soft); color: var(--dim); border: 1px solid var(--line); }
.row-tag { display: inline-block; height: 20px; line-height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 999px; font-size: 11px; font-weight: 500;
  color: var(--muted); border: 1px solid var(--line); background: var(--card); vertical-align: middle; cursor: help; }
.row-tag.tag-override { color: var(--ink); border-color: var(--ink); font-weight: 600; letter-spacing: 0.03em; }
.row-tag.tag-review { color: var(--ink); font-weight: 600; letter-spacing: 0.03em; }
.td-rec .sitting-hint { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--muted); }
.td-rec .show-hint { margin-left: 6px; font-size: 11px; color: var(--muted); }
.rec-rule, .keep-override, .review-set-tag, .not-in-median { display: none; }
.ctype-date { color: var(--muted); }
.comps-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius-ctl); color: var(--muted); background: var(--card); }
.import-panel { border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--page); padding: 12px 14px; margin: 8px 0 12px; }
.import-review { border: 1px solid var(--line); border-left: 3px solid var(--ink); box-shadow: none; }
.import-review .ir-h, .import-review .ir-title { color: var(--ink); }
.import-review .ir-out .ir-title, .import-review .ir-out .ir-reason { color: var(--muted); }
.import-review .ir-in { background: var(--page); }

/* —— Photos / docs row —— */
.photo-frame { border-color: var(--line-strong); background: var(--page); border-radius: var(--radius-ctl); }
.photo-frame .ph-name { color: var(--muted); }
.photo-frame .ph-sub { color: var(--dim); }
.wk-row4 { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }

/* —— Desk —— */
.path-meta { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.dk-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deal-edit { gap: 12px 12px; }
.path-arv-row { border-top: 1px solid var(--line); padding-top: 14px; }
details.desk-details { padding: 0; }
details.desk-details > summary { padding: var(--pad); font-size: 14px; font-weight: 600; }
.close-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.close-row select.field, .close-row input.field { width: auto; }

/* —— Packet: one letter page, same type / colour / table —— */
.packet-page { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.packet-header .brand { font-family: var(--font-ui); font-size: 12pt; font-weight: 500; letter-spacing: -0.01em; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px; }
.packet-header .brand::before { content: ""; display: inline-block; width: 7px; height: 14px; border-radius: 2px; background: var(--teal); }
.packet-header .right { color: var(--ink); font-weight: 500; letter-spacing: 0; }
.packet-header #pk-file { font-feature-settings: "tnum" 0; font-variant-numeric: normal; }
.packet-page h2 { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; }
.packet-page .net-hero-v { font-size: 17pt; line-height: 1.2; font-weight: 560; }
.packet-page .net-stats { gap: 10px; margin-top: 8px; }
.packet-page .net-block { border-top: 0; margin-top: 10px; padding-top: 0; }
.packet-page .net-sub { font-size: 9pt; white-space: normal; }
.packet-page tr.path-75 td { font-weight: 500; }
.packet-page #pk-comps table.pk-comps-table { table-layout: fixed; }
.packet-page #pk-comps td { height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.packet-page #pk-comps .pk-addr-cell { width: 34%; }
.packet-page #pk-comps .rec-chip { height: 16px; line-height: 14px; font-size: 8pt; padding: 0 6px; }
.packet-page #pk-comps .row-tag { height: 16px; line-height: 14px; font-size: 8pt; padding: 0 5px; margin-left: 4px; }
@media print { .card, .packet-page { box-shadow: none; } }

/* —— List —— */
.list-table a { color: var(--ink); }
/* T135: settled import chip lives in the Show line; pending / override states stay in the header */
.comps-head-row .import-chip.done { display: none; }
/* T135: packet comps — letter width; fixed columns, address wraps (print has no hover) */
.packet-page #pk-comps table.pk-comps-table { font-size: 10px; }
.packet-page #pk-comps .pk-incl { width: 26px; }
.packet-page #pk-comps .pk-addr-cell { width: auto; }
.packet-page #pk-comps td.pk-addr-cell { white-space: normal; line-height: 1.3; }
.packet-page #pk-comps td.pk-addr-cell .comp-addr, .packet-page #pk-comps td.pk-addr-cell .comp-addr * { white-space: normal; overflow: visible; text-overflow: clip; max-width: none; display: inline; }
.packet-page #pk-comps th.th-date { width: 74px; }
.packet-page #pk-comps th.th-spec { width: 26px; }
.packet-page #pk-comps th.th-spec:nth-child(6) { width: 38px; }
.packet-page #pk-comps th.th-spec:nth-child(7) { width: 42px; }
.packet-page #pk-comps th.th-lot { width: 56px; }
.packet-page #pk-comps th.th-price { width: 70px; }
.packet-page #pk-comps th.th-flag { width: 136px; }
.packet-page #pk-comps .rec-chip { font-size: 7pt; padding: 0 5px; }
/* T135: the Desk path card carries seven actions — tighter side padding keeps them on one line */
.actions:has(#counter-btn) { gap: 6px; }
.actions:has(#counter-btn) > button, .actions:has(#counter-btn) > .btn, .actions:has(#counter-btn) .live-stack > button { padding-left: 10px; padding-right: 10px; }
/* T135c: one filter row — the rows count + rule radius said once (#view-note); the PITIA line wraps, never an
   ellipsis; a CAUTION / unchecked row shows its short reason on the row (muted, under the address, wraps, never cut) */
.comps-view .view-note { font-size: 12px; line-height: 26px; color: var(--muted); font-variant-numeric: tabular-nums; }
.comps-view .view-note:empty { display: none; }
.net-sub, .net-block .net-sub, .packet-page .net-sub { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
td.td-addr .comp-addr { line-height: 18px; }
td.td-addr .row-reason { display: block; font-size: 12px; line-height: 16px; margin: 1px 0 0; color: var(--muted);
  white-space: normal; overflow: visible; text-overflow: clip; cursor: help; }
table.comps-table td.td-addr:has(.row-reason), #comps-table td.td-addr:has(.row-reason) { padding-top: 5px; padding-bottom: 5px; }

/* TASK 136 (T136): List — tight two-line rows, "older copy", Saved chip, row actions */
.status-chip.saved { background: var(--ltv-bg); color: var(--ink); }
.list-rows td { height: auto; padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
.list-rows .lr-l1 { font-size: 14px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.list-rows .lr-client { font-weight: 600; }
.list-rows .lr-client.no-client { font-weight: 500; color: var(--muted); }
.list-rows .lr-dot { color: var(--muted); margin: 0 6px; }
.list-rows .lr-l2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; line-height: 16px; color: var(--muted); }
.list-rows .lr-l2 .status-chip { height: 18px; line-height: 18px; padding: 0 7px; font-size: 11px; }
.list-rows .lr-fid { color: var(--teal); font-weight: 500; font-variant-numeric: tabular-nums; }
.list-rows .older-copy { font-size: 11px; line-height: 16px; padding: 0 6px; border: 1px solid var(--line, #d9dde3); border-radius: 999px; color: var(--muted); }
.list-rows .close-reason { margin-top: 0; }
.list-rows tr.older .lr-l1 { color: var(--muted); }
.list-rows td.lr-arv, .list-rows td.lr-net { width: 110px; white-space: nowrap; }
.list-rows td.lr-net .list-net { font-size: 14px; margin-top: 0; }
.list-rows td.lr-act, .list-rows th.th-act { width: 190px; text-align: right; white-space: nowrap; }
.list-rows .list-act { height: 28px; padding: 0 10px; font-size: 12px; margin-left: 6px; }
.list-msg { margin: 0 0 8px; }
.side-switch { margin-left: auto; margin-right: 12px; }
.side-switch .chip { text-decoration: none; }
/* T136: the List's delete confirm — only the panel's Delete button is red (row Delete buttons unchanged) */
#delete-confirm #send-confirm-ok { background: var(--neg); border-color: var(--neg); color: #fff; }
#delete-confirm #send-confirm-ok:hover { background: #912018; border-color: #912018; }
/* T137: Trash row — when it was trashed */
.list-rows .lr-trashed { color: var(--ink); }

/* TASK 139 (T139): cash-out disclaimer under the number · closing costs (Desk input, Workup/packet read-only) */
.net-stats .cash-note { font-size: 12px; line-height: 16px; margin-top: 2px; color: var(--muted); font-weight: 400; white-space: normal; }
.net-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.net-stats .closing-kv .v .meta { font-weight: 400; }
.closing-line { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; }

/* TASK 142 (T142): Workup Run is the only intake button; "Address required." sits beside it, and the Run confirm wraps a long address. */
.intake-card .run-cell { align-items: center; }
.run-msg { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.run-msg:empty { display: none; }
.intake-field input.field-bad, #address-input.field-bad { border-color: var(--ink); }
#run-confirm .confirm-text { overflow-wrap: anywhere; }

/* TASK 145 (T145): the 75 / 70 / 65 rows pick the working LTV (Workup, Desk, packet). Selected row keeps the path-75 highlight. */
tr.ltv-pick { cursor: pointer; }
tr.ltv-pick:not(.path-75):hover td { background: var(--soft); }
tr.ltv-pick:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
tr.ltv-locked, tr.ltv-locked:hover { cursor: default; }
.ltv-note { margin: 6px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); }
@media print { .ltv-note { display: none !important; } tr.ltv-pick { cursor: default; } }
