
/* Saved-check tiles follow BID quick keys without imposing a fixed row count. */
.check-view-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1rem;}
.check-view-bar h2{margin:0;}
.check-back,.check-more{font:inherit;font-size:.88rem;color:#deedac;background:transparent;border:1px solid #526e5e;border-radius:.4rem;padding:.55rem .8rem;cursor:pointer;}
.check-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,9.7rem),1fr));gap:.65rem;max-width:64rem;width:100%;align-items:stretch;}
.check-tile{position:relative;min-width:0;min-height:7.35rem;border:1px solid #4b675b;border-radius:.44rem;background:#28524a;color:#f2f1e4;overflow:hidden;}
.check-tile:focus-within{border-color:#b6ce95;}
.check-tile-open,.check-tile-new{width:100%;min-height:7.35rem;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:.28rem;padding:.8rem 2rem .8rem .8rem;font:inherit;text-align:left;color:inherit;background:transparent;border:0;cursor:pointer;overflow-wrap:anywhere;}
.check-tile-open img,.check-tile-thumb{width:100%;height:4rem;object-fit:cover;border-radius:.2rem;}
.check-tile button:hover,.check-tile-new:hover{background:#416b57;color:#fff;}
.check-tile-delete{position:absolute;top:.35rem;right:.35rem;min-width:1.85rem;min-height:1.85rem;display:grid;place-items:center;cursor:pointer;border:1px solid #648071;border-radius:.25rem;background:#315a4e;color:#f2f1e4;font:inherit;}
.check-tile-delete:disabled{cursor:wait;opacity:.65;}
.check-tile-state{font-size:.72rem;color:#d4e2c5;line-height:1.3;}
.check-tile[data-state="pending"] .check-tile-state{color:#e5c790;}
.check-tile-new{border:1px dashed #849d82;background:#345c4e;font-weight:750;padding:.8rem;}
.check-tile-new span{line-height:1;color:#deedac;font-size:1.65rem;}
.check-empty,.check-list-status{margin:.75rem 0;color:#d9e8d7;}
.check-more{margin-top:.7rem;}
.check-size-options{margin:0;border:1px solid #416153;border-radius:.4rem;padding:.65rem .75rem .75rem;}
.check-size-options legend{padding:0 .35rem;font-size:.9rem;}
.check-size-keys{display:flex;flex-wrap:wrap;gap:.4rem;}
.check-size-keys label{position:relative;display:inline-flex;cursor:pointer;font:inherit;}
.check-size-keys input{position:absolute;opacity:0;inline-size:1px;block-size:1px;margin:0;}
.check-size-keys span{padding:.4rem .58rem;line-height:1.25;border:1px solid #526e5e;border-radius:.28rem;background:#315a4e;color:#f2f1e4;}
.check-size-keys input:checked+span{background:#deedac;border-color:#deedac;color:#193c37;}
.check-size-keys input:focus-visible+span,.check-tile button:focus-visible,.check-tile-new:focus-visible,.check-back:focus-visible,.check-more:focus-visible{outline:2px solid #deedac;outline-offset:2px;}
.check-tile button:focus-visible{outline-offset:-3px;}
#check-result-view #foam-density-chart{margin-top:1rem;}
@media(max-width:380px){
  .check-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .check-view-bar{align-items:flex-start;flex-direction:column;gap:.55rem;}
}


/* Each pending check scans across its own thumbnail or placeholder. */
.check-tile-media{position:relative;isolation:isolate;display:block;width:100%;min-height:4rem;overflow:hidden;border-radius:.24rem;background:#416b57;}
.check-tile-media .check-tile-thumb,.check-tile-media img{display:block;width:100%;height:4rem;object-fit:cover;}
.check-tile-sweep{position:absolute;z-index:1;inset-inline:0;top:4%;height:2px;border-radius:1px;pointer-events:none;background:#eff7c8;box-shadow:0 0 8px #edf9aa,0 0 16px #b8ed9e;}
.check-tile[data-state="pending"] .check-tile-sweep{animation:check-tile-scan 1.8s ease-in-out infinite alternate;}
@keyframes check-tile-scan{from{top:4%;}to{top:94%;}}
@media(prefers-reduced-motion:reduce){
  .check-tile[data-state="pending"] .check-tile-sweep{animation:none;top:50%;box-shadow:none;}
}

.check-tile-retry{margin:.1rem .6rem .55rem;padding:.32rem .55rem;border:1px solid #648071;border-radius:.3rem;background:#315a4e;color:#f2f1e4;font:inherit;font-size:.8rem;cursor:pointer;}
.check-tile-retry:disabled{cursor:wait;opacity:.65;}

/* Desktop drop and keyboard-paste affordance; native pickers remain available. */
.scan-drop-zone{display:grid;gap:.3rem;place-content:center;justify-items:center;min-height:5.5rem;width:100%;padding:.7rem 1rem;border:1px dashed #849d82;border-radius:.44rem;background:#28524a;color:#f2f1e4;font:inherit;cursor:pointer;}
.scan-drop-zone span{font-size:.85rem;color:#d9e8d7;}
.scan-drop-zone:hover,.scan-drop-zone[data-dragging]{border-color:#deedac;background:#416b57;}
.scan-drop-zone:focus-visible{outline:2px solid #deedac;outline-offset:3px;}
@media (hover:none) and (pointer:coarse) and (max-width:700px){.scan-drop-zone{display:none;}}

.check-photo-dialog{margin:auto;padding:1rem;max-width:min(42rem,calc(100vw - 2rem));width:100%;max-height:calc(100dvh - 2rem);overflow:auto;}
.check-photo-dialog .check-view-bar h2{font-size:1.25rem;letter-spacing:0;}
.check-photo-media,#check-photo-media{max-height:70dvh;}
#check-photo-media img{width:100%;height:auto;max-height:65dvh;object-fit:contain;}
#check-photo-media[data-scanning] .check-tile-sweep{animation:check-tile-scan 1.8s ease-in-out infinite alternate;}
@media(prefers-reduced-motion:reduce){#check-photo-media[data-scanning] .check-tile-sweep{animation:none;top:50%;box-shadow:none;}}

/* Keep the scan overview readable; deeper evidence stays a native disclosure. */
.scan-result .scan-disclosure{border:1px solid var(--line);border-radius:12px;background:var(--bg);min-width:0}
.scan-result .scan-disclosure>summary{cursor:pointer;font-weight:700;padding:.9rem 1rem;min-height:2.75rem}
.scan-result .scan-disclosure>summary:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:12px}
.scan-result .scan-disclosure-body{padding:0 1rem 1rem}
.scan-result .scan-disclosure-body>h4{margin:1rem 0 .35rem}
/* The numeric score is visible even when motion is off or color is unavailable. */
.scan-result .scan-scales>div{--score-color:var(--muted);--score-glow:none;min-width:0}
.scan-result .scan-scales>div[data-tone="bad"]{--score-color:#f17b7c;--score-glow:0 0 .6rem #f17b7ca0}
.scan-result .scan-scales>div[data-tone="mid"]{--score-color:#efcd67;--score-glow:0 0 .6rem #efcd678c}
.scan-result .scan-scales>div[data-tone="good"]{--score-color:#70df9f;--score-glow:0 0 .6rem #70df9f96}
.scan-result .scan-scales dt{font-size:.88rem;font-weight:700}
.scan-result .scan-scales dd{color:inherit}
.scan-result .scan-score-number{font-variant-numeric:tabular-nums}
.scan-result .scan-score-track{display:block;width:100%;height:.42rem;margin:.35rem 0 .3rem;border-radius:999px;background:var(--line);direction:ltr}
.scan-result .scan-score-track[hidden]{display:none}
.scan-result .scan-score-fill{display:block;width:var(--score-fill,0%);height:100%;border-radius:inherit;background:var(--score-color);box-shadow:var(--score-glow)}
@media(prefers-reduced-motion:no-preference){
  .scan-result [data-revealed] .scan-score-fill{animation:scan-score-reveal .85s cubic-bezier(.22,.8,.27,1) both}
}
@keyframes scan-score-reveal{from{width:0}to{width:var(--score-fill,0%)}}
@media(forced-colors:active){
  .scan-result .scan-score-track{border:1px solid CanvasText}
  .scan-result .scan-score-fill{background:Highlight;box-shadow:none;forced-color-adjust:none}
}
.scan-result .scan-score-reasons>div{margin:.6rem 0}
.scan-result .scan-score-reasons dt{font-weight:700}
.scan-result .scan-score-reasons dd{margin:.2rem 0 0}

/* The verdict is readable at a glance and does not depend on a thumbnail color. */
.check-tile-score{position:absolute;bottom:.35rem;left:.35rem;padding:.25rem .45rem;border:1px solid #fff8;border-radius:.32rem;background:#173a31;color:#fff;font-weight:900;font-size:.86rem;line-height:1;font-variant-numeric:tabular-nums}
.scan-result .scan-verdict-copy{color:#fff;font-size:1.08rem}
.scan-result .scan-verdict-heading{font-variant-numeric:tabular-nums}

.scan-result .scan-scales{align-items:start}
.scan-scale-reason{margin-top:.55rem;box-sizing:border-box;}
.scan-scale-reason.is-animating{overflow:hidden;}
.scan-scale-reason.is-animating > summary:focus-visible{outline-offset:-3px;}.scan-scale-reason summary{font-size:.85rem;line-height:1.25;}.scan-scale-reason p{white-space:normal;overflow-wrap:anywhere;}
.scan-challenge-list{display:grid;gap:.7rem;padding-inline-start:1.35rem;}.scan-challenge{padding:.65rem .75rem;border:1px solid #789486;border-radius:.42rem;}.scan-challenge .scan-question{margin:0 0 .55rem;}.scan-challenge-options{display:flex;flex-wrap:wrap;gap:.45rem;}
.scan-challenge-vote{color:inherit;border:1px solid #859f90;background:transparent;border-radius:.35rem;padding:.45rem .65rem;font:inherit;font-size:.86rem;cursor:pointer;}.scan-challenge-vote[aria-pressed="true"]{color:#193c37;background:#deedac;border-color:#deedac;font-weight:750;}.scan-challenge-vote:focus-visible{outline:2px solid #deedac;outline-offset:2px;}.scan-challenge-vote:disabled{cursor:wait;opacity:.75;}

.scan-result .scan-recommendation{color:var(--green);font-size:1.15rem;font-weight:900}

.scan-original-photo{margin:0;display:grid;justify-items:start;gap:.55rem;}
.scan-original-photo img{display:block;width:auto;max-width:100%;max-height:70vh;object-fit:contain;border-radius:.45rem;}

.scan-quote-editor{display:grid;gap:.6rem;max-width:35rem}.scan-quote-editor label:not(.scan-check){display:grid;gap:.3rem}.scan-quote-editor input[type=number],.scan-quote-editor select{width:100%;padding:.5rem;font:inherit}.scan-quote-editor button{justify-self:start}.scan-quote-editor .scan-note{margin:0}
.scan-result .scan-recommendation.verdict-run,.check-tile .check-tile-state.verdict-run{color:#ff7e81;font-weight:900}

.report-guide-disclosure{margin:.65rem 0;padding:.35rem .65rem .45rem;border:1px solid #789486;border-radius:.4rem;}
.report-guide-disclosure summary{cursor:pointer;font-weight:700;text-decoration:underline;text-underline-offset:.2em;}
.report-guide-disclosure summary:focus-visible{outline:2px solid #deedac;outline-offset:3px;}
.report-guide-disclosure p{margin:.55rem 0;}
.report-guide-disclosure a{text-decoration:underline;text-underline-offset:.2em;}

/* Analyzer report: editorial layout, scoped to the new report structure. */
.scan-result:has(.scan-report-top){--report-ink:#f7f5e9;--report-muted:#c4d4ca;--report-rule:#47665a;--report-accent:#e0efa9;gap:clamp(1.3rem,3vw,2rem);color:var(--report-ink)}
.scan-result .scan-report-top{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.76fr);gap:clamp(1rem,3vw,2rem);align-items:stretch}
.scan-result .scan-report-top:not(:has(.scan-report-media)){grid-template-columns:minmax(0,1fr)}
.scan-result .scan-report-decision,.scan-result .scan-report-media{min-width:0}
.scan-result .scan-report-decision{display:grid;gap:clamp(.65rem,1.5vw,1rem);align-content:start;padding:clamp(1rem,3vw,2rem);border:1px solid #577766;border-radius:.9rem;background:linear-gradient(145deg,#234a40,#172f2b 72%)}
.scan-result .scan-report-decision .scan-report-verdict{display:grid;gap:.35rem;align-content:start}
.scan-result .scan-report-decision .scan-verdict-heading,.scan-result h3.scan-report-verdict{color:var(--report-ink);font-size:clamp(1.8rem,4.8vw,3.2rem);line-height:1.07;letter-spacing:-.043em}
.scan-result .scan-report-decision .scan-recommendation{font-size:clamp(1.3rem,3vw,2rem);line-height:1.14;margin:0;color:var(--report-accent)}
.scan-result .scan-report-decision .scan-recommendation.verdict-run{color:#ff9b9c}
.scan-result .scan-report-decision .scan-verdict-copy{margin:.16rem 0 0;max-width:63ch;line-height:1.57}
.scan-result .scan-report-kicker{display:block;margin:0 0 .34rem;color:var(--report-accent);font-size:.72rem;line-height:1.25;letter-spacing:.13em;text-transform:uppercase;font-weight:800}
.scan-result .scan-report-pricing{display:grid;gap:.55rem;margin:.12rem 0 0}
.scan-result .scan-report-price-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;padding:.76rem .86rem;border:1px solid #628473;border-radius:.56rem;background:#152f2a}
.scan-result .scan-report-price-label{display:block;color:var(--report-muted);line-height:1.28;font-size:.78rem;font-weight:750}
.scan-result .scan-report-price-value{display:block;color:var(--report-ink);font-size:clamp(1.18rem,3.2vw,1.85rem);font-weight:850;line-height:1.12;font-variant-numeric:tabular-nums}
.scan-result .scan-report-pricing .scan-note,.scan-result .scan-report-price-context{margin:0;color:var(--report-muted);line-height:1.45}
.scan-result .scan-report-media{padding:.75rem;border:1px solid var(--report-rule);border-radius:.9rem;background:#152e2a}
.scan-result .scan-report-media .scan-original-photo,.scan-result .scan-report-media.scan-original-photo{display:grid;align-content:start;justify-items:stretch;gap:.65rem}
.scan-result .scan-report-media img{width:100%;height:auto;max-height:clamp(12rem,29vw,20rem);object-fit:contain;object-position:center;border-radius:.44rem;background:#1c3934}
.scan-result .scan-report-gross:not([hidden]){padding:.85rem 1rem;border-left:4px solid #f59392;border-radius:.35rem;background:#492e2e;color:#ffe9de}
.scan-result .scan-report-gross:empty{display:none}
.scan-result .scan-report-gross>*{margin:.25rem 0}
.scan-result .scan-report-nav{display:flex;flex-wrap:wrap;gap:.48rem;align-items:center;padding:.1rem 0}
.scan-result .scan-report-nav ul{display:flex;flex-wrap:wrap;gap:inherit;align-items:center;list-style:none;margin:0;padding:0;min-width:0}
.scan-result .scan-report-nav a{display:inline-flex;min-height:2.55rem;align-items:center;max-width:100%;padding:.42rem .75rem;border:1px solid #6f8b77;border-radius:999px;background:#233e36;color:#f3f5e3;text-decoration:none;font-weight:750;font-size:.86rem;line-height:1.16}
.scan-result .scan-report-nav a:hover{border-color:var(--report-accent);background:#365b4d;color:#fff}
.scan-result .scan-report-nav a:focus-visible,.scan-result .scan-report-section summary:focus-visible{outline:2px solid var(--report-accent);outline-offset:3px}
.scan-result .scan-report-takeaways{padding:.84rem 1rem;border-left:3px solid #aeca87;border-radius:.35rem;background:#233f34}
.scan-result .scan-report-takeaways:empty{display:none}
.scan-result .scan-report-takeaways ul{margin:.4rem 0 .15rem;padding-inline-start:1.2rem}
.scan-result .scan-report-takeaways li+li{margin-top:.3rem}
.scan-result .scan-report-takeaways li::marker{color:#cddd9d}
.scan-result .scan-report-section{min-width:0;display:grid;gap:.9rem;padding-top:clamp(1rem,2.6vw,1.55rem);border-top:1px solid var(--report-rule);scroll-margin-top:clamp(1rem,9vw,5.5rem)}
.scan-result .scan-report-section-title{margin:0;color:var(--report-ink);letter-spacing:-.026em;line-height:1.12;font-size:clamp(1.42rem,3.35vw,2.22rem)}
.scan-result .scan-report-section .scan-scales{gap:.65rem;margin:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,10.5rem),1fr))}
.scan-result .scan-report-section .scan-scales>div{border-color:#58776b;border-radius:.64rem;background:#1c3832;padding:.76rem .82rem}
.scan-result .scan-report-section .scan-scales dt{color:#e7eede;font-size:.83rem;line-height:1.22}
.scan-result .scan-report-section .scan-scales dd{margin:.32rem 0;color:#fff;font-size:clamp(1.12rem,2.5vw,1.6rem);font-weight:830;line-height:1.1}
.scan-result .scan-report-section .scan-score-track{background:#405a50;height:.45rem}
.scan-result .scan-report-section .exploded-view{margin-top:0}
.scan-result .scan-report-findings{display:grid;gap:.85rem;min-width:0}
.scan-result .scan-report-findings>*{margin-block:0}
.scan-result .scan-report-tradeoff{display:grid;gap:.32rem;padding:.67rem .78rem;border-left:2px solid #789687;background:#244039;border-radius:.23rem}
.scan-result .scan-report-tradeoff p{margin:0;color:#e4e9de}
.scan-result .scan-report-questions .scan-challenge-list{padding-inline-start:1.3rem;margin:.15rem 0 0}
.scan-result .scan-report-questions .scan-challenge{background:#203b34;border-color:#68897a;border-radius:.55rem;padding:.86rem .95rem}
.scan-result .scan-report-questions .scan-challenge .scan-question{color:#e8efc5}
@media(max-width:760px){
  .scan-result .scan-report-top{grid-template-columns:minmax(0,1fr)}
  .scan-result .scan-report-media img{max-height:min(18rem,62vw)}
}
@media(max-width:420px){
  .scan-result .scan-report-nav{gap:.38rem}
  .scan-result .scan-report-nav a{min-height:2.75rem}
  .scan-result .scan-report-section .scan-scales{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(forced-colors:active){
  .scan-result .scan-report-decision,.scan-result .scan-report-price-row,.scan-result .scan-report-nav a,.scan-result .scan-report-section .scan-scales>div{border-color:CanvasText}
}

#scan-preview.scan-upload-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));gap:.6rem;width:100%;max-height:none;margin:0;padding:0;list-style:none;justify-self:stretch;}
.scan-upload-previews li{display:grid;align-content:start;gap:.4rem;padding:.45rem;border:1px solid #789486;border-radius:.4rem;min-width:0;}
.scan-upload-previews img{display:block;width:100%;height:5.5rem;object-fit:contain;}
.scan-upload-previews .check-back{justify-self:start;}

.scan-saved-photo{display:grid;justify-items:start;gap:.55rem;}
.scan-saved-photo-choices{display:flex;flex-wrap:wrap;gap:.4rem;}
.scan-saved-photo-choices [aria-pressed="true"]{background:#deedac;border-color:#deedac;color:#193c37;}

#scan-preview.scan-photo-slots{grid-template-columns:repeat(auto-fit,minmax(min(100%,8.4rem),1fr))}
.scan-photo-slot{min-height:6rem}
.scan-photo-slot[data-dragging]{outline:2px solid #deedac;outline-offset:1px}
.scan-slot-options{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:46px;gap:.3rem}
.scan-slot-options button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:44px;padding:.25rem .4rem;border:1px solid #88a293;border-radius:.4rem;background:#28524a;color:#f2f1e4;font:inherit;font-size:.85rem;line-height:1.15;text-align:center;white-space:normal;cursor:pointer}
.scan-slot-options button:hover{background:#416b57;border-color:#deedac}
.scan-slot-options button:focus-visible{outline:2px solid #deedac;outline-offset:2px}
.scan-slot-options .scan-slot-camera{display:none}
@media (pointer:coarse),(max-width:680px){.scan-slot-options .scan-slot-camera{display:flex}}
