:root{--ink:#152d37;--muted:#526772;--bg:#f1f5f5;--line:#d4dfe0;--teal:#006b61;--teal-light:#e5f4ef;--amber:#8c5010;--danger:#ad3030;--white:#fff;--radius:12px;font:15px/1.5 'Segoe UI',system-ui,sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.button,.upload{cursor:pointer;border-radius:7px;min-height:42px;padding:9px 13px;border:1px solid transparent;background:var(--teal);color:white;font-weight:600;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;gap:7px;transition:background .15s}button:hover,.button:hover,.upload:hover{filter:brightness(.95)}button:disabled,[aria-disabled=true]{cursor:default;opacity:.45;pointer-events:none}.secondary{background:white;border-color:var(--line);color:var(--ink)}.text-button{background:transparent;color:var(--teal);padding:8px}.danger{background:#fff2f2;border-color:#efcccc;color:var(--danger)}:focus-visible{outline:3px solid #3e8bcc;outline-offset:3px}input,select,textarea{width:100%;min-height:40px;border:1px solid #b9c9ce;border-radius:6px;padding:8px 9px;color:var(--ink);background:white}textarea{resize:vertical}label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600;min-width:0}input[type=checkbox]{width:17px;min-height:17px;accent-color:var(--teal)}.check{flex-direction:row;align-items:center}.topbar{height:83px;padding:0 28px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px}.brand{display:flex;gap:12px;align-items:center;margin-right:auto}.brand svg{width:38px;stroke:var(--teal);fill:none;stroke-width:1.8}.brand strong{font-size:23px;letter-spacing:-.8px}.brand span{display:block;font-size:10px;letter-spacing:1.7px;color:var(--muted)}.local-tag{font-size:12px;color:var(--teal);background:var(--teal-light);border-radius:20px;padding:6px 12px}main{max-width:1920px;margin:auto;padding:22px 24px}.projectbar{display:flex;gap:15px;align-items:end;margin-bottom:18px}.projectbar label{min-width:240px;max-width:380px}.projectbar #saved{font-size:12px;margin-left:auto;align-self:center}.notice{padding:11px 15px;border:1px solid #c5ded6;background:#ecf7f2;border-radius:8px;margin-bottom:18px;font-size:13px}.notice.error{background:#fff0ed;color:#9c3120;border-color:#edc5bc}.notice.busy{background:#fff7df;color:#714700;border-color:#e4d3a1}.workspace{display:grid;grid-template-columns:240px minmax(380px,1fr) 285px;gap:16px;align-items:start}.panel{border:1px solid var(--line);border-radius:var(--radius);background:white;overflow:hidden}.sources,.inspector{padding:18px}.section-title{display:flex;align-items:center;gap:10px;margin-bottom:17px}.step{display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:6px;width:28px;height:28px;font-size:12px;color:var(--muted)}h2{font-size:17px;letter-spacing:-.25px;margin:0}h3{font-size:15px;margin:0 0 9px}p{margin:8px 0 12px}.hint{font-size:12px;color:var(--muted);line-height:1.6}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:1.4px;color:var(--muted);font-weight:700}.upload{position:relative;width:100%;font-size:13px;text-align:center}.upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload:focus-within{outline:3px solid #3e8bcc}.source-list{display:flex;flex-direction:column;gap:7px;margin-top:15px;max-height:320px;overflow:auto}.source-list button{width:100%;justify-content:start;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:12px;background:var(--bg);color:var(--ink);border:1px solid transparent}.source-list button.active{background:var(--teal-light);border-color:#62a797;color:#00574e}.source-list small{display:block;font-weight:400;color:var(--muted)}.photo-heading{margin-top:28px;padding-top:22px;border-top:1px solid var(--line);justify-content:space-between}.counter{background:var(--bg);border:1px solid var(--line);border-radius:20px;padding:2px 7px;font-size:11px}.photo-card{border:1px solid var(--line);border-radius:8px;padding:9px;margin-top:12px}.photo-card img{width:100%;height:100px;object-fit:cover;border-radius:4px}.photo-card label{font-size:11px;margin-top:7px}.photo-card input,.photo-card select{font-size:12px}.photo-card .name{font-size:11px;overflow-wrap:anywhere;margin:4px 0}.photo-card button{min-height:34px;padding:5px 8px;font-size:11px}.photo-card .row{gap:4px}.drawing-heading{display:flex;justify-content:space-between;align-items:center;padding:18px;gap:12px}.drawing-heading h2{margin-top:5px}.badge{font-size:11px;border:1px solid #e6cda6;border-radius:20px;background:#fff7e8;color:var(--amber);padding:5px 9px;white-space:nowrap}.badge.ok{background:var(--teal-light);color:var(--teal);border-color:#aed2c6}.toolbar{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 14px;display:flex;align-items:end;gap:10px;flex-wrap:wrap}.toolbar label{flex:1;min-width:180px;font-size:11px}.toolbar select{font-size:12px}.zoom-tools{display:flex;align-items:center;gap:6px}.zoom-tools button{padding:6px 11px;font-size:13px;min-width:36px;min-height:38px}.zoom-tools span{font-size:11px;min-width:40px;text-align:center}.viewport{height:600px;overflow:auto;position:relative;background-color:#e9efef;background-image:linear-gradient(#dce5e5 1px,transparent 1px),linear-gradient(90deg,#dce5e5 1px,transparent 1px);background-size:24px 24px;touch-action:none}.viewport svg{display:block;max-width:none;background:white;user-select:none}.viewport svg[hidden]{display:none}.empty{padding:90px 24px;text-align:center;color:var(--muted)}.empty svg{width:130px;height:110px;stroke:#5e8b85;stroke-width:1.4;fill:none;margin:0 auto 20px;background:transparent}.empty h3{font-size:19px;color:var(--ink)}.empty p{font-size:13px;line-height:1.8}.canvas-footer{padding:10px 14px;display:flex;gap:6px;align-items:center;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}.canvas-footer>span{margin-right:auto}.canvas-footer button{font-size:11px;min-height:32px;white-space:nowrap}.pending{padding:15px;background:#edf7f3;border-top:1px solid #cee0d8}.row{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.row label{flex:1;min-width:100px}.coordinate-entry{font-size:12px;padding:12px 15px;border-top:1px solid var(--line)}details summary{cursor:pointer;color:var(--muted)}details .row{margin-top:10px}.inspector form{display:grid;gap:11px}.full{width:100%}.scale-block,.ai-block{border-top:1px solid var(--line);margin-top:22px;padding-top:18px}.ai-block{background:#f5f9f8;margin:22px -18px -18px;padding:18px}.ai-block h3{margin-top:4px}.ai-block button{margin-top:8px}.notes{font-size:12px;color:var(--amber);padding-left:16px;line-height:1.65}.ref{font-size:11px;display:flex;justify-content:space-between;gap:6px;align-items:center;border-bottom:1px solid var(--line);padding:5px 0}.ref button{min-height:32px;padding:5px;font-size:11px}.results,.usage{margin-top:20px;padding:22px}.results-heading{display:flex;justify-content:space-between;gap:20px;align-items:center}.results-heading h2{margin-top:5px}.results-heading p{font-size:12px}.results-heading .row{flex-shrink:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{font-size:11px;color:var(--muted);font-weight:600;background:#f5f8f8;padding:12px;white-space:nowrap}td{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top}td small{display:block;color:var(--muted);font-size:11px}td button{font-size:13px;text-align:left;padding:0;min-height:32px;background:none;color:var(--teal);justify-content:start}tr.selected{background:#edf7f3}.empty-row{text-align:center;padding:30px;color:var(--muted)}.item-editor{display:grid;grid-template-columns:220px 1fr;gap:24px;margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}.item-editor img{width:100%;max-height:250px;object-fit:contain;border:1px solid var(--line)}.item-editor a{display:block;font-size:12px;margin-top:7px;color:var(--teal)}.item-editor form{display:grid;gap:13px}.item-editor .row button{font-size:12px}.usage{display:grid;grid-template-columns:1fr 1fr;gap:15px}.usage details{grid-column:1/-1;font-size:13px}pre{overflow:auto;max-height:360px;background:#f3f6f6;padding:14px;font-size:11px}.usage-cards{display:flex;gap:25px;justify-content:flex-end;align-items:center}.usage-cards strong{display:block;font-size:25px}.usage-cards span{font-size:11px;color:var(--muted)}footer{padding:20px 4px;color:var(--muted);font-size:11px}dialog{border:1px solid var(--line);border-radius:12px;width:430px;padding:25px;color:var(--ink)}dialog::backdrop{background:#102f3b55}dialog h2{margin-bottom:18px}dialog .row{margin-top:20px}[hidden]{display:none!important}a{color:var(--teal)}

@media(min-width:1600px){.workspace{grid-template-columns:265px minmax(450px,1fr) 320px}.viewport{height:700px}}

@media(max-width:1150px){.workspace{grid-template-columns:210px minmax(350px,1fr)}.inspector{grid-column:1/-1;display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:20px}.inspector>.section-title{grid-column:1/-1;margin-bottom:0}.scale-block,.ai-block{margin:0;padding:0;border:0;background:white}.viewport{height:560px}.results-heading{align-items:start;flex-direction:column}}

@media(max-width:700px){main{padding:12px}.topbar{padding:0 15px;height:75px;gap:10px}.brand strong{font-size:19px}.brand span{font-size:8px;letter-spacing:1px}.brand svg{width:28px}.local-tag{display:none}.topbar button{font-size:11px}.projectbar{flex-wrap:wrap}.projectbar label{min-width:130px;flex:1}.projectbar #saved{width:100%;margin:0}.workspace{display:flex;flex-direction:column}.workspace>.panel{width:100%}.sources{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sources>.section-title,.source-list,.photo-list,.photo-heading{grid-column:1/-1}.sources .section-title{margin:0}.sources .hint{margin:0}.source-list{max-height:160px}.photo-heading{padding-top:12px;margin-top:8px}.photo-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.photo-card{margin:0}.inspector{display:block}.scale-block,.ai-block{margin-top:20px}.viewport{height:410px}.drawing-heading{align-items:start}.drawing-heading h2{font-size:15px;overflow-wrap:anywhere}.canvas-footer{flex-wrap:wrap}.canvas-footer>span{flex-basis:100%}.results,.usage{padding:16px}.item-editor{grid-template-columns:1fr}.item-editor>div{max-width:220px}.usage{grid-template-columns:1fr}.usage-cards{justify-content:space-between;gap:8px}.usage-cards strong{font-size:20px}.row label{min-width:130px}th,td{padding:10px}.badge{white-space:normal;font-size:10px}}

@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;top:-80px;left:12px;padding:12px;background:white;z-index:10}.skip-link:focus{top:12px}

.recognition-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 18px;background:var(--teal-light);border-top:1px solid var(--line)}.recognition-bar .hint{flex:1;min-width:190px;margin:0}.recognition-bar button{white-space:normal;text-align:center}.analysis-status{margin:0;padding:12px 18px;font-size:13px;background:#f5f8f8;overflow-wrap:anywhere}.analysis-status.error{background:#fff0ed;color:#9c3120}



/* Drawing names remain fully readable; file provenance is a separate line. */

.source-list{max-height:620px;gap:16px}

.source-page{display:flex;flex-direction:column;gap:7px;min-width:0}

.source-file{margin:0 2px 3px;font-size:12px;line-height:1.5;color:#40565d;overflow-wrap:anywhere}

.source-file span{display:block;font-weight:700;margin-top:3px}

.source-list button{padding:12px;min-height:58px;line-height:1.45}

.source-list button>span{min-width:0;width:100%;white-space:normal}

.source-name{display:block;font-size:14px;line-height:1.4;font-weight:650;white-space:normal;overflow-wrap:break-word}

.source-list small{font-size:12px;line-height:1.45;margin-top:4px;color:#40565d}

.source-mark-details{padding:12px 18px;border-top:1px solid var(--line);font-size:13px}

.source-mark-details summary{cursor:pointer}.source-mark-details label{margin-top:12px}

@media(min-width:1151px){.workspace{grid-template-columns:280px minmax(380px,1fr) 285px}}

@media(min-width:1600px){.workspace{grid-template-columns:285px minmax(450px,1fr) 320px}}

@media(max-width:700px){.source-list{max-height:300px}.source-name{font-size:14px}}



#item-editor { scroll-margin-top: 20px; } #selection-title:focus { outline: 2px solid #00796b; outline-offset: 4px; }


/* Staddle huisstijl: Inkt & abrikoos, shared with Eagle Measure.
   Drawing/measurement colors are intentionally independent of interface colors. */
:root {
  color-scheme: light;
  --ink: #262536;
  --muted: #65616b;
  --bg: #faf6f2;
  --line: #e4ddd7;
  --input-border: #a6a0a8;
  --accent: #ffaf87;
  --accent-soft: #fff0e7;
  --teal: var(--ink);
  --teal-light: var(--accent-soft);
  --white: #fff;
  --radius: 12px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body { background: var(--bg); }
.topbar {
  height: auto;
  min-height: 146px;
  max-width: 1920px;
  margin: auto;
  padding: 12px 24px 18px;
  gap: 24px;
  border: 0;
  background: var(--bg);
}
.brand { min-width: 0; display: block; }
.brand-logo { display: block; width: 350px; max-width: 100%; height: auto; }
.brand .brand-caption { font-size: 13px; letter-spacing: 0; margin: 0 0 0 20px; color: var(--muted); }
.local-tag { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line); }
.topbar > button { flex-shrink: 0; }
main { padding-top: 10px; }
.workspace > *, .results-heading > *, .usage > *, .item-editor > * { min-width: 0; }
button, .button, .upload {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  min-height: 44px;
}
button.secondary, .button.secondary, .upload.secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--input-border);
}
.text-button, td button { background: transparent; color: var(--ink); border-color: transparent; }
.danger { background: #fff2f2; color: var(--danger); border-color: #efcccc; }
button:active:not(:disabled), .button:active, .upload:active { filter: brightness(.91); }
:focus-visible, .upload:focus-within, #selection-title:focus { outline: 3px solid var(--ink); outline-offset: 3px; }
input, select, textarea { border-color: var(--input-border); min-height: 44px; }
.observer-human-reject{width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fff8f0}
.observer-human-reject[open]{display:grid;gap:10px}
.observer-human-reject label{margin-top:10px}
.observer-human-reject button{margin-top:10px}
.observer-human-reject[hidden]{display:none}
input[type=checkbox] { accent-color: var(--ink); min-height: 18px; width: 18px; height: 18px; flex-shrink: 0; }
.check { min-height: 44px; }
label.upload:focus-within { outline-offset: 3px; }
.panel { background: var(--white); }
.notice:not(.error):not(.busy) { background: var(--accent-soft); border-color: var(--line); color: var(--ink); }
.source-list button { background: var(--bg); color: var(--ink); }
.source-list button.active { background: var(--accent-soft); color: var(--ink); border-color: var(--ink); box-shadow: inset 3px 0 var(--ink); }
.source-file, .source-list small { color: var(--muted); }
.eyebrow { font-size: 11px; }
.photo-card button, .ref button, .canvas-footer button, .zoom-tools button, td button { min-height: 44px; }
.zoom-tools button { min-width: 44px; }
.zoom-tools { gap: 8px; }
.photo-card .row { gap: 8px; }
.viewport {
  background-color: #f1ece7;
  background-image: linear-gradient(#e4ddd7 1px, transparent 1px), linear-gradient(90deg, #e4ddd7 1px, transparent 1px);
}
.empty svg { stroke: var(--ink); }
.recognition-bar, .pending, tr.selected { background: var(--accent-soft); border-color: var(--line); }
.analysis-status, .ai-block, th, pre { background: var(--bg); }
.scale-block > label { margin-bottom: 10px; }
.scale-block > button { margin-bottom: 8px; }
.badge.ok { background: #e5f4ef; color: #006b61; border-color: #aed2c6; }
.item-editor a, a { color: var(--ink); text-underline-offset: 3px; }
summary { min-height: 44px; padding-block: 10px; }
.projectbar label { flex: 1; }
.projectbar #saved { overflow-wrap: anywhere; }
#reset-analysis { flex-shrink: 0; white-space: normal; text-align: center; }
#reset-dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
#reset-dialog .row { display: flex; flex-wrap: wrap; gap: 8px; }
.results-heading .row { flex-shrink: 1; }
.results-heading .row .button { white-space: normal; }
.usage-cards { flex-wrap: wrap; row-gap: 16px; }
.table-wrap { max-width: 100%; }
dialog { max-width: calc(100vw - 32px); background: var(--white); }
dialog::backdrop { background: #26253666; }
@media (max-width: 700px) {
  .topbar { padding: 8px 14px 16px; gap: 12px; flex-wrap: wrap; min-height: 0; }
  .brand { flex-basis: 100%; margin-right: 0; }
  .brand-logo { width: 320px; }
  .brand .brand-caption { margin-left: 18px; font-size: 13px; }
  .topbar button { font-size: 13px; margin-left: 0; }
  main { padding: 10px 14px; }
  .projectbar label { min-width: 0; max-width: 100%; flex-basis: 100%; }
  #reset-analysis { width: 100%; }
  .drawing-heading { flex-wrap: wrap; }
  .drawing-heading > div { min-width: 0; }
  .sources, .inspector { padding: 16px; }
  .sources { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photo-list { grid-template-columns: minmax(0, 1fr); }
  .ai-block { margin-inline: -16px; padding-inline: 16px; }
  .toolbar label { min-width: 0; flex-basis: 100%; }
  .toolbar select, .projectbar select { max-width: 100%; }
  .recognition-bar button { width: 100%; }
  .recognition-bar .hint { min-width: 0; }
  .canvas-footer { gap: 8px; }
  .row label { min-width: min(130px, 100%); }
  .row > button, .row > .button { max-width: 100%; white-space: normal; }
  .usage-cards > div { min-width: 100px; }
}
/* Optional run observer: the existing drawing and measure layout stays intact. */
.observer-panel{position:fixed;z-index:80;right:0;top:0;bottom:0;width:min(560px,100vw);overflow:auto;padding:20px;background:#fff;border-left:1px solid #d8d2cc;box-shadow:-12px 0 36px #1d263329}
.observer-panel[hidden],.observer-panel [hidden]{display:none!important}
.observer-panel header{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid #e4ded8;margin-bottom:16px}
.observer-panel h2,.observer-panel h3{margin:4px 0 12px}
.observer-panel .row{display:flex;flex-wrap:wrap;gap:8px}
.observer-panel button{min-height:36px}
.observer-calls{display:grid;gap:8px;margin:16px 0}
.observer-call{display:block;width:100%;text-align:left;padding:12px;border:1px solid #d8d2cc;border-radius:10px;background:#faf8f5;color:inherit}
.observer-call strong,.observer-call small{display:block}
.observer-call small{margin-top:4px;line-height:1.4}
.observer-phases{border:1px solid #e4ded8;border-radius:10px;padding:6px 12px;background:#fffaf5;font-size:12px;line-height:1.4}
.observer-phases p{margin:6px 0}
.observer-image-choices{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.observer-image-choices button{font-size:12px;text-align:left;white-space:normal}
.observer-image-wrap{position:relative;overflow:hidden;background:#eee}
.observer-image-wrap img{display:block;width:100%;height:auto}
.observer-image-wrap svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

.observer-live{margin:12px 0;padding:12px 14px;border:1px solid #e6d0ca;border-left:4px solid #c62828;border-radius:9px;background:#fff8f5;line-height:1.45}
.observer-live strong{display:block;color:#752d25}
.observer-live p{margin:4px 0 0}
.observer-live.completed{border-color:#a9cec3;border-left-color:#287361;background:#f3faf7}
.observer-live.completed strong{color:#205b4d}
.observer-image-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.observer-image-heading h3{margin-bottom:8px}
.observer-findings{margin:14px 0;padding:12px;border:1px solid #e4ded8;border-radius:10px;background:#faf8f5}
.observer-findings h3{margin:0 0 6px}
.observer-findings p{margin:0 0 8px}
#observer-findings-list{display:grid;gap:5px}
.observer-finding{display:block;width:100%;min-height:32px!important;text-align:left;padding:7px 9px;border:1px solid #e4ded8;border-radius:7px;background:white;color:inherit;font-size:13px}
.observer-finding:hover,.observer-finding:focus-visible{border-color:#c62828;background:#fff5f2}
@media(max-width:620px){.observer-panel{width:100vw;padding:16px;border-left:0}.observer-panel header{position:sticky;top:-16px;background:#fff;z-index:1}}

/* Feedback v1: bounded image layout and honest request-level live state. */
.observer-panel{width:min(700px,100%);max-width:100%}
.observer-panel.expanded,.observer-panel:fullscreen{width:100vw;height:100vh;max-width:none;border:0}
.observer-panel header{position:sticky;top:-20px;background:white;z-index:3;padding:10px 0}
.observer-panel button{min-height:44px}
.observer-preview-stage{position:relative;display:flex;justify-content:center;background:#f1eeeb;min-width:0;margin:12px 0;overflow:hidden}
.observer-image-wrap{max-width:100%;width:max-content;flex:0 1 auto}
.observer-image-wrap img{width:auto;height:auto;max-width:100%;max-height:62vh;object-fit:contain}
.observer-panel:fullscreen .observer-image-wrap img,.observer-panel.expanded .observer-image-wrap img{max-height:70vh}

.observer-image-wrap svg *{vector-effect:non-scaling-stroke}
#observer-live-badge{position:absolute;right:8px;top:8px;z-index:2;border-radius:20px;background:#fff;color:#a02222;padding:6px 10px;font-size:12px;box-shadow:0 1px 5px #0002}
#observer-live-badge i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#bd2828;margin-right:6px;animation:request-live 1.8s infinite}
@keyframes request-live{50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){#observer-live-badge i{animation:none}}
.observer-call.active{border:2px solid #aa4b25;background:#fff0e6}
.timeline-heading{border-top:2px solid #d5cbc1;padding-top:18px;margin-top:24px!important}
.observer-legend{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.observer-legend span{border-left:5px solid;padding:3px 7px;background:#faf8f5;font-size:13px}
.observer-preview-stage.has-route-marks{padding:28px;overflow:visible}
.has-route-marks .observer-image-wrap{overflow:visible}
.has-route-marks .observer-image-wrap svg{overflow:visible}
.observer-live-mark{animation:observer-mark-pulse 1.8s ease-in-out 2}
@keyframes observer-mark-pulse{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.observer-live-mark{animation:none}}
.route-correction label{display:grid;gap:5px;margin:10px 0}
.route-correction input{max-width:150px}
.route-review-card{width:100%;margin:4px 0;padding:10px 12px}
.route-review-card summary{font-weight:600;cursor:pointer;min-height:28px}
.observer-problem{border:1px solid #d7b697;background:#fff6e9;border-radius:10px;padding:14px;margin:14px 0}
.observer-question{background:#fff;border:1px solid #e6c9aa;border-radius:8px;padding:12px;margin:10px 0}
.observer-question p{margin:7px 0}
.observer-measure-questions{flex:1 1 100%;border:1px solid #ca9b5f;background:#fff8eb;border-radius:10px;padding:12px;margin:10px 0}
.observer-measure-questions h3{margin:0 0 6px;font-size:15px}
.observer-measure-group{border-top:1px solid #e2c9a7;padding:4px 0}
.observer-measure-group summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700;overflow-wrap:anywhere}
.observer-measure-group summary:focus-visible{outline:2px solid #39344f;outline-offset:2px}
.observer-measure-card{border-left:3px solid #b46b30;background:#fff;padding:10px;margin:8px 0}
.observer-measure-card p{margin:7px 0;overflow-wrap:anywhere}
.observer-measure-card label{display:block;margin-top:10px}
.observer-measure-card textarea{display:block;width:100%;max-width:100%}
.analysis-assistant{position:fixed;bottom:18px;left:18px;z-index:60;display:flex;align-items:center;gap:9px;max-width:min(400px,calc(100vw - 36px));padding:10px 14px;background:#fffaf5;color:#302b29;border:1px solid #bfae9e;border-radius:16px;box-shadow:0 3px 18px #0002;text-align:left}
.analysis-assistant[hidden]{display:none}
.analysis-assistant img{object-fit:contain}.analysis-assistant span{min-width:0}.analysis-assistant small{display:block;max-width:270px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.analysis-assistant.attention{border:2px solid #b54a26;background:#fff0e5}
.analysis-status{cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.type-members{display:flex;flex-wrap:wrap;gap:3px;max-width:280px}.type-members button{min-height:32px}
.observer-panel [hidden]{display:none!important}

#observer-image{scroll-margin-top:80px}
.analysis-assistant:not(.attention){width:52px;height:52px;min-height:52px;padding:10px;justify-content:center;border-radius:50%;background:white}
.analysis-assistant:not(.attention) img{width:32px;height:32px}
.analysis-assistant:not(.attention) span{display:none}

.analysis-assistant:not(.attention){padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.analysis-assistant:not(.attention) img{width:52px;height:52px}
.analysis-assistant.attention img{width:44px;height:44px;flex-shrink:0}
.observer-budget{display:block;width:100%;text-align:left;margin:16px 0;font-size:12px;line-height:1.5}
.observer-budget::after{content:' - Details per stap'}
.observer-packet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.observer-packet-grid button{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0;text-align:left;font-size:12px;overflow-wrap:anywhere}
.observer-packet-grid img{width:100%;height:130px;object-fit:contain;background:#f4f3f0;display:block}
#observer-live-badge img{width:25px;height:25px;vertical-align:middle}
#observer-live-badge{display:flex;align-items:center;gap:6px;max-width:calc(100% - 16px);font-weight:700}
#observer-live-badge[hidden]{display:none}
#observer-live-badge i{flex:none;margin:0}
.observer-badge-task{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.observer-call-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.observer-call-head strong{min-width:0;overflow-wrap:anywhere}
.observer-call-head time{flex:none;color:#61534e;font-size:12px;white-space:nowrap}
.observer-call-head{position:relative;padding-right:48px;min-height:44px}
.observer-item-menu{position:absolute;right:0;top:0;z-index:3}
.observer-item-menu[open]{z-index:5}
.observer-item-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;width:44px;height:44px;border:1px solid #c6bab3;border-radius:7px;background:#fff;font-size:24px;cursor:pointer;color:#28252c}
.observer-item-menu>summary::-webkit-details-marker{display:none}
.observer-item-menu>summary:focus-visible{outline:2px solid #28252c;outline-offset:2px}
.observer-item-options{position:absolute;right:0;top:48px;display:grid;gap:8px;width:310px;max-width:calc(100vw - 72px);padding:12px;background:#fff;border:1px solid #c6bab3;border-radius:8px;box-shadow:0 5px 20px #28252c22}
.observer-item-options button{width:100%;min-height:44px;text-align:left;white-space:normal}
.observer-item-options small:empty{display:none}
.observer-human-row{position:relative;min-height:44px}
.observer-human-row>.observer-item-menu{right:10px;top:6px}
.observer-human-row>.observer-human-event>summary{padding-right:64px;min-height:44px}
.observer-comparison{margin-top:10px;padding-top:10px;border-top:1px solid #d8d2cc;line-height:1.45}
.observer-comparison p{margin:4px 0}
.observer-comparison-verdict{font-weight:700}
.observer-comparison-sources{color:#514b48;overflow-wrap:anywhere}
.observer-comparison-lead{max-width:75ch}
.observer-comparison-evidence{margin-top:6px}
.observer-comparison-evidence summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}
.observer-comparison-evidence summary::before{content:'▸';margin-right:8px}
.observer-comparison-evidence[open] summary::before{content:'▾'}
.observer-comparison-evidence summary:focus-visible{outline:2px solid #39344f;outline-offset:2px}
.observer-comparison-evidence strong{margin-top:8px}
.observer-comparison-evidence p{max-width:75ch}
.observer-comparison-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:6px 0 16px}
.observer-comparison-type{min-width:0;overflow-wrap:anywhere}
.observer-comparison-source{display:flex;flex-direction:column;align-items:center;width:100%;gap:6px;margin:6px 0 12px}
.observer-comparison-picture{position:relative;display:block;width:100%;max-width:240px;background:#efebe7}
.observer-comparison-source img{display:block;width:100%;height:auto}
.observer-comparison-point{position:absolute;width:12px;height:12px;border:2px solid #146b82;background:#ffffffa6;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #fff}
.observer-comparison-source span{font-size:12px}
@media(max-width:480px){.observer-comparison-pair{grid-template-columns:1fr}.observer-comparison-sources{font-size:13px}}
.observer-preview-items{display:grid;gap:4px;margin-top:10px;padding-top:8px;border-top:1px solid #e8ddd3}
.observer-preview-item{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.observer-preview-item b{flex:none;color:#86624d;font-size:15px;line-height:1}
.observer-preview-item.confirmed b{color:#18744f}
.observer-preview-item.rejected b{color:#bc3030}
@media(max-width:480px){.observer-call-head{align-items:flex-start;flex-direction:column;gap:3px}}
.source-page .source-trash{width:auto;padding:5px 8px;min-height:32px;margin:0 0 8px;font-size:11px}
.trash-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px 0;border-bottom:1px solid #ddd}
#trash-dialog{width:min(600px,90vw)}

/* A waiting cue, not model attention or measurable progress. */
#observer-scan{position:absolute;inset:0;overflow:hidden;pointer-events:none}
#observer-scan[hidden]{display:none}
#observer-scan span{position:absolute;inset:0;border-bottom:2px solid #bd5429;background:linear-gradient(to bottom,transparent 86%,#ffad7938);animation:observer-scan-down 4s linear infinite;will-change:transform}
@keyframes observer-scan-down{from{transform:translateY(-100%)}to{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#observer-scan{display:none}#observer-scan span{animation:none;will-change:auto}}

.observer-question-event {border-bottom:1px solid #ddd4cc;padding:2px 8px;font-size:13px;}
.observer-question-event summary {cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;}
.observer-question-event summary time {font-size:11px;color:#635d6b;white-space:nowrap;}
.observer-question-event p {margin:8px 0;}
.observer-question-event summary:focus-visible {outline:2px solid #39344f;outline-offset:2px;}

/* V4: review moments and questions are compact rows; AI steps remain cards. */
.observer-human-event,.observer-question-event{min-width:0;border:0;border-bottom:1px solid var(--line);border-left:3px solid #146b82;border-radius:0;background:transparent;padding:0 8px;font-size:13px;line-height:1.4}
.observer-question-event{border-left-color:#a87628}
.observer-question-event.answered{border-left-color:#64756a}
.observer-human-event>summary,.observer-question-event>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;cursor:pointer;padding:4px 0;list-style:none}
.observer-human-event>summary::before,.observer-question-event>summary::before{content:'▸';flex:none}
.observer-human-event[open]>summary::before,.observer-question-event[open]>summary::before{content:'▾'}
.observer-human-event>summary>span,.observer-question-event>summary>span{flex:1;min-width:0;overflow-wrap:anywhere}
.observer-human-event time,.observer-question-event summary time{font-size:12px;color:#635d6b;white-space:nowrap}
.observer-human-event>summary:focus-visible,.observer-question-event>summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.observer-human-history{margin:0 0 8px;padding:6px 8px;border-top:1px solid var(--line);background:var(--white);overflow-wrap:anywhere}
.observer-human-history p{margin:4px 0}
.observer-human-history pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.observer-decision-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
.observer-decision-row button{min-height:44px;padding:7px 9px;font-size:13px;white-space:normal}
#observer-actions{gap:8px;margin:8px 0}
#observer-actions>section,#observer-actions>.hint{width:100%;min-width:0}
.observer-problem.quiet{border:0;background:transparent;padding:0;margin:8px 0}
.observer-problem.quiet>h3,.observer-problem.quiet>#observer-problem-text,.observer-problem.quiet>#observer-problem-hint,.observer-problem.quiet>#observer-problem-show{display:none}
.observer-live{margin:8px 0;padding:9px 12px}
@media(max-width:480px){.observer-human-event>summary,.observer-question-event>summary{flex-wrap:wrap;gap:4px 8px}.observer-human-event time,.observer-question-event summary time{margin-left:16px}.observer-decision-row button{flex:1 1 auto}}

/* Human review of saved plan findings */
.plan-review {width:100%;min-width:0;margin:12px 0;container-type:inline-size;}
.plan-review-plan {border:1px solid #b6b1ab;border-radius:10px;padding:14px;margin:12px 0;background:#fff;}
.plan-review-plan>summary {font-weight:700;cursor:pointer;padding:8px 0;}
.plan-review-layout {display:grid;grid-template-columns:minmax(200px,.9fr) minmax(260px,1.1fr);gap:18px;align-items:start;}
.plan-review-visual {position:sticky;top:90px;max-width:430px;width:100%;margin:0 auto;}
.plan-review-visual svg {display:block;width:100%;height:auto;max-height:none;background:#efeeec;border:1px solid #b6b1ab;}
.plan-review-item {border:1px solid #c7c3bd;border-radius:8px;margin:0 0 12px;padding:12px;background:#fff;}
.plan-review-item>summary {font-weight:700;cursor:pointer;line-height:1.5;}
.plan-review-item p,.plan-review-item li {font-size:14px;line-height:1.5;}
.plan-review-item ul {padding-left:20px;}
.plan-review-item button {min-height:44px;margin-top:4px;}
.plan-review-state {font-weight:700;color:#375361;}
.plan-review-editor {border-top:1px solid #c7c3bd;margin-top:12px;padding-top:10px;}
.plan-review-editor label {display:block;margin:10px 0;}
.plan-review-editor input,.plan-review-editor select,.plan-review-editor textarea {width:100%;}
.plan-review-walls>summary {cursor:pointer;padding:12px 0;font-weight:600;}
@container(max-width:550px){.plan-review-layout{grid-template-columns:1fr;}.plan-review-visual{position:static;max-width:320px;}}
.late-measure-review{width:100%;min-width:0;container-type:inline-size;}
.late-measure-object{border-top:1px solid #d9d0c8;margin-top:20px;padding-top:10px;}
.late-measure-source{border:1px solid #d9d0c8;border-radius:10px;background:#fff;padding:12px;margin:12px 0;}
.late-measure-source>summary{font-weight:700;cursor:pointer;min-height:36px;}
.late-measure-layout{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(240px,1.2fr);gap:16px;align-items:start;}
.late-measure-layout svg{display:block;width:100%;max-height:450px;background:#f4f2ee;margin-bottom:10px;}
.late-measure-layout .row{gap:8px;flex-wrap:wrap;}
.late-measure-editor label{display:block;margin:10px 0;}
.late-measure-editor input,.late-measure-editor select,.late-measure-editor textarea{width:100%;}
@container(max-width:550px){.late-measure-layout{grid-template-columns:1fr;}.late-measure-layout svg{max-height:300px;}}

.recognition-bar #observer-toggle{margin-left:auto;flex:0 0 auto}.observer-human-event{border-left:3px solid #146b82}.observer-human-event pre{white-space:pre-wrap;overflow-wrap:anywhere}

.mini-correction{padding:1rem 0;border-bottom:1px solid var(--line,#d8d4cf)}.mini-correction button{margin:4px}

/* Scoped UI candidate: no measurement, geometry or process styles. */
#observer-panel .observer-top{margin:8px 0 16px}
#observer-panel .observer-control-strip{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#observer-panel #observer-actions{display:contents}
#observer-panel .observer-control-strip>.observer-decision-row,#observer-panel #observer-actions>.observer-decision-row{display:contents}
#observer-panel .observer-control-strip button{margin:0;white-space:normal;padding:8px 12px}
#observer-panel :is(.observer-control-strip,.observer-decision-row,.observer-chat-choices,.observer-human-reject) button{background:var(--accent,#ffaf87);border-color:var(--accent,#ffaf87);color:var(--ink,#242631);max-width:100%;overflow-wrap:anywhere;white-space:normal}
#observer-panel :is(.observer-control-strip,.observer-decision-row,.observer-chat-choices,.observer-human-reject) button:hover:not(:disabled){background:#ffa275;border-color:#ffa275}
#observer-panel :is(.observer-control-strip,.observer-decision-row,.observer-chat-choices,.observer-human-reject) button:focus-visible{outline:3px solid var(--ink,#242631);outline-offset:3px}
#observer-panel .observer-control-strip section,#observer-panel .observer-control-strip details,#observer-panel .observer-control-strip .hint{flex-basis:100%;min-width:0}
#observer-panel #observer-actions>p{flex-basis:100%;order:2;margin:5px 0}
#observer-panel .observer-chat pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
#observer-panel .observer-chat{border:1px solid var(--line,#ded6cf);border-radius:14px;overflow:hidden;background:#fffdfa;margin:12px 0 20px}
#observer-panel .observer-chat-head{display:grid;grid-template-columns:48px minmax(0,1fr) 26px 18px;gap:12px;align-items:center;width:100%;padding:18px;text-align:left;border:0;background:#fffdfa;color:var(--ink,#242631);border-radius:0}
#observer-panel .observer-chat-head strong{display:block;font-size:16px}
#observer-panel .observer-chat-brand{width:48px;height:48px;overflow:hidden;position:relative;display:block;border-radius:12px}
#observer-panel .observer-chat-brand img{position:absolute;width:214px;height:auto;max-width:none;left:-13px;top:-13px}
#observer-panel .observer-chat-status{display:block;font-size:12px;line-height:1.5;color:#68636b;margin-top:4px}
#observer-panel .observer-chat-status.needs-answer{color:#b32c35}
#observer-panel .observer-chat-count{border-radius:50%;display:grid;place-items:center;width:26px;height:26px;background:#b32c35;color:white;font-size:12px}
#observer-panel .observer-chat-head>svg{transition:transform .15s}
#observer-panel .observer-chat-head[aria-expanded=true]>svg{transform:rotate(180deg)}
#observer-panel .observer-chat-body{padding:18px;background:#f7f3ee;border-top:1px solid var(--line,#ded6cf)}
#observer-panel .observer-chat-thread{padding:8px 0 18px;scroll-margin-top:110px;min-width:0}
#observer-panel .observer-chat-bubble{position:relative;margin-left:10px;background:white;border-radius:0 14px 14px 14px;padding:12px 14px;width:fit-content;max-width:90%;box-shadow:0 1px 3px #24263113;overflow-wrap:anywhere}
#observer-panel .observer-chat-bubble:before{content:'';position:absolute;top:0;left:-9px;width:10px;height:12px;background:white;clip-path:polygon(0 0,100% 0,100% 100%)}
#observer-panel .observer-chat-thread.selected .observer-chat-bubble{outline:2px solid #bd7445;outline-offset:2px}
#observer-panel .observer-chat-context{color:#68636b;font-size:12px}
#observer-panel .observer-chat-question{font-size:14px;line-height:1.55;margin:7px 0}
#observer-panel .observer-chat-bubble .hint{font-size:12px;line-height:1.5;margin:7px 0;max-width:60ch}
#observer-panel .observer-chat-inspect{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;background:transparent;color:#5f5861;margin:2px 0 -6px -7px}
#observer-panel .observer-chat-inspect:hover{background:#f2ece5}
#observer-panel .observer-chat-choices{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 6px 10px}
#observer-panel .observer-chat-choices .observer-decision-row{display:contents}
#observer-panel .observer-chat-choices button{font-size:13px;padding:8px 12px}
#observer-panel .observer-chat-more{margin:8px 0 10px 10px;border:0;padding:0;background:transparent;min-width:0}
#observer-panel .observer-chat-more>summary,#observer-panel .observer-chat-archive>summary,#observer-panel .observer-chat-local>summary{font-size:13px;color:#625b63;min-height:44px;padding:10px 0;cursor:pointer}
#observer-panel .observer-chat-controls{border:0;background:transparent;padding:0;margin:0;max-width:100%;width:100%}
#observer-panel .observer-chat-controls>strong,#observer-panel .observer-chat-controls>p:not([role]),#observer-panel #observer-problem.observer-chat-controls>h3{display:none}
#observer-panel .observer-chat-controls label{display:block;margin:8px 0}
#observer-panel .observer-chat-controls textarea,#observer-panel .observer-chat-controls select,#observer-panel .observer-chat-controls input{max-width:100%;width:100%}
#observer-panel .observer-chat-reply{position:relative;width:fit-content;max-width:85%;margin:14px 10px 6px auto;padding:11px 14px;border-radius:14px 0 14px 14px;background:#ffd5b8;color:#5f3216;overflow-wrap:anywhere;font-size:13px}
#observer-panel .observer-chat-reply:after{content:'';position:absolute;right:-9px;top:0;width:10px;height:12px;background:#ffd5b8;clip-path:polygon(0 0,100% 0,0 100%)}
#observer-panel .observer-chat-reply small{font-size:12px;color:#74492d}
#observer-panel .observer-chat-reply p{margin:5px 0 0}
#observer-panel .observer-chat-empty{text-align:center;padding:18px 8px;color:#68636b;font-size:14px;line-height:1.6}
#observer-panel .observer-chat-archive{border-top:1px solid var(--line,#ded6cf);margin-top:12px}
#observer-panel .observer-chat-archive article+article{border-top:1px solid var(--line,#ded6cf)}
#observer-panel .observer-chat-timeline-row{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:10px;padding:10px 8px;border-left:3px solid #146b82;border-bottom:1px solid var(--line,#ded6cf);font-size:13px;line-height:1.5}
#observer-panel .observer-chat-timeline-title{min-width:0;overflow-wrap:anywhere}
#observer-panel .observer-chat-timeline-row time{font-size:11px;color:#635d6b;white-space:nowrap}
#observer-panel .observer-item-menu{position:relative;flex:none;align-self:center;margin:0}
#observer-panel .observer-item-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--line,#ded6cf);border-radius:8px;background:white;cursor:pointer;line-height:1;font-size:22px}
#observer-panel .observer-item-menu>summary::-webkit-details-marker{display:none}
#observer-panel .observer-item-options{position:absolute;right:0;top:calc(100% + 6px);width:min(260px,70vw);z-index:8;padding:8px;border:1px solid var(--line,#ded6cf);border-radius:9px;background:white;box-shadow:0 5px 20px #0002;display:grid;gap:6px}
#observer-panel .observer-item-options button{width:100%;text-align:left;white-space:normal;margin:0}
#observer-panel #observer-budget{margin:14px 0 0;width:100%;text-align:left}
#observer-panel :is(.observer-chat,.observer-item-menu) :is(button,summary,input,select,textarea):focus-visible{outline:2px solid #6a4133;outline-offset:3px}
@media(max-width:480px){#observer-panel .observer-chat-head{padding:13px;gap:8px}#observer-panel .observer-chat-body{padding:13px 10px}#observer-panel .observer-chat-head strong{font-size:14px}#observer-panel .observer-chat-timeline-row{grid-template-columns:minmax(0,1fr) 44px}#observer-panel .observer-chat-timeline-row time{grid-column:1;grid-row:2}#observer-panel .observer-chat-timeline-row .observer-item-menu{grid-column:2;grid-row:1 / span 2}#observer-panel .observer-control-strip button{flex:0 1 auto}#observer-panel .observer-chat-controls :is(input,select,textarea){font-size:16px}}
@media(prefers-reduced-motion:reduce){#observer-panel .observer-chat-head>svg{transition:none}}

#observer-panel .observer-chat-timeline-row .observer-item-options{top:auto;bottom:calc(100% + 6px)}

/* Revision 2: a single chat bubble and row-major batch navigation. */
#observer-panel .observer-chat-bubble{width:100%;max-width:96%;box-sizing:border-box;padding:16px}
#observer-panel .observer-chat-question{margin:0 42px 8px 0;font-size:15px}
#observer-panel .observer-chat-inspect{position:absolute;right:10px;top:9px;margin:0}
#observer-panel .observer-chat-choices{margin:16px 0 0;gap:8px}
#observer-panel .observer-chat-more{margin:8px 0 0}
#observer-panel .observer-chat-flat{border:0;margin:0;padding:0;background:none}
#observer-panel .observer-chat-controls>summary[hidden],#observer-panel .observer-chat-flat>summary[hidden],#observer-panel .observer-chat-controls>.observer-image-choices[hidden]{display:none}
#observer-panel .observer-chat-thread{padding-bottom:10px}
#observer-panel #observer-batch-info{margin:12px 0 16px}
#observer-panel #observer-batch-info:empty{display:none}
#observer-panel .observer-live #observer-batch-info{margin:8px 0 0}
#observer-panel .observer-live #observer-batch-info p{margin:4px 0;font-size:13px}
#observer-panel .observer-timeline{border:0;padding:0;margin:16px 0;background:none}
#observer-panel .observer-timeline>.timeline-heading{cursor:pointer;min-height:44px;padding:12px 0;font-size:16px;font-weight:700}
#observer-panel .observer-timeline>.timeline-heading:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
#observer-panel .observer-color-green{color:#167344}
#observer-panel .observer-color-orange{color:#a74b08}
#observer-panel .observer-color-red{color:#b32c35}
#observer-panel .observer-color-gray{color:#68636b}
#observer-panel #observer-budget{margin:0 0 14px}
#observer-panel .observer-batch-gallery{margin:0 0 18px}
#observer-panel .observer-batch-gallery h4{font-size:13px;margin:0 0 10px}
#observer-panel .observer-batch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;gap:8px;max-height:232px;overflow-y:auto;overscroll-behavior:contain;padding:3px;scrollbar-gutter:stable}
#observer-panel .observer-batch-grid button{display:flex;flex-direction:column;gap:6px;align-items:stretch;padding:7px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:8px;font-size:12px;text-align:left}
#observer-panel .observer-batch-grid button[aria-pressed=true]{border-color:#a9592d;box-shadow:0 0 0 2px #a9592d;background:#fff4ea}
#observer-panel .observer-batch-grid img{display:block;width:100%;height:78px;object-fit:contain;background:#f2efeb}
#observer-panel .observer-batch-grid span{overflow-wrap:anywhere;line-height:1.4}
#observer-panel .observer-batch-grid button:focus-visible{outline:3px solid #242631;outline-offset:1px}
#observer-panel .observer-question-focus{pointer-events:none}
@media(max-width:480px){#observer-panel .observer-batch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#observer-panel .observer-chat-bubble{padding:13px;max-width:96%}}

#observer-panel .observer-selected-result{border:0;padding:0;margin:12px 0;background:none}#observer-panel .observer-selected-result>summary[hidden],#observer-panel .observer-selected-result>.observer-image-choices[hidden],#observer-panel .observer-selected-result[hidden]{display:none}

/* Compact timeline: heading, usage, then source links on their own row. */
#observer-panel .observer-calls{gap:6px;margin:10px 0}
#observer-panel .observer-call{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);gap:2px 12px;padding:8px 58px 8px 10px;border-radius:8px}
#observer-panel .observer-call>*{grid-column:1 / -1;min-width:0}
#observer-panel .observer-call-head{display:flex;flex-direction:row;align-items:center;min-height:20px;padding-right:0;gap:12px}
#observer-panel .observer-call-head strong{font-size:13px;line-height:1.4}
#observer-panel .observer-call-head time{font-size:11px}
#observer-panel .observer-call-head .observer-item-menu{position:absolute;right:-49px;top:-5px}
#observer-panel .observer-call-head .observer-item-menu>summary{background:transparent;border-color:transparent}
#observer-panel .observer-call>small:first-of-type{grid-column:1;grid-row:2;align-self:center;margin:0;font-size:12px}
#observer-panel .observer-call>.observer-image-choices{grid-column:2;grid-row:2;justify-content:flex-end;align-self:center;margin:0;gap:4px;max-width:360px}
#observer-panel .observer-call>.observer-image-choices button{min-height:30px;padding:4px 8px;font-size:12px;line-height:1.4}
@media(max-width:480px){#observer-panel .observer-call{grid-template-columns:minmax(0,1fr)}#observer-panel .observer-call-head{flex-wrap:wrap;gap:2px 10px}#observer-panel .observer-call-head time{font-size:11px}#observer-panel .observer-call>.observer-image-choices{grid-column:1;grid-row:auto;justify-content:flex-start;max-width:none}}
@media(pointer:coarse){#observer-panel .observer-call>.observer-image-choices button{min-height:44px}}
#observer-panel .observer-call>.observer-image-choices{grid-column:1 / -1;grid-row:auto;justify-content:flex-start;max-width:none;margin:2px -48px 0 0}
#observer-panel .observer-call>small:first-of-type{grid-column:1 / -1}

/* Full-screen workspace: readable controls beside a bounded drawing. */
#observer-panel.expanded{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:100dvh;margin:0;border:0;border-radius:0;padding:20px;box-sizing:border-box}
#observer-panel.expanded>header{position:sticky;top:-20px;margin:0 0 16px;z-index:5}
#observer-panel.expanded .observer-image-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
#observer-panel.expanded .observer-image-heading h3{font-size:15px;overflow-wrap:anywhere}
#observer-panel.expanded .observer-batch-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));max-height:132px}
#observer-panel.expanded .observer-batch-grid img{height:64px}
#observer-panel.expanded .observer-batch-gallery{margin-bottom:12px}
#observer-panel.expanded .observer-preview-stage{margin:10px 0}
#observer-panel.expanded .observer-image-wrap img{max-height:68dvh}
@media(min-width:1050px){
 #observer-panel.expanded{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr;column-gap:24px;align-items:start;overflow:auto}
 #observer-panel.expanded>header{grid-column:1 / -1;grid-row:1;position:sticky;top:-20px}
 #observer-panel.expanded>.observer-top{display:contents}
 #observer-panel.expanded>.observer-top>.observer-live{grid-column:1;grid-row:3;min-width:0;margin:0 0 12px}
 #observer-panel.expanded>.observer-top>.observer-control-strip{grid-column:1 / -1;grid-row:2;min-width:0;margin:0 0 16px}
 #observer-panel.expanded>.observer-chat{grid-column:1;grid-row:4;margin:0 0 12px}
 #observer-panel.expanded .observer-chat-body{max-height:48dvh;overflow:auto;overscroll-behavior:contain}
 #observer-panel.expanded>.observer-timeline{grid-column:1;grid-row:5;margin:0;max-height:48dvh;overflow:auto}
 #observer-panel.expanded>#observer-image{grid-column:2;grid-row:3 / span 3;min-width:0;width:100%;max-width:1500px;justify-self:center}
 #observer-panel.expanded>#observer-packet{grid-column:2}
 #observer-panel.expanded .observer-image-wrap img{max-height:max(220px,calc(100dvh - 490px))}
 #observer-panel.expanded #observer-image:has(.observer-batch-gallery:not([hidden])) .observer-image-wrap img{max-height:max(220px,calc(100dvh - 650px))}
 #observer-panel.expanded .observer-chat-head{padding:14px;gap:8px;grid-template-columns:40px minmax(0,1fr) 26px 18px}
 #observer-panel.expanded .observer-chat-brand{width:40px;height:40px}
 #observer-panel.expanded .observer-chat-brand img{width:180px;left:-11px;top:-11px}
 #observer-panel.expanded .observer-chat-head strong{font-size:15px}
 #observer-panel.expanded .observer-chat-body{padding:14px 10px}
}

/* Element tables: scoped to presentation; existing edit forms remain intact. */
#element-overview{margin:22px 0;min-width:0}
#element-overview .eo-scroll{overflow:auto;max-height:62vh;overscroll-behavior:contain;max-width:100%}
#element-overview table{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:13px}
#element-overview th{padding:9px 14px;background:#f5f1ed;border-top:1px solid var(--line);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1;white-space:nowrap;font-size:12px}
#element-overview td{padding:10px 14px;border-bottom:1px solid #eee8e3;white-space:nowrap;vertical-align:middle}
#element-overview td small{display:block;font-size:11px;color:#65616b;margin-top:4px}
#element-overview .eo-head{display:flex;align-items:center;gap:10px;justify-content:space-between}
#element-overview .eo-filter{padding:0;min-height:28px;width:28px;flex:none;border:1px solid #d8d0cb;border-radius:4px;background:#fff;color:#625a64;display:grid;place-items:center}
#element-overview .eo-filter svg{width:13px;height:13px}
#element-overview .eo-filter.active{background:#ffaf87;color:#262536;border-color:#b67b58}
#element-overview .eo-num{text-align:right;font-variant-numeric:tabular-nums}
#element-overview .eo-detail{border-top:1px solid var(--line);padding-top:18px;margin-top:16px}
#element-overview .eo-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:12px 0}
#element-overview .eo-tools label{margin:0;min-width:160px}
#element-overview .eo-tools select{margin-bottom:0}
#element-overview .eo-group td{background:#fcf8f4;font-weight:600;border-top:1px solid var(--line)}
#element-overview .eo-group td:first-child{border-left:3px solid #d8a184}
#element-overview .eo-member:hover td,#element-overview .eo-member:focus-within td{background:#fff0e7}
#element-overview .eo-member{cursor:pointer}
#element-overview .text-button{font-size:13px;min-height:32px}
#element-overview tfoot td{background:#f4eee8;font-weight:600;position:sticky;bottom:0;border-top:1px solid #d8c9bd;z-index:1}
#element-overview .eo-empty{text-align:center;padding:26px;color:#65616b}
.eo-legacy{margin:14px 0;border:1px solid var(--line);border-radius:8px;padding:12px 16px;background:#fffaf6}
.eo-legacy>summary{font-weight:600;min-height:28px}
#element-type-tools>.panel{border:0;padding:14px 0;margin:0;background:transparent}
#results #item-editor{scroll-margin-top:20px}
#eo-filter-dialog{margin:0;position:fixed;width:310px;max-width:calc(100vw - 24px);padding:0;border:1px solid #d9cec5;border-radius:9px;background:#fff;color:#262536;box-shadow:0 12px 38px #30203022;max-height:calc(100dvh - 24px);overflow:auto}
#eo-filter-dialog::backdrop{background:#26253615}
#eo-filter-dialog header,#eo-filter-dialog footer{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;gap:8px;border-bottom:1px solid var(--line)}
#eo-filter-dialog footer{border-bottom:0;border-top:1px solid var(--line)}
#eo-filter-dialog h3{font-size:14px;margin:0}
#eo-filter-dialog [data-eo-filter-content]{padding:14px 16px}
#eo-filter-dialog label{font-size:12px}
#eo-filter-dialog input:not([type=checkbox]){width:100%;margin:6px 0 10px}
#eo-filter-dialog .eo-range{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#eo-filter-dialog .eo-choice{display:flex;align-items:center;gap:8px;min-height:32px;margin:0}
#eo-filter-dialog .eo-choice[hidden]{display:none}
#eo-filter-dialog .eo-choice input{width:16px;height:16px;margin:0;flex:none}
#eo-filter-dialog .eo-choices{max-height:220px;overflow:auto}
#eo-filter-dialog [data-eo-error]{color:#a02e26;margin:0 16px 10px;font-size:12px}
#eo-filter-dialog [data-eo-error]:empty{display:none}
@media(max-width:800px){#element-overview [data-eo-summary]{min-width:540px}#element-overview [data-eo-table]{min-width:1100px}#element-overview .results-heading{align-items:flex-start;flex-wrap:wrap}#element-overview .results-heading .row{flex-wrap:wrap}#element-overview th,#element-overview td{padding-left:10px;padding-right:10px}}
@media(pointer:coarse){#element-overview .eo-filter{min-height:44px;min-width:44px}#element-overview .text-button{min-height:44px}#eo-filter-dialog .eo-choice{min-height:44px}}

/* Project switch: stale images and controls must not remain interactive. */
.observer-project-loading{display:none}
#observer-panel[data-project-loading]>.observer-project-loading{display:block;grid-column:1 / -1}
#observer-panel[data-project-loading]>:not(header):not(.observer-project-loading){display:none!important}

/* One result column: thumbnails, drawing and marks remain in normal flow. */
#observer-image>#observer-packet{position:relative;min-width:0;width:100%;margin:0 0 12px}
#observer-image .observer-packet-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));max-height:168px;overflow:auto;align-items:start;overscroll-behavior:contain}
#observer-image .observer-packet-grid button{min-width:0;padding:8px;font-size:12px}
#observer-image .observer-packet-grid img{height:78px;width:100%;object-fit:contain}
#observer-image .observer-preview-stage{clear:both}
#observer-marks{gap:6px;max-width:100%}
#observer-marks button{min-height:34px;padding:6px 9px;font-size:12px}
@media(min-width:1050px){
 #observer-panel.expanded .observer-image-wrap img{max-height:70dvh}
 #observer-panel.expanded #observer-image:has(.observer-batch-gallery:not([hidden]),#observer-packet:not([hidden])) .observer-image-wrap img{max-height:55dvh}
}
/* Match the approved element-table example, especially quantity alignment. */
#element-overview{padding:0;overflow:hidden}
#element-overview>.results-heading{padding:20px;margin:0;gap:18px;flex-wrap:wrap}
#element-overview h2{font-size:19px;margin:5px 0 7px}
#element-overview>.results-heading .hint{margin:0}
#element-overview [data-eo-exports]{gap:7px;flex-wrap:wrap}
#element-overview [data-eo-exports] button,#element-overview [data-eo-exports] a{min-height:34px;padding:7px 11px;font-size:12px}
#element-overview [data-eo-summary]{table-layout:fixed;min-width:650px}
#element-overview .eo-col-element{width:37%}
#element-overview .eo-col-quantity{width:25%}
#element-overview .eo-col-unit{width:12%}
#element-overview .eo-col-takeoff{width:26%}
#element-overview th.eo-num .eo-head{justify-content:flex-end}
#element-overview th,#element-overview td{padding-left:20px;padding-right:20px}
#element-overview [data-eo-summary] td{height:68px}
#element-overview .eo-element-cell{display:flex;align-items:center;gap:12px}
#element-overview .eo-element-icon{width:34px;height:34px;padding:7px;flex:none;border-radius:6px;background:#fff0e7;color:#9b5832}
#element-overview td.eo-summary-value{font-size:18px;font-weight:650}
#element-overview td.eo-summary-value small{font-size:11px;font-weight:400;white-space:normal}
#element-overview .eo-open-detail{min-height:34px;padding:7px 12px;font-size:12px;background:#fff0e7;border-color:#efccba}
#element-overview [data-eo-summary-info]{margin:0;padding:12px 20px;border-top:1px solid var(--line);font-size:11px}
#element-overview>.eo-detail{margin:0;padding:20px;border-top:1px solid var(--line)}
#element-overview .eo-detail h3{font-size:19px;margin:0}
#element-overview>.eo-detail>.eo-scroll{margin:0 -20px}
#element-overview>.eo-detail>.hint{margin-bottom:0}
#element-overview>[data-eo-reset]{margin:0 20px 12px}
#results[hidden],#eo-tools-dialog [hidden]{display:none!important}
#eo-tools-dialog{inset:0;margin:auto;width:min(1050px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:20px;border:1px solid var(--line);border-radius:12px;overflow:auto;color:var(--ink);background:white}
#eo-tools-dialog::backdrop{background:#26253655}
#eo-tools-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#eo-tools-dialog h2{margin:0;font-size:20px}
#eo-tools-dialog .eo-legacy{padding:12px;margin:12px 0}
#eo-tools-dialog .row{flex-wrap:wrap}
#eo-tools-dialog .table-wrap{max-height:50dvh;overflow:auto}
#eo-tools-dialog .results{margin:0}
@media(max-width:800px){#element-overview>.results-heading,#element-overview>.eo-detail{padding:16px}#element-overview>.eo-detail>.eo-scroll{margin:0 -16px}#element-overview th,#element-overview td{padding-left:14px;padding-right:14px}}

/* Keep project controls inside the page at intermediate screen widths. */
.projectbar{flex-wrap:wrap}
.projectbar label{min-width:0;flex:1 1 240px;max-width:100%}
.projectbar select{max-width:100%}
