/* =========================================================
   质鉴 · 大型风电叶片 AI 视觉质检台
   设计语言：检测实验室 / 测绘网格 / 深色相机视窗 / 安全黄
   ========================================================= */
:root {
  --paper: #f1f4f2;
  --paper-2: #e7ece9;
  --card: #fffefa;
  --ink: #172732;
  --ink-2: #2c4050;
  --muted: #6f7f87;
  --muted-2: #9aa7ab;
  --line: rgba(23, 39, 50, 0.14);
  --line-strong: rgba(23, 39, 50, 0.3);
  --blue: #1f5f8b;
  --blue-2: #174765;
  --cyan: #0f9aa8;
  --yellow: #f2b705;
  --red: #d64545;
  --green: #2e7d5b;
  --stage: #0b1820;
  --stage-2: #102630;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Bahnschrift", "DIN Alternate", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --body: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(15, 154, 168, 0.2); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
svg { display: block; }

.measure-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(rgba(31, 95, 139, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 139, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(31, 95, 139, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 139, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 90% 0%, rgba(242, 183, 5, 0.06), transparent 30%);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px, 100% 100%;
}
.measure-grid::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 0%, rgba(241, 244, 242, 0.2) 55%, var(--paper) 100%);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 64px; display: flex; align-items: center; gap: 28px;
  padding: 0 28px;
  background: rgba(255, 254, 250, 0.92);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--blue-2); color: var(--yellow);
  font-family: var(--sans); font-size: 19px; font-weight: 800;
  border-radius: 1px;
  box-shadow: 3px 3px 0 rgba(242, 183, 5, 0.3);
}
.brand-mark.small { width: 24px; height: 24px; font-size: 13px; box-shadow: 2px 2px 0 rgba(242,183,5,.2); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.12; }
.brand-copy strong { font-family: var(--sans); font-size: 19px; letter-spacing: 4px; }
.brand-copy small { font-family: var(--mono); font-size: 7.5px; color: var(--muted-2); letter-spacing: 1.1px; margin-top: 2px; }
.topnav { display: flex; align-items: center; gap: 28px; flex: 1; }
.topnav a { position: relative; font-size: 12px; color: var(--muted); padding: 20px 0 18px; letter-spacing: .4px; }
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--blue); font-weight: 600; }
.topnav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--yellow); }
.top-meta { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 8px; color: var(--muted); white-space: nowrap; }
.plant { display: flex; align-items: center; gap: 6px; color: var(--ink); font-family: var(--body); font-size: 10px; }
.plant i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(15,154,168,.12); }
.batch { color: var(--muted-2); }
.clock { color: var(--blue); }
.avatar { width: 26px; height: 26px; display: grid; place-items: center; background: var(--blue-2); color: var(--yellow); font-family: var(--body); font-size: 10px; }

main { position: relative; z-index: 2; }
.inspection { max-width: 1640px; margin: 0 auto; padding: 30px 28px 64px; scroll-margin-top: 72px; }
.board-head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: end; margin-bottom: 22px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; color: var(--muted-2); }
.eyebrow i { width: 32px; height: 1px; background: var(--line-strong); }
h1 { font-family: var(--sans); font-size: clamp(40px, 4.4vw, 62px); line-height: 1.05; letter-spacing: -1px; font-weight: 800; margin-top: 12px; }
h1 span { color: var(--blue); position: relative; white-space: nowrap; background: linear-gradient(transparent 72%, rgba(242,183,5,.28) 72%); padding: 0 2px; }
.board-side { display: flex; align-items: flex-end; gap: 22px; padding-bottom: 4px; }
.board-side p { max-width: 430px; font-size: 10.5px; line-height: 1.85; color: var(--muted); }
.board-stamp { flex: 0 0 auto; border-left: 1px solid var(--line-strong); padding-left: 17px; }
.board-stamp span { display: block; font-size: 7.5px; color: var(--muted-2); letter-spacing: .5px; }
.board-stamp strong { font-family: var(--sans); font-size: 31px; line-height: 1.1; color: var(--red); letter-spacing: -1px; }
.board-stamp em { display: block; font-style: normal; font-size: 8px; color: var(--muted); }

/* ---------- kpi ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 9px; }
.kpi { background: var(--card); border: 1px solid var(--line); padding: 10px 14px 9px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 24px; background: var(--blue); }
.kpi span { display: block; font-size: 8.5px; color: var(--muted); }
.kpi strong { display: inline-block; font-family: var(--sans); font-size: 28px; line-height: 1.12; letter-spacing: -0.8px; margin-top: 1px; }
.kpi small { font-family: var(--mono); font-size: 8px; color: var(--muted-2); margin-left: 3px; }
.kpi em { display: block; font-style: normal; font-family: var(--mono); font-size: 7px; color: var(--muted-2); margin-top: 1px; }
.kpi.good strong { color: var(--green); }
.kpi.warn strong { color: #b37f00; }
.kpi.bad strong { color: var(--red); }
.kpi.blue strong { color: var(--blue); }

/* ---------- panels ---------- */
.panel { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(23,39,50,.04), 0 16px 40px rgba(23,39,50,.035); position: relative; }
.panel::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 2px; background: var(--yellow); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.panel-head span { display: block; font-family: var(--mono); font-size: 7px; color: var(--muted-2); margin-top: 2px; letter-spacing: .2px; }
.count { border: 1px solid var(--line); color: var(--muted) !important; padding: 4px 6px; font-size: 7px !important; margin-top: 0 !important; white-space: nowrap; }
.unit { font-family: var(--mono); font-size: 7px !important; color: var(--muted-2) !important; margin-top: 4px !important; white-space: nowrap; }
.inspection-grid { display: grid; grid-template-columns: 238px minmax(0, 1fr) 330px; gap: 8px; align-items: stretch; }

/* ---------- batch panel ---------- */
.batch-meta { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line); margin: 12px 14px 0; }
.batch-meta div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 7px; }
.batch-meta span { display: block; font-size: 7px; color: var(--muted-2); }
.batch-meta b { display: block; font-family: var(--mono); font-size: 9.5px; font-weight: 400; margin-top: 1px; }
.batch-meta b small { font-size: 6.5px; color: var(--muted-2); margin-left: 2px; }
.parameter { padding: 12px 14px 0; }
.parameter label { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); }
.parameter output { font-family: var(--mono); font-size: 8px; color: var(--blue); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; cursor: pointer; margin-top: 4px; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(23,39,50,.18); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(23,39,50,.18); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--card); box-shadow: 0 0 0 1px #c79600; }
input[type="range"]::-moz-range-thumb { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--card); box-shadow: 0 0 0 1px #c79600; }
.range-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 6px; color: var(--muted-2); }
.parameter-note { font-size: 7px; line-height: 1.55; color: var(--muted-2); margin-top: 5px; }
.overlay-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 10px; }
.overlay-row > span { font-size: 8.5px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); padding: 3px 6px; color: var(--muted); }
.switch i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.switch b { font-family: var(--mono); font-size: 6.5px; font-weight: 400; }
.switch.on { color: var(--blue); border-color: rgba(31,95,139,.3); }
.switch.on i { background: var(--cyan); box-shadow: 0 0 0 2px rgba(15,154,168,.14); }
.station-title { padding: 10px 14px 4px; font-family: var(--mono); font-size: 6.5px; letter-spacing: .7px; color: var(--muted-2); }
.stations { padding: 0 9px 10px; }
.station-row { width: 100%; text-align: left; display: grid; grid-template-columns: 9px 1fr auto; gap: 7px; align-items: center; padding: 6px 5px; border-top: 1px solid rgba(23,39,50,.06); }
.station-row:hover { background: rgba(31,95,139,.035); }
.station-row.active { background: rgba(31,95,139,.06); box-shadow: inset 2px 0 0 var(--blue); }
.station-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.station-dot.warn { background: var(--yellow); }
.station-row b { display: block; font-family: var(--mono); font-size: 7.5px; font-weight: 400; }
.station-row small { display: block; font-size: 7px; color: var(--muted-2); }
.station-count { font-family: var(--mono); font-size: 7px; color: var(--red); }

/* ---------- vision ---------- */
.vision-panel { min-width: 0; display: flex; flex-direction: column; }
.vision-actions { display: flex; align-items: center; gap: 7px; }
.text-btn { font-family: var(--mono); font-size: 7.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.text-btn:hover { color: var(--blue); border-color: var(--blue); }
.text-btn span { color: var(--blue); }
.icon-btn { width: 25px; height: 25px; border: 1px solid var(--line); color: var(--blue); font-size: 12px; line-height: 1; }
.icon-btn:hover { border-color: var(--blue); }
.vision-stage { flex: 1; position: relative; min-height: 410px; background: radial-gradient(circle at 55% 45%, #17343f, #08131a 70%); overflow: hidden; }
.blade-svg { position: absolute; inset: 0; }
.blade-svg svg { width: 100%; height: 100%; }
.vision-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(120,190,190,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,190,190,.055) 1px, transparent 1px);
  background-size: 36px 36px;
}
.vision-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(0,0,0,.55); }
.vision-hud { position: absolute; left: 14px; top: 12px; z-index: 3; display: flex; gap: 14px; font-family: var(--mono); font-size: 6px; color: rgba(180,220,220,.58); letter-spacing: .3px; }
.vision-status { position: absolute; left: 14px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 7px; color: #9ed9c7; }
.vision-status i { width: 5px; height: 5px; border-radius: 50%; background: #5ee0b0; box-shadow: 0 0 0 3px rgba(94,224,176,.12); animation: pulse 2s infinite; }
.vision-status.scanning { color: var(--yellow); }
.vision-status.scanning i { background: var(--yellow); box-shadow: 0 0 0 3px rgba(242,183,5,.12); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.scanline { position: absolute; top: 0; bottom: 0; left: 38%; width: 1px; z-index: 2; background: linear-gradient(transparent, rgba(242,183,5,.85), transparent); box-shadow: 0 0 14px rgba(242,183,5,.35); opacity: .45; }
.scanline.scanning { animation: scan 1.5s ease-in-out; opacity: 1; }
@keyframes scan { 0% { left: 4%; } 100% { left: 96%; } }
.frame-corner { position: absolute; width: 18px; height: 18px; z-index: 4; border-color: rgba(242,183,5,.5); border-style: solid; }
.frame-corner.tl { left: 10px; top: 10px; border-width: 1px 0 0 1px; }
.frame-corner.tr { right: 10px; top: 10px; border-width: 1px 1px 0 0; }
.frame-corner.bl { left: 10px; bottom: 10px; border-width: 0 0 1px 1px; }
.frame-corner.br { right: 10px; bottom: 10px; border-width: 0 1px 1px 0; }
.vision-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line); font-size: 7px; color: var(--muted-2); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.dot-red, .dot-amber, .dot-blue { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5a52; }
.dot-amber { background: var(--yellow); }
.dot-blue { background: #4bb3c4; }
.crosshair { width: 7px; height: 7px; display: inline-block; border: 1px solid var(--blue); position: relative; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--blue); }
.crosshair::before { left: 2px; right: 2px; top: 2px; height: 1px; }
.crosshair::after { top: 2px; bottom: 2px; left: 2px; width: 1px; }
.scale { font-family: var(--mono); font-size: 6px; }

/* ---------- SVG blade ---------- */
.blade-body { stroke: rgba(220,240,240,.3); stroke-width: .8; }
.blade-seam { fill: none; stroke: rgba(15,45,55,.25); stroke-width: .8; }
.blade-highlight { fill: none; stroke: rgba(255,255,255,.4); stroke-width: 1.2; }
.blade-texture { stroke: rgba(255,255,255,.13); stroke-width: .5; }
.defect-marker { cursor: pointer; }
.defect-marker .ring { fill: none; stroke-width: 1.2; }
.defect-marker .core { stroke-width: 1; }
.defect-marker .label { font-family: var(--mono); font-size: 7px; fill: #fff; }
.defect-marker .measure { font-family: var(--mono); font-size: 5.5px; fill: rgba(255,255,255,.6); }
.defect-marker.selected .ring { stroke-width: 2; }
.defect-marker.selected .core { fill-opacity: .8; }
.scan-glow { fill: rgba(242,183,5,.05); }

/* ---------- defect panel ---------- */
.defect-panel { display: flex; flex-direction: column; }
.risk-pill { font-family: var(--mono); font-size: 7px !important; padding: 4px 6px; border: 1px solid currentColor; color: var(--red); margin-top: 0 !important; white-space: nowrap; }
.risk-pill.warn { color: #b37f00; }
.risk-pill.ok { color: var(--green); }
.defect-detail { padding: 12px 14px 0; }
.defect-title { font-family: var(--sans); font-size: 21px; line-height: 1.2; letter-spacing: -.2px; }
.defect-sub { font-family: var(--mono); font-size: 7px; color: var(--muted-2); margin-top: 3px; }
.defect-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.defect-tags span { font-family: var(--mono); font-size: 6.5px; padding: 2px 5px; border: 1px solid var(--line); color: var(--muted); }
.defect-tags span.hot { color: var(--red); border-color: rgba(214,69,69,.35); }
.confidence-row { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0 7px; margin-top: 9px; }
.confidence-row span { font-size: 7px; color: var(--muted-2); }
.confidence-row strong { font-family: var(--sans); font-size: 28px; line-height: 1; color: var(--blue); letter-spacing: -1px; }
.confidence-row strong small { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line); margin-top: 8px; }
.detail-grid div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; }
.detail-grid span { display: block; font-size: 6.5px; color: var(--muted-2); }
.detail-grid b { display: block; font-family: var(--mono); font-size: 8.5px; font-weight: 400; margin-top: 1px; }
.detail-grid b.bad { color: var(--red); }
.defect-ai { margin: 10px 14px; padding: 8px 9px; border-left: 2px solid var(--yellow); background: rgba(242,183,5,.06); font-size: 7.5px; line-height: 1.65; color: var(--muted); }
.defect-ai b { display: block; font-family: var(--mono); font-size: 6px; color: #a47700; letter-spacing: .5px; margin-bottom: 2px; }
.disposition { padding: 0 14px; }
.disposition > span { display: block; font-family: var(--mono); font-size: 6.5px; color: var(--muted-2); margin-bottom: 5px; }
.disposition-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.disposition-btns button { font-size: 8px; padding: 6px 2px; border: 1px solid var(--line); color: var(--muted); }
.disposition-btns button:hover { border-color: var(--blue); color: var(--blue); }
.disposition-btns button.recommended { border-color: var(--yellow); color: #a47700; background: rgba(242,183,5,.07); }
.disposition-btns button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.disposition-btns button[data-action="repair"].active { background: #b37f00; border-color: #b37f00; }
.disposition-btns button[data-action="hold"].active { background: var(--red); border-color: var(--red); }
.defect-list-title { padding: 9px 14px 3px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 6.5px; color: var(--muted-2); margin-top: 9px; }
.defect-list-title b { color: var(--ink); font-weight: 400; margin-left: 4px; }
.defect-list { max-height: 128px; overflow: auto; padding: 0 7px; }
.defect-row { width: 100%; text-align: left; display: grid; grid-template-columns: 7px 1fr auto; gap: 6px; align-items: center; padding: 5px 7px; border-bottom: 1px solid rgba(23,39,50,.06); }
.defect-row:hover { background: rgba(31,95,139,.04); }
.defect-row.active { background: rgba(31,95,139,.07); }
.defect-row i { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.defect-row i.high { background: var(--red); }
.defect-row b { display: block; font-size: 8px; font-weight: 500; }
.defect-row span { display: block; font-family: var(--mono); font-size: 6.5px; color: var(--muted-2); }
.defect-row em { font-family: var(--mono); font-size: 7px; font-style: normal; color: var(--muted); }
.defect-panel .btn { margin: 9px 14px 0; width: calc(100% - 28px); }
.defect-note { padding: 7px 14px 12px; font-size: 6.5px; line-height: 1.55; color: var(--muted-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 10px; font-size: 9px; border: 1px solid transparent; transition: .2s; }
.btn span { font-size: 12px; }
.btn-solid { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }
.btn-solid:hover { background: var(--blue-2); transform: translateY(-1px); }
.btn-block { width: 100%; }

/* ---------- section / analysis ---------- */
.section { max-width: 1640px; margin: 0 auto; padding: 66px 28px; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.section-head { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: end; margin-bottom: 26px; }
h2 { font-family: var(--sans); font-size: clamp(30px, 3.2vw, 44px); line-height: 1.09; font-weight: 800; letter-spacing: -.7px; margin-top: 11px; }
h2 span { color: var(--blue); }
.section-desc { text-align: right; padding-bottom: 4px; font-size: 10px; line-height: 1.85; color: var(--muted); }
.analysis-grid { display: grid; grid-template-columns: 1.15fr 1.1fr 0.85fr; gap: 8px; align-items: stretch; }
.spc-chart { padding: 12px 12px 0; height: 205px; }
.spc-chart svg { width: 100%; height: 100%; }
.spc-chart .axis { stroke: rgba(23,39,50,.12); stroke-width: .7; }
.spc-chart .limit { stroke: var(--red); stroke-width: .8; stroke-dasharray: 3 3; opacity: .55; }
.spc-chart .cl { stroke: var(--green); stroke-width: .8; stroke-dasharray: 4 3; opacity: .5; }
.spc-chart .line { fill: none; stroke: var(--blue); stroke-width: 1.4; }
.spc-chart .point { fill: var(--card); stroke: var(--blue); stroke-width: 1.2; }
.spc-chart .point.low { fill: var(--red); stroke: var(--red); }
.spc-chart text { font-family: var(--mono); font-size: 6px; fill: var(--muted-2); }
.spc-foot { display: flex; gap: 12px; flex-wrap: wrap; padding: 7px 14px 11px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 6.5px; color: var(--muted-2); }
.spc-alert { margin-left: auto; color: var(--red); }
.root-chips { display: flex; gap: 4px; padding: 10px 14px 7px; }
.root-chips button { font-size: 7.5px; padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); }
.root-chips button.active { color: var(--blue); border-color: var(--blue); background: rgba(31,95,139,.05); }
.root-bars { padding: 3px 14px 0; }
.root-row { display: grid; grid-template-columns: 68px 1fr 28px; gap: 7px; align-items: center; padding: 4px 0; }
.root-label { font-size: 8px; color: var(--muted); }
.root-track { height: 8px; background: rgba(23,39,50,.07); overflow: hidden; }
.root-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .4s; }
.root-track i.hot { background: linear-gradient(90deg, #b37f00, var(--yellow)); }
.root-val { font-family: var(--mono); font-size: 7px; color: var(--muted); text-align: right; }
.root-advice { margin: 8px 14px 11px; padding: 8px 9px; border-left: 2px solid var(--yellow); background: rgba(242,183,5,.05); font-size: 7.5px; line-height: 1.65; color: var(--muted); }
.root-advice b { color: #a47700; font-weight: 600; }
.record-list { padding: 3px 14px 10px; }
.record-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 7px; align-items: start; padding: 7px 0; border-bottom: 1px solid rgba(23,39,50,.07); }
.record-row:last-child { border-bottom: 0; }
.record-time { font-family: var(--mono); font-size: 7px; color: var(--muted-2); padding-top: 2px; }
.record-main b { display: block; font-size: 8px; font-weight: 500; }
.record-main span { display: block; font-size: 6.5px; color: var(--muted-2); margin-top: 1px; }
.record-owner { font-family: var(--mono); font-size: 6.5px; color: var(--muted-2); padding-top: 2px; }
.record-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; margin-right: 4px; background: var(--green); }
.record-dot.warn { background: var(--yellow); }
.record-dot.bad { background: var(--red); }

.footer { max-width: 1640px; margin: 0 auto; padding: 24px 28px 36px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted-2); font-family: var(--mono); font-size: 7px; }
.footer div { display: flex; align-items: center; gap: 7px; margin-right: auto; color: var(--ink); }
.footer b { font-family: var(--sans); font-size: 13px; letter-spacing: 2px; }
.footer span:last-child { font-family: var(--body); font-size: 8px; color: var(--muted-2); }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 300; transform: translate(-50%, 10px); background: var(--blue-2); color: #fff; font-size: 10px; padding: 10px 17px; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .inspection-grid { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .vision-stage { min-height: 360px; }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .record-panel { grid-column: 1 / -1; }
  .record-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
}
@media (max-width: 1080px) {
  .topnav { gap: 15px; }
  .top-meta .batch, .top-meta .clock { display: none; }
  .board-head { grid-template-columns: 1fr; gap: 16px; }
  .board-side { align-items: center; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .inspection-grid { grid-template-columns: 1fr 1fr; }
  .batch-panel { grid-column: 1; }
  .vision-panel { grid-column: 1 / -1; grid-row: 2; }
  .defect-panel { grid-column: 2; grid-row: 1; }
  .vision-stage { min-height: 420px; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .section-desc { text-align: left; }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .record-panel { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 14px; gap: 8px; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 17px; }
  .topnav { gap: 12px; overflow-x: auto; }
  .topnav a { font-size: 10px; padding: 18px 0 16px; white-space: nowrap; }
  .top-meta { display: none; }
  .inspection { padding: 22px 14px 44px; }
  h1 { font-size: 40px; }
  .board-side { flex-direction: column; align-items: flex-start; gap: 12px; }
  .board-stamp { border-left: 0; padding-left: 0; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi:last-child { grid-column: 1 / -1; }
  .inspection-grid { grid-template-columns: 1fr; }
  .batch-panel, .vision-panel, .defect-panel { grid-column: auto; grid-row: auto; }
  .vision-stage { min-height: 300px; }
  .defect-list { max-height: 180px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .record-panel { grid-column: auto; }
  .record-list { display: block; }
  .section { padding: 46px 14px; }
  .footer { padding: 20px 14px 30px; gap: 8px; }
  .footer div { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
