:root {
  color-scheme: dark;
  /* Studio visual contract. Keep the legacy aliases below because the library's
     geometry tools use them throughout their existing DOM and interaction code. */
  --ui-bg-base: #0d0d0f;
  --ui-bg-surface: #141416;
  --ui-bg-elevated: #242428;
  --ui-bg-overlay: #242428;
  --ui-bg-control: #27272b;
  --ui-bg-input: #1a1a1d;
  --ui-border-subtle: rgba(255, 255, 255, 0.06);
  --ui-border-default: rgba(255, 255, 255, 0.10);
  --ui-border-strong: rgba(255, 255, 255, 0.18);
  --ui-text-primary: #f0f0f2;
  --ui-text-secondary: #8b8b96;
  --ui-text-muted: #5c5c68;
  --ui-accent: #7c6af7;
  --ui-accent-hover: #9181f8;
  --ui-accent-muted: rgba(124, 106, 247, 0.16);
  --ui-accent-ring: rgba(124, 106, 247, 0.35);
  --ui-success: #b8f0d0;
  --ui-radius-sm: 7px;
  --ui-radius-md: 10px;
  --ui-radius-lg: 13px;
  --ui-shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 3px rgba(0,0,0,.18);
  --ui-shadow-md: 0 4px 12px rgba(0,0,0,.34), 0 2px 6px rgba(0,0,0,.22);
  --ui-shadow-lg: 0 12px 32px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.28);
  --ui-inset-highlight: inset 0 1px 0 rgba(255,255,255,.05);
  --ui-transition: border-color .15s cubic-bezier(.16,1,.3,1), background-color .15s cubic-bezier(.16,1,.3,1), color .15s cubic-bezier(.16,1,.3,1), filter .15s cubic-bezier(.16,1,.3,1), opacity .15s cubic-bezier(.16,1,.3,1), box-shadow .15s cubic-bezier(.16,1,.3,1);
  --bg: var(--ui-bg-base);
  --panel: var(--ui-bg-surface);
  --panel-2: var(--ui-bg-elevated);
  --panel-3: var(--ui-bg-overlay);
  --line: var(--ui-border-default);
  --line-strong: var(--ui-border-strong);
  --text: var(--ui-text-primary);
  /* Legacy `--muted` is used for readable labels and helper copy, so map it to
     Studio secondary text. `--ui-text-muted` remains available for tertiary chrome. */
  --muted: var(--ui-text-secondary);
  --muted-2: var(--ui-text-secondary);
  --mint: var(--ui-accent);
  --mint-strong: #ded9ff;
  --blue: var(--ui-accent-hover);
  --amber: #efc66f;
  --red: #ee7676;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;
  --sans: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; }
button { color: inherit; }

.aircraft-library {
  width: 100%; height: 100%; display: grid;
  grid-template: 58px minmax(0, 1fr) / 292px minmax(430px, 1fr) 356px;
  background:
    radial-gradient(circle at 52% 38%, rgba(68, 115, 128, 0.10), transparent 36%),
    linear-gradient(135deg, #070b0f 0%, #091017 55%, #070b0f 100%);
}
.aircraft-library.engineering-collapsed { grid-template-columns: 292px minmax(430px,1fr) 34px; }

.library-header {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  min-width: 0; padding: 0 18px; border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 15, 0.92); backdrop-filter: blur(18px); z-index: 10;
}
.library-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.library-back {
  width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 5px; color: var(--muted-2); text-decoration: none; transition: 120ms ease;
}
.library-back:hover, .library-back:focus-visible { color: var(--mint-strong); border-color: rgba(117,223,192,.5); outline: none; }
.library-brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(117,223,192,.35);
  border-radius: 7px; background: linear-gradient(145deg, rgba(117,223,192,.17), rgba(60,102,121,.1));
  color: var(--mint-strong); font: 700 16px/1 var(--mono);
}
.library-brand > div { display: grid; gap: 3px; }
.library-brand strong { font-size: 14px; letter-spacing: .01em; }
.library-brand div span { color: var(--muted); font: 700 8px/1 var(--mono); letter-spacing: .15em; }
.library-header-meta { display: flex; align-items: center; gap: 15px; color: var(--muted); font: 650 9px/1 var(--mono); }
.library-health { display: flex; align-items: center; gap: 7px; color: var(--muted-2); }
.library-health i { width: 6px; height: 6px; border-radius: 50%; background: #68757d; box-shadow: 0 0 0 4px rgba(104,117,125,.08); }
.library-health[data-state="ready"] i { background: var(--mint); box-shadow: 0 0 0 4px rgba(117,223,192,.10); }
.library-health[data-state="error"] i { background: var(--red); }

.variant-browser, .engineering-panel { min-height: 0; background: rgba(10, 16, 22, 0.93); }
.variant-browser { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.browser-heading { padding: 22px 18px 15px; }
.browser-heading > span { color: var(--mint); font: 700 8px/1 var(--mono); letter-spacing: .14em; }
.browser-heading h1 { margin: 6px 0 5px; font-size: 23px; font-weight: 620; letter-spacing: -.025em; }
.browser-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.asset-kind-tabs {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; margin: 0 16px 10px;
  padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.012);
}
.asset-kind-tabs button {
  height: 30px; border: 1px solid transparent; border-radius: 4px; background: transparent;
  min-width: 0; padding: 0 2px; color: var(--muted); font: 650 7px/1 var(--mono); cursor: pointer;
}
.asset-kind-tabs button:hover { color: var(--text); }
.asset-kind-tabs button:focus-visible { outline: 1px solid var(--blue); outline-offset: 1px; color: var(--text); }
.asset-kind-tabs button.active {
  border-color: rgba(117,223,192,.25); background: rgba(117,223,192,.09); color: var(--mint-strong);
}
.variant-search { height: 36px; display: flex; align-items: center; gap: 7px; margin: 0 16px 10px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.018); color: var(--muted); }
.variant-search:focus-within { border-color: rgba(117,223,192,.4); box-shadow: 0 0 0 2px rgba(117,223,192,.05); }
.variant-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.variant-search input::placeholder { color: #64737d; }
.variant-rail { min-height: 0; flex: 1; overflow: auto; padding: 0 10px 18px; scrollbar-width: thin; scrollbar-color: #30404a transparent; }
.family-group { margin-bottom: 9px; }
.family-label { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 7px 5px; border: 0; outline: 0; background: transparent; color: #71818b; font: 700 8px/1 var(--mono); letter-spacing: .12em; text-align: left; }
.family-label[data-terminal-group-toggle] { display: grid; grid-template-columns: minmax(0,1fr) auto 10px; gap: 7px; border-radius: 4px; cursor: pointer; }
.family-label[data-terminal-group-toggle] span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-label[data-terminal-group-toggle]:hover { background: rgba(255,255,255,.025); color: var(--muted-2); }
.family-label[data-terminal-group-toggle]:focus-visible { box-shadow: inset 0 0 0 1px rgba(125,174,244,.56); color: var(--text); }
.family-label[data-terminal-group-toggle] i { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform 120ms ease; }
.family-label[data-terminal-group-toggle][aria-expanded="false"] i { transform: rotate(-45deg) translate(-1px,-1px); }
.family-label b { color: #53616a; font-weight: 600; }
.family-assets[hidden] { display: none; }
.variant-card { width: 100%; display: grid; grid-template-columns: 41px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 58px; margin: 4px 0; padding: 8px; border: 1px solid transparent; border-radius: 6px; background: rgba(255,255,255,.016); text-align: left; cursor: pointer; transition: 130ms ease; }
.variant-card:hover { border-color: var(--line); background: rgba(255,255,255,.035); }
.variant-card.active { border-color: rgba(117,223,192,.36); background: linear-gradient(90deg, rgba(117,223,192,.12), rgba(117,223,192,.025)); box-shadow: inset 2px 0 var(--mint); }
.variant-thumb { width: 41px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: radial-gradient(circle, rgba(125,174,244,.1), transparent 70%); color: #92a9b5; }
.variant-thumb svg { width: 34px; height: 24px; fill: currentColor; opacity: .88; }
.variant-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 3px; }
.variant-thumb-pending { color: var(--muted); font: 650 5px/1 var(--mono); letter-spacing: .06em; }
.variant-thumb svg.vehicle-icon { width: 32px; height: 26px; }
.variant-thumb svg.terminal-icon { width: 34px; height: 27px; }
.variant-thumb svg.terminal-person-icon { width: 24px; height: 29px; }
.variant-card.active .variant-thumb { color: var(--mint-strong); }
.variant-copy { min-width: 0; display: grid; gap: 4px; }
.variant-copy strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.variant-copy span { overflow: hidden; color: var(--muted); font: 600 8px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.variant-state { display: grid; justify-items: end; gap: 6px; }
.variant-state b { color: var(--muted-2); font: 650 7px/1 var(--mono); }
.variant-state em { padding: 3px 4px; border: 1px solid rgba(94,199,255,.32); border-radius: 3px; color: var(--blue); font: 700 6px/1 var(--mono); font-style: normal; letter-spacing: .06em; }
.variant-state em[data-completion-state="finish"] { border-color: var(--ui-accent-ring); background: var(--ui-accent-muted); color: #ded9ff; }
.variant-state em[data-completion-state="processing"] { border-color: rgba(125,174,244,.38); background: rgba(125,174,244,.07); color: var(--blue); }
.variant-state em[data-completion-state="processing-v1"] { border-color: rgba(239,198,111,.52); background: rgba(239,198,111,.10); color: var(--amber); box-shadow: 0 0 10px rgba(239,198,111,.08); }
.variant-state i { width: 6px; height: 6px; border-radius: 50%; background: #68757d; }
.variant-state i.published { background: var(--mint); }
.variant-state i.estimated { background: var(--amber); }
.browser-legend { display: flex; gap: 13px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font: 600 7px/1 var(--mono); }
.browser-legend span { display: flex; align-items: center; gap: 5px; }
.browser-legend i { width: 5px; height: 5px; border-radius: 50%; }
.browser-legend .is-published { background: var(--mint); }.browser-legend .is-estimated { background: var(--amber); }
.variant-empty { display: grid; gap: 7px; padding: 30px 12px; color: var(--muted); text-align: center; }
.variant-empty strong { color: var(--muted-2); font-size: 11px; }.variant-empty span { font-size: 9px; line-height: 1.5; }

.aircraft-stage { min-width: 0; min-height: 0; position: relative; display: grid; grid-template-rows: 69px 36px minmax(0, 1fr) 74px; overflow: hidden; }
.aircraft-stage::before { content: ""; position: absolute; inset: 105px 0 74px; pointer-events: none; background-image: linear-gradient(rgba(120,160,176,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,176,.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at center, black, transparent 78%); }
.stage-title { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.stage-title > div:first-child { min-width: 0; display: grid; gap: 5px; }
.stage-title span { color: var(--muted); font: 700 8px/1 var(--mono); letter-spacing: .1em; }
.stage-title h2 { overflow: hidden; margin: 0; font-size: 18px; font-weight: 610; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.stage-badges { display: flex; gap: 6px; }
.stage-badges span { padding: 6px 7px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.02); color: var(--muted-2); font-size: 7px; }
#stageStatus[data-state="finish"] { border-color: var(--ui-accent-ring); background: var(--ui-accent-muted); color: #ded9ff; }
#stageStatus[data-state="processing"] { border-color: rgba(125,174,244,.38); background: rgba(125,174,244,.07); color: var(--blue); }
#stageStatus[data-state="processing-v1"] { border-color: rgba(239,198,111,.52); background: rgba(239,198,111,.10); color: var(--amber); box-shadow: 0 0 12px rgba(239,198,111,.08); }
.stage-toolbar { position: relative; z-index: 3; display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 0 13px; border-bottom: 1px solid var(--line); background: rgba(8,13,18,.68); scrollbar-width: none; }
.stage-toolbar::-webkit-scrollbar { display: none; }
.stage-toolbar > span { flex: 1; }
.stage-toolbar button { height: 25px; flex: 0 0 auto; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font: 650 8px/1 var(--mono); cursor: pointer; }
.stage-toolbar button:hover { color: var(--text); }.stage-toolbar button.active { border-color: var(--line-strong); background: rgba(255,255,255,.04); color: var(--mint-strong); }
.vehicle-configuration-controls { display: inline-flex; align-items: center; gap: 2px; margin-right: 5px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: rgba(2,7,10,.46); }
.vehicle-configuration-controls[hidden] { display: none; }
.vehicle-configuration-controls::before { content: attr(data-label); padding: 0 5px 0 3px; color: var(--muted-2); font: 650 7px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.stage-toolbar .vehicle-configuration-controls button { height: 20px; padding: 0 6px; border-radius: 3px; }
.stage-toolbar .vehicle-configuration-controls button.active { border-color: rgba(117,223,192,.32); background: rgba(117,223,192,.08); }
.stage-viewport { min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.stage-viewport canvas { width: 100%; height: 100%; display: block; outline: none; }
.aircraft-measurements { position: absolute; z-index: 5; inset: 0; overflow: hidden; pointer-events: none; }
.aircraft-measurements[hidden] { display: none; }
.aircraft-measurements > span { position: absolute; top: 10px; left: 13px; padding: 5px 7px; border: 1px solid rgba(125,174,244,.3); border-radius: 3px; background: rgba(7,11,15,.74); color: #9dbff3; font: 700 7px/1 var(--mono); letter-spacing: .08em; }
.aircraft-measurements output { position: absolute; display: block; max-width: min(330px,42vw); padding: 5px 8px; border: 1px solid rgba(125,174,244,.7); border-radius: 3px; background: rgba(7,11,15,.88); color: #dbe9ff; font: 700 10px/1.2 var(--mono); letter-spacing: .02em; white-space: nowrap; transform: translate(-50%,-50%); box-shadow: 0 2px 9px rgba(0,0,0,.28); }
.aircraft-measurements output[data-measurement="wheelbase"] { border-color: rgba(117,223,192,.78); color: #baf2df; }
.aircraft-measurements output[data-contract-state="fail"] { border-color: rgba(255,93,93,.9); color: #ffb0b0; }
.aircraft-measurements output[data-contract-state="unavailable"] { border-color: rgba(173,201,217,.28); color: var(--muted); }
.stage-loading { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 9px; background: rgba(7,11,15,.72); color: var(--muted-2); font: 650 9px/1 var(--mono); transition: opacity .25s; }
.stage-loading[hidden] { display: none; }.stage-loading i { width: 13px; height: 13px; border: 2px solid rgba(117,223,192,.18); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-watermark, .stage-model-state { position: absolute; z-index: 3; bottom: 10px; color: rgba(173,201,217,.46); font: 650 7px/1 var(--mono); letter-spacing: .08em; pointer-events: none; }
.stage-watermark { left: 13px; }.stage-model-state { right: 13px; padding: 5px 6px; border: 1px solid rgba(173,201,217,.12); border-radius: 3px; background: rgba(7,11,15,.48); }
.component-legend { position: absolute; z-index: 4; right: 13px; bottom: 42px; display: grid; grid-template-columns: repeat(2,auto); gap: 5px 9px; padding: 8px 9px; border: 1px solid rgba(173,201,217,.2); border-radius: 5px; background: rgba(7,11,15,.84); backdrop-filter: blur(8px); pointer-events: none; }
.component-legend[hidden] { display: none; }
.component-legend span { display: flex; align-items: center; gap: 5px; color: var(--muted-2); font: 650 7px/1 var(--mono); }
.component-legend span::before { width: 7px; height: 7px; border-radius: 2px; background: #9ba9b1; content: ''; }
.component-legend [data-part="fuselage"]::before { background: #4aa8ff; }.component-legend [data-part="wing"]::before { background: #ff5d5d; }.component-legend [data-part="tail"]::before { background: #ff9d3d; }
.component-legend [data-part="engine"]::before { background: #62df74; }.component-legend [data-part="pylon"]::before { background: #ffd43b; }.component-legend [data-part="gear"]::before { background: #47e0dc; }
.component-legend [data-part="tire"]::before { background: #171a20; border: 1px solid #778089; }.component-legend [data-part="propeller"]::before { background: #b98cff; }
.component-legend [data-part="glazing"]::before { background: #183b5a; border: 1px solid #5b8195; }.component-legend [data-part="door"]::before { background: #f2e35f; }
.stage-metrics { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line); background: rgba(8,13,18,.80); }
.stage-metrics > div { min-width: 0; display: grid; align-content: center; gap: 7px; padding: 0 16px; border-right: 1px solid var(--line); }
.stage-metrics > div:last-child { border-right: 0; }.stage-metrics span { color: var(--muted); font: 700 7px/1 var(--mono); letter-spacing: .11em; }.stage-metrics strong { font: 620 15px/1 var(--mono); }

.engineering-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.engineering-panel-header { height: 47px; flex: 0 0 47px; display: grid; grid-template-columns: minmax(0,1fr) 30px; border-bottom: 1px solid var(--line); }
.engineering-tabs { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.engineering-tabs button { position: relative; border: 0; background: transparent; color: var(--muted); font: 650 9px/1 var(--mono); cursor: pointer; }
.engineering-tabs button::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 2px; background: transparent; }
.engineering-tabs button.active { color: var(--mint-strong); }.engineering-tabs button.active::after { background: var(--mint); }
.engineering-tabs button:disabled { color: rgba(126,143,153,.36); cursor: not-allowed; }
.engineering-panel-toggle { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted-2); font-size: 10px; cursor: pointer; }
.engineering-panel.is-collapsed .engineering-panel-header { height: 100%; flex: 1; grid-template-columns: 1fr; border-bottom: 0; }
.engineering-panel.is-collapsed .engineering-tabs,.engineering-panel.is-collapsed .engineering-scroll,.engineering-panel.is-collapsed .engineering-actions { display: none; }
.engineering-panel.is-collapsed .engineering-panel-toggle { width: 100%; height: 100%; border-left: 0; writing-mode: vertical-rl; }
.engineering-scroll { min-height: 0; flex: 1; overflow: auto; padding: 12px; scrollbar-width: thin; scrollbar-color: #30404a transparent; }
.info-panel { display: grid; gap: 10px; }.info-panel[hidden] { display: none; }
.reference-view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.012); }
.reference-view-tabs button { min-width: 0; height: 31px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font: 650 7px/1 var(--mono); cursor: pointer; }
.reference-view-tabs button.active { border-color: rgba(117,223,192,.30); background: rgba(117,223,192,.08); color: var(--mint-strong); }
.reference-view-tabs i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #68757d; }
.reference-view-tabs i[data-availability="local"] { background: var(--mint); }.reference-view-tabs i[data-availability="source_link_only"] { background: var(--blue); }.reference-view-tabs i[data-availability="derived_in_application"] { background: var(--amber); }
.reference-view-tabs i[data-availability="official_photo"] { background: var(--amber); box-shadow: 0 0 0 2px rgba(239,198,111,.12); }
.reference-evidence-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.012); }
.reference-evidence-modes[hidden], .reference-authoring-actions[hidden] { display: none; }
.reference-evidence-modes button { height: 29px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font: 700 7px/1 var(--mono); cursor: pointer; }
.reference-evidence-modes button.active { border-color: rgba(125,174,244,.34); background: rgba(125,174,244,.08); color: var(--blue); }
.reference-authoring-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reference-authoring-actions button { min-height: 24px; padding: 0 8px; border: 1px solid rgba(125,174,244,.30); border-radius: 4px; background: rgba(125,174,244,.07); color: var(--blue); font: 700 6px/1.2 var(--mono); cursor: pointer; }
.reference-authoring-actions button:last-of-type { border-color: rgba(117,223,192,.30); background: rgba(117,223,192,.07); color: var(--mint); }
.reference-authoring-actions button:disabled { opacity: .38; cursor: not-allowed; }
.reference-authoring-actions > span { min-height: 20px; display: flex; align-items: center; margin-left: auto; padding: 0 7px; border-left: 2px solid rgba(239,198,111,.45); color: var(--muted); font: 600 6px/1.35 var(--mono); }
.reference-comparison { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.reference-comparison figure { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.012); }
.reference-comparison figcaption { height: 27px; display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--muted); font: 700 6px/1 var(--mono); letter-spacing: .08em; }
.reference-comparison figcaption .reference-edit-trigger { margin-left: auto; height: 20px; padding: 0 7px; border: 1px solid rgba(125,174,244,.30); border-radius: 3px; background: rgba(125,174,244,.08); color: var(--blue); font: 700 6px/1 var(--mono); letter-spacing: .04em; cursor: pointer; }
.reference-comparison figcaption .reference-edit-trigger:hover { border-color: rgba(125,174,244,.56); background: rgba(125,174,244,.14); }
.reference-frame { min-height: 172px; position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(71,113,128,.12), transparent 70%); }
.reference-frame > img { width: 100%; height: 172px; display: block; object-fit: contain; }
.reference-capture-meta { position: absolute; left: 6px; right: 6px; bottom: 5px; overflow: hidden; padding: 4px 5px; border: 1px solid rgba(117,223,192,.16); border-radius: 3px; background: rgba(7,11,15,.82); color: var(--mint); font: 650 5px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reference-preview-badge { position: absolute; right: 6px; bottom: 5px; padding: 4px 5px; border: 1px solid rgba(239,198,111,.3); border-radius: 3px; background: rgba(7,11,15,.9); color: var(--amber); font: 700 5px/1 var(--mono); letter-spacing: .04em; }
.reference-photo-badge { position: absolute; left: 6px; top: 6px; padding: 4px 5px; border: 1px solid rgba(239,198,111,.36); border-radius: 3px; background: rgba(7,11,15,.90); color: var(--amber); font: 750 5px/1 var(--mono); letter-spacing: .04em; }
.reference-photo-context { position: absolute; left: 6px; right: 6px; bottom: 5px; overflow: hidden; padding: 4px 5px; border: 1px solid rgba(173,201,217,.18); border-radius: 3px; background: rgba(7,11,15,.86); color: var(--muted-2); font: 600 5px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reference-frame > img[data-reference-zoom] { cursor: zoom-in; }
.reference-empty { width: 100%; min-height: 172px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 12px; color: var(--muted); text-align: center; }
.reference-empty strong { color: var(--muted-2); font: 700 8px/1 var(--mono); }.reference-empty span { font-size: 8px; line-height: 1.45; }
.reference-empty button, .reference-empty a { padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--blue); font: 650 7px/1 var(--mono); text-decoration: none; cursor: pointer; }
.reference-empty.unavailable strong { color: var(--amber); }.reference-empty.source-only strong { color: var(--blue); }
.reference-derived-svg { width: calc(100% - 20px); height: 142px; overflow: visible; }.reference-derived-svg path { fill: rgba(125,174,244,.14); stroke: var(--blue); stroke-width: .22; vector-effect: non-scaling-stroke; }
.reference-derived-label { position: absolute; bottom: 7px; padding: 4px 5px; border: 1px solid rgba(239,198,111,.25); border-radius: 3px; background: rgba(7,11,15,.82); color: var(--amber); font: 700 6px/1 var(--mono); }
.reference-comparison[data-mode="document"] { grid-template-columns: 1fr; }
.reference-comparison[data-mode="document"] .reference-frame { min-height: 260px; }
.reference-comparison[data-mode="document"] .reference-frame > img { height: 260px; }
.reference-comparison[data-mode="document"][data-document-layout="full-dimension-sheet"] .reference-frame { min-height: 440px; }
.reference-comparison[data-mode="document"][data-document-layout="full-dimension-sheet"] .reference-frame > img { height: 440px; }
.reference-comparison[data-mode="contours"] { grid-template-columns: 1fr; }
.reference-comparison[data-mode="contours"] .reference-frame { min-height: 260px; background: #071015; }
.reference-comparison[data-mode="contours"] .reference-frame > img { height: 260px; }
.reference-contour-figure > figcaption { height: auto; min-height: 27px; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.reference-contour-key { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; color: var(--muted-2); white-space: nowrap; }
.reference-contour-key i { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-style: normal; }
.reference-contour-key i::before { width: 15px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 0 6px currentColor; content: ''; }
.reference-contour-key [data-contour-layer="official"] { color: #4ad3ff; }
.reference-contour-key [data-contour-layer="model"] { color: #ff9748; }
.reference-comparison[data-mode="contours"] .reference-contour-source-figure .reference-frame { background: radial-gradient(circle, rgba(71,113,128,.12), transparent 70%); }
.reference-contour-stack { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #071015; }
.reference-contour-canvas { width: 100%; height: 260px; display: block; object-fit: contain; cursor: zoom-in; }
.contour-source-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.contour-source-controls[hidden] { display: none; }
.contour-source-controls label { min-width: 0; height: 31px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 650 6px/1 var(--mono); }
.contour-source-controls .contour-layer-toggle { grid-template-columns: auto minmax(0,1fr); cursor: pointer; }
.contour-source-controls label:last-child { grid-column: 1 / -1; }
.contour-source-controls input[type="checkbox"] { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }
.contour-source-controls input[type="range"] { min-width: 0; accent-color: var(--blue); }
.contour-source-controls input:disabled { opacity: .38; cursor: not-allowed; }
.contour-source-controls b { min-width: 45px; color: var(--muted-2); font-size: 6px; text-align: right; }
.reference-attribution { padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.016); }
.reference-attribution header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.reference-attribution header strong { font-size: 9px; line-height: 1.35; }.reference-attribution header span { flex: 0 0 auto; color: var(--blue); font: 700 6px/1 var(--mono); }
.reference-attribution dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 7px 10px; margin: 10px 0 0; padding-top: 9px; border-top: 1px solid rgba(173,201,217,.08); }.reference-attribution dt,.reference-attribution dd { margin: 0; font-size: 7px; }.reference-attribution dt { color: var(--muted); }.reference-attribution dd { overflow-wrap: anywhere; color: var(--muted-2); font-family: var(--mono); text-align: right; }
.reference-attribution p { margin: 9px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }.reference-attribution a { display: inline-block; margin-top: 8px; color: var(--blue); font: 650 8px/1 var(--mono); text-decoration: none; }
.source-view-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid rgba(125,174,244,.22); border-radius: 6px; background: rgba(125,174,244,.045); }
.source-view-entry div { min-width: 0; display: grid; gap: 4px; }.source-view-entry strong { color: var(--blue); font: 750 7px/1 var(--mono); letter-spacing: .08em; }.source-view-entry span { color: var(--muted); font-size: 8px; line-height: 1.35; }
.source-view-entry button { flex: 0 0 auto; height: 29px; padding: 0 9px; border: 1px solid rgba(125,174,244,.30); border-radius: 4px; background: rgba(125,174,244,.08); color: var(--blue); font: 700 7px/1 var(--mono); cursor: pointer; }
.planform-card, .data-block, .evidence-summary, .qa-score, .version-history { border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.018); overflow: hidden; }
.building-parameter-panel { display: grid; gap: 9px; padding: 10px; border: 1px solid rgba(117,223,192,.22); border-radius: 6px; background: rgba(117,223,192,.035); }
.building-parameter-panel[hidden] { display: none; }
.building-parameter-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.building-parameter-panel > header div { min-width: 0; display: grid; gap: 4px; }
.building-parameter-panel > header span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .1em; }
.building-parameter-panel > header strong { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.building-parameter-panel > header b { flex: 0 0 auto; padding: 4px 5px; border: 1px solid rgba(117,223,192,.28); border-radius: 3px; color: var(--mint); font: 700 5.5px/1 var(--mono); letter-spacing: .06em; }
.building-parameter-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.building-parameter-fields:empty::after { grid-column: 1/-1; padding: 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 650 7px/1.4 var(--mono); content: 'Dimensions use the existing Studio geometry authority.'; }
.building-parameter-fields label { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: #091118; }
.building-parameter-fields label[hidden] { display: none; }
.building-parameter-fields span { overflow: hidden; color: var(--muted); font: 700 6px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.building-parameter-fields input,.building-parameter-fields select { min-width: 0; width: 48px; height: 24px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 3px; outline: 0; background: #060c11; color: var(--text); font: 700 7px/1 var(--mono); }
.building-parameter-fields select { width: 92px; }
.building-parameter-fields input:focus,.building-parameter-fields select:focus { border-color: rgba(117,223,192,.55); }
.building-parameter-fields i { color: var(--muted); font: 600 6px/1 var(--mono); font-style: normal; }
.building-parameter-panel > p { margin: 0; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.building-parameter-panel > a { color: var(--blue); font: 700 7px/1 var(--mono); text-decoration: none; }
.building-parameter-panel > output { padding-top: 7px; border-top: 1px solid var(--line); color: var(--mint); font: 700 6px/1.35 var(--mono); letter-spacing: .04em; }
.terminal-parameter-panel { display: grid; gap: 10px; padding: 10px; border: 1px solid rgba(125,174,244,.24); border-radius: 6px; background: linear-gradient(145deg,rgba(125,174,244,.055),rgba(117,223,192,.025)); }
.aircraft-library[data-active-asset-kind="terminal"] .aircraft-stage { background: radial-gradient(circle at 47% 42%,rgba(0,234,255,.055),transparent 42%),radial-gradient(circle at 73% 67%,rgba(255,46,166,.025),transparent 30%),#071018; }
.aircraft-library[data-active-asset-kind="terminal"] .stage-model-state { border-color: rgba(0,234,255,.28); background: rgba(4,14,20,.78); color: #bdf7ff; box-shadow: 0 0 18px rgba(0,207,232,.08); }
.aircraft-library[data-active-asset-kind="ground_vehicle"] .aircraft-stage { background: radial-gradient(circle at 48% 48%,rgba(196,222,224,.052),transparent 46%),radial-gradient(circle at 72% 72%,rgba(91,165,177,.026),transparent 31%),#071116; }
.aircraft-library[data-active-asset-kind="ground_vehicle"] .stage-model-state { border-color: rgba(166,205,207,.24); background: rgba(5,14,18,.8); color: #d7e9e8; box-shadow: 0 0 18px rgba(102,181,190,.055); }
.aircraft-library[data-active-asset-kind="building"] .aircraft-stage { background: radial-gradient(circle at 48% 46%,rgba(218,226,218,.048),transparent 47%),radial-gradient(circle at 70% 70%,rgba(78,145,154,.024),transparent 30%),#071116; }
.aircraft-library[data-active-asset-kind="building"] .stage-model-state { border-color: rgba(177,200,197,.23); background: rgba(5,14,18,.8); color: #dce7e2; box-shadow: 0 0 18px rgba(111,177,182,.05); }
.aircraft-library[data-active-asset-kind="terminal"] .terminal-parameter-panel { border-color: rgba(0,234,255,.34); background: linear-gradient(145deg,rgba(0,207,232,.075),rgba(255,46,166,.025) 58%,rgba(34,255,114,.025)); box-shadow: inset 0 1px rgba(255,255,255,.035),0 8px 22px rgba(0,0,0,.16); }
.aircraft-library[data-active-asset-kind="terminal"] .terminal-parameter-panel > header b,.aircraft-library[data-active-asset-kind="terminal"] .terminal-parameter-panel > output { color: #70f5ff; text-shadow: 0 0 10px rgba(0,234,255,.26); }
.terminal-parameter-panel[hidden] { display: none; }
.terminal-parameter-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.terminal-parameter-panel > header div { min-width: 0; display: grid; gap: 4px; }
.terminal-parameter-panel > header span { color: var(--blue); font: 700 6px/1 var(--mono); letter-spacing: .1em; }
.terminal-parameter-panel > header strong { overflow: hidden; color: var(--text); font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.terminal-parameter-panel > header b { flex: 0 0 auto; max-width: 108px; overflow: hidden; padding: 4px 5px; border: 1px solid rgba(117,223,192,.28); border-radius: 3px; color: var(--mint); font: 700 5.5px/1 var(--mono); letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
.terminal-parameter-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(132px,1fr)); gap: 6px; }
.terminal-parameter-fields:empty::after { grid-column: 1/-1; padding: 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 650 7px/1.4 var(--mono); content: 'This asset uses its retained Incheon-inspired default proportions.'; }
.terminal-parameter-fields label { min-width: 0; min-height: 38px; display: grid; grid-template-columns: minmax(0,1fr) minmax(52px,82px) auto; align-items: center; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: #091118; }
.terminal-parameter-fields label[hidden] { display: none; }
.terminal-parameter-fields span { min-width: 0; color: var(--muted-2); font: 700 6px/1.25 var(--mono); overflow-wrap: anywhere; }
.terminal-parameter-fields input,.terminal-parameter-fields select { min-width: 0; width: 100%; height: 25px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 3px; outline: 0; background: #060c11; color: var(--text); font: 700 7px/1 var(--mono); }
.terminal-parameter-fields input[type="checkbox"] { justify-self: end; width: 15px; height: 15px; padding: 0; accent-color: var(--mint); }
.terminal-parameter-fields .terminal-readonly-parameter { min-width: 0; color: var(--mint); font: 700 6px/1.25 var(--mono); text-align: right; }
.terminal-parameter-fields input:focus,.terminal-parameter-fields select:focus { border-color: rgba(125,174,244,.64); box-shadow: 0 0 0 1px rgba(125,174,244,.10); }
.terminal-parameter-fields [data-normalized-by-authority="true"] { border-color: rgba(117,223,192,.84); color: #dcfff5; box-shadow: 0 0 0 1px rgba(117,223,192,.18),0 0 12px rgba(117,223,192,.12); }
.terminal-parameter-fields i { min-width: 10px; color: var(--muted); font: 600 6px/1 var(--mono); font-style: normal; }
.terminal-parameter-panel > p { margin: 0; color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.aircraft-library[data-terminal-security-non-overlap="1"] #terminalDesignNotes { color: #bfeadd; }
.aircraft-library[data-terminal-security-non-overlap="0"] #terminalDesignNotes { color: #ff9bb2; }
.terminal-parameter-panel > a { color: var(--blue); font: 700 7px/1 var(--mono); text-decoration: none; }
.terminal-parameter-panel > output { padding-top: 7px; border-top: 1px solid var(--line); color: var(--mint); font: 700 6px/1.4 var(--mono); letter-spacing: .035em; }
.terminal-authoring-hint { display: grid; gap: 5px; padding: 8px; border: 1px solid rgba(255,46,166,.25); border-left: 2px solid rgba(0,234,255,.65); border-radius: 4px; background: linear-gradient(90deg,rgba(0,234,255,.04),rgba(255,46,166,.035)); }
.terminal-authoring-hint[hidden] { display: none; }
.terminal-authoring-hint strong { color: #ff72c4; font: 750 6px/1 var(--mono); letter-spacing: .08em; }
.terminal-authoring-hint span { color: var(--muted-2); font: 600 7px/1.45 var(--mono); }
.terminal-path-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.terminal-path-actions button { min-height: 28px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 6px/1.2 var(--mono); cursor: pointer; }
.terminal-path-actions button:first-child { border-color: rgba(117,223,192,.38); color: var(--mint-strong); }
.terminal-path-actions button:first-child.active { background: rgba(117,223,192,.14); box-shadow: inset 0 0 0 1px rgba(117,223,192,.14); }
.terminal-path-actions button:focus-visible { outline: 1px solid var(--blue); outline-offset: 1px; }
.terminal-path-actions button:disabled { opacity: .36; cursor: not-allowed; }
.terminal-authoring-hint > output { min-height: 26px; padding: 7px 8px; border-radius: 3px; background: rgba(0,0,0,.15); color: #8ef7ff; font: 650 6px/1.45 var(--mono); }
.stage-viewport canvas[data-terminal-path-draw="true"] { cursor: crosshair; touch-action: none; outline: 1px solid rgba(117,223,192,.42); outline-offset: -1px; }
.planform-card > header, .data-block > header, .version-history > header { height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-bottom: 1px solid var(--line); }
.planform-card header span, .data-block header span, .version-history header span { color: var(--muted-2); font: 700 7px/1 var(--mono); letter-spacing: .11em; }
.planform-card header b, .data-block header b { color: var(--muted); font: 600 7px/1 var(--mono); }
#planformCanvas { width: 100%; height: 368px; display: block; background: radial-gradient(circle, rgba(71,113,128,.10), transparent 70%); }
.planform-key { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; border-top: 1px solid var(--line); color: var(--muted); font: 600 7px/1 var(--mono); }
.planform-key span { padding: 2px 4px; border-radius: 2px; color: #071015; font-weight: 800; }.planform-key .p1 { margin-left: 0; background: var(--blue); }.planform-key .p2 { margin-left: 7px; background: var(--mint); }
.planform-key .collision { width: 11px; height: 0; margin-left: 7px; padding: 0; border-top: 1px dashed var(--amber); border-radius: 0; }
.planform-key .dimension-line { width: 13px; height: 0; margin-left: 0; padding: 0; border-top: 1px solid var(--blue); border-radius: 0; }
.planform-key .extrema-dot { width: 6px; height: 6px; margin-left: 7px; padding: 0; border-radius: 50%; background: var(--amber); }
.data-block dl { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0; padding: 3px 10px; }
.data-block dt, .data-block dd { margin: 0; padding: 7px 0; border-bottom: 1px solid rgba(173,201,217,.07); font-size: 9px; }
.data-block dt { color: var(--muted); }.data-block dd { color: var(--text); font: 600 9px/1 var(--mono); text-align: right; }.data-block dt:last-of-type, .data-block dd:last-of-type { border-bottom: 0; }
.performance-data-block dl { grid-template-columns: minmax(0,1fr) minmax(120px,1.25fr); }
.performance-data-block dd { display: grid; justify-items: end; gap: 3px; }
.performance-data-block dd strong { color: var(--text); font: 650 9px/1 var(--mono); }
.performance-data-block dd small { max-width: 210px; overflow-wrap: anywhere; color: var(--muted); font: 550 7px/1.4 var(--mono); }
.performance-data-block dd small a { color: var(--blue); text-decoration: none; }
.performance-data-block dd small em { color: var(--mint); font-style: normal; }
.performance-verification { margin: 0; padding: 8px 10px; border-top: 1px solid rgba(173,201,217,.07); color: var(--muted); font: 600 7px/1.4 var(--mono); }
.performance-verification[data-state="verified"] { color: var(--mint); }
.performance-verification[data-state="partial"] { color: var(--amber); }
.engineering-actions { flex: 0 0 auto; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: rgba(7,11,15,.86); }
.engineering-actions > div { min-height: 14px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.reference-lightbox { width: min(94vw,1500px); height: min(90vh,1000px); margin: auto; padding: 0; border: 1px solid rgba(173,201,217,.26); border-radius: 8px; background: #070b0f; color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.7); }
.reference-lightbox::backdrop { background: rgba(2,5,8,.86); backdrop-filter: blur(4px); }
.reference-lightbox[open] { display: grid; grid-template-rows: 54px minmax(0,1fr) auto; }
.reference-lightbox > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.reference-lightbox > header div { min-width: 0; display: grid; gap: 5px; }.reference-lightbox > header span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .12em; }.reference-lightbox > header strong { overflow: hidden; color: var(--text); font: 650 10px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reference-lightbox > header button { height: 30px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1 var(--mono); cursor: pointer; }
.reference-lightbox-canvas { min-height: 0; display: grid; place-items: center; overflow: auto; padding: 18px; background: radial-gradient(circle, rgba(71,113,128,.11), transparent 70%); }
.reference-lightbox-canvas img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.reference-lightbox > p { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font: 650 7px/1.4 var(--mono); }
.reference-editor { width: min(94vw,1180px); height: min(90vh,820px); margin: auto; padding: 0; border: 1px solid rgba(125,174,244,.30); border-radius: 8px; background: #070b0f; color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.72); }
.reference-editor::backdrop { background: rgba(2,5,8,.88); backdrop-filter: blur(4px); }
.reference-editor[open] { display: grid; grid-template-rows: 54px minmax(0,1fr); }
.reference-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.reference-editor > header div { min-width: 0; display: grid; gap: 5px; }
.reference-editor > header span { color: var(--blue); font: 700 6px/1 var(--mono); letter-spacing: .12em; }
.reference-editor > header strong { overflow: hidden; color: var(--text); font: 650 10px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reference-editor > header button { height: 30px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1 var(--mono); cursor: pointer; }
.reference-editor-body { min-height: 0; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); }
.reference-editor-preview { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; padding: 18px; border-right: 1px solid var(--line); background: radial-gradient(circle, rgba(71,113,128,.12), transparent 70%); }
.reference-editor-preview-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.reference-editor-preview-stage img { position: absolute; left: 50%; top: 50%; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transform: translate(-50%,-50%); transform-origin: 50% 50%; user-select: none; }
.reference-editor-crop-box { position: absolute; box-sizing: border-box; border: 2px solid var(--blue); background: rgba(125,174,244,.08); box-shadow: 0 0 0 9999px rgba(2,5,8,.46), inset 0 0 0 1px rgba(255,255,255,.24); pointer-events: none; }
.reference-editor-preview > p { margin: 13px 0 0; color: var(--muted); font: 600 7px/1.5 var(--mono); }
.reference-editor-form { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 12px; padding: 18px; }
.reference-editor-form fieldset { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.reference-editor-form legend { padding: 0 6px; color: var(--mint); font: 700 7px/1 var(--mono); letter-spacing: .10em; }
.reference-editor-form label { min-width: 0; display: grid; grid-template-columns: 54px minmax(0,1fr) 45px; align-items: center; gap: 8px; color: var(--muted); font: 650 7px/1 var(--mono); }
.reference-editor-form input[type="range"] { min-width: 0; accent-color: var(--blue); }
.reference-editor-form input[type="number"] { min-width: 0; height: 28px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: #0b1218; color: var(--muted-2); font: 650 8px/1 var(--mono); }
.reference-editor-form select { height: 28px; border: 1px solid var(--line-strong); border-radius: 4px; background: #0b1218; color: var(--muted-2); font: 650 8px/1 var(--mono); }
.reference-editor-form label b { color: var(--muted-2); font-size: 7px; text-align: right; }
.reference-editor-status { min-height: 30px; margin: 0; padding: 9px 10px; border: 1px solid rgba(239,198,111,.20); border-radius: 5px; background: rgba(239,198,111,.04); color: var(--amber); font: 600 7px/1.5 var(--mono); }
.reference-editor-actions { display: grid; grid-template-columns: .8fr 1.15fr 1.25fr; gap: 8px; }
.reference-editor-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1.2 var(--mono); cursor: pointer; }
.reference-editor-actions button[type="submit"] { border-color: rgba(125,174,244,.36); background: rgba(125,174,244,.10); color: var(--blue); }
.reference-editor-actions button.is-applying::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 1px solid rgba(125,174,244,.28); border-top-color: var(--blue); border-radius: 50%; vertical-align: -2px; animation: reference-save-spin .7s linear infinite; }
.reference-editor-actions button.is-applied { border-color: rgba(117,223,192,.44); background: rgba(117,223,192,.12); color: var(--mint-strong); }
.reference-trace-editor { width: min(96vw,1460px); height: min(94vh,940px); margin: auto; padding: 0; border: 1px solid rgba(117,223,192,.34); border-radius: 8px; background: #070b0f; color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.76); }
.reference-trace-editor::backdrop { background: rgba(2,5,8,.9); backdrop-filter: blur(4px); }
.reference-trace-editor[open] { display: grid; grid-template-rows: 54px minmax(0,1fr); }
.reference-trace-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.reference-trace-editor > header div { min-width: 0; display: grid; gap: 5px; }
.reference-trace-editor > header span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .12em; }
.reference-trace-editor > header strong { overflow: hidden; color: var(--text); font: 650 10px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reference-trace-editor > header button { height: 30px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1 var(--mono); cursor: pointer; }
.reference-trace-editor-body { min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 300px; }
.reference-trace-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 10px; padding: 16px; border-right: 1px solid var(--line); background: radial-gradient(circle, rgba(71,113,128,.14), transparent 72%); }
.reference-trace-viewport { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; overscroll-behavior: contain; }
.reference-trace-surface { --reference-editor-inverse-zoom: 1; position: relative; width: min(100%,1100px); max-height: 100%; overflow: visible; border: 1px solid rgba(173,201,217,.22); border-radius: 5px; background: #071015; box-shadow: 0 12px 34px rgba(0,0,0,.34); transform-origin: 0 0; will-change: transform; }
.reference-trace-surface > img, .reference-trace-surface > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.reference-trace-surface > img { z-index: 1; object-fit: fill; object-position: center; visibility: hidden; opacity: 1; filter: none; image-rendering: auto; transform-origin: center; user-select: none; pointer-events: none; }
.reference-trace-guide-canvas { z-index: 0; pointer-events: none; }
.reference-trace-surface > canvas#referenceTraceCanvas { z-index: 2; cursor: default; touch-action: none; }
.reference-trace-model-guide { z-index: 3; pointer-events: none; }
.reference-trace-surface > canvas.drawing-active { cursor: crosshair; }
.reference-trace-surface > canvas.eraser-active { cursor: none; }
.reference-trace-vector-host { position: absolute; inset: 0; z-index: 4; display: block; width: 100%; height: 100%; overflow: visible; outline: 0; pointer-events: none; touch-action: none; }
.reference-trace-vector-host > svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; touch-action: none; shape-rendering: geometricPrecision; }
.reference-trace-vector-host:focus-visible { outline: calc(1px * var(--reference-editor-inverse-zoom)) solid rgba(125,174,244,.78); outline-offset: calc(-2px * var(--reference-editor-inverse-zoom)); }
.reference-trace-vector-host [data-vector-object-id] { cursor: pointer; pointer-events: stroke; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; }
.reference-trace-vector-host [data-vector-object-id]:hover { stroke: #a7ddff; stroke-opacity: 1; }
.reference-trace-vector-host [data-vector-mirror-clone="true"], .reference-trace-vector-host [data-vector-background] { pointer-events: none; }
.reference-trace-vector-host [data-vector-selection] { pointer-events: none; }
.reference-trace-vector-host [data-vector-handle-id] { fill: #071015; stroke: var(--blue); stroke-width: 1.5px; cursor: grab; pointer-events: all; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; paint-order: stroke fill; }
.reference-trace-vector-host [data-vector-handle-id]:hover { fill: var(--blue); stroke: #eaf5ff; }
.reference-trace-vector-host [data-vector-handle-id]:active { cursor: grabbing; }
.reference-trace-vector-host [data-vector-handle-id="center"] { cursor: move; }
.reference-trace-vector-host [data-vector-handle-id="radius"] { cursor: ew-resize; }
.reference-trace-draft-host { position: absolute; inset: 0; z-index: 7; display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; touch-action: none; }
.reference-trace-draft-host > svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; shape-rendering: geometricPrecision; }
.reference-trace-draft-host [data-vector-draft-layer], .reference-trace-draft-host [data-vector-draft-object-id] { pointer-events: none; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; }
.reference-trace-centreline { position: absolute; z-index: 5; pointer-events: none; opacity: .8; }
.reference-trace-centreline[data-axis="horizontal"] { left: 0; right: 0; top: 50%; border-top: 1px dashed rgba(239,198,111,.72); }
.reference-trace-centreline[data-axis="vertical"] { top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(239,198,111,.72); }
.reference-trace-centreline[data-axis="none"] { display: none; }
.reference-calibration-line { position: absolute; z-index: 6; display: none; color: var(--blue); pointer-events: none; }
.reference-calibration-line[data-axis="x"] { display: block; height: 0; border-top: calc(1px * var(--reference-editor-inverse-zoom)) solid var(--blue); }
.reference-calibration-line[data-axis="y"] { display: block; width: 0; border-left: calc(1px * var(--reference-editor-inverse-zoom)) solid var(--blue); }
.reference-calibration-line[data-saved="true"] { color: var(--mint); border-color: var(--mint); }
.reference-calibration-line::before, .reference-calibration-line::after { content: ''; position: absolute; width: calc(6px * var(--reference-editor-inverse-zoom)); height: calc(6px * var(--reference-editor-inverse-zoom)); border: calc(1px * var(--reference-editor-inverse-zoom)) solid currentColor; border-radius: 50%; background: #071015; transform: translate(-50%,-50%); }
.reference-calibration-line[data-axis="x"]::before { left: 0; top: 0; }.reference-calibration-line[data-axis="x"]::after { left: 100%; top: 0; }
.reference-calibration-line[data-axis="y"]::before { left: 0; top: 0; }.reference-calibration-line[data-axis="y"]::after { left: 0; top: 100%; }
.reference-eraser-cursor { position: absolute; z-index: 8; box-sizing: border-box; border: calc(1px * var(--reference-editor-inverse-zoom)) solid rgba(255,255,255,.94); border-radius: 50%; background: rgba(255,90,90,.13); box-shadow: 0 0 0 calc(1px * var(--reference-editor-inverse-zoom)) rgba(255,90,90,.72), 0 0 calc(7px * var(--reference-editor-inverse-zoom)) rgba(255,90,90,.5); pointer-events: none; transform: translate(-50%,-50%); }
.reference-eraser-cursor[hidden] { display: none; }
.reference-trace-zoom-value { position: absolute; z-index: 5; top: 9px; right: 9px; min-width: 42px; padding: 5px 7px; border: 1px solid rgba(125,174,244,.28); border-radius: 4px; background: rgba(7,16,21,.86); color: var(--blue); font: 700 7px/1 var(--mono); text-align: center; pointer-events: none; }
.reference-calibration-scalers { position: absolute; z-index: 5; left: 10px; bottom: 10px; display: grid; gap: 5px; padding: 7px; border: 1px solid rgba(117,223,192,.28); border-radius: 5px; background: rgba(7,16,21,.9); box-shadow: 0 5px 16px rgba(0,0,0,.34); }
.reference-calibration-scalers[hidden] { display: none; }
.reference-calibration-scalers > div { display: grid; grid-template-columns: 46px 26px 72px 26px; align-items: center; gap: 4px; color: var(--muted); font: 700 6px/1 var(--mono); }
.reference-calibration-scalers > div[hidden] { display: none; }
.reference-calibration-scalers button { height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(125,174,244,.08); color: var(--blue); font: 700 10px/1 var(--mono); cursor: pointer; }
.reference-calibration-scalers .reference-numeric-value { color: var(--mint-strong); }
.reference-trace-workspace > p { margin: 0; color: var(--muted); font: 600 7px/1.45 var(--mono); }
.reference-trace-tools { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 12px; padding: 16px; }
.reference-trace-tools fieldset { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.reference-trace-tools legend { padding: 0 6px; color: var(--mint); font: 700 7px/1 var(--mono); letter-spacing: .1em; }
.reference-trace-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.reference-trace-tool-grid.three { grid-template-columns: repeat(3,1fr); }
.reference-trace-tool-grid button { min-height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1.2 var(--mono); cursor: pointer; }
.reference-trace-tool-grid button.active { border-color: rgba(117,223,192,.46); background: rgba(117,223,192,.11); color: var(--mint-strong); }
.reference-trace-tools label { min-width: 0; display: grid; grid-template-columns: 46px minmax(0,1fr) 42px; align-items: center; gap: 8px; color: var(--muted); font: 650 7px/1 var(--mono); }
.reference-trace-tools input[type="range"] { min-width: 0; accent-color: var(--mint); }
.reference-trace-tools label b { color: var(--muted-2); font-size: 7px; text-align: right; }
.reference-source-flips { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.reference-trace-tools .reference-source-flips label { display: flex; grid-template-columns: none; gap: 6px; min-height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.reference-source-flips input { margin: 0; accent-color: var(--blue); }
.reference-source-stepper { display: grid; grid-template-columns: 46px 28px minmax(68px,1fr) 28px; align-items: center; gap: 6px; color: var(--muted); font: 650 7px/1 var(--mono); }
.reference-source-stepper button, .reference-calibration-grid > button { min-height: 28px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 10px/1 var(--mono); cursor: pointer; }
.reference-source-stepper button:hover, .reference-calibration-grid > button:hover, .reference-calibration-grid > button.active { border-color: rgba(125,174,244,.48); background: rgba(125,174,244,.10); color: var(--blue); }
.reference-source-stepper button:active, .reference-calibration-scalers button:active { border-color: rgba(117,223,192,.62); background: rgba(117,223,192,.15); color: var(--mint-strong); }
.reference-numeric-value { min-width: 0; height: 26px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px; padding: 0 5px; border: 1px solid rgba(173,201,217,.20); border-radius: 3px; background: rgba(3,9,13,.56); color: var(--muted-2); font: 700 7px/1 var(--mono); }
.reference-numeric-value:focus-within { border-color: rgba(125,174,244,.62); box-shadow: 0 0 0 1px rgba(125,174,244,.12); }
.reference-numeric-value input { width: 100%; min-width: 0; height: 22px; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; text-align: right; appearance: textfield; -moz-appearance: textfield; }
.reference-numeric-value input::-webkit-inner-spin-button, .reference-numeric-value input::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.reference-numeric-value i { color: currentColor; font: inherit; font-style: normal; opacity: .72; pointer-events: none; }
.reference-calibration-grid { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 7px; padding-top: 3px; }
.reference-trace-tools .reference-calibration-grid label { grid-template-columns: 52px minmax(0,1fr) 10px; }
.reference-calibration-grid input { min-width: 0; height: 28px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(0,0,0,.18); color: var(--text); font: 700 8px/1 var(--mono); }
.reference-calibration-help { margin: 0; color: var(--muted); font: 600 7px/1.45 var(--mono); }
.reference-source-replace { min-height: 32px; padding: 0 8px; border: 1px solid rgba(125,174,244,.34); border-radius: 4px; background: rgba(125,174,244,.08); color: var(--blue); font: 700 7px/1.2 var(--mono); cursor: pointer; }
.reference-trace-status { min-height: 40px; margin: 0; padding: 9px 10px; border: 1px solid rgba(239,198,111,.20); border-radius: 5px; background: rgba(239,198,111,.04); color: var(--amber); font: 600 7px/1.5 var(--mono); }
.reference-trace-actions { display: grid; grid-template-columns: .75fr 1.25fr; gap: 8px; }
.reference-trace-actions button { min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 7px/1.2 var(--mono); cursor: pointer; }
.reference-trace-actions button:last-child { border-color: rgba(117,223,192,.38); background: rgba(117,223,192,.11); color: var(--mint-strong); }
.reference-trace-actions button:last-child.is-saving::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 1px solid rgba(117,223,192,.28); border-top-color: var(--mint-strong); border-radius: 50%; vertical-align: -2px; animation: reference-save-spin .7s linear infinite; }
.reference-trace-actions button:last-child.is-saved { border-color: rgba(117,223,192,.72); background: rgba(117,223,192,.24); color: #dcfff5; box-shadow: 0 0 0 3px rgba(117,223,192,.08), 0 0 18px rgba(117,223,192,.18); transform: translateY(-1px); }
@keyframes reference-save-spin { to { transform: rotate(360deg); } }
.reference-trace-actions button:disabled, .reference-trace-tool-grid button:disabled { opacity: .38; cursor: not-allowed; }
@media (max-width: 820px) {
  .reference-editor { height: min(94vh,920px); }
  .reference-editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(280px,1fr) auto; overflow: auto; }
  .reference-editor-preview { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
  .reference-editor-form { overflow: visible; }
  .reference-trace-editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(380px,1fr) auto; overflow: auto; }
  .reference-trace-workspace { min-height: 440px; border-right: 0; border-bottom: 1px solid var(--line); }
  .reference-trace-tools { overflow: visible; }
}

@media (max-width: 1120px) {
  .aircraft-library { grid-template-columns: 250px minmax(380px,1fr) 320px; }
  .aircraft-library.engineering-collapsed { grid-template-columns: 250px minmax(380px,1fr) 34px; }
}
@media (max-width: 900px) {
  html, body { overflow: auto; }
  .aircraft-library { min-height: 100%; height: auto; grid-template: 58px 430px auto / 250px minmax(0,1fr); }
  .library-header { position: sticky; top: 0; }.variant-browser { grid-row: 2; }.aircraft-stage { grid-row: 2; }.engineering-panel { min-height: 720px; grid-column: 1 / -1; grid-row: 3; }.engineering-scroll { overflow: visible; }
  .aircraft-library.engineering-collapsed { grid-template: 58px 430px 34px / 250px minmax(0,1fr); }
  .engineering-panel.is-collapsed { min-height: 34px; }
}

/* Studio parity layer -----------------------------------------------------
   These overrides intentionally leave every DOM id, event target and layout
   region intact. They only align the Asset Library's visual hierarchy with
   Studio's compact operational glass system. */
html { background: var(--ui-bg-base); scrollbar-color: rgba(255,255,255,.16) rgba(0,0,0,.78); }
body {
  background:
    radial-gradient(circle at 52% 32%, rgba(124,106,247,.055), transparent 34%),
    linear-gradient(145deg, #0d0d0f 0%, #141416 52%, #0d0d0f 100%);
}
.aircraft-library {
  background:
    radial-gradient(circle at 51% 36%, rgba(124,106,247,.05), transparent 35%),
    linear-gradient(145deg, rgba(20,20,22,.98), rgba(13,13,15,.99));
}
.aircraft-stage,
.aircraft-library[data-active-asset-kind="terminal"] .aircraft-stage,
.aircraft-library[data-active-asset-kind="ground_vehicle"] .aircraft-stage,
.aircraft-library[data-active-asset-kind="building"] .aircraft-stage {
  background: radial-gradient(circle at 50% 44%, rgba(124,106,247,.045), transparent 44%), var(--ui-bg-base);
}
.library-header {
  border-color: var(--ui-border-subtle);
  background: color-mix(in srgb, var(--ui-bg-elevated) 82%, transparent);
  box-shadow: var(--ui-shadow-sm), var(--ui-inset-highlight);
  backdrop-filter: blur(18px) saturate(124%);
  -webkit-backdrop-filter: blur(18px) saturate(124%);
}
.library-back,
.library-brand-mark {
  border-radius: var(--ui-radius-sm);
  border-color: var(--ui-border-default);
  background: color-mix(in srgb, var(--ui-bg-control) 88%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.library-brand-mark {
  border-color: color-mix(in srgb, var(--ui-accent) 34%, var(--ui-border-default));
  background: linear-gradient(145deg, var(--ui-accent-muted), rgba(124,106,247,.035));
  color: var(--ui-accent-hover);
}
.library-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.library-back:hover,
.library-back:focus-visible {
  color: var(--ui-accent-hover);
  border-color: var(--ui-accent-ring);
  background: var(--ui-accent-muted);
}
.library-health[data-state="ready"] i {
  background: var(--ui-success);
  box-shadow: 0 0 0 4px rgba(61,214,140,.1);
}
.variant-state em[data-completion-state="finish"],
#stageStatus[data-state="finish"] {
  border-color: var(--ui-accent-ring);
  background: var(--ui-accent-muted);
  color: #ded9ff;
  box-shadow: inset 0 0 0 1px rgba(124,106,247,.08);
}
.variant-browser,
.engineering-panel {
  background: color-mix(in srgb, var(--ui-bg-elevated) 88%, transparent);
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
}
.variant-browser { border-right-color: var(--ui-border-subtle); }
.engineering-panel { border-left-color: var(--ui-border-subtle); }
.browser-heading > span { color: var(--ui-accent-hover); }
.browser-heading h1,
.stage-title h2 { color: var(--ui-text-primary); letter-spacing: -.02em; }
.asset-kind-tabs,
.vehicle-configuration-controls {
  border-color: var(--ui-border-subtle);
  border-radius: var(--ui-radius-md);
  background: color-mix(in srgb, var(--ui-bg-control) 78%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.asset-kind-tabs button,
.stage-toolbar button,
.engineering-tabs button,
  font-family: var(--sans);
  transition: var(--ui-transition);
}
.asset-kind-tabs button { border-radius: var(--ui-radius-sm); }
.asset-kind-tabs button:hover,
.stage-toolbar button:hover,
.engineering-tabs button:hover { color: var(--ui-text-primary); background: rgba(255,255,255,.025); }
.asset-kind-tabs button.active,
.stage-toolbar button.active {
  border-color: var(--ui-accent-ring);
  background: var(--ui-accent-muted);
  color: var(--ui-accent-hover);
  box-shadow: inset 0 0 0 1px rgba(124,106,247,.08);
}
.variant-search {
  border-color: var(--ui-border-default);
  border-radius: var(--ui-radius-sm);
  background: color-mix(in srgb, var(--ui-bg-input) 90%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.variant-search:focus-within {
  border-color: var(--ui-accent-ring);
  box-shadow: 0 0 0 2px var(--ui-accent-muted), var(--ui-inset-highlight);
}
.variant-card {
  border-radius: var(--ui-radius-sm);
  background: color-mix(in srgb, var(--ui-bg-control) 48%, transparent);
  transition: var(--ui-transition), transform .12s ease;
}
.variant-card:hover {
  border-color: var(--ui-border-default);
  background: color-mix(in srgb, var(--ui-bg-overlay) 72%, transparent);
  transform: translateY(-1px);
}
.variant-card.active {
  border-color: var(--ui-accent-ring);
  background: linear-gradient(90deg, var(--ui-accent-muted), rgba(124,106,247,.025));
  box-shadow: inset 2px 0 var(--ui-accent), var(--ui-inset-highlight);
}
.variant-thumb {
  border-color: var(--ui-border-subtle);
  border-radius: var(--ui-radius-sm);
  background: radial-gradient(circle, rgba(124,106,247,.1), rgba(20,20,22,.38) 72%);
}
.variant-card.active .variant-thumb { color: var(--ui-accent-hover); }
.aircraft-stage::before {
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
}
.stage-title,
.stage-toolbar,
.stage-metrics,
.engineering-panel-header,
.engineering-actions {
  border-color: var(--ui-border-subtle);
  background: color-mix(in srgb, var(--ui-bg-elevated) 76%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.stage-toolbar,
.stage-metrics,
.engineering-actions {
  backdrop-filter: blur(12px) saturate(112%);
  -webkit-backdrop-filter: blur(12px) saturate(112%);
}
.engineering-tabs button.active { color: var(--ui-accent-hover); }
.engineering-tabs button.active::after { background: var(--ui-accent); }
.stage-badges span,
.stage-model-state,
.planform-card,
.data-block,
.evidence-summary,
.qa-score,
.version-history,
.building-parameter-panel,
.terminal-parameter-panel,
  border-color: var(--ui-border-default);
  border-radius: var(--ui-radius-md);
  background: color-mix(in srgb, var(--ui-bg-control) 72%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.building-parameter-panel,
.terminal-parameter-panel {
  background: linear-gradient(145deg, rgba(124,106,247,.065), rgba(36,36,40,.82));
}
.building-parameter-fields label,
.terminal-parameter-fields label,
.terminal-parameter-fields input,
.terminal-parameter-fields select,
.reference-editor-form input[type="number"],
.reference-editor-form select,
.reference-calibration-grid input {
  border-color: var(--ui-border-default);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg-input);
  color: var(--ui-text-primary);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}
.reference-lightbox,
.reference-editor,
.reference-trace-editor {
  border-color: var(--ui-border-strong);
  border-radius: var(--ui-radius-lg);
  background: color-mix(in srgb, var(--ui-bg-elevated) 94%, transparent);
  box-shadow: 0 28px 80px rgba(0,0,0,.7), var(--ui-inset-highlight);
  backdrop-filter: blur(22px) saturate(118%);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
}
:where(button, a, input, select, textarea):focus-visible {
  outline: none;
  border-color: var(--ui-accent-ring);
  box-shadow: 0 0 0 2px var(--ui-accent-muted);
}
:where(button, a, input, select, textarea) { transition: var(--ui-transition); }
* { scrollbar-color: rgba(255,255,255,.16) rgba(0,0,0,.78); }

.aircraft-metadata-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ui-border-default);
  border-radius: var(--ui-radius-md);
  background: color-mix(in srgb, var(--ui-bg-control) 72%, transparent);
  box-shadow: var(--ui-inset-highlight);
}
.aircraft-metadata-panel[hidden] { display: none; }
.aircraft-metadata-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.aircraft-metadata-panel > header div,
.aircraft-metadata-panel label { display: grid; gap: 5px; }
.aircraft-metadata-panel > header span,
.aircraft-metadata-panel label > span {
  color: var(--ui-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.aircraft-metadata-panel > header strong { color: var(--ui-text-primary); }
.aircraft-metadata-panel > header b {
  color: var(--ui-accent-hover);
  font-size: 9px;
  letter-spacing: .06em;
}
.aircraft-metadata-panel input,
.aircraft-metadata-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ui-border-default);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg-input);
  color: var(--ui-text-primary);
  padding: 8px 9px;
  font: inherit;
  resize: vertical;
}
.aircraft-metadata-panel input[readonly] {
  color: var(--ui-text-muted);
  cursor: default;
}
.aircraft-metadata-panel small {
  color: var(--ui-text-muted);
  font-size: 10px;
  line-height: 1.45;
}
.aircraft-metadata-actions {
  display: grid;
  gap: 7px;
}
.aircraft-metadata-actions button {
  justify-self: start;
  border: 1px solid var(--ui-accent-ring);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-accent-muted);
  color: var(--ui-accent-hover);
  padding: 7px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aircraft-metadata-actions button:disabled { opacity: .55; cursor: wait; }
.aircraft-metadata-actions output {
  color: var(--ui-text-muted);
  font-size: 10px;
  line-height: 1.4;
}
.aircraft-metadata-actions output[data-state="error"] { color: #ff9b84; }

/* Asset Library settings ------------------------------------------------- */
.asset-settings-workspace[hidden] { display: none; }
.asset-settings-workspace {
  min-width: 0;
  min-height: 0;
  grid-column: 2 / -1;
  display: grid;
  grid-template-rows: auto 42px minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0, rgba(124,106,247,.08), transparent 33%),
    var(--ui-bg-base);
}
.aircraft-library[data-active-asset-kind="settings"] .aircraft-stage,
.aircraft-library[data-active-asset-kind="settings"] .engineering-panel { display: none; }
.aircraft-library[data-active-asset-kind="settings"] .browser-legend { visibility: hidden; }
.asset-settings-header {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--ui-border-subtle);
  background: color-mix(in srgb, var(--ui-bg-surface) 86%, transparent);
}
.asset-settings-header > div:first-child { min-width: 0; }
.asset-settings-header > div:first-child > span {
  color: var(--ui-accent-hover);
  font: 700 8px/1 var(--mono);
  letter-spacing: .13em;
}
.asset-settings-header h2 { margin: 7px 0 4px; font-size: 22px; font-weight: 650; }
.asset-settings-header p { margin: 0; color: var(--ui-text-secondary); font-size: 10px; line-height: 1.45; }
.asset-settings-source {
  max-width: 360px;
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--ui-text-secondary);
  text-align: right;
}
.asset-settings-source span { color: var(--ui-success); font: 700 8px/1 var(--mono); letter-spacing: .08em; }
.asset-settings-source strong { color: var(--ui-text-primary); font: 700 8px/1.2 var(--mono); }
.asset-settings-source small { overflow-wrap: anywhere; font: 600 7px/1.3 var(--mono); }
.asset-settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--ui-border-subtle);
  background: color-mix(in srgb, var(--ui-bg-control) 54%, transparent);
}
.asset-settings-toolbar > span { color: var(--ui-text-secondary); font: 600 8px/1 var(--mono); }
.asset-settings-toolbar button {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--ui-border-default);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg-control);
  color: var(--ui-text-secondary);
  font: 650 8px/1 var(--mono);
  cursor: pointer;
}
.asset-settings-toolbar button:hover,
.asset-settings-toolbar button:focus-visible {
  border-color: var(--ui-accent-ring);
  background: var(--ui-accent-muted);
  color: var(--ui-text-primary);
  outline: none;
}
.asset-settings-toolbar button:disabled { opacity: .55; cursor: wait; }
.asset-settings-scroll {
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 32px;
  scrollbar-width: thin;
}
.asset-settings-section {
  margin: 0 0 14px;
  border: 1px solid var(--ui-border-subtle);
  border-radius: var(--ui-radius-md);
  overflow: hidden;
  background: color-mix(in srgb, var(--ui-bg-surface) 92%, transparent);
  box-shadow: var(--ui-shadow-sm), var(--ui-inset-highlight);
}
.asset-settings-section > header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--ui-border-subtle);
}
.asset-settings-section > header > div { min-width: 0; display: grid; gap: 4px; }
.asset-settings-section > header strong { color: var(--ui-text-primary); font-size: 11px; }
.asset-settings-section > header small { color: var(--ui-text-muted); font-size: 8px; line-height: 1.35; }
.asset-settings-section > header b { color: var(--ui-accent-hover); font: 700 7px/1 var(--mono); white-space: nowrap; }
.asset-settings-value-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.asset-settings-value {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(88px,auto);
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--ui-border-subtle);
}
.asset-settings-value:nth-child(odd) { border-right: 1px solid var(--ui-border-subtle); }
.asset-settings-value dt,
.asset-settings-value dd { min-width: 0; margin: 0; }
.asset-settings-value dt { display: grid; gap: 3px; }
.asset-settings-value dt strong { color: var(--ui-text-secondary); font-size: 9px; font-weight: 620; }
.asset-settings-value dt small { overflow: hidden; color: var(--ui-text-muted); font: 500 6.5px/1.2 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.asset-settings-value dd { overflow-wrap: anywhere; color: var(--ui-text-primary); font: 650 8px/1.35 var(--mono); text-align: right; }
.asset-settings-value[data-value-type="mode"] dd { color: var(--ui-success); }
.settings-category-card {
  width: 100%;
  min-height: 63px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 4px 0;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm);
  background: rgba(255,255,255,.016);
  color: var(--ui-text-secondary);
  text-align: left;
  cursor: pointer;
}
.settings-category-card:hover { border-color: var(--ui-border-default); background: rgba(255,255,255,.035); }
.settings-category-card.active { border-color: var(--ui-accent-ring); background: var(--ui-accent-muted); box-shadow: inset 2px 0 var(--ui-accent); }
.settings-category-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--ui-border-default); border-radius: var(--ui-radius-sm); background: var(--ui-bg-control); color: var(--ui-accent-hover); font: 750 9px/1 var(--mono); }
.settings-category-copy { min-width: 0; display: grid; gap: 4px; }
.settings-category-copy strong { color: var(--ui-text-primary); font-size: 10px; }
.settings-category-copy small { overflow: hidden; font-size: 7.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.settings-category-count { color: var(--ui-text-muted); font: 650 7px/1 var(--mono); }
.asset-api-health-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--ui-border-subtle); color: var(--ui-text-secondary); font-size: 9px; }
.asset-api-health-list { display: grid; }
.asset-api-health-row { min-height: 54px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 13px; border-bottom: 1px solid var(--ui-border-subtle); }
.asset-api-health-row:last-child { border-bottom: 0; }
.asset-api-health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ui-text-muted); }
.asset-api-health-row[data-state="healthy"] .asset-api-health-dot { background: var(--ui-success); }
.asset-api-health-row[data-state="degraded"] .asset-api-health-dot { background: var(--amber); }
.asset-api-health-row[data-state="down"] .asset-api-health-dot { background: var(--red); }
.asset-api-health-copy { min-width: 0; display: grid; gap: 4px; }
.asset-api-health-copy strong { color: var(--ui-text-primary); font-size: 9px; }
.asset-api-health-copy small { overflow: hidden; color: var(--ui-text-secondary); font: 600 7px/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.asset-api-health-row a { max-width: 170px; overflow: hidden; color: var(--ui-accent-hover); font: 650 7px/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.asset-settings-empty { padding: 38px 18px; color: var(--ui-text-secondary); font-size: 10px; line-height: 1.5; text-align: center; }
@media (max-width: 1120px) {
  .asset-settings-value-list { grid-template-columns: minmax(0,1fr); }
  .asset-settings-value:nth-child(odd) { border-right: 0; }
}
@media (max-width: 900px) {
  .aircraft-library[data-active-asset-kind="settings"] { grid-template: 58px minmax(560px,calc(100vh - 58px)) / 250px minmax(0,1fr); }
  .asset-settings-workspace { grid-column: 2; grid-row: 2; }
  .asset-settings-header { align-items: flex-start; padding: 14px 18px; }
  .asset-settings-source { max-width: 280px; }
  .asset-settings-scroll { padding: 14px 18px 24px; }
}

/* Asset Library Ground Handling summary (Geometry panel) */
.ground-handling-summary-block dd a { color: var(--accent, #7cc4ff); text-decoration: none; }
.ground-handling-summary-note { margin: 0; padding: 6px 10px 9px; color: var(--muted); font-size: 9px; line-height: 1.45; }

/* Asset Library Ground Handling 3D authoring scene (port-260827 lane L1) */
.ground-handling-panel { position: static; width: 100%; max-height: none; overflow: visible; display: grid; gap: 9px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.ground-handling-panel[hidden] { display: none; }
.ground-handling-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ground-handling-panel header div { min-width: 0; display: grid; gap: 4px; }
.ground-handling-panel header span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .1em; }
.ground-handling-panel header strong { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ground-handling-panel header a { flex: 0 0 auto; color: var(--blue); font: 700 6px/1.3 var(--mono); text-decoration: none; }
.handling-segments { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.015); }
.handling-segments button { height: 26px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); font: 700 7px/1 var(--mono); cursor: pointer; }
.handling-segments button.active { border-color: rgba(117,223,192,.32); background: rgba(117,223,192,.09); color: var(--mint-strong); }
.handling-field { min-width: 0; display: grid; gap: 4px; color: var(--muted); font: 700 6px/1 var(--mono); letter-spacing: .07em; }
.handling-field input, .handling-field select { min-width: 0; height: 29px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; background: #091118; color: var(--text); font: 700 8px/1 var(--mono); }
.handling-field input:focus, .handling-field select:focus { border-color: rgba(125,174,244,.64); }
.handling-vector-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.handling-vector-grid[hidden] { display: none; }
.handling-apron-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; padding: 8px; border: 1px solid rgba(125,174,244,.24); border-radius: 5px; background: rgba(125,174,244,.055); }
.handling-apron-summary span { grid-column: 1/-1; color: var(--blue); font: 700 6px/1 var(--mono); letter-spacing: .08em; }
.handling-apron-summary strong { color: var(--text); font: 800 9px/1.2 var(--mono); }
.handling-apron-summary small { color: var(--muted-2); font: 700 7px/1.2 var(--mono); }
.handling-pbb-connection[hidden] { display: none; }
.handling-pbb-connection { display: grid; gap: 4px; padding: 8px; border: 1px solid rgba(125,174,244,.28); border-radius: 4px; background: rgba(125,174,244,.055); }
.handling-pbb-connection span { color: #9dc5ff; font: 700 6px/1 var(--mono); letter-spacing: .08em; }
.handling-pbb-connection strong { color: var(--text); font: 700 8px/1.25 var(--mono); }
.handling-pbb-connection small { color: var(--muted); font: 600 6px/1.35 var(--mono); }
.handling-editor-actions { display: grid; grid-template-columns: .85fr .65fr 1.5fr; gap: 6px; }
.handling-editor-actions button { min-height: 29px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 6px/1.2 var(--mono); cursor: pointer; }
.handling-editor-actions button:first-child { border-color: rgba(117,223,192,.38); background: rgba(117,223,192,.10); color: var(--mint-strong); }
.handling-editor-actions button:disabled { opacity: .38; cursor: not-allowed; }
.handling-alternative-card,.handling-tow-setup,.handling-vehicle-checklist { display: grid; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.018); }
.handling-alternative-card[hidden],.handling-tow-setup[hidden] { display: none; }
.handling-alternative-card > div:first-child,.handling-tow-setup > div:first-child,.handling-checklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.handling-alternative-card span,.handling-tow-setup span,.handling-checklist-heading span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .08em; }
.handling-alternative-card small,.handling-tow-setup small { color: var(--muted); font: 600 6px/1.35 var(--mono); }
.handling-alternative-card strong,.handling-tow-setup strong,.handling-checklist-heading strong { color: var(--text); font: 700 7px/1.2 var(--mono); }
.handling-service-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.handling-service-actions button { min-height: 29px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--muted-2); font: 700 6px/1.2 var(--mono); cursor: pointer; }
.handling-service-actions button:first-child { border-color: rgba(117,223,192,.38); color: var(--mint-strong); }
.handling-service-actions button:disabled { opacity: .38; cursor: not-allowed; }
.handling-vehicle-checklist { min-width: 0; }
.handling-vehicle-checklist > summary { min-height: 28px; cursor: pointer; list-style: none; }
.handling-vehicle-checklist > summary::-webkit-details-marker { display: none; }
.handling-vehicle-checklist > summary::after { margin-left: 7px; color: var(--mint); content: '+'; }
.handling-vehicle-checklist[open] > summary::after { content: '\2212'; }
#handlingVehicleChecklist { max-height: 220px; min-width: 0; overflow: auto; display: grid; scrollbar-width: thin; scrollbar-color: #30404a transparent; }
.handling-checklist-grid-header,.handling-checklist-row { min-width: 0; display: grid; grid-template-columns: minmax(84px,1fr) repeat(3,42px); align-items: center; border-top: 1px solid rgba(255,255,255,.055); font-family: var(--mono); }
.handling-checklist-grid-header { position: sticky; z-index: 1; top: 0; min-height: 20px; border-top: 0; background: #0c141b; color: var(--muted); font-size: 5.5px; font-weight: 700; text-align: center; }
.handling-checklist-grid-header span:first-child { padding-left: 4px; text-align: left; }
.handling-checklist-row { min-height: 30px; }
.handling-checklist-row > strong { min-width: 0; overflow: hidden; padding: 0 4px; color: var(--text); font: 700 9px/1.1 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.handling-checklist-unit { min-width: 0; display: grid; grid-template-columns: 12px minmax(0,1fr); align-items: center; gap: 2px; padding: 0 2px; }
.handling-checklist-unit input { width: 11px; height: 11px; margin: 0; accent-color: var(--mint); }
.handling-checklist-unit button { min-width: 0; height: 18px; padding: 0 2px; border: 1px solid var(--line-strong); border-radius: 3px; background: #091118; color: var(--mint); font: 700 5px/1 var(--mono); cursor: pointer; }
.handling-checklist-unit button:disabled { opacity: .28; cursor: not-allowed; }
.handling-checklist-unit button[title="Optional unit"] { border-color: rgba(239,198,111,.34); color: var(--amber); }
.ground-handling-panel p { min-height: 27px; margin: 0; padding: 7px 8px; border-left: 2px solid rgba(239,198,111,.46); background: rgba(239,198,111,.035); color: var(--muted-2); font: 600 6px/1.45 var(--mono); }
.handling-source-grid { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 10px; }
.handling-source-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #091118; }
.handling-source-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.handling-source-card header strong { color: var(--text); font: 800 8px/1 var(--mono); }
.handling-source-card header span { color: var(--muted); font: 700 6px/1 var(--mono); }
.handling-source-card svg, .handling-source-card img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: contain; background: radial-gradient(circle at center,rgba(43,76,89,.18),rgba(5,10,14,.96)); }
.handling-source-card footer { display: grid; gap: 4px; padding: 8px 10px; color: var(--muted-2); font: 600 6px/1.35 var(--mono); }
.handling-source-card footer a { color: var(--blue); text-decoration: none; }
.handling-source-evidence { grid-column: 1 / -1; }
.handling-source-evidence img { aspect-ratio: 2.2; max-height: 360px; object-fit: contain; background: #f4f6f7; cursor: zoom-in; }
.handling-selection-badge { position: absolute; z-index: 4; right: 13px; bottom: 40px; max-width: min(270px,42%); display: grid; gap: 3px; padding: 7px 9px; border: 1px solid rgba(117,223,192,.42); border-radius: 4px; background: rgba(7,15,19,.86); box-shadow: 0 6px 18px rgba(0,0,0,.28); pointer-events: none; }
.handling-context-menu { position: fixed; z-index: 80; width: 148px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(7,15,20,.97); box-shadow: 0 10px 28px rgba(0,0,0,.42); }
.handling-context-menu[hidden] { display: none; }
.handling-context-menu button { width: 100%; min-height: 28px; border: 0; border-radius: 3px; background: transparent; color: var(--muted-2); font: 700 7px/1 var(--mono); text-align: left; cursor: pointer; }
.handling-context-menu button:hover,.handling-context-menu button:focus-visible { outline: 0; background: rgba(117,223,192,.09); color: var(--mint-strong); }
.handling-context-menu button:last-child { color: #ff9299; }
.handling-context-menu button:disabled { opacity: .32; cursor: not-allowed; }
.handling-selection-badge[hidden] { display: none; }
.handling-selection-badge span { color: var(--mint); font: 700 6px/1 var(--mono); letter-spacing: .1em; }
.handling-selection-badge strong { overflow: hidden; color: var(--text); font: 750 10px/1.2 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.handling-selection-badge small { overflow: hidden; color: var(--muted-2); font: 650 7px/1.2 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.ground-handling-info-panel { align-content: start; }
.ground-handling-sources { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-strong); }
.ground-handling-sources-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ground-handling-sources-heading div { display: grid; gap: 4px; }
.ground-handling-sources-heading span { color: var(--blue); font: 700 6px/1 var(--mono); letter-spacing: .1em; }
.ground-handling-sources-heading strong { color: var(--text); font: 750 10px/1.2 var(--sans); }
.ground-handling-sources-heading small { color: var(--muted); font: 650 6px/1.2 var(--mono); }
.ground-handling-reference-comparison { min-width: 0; }
.ground-handling-info-panel .handling-source-grid { grid-template-columns: minmax(0,1fr); padding: 0; }
.ground-handling-info-panel .handling-source-evidence { grid-column: auto; }
