/* Scan review and saved tables: one scrolling body, persistent save action. */
.fh-capture-review{position:fixed;inset:0;z-index:2000;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;padding:0;background:var(--fh-app-bg,#F5F6F8);color:var(--fh-app-text,#08090F);font:400 calc(17px * var(--fh-a11y-scale,1))/1.45 var(--fh-font-ui)}
.fh-capture-review[hidden],.fh-capture-review [hidden]{display:none!important}
.fh-capture-review *{box-sizing:border-box}
.fh-capture-review button,.fh-capture-review input,.fh-capture-review select{font:inherit;color:inherit;background:var(--fh-app-surface,#fff);border:1px solid var(--fh-border,#d9dfeb);border-radius:12px}
.fh-capture-review button{padding:10px 14px;min-height:44px;min-width:44px;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
.fh-capture-review button:disabled{opacity:.5;cursor:default}
.fh-capture-review .primary{width:100%;min-height:56px;background:#2457FF;color:#fff;border:0;font-weight:600;border-radius:14px}
.fh-capture-review :focus-visible{outline:3px solid var(--fh-app-link,#2457FF);outline-offset:3px}
.fh-capture-review input:not([type=checkbox]),.fh-capture-review select{min-height:48px;padding:10px 12px;min-width:0;max-width:100%;font-size:1em}
.fh-capture-review input[type=number]{width:125px;appearance:textfield;font-variant-numeric:tabular-nums}
.fh-capture-review input::-webkit-inner-spin-button{appearance:none}
.fh-capture-review input[type=checkbox]{accent-color:#2457FF;width:22px;height:22px;vertical-align:middle;margin-right:8px;flex:none}
.fh-capture-review label{display:block;margin:12px 0;line-height:1.5;overflow-wrap:anywhere;font-size:1em;min-height:44px}
.fh-capture-review .muted,.fh-capture-review small{color:var(--fh-app-muted,#5C6380);font-size:calc(14px * var(--fh-a11y-scale,1));line-height:1.5}
.fh-capture-review h2,.fh-capture-review h3,.fh-capture-review h4{font-weight:600;letter-spacing:-.015em}
.fh-review-header{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:max(12px,env(safe-area-inset-top)) 20px 12px;background:var(--fh-app-surface,#fff);border-bottom:1px solid var(--fh-hairline)}
.fh-review-header>div{min-width:0;flex:1}.fh-review-header h2{font-size:calc(22px * var(--fh-a11y-scale,1));line-height:1.25;margin:0;overflow-wrap:anywhere}.fh-review-header p{font-size:calc(14px * var(--fh-a11y-scale,1));color:var(--fh-app-muted);margin:4px 0 0}
.fh-review-header #fhCaptureClose,.fh-review-header #fhSavedSurveyClose{font:400 32px/1 var(--fh-font-ui);width:44px;min-width:44px;flex:none;padding:0;background:transparent;border:0;color:var(--fh-app-link)}
.fh-review-draft{flex:none;font-size:calc(14px * var(--fh-a11y-scale,1));color:var(--fh-app-muted)}
.fh-review-scroll{overflow:auto;flex:1;min-height:0;min-width:0;padding:20px max(20px,calc((100vw - 580px)/2)) 24px;scroll-padding:20px;overscroll-behavior:contain}
.fh-review-scroll>section{min-width:0}.fh-review-scroll h3{font-size:calc(20px * var(--fh-a11y-scale,1));line-height:1.3;margin:24px 0 12px}.fh-review-scroll p{line-height:1.5}.fh-review-scroll #fhReviewHint{margin:0 0 16px}
.fh-review-footer{flex:none;padding:8px max(20px,calc((100vw - 580px)/2)) max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--fh-hairline);background:var(--fh-app-surface,#fff)}
.fh-review-footer .primary{margin:4px 0}.fh-review-history,.fh-review-secondary,.fh-survey-secondary{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}
.fh-review-history button,.fh-review-secondary button,.fh-survey-secondary button{border:0;background:transparent;color:var(--fh-app-link);font-size:calc(14px * var(--fh-a11y-scale,1));padding:8px 4px;min-height:44px}
.fh-review-secondary{justify-content:center}.fh-review-summary,.fh-survey-save-status{font-size:calc(14px * var(--fh-a11y-scale,1));color:var(--fh-app-muted);line-height:1.5;overflow-wrap:anywhere;margin:8px 0}
.fh-review-card,.fh-survey-window{background:var(--fh-app-surface,#fff);border:1px solid var(--fh-hairline);border-radius:16px;padding:16px;margin:16px 0;min-width:0}
.fh-review-card h3{margin-top:0}.fh-capture-review .tools{display:flex;gap:8px;flex-wrap:wrap}
.fh-capture-message{white-space:pre-line;overflow-wrap:anywhere;background:var(--fh-attention-bg);color:var(--fh-attention-ink);border-radius:12px;padding:14px;margin:12px 0;font-size:calc(15px * var(--fh-a11y-scale,1))}
.fh-capture-message:empty,#fhCaptureDepthMode:empty,#fhSavedSurveyFields:empty{display:none}
.fh-capture-review details{margin:12px 0;padding:0 16px;background:var(--fh-app-surface,#fff);border:1px solid var(--fh-hairline);border-radius:14px;min-width:0}
.fh-capture-review summary{cursor:pointer;min-height:52px;padding:14px 0;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
.fh-capture-review details[open]{padding-bottom:16px}.fh-capture-review details details{border:0;padding:0;margin:8px 0}
.fh-capture-review .fh-review-disclosure{margin:12px 0}.fh-review-disclosure>.fh-review-card{border:0;padding:0}
.fh-plan-viewport{position:relative;overflow:hidden;isolation:isolate;border-radius:16px;background:var(--fh-app-surface,#fff)}
.fh-capture-plan{display:block;width:100%;height:clamp(220px,32vh,320px);touch-action:none;user-select:none;background-color:var(--fh-app-surface,#fff);background-image:radial-gradient(var(--fh-grid,#d9dbea) 1px,transparent 1px);background-size:14px 14px}.fh-capture-plan text{pointer-events:none}
.fh-plan-controls{display:flex;justify-content:flex-end;gap:8px;padding:8px;flex-wrap:wrap;background:var(--fh-app-surface,#fff)}.fh-plan-controls button{font-size:calc(14px * var(--fh-a11y-scale,1));box-shadow:none}
.fh-review-scroll #fhReviewPlan>.muted{margin:8px 2px}.fh-capture-point{display:flex;align-items:center;gap:8px;margin:8px 0;flex-wrap:wrap}.fh-capture-point span{min-width:56px}.fh-capture-point input{flex:1}
.fh-survey-3d{position:relative;background:var(--fh-app-surface,#fff);overflow:hidden;min-height:120px;border-radius:12px}
#fhSurveyCanvas{width:100%;height:300px;display:block;touch-action:none}#fhSurveyLabels{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.fh-survey-3d-tools{justify-content:flex-end;margin-top:8px}.fh-survey-3d-tools button{font-size:calc(14px * var(--fh-a11y-scale,1))}
.fh-survey-table{border-collapse:collapse;width:100%;table-layout:fixed;background:var(--fh-app-surface,#fff);font-size:calc(15px * var(--fh-a11y-scale,1));margin:16px 0 0}
.fh-survey-table caption{text-align:left;font-weight:600;font-size:1.15em;line-height:1.3;padding:0 0 12px}
.fh-survey-table th,.fh-survey-table td{padding:12px 8px;vertical-align:top;border-bottom:1px solid var(--fh-hairline);text-align:left;line-height:1.5;overflow-wrap:anywhere}.fh-survey-table th{width:44%;font-weight:400}.fh-survey-table td{font-variant-numeric:tabular-nums}.fh-survey-table small{display:block;margin-top:4px}
.fh-survey-window legend{font-weight:600;padding:0 6px}.fh-survey-window label,#fhSurveyReveals label,#fhSurveyHeight>label{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fh-survey-window input,#fhSurveyReveals input{width:125px;max-width:100%;flex-shrink:0}.fh-survey-window input[aria-invalid=true]{border-color:var(--fh-critical-line);outline:1px solid var(--fh-critical-line)}
#fhCaptureHeight{font-weight:600;font-size:1.2em;margin:0;text-align:left;max-width:100%}
.fh-service-row{padding:16px 0;margin:8px 0;border-bottom:1px solid var(--fh-hairline);overflow-wrap:anywhere}
.fh-service-heading{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.fh-service-status{color:var(--fh-app-muted);font-size:calc(14px * var(--fh-a11y-scale,1))}.fh-service-row p{margin:8px 0;font-size:calc(15px * var(--fh-a11y-scale,1))}
.fh-service-row input[type=text],.fh-service-row select{display:block;width:100%;margin:8px 0}.fh-service-evidence img,.fh-presence-observation img{display:block;width:100%;height:auto;border-radius:12px;margin-top:12px}.fh-service-evidence button{color:var(--fh-app-link)}#fhSurveyAnalysisStatus{white-space:normal;overflow-wrap:anywhere}
.fh-survey-presence-group{margin:24px 0}.fh-survey-presence-group h4{margin:0 0 8px;font-size:calc(15px * var(--fh-a11y-scale,1));color:var(--fh-app-muted)}
.fh-capture-review details.fh-presence-row{margin:0;border:0;border-bottom:1px solid var(--fh-hairline);border-radius:0;padding:0 16px;background:var(--fh-app-surface,#fff)}
.fh-capture-review details.fh-presence-row:first-of-type{border-radius:14px 14px 0 0}.fh-capture-review details.fh-presence-row:last-of-type{border-bottom:0;border-radius:0 0 14px 14px}
.fh-capture-review .fh-presence-summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) 12px;align-items:center;column-gap:12px;row-gap:4px;padding:14px 0;min-height:76px}
.fh-presence-summary::-webkit-details-marker{display:none}.fh-presence-summary:after{content:'';grid-column:2;grid-row:1/3;width:7px;height:7px;border-right:1.5px solid var(--fh-app-muted);border-bottom:1.5px solid var(--fh-app-muted);transform:rotate(-45deg);justify-self:center}.fh-presence-row[open]>.fh-presence-summary:after{transform:rotate(45deg)}
.fh-presence-name{grid-column:1;font-weight:500}.fh-presence-current{grid-column:1;font-size:calc(14px * var(--fh-a11y-scale,1));color:var(--fh-app-muted);font-weight:400}
.fh-presence-current[data-source=ai][data-status=detected]{color:var(--fh-app-link);font-weight:500}
.fh-presence-detail{padding:0 0 16px;border-top:1px solid var(--fh-hairline)}.fh-presence-detail label{display:grid;gap:8px;font-size:calc(15px * var(--fh-a11y-scale,1))}.fh-presence-detail select{width:100%}.fh-presence-confirm{width:100%;font-weight:500;color:var(--fh-app-link)!important;background:var(--fh-app-selected)!important;border:0!important}
.fh-presence-observation{display:grid;gap:8px;padding:12px 0;overflow-wrap:anywhere;font-size:calc(15px * var(--fh-a11y-scale,1))}.fh-presence-observation p{margin:0}.fh-presence-observation small{display:block}
.fh-survey-overview{margin:0 0 20px}.fh-survey-key-values{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,calc(88px * var(--fh-a11y-scale,1))),1fr));gap:16px;margin:0;padding:20px 16px;border-radius:16px;background:var(--fh-app-surface,#fff)}
.fh-survey-key-values>div{min-width:0;display:flex;flex-direction:column;gap:6px}.fh-survey-key-values dt{font-size:calc(14px * var(--fh-a11y-scale,1));color:var(--fh-app-muted)}.fh-survey-key-values dd{font-weight:600;font-variant-numeric:tabular-nums;font-size:calc(20px * var(--fh-a11y-scale,1));line-height:1.3;margin:0;overflow-wrap:anywhere}
.fh-survey-requirements{list-style:none;padding:0;margin:0 0 20px;display:grid;gap:4px}.fh-survey-requirements button{text-align:left;width:100%;background:transparent;border:0;padding:10px 0;color:var(--fh-app-link);font-size:calc(15px * var(--fh-a11y-scale,1));font-weight:500}
.fh-review-checks{margin:20px 0;padding:16px;background:var(--fh-app-selected);border-radius:14px}.fh-review-checks label{margin:0;padding:8px 0}.fh-review-checks p{margin:0 0 12px}
.fh-survey-tabs{display:flex;gap:4px;flex-shrink:0;padding:8px 20px;background:var(--fh-app-surface,#fff);border-bottom:1px solid var(--fh-hairline)}.fh-survey-tabs button{flex:1;min-width:0;min-height:48px;border:0;background:transparent;font-size:calc(15px * var(--fh-a11y-scale,1));font-weight:500;padding:10px 12px}
.fh-survey-tabs button[aria-selected=true]{color:var(--fh-app-link);background:var(--fh-app-selected)}
.fh-saved-survey{margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0}.fh-saved-survey:not([open]){display:none}.fh-saved-survey::backdrop{background:rgba(8,9,15,.4)}
.fh-opening-list>div>p{background:var(--fh-app-surface,#fff);border-radius:14px;padding:16px;display:flex;gap:8px;flex-wrap:wrap}.fh-opening-list button{color:var(--fh-app-link)}
.fh-review-empty{text-align:center;padding:20px 12px}.fh-review-empty button{width:100%;margin-bottom:8px}.fh-empty-icon{font-size:48px;width:80px;height:80px;display:grid;place-items:center;margin:auto;color:var(--fh-app-link);background:var(--fh-app-selected);border-radius:16px}
@media(max-width:360px){.fh-review-scroll,.fh-review-header,.fh-review-footer{padding-left:16px;padding-right:16px}.fh-review-draft{display:none}.fh-survey-tabs{padding-left:12px;padding-right:12px}.fh-survey-table th,.fh-survey-table td{padding:10px 4px}.fh-survey-window label,#fhSurveyReveals label{flex-direction:column;align-items:stretch}.fh-survey-window input,#fhSurveyReveals input{width:100%}#fhSurveyCanvas{height:240px}}
@media(max-height:650px){.fh-review-header{padding-top:max(8px,env(safe-area-inset-top))}.fh-review-footer{padding-top:4px}.fh-capture-plan{height:220px}}
