/* ═══════════════════════════════════════════════════════
   REPORT.CSS — Property detail page
   All app component styles + report-specific layout
═══════════════════════════════════════════════════════ */

/* ── Report Nav ─────────────────────────────────────── */
.report-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg-1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.report-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2.25rem;
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.report-nav-back {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-2); text-decoration: none; transition: color 0.15s;
}
.report-nav-back:hover { color: var(--text); }
.report-nav-logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-serif); font-size: 15px; color: var(--text);
}
.report-nav-logo .nav-icon { height: 24px; width: auto; flex-shrink: 0; }
.report-nav-logo b { color: var(--brown-2); font-weight: 400; }
.report-nav-actions { display: flex; align-items: center; gap: 8px; }
.report-action-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; font-family: var(--font-sans);
  color: var(--text-2); background: none; border: 1px solid var(--border-2);
  border-radius: 5px; padding: 5px 12px; cursor: pointer; transition: all 0.15s;
}
.report-action-btn:hover { color: var(--text); background: var(--bg-3); }
#pdf-btn {
  color: var(--brown-2); border-color: var(--brown-border); background: var(--brown-dim);
}
#pdf-btn:hover { background: rgba(200,120,58,0.18); border-color: var(--brown-2); color: var(--brown-2); }

/* ── Payment success banner ─────────────────────────── */
#payment-success-banner {
  background: rgba(74,158,104,0.12); border-bottom: 1px solid rgba(74,158,104,0.25);
  animation: banner-slide-in 0.35s ease;
}
#payment-success-banner[hidden] { display: none; }
@keyframes banner-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.payment-success-inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 2.25rem;
  display: flex; align-items: center; gap: 10px;
}
.payment-success-icon { color: #4a9e68; flex-shrink: 0; }
.payment-success-text { font-size: 13px; color: var(--text); flex: 1; line-height: 1.5; }
.payment-success-text strong { color: #4a9e68; font-weight: 600; }
.payment-success-dismiss {
  background: none; border: none; cursor: pointer; color: var(--text-3);
  padding: 4px; flex-shrink: 0; transition: color 0.15s; line-height: 0;
}
.payment-success-dismiss:hover { color: var(--text-2); }

/* ── Loading ─────────────────────────────────────────── */
.report-loading {
  min-height: calc(100vh - 52px);
  display: flex; align-items: center; justify-content: center;
}
.report-loading-inner {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  max-width: 360px; width: 100%; padding: 2rem;
}
.report-loading-logo { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 0%,100%{opacity:0.5} 50%{opacity:1} }
.report-loading-address {
  font-family: var(--font-serif); font-size: 20px; color: var(--text);
  text-align: center; letter-spacing: -0.3px;
}
.report-loading-steps { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.loading-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2); opacity: 0.3; transition: opacity 0.3s;
}
.loading-step.active { opacity: 1; color: var(--text); }
.loading-step.done { opacity: 0.6; }
.step-icon {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-2); border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 10px;
}
.step-icon.spinning { border-top-color: var(--brown); animation: spin 0.7s linear infinite; }
.step-icon.done-icon { background: rgba(74,158,104,0.15); border-color: var(--green); color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ───────────────────────────────────────────── */
.report-error {
  min-height: calc(100vh - 52px);
  display: flex; align-items: center; justify-content: center;
}
.report-error-inner { text-align: center; padding: 3rem 2rem; max-width: 400px; }
.report-error-icon { font-size: 32px; margin-bottom: 1rem; }
.report-error-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.report-error-msg { font-size: 14px; color: var(--text-2); }

/* ── Demo Banner ─────────────────────────────────────── */
.report-demo-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border-bottom: 1px solid var(--brown-border);
  padding: 9px 2.25rem; font-size: 12px; color: var(--text-2);
}
.demo-banner-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brown);
  flex-shrink: 0; animation: breathe 2s ease-in-out infinite;
}
.report-demo-banner strong { color: var(--text); font-weight: 500; }

/* ── Report Hero ─────────────────────────────────────── */
.report-hero { background: var(--bg-1); border-bottom: 1px solid var(--border); }
.report-hero-inner { max-width: 1200px; margin: 0 auto; padding: 1.75rem 2.25rem 1.5rem; }
.report-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3); margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}
.report-breadcrumb-link { color: var(--text-2); text-decoration: none; transition: color 0.15s; }
.report-breadcrumb-link:hover { color: var(--text); }
.report-breadcrumb-sep { color: var(--text-3); }
.report-header-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 2rem; margin-bottom: 1.5rem;
}
.report-header-left { flex: 1; min-width: 0; }
.report-address {
  font-family: var(--font-serif); font-size: clamp(22px,3vw,32px);
  color: var(--text); letter-spacing: -0.5px; line-height: 1.1; margin-bottom: 4px;
}
.report-sub { font-size: 12px; color: var(--text-3); margin-bottom: 8px; font-family: var(--font-mono); }
.report-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.prop-meta-chip {
  font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 4px;
  background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border);
}
/* ── Header StreetEasy link (above address) ─────────── */
.prop-listing-row { display: flex; align-items: center; margin-bottom: 6px; }
.prop-se-link {
  font-size: 11px; font-weight: 600; color: var(--brown-2);
  text-decoration: none; letter-spacing: 0.2px;
}
.prop-se-link:hover { text-decoration: underline; }

/* ── Comp apply-all button ─────────────────────────── */
.comp-apply-all-btn {
  display: block; width: 100%; margin-bottom: 2px;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 14px;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  cursor: pointer; text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.comp-apply-all-btn:hover {
  background: var(--brown); border-color: var(--brown); color: #fff;
}

.report-score-block { text-align: right; flex-shrink: 0; min-width: 120px; }
.report-score-num {
  font-family: var(--font-serif); font-size: 56px; line-height: 1;
  letter-spacing: -2px; color: var(--brown-2);
}
.report-score-label { font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.report-score-bar { height: 3px; background: var(--bg-3); border-radius: 2px; margin: 8px 0 5px; overflow: hidden; }
.report-score-fill { height: 100%; background: var(--brown); border-radius: 2px; width: 0%; transition: width 1s cubic-bezier(0.4,0,0.2,1); }
.report-score-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 3px; }
/* ── Sticky KPI + Tabs — separate stickies, -1px overlap prevents gaps ── */
.report-sub-sticky { /* plain wrapper, not sticky */ }
.report-kpi-wrapper {
  position: sticky; top: 52px; z-index: 151;
  background: var(--bg-1); border-bottom: 1px solid var(--border);
}
.report-kpi-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2.25rem;
}
.report-kpi-strip {
  display: grid; grid-template-columns: repeat(5,1fr); gap: 1px;
  background: var(--border); overflow: hidden;
}
.kpi-cell { background: var(--bg-1); padding: 12px 16px; }
.kpi-cell--clickable { cursor: pointer; transition: background 0.15s; }
.kpi-cell--clickable:hover { background: var(--bg-2); }
/* Editable price cell */
.kpi-cell--editable { cursor: text; transition: background 0.15s; }
.kpi-cell--editable:hover { background: var(--bg-2); }
.kpi-price-input {
  background: transparent; border: none; outline: none;
  font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.1;
  width: 100%; padding: 0; margin: 0; font-family: inherit; cursor: text;
  border-bottom: 1px solid transparent; transition: border-color 0.15s;
}
.kpi-cell--editable:hover .kpi-price-input { border-bottom-color: var(--border-2); }
.kpi-price-input:focus { border-bottom-color: var(--brown); outline: none; }
.kpi-label { font-size: 9px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.kpi-value { font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.1; }
.kpi-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ── Tabs ────────────────────────────────────────────── */
.report-tabs-bar {
  position: sticky; top: 120px; /* fallback — overridden by updateStickyOffsets() */ z-index: 150;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.report-tabs-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2.25rem; display: flex; gap: 0;
}
.pd-tab {
  font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--text-3);
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 12px 16px; cursor: pointer; transition: color 0.15s,border-color 0.15s;
  white-space: nowrap; margin-bottom: -1px;
}
.pd-tab:hover { color: var(--text-2); }
.pd-tab.active { color: var(--text); border-bottom-color: var(--brown); font-weight: 500; }
.tab-beta {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--brown-2); background: var(--brown-dim); border: 1px solid var(--brown-border);
  border-radius: 4px; padding: 1px 4px; margin-left: 4px; vertical-align: middle;
  font-family: var(--font-sans); line-height: 1.4;
}
.viol-badge {
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; margin-left: 4px; vertical-align: middle;
}
.pd-panel { display: none; }
.pd-panel.active { display: block; }

/* ── Content Layout ──────────────────────────────────── */
.report-content { max-width: 1200px; margin: 0 auto; padding: 2rem 2.25rem 5rem; }
.report-two-col { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.report-main-col { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.report-side-col { position: sticky; top: 180px; display: flex; flex-direction: column; gap: 1rem; } /* updated by updateStickyOffsets() */
.report-section-label { font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-3); }
.report-section-header { display: flex; align-items: center; justify-content: space-between; }
.report-section-block { display: flex; flex-direction: column; gap: 8px; }
.report-link { font-size: 12px; color: var(--brown-2); text-decoration: none; font-weight: 500; }
.report-link:hover { text-decoration: underline; }
.report-flags { display: flex; flex-direction: column; gap: 6px; }
.report-data-note { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.dsrc-badge { display: inline-block; background: var(--bg-3); color: var(--text-2); font-size: 9px; font-weight: 600; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 3px; margin-right: 4px; }

/* ── Metric Grid ─────────────────────────────────────── */
.report-metric-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.metric-cell { background: var(--bg-2); padding: 12px 14px; }
.metric-cell .metric-label { font-size: 9px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.metric-cell .metric-val { font-size: 20px; font-weight: 500; color: var(--text); line-height: 1.2; }
.metric-cell .metric-sub { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ── Flags ───────────────────────────────────────────── */
.flag { display: flex; gap: 10px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; background: var(--bg-2); align-items: flex-start; }
.flag.red { background: rgba(224,82,82,0.06); border-color: rgba(224,82,82,0.2); }
.flag.amber { background: rgba(212,140,42,0.06); border-color: rgba(212,140,42,0.2); }
.flag.green { background: rgba(74,158,104,0.06); border-color: rgba(74,158,104,0.2); }
.flag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.flag.red .flag-dot { background: var(--red); }
.flag.amber .flag-dot { background: var(--amber); }
.flag.green .flag-dot { background: var(--green); }
.flag-title { font-weight: 600; display: block; margin-bottom: 2px; color: var(--text); }
.viol-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.viol-status-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 1px; }
.viol-status-red   { background: rgba(224,82,82,0.12);   color: #e05252; border: 1px solid rgba(224,82,82,0.25); }
.viol-status-amber { background: rgba(212,140,42,0.12);  color: #d48c2a; border: 1px solid rgba(212,140,42,0.25); }
.viol-status-green { background: rgba(74,158,104,0.12);  color: #4a9e68; border: 1px solid rgba(74,158,104,0.25); }
.flag.red .flag-title { color: #e05252; }
.flag.amber .flag-title { color: #d48c2a; }
.flag.green .flag-title { color: #4a9e68; }
.flag-desc { color: var(--text-2); font-size: 12px; }

/* ── Detail Card ─────────────────────────────────────── */
.report-detail-card { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 14px 16px; }
.report-detail-card-title { font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.prop-detail-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.prop-detail-row:last-child { border-bottom: none; }
.pdr-key { color: var(--text-3); }
.pdr-val { color: var(--text); font-weight: 500; text-align: right; }
.useful-link { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--border); transition: color 0.15s; }
.useful-link:last-child { border-bottom: none; }
.useful-link:hover { color: var(--brown-2); }

/* ── Violations ──────────────────────────────────────── */
.report-viol-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.report-viol-filters { display: flex; gap: 6px; }
.viol-filter-btn { font-size: 11px; font-weight: 500; font-family: var(--font-sans); padding: 4px 12px; border-radius: 4px; border: 1px solid var(--border-2); background: none; color: var(--text-2); cursor: pointer; transition: all 0.15s; }
.viol-filter-btn.active { background: var(--brown); color: #fff; border-color: var(--brown); }
.viol-filter-btn:hover:not(.active) { background: var(--bg-3); }
.report-viol-table-head { display: grid; grid-template-columns: 64px 1fr 80px 80px; gap: 0; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-3); margin-top: 12px; }
#violation-flags { display: flex; flex-direction: column; gap: 16px; }
.viol-table-row { display: grid; grid-template-columns: 64px 1fr 80px 80px; gap: 0; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-2); background: var(--bg-1); transition: background 0.1s; }
.viol-table-row:hover { background: var(--bg-2); }
.viol-table-row:last-child { border-bottom: none; }
.viol-table-row.open-row { background: var(--bg); }
.viol-class-c { color: var(--red); font-weight: 700; font-size: 10px; font-family: var(--font-mono); }
.viol-class-b { color: var(--amber); font-weight: 700; font-size: 10px; font-family: var(--font-mono); }
.viol-class-a { color: var(--green); font-weight: 700; font-size: 10px; font-family: var(--font-mono); }
.viol-status-open { color: var(--red); font-size: 10px; font-weight: 700; text-align: right; font-family: var(--font-mono); }
.viol-status-closed { color: var(--green); font-size: 10px; font-weight: 600; text-align: right; font-family: var(--font-mono); }
.viol-desc-text { line-height: 1.4; }
.viol-apt { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; }
.viol-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 5px 0; }
.viol-summary-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-right: 8px; }

/* ── ROI Model Table ─────────────────────────────────── */

/* Outer table container — topbar sits above as a sibling, provides top border/radius */
.roi-model-table { border: 1px solid var(--border-2); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; margin-bottom: 0; }

/* Top bar: year tabs + export CTA — sticky below the tabs bar */
.roi-table-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--bg-1); border: 1px solid var(--border-2); border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; flex-wrap: wrap; position: sticky; top: 94px; z-index: 140; }
.roi-table-topbar .roi-export-btn { padding: 5px 14px; font-size: 12px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; line-height: 1.4; }

/* Year tabs — stretch to fill available space for visual balance */
.roi-year-tabs { display: flex; gap: 4px; flex: 1; }
.roi-year-tab { flex: 1; min-width: 36px; padding: 5px 4px; border: 1px solid var(--border-2); border-radius: 20px; background: none; color: var(--text-2); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: var(--font-sans); text-align: center; }
.roi-year-tab:hover { border-color: var(--brown-border); color: var(--text); }
.roi-year-tab.active { background: var(--brown); border-color: var(--brown); color: #fff; font-weight: 600; }

/* Table header: hidden on all displays — address line adds no value */
.roi-table-hdr { display: none; }
.roi-table-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.roi-table-subtitle { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.roi-customize-btn { background: none; border: 1px solid var(--border-2); border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600; color: var(--brown-2); cursor: pointer; white-space: nowrap; font-family: var(--font-sans); transition: all 0.15s; flex-shrink: 0; }
.roi-customize-btn:hover { background: var(--bg-2); border-color: var(--brown-border); }

/* Section headers — flex to allow right-aligned column labels */
.roi-section-hdr { display: flex; justify-content: space-between; align-items: center; background: var(--bg-3); color: var(--brown-2); font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 7px 14px; border-bottom: 1px solid var(--border); }
.roi-col-labels { font-size: 9px; color: var(--text-2); font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }

/* Data rows */
.roi-model-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13px; background: var(--bg-1); }
.rmi-label { color: var(--text); flex: 1; padding-right: 12px; }
.rmi-val { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rmi-val.pos { color: var(--green); }
.rmi-val.neg { color: var(--red); }
.rmi-note { font-size: 10px; font-weight: 400; color: var(--text-2); margin-left: 5px; }
.rmi-cur  { color: var(--text-2); font-size: 11px; margin-right: 1px; }

/* Monthly equivalent — inline on same line as annual */
.rmi-mo-equiv { display: inline; font-size: 11px; color: var(--text-2); font-weight: 400; }
/* Pipe separator — always dim, never inherits bright text color */
.rmi-sep { color: var(--text-2); padding: 0 4px; font-weight: 400; }

/* Inline editable inputs */
.rmi-input-wrap { display: flex; align-items: center; gap: 3px; justify-content: flex-end; flex-wrap: wrap; }
.rmi-unit { font-size: 11px; color: var(--text-2); } /* --text-2 is now AAA */
.rmi-tab-link {
  color: var(--brown-2); font-size: 11px; vertical-align: middle; padding-left: 4px;
}
.rmi-clickable {
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.rmi-clickable:hover { background: var(--brown-dim); }
.rmi-clickable:hover .rmi-label,
.rmi-clickable:hover .rmi-val,
.rmi-clickable:hover .rmi-tab-link { color: var(--brown-2); }
.rmi-clickable:focus-visible { outline: 2px solid var(--brown-2); outline-offset: -2px; border-radius: 2px; }
.roi-edit-input { border: 1px solid var(--border-2); border-radius: 4px; background: var(--bg-2); color: var(--text); font-size: 12px; font-family: var(--font-sans); text-align: right; padding: 2px 6px; transition: border-color 0.15s; -moz-appearance: textfield; }
.roi-edit-input::-webkit-outer-spin-button,
.roi-edit-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.roi-edit-input:hover { border-color: var(--brown-border); background: var(--bg-3); }
.roi-edit-input:focus { outline: none; border-color: var(--brown-border); background: var(--bg-3); box-shadow: 0 0 0 2px rgba(138,93,47,0.1); }
.roi-edit-pct   { width: 44px; }
.roi-edit-price { width: 64px; }
/* Vacancy % input sits inside the label span */
#roi-vacancy-pct { width: 36px; padding: 1px 4px; font-size: 12px; vertical-align: baseline; }
/* Loan term select */
.roi-edit-select { border: 1px solid var(--border-2); border-radius: 4px; background: var(--bg-2); color: var(--text); font-size: 12px; font-family: var(--font-sans); padding: 2px 4px; cursor: pointer; transition: border-color 0.15s; }
.roi-edit-select:hover { border-color: var(--brown-border); background: var(--bg-3); }
.roi-edit-select:focus { outline: none; border-color: var(--brown-border); }

/* Row modifiers — two text colors only: --text (primary) and --text-2 (dim, AAA) */
.rmi-bold .rmi-label { color: var(--text); font-weight: 600; }
.rmi-bold .rmi-val   { font-weight: 700; }
.rmi-dim  .rmi-label,
.rmi-dim  .rmi-val   { color: var(--text-2); }
/* Summary rows: one per section, subtle bg, bold */
.rmi-total        { background: var(--bg-2); border-top: 1px solid var(--border-2); }
.rmi-total .rmi-label { color: var(--text); font-weight: 600; }
.rmi-total .rmi-val   { font-weight: 700; }

/* Inline comp row inside Rental Income */
.roi-comp-inline { align-items: center; background: var(--bg-2); padding-top: 9px; padding-bottom: 9px; }
.rmi-comp-label { color: var(--text-2) !important; font-size: 11px !important; letter-spacing: 0.4px; text-transform: uppercase; flex-shrink: 0; }
.rci-chips-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rci-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 6px; text-decoration: none; color: inherit; font-size: 12px; background: var(--bg-3); transition: border-color 0.15s; }
.rci-chip:hover { border-color: var(--brown-border); }
.rci-br { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-2); }
.rci-price { font-weight: 600; color: var(--text); }
.rci-trend { font-size: 10px; font-weight: 600; color: var(--brown-2); }
/* Apply all — styled as a text link, not a button */
.rci-apply-link { background: none; border: none; color: var(--brown-2); font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-sans); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; white-space: nowrap; }
.rci-apply-link:hover { color: var(--brown); text-decoration-style: solid; }

/* Footer — assumptions footnote */
.roi-model-footer { font-size: 11px; color: var(--text-3); padding: 10px 14px; background: var(--bg-2); border-top: 1px solid var(--border); line-height: 1.6; }

/* Legacy card styles (kept for modal/other uses) */
.report-roi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roi-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.roi-card.featured { border-color: var(--brown-border); }
.roi-card-title { font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-3); margin-bottom: 1rem; }
.roi-card.featured .roi-card-title { color: var(--brown-2); }
.roi-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.roi-row:last-child { border-bottom: none; }
.roi-label { color: var(--text-2); }
.roi-val { font-weight: 500; color: var(--text); }
.roi-val.neg { color: var(--red); }
.roi-val.pos { color: var(--green); }
.roi-val.gold { color: var(--brown-2); }
.proj-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.proj-row:last-child { border-bottom: none; }
.proj-yr { color: var(--text-3); width: 44px; flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; }
.proj-bar-wrap { flex: 1; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.proj-bar-fill { height: 100%; background: var(--brown); border-radius: 2px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }
.proj-val { font-weight: 500; color: var(--text); width: 70px; text-align: right; font-size: 13px; }
.proj-cf { width: 90px; text-align: right; font-size: 12px; flex-shrink: 0; font-family: var(--font-mono); }
/* Legacy rule removed — inputs now use .edit-input class */

/* ── Renovation ──────────────────────────────────────── */
.report-reno-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-reno-card { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; }
.report-reno-card.featured { border-color: var(--brown-border); }
.report-reno-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-3); }
.report-reno-title { font-size: 13px; font-weight: 600; color: var(--text); }
.report-reno-timeline { font-size: 10px; font-weight: 600; background: var(--brown-dim); color: var(--brown-2); border-radius: 3px; padding: 2px 7px; }
.reno-line { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.reno-line-label { color: var(--text-2); }
.reno-line:last-of-type { border-bottom: none; }
/* Shared editable input — invisible until hover */
.edit-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text);
  text-align: right;
  width: 72px;
  transition: background 0.15s, border-color 0.15s;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  box-shadow: none;
}
.edit-input:hover { background: var(--bg-3); border-color: var(--border); }
.edit-input:focus  { outline: none; background: var(--bg-3); border-color: var(--brown-border); }
.edit-input::-webkit-outer-spin-button,
.edit-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.reno-input {
  width: 90px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text);
  text-align: right;
  transition: background 0.15s, border-color 0.15s;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  box-shadow: none;
}
.reno-input:hover { background: var(--bg-3); border-color: var(--border); }
.reno-input:focus  { outline: none; background: var(--bg-3); border-color: var(--brown-border); }
.reno-input::-webkit-outer-spin-button,
.reno-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.report-reno-total { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--bg-3); border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--text); }
.report-reno-total span:last-child { color: var(--brown-2); }

/* ── Expense Table ───────────────────────────────────── */
.expense-table { display: flex; flex-direction: column; }
.expense-row { display: grid; grid-template-columns: 1fr 100px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.expense-row:last-child { border-bottom: none; }
.expense-header .expense-val { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-3); text-align: right; }
.expense-label { color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; gap: 1px; }
.expense-note { font-size: 10px; color: var(--text-3); }
.expense-val { text-align: right; font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.expense-total { border-top: 1.5px solid var(--border); border-bottom: none; padding-top: 10px; margin-top: 2px; }
.expense-total .expense-label { color: var(--text); font-weight: 600; }
.expense-total .expense-val { font-weight: 600; }
.expense-debt .expense-label, .expense-debt .expense-val { font-size: 12px; color: var(--text-3); }

/* ── Rent Comps ──────────────────────────────────────── */
.comp-median-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.comp-median-chip { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.comp-median-chip-label { font-size: 9px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.comp-median-chip-val { font-size: 18px; font-weight: 500; color: var(--text); }
.comp-median-chip-sub { font-size: 10px; color: var(--brown-2); margin-top: 2px; }
.comp-loading { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.comp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brown); animation: spin 0.7s linear infinite; }
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.comp-card { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; text-decoration: none; display: block; color: inherit; transition: border-color 0.15s; }
.comp-card:hover { border-color: var(--brown-border); }
.comp-card-price { font-size: 20px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.comp-card-specs { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.comp-card-addr { font-size: 11px; color: var(--text-3); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-card-tag { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 3px; background: var(--bg-3); color: var(--text-2); margin-right: 4px; }
.comp-see-more { display: block; text-align: center; font-size: 12px; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 10px; border: 1px solid var(--border-2); border-radius: 8px; margin-top: 8px; transition: background 0.15s; }
.comp-see-more:hover { background: var(--bg-3); }
/* Apply-to-model button on comp cards in Financials tab */
.comp-card--roi { position: relative; }
.comp-card-apply-btn {
  display: none; position: absolute; bottom: 10px; right: 10px;
  font-size: 10px; font-weight: 600; font-family: var(--font-sans);
  background: var(--brown); color: #fff; border: none; border-radius: 4px;
  padding: 3px 8px; cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.comp-card--roi:hover .comp-card-apply-btn { display: block; }
.comp-card-apply-btn:hover { background: var(--brown-2); }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; padding: 8px 18px; border-radius: 7px; cursor: pointer; text-decoration: none; transition: all 0.15s; white-space: nowrap; line-height: 1.4; }
.btn-primary { background: var(--brown); color: #fff; border: 1px solid transparent; font-weight: 600; }
.btn-primary:hover { background: var(--brown-2); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  /* On mobile, KPI scrolls away — only tabs stay sticky */
  .report-kpi-wrapper { position: static; border-bottom: none; }
  .report-tabs-bar { position: sticky; top: 52px; z-index: 150; }
  .report-two-col { grid-template-columns: 1fr; }
  .report-side-col { position: static; }
  .report-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-cell--clickable:hover { background: var(--bg-1); }
  .report-roi-grid { grid-template-columns: 1fr; }
  .report-reno-grid { grid-template-columns: 1fr; }
  .report-metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .report-hero-inner, .report-content, .report-kpi-inner { padding-left: 1rem; padding-right: 1rem; }
  .report-header-row { flex-direction: column; gap: 1rem; }
  .report-score-block { text-align: left; }
  .report-nav-inner { padding: 0 1rem; justify-content: space-between; gap: 0.5rem; }
  .nav-back-text { display: none; }
  .report-nav-logo { flex: 1; }

  /* Horizontally-scrollable tab bar */
  .report-tabs-bar {
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .report-tabs-bar::-webkit-scrollbar { display: none; }
  .report-tabs-inner {
    max-width: none; margin: 0; width: max-content; min-width: 100%; padding: 0 1rem;
  }
  .report-kpi-strip { grid-template-columns: 1fr 1fr; }
  .expense-calc-modal { margin: 0.5rem; }
  .report-viol-table-head, .viol-table-row { grid-template-columns: 56px 1fr 70px; }
  .report-viol-table-head > div:last-child, .viol-table-row > div:last-child { display: none; }
  .expense-row { grid-template-columns: 1fr 90px; font-size: 12px; }
  .roi-model-row { font-size: 12px; padding: 7px 12px; }
  .roi-section-hdr { padding: 6px 12px; }
  .roi-model-footer { padding: 8px 12px; }
  .roi-table-topbar { flex-wrap: wrap; gap: 16px; }
  .roi-year-tabs { flex: 1; min-width: 200px; }
  .roi-export-btn { flex: 1; justify-content: center; }
  .roi-table-topbar { gap: 16px; }
  .comp-grid { grid-template-columns: 1fr; }
}

/* ── Expense Table ───────────────────────────────────── */
.expense-table { display: flex; flex-direction: column; }
.expense-row {
  display: grid; grid-template-columns: 1fr 120px;
  align-items: baseline; padding: 7px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.expense-row:last-child { border-bottom: none; }
.expense-header { padding-bottom: 6px; }
.expense-header .expense-val { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-3); text-align: right; }
.expense-label { color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.expense-note { font-size: 11px; color: var(--text-3); font-weight: 400; }
.expense-val { text-align: right; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.expense-total { margin-top: 2px; }
.expense-total .expense-label { font-weight: 600; color: var(--text); }
.expense-total .expense-val { font-weight: 700; color: var(--text); }
.expense-debt .expense-label, .expense-debt .expense-val { color: var(--text-3); font-size: 12px; }

/* ── Monthly Cost Calculator Modal ───────────────────── */
#expense-calc-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
#expense-calc-overlay.open { display: flex; }
.expense-calc-modal {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
  width: 100%; max-width: 400px; overflow: hidden; margin: 1rem;
}
.ecm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.ecm-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ecm-close {
  background: none; border: none; color: var(--text-3); font-size: 22px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.ecm-close:hover { color: var(--text); }
.ecm-body { padding: 14px 20px; }
.ecm-field { margin-bottom: 12px; }
.ecm-label {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 5px;
}
.ecm-input, .ecm-select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 14px; color: var(--text);
  box-sizing: border-box; font-family: var(--font-sans);
}
.ecm-input:focus, .ecm-select:focus { outline: none; border-color: var(--brown); }
.ecm-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.ecm-down-row { display: flex; gap: 8px; }
.ecm-input--grow { flex: 1; }
.ecm-input--pct { width: 72px; flex-shrink: 0; }
.ecm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ecm-two-col .ecm-field { margin-bottom: 0; }
.ecm-divider { height: 1px; background: var(--border); margin: 12px 0; }
.ecm-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--border);
}
.ecm-row:last-of-type { border-bottom: none; }
.ecm-row-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.3px; color: var(--text-2);
}
.ecm-row-label small {
  display: block; font-size: 10px; text-transform: none;
  font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-top: 1px;
}
.ecm-row-val { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ecm-val-input {
  width: 58px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; text-align: right; flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
  font-family: var(--font-sans); box-sizing: border-box;
}
.ecm-val-input:focus { outline: none; border-color: var(--brown); }
.ecm-note { font-size: 10px; color: var(--text-3); line-height: 1.5; margin-top: 10px; }
.ecm-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--border);
  background: var(--bg-2); border-radius: 0 0 12px 12px;
}
.ecm-footer-label { font-size: 13px; font-weight: 700; color: var(--text); }
.ecm-footer-val { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ecm-accordion-wrap {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-top: 8px;
}
.ecm-accordion-toggle {
  display: block; width: 100%; background: none; border: none;
  padding: 10px 0; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: color 0.15s;
}
.ecm-accordion-toggle:hover { color: var(--text); }
.ecm-accordion-toggle.active { color: var(--text-2); position: relative; }
.ecm-accordion-toggle.active::before {
  content: '';
  position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #2a2a2a;
  opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 11;
}
.ecm-accordion-toggle.active::after {
  content: 'Remove Operating Expenses from estimated monthly cost';
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: #2a2a2a; color: #fff; border: 1px solid rgba(255,255,255,0.1);
  font-size: 11px; font-weight: 400; white-space: nowrap;
  padding: 6px 11px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 10;
}
.ecm-accordion-toggle.active:hover::before,
.ecm-accordion-toggle.active:hover::after { opacity: 1; }
#ecm-advanced-panel { border-top: 1px solid var(--border); padding: 0 0 4px; }

/* ── Renovation Empty States ─────────────────────────── */
.report-reno-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.reno-empty-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 28px 24px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
}
.reno-empty-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--brown-2); background: var(--brown-dim); border: 1px solid var(--brown-border);
  border-radius: 4px; padding: 3px 8px;
}
.reno-empty-icon { color: var(--text-3); margin: 4px 0; }
.reno-empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.reno-empty-desc { font-size: 12px; color: var(--text-3); line-height: 1.6; max-width: 260px; }
.reno-empty-btn {
  margin-top: 4px; padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-3);
  cursor: not-allowed; opacity: 0.6; letter-spacing: 0.2px;
}
@media (max-width: 600px) {
  .report-reno-grid { grid-template-columns: 1fr; }
}

/* ── Closing Cost Estimator ─────────────────────────────────────── */
.closing-header {
  margin-bottom: 1.5rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.closing-total-block { text-align: left; }
.closing-total-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 6px;
}
.closing-total-amount {
  font-family: var(--font-serif); font-size: 40px; color: var(--text);
  letter-spacing: -1px; line-height: 1;
}
.closing-total-pct { font-size: 13px; color: var(--brown-2); margin-top: 6px; }
.closing-grid {
  display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start;
}
.closing-table-wrap { min-width: 0; }
.closing-sidebar { min-width: 0; }
.closing-section-hdr {
  background: var(--bg-3); color: var(--brown-2);
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
}
.closing-row + .closing-section-hdr { border-top: 1px solid var(--border-2); }
.closing-table {
  border: 1px solid var(--border); border-radius: 8px 8px 0 0; overflow: hidden;
}
.closing-row {
  display: grid; grid-template-columns: 1fr 80px 110px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  background: var(--bg-1); font-size: 12px; color: var(--text-2);
  transition: background 0.1s;
}
.closing-row:last-child { border-bottom: none; }
.closing-row:hover { background: var(--bg-2); }
.closing-row-name { color: var(--text-2); }
.closing-row-note {
  display: block; font-size: 10px; color: var(--text-3); margin-top: 2px;
}
.closing-row-pct {
  font-size: 11px; color: var(--text-3); text-align: right;
  padding-right: 8px; align-self: center; font-family: var(--font-mono);
}
.closing-row-amount {
  font-size: 13px; font-weight: 500; color: var(--text);
  text-align: right; align-self: center;
}
.closing-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; background: var(--bg-3);
  border: 1px solid var(--border-2); border-top: 2px solid var(--brown-border);
  border-radius: 0 0 8px 8px; font-weight: 600; font-size: 14px;
  color: var(--text); margin-top: 1.5rem;
}
.closing-total-row div:last-child {
  color: var(--brown-2); font-family: var(--font-serif); font-size: 20px;
}
.closing-disclaimer {
  font-size: 11px; color: var(--text-3); line-height: 1.6; margin-top: 12px;
  padding: 10px 12px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 6px;
}
.closing-cash-row {
  display: flex; justify-content: space-between; font-size: 13px;
  padding: 7px 0; border-bottom: 1px solid var(--border); color: var(--text-2);
}
.closing-cash-row span:last-child { color: var(--text); font-weight: 500; }
.closing-cash-row:last-of-type { border-bottom: none; }
.closing-cash-total {
  font-weight: 600; color: var(--text) !important;
  padding-top: 10px; margin-top: 4px; border-bottom: none !important;
}
.closing-cash-total span:last-child { color: var(--brown-2) !important; }
.closing-mansion-grid { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.mansion-tier-row {
  display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text-3); padding: 4px 8px; border-radius: 4px;
}
.mansion-tier-row.active {
  background: var(--brown-dim); color: var(--brown-2); font-weight: 600;
}
@media (max-width: 900px) {
  .closing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .closing-row { grid-template-columns: 1fr 90px; }
  .closing-row-pct { display: none; }
}

/* ══════════════════════════════════════════════════════
   GATING — paywall modal · violation teasers · toast
══════════════════════════════════════════════════════ */

/* ── Tab lock icon ───────────────────────────────────── */
.tab-lock {
  display: inline-block; margin-left: 5px;
  color: var(--text-3); vertical-align: middle; opacity: 0.55;
  transition: opacity 0.15s;
}
.pd-tab:hover .tab-lock { opacity: 0.8; }
.paid-access .tab-lock { display: none; }

/* ── Violation pagination ────────────────────────────── */
.viol-pagination {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 0 4px;
}
.viol-page-btn {
  font-size: 12px; font-weight: 500; font-family: var(--font-sans);
  color: var(--text-2); background: none; border: 1px solid var(--border-2);
  border-radius: 5px; padding: 5px 12px; cursor: pointer; transition: all 0.15s;
}
.viol-page-btn:hover:not(:disabled) { background: var(--bg-3); color: var(--text); }
.viol-page-btn:disabled { opacity: 0.35; cursor: default; }
.viol-page-info { font-size: 12px; color: var(--text-3); min-width: 48px; text-align: center; }

/* ── Violation translation teaser (inside .flag card) ── */
.flag-content { flex: 1; min-width: 0; }
.viol-translation {
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.viol-translation-locked {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 10px;
}
.viol-translation-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-3); flex-shrink: 0;
}
.viol-translation-text {
  font-size: 12px; color: var(--text-2); line-height: 1.55; margin: 0;
}
.viol-translation-unlock {
  font-size: 11px; font-weight: 400; color: var(--text-3); text-decoration: none;
  white-space: nowrap; flex-shrink: 0; transition: color 0.15s;
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px;
}
.viol-translation-unlock:hover { color: var(--text-2); border-color: var(--border-2); }

/* ── Paywall backdrop & modal ────────────────────────── */
.paywall-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); z-index: 900;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.paywall-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 901; background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: 12px;
  padding: 40px 32px 28px;
  width: min(440px, 94vw); max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.paywall-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-2);
  cursor: pointer; font-size: 22px; line-height: 1;
  padding: 4px 6px; transition: color 0.15s;
}
.paywall-modal-close:hover { color: var(--text); }
.paywall-lock-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--brown-dim); border: 1px solid var(--brown-border);
  display: flex; align-items: center; justify-content: center; color: var(--brown-2);
  flex-shrink: 0; align-self: center; margin: 0 auto 16px;
}
.paywall-modal-title {
  font-family: var(--font-serif); font-size: 22px;
  color: var(--text); letter-spacing: -0.3px; line-height: 1.2;
  margin: 0 0 10px;
}
.paywall-modal-desc {
  font-size: 14px; color: var(--text-2); line-height: 1.6;
  width: 100%; margin: 0 0 16px;
}
.paywall-modal-features {
  list-style: none; text-align: left; width: 100%;
  border-top: 1px solid var(--border); padding: 16px 0 0; margin: 0 0 20px;
}
.paywall-modal-features li {
  font-size: 13px; color: var(--text-2);
  padding: 4px 0 4px 18px; position: relative;
}
.paywall-modal-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--brown-2); font-size: 12px;
}
.paywall-modal-cta {
  width: 100%; justify-content: center;
  font-size: 14px; font-weight: 600;
  padding: 12px 24px; margin-bottom: 8px;
}
.paywall-modal-note {
  font-size: 11.5px; color: var(--text-3);
  text-align: center; margin: 0 0 16px;
}
.paywall-modal-demo {
  font-size: 13px; color: var(--text-3);
  padding-top: 16px; border-top: 1px solid var(--border); width: 100%;
}
.paywall-modal-demo-link {
  color: var(--brown-2); text-decoration: none; font-weight: 500;
}
.paywall-modal-demo-link:hover { text-decoration: underline; }

/* ── Bundle toast ────────────────────────────────────── */
.bundle-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%); z-index: 1000;
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 10px 20px;
  font-size: 13px; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: opacity 0.3s;
}
.bundle-toast-loading {
  display: inline-flex; align-items: center; gap: 8px;
}
.bundle-toast-loading::before {
  content: ''; display: block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--brown);
  animation: spin 0.7s linear infinite; flex-shrink: 0;
}
.bundle-toast-success { border-color: var(--green); color: var(--green); }
.bundle-toast-info { border-color: var(--border-2); }
