/* Reversible presentation layer: canonical selects and stored answer codes stay unchanged. */
#quoteWorkspace .field[hidden]{display:none!important}
.condition-choices{border:0;padding:0;margin:0;min-width:0}
.condition-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.condition-card{position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:2px solid var(--line);border-radius:14px;background:#fff;transition:border-color .15s,background .15s}
.condition-card-choice{position:relative;display:flex;flex:1;cursor:pointer}
.condition-card:hover{border-color:#008897}
.condition-card:has(input:checked){border-color:#008897;background:#eaf8f5;box-shadow:0 0 0 1px #008897}
.condition-card:has(input:focus-visible){outline:3px solid #008897;outline-offset:3px}
.condition-card input[type=radio]{position:absolute;right:12px;top:12px;width:20px;height:20px;margin:0;accent-color:#008897;z-index:1;cursor:pointer}
.condition-image-button{position:relative;display:block;width:100%;border:0;padding:0;background:#e8eded;cursor:zoom-in;color:var(--dark)}
.condition-image-button:focus-visible{outline:3px solid #008897;outline-offset:-3px}
.condition-image-button>span{position:absolute;right:6px;bottom:6px;padding:4px 8px;border-radius:6px;background:rgba(255,255,255,.94);font-size:11px;font-weight:700;box-shadow:0 1px 5px #0002}
.condition-card img{display:block;width:100%;height:clamp(132px,21vh,172px);object-fit:contain;background:#e8eded}
.condition-card-copy{display:flex;flex-direction:column;gap:5px;padding:14px 38px 14px 14px;min-height:60px;justify-content:center}
.condition-card--photo .condition-card-copy{padding:10px 12px;width:100%}
.condition-card--photo .condition-card-copy strong{padding-right:24px}
.condition-card-copy strong{font-size:16px;line-height:1.25}
.condition-card-copy>span{font-size:12px;line-height:1.35;color:var(--muted)}
.illustration-note{font-size:11px;line-height:1.4;color:var(--muted);margin:10px 0 0}
.condition-choices--editor{grid-column:1/-1;margin-bottom:24px}
.condition-choices--editor legend{font-weight:700;font-size:18px;line-height:1.4;margin-bottom:10px}
.condition-choices--editor .choice-hint{font-size:14px;line-height:1.4;margin:0 0 12px;color:var(--muted)}
.condition-choices--editor .condition-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.condition-image-dialog{width:min(880px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff;color:var(--ink);box-shadow:0 18px 80px #0005;overflow:auto}
.condition-image-dialog::backdrop{background:#0d242be0}
.condition-image-dialog h2{font:800 22px/1.3 system-ui,sans-serif;margin:0 0 8px}
.condition-image-dialog>p{font-size:14px;line-height:1.45;margin:0 0 14px;clear:both}
.condition-image-dialog>img{display:block;width:100%;max-height:65dvh;object-fit:contain;background:#e8eded;border-radius:8px}
.condition-image-dialog .illustration-note{margin:12px 0 0;font-size:12px}
.condition-image-close{float:right;min-height:44px;border:0;border-radius:8px;padding:10px 14px;background:var(--dark);color:#fff;font-weight:700;cursor:pointer;margin:0 0 12px 10px}
.condition-image-close:focus-visible{outline:3px solid #008897;outline-offset:3px}
html:has(.condition-image-dialog[open]){overflow:hidden}
@media(min-width:1100px){.condition-choices--editor .condition-grid:has(>:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:800px){
  .condition-grid{gap:8px}
  .condition-card{border-radius:10px}
  .condition-card img{height:clamp(106px,17vh,136px)}
  .condition-card-copy{padding:12px 30px 12px 10px;min-height:56px}
  .condition-card-copy strong{font-size:14px}
  .condition-card-copy>span{font-size:11px;line-height:1.3}
  .condition-card--photo .condition-card-copy{padding:8px}
  .condition-card input[type=radio]{width:18px;height:18px;top:8px;right:8px}
  #quoteWorkspace .step:has(.condition-choices) h2{margin-bottom:12px}
  .condition-image-dialog{padding:12px}
  .condition-image-dialog h2{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.condition-card{transition:none}}
/* Short phone screens still show the current price, all choices and navigation. */
@media(max-width:800px) and (max-height:700px){
  #quoteWorkspace .form-card:has(.condition-choices){padding:10px}
  #quoteWorkspace .form-card:has(.condition-choices) .live-estimate{padding:8px 10px;margin-bottom:8px}
  #quoteWorkspace .form-card:has(.condition-choices) .live-estimate strong{font-size:24px}
  #quoteWorkspace .form-card:has(.condition-choices) .progress{height:4px;margin:6px 0 10px}
  #quoteWorkspace .step:has(.condition-choices) h2{font-size:20px;margin-bottom:8px}
  #quoteWorkspace .step:has(.condition-choices) .hint{font-size:13px;margin-bottom:10px}
  #quoteWorkspace .form-card:has(.condition-choices) .actions{margin-top:8px}
  #quoteWorkspace .form-card:has(.condition-choices) .actions .btn{min-height:44px;padding:10px}
  .step .condition-card img{height:90px}
  .step .condition-card--photo .condition-card-copy{padding:6px;gap:4px;min-height:0}
  /* Full explanations remain in the image viewer on very short screens. */
  .step .condition-card--photo .condition-card-copy>span{display:none}
  .step .condition-card-copy strong{font-size:13px}
  .step .illustration-note{font-size:10px;line-height:1.3;margin-top:6px}
}
