:root {
  --bg: #eef0f2; --panel: #ffffff; --ink: #1d2329; --muted: #6a737d; --line: #dde1e5; --accent: #d9622b;
  --refrig: #e07b2a; --cond: #2f86d6; --exh: #7a8794; --iu: #19a3a3; --odu: #3d4a57; --warn: #c2410c; --info: #4b5563;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 13px; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { display: flex; }
#panel { width: 340px; min-width: 340px; height: 100%; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .14em; font-size: 12px; }
.project { font-size: 15px; font-weight: 600; margin-top: 4px; }
.stats { color: var(--muted); margin-top: 4px; line-height: 1.5; }
.download { margin-top: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 600; border-radius: 5px; cursor: pointer; }
.download:hover:not(:disabled) { background: #000; }
.download:disabled { opacity: .55; cursor: progress; }
.dlnote { color: var(--muted); font-size: 11px; margin-top: 4px; min-height: 14px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: none; padding: 10px 0; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab { display: none; overflow-y: auto; padding: 4px 16px 20px; flex: 1; }
.tab.on { display: block; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { border: 1px solid var(--line); background: #fff; padding: 5px 9px; border-radius: 4px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.row { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.row .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.row .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; }
.legend { display: grid; grid-template-columns: 1fr; gap: 3px; color: var(--muted); }
.legend span { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 4px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: #f6f7f8; }
tr.sel td { background: #fff3ec; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin: 8px 0; cursor: pointer; }
.card:hover { border-color: #bfc5cb; }
.card.sel { border-color: var(--accent); background: #fffaf6; }
.card .t { font-weight: 600; display: flex; justify-content: space-between; }
.card .s { color: var(--muted); margin-top: 3px; line-height: 1.45; }
.finding { padding: 7px 0 7px 10px; border-left: 3px solid var(--info); margin: 6px 0; line-height: 1.4; }
.finding.warn { border-left-color: var(--warn); }
#stage { flex: 1; position: relative; }
#stage canvas { display: block; }
.info { position: absolute; top: 12px; right: 12px; width: 300px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.08); z-index: 5; }
.info.hidden { display: none; }
.info .t { font-weight: 700; font-size: 14px; margin-bottom: 2px; padding-right: 18px; }
.info .k { color: var(--muted); margin-bottom: 8px; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-variant-numeric: tabular-nums; }
.info .x { position: absolute; top: 8px; right: 10px; cursor: pointer; color: var(--muted); font-size: 16px; border: 0; background: none; }
.hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--muted); background: rgba(255,255,255,.8); padding: 4px 10px; border-radius: 12px; pointer-events: none; }
.lbl { font: 600 10px "Segoe UI", sans-serif; color: #1d2329; background: rgba(255,255,255,.85); border: 1px solid rgba(0,0,0,.12); padding: 1px 4px; border-radius: 3px; white-space: nowrap; pointer-events: none; }
.lbl.odu { background: #3d4a57; color: #fff; border-color: #3d4a57; }
.lbl.storey { font-size: 12px; background: none; border: 0; color: #6a737d; }
@media (max-width: 760px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; min-width: 0; height: 45%; border-right: 0; border-top: 1px solid var(--line); }
  .info { width: calc(100% - 24px); }
}
