/* PR 7: material / calculate steps, results, orientation comparison (docs/research/UX.md §3, §5, §7). */
:root { --low: #3fa37a; --approaching: #e0912c; --high: #d9463f; --uncertain: #8e89c9; }
input[type=search] { width: 100%; background: #2c2819; color: var(--cream); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font: inherit; }
.matlist { list-style: none; padding: 0; margin: 6px 0; max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.matlist li.mat { display: flex; align-items: center; gap: 8px; padding: 4px 8px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #2c281a; }
.matlist li.mat:hover { background: #2c2819; }
.matlist li.mat.on { background: var(--gold-bg2); color: var(--gold-hi); }
.matlist li.mat.off { opacity: .5; cursor: not-allowed; }
.matlist li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matlist li.empty { padding: 6px 8px; }
.conf { font-size: 11px; color: var(--text2); white-space: nowrap; }
.conf .dots { color: var(--gold); letter-spacing: 1px; }
.conf.low .dots, .conf.placeholder .dots { color: var(--warn); }
.conf.unsupported { color: var(--err); }
.tag.conf.low, .tag.conf.placeholder { color: var(--warn); border-color: var(--warn); }
ul.checks { list-style: none; padding: 0; margin: 8px 0; font-size: 12px; }
ul.checks li { padding: 1px 0 1px 18px; position: relative; }
ul.checks li::before { position: absolute; left: 0; }
ul.checks li.ok::before { content: "✓"; color: #7fc9a2; }
ul.checks li.bad { color: var(--warn); }
ul.checks li.bad::before { content: "!"; font-weight: 700; left: 4px; }
ul.checks li.info { color: var(--text2); }
ul.checks li.info::before { content: "i"; font-style: italic; left: 4px; }
.btn.big { padding: 6px 18px; font-size: 13px; }
#calcProgress { display: block; margin-top: 8px; color: var(--cream); font-size: 12px; }
#calcProgress[hidden], #calcError[hidden] { display: none; }
.errbox { background: #3a1714; border: 1px solid var(--err); border-radius: 8px; padding: 6px 8px; color: var(--cream); margin-top: 8px; }
.errbox .code { color: var(--text2); font-size: 11px; font-family: ui-monospace, monospace; margin-top: 2px; }
.card.result { border-color: var(--gold); }
.card.result.stale { opacity: .72; }
.verdict { border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #1b1810; border-left: 4px solid var(--uncertain); }
.verdict.low { border-left-color: var(--low); }
.verdict.approaching { border-left-color: var(--approaching); }
.verdict.high { border-left-color: var(--high); }
.verdict p { margin: 6px 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 650; font-size: 12px; color: #17150e; background: var(--uncertain); }
.chip.low { background: var(--low); }
.chip.approaching { background: var(--approaching); }
.chip.high { background: var(--high); color: #fff; }
.chip.uncertain { background: repeating-linear-gradient(135deg, #8e89c9 0 6px, #6e69a6 6px 10px); color: #17150e; }
.rangebar { position: relative; height: 10px; margin: 10px 4px 22px; background: linear-gradient(to right, var(--low) 0 41.67%, var(--approaching) 41.67% 66.67%, var(--high) 66.67%); border-radius: 5px; opacity: .9; }
.rangebar .band { position: absolute; top: -3px; height: 16px; border: 2px solid var(--cream); border-radius: 6px; box-sizing: border-box; }
.rangebar .dot { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; background: var(--cream); border-radius: 2px; }
.rangebar .tick { position: absolute; top: 10px; height: 6px; border-left: 1px solid var(--text2); }
.rangebar .tick span { position: absolute; top: 5px; left: -14px; font-size: 10px; color: var(--text2); white-space: nowrap; }
table.kv td { font-size: 12px; }
.small { font-size: 11.5px; }
.muted { color: var(--muted); }
.linkbtn { background: none; border: none; color: var(--gold-hi); cursor: pointer; font: inherit; font-size: 11.5px; padding: 0 2px; text-decoration: underline; }
.why { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; background: #1f1c14; }
.why p { margin: 3px 0 0; font-size: 12px; color: var(--text2); }
ul.notes { padding-left: 16px; margin: 4px 0; font-size: 12px; color: var(--text2); }
ul.notes li { margin: 2px 0; }
.disclaimer { margin-top: 10px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; font-size: 11.5px; color: var(--text2); }
.adv-only { display: none; color: var(--muted); font-size: 11px; }
body.advanced .adv-only { display: block; }
#resultTabs { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; z-index: 5; background: #17150ee6; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
#resultTabs .tab { background: none; border: none; color: var(--text2); font: inherit; font-size: 12.5px; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
#resultTabs .tab.on { background: var(--gold); color: #17150e; font-weight: 650; }
#resultTabs .tab.back { color: var(--muted); border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; }
#legend { position: absolute; right: 12px; bottom: 36px; z-index: 5; background: #17150ee6; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; min-width: 200px; max-width: 300px; }
#legend .lt { font-weight: 650; margin-bottom: 4px; }
#legend .lr { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
#legend .rng { color: var(--muted); font-size: 11px; margin-left: auto; padding-left: 8px; }
#legend .sw, #probe .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.sw.hatch { background: repeating-linear-gradient(135deg, #8e89c9 0 3px, #403d5a 3px 6px); }
#legend .bar { height: 10px; border-radius: 4px; margin: 4px 0 2px; }
#legend .ticks { display: flex; justify-content: space-between; color: var(--text2); font-size: 11px; font-variant-numeric: tabular-nums; }
#legend .note { color: var(--muted); font-size: 11px; margin-top: 4px; }
#legend .note.warnline { color: var(--warn); }
#deformCard { position: absolute; top: 54px; left: 12px; z-index: 5; background: #17150ee6; border: 1px solid var(--gold); border-radius: 10px; padding: 8px 12px; width: 290px; }
#deformCard .lbl { font-weight: 650; color: var(--gold-hi); font-size: 14px; }
#deformCard .sub { color: var(--text2); font-size: 11.5px; }
#probe { position: absolute; z-index: 8; pointer-events: none; background: #17150ef2; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; width: 280px; box-shadow: 0 4px 16px #0008; }
#probe .ph { color: var(--text2); font-size: 11px; }
#probe .pr { display: flex; align-items: center; gap: 6px; font-weight: 650; }
#probe .pr.uncertain { color: var(--uncertain); font-weight: 600; }
#resultFoot { position: absolute; bottom: 10px; right: 12px; color: var(--text2); font-size: 11.5px; z-index: 4; }
#staleBanner { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); background: #2b2511f2; border: 1px solid var(--warn); color: var(--cream); border-radius: 999px; padding: 4px 12px; font-size: 12px; z-index: 5; }
#legend .screen { color: var(--gold-hi); font-size: 11.5px; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
/* orientation comparison (UX.md §7): columns = directions, rows = criteria, no total */
table.cmp { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 11.5px; table-layout: fixed; }
table.cmp th, table.cmp td { border-bottom: 1px solid var(--line); padding: 5px 4px; vertical-align: top; text-align: left; width: auto; color: var(--cream); }
table.cmp td:first-child, table.cmp th:first-child { color: var(--text2); width: 27%; }
table.cmp th.cur, table.cmp td.cur { background: var(--gold-bg); box-shadow: inset 1px 0 0 var(--gold), inset -1px 0 0 var(--gold); }
table.cmp .chip { font-size: 10.5px; padding: 1px 6px; }
.rangebar.mini { height: 6px; margin: 6px 2px 2px; }
.rangebar.mini .band { top: -3px; height: 12px; }
.rangebar.mini .dot { top: -3px; height: 12px; }
#cmpSheet { position: absolute; top: 54px; right: 12px; width: min(760px, calc(100% - 24px)); max-height: calc(100% - 100px); overflow: auto; z-index: 7; background: #1d1a12f7; border: 1px solid var(--gold); border-radius: 12px; padding: 8px 14px 12px; box-shadow: 0 8px 30px #000a; }
#cmpSheet[hidden] { display: none; }
#cmpSheet .sh { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
#cmpSheet .x { background: none; border: none; color: var(--text2); font-size: 16px; cursor: pointer; }
#cmpSheet table.cmp { font-size: 12.5px; }
#cmpSheet table.cmp td:first-child, #cmpSheet table.cmp th:first-child { width: 22%; }
.thumb canvas { display: block; border-radius: 4px; background: #1b1810; }
#cmpBusy { margin-top: 6px; }
#cmpBusy[hidden] { display: none; }
.sweep { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.sweep svg { flex: none; background: #1b1810; border-radius: 50%; }
#resultTabs[hidden], #legend[hidden], #deformCard[hidden], #probe[hidden], #resultFoot[hidden], #staleBanner[hidden] { display: none; }

/* ADR-0012: local analysis — where it runs, device estimate, progress stages, cancel */
#calcWhere .where { margin: 0 0 6px; font-size: 12px; color: var(--text2); }
.dot-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4caf50; margin-right: 6px; vertical-align: middle; }
#calcDetail .pill.slow { border-style: dashed; }
#calcDetail .pill.refused { opacity: .45; text-decoration: line-through; }
#calcEstimate .bad { color: var(--err); }
#calcEstimate .capped { color: var(--warn); cursor: help; }
#calcProgress .stages { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12px; color: var(--muted); }
#calcProgress .stages li::before { content: '○ '; }
#calcProgress .stages li.done { color: var(--text2); }
#calcProgress .stages li.done::before { content: '✓ '; color: #4caf50; }
#calcProgress .stages li.now { color: var(--gold-hi); font-weight: 600; }
#calcProgress .stages li.now::before { content: '● '; }
#calcProgress .bar { height: 6px; background: #2c2819; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
#calcProgress .bar > div { height: 100%; width: 0; background: var(--gold); transition: width .25s linear; }
#calcProgress .progline { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
#calcProgress .progline > span:first-of-type { flex: 1; }
#calcProgress .elapsed { color: var(--text2); font-variant-numeric: tabular-nums; }
.result .where-line { margin: 8px 0 0; font-size: 12px; color: var(--text2); }
