@font-face {
  font-family: "Inter GPS";
  src: url("/assets/fonts/inter-400-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0020-00FF, U+2000-206F, U+20AC;
}

@font-face {
  font-family: "Noto Sans SC GPS";
  src: url("/assets/fonts/noto-sans-sc-400-600-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --font-family-sans: "Inter GPS", "Noto Sans SC GPS", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  font-variant-numeric: tabular-nums;
}

body, button, input, select, textarea { font-family: var(--font-family-sans); }
h1, h2, h3, h4, strong, b { font-weight: 600; }

/* Keep auxiliary text legible at the workstation's normal display scale. */
.sidebar { width: 190px; }
main { margin-left: 190px; grid-template-rows: 44px 76px 185px minmax(350px,1fr) 170px 30px; }
header { height: 44px; }
.side-label, .tree-child, .device-panel b, .side-bottom { line-height: 1.5; }
.brand small { letter-spacing: .5px; }
.workspace { grid-template-columns: minmax(0,1fr) 290px; }
.visual-section { grid-template-rows: 32px minmax(0,1fr) 30px 36px 115px; }
.viewer-head { min-height: 32px; }
.viewer-foot { min-height: 26px; }
.toolbar > div, .toolbar .reference {
  flex-direction: row;
  align-items: center;
}
.toolbar label { margin: 0; flex-shrink: 0; }
.part-image { background-size: contain; background-position: center; }
#cloud canvas, #reference-cloud canvas { display: block; width: 100%; height: 100%; }
.photo-card > span { min-height: 24px; }
.label-panel { overflow: auto; }
.physical-label { height: auto; min-height: 66px; padding: 7px 9px; }
.physical-label small { font-size:13px; line-height: 1.3; letter-spacing: 0; }
.physical-label strong { font-size: 16px; margin: 3px 0; }
.physical-label > span { font-size:13px; }
.results { overflow: auto; }
.review-panel p, .verdict p, .result-note { line-height: 1.6; }
.event-row { grid-template-columns: 92px 76px 1fr; line-height: 1.6; }
footer { gap: 16px; }
.capture-steps span { line-height: 1.4; }
.tree-row, .tree-child { line-height: 1.5; }
.viewer-head { padding-top: 5px; padding-bottom: 5px; }
.viewer-foot { padding-top: 3px; padding-bottom: 3px; }
.check-item { line-height: 1.5; gap: 8px; }
th, td { line-height: 1.5; }
.label-content { align-items: center; }
.physical-label strong { font-size: 17px; }
.ocr strong { font-size: 14px; }
@media (max-width: 1200px) and (min-width: 901px) {
  .sidebar { width: 164px; }
  main { margin-left: 164px; grid-template-rows: 44px 84px 185px minmax(350px,1fr) 180px 30px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar select { min-width: 160px; }
  .toolbar .reference select { min-width: 180px; }
  .toolbar .primary { min-width: 105px; }
  .workspace { grid-template-columns: minmax(0,1fr) 248px; }
  .visual-section { grid-template-rows: 32px minmax(0,1fr) 30px 40px 118px; }
  .viewer-head small { display: none; }
  .ocr { gap: 10px; }
  .label-content { gap: 10px; }
  .physical-label { width: 140px; }
  .app-actions button { padding: 5px 6px; }
  .model-options { flex-wrap: wrap; }
}
@media (min-width: 901px) and (max-height: 980px) {
  body { overflow: auto; }
  main { height: auto; min-height: 980px; overflow: visible; }
  body.presentation-mode main { min-height: 980px; }
}
@media (max-width: 900px) {
  .sidebar { width: 66px; }
  main { margin-left: 66px; }
  .workspace { grid-template-columns: minmax(0,1fr) 240px; }
}
@media (max-width: 600px) {
  main { margin-left: 0; }
  .workspace { grid-template-columns: 1fr; }
}

/* High-contrast typography for the inspection workstation and screen capture. */
body { color: #e2eaf1; }
.side-label, .tree-child, .side-bottom, .side-bottom small,
.brand small, .device-panel > div:not(.side-label), .device-panel b,
.window-title small, .toolbar label, .viewer-head small,
.viewer-foot, .viewer-foot small, .capture-progress,
.capture-steps span, .photo-card > span, .photo-card small,
.ocr span, .metrics > div > span, .findings ul, .check-item,
.result-note, .review-panel p, .review-buttons label,
.history-head h2, th, td, .event-row, .event-row time,
.dock-tabs > span, footer, footer b, .model-options,
.model-options span, .visual-controls > span, .model-stage,
.presentation-caption > span, .rules-note {
  color: #bdcbd8;
  font-weight: 500;
}
.tree-root, .tree-row, .window-title, .viewer-head span,
.capture-heading h2, .visual-title h2, .result-header h2,
.findings h3, .history-head h2, .ocr strong,
.review-buttons button, .app-actions button, .dock-tabs button,
.segmented button, .model-options button, .visual-controls button {
  color: #dce7f0;
  font-weight: 600;
}
.toolbar select, .review-buttons input { color: #ecf3f8; font-weight: 500; }
.review-buttons input::placeholder { color: #aabccd; opacity: 1; }
.capture-steps .active, .capture-steps .done { color: #bcecf1; font-weight: 600; }
.photo-card.captured > span, .photo-card.captured small { color: #d7edf2; }
.metrics strong, .ocr strong { font-weight: 600; }
.verdict p { color: #dce7f0; font-weight: 500; }
.event-row b { color: #a0deea; font-weight: 600; }
.event-row.warn b { color: #f3cd93; }
.model-stage { background: #172633; }
.presentation-caption { background: #142735; }
.dimension-modal { position:fixed;inset:0;z-index:30;background:#08131ccc;display:grid;place-items:center;padding:20px; }
.dimension-dialog { width:min(1150px,95vw);max-height:92vh;overflow:auto;background:#202b37;border:1px solid #577285;color:#dce7f0; }
.dimension-source, #dimension-summary { margin:12px 18px;font-size:13px;line-height:1.7;color:#bdcbd8; }
.dimension-config { display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:8px 18px; }
.dimension-config label { display:flex;gap:8px;align-items:center; }
.dimension-dialog input { width:90px;padding:6px;color:#e2edf4;background:#172634;border:1px solid #4e6578;font:inherit; }
.dimension-dialog button { padding:7px 12px;color:#e2edf4;background:#294b5d;border:1px solid #4e7589; }
.dimension-table-wrap { max-height:54vh;overflow:auto;margin:12px 18px; }
.dimension-table-wrap table { width:100%;font-size:13px; }
.dimension-table-wrap th { position:sticky;top:0;z-index:1; }
.dimension-table-wrap td { white-space:nowrap;font-size:13px; }
.dimension-fail td:last-child { color:#ffd08d;font-weight:600; }
.dimension-pass td:last-child { color:#a6e1ce; }
.dimension-unknown td:last-child { color:#b5d5ff; }

.account-actions{display:flex;align-items:center;gap:9px;margin-left:8px;padding-left:12px;border-left:1px solid #536879}.account-actions span{font-size:12px;color:#c2d4e0}.account-actions button{white-space:nowrap}
