.roof-run-dialog { width:min(1400px,96vw); max-width:96vw; max-height:94vh; overflow:auto; background:#18212b; color:#f3f5f8; border:1px solid #728497; border-radius:12px; padding:20px; }
.roof-run-dialog::backdrop { background:#000b; }
.roof-run-dialog header,.roof-run-dialog footer,.roof-run-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.roof-run-dialog header { justify-content:space-between; }
.roof-run-dialog h2,.roof-run-dialog h3 { margin:0 0 8px; }
.roof-run-views { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.roof-run-views section { min-width:0; }
.roof-run-map,.roof-run-photo { height:clamp(260px,48vh,600px); position:relative; background:#0c1117; overflow:hidden; }
.roof-run-photo img,.roof-run-photo svg { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.roof-run-map [data-map] { width:100%; height:100%; touch-action:none; cursor:crosshair; }
.roof-run-map [data-loupe] { position:absolute; right:8px; top:8px; width:150px; height:150px; pointer-events:none; border:1px solid white; }
.roof-run-tools { padding:8px 0; }
.roof-run-dialog footer { margin-top:20px; }
.roof-run-dialog pre { white-space:pre-wrap; max-height:200px; overflow:auto; font-size:11px; }
.roof-run-dialog button,.roof-run-dialog select { font:inherit; padding:8px 12px; min-height:40px; }
.roof-run-dialog button[aria-pressed="true"] { outline:2px solid #ffdf65; }
.roof-run-dialog button:disabled { opacity:.4; cursor:not-allowed; }

/* Result + confidence badge, directly beside the number, not buried below. */
.roof-run-result-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px; }
.roof-run-result-row output { font-size:1.25rem; font-weight:700; }
.confidence-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:0.85rem; font-weight:700; letter-spacing:.02em; }
.confidence-badge[data-state="verified"] { background:#1c3d2b; color:#6fe3a1; border:1px solid #2f7a52; }
.confidence-badge[data-state="estimate"] { background:#3d331a; color:#ffcb66; border:1px solid #8a6a1f; }
.confidence-badge[data-state="needs-review"] { background:#33313a; color:#b9b3c4; border:1px solid #5c5666; }
/* Pitch notation badge, e.g. "4/12 pitch" -- neutral, not a confidence state. */
.pitch-badge { display:inline-flex; align-items:center; padding:5px 12px; border-radius:999px; font-size:0.85rem; font-weight:700; letter-spacing:.02em; background:#242b36; color:#a9b6c9; border:1px solid #3a4657; }

/* Five-row confidence table -- all five states always visible; the row
   matching the badge's accept-state-gated status is highlighted, the rest muted. */
.confidence-table { width:100%; border-collapse:collapse; margin-top:10px; font-size:0.9rem; }
.confidence-table td { padding:7px 10px; border-bottom:1px solid #2a3440; color:#8f99a6; }
.confidence-table td:first-child { width:28px; text-align:center; font-weight:700; }
.confidence-table tr.is-current td { color:#f3f5f8; font-weight:700; background:#232f3d; }
.confidence-table tr.is-current td:first-child { color:inherit; }
.confidence-table tr[data-confidence-row="verified"].is-current td:first-child { color:#6fe3a1; }
.confidence-table tr[data-confidence-row="pitch"].is-current td:first-child,
.confidence-table tr[data-confidence-row="flat"].is-current td:first-child,
.confidence-table tr[data-confidence-row="stale"].is-current td:first-child { color:#ffcb66; }
.confidence-table tr[data-confidence-row="needs-review"].is-current td:first-child { color:#b9b3c4; }

/* Pitch disclosure panel -- the primary pitch UI, replacing the old level
   checkbox entirely. */
.roof-run-pitch-panel { margin-top:14px; padding:12px; border:1px solid #3a4552; border-radius:8px; background:#1e2733; }
.roof-run-pitch-panel p { margin:0 0 10px; font-weight:600; }
.roof-run-pitch-panel .roof-run-pitch-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.roof-run-pitch-panel input[type="number"] { width:90px; padding:6px; font:inherit; }

.roof-run-options > div,.roof-run-planning { margin-top:14px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.roof-run-options small,.roof-run-planning small { color:#c9d5de; }
.roof-run-planning { border-top:1px solid #526170; padding-top:12px; }
.roof-run-planning input { width:64px; padding:6px; font:inherit; }

/* Confirm-and-approve reflects the current confidence state. */
.roof-run-dialog [data-use][data-state="verified"] { background:#2f7a52; color:#f3f5f8; font-weight:700; }
.roof-run-dialog [data-use][data-state="estimate"] { background:#ffcb66; color:#18212b; font-weight:700; }
.roof-run-dialog [data-use][data-state="needs-review"] { background:#3a4552; color:#8f99a6; font-weight:700; }

@media(max-width:760px) { .roof-run-views { grid-template-columns:1fr; } .roof-run-photo { height:200px; } }

/* Roof report: read-only vector diagram, no photo, confirmed geometry only. */
.solar-roof-report-dialog { width:min(1000px,96vw); max-width:96vw; max-height:94vh; overflow:auto; background:#18212b; color:#f3f5f8; border:1px solid #728497; border-radius:12px; padding:20px; }
.solar-roof-report-dialog::backdrop { background:#000b; }
.solar-roof-report-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.solar-roof-report-dialog header button { font:inherit; padding:8px 12px; min-height:40px; }
.solar-roof-report-canvas-wrap { height:clamp(320px,60vh,700px); background:#fff; border-radius:8px; overflow:hidden; }
.solar-roof-report-canvas-wrap canvas { width:100%; height:100%; display:block; }
.solar-roof-report-dialog [data-report-status] { color:#ffcb66; }
.solar-roof-report-legend { list-style:none; display:flex; gap:16px; flex-wrap:wrap; padding:0; margin:12px 0 0; font-size:0.85rem; }
.solar-roof-report-legend li { display:flex; align-items:center; gap:6px; }
.legend-swatch { width:18px; height:4px; display:inline-block; border-radius:2px; }
.legend-swatch[data-legend="RIDGE"] { background:#00a850; }
.legend-swatch[data-legend="HIP"] { background:#e08a00; }
.legend-swatch[data-legend="VALLEY"] { background:#1f6fd6; }
.legend-swatch[data-legend="PERIMETER"] { background:#3a3a3a; }
.solar-roof-report-summary { width:100%; border-collapse:collapse; margin-top:16px; font-size:0.95rem; }
.solar-roof-report-summary td { padding:7px 10px; border-bottom:1px solid #2a3440; }
.solar-roof-report-summary td:first-child { color:#8f99a6; }
.solar-roof-report-summary td:last-child { text-align:right; font-weight:700; }
