/* Isolated review surfaces; do not override the legacy workspace cascade. */
.lr-dialog,.lr-public {--lr-bg:#fff;--lr-panel:#f6f8fb;--lr-text:#17243a;--lr-muted:#52627a;--lr-border:#d6deea;--lr-blue:#285bd7;color:var(--lr-text);background:var(--lr-bg);font:14px/1.5 Inter,system-ui,sans-serif;color-scheme:light;box-sizing:border-box}
.lr-dialog *,.lr-public * {box-sizing:border-box}
.lr-dialog {width:min(1380px,96vw);max-width:96vw;height:min(920px,94dvh);max-height:94dvh;padding:0;border:1px solid var(--lr-border);border-radius:14px;overflow:auto;overflow-x:hidden;box-shadow:0 20px 80px #0005}
.lr-dialog::backdrop {background:#111827b3}
.lr-dialog:not([open]) {display:none}
.lr-header {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid var(--lr-border)}
.lr-header h1,.lr-header h2 {margin:3px 0 0;font-size:24px;line-height:1.25;color:var(--lr-text)}
.lr-eyebrow {font-size:12px;color:var(--lr-muted);overflow-wrap:anywhere}
.lr-dialog h3,.lr-public h3 {font-size:16px;margin:18px 0 8px;color:var(--lr-text)}
.lr-dialog p,.lr-public p {margin:8px 0 14px;overflow-wrap:anywhere}
.lr-tabs {display:flex;gap:4px;flex-wrap:wrap;padding:12px 24px;border-bottom:1px solid var(--lr-border)}
.lr-dialog button,.lr-public button,.lr-launch {font:inherit;padding:8px 12px;border:1px solid var(--lr-border,#d6deea);border-radius:7px;background:var(--lr-bg,#fff);color:var(--lr-text,#17243a);cursor:pointer;line-height:1.4;min-height:36px;text-transform:none;letter-spacing:normal;white-space:normal}
.lr-dialog button:hover:not(:disabled),.lr-public button:hover:not(:disabled) {background:var(--lr-panel)}
.lr-dialog button:disabled,.lr-public button:disabled {opacity:.5;cursor:wait}
.lr-dialog button:focus-visible,.lr-public button:focus-visible,.lr-dialog input:focus-visible,.lr-public input:focus-visible {outline:3px solid #7aa5fa;outline-offset:2px}
.lr-tabs [aria-selected="true"],.lr-dialog .lr-primary,.lr-public .lr-primary {background:var(--lr-blue);color:white;border-color:var(--lr-blue)}
.lr-dialog .lr-tabs [aria-selected="true"]:hover:not(:disabled),.lr-dialog .lr-primary:hover:not(:disabled),.lr-public .lr-primary:hover:not(:disabled) {background:#1947b4}
.lr-status {padding:0 24px;min-height:10px;color:var(--lr-muted)}
.lr-status:not(:empty) {padding-top:10px;padding-bottom:10px}
.lr-error {padding:12px 16px;margin:12px 24px!important;background:#fff0ee;color:#9e2522;border:1px solid #eab6b1;border-radius:8px}
.lr-fieldset {border:0;margin:0;padding:0;min-width:0}
.lr-content {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(285px,1fr);gap:24px;padding:20px 24px 28px;align-items:start}
.lr-content--pricing {display:block}
.lr-side {min-width:0}.lr-map-column {min-width:0}
.lr-drawing {border:1px solid var(--lr-border);border-radius:8px;background:var(--lr-panel);overflow:hidden}
.lr-drawing svg {display:block;width:100%;height:clamp(240px,48vh,560px);touch-action:manipulation;cursor:crosshair}
.lr-drawing-tools {display:flex;align-items:center;gap:6px;padding:8px 12px;border-bottom:1px solid var(--lr-border)}
.lr-drawing-tools span {margin-right:auto;color:var(--lr-muted);font-size:12px}
.lr-point-input {display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:12px;border-top:1px solid var(--lr-border)}
.lr-point-input label {width:90px}.lr-point-input small {color:var(--lr-muted);align-self:center}
.lr-dialog label,.lr-public label {display:flex;flex-direction:column;gap:5px;color:var(--lr-muted);font-size:12px;margin:10px 0}
.lr-dialog input,.lr-dialog select,.lr-dialog textarea,.lr-public input,.lr-public select,.lr-public textarea {display:block;width:100%;min-width:0;background:var(--lr-bg);border:1px solid var(--lr-border);border-radius:6px;color:var(--lr-text);font:14px/1.4 Inter,system-ui,sans-serif;padding:9px 10px;min-height:38px;resize:vertical;box-shadow:none}
.lr-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lr-fields--four {grid-template-columns:repeat(4,minmax(0,1fr))}
.lr-muted,.lr-map-legend {color:var(--lr-muted);font-size:12px}.lr-map-legend {text-align:center}
.lr-callout {padding:14px;background:#edf3ff;border:1px solid #c5d7fa;border-radius:8px;margin:12px 0;overflow-wrap:anywhere}
.lr-callout p:last-child {margin-bottom:0}.lr-pass {background:#eff9f3;border-color:#acd6ba}.lr-warning {background:#fff6e8;border-color:#eccb8d}
.lr-dialog ul {padding-left:20px}.lr-dialog details {border-top:1px solid var(--lr-border);padding:13px 0}.lr-dialog summary {cursor:pointer;font-weight:600}
.lr-issue {display:block;width:100%;text-align:left;margin:6px 0}
.lr-metrics {display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.lr-metrics span {flex:1;padding:10px;background:var(--lr-panel);border-radius:7px;font-size:12px;color:var(--lr-muted)}.lr-metrics strong {display:block;font-size:21px;color:var(--lr-text)}
.lr-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}.lr-actions a {color:var(--lr-blue);text-decoration:underline}
.lr-section-heading {display:flex;gap:16px;align-items:center;justify-content:space-between}.lr-section-heading h3 {margin-top:0}
.lr-table-scroll {max-width:100%;overflow-x:auto;margin:12px 0}.lr-dialog table,.lr-public table {width:100%;border-collapse:collapse;font-size:13px}.lr-dialog th,.lr-public th {background:var(--lr-panel);color:var(--lr-muted);text-align:left;padding:10px}.lr-dialog td,.lr-public td {padding:8px;border-bottom:1px solid var(--lr-border);vertical-align:top}.lr-pricing table {min-width:620px}.lr-pricing th:first-child {width:40%}.lr-pricing th:nth-child(2) {width:13%}.lr-pricing th:nth-child(3) {width:20%}
.lr-quote-total {padding:18px;border:1px solid var(--lr-border);border-radius:8px;margin:18px 0;background:var(--lr-panel)}.lr-quote-total>strong {display:block;font-size:30px}.lr-quote-total p {font-size:12px;color:var(--lr-muted)}
.lr-review-item,.lr-feedback-list article {padding:14px 0;border-bottom:1px solid var(--lr-border);overflow-wrap:anywhere}.lr-review-item>span,.lr-review-item>small,.lr-feedback-list article>span {display:block;font-size:12px;color:var(--lr-muted);margin:6px 0}.lr-review-item>input {font-size:11px}.lr-feedback-list article {scroll-margin:12px}.lr-feedback-list article>button {margin-left:10px}.lr-resolved {opacity:.65}.lr-check {flex-direction:row!important;align-items:center;gap:9px!important}.lr-check input {width:18px!important;min-height:18px!important;height:18px}.lr-notes {white-space:pre-wrap}
.lr-sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.lr-launch {display:none;margin:12px 0 0;width:100%;font-size:12px;background:#285bd7;color:white;border-color:#285bd7}
body[data-workspace-mode="layout"] .layout-results-card:has(.responsive-panel-toggle[aria-expanded="true"]) .lr-launch {display:block}
.lr-public {max-width:1500px;margin:24px auto;border:1px solid var(--lr-border);border-radius:12px;overflow:hidden}.lr-public-revision {display:flex;flex-wrap:wrap;gap:12px 20px;padding:12px 24px;background:var(--lr-panel);font-size:12px}.lr-public-revision>span:nth-child(2) {text-transform:capitalize;font-weight:600}.lr-public h2 {font-size:18px}.lr-public-footer {padding:16px 24px;font-size:11px;color:var(--lr-muted);border-top:1px solid var(--lr-border)}
body:has(#client-review-root) {margin:0;padding:12px;background:#edf1f6}
@media(max-width:850px) {.lr-content {grid-template-columns:1fr;gap:14px;padding:16px}.lr-side {border-top:1px solid var(--lr-border);padding-top:8px}.lr-header {padding:16px}.lr-tabs {padding:10px 16px}.lr-fields--four {grid-template-columns:repeat(2,minmax(0,1fr))}.lr-section-heading {align-items:start;flex-direction:column}.lr-public {margin:0}.lr-drawing svg {height:330px}}
@media(max-width:480px) {.lr-header h1,.lr-header h2 {font-size:20px}.lr-tabs button {flex:1 1 42%;font-size:12px}.lr-fields {grid-template-columns:1fr 1fr}.lr-dialog {width:98vw;max-width:98vw;height:97dvh;max-height:97dvh}.lr-drawing svg {height:250px}.lr-point-input small {width:100%}}
@media(prefers-reduced-motion:reduce) {.lr-dialog *,.lr-public * {scroll-behavior:auto}}

/* Inspection layers share the main drawing and its footer. */
body[data-effective-workspace-mode="layout"]:not([data-workspace-mode="file"]):not([data-workspace-mode="projects"]) .layout-status-bar {height:70px; flex-direction:column; align-items:stretch; gap:6px; width:calc(100% - 46px)}
body[data-effective-workspace-mode="layout"]:not([data-workspace-mode="file"]):not([data-workspace-mode="projects"]) .viewer {bottom:100px}
body[data-effective-workspace-mode="layout"]:not([data-workspace-mode="file"]):not([data-workspace-mode="projects"]) .layout-status-bar__preview {margin-left:0}
.li-telemetry {display:flex; gap:6px; align-items:center; min-width:0; overflow-x:auto; scrollbar-width:thin}
.li-controls {display:flex; align-items:center; justify-content:flex-end; gap:6px; min-width:0}
.li-toggle {display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:30px; padding:5px 9px; border:1px solid #dbe2eb; border-radius:5px; background:#f8fafc; color:#475569; font:600 11px/1.3 Inter,sans-serif; white-space:nowrap; cursor:pointer}
.li-toggle[aria-pressed="true"], .li-panel button[aria-pressed="true"] {background:#eaf2ff; color:#1e40af; border-color:#93b4ef}
.li-toggle:hover:not(:disabled), .li-panel button:hover:not(:disabled) {border-color:#93b4ef; background:#eff6ff}
.li-toggle:focus-visible, .li-panel :focus-visible {outline:2px solid #2563eb; outline-offset:2px}
.li-toggle:disabled, .li-panel button:disabled {opacity:.55; cursor:wait}
.li-panel {position:absolute; bottom:calc(100% + 10px); right:0; z-index:30; width:330px; max-width:100%; max-height:min(520px,55vh); overflow:auto; padding:14px; border:1px solid #cbd5e1; border-radius:9px; background:#fff; color:#334155; box-shadow:0 6px 26px #0f172a26; font:12px/1.5 Inter,sans-serif; text-align:left; overscroll-behavior:contain}
.li-panel header {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px}
.li-panel header strong {font-size:14px; color:#0f172a}
.li-panel p {margin:8px 0; font-size:12px; line-height:1.5; color:inherit}
.li-panel fieldset {border:0; margin:0; padding:0; min-width:0}
.li-panel button {min-height:30px; padding:5px 9px; border:1px solid #dbe2eb; border-radius:5px; color:#334155; background:#f8fafc; font:600 11px/1.4 Inter,sans-serif; cursor:pointer}
.li-panel header button {font-size:20px; line-height:1; padding:0; width:28px; flex:0 0 28px}
.li-fields {display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0}
.li-fields label {display:flex; flex-direction:column; gap:4px; font-size:11px; color:#475569; min-width:0}
.li-fields input {width:100%; min-width:0; height:32px; border:1px solid #cbd5e1; border-radius:5px; padding:5px 7px; font:12px Inter,sans-serif; background:#fff; color:#0f172a}
.li-actions {display:flex; flex-wrap:wrap; gap:5px; margin:10px 0}
.li-panel .li-primary {background:#1d4ed8; color:#fff; border-color:#1d4ed8; margin:10px 0; width:100%}
.li-panel .li-primary:hover:not(:disabled) {background:#1e40af; color:#fff}
.li-panel .li-muted {color:#64748b; font-size:11px}
.li-panel details {border-top:1px solid #e2e8f0; padding-top:9px; margin-top:10px}
.li-panel summary {cursor:pointer; font-weight:600; color:#334155}
.li-result {padding:10px; border:1px solid #bfdbfe; border-radius:6px; background:#eff6ff; margin:10px 0}
.li-pass {background:#ecfdf5; border-color:#a7f3d0; color:#065f46}
.li-panel .li-error {color:#991b1b; background:#fef2f2; border-color:#fecaca; padding:8px; border-radius:5px}
.li-panel ul {margin:8px 0; padding-left:18px}
.li-annotation-list {display:flex; flex-direction:column; gap:4px; max-height:175px; overflow:auto; margin:12px 0}
.li-annotation-list button {display:flex; align-items:center; gap:8px; text-align:left; min-height:32px; flex-shrink:0}
.li-marker {display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; flex:0 0 20px; border-radius:50%; background:#1e40af; color:#fff; font-size:10px}
.li-marker--finding {background:#dc2626}

body:not([data-workspace-mode="layout"]) .li-controls {display:none}
.li-panel header {position:sticky; top:-14px; z-index:1; background:#fff; padding:8px 0}
@media (max-width:600px) {
  .li-panel {z-index:1200; position:fixed; left:16px; right:16px; bottom:16px; width:auto; max-width:none; max-height:55dvh}
}

body:not([data-workspace-mode="layout"]) .li-panel {display:none}
