/* Alt Housing - Modern Split Layout Styles */

/* MF Split Layout - Updated to support Bootstrap grid */
.mf-alt-housing .chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mf-alt-housing .chart-card h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.mf-alt-housing .chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.mf-alt-housing .mf-map-container {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
}

/* Legacy MF Split Layout (deprecated but kept for compatibility) */
.mf-split-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.mf-charts-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mf-charts-panel .chart-card {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mf-charts-panel .chart-card h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.mf-map-panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mf-map-panel .map-container {
  height: 100%;
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.96);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  font-size: 12px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1001;
  pointer-events: auto;
}

.map-legend h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.legend-items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-toggle {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.legend-toggle label {
  font-size: 11px;
  color: #666;
  cursor: pointer;
  user-select: none;
}

.legend-toggle input[type="checkbox"] {
  margin-right: 4px;
}

/* Info Window Styling */
.mf-info-window {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  min-width: 180px;
}

.mf-info-window strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.mf-info-window .info-row {
  color: #555;
  padding: 2px 0;
}

/* SF Layout */
.sf-split-view {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 split */
  gap: 24px;
  height: calc(100vh - 200px);
  min-height: 600px;
  max-height: 900px;
}

.sf-charts-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.sf-charts-panel .chart-card {
  flex: 1 1 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.sf-charts-panel .chart-card h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}

.sf-charts-panel .chart-card canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.sf-map-panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: 100%;
}

.sf-map-panel .map-container {
  height: 100%;
}

/* Controls */
.mf-controls, .sf-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin: 0;
}

.horizon-toggles {
  display: flex;
  gap: 4px;
  background: #f1f3f5;
  padding: 4px;
  border-radius: 8px;
}

.horizon-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6c757d;
}

.horizon-btn:hover {
  background: rgba(255,255,255,0.7);
  color: #495057;
}

.horizon-btn.active {
  background: #fff;
  color: #2c3e50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* SF Map Container - Match MF styling */
.sf-map-container {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
}

.sf-map-container .map-container {
  height: 100%;
  width: 100%;
}

/* Ensure map legend floats above Google Maps tiles in all map containers */
.sf-map-container .map-legend,
.mf-map-container .map-legend,
.mh-map-container .map-legend {
  z-index: 1001;
}

/* MH Map Container */
.mh-alt-housing .mh-map-container {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
}

.sf-alt-housing .chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sf-alt-housing .chart-card h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.legend-toggle {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 1200px) {
  .mf-split-layout {
    grid-template-columns: 300px 1fr;
  }
  
  .sf-split-view {
    grid-template-columns: 320px 1fr;
  }
}

@media (max-width: 768px) {
  .mf-split-layout, .sf-split-view {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .mf-map-panel, .sf-map-panel {
    height: 400px;
  }
}

/* Chart Unavailable State */
.chart-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
}

.chart-unavailable .unavailable-content {
  padding: 20px;
}

.chart-unavailable i {
  font-size: 2rem;
  color: #bdc3c7;
  margin-bottom: 10px;
}

.chart-unavailable h5 {
  color: #7f8c8d;
  margin: 0 0 5px 0;
  font-size: 1rem;
}

.chart-unavailable p {
  color: #95a5a6;
  font-size: 0.85rem;
  margin: 0;
}

/* Data Version Badge */
.snapshot-version-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
}

.snapshot-version-badge.v2 {
  background: #d4edda;
  color: #155724;
}

.snapshot-version-badge.v1 {
  background: #fff3cd;
  color: #856404;
}

/* Comp Table Section */
.comp-table-section .table-responsive {
  max-height: 400px;
  overflow-y: auto;
}

.comp-table-section .table th {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 600;
}

.comp-table-section .table td {
  font-size: 0.85rem;
  vertical-align: middle;
}

.comp-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #007bff;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.comp-row:hover {
  background: #e8f4fd !important;
}

.comp-row.table-active {
  background: #cfe2ff !important;
}

/* MHV Sales Stats Sub-table */
.mhv-stats-section .table th {
  font-size: 0.82rem;
  font-weight: 600;
  background: #f8f9fa;
}

.mhv-stats-section .table td {
  font-size: 0.85rem;
}

/* ============================================================
   Executive Summary — Modern 3-Column Brief
   ============================================================ */

.exec-brief {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  color: #1f2937;
  font-size: 14px;
}

/* TOP BAR --------------------------------------------------- */
.exec-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 4px 4px 16px 4px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
.exec-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 4px;
}
.exec-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.exec-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}
.exec-topbar-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.chip-type { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; font-weight: 600; }
.chip-accent { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; font-weight: 600; }
.chip-neutral { background: #f9fafb; color: #4b5563; }

/* GRID ------------------------------------------------------ */
.exec-brief-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.exec-col-left,
.exec-col-center,
.exec-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.exec-col-right {
  position: sticky;
  top: 16px;
}

/* BRIEF CARD (base) ---------------------------------------- */
.brief-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.brief-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.brief-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin: 0 0 12px 0;
}
.brief-card-header .brief-card-title { margin-bottom: 0; }
.brief-card-meta {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0 0;
}
.brief-card-link {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}
.brief-card-link:hover { text-decoration: underline; }
.brief-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
  background: #dbeafe;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.brief-fineprint {
  font-size: 11px;
  color: #94a3b8;
  margin: 10px 0 0 0;
  line-height: 1.5;
}

/* AERIAL CARD (left col anchor) ----------------------------- */
.brief-aerial-card {
  padding: 0;
  overflow: hidden;
}
.brief-aerial-card .aerial-container {
  width: 100%;
  height: 380px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brief-aerial-card .aerial-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #1e293b;
}
.brief-aerial-card .aerial-caption {
  font-size: 10px;
  color: #94a3b8;
  text-align: right;
  margin: 0;
  padding: 6px 12px;
  border-top: 1px solid #f1f5f9;
}

/* KEY-VALUE LIST (left col identity) ------------------------ */
.kv-list { margin: 0; }
.kv-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: baseline;
}
.kv-row:last-child { border-bottom: none; }
.kv-row dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin: 0;
}
.kv-row dd {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  margin: 0;
  word-break: break-word;
}

/* TAKEAWAY (center col bottom-line) ------------------------- */
.takeaway-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 60%);
  border-left: 3px solid #2563eb;
}
.takeaway-row {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 8px 0 16px 0;
}
.takeaway-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.takeaway-pct {
  font-size: 38px;
  font-weight: 700;
  color: #059669;
  line-height: 1;
  letter-spacing: -0.02em;
}
.takeaway-pct.alt { color: #0284c7; font-size: 30px; }
.takeaway-pct-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.takeaway-divider {
  width: 1px;
  background: #e5e7eb;
}
.takeaway-narrative {
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

/* COMPARABLE HOME (center col) ------------------------------ */
.comp-home-card { background: #fff; }
.comp-home-savings {
  text-align: right;
  flex-shrink: 0;
}
.comp-savings-pct {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #059669;
  line-height: 1;
}
.comp-savings-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.comp-home-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
  align-items: stretch;
}
.ch-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  text-align: center;
  min-height: 78px;
}
.ch-tile.primary {
  background: #2563eb;
  border-color: #2563eb;
}
.ch-tile.primary .ch-label,
.ch-tile.primary .ch-value { color: #fff; }
.ch-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-value {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

/* EX-LAYOUT: % delta tag next to a kv value (e.g. Top-5 Comp row) */
.kv-diff {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}
.kv-diff.pos { background: #dcfce7; color: #166534; }
.kv-diff.neg { background: #fee2e2; color: #991b1b; }

/* CHART WRAP ----------------------------------------------- */
.brief-chart-wrap {
  height: 280px;
  position: relative;
  margin-top: 8px;
}

/* OPP-COST TABLE ------------------------------------------ */
.brief-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.brief-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.brief-table th.num, .brief-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.brief-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1f2937;
}
.brief-table tbody tr:last-child td { border-bottom: none; }
.brief-table tr.row-accent td { background: #f0fdf4; font-weight: 600; }
.brief-table .positive { color: #059669; font-weight: 600; }
.row-marker {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.row-marker.mh { background: #10b981; }
.row-marker.mf { background: #2563eb; }
.row-marker.sf { background: #ef4444; }

/* SIDE CARDS (right col) ----------------------------------- */
.sidecard { padding: 14px 16px; }
.sidecard .brief-card-title { margin-bottom: 8px; font-size: 11px; }
.sidecard .intel-stack { display: flex; flex-direction: column; }
.sidecard .intel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}
.sidecard .intel-row:last-child { border-bottom: none; }
.sidecard .intel-row.featured {
  background: #eff6ff;
  border-bottom: none;
  padding: 6px 8px;
  margin: 2px -4px;
  border-radius: 4px;
}
.sidecard .intel-row.total {
  font-weight: 700;
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  padding-top: 8px;
  margin-top: 4px;
}
.sidecard .intel-label { color: #64748b; font-weight: 500; }
.sidecard .intel-value { color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sidecard .intel-footnote {
  font-size: 10px;
  color: #94a3b8;
  margin: 8px 0 0 0;
  font-style: italic;
}

/* SRC TAG -------------------------------------------------- */
.src-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  margin-left: 4px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* TIME SERIES TAB ----------------------------------------- */
.time-series-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
  max-width: 1600px;
}
.time-series-layout .card {
  margin: 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 20px;
}
.chart-caption {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 8px 0;
  line-height: 1.5;
}
.cost-assumptions-note {
  font-size: 12px;
  color: #6b7280;
  margin: 12px 0 0 0;
  line-height: 1.5;
}
.cost-assumptions-note a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

/* RESPONSIVE ---------------------------------------------- */
@media (max-width: 1280px) {
  .exec-brief-grid {
    grid-template-columns: 280px minmax(0, 1fr) 280px;
    gap: 16px;
  }
  .comp-home-metrics { grid-template-columns: repeat(3, 1fr); }
  .ch-tile.primary { grid-column: span 3; }
}
@media (max-width: 1024px) {
  .exec-brief-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .exec-col-right {
    position: static;
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .exec-col-right .sidecard {
    flex: 1 1 280px;
  }
}
@media (max-width: 720px) {
  .exec-brief-grid { grid-template-columns: 1fr; }
  .exec-col-right { flex-direction: column; }
  .takeaway-row { flex-direction: column; gap: 12px; }
  .takeaway-divider { display: none; }
  .comp-home-metrics { grid-template-columns: repeat(2, 1fr); }
  .ch-tile.primary { grid-column: span 2; }
  .exec-topbar { flex-direction: column; align-items: flex-start; }
}

/* MHV TOGGLE BUTTONS ---------------------------------------- */
.mhv-toggle {
  display: flex;
  gap: 4px;
}
.mhv-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
}
.mhv-toggle-btn:hover { background: #e2e8f0; }
.mhv-toggle-btn.active {
  background: #334155;
  color: #fff;
  border-color: #334155;
}

/* ============================================================
   EXEC SUMMARY — edit, hide, presentation controls
   ============================================================ */
.exec-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.exec-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.exec-tool-btn {
  padding: 6px 14px; border: 1px solid #2563eb; background: #fff; color: #2563eb;
  border-radius: 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.exec-tool-btn:hover { background: #eff6ff; }
.exec-summary.is-editing .exec-tool-edit,
.exec-summary.is-presenting .exec-tool-present { background: #2563eb; color: #fff; }
.exec-edited-note {
  font-size: 11px; font-weight: 600; color: #b45309; background: #fef3c7;
  padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em;
}
.exec-sections-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.exec-sections-title { font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.04em; }
.exec-section-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #334155; cursor: pointer; }
.exec-section-toggle input { accent-color: #2563eb; }

/* Editable KPI cells — display swaps to a number input in edit mode */
.kpi { display: inline-flex; align-items: center; gap: 4px; }
.kpi-input {
  display: none; width: 90px; padding: 2px 6px; border: 1px solid #2563eb;
  border-radius: 6px; font-size: 13px; font-family: inherit;
}
.exec-summary.is-editing .kpi-display { display: none; }
.exec-summary.is-editing .kpi-input { display: inline-block; }
.kpi-display.is-edited::after { content: "\270E"; margin-left: 4px; font-size: 10px; color: #b45309; }

/* Chart edit panel — visible only in edit mode */
.chart-edit-panel {
  display: none; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  margin: 4px 0 10px; padding: 8px 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px;
}
.exec-summary.is-editing .chart-edit-panel { display: flex; }
.chart-edit-hint { font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.04em; }
.chart-edit-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #334155; }
.chart-edit-label { font-weight: 600; }

/* Hidden KPIs — dimmed while editing, removed in presentation */
.kpi-hidden { position: relative; }
.exec-summary.is-editing .kpi-hidden { opacity: 0.4; outline: 1px dashed #cbd5e1; outline-offset: 2px; }
.exec-summary.is-editing .kpi-hidden::before {
  content: "Hidden"; position: absolute; top: 6px; right: 8px; z-index: 2;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #b91c1c; background: #fee2e2; padding: 1px 6px; border-radius: 8px;
}
.exec-summary.is-presenting .kpi-hidden { display: none !important; }

/* Presentation mode — hide chrome for clean screenshots */
.exec-summary.is-presenting #subview-pills { display: none; }
.exec-summary.is-presenting .exec-sections-panel,
.exec-summary.is-presenting .exec-tool-edit,
.exec-summary.is-presenting .exec-edited-note,
.exec-summary.is-presenting .chart-edit-panel { display: none; }

/* Comparable Home — two-column (3BR/2BA vs Trade Area) */
.comp-home-cols { display: flex; gap: 14px; margin-top: 8px; }
.comp-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.comp-col-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 2px; border-bottom: 1px solid #eef2f7; }
.comp-col-title { font-size: 13px; font-weight: 700; color: #0f172a; }
.comp-col-meta { font-size: 10px; color: #6b7280; }
@media (max-width: 640px) { .comp-home-cols { flex-direction: column; } }

/* Presentation view — compact the Comparable Home card so both columns fit
   comfortably in a single executive screenshot. */
.exec-summary.is-presenting .comp-home-card .comp-home-cols { gap: 10px; margin-top: 6px; }
.exec-summary.is-presenting .comp-home-card .comp-col { gap: 5px; }
.exec-summary.is-presenting .comp-home-card .ch-tile { padding: 7px 8px; min-height: 0; }
.exec-summary.is-presenting .comp-home-card .ch-label { margin-bottom: 2px; font-size: 9px; }
.exec-summary.is-presenting .comp-home-card .ch-value { font-size: 14px; }
.exec-summary.is-presenting .comp-home-card .comp-savings-pct { font-size: 20px; }
.exec-summary.is-presenting .comp-home-card .brief-card-header { margin-bottom: 4px; }
