/* Scoped to the TV assistant. Native controls stay usable with a keyboard or touch. */
#modal-content :is(.tv-wizard,.tv-results){
  --tv-blue:#2454b8;--tv-ink:#193655;--tv-muted:#48617d;--tv-line:#d3dfed;
  color:var(--tv-ink);overflow-wrap:anywhere;line-height:1.55;
}
#modal-content :is(.tv-wizard,.tv-results) :is(button,select,input){
  max-width:100%;min-width:0;white-space:normal;line-height:1.4;accent-color:var(--tv-blue)
}
#modal-content :is(.tv-wizard,.tv-results) :focus-visible{outline:3px solid #2660c8;outline-offset:3px}
#modal-content :is(.tv-wizard,.tv-results) button:disabled{cursor:default;opacity:.55}
#modal-content .tv-wizard .wizard-choice{padding:16px;text-align:left}
#modal-content .tv-wizard .wizard-choice small{display:block;margin-top:3px}
#modal-content .tv-wizard .wizard-choice>span{display:block;margin-bottom:8px}
#modal-content .tv-wizard .wizard-choice[aria-pressed=true]::after{content:'✓';color:#194ba9;font-size:20px}
#modal-content .tv-must{border:0;border-top:1px solid var(--tv-line);padding:8px 0 0;margin:24px 0 0;min-width:0}
#modal-content .tv-must legend{padding:0 12px 0 0;font-weight:650}
#modal-content .tv-wizard .tv-check{display:flex;align-items:flex-start;gap:11px;min-height:44px;padding:10px 0;cursor:pointer;color:var(--tv-ink);font-size:15px;text-align:left}
#modal-content .tv-check input[type=checkbox]{position:static;appearance:auto;opacity:1;flex:none;width:20px;height:20px;margin:2px 0 0;padding:0}
#modal-content .tv-check:has(input:disabled){color:var(--tv-muted);cursor:default}
#modal-content .tv-wizard :is(.tv-hint,.range-labels,.wizard-summary){color:var(--tv-muted);font-size:14px;line-height:1.5}
#modal-content .tv-wizard .tv-hint{margin:8px 0 0}
#modal-content .tv-wizard .tv-field{display:block;margin:20px 0 0;color:var(--tv-ink);font-size:15px;font-weight:600}
#modal-content .tv-field select,#modal-content .tv-wizard .tv-amount{
  display:block;width:100%;height:auto;margin:6px 0;padding:12px 14px;border:1px solid #9fb5d1;
  border-radius:11px;background:#fff;color:var(--tv-ink);font:inherit;font-size:16px
}
#modal-content .tv-wizard .tv-amount{font-size:26px;font-weight:650;font-variant-numeric:tabular-nums}
#modal-content .tv-wizard .tv-amount[aria-invalid=true]{border-color:#a02d2c}
#tv-amount-error{color:#952d28}
#modal-content .tv-wizard input[type=range]{display:block;width:100%;margin:20px 0 14px;cursor:pointer}
#modal-content .tv-wizard .tv-count{margin:10px 0;padding:12px 14px;border-radius:10px;background:#e3ebfa;color:#20447b;font-size:15px}
#modal-content .tv-wizard .tv-range{margin:16px 0}
#modal-content .tv-wizard .wizard-nav{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}
#modal-content .tv-results h2{font-size:clamp(25px,4vw,36px);line-height:1.2;margin:8px 0 12px}
#modal-content .tv-results p{margin:8px 0;font-size:15px;color:var(--tv-muted)}
#modal-content .tv-results .tv-actions,#tv-compare-bar{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;margin:16px 0}
#modal-content .tv-results :is(.tv-pick,.text-btn){color:var(--tv-blue);font-size:14px;font-weight:600;min-height:44px}
#modal-content .tv-pick{background:white;border:1px solid #b6c9e1;border-radius:12px;padding:9px 13px}
#modal-content .tv-pick:is(:hover,[aria-pressed=true]){background:#edf3ff;border-color:var(--tv-blue)}
#modal-content .tv-results .tv-empty{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px;padding:18px;background:#f2f6fb;border-radius:16px;margin-bottom:16px}
#modal-content .tv-empty p{width:100%}
#modal-content .tv-results .match-card{display:grid;grid-template-columns:minmax(140px,29%) minmax(0,1fr);padding:20px!important;gap:20px;background:#fff;color:var(--tv-ink)}
#modal-content .tv-match-info{min-width:0}
#modal-content .tv-results .match-visual{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:14px}
#modal-content .tv-results .tv-mini{width:100%;min-width:0;margin:0 0 6px}
#modal-content .tv-results .tv-mini img{height:auto!important;max-height:165px;aspect-ratio:4/3;object-fit:contain}
#modal-content .tv-results .score-caption{font-size:13px;color:var(--tv-muted);text-align:center}
#modal-content .tv-results .score-dial{height:88px;width:88px}
#modal-content .tv-results .score-dial strong{font-size:28px;letter-spacing:-1px}
#modal-content .tv-results .match-label{font-size:11px;color:var(--tv-blue);font-weight:700}
#modal-content .tv-results .match-card h3{margin:4px 0 10px;font-size:clamp(20px,3vw,24px);line-height:1.28}
#modal-content .tv-code{display:block;margin:-5px 0 10px;color:var(--tv-muted);font-size:13px}
#modal-content .tv-facts{display:flex;gap:6px;flex-wrap:wrap}
#modal-content .tv-facts span{padding:4px 9px;font-size:13px;font-weight:550;border-radius:7px;background:#eff4fa;color:#244265}
#modal-content .tv-results .tv-price{display:grid;justify-items:start;gap:4px;margin:14px 0}
#modal-content .tv-price strong{font-size:22px;line-height:1.3}
#modal-content .tv-price small{font-size:13px;line-height:1.45}
#modal-content .tv-price .budget-status{margin:0;white-space:normal;line-height:1.4;font-size:13px;color:#145e49}
#modal-content .tv-price .budget-status.over{color:#795018;background:#fff4df}
#modal-content .tv-reasons{margin:0;font-size:14px}
#modal-content .tv-reasons dt{font-weight:700;color:var(--tv-ink);margin-top:9px}
#modal-content .tv-reasons dd{margin:1px 0 0;color:var(--tv-muted)}
#modal-content .tv-results .tv-explain{margin:12px 0 0;padding:0;border:0;border-top:1px solid var(--tv-line)}
#modal-content .tv-explain summary{cursor:pointer;color:var(--tv-blue);font-size:14px;font-weight:600;padding:11px 0}
#modal-content .tv-explain a{text-decoration:underline}
#modal-content .tv-results .catalog-pager{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center}
#tv-compare-bar{position:sticky;bottom:0;background:#f4f8ff;border:1px solid #c3d4ed;border-radius:16px;padding:10px 14px;z-index:2;font-size:14px}
#tv-compare-bar[hidden]{display:none}
#modal:has(#tv-compare-bar:not([hidden])){scroll-padding-bottom:130px}
@media(max-width:680px){
  #modal-content .tv-wizard .wizard-budget{padding:15px}
  #modal-content .tv-wizard .selection-progress>span{flex-direction:column;gap:4px;font-size:12px}
  #modal-content .tv-wizard .wizard-choices{grid-template-columns:minmax(0,1fr);gap:8px}
  #modal-content .tv-wizard .wizard-choice{display:grid;grid-template-columns:24px minmax(0,1fr);gap:0 10px;padding:11px 32px 11px 12px}
  #modal-content .tv-wizard .wizard-choice>span{grid-row:1/3;align-self:center;margin:0}
  #modal-content .tv-wizard .wizard-choice small{font-size:13px}
  #modal-content .tv-results .match-card{grid-template-columns:minmax(0,1fr);padding:14px!important;gap:14px}
  #modal-content .tv-results .match-visual{display:grid;grid-template-columns:minmax(0,1fr) 84px;grid-template-rows:1fr auto;gap:5px 10px;padding:12px}
  #modal-content .tv-results .match-visual .tv-mini{grid-area:1/1/3/2;margin:0;padding:0!important}
  #modal-content .tv-results .match-visual .score-dial{grid-area:1/2;width:78px;height:78px;align-self:end;justify-self:center}
  #modal-content .tv-results .score-caption{grid-area:2/2}
  #modal-content .tv-results .tv-actions>*{flex:1 1 auto}
  #tv-compare-bar{gap:5px 10px;padding:9px 12px}
  #tv-compare-bar span{flex:1 1 auto}
  #tv-compare-bar .btn{order:2;flex:1 1 100%}
}
@media(max-height:500px){#tv-compare-bar{position:static}}
