@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-normal-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-normal-latin-ext.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-normal-latin.woff2") format("woff2"); font-style: normal; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-normal-latin-ext.woff2") format("woff2"); font-style: normal; font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #fff;
  --raised: #f3f3f3;
  --line: #dedee0;
  --text: #202124;
  --muted: #666970;
  --accent: #bc001f;
  --focus: #bc001f;
  --sidebar: 308px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-rows: 66px auto auto minmax(0, 1fr) 28px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #652d1e; }
button, select, input { font: inherit; }
button, select {
  color: var(--text);
  border: 1px solid #bfc3b8;
  border-radius: 2px;
  background: var(--panel);
}
button { cursor: pointer; padding: 5px 10px; }
button:hover { background: var(--raised); }
button:disabled, select:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-title { font: 24px/1 Manrope, "DM Sans", sans-serif; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.chip-picker { display: flex; flex: 1; gap: 6px; align-items: center; justify-content: center; }
.chip-picker select { width: min(430px, 42vw); padding: 7px 30px 7px 10px; }
.chip-picker button { font: 20px/1.2 Manrope, "DM Sans", sans-serif; padding: 2px 9px; }
#chip-count { font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); margin-left: 7px; white-space: nowrap; }
.library-link, .website-link { font-size: 12px; white-space: nowrap; }
.website-link { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.chip-heading { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; padding: 10px 0; }
.chip-heading strong { font-size: 12px; font-weight: 600; }
.badge { border-left: 1px solid var(--line); padding-left: 10px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.view-buttons { display: flex; gap: 16px; align-self: stretch; }
.view-buttons button { position: relative; padding: 11px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; }
.view-buttons button:hover { color: var(--text); }
.view-buttons button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.map-buttons { display: flex; align-items: center; gap: 6px; }
.map-buttons label { display: flex; align-items: center; gap: 3px; margin-right: 4px; color: var(--muted); font-size: 11px; }
.map-buttons button { font-size: 11px; padding: 3px 8px; }
input[type=checkbox] { accent-color: var(--accent); }
#workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) var(--sidebar); }
.pane { min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.diagram-pane, .image-pane { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 34px minmax(0, 1fr) auto; }
.diagram-pane { border-right: 1px solid var(--line); background: #f8f7f2; }
.image-pane { background: #171a18; }
.pane-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pane-label > span:first-child { color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-label > span:last-child { font-size: 10px; }
.pane-footnote { margin: 0; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.image-stage { position: relative; min-height: 0; overflow: hidden; }
.image-pane canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.image-pane canvas.dragging { cursor: grabbing; }
.image-caption { padding: 10px 12px; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; }
.image-help { position: absolute; bottom: 9px; left: 12px; right: 12px; width: fit-content; padding: 2px 5px; background: #171a18df; color: #c6c8bf; font-size: 10px; pointer-events: none; }
#image-select { position: absolute; z-index: 3; top: 10px; left: 12px; max-width: calc(100% - 24px); padding: 4px 8px; background: #faf9f5f2; font-size: 10px; }
#diagram-host { height: 100%; width: 100%; min-height: 0; position: relative; }
#diagram-host svg { width: 100%; height: 100%; display: block; cursor: grab; }
#diagram-host svg text { font-family: inherit; }
.diagram-node { cursor: pointer; }
.diagram-node:focus { outline: none; }
.diagram-node:focus rect { stroke: var(--focus); stroke-width: 3; }
.diagram-node rect { fill: #faf9f5; stroke: #737a6a; stroke-width: 1.3; }
.diagram-node.external rect { fill: #efeee7; stroke: #929889; stroke-dasharray: 5 4; }
.diagram-node.selected rect { fill: #f1e2d8; stroke: #97442d; stroke-width: 2; }
.diagram-node text { fill: #252822; pointer-events: none; }
.diagram-edge { fill: none; stroke: #737a6a; stroke-width: 1.3; }
.diagram-title { fill: #62665d; font-size: 13px; }
.diagram-label { fill: #62665d; font-size: 12px; }
.diagram-edge-hit { fill: none; stroke: transparent; stroke-width: 12; cursor: pointer; }
.diagram-wire.electrical .diagram-edge { stroke: #526c75; }
.diagram-wire.inferred .diagram-edge { stroke-dasharray: 5 4; }
#diagram-host .device-type { font-size: 10px; fill: #62665d; }
#diagram-host .terminal-label { font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; fill: #526c75; }
.terminal-port { fill: #faf9f5; stroke: #526c75; stroke-width: 1.2; }
.component-meta, .terminal-path { font-size: 10px !important; line-height: 1.7; }
.diagram-wire:focus { outline: none; }
.diagram-wire:hover .diagram-edge, .diagram-wire:focus .diagram-edge, .diagram-wire.related .diagram-edge, .diagram-wire.selected .diagram-edge { stroke: #97442d; stroke-width: 2.4; }
.diagram-wire.dimmed { opacity: .22; }
.diagram-node.related rect { stroke: #97442d; }
.diagram-node.inferred rect { stroke-dasharray: 5 4; }
.circuit-heading { min-height: 34px; }
#circuit-map-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#circuit-group { flex-shrink: 0; max-width: 190px; padding: 1px 5px; font-size: 10px; }
#circuit-section { padding: 15px 12px 22px; border-bottom: 1px solid var(--line); }
#circuit-coverage { padding: 0 5px; font-size: 11px; }
#circuit-search { width: 100%; margin: 5px 0 10px; padding: 7px 8px; border: 1px solid #bfc3b8; border-radius: 2px; color: var(--text); background: #fffefa; font-size: 12px; }
.selection-details h3 { margin: 16px 0 5px; font-size: 11px; font-weight: 600; }
.circuit-connection { border-top: 1px solid var(--line); padding: 7px 0; }
.circuit-connection button, .interface-pads button { border: 0; background: transparent; color: var(--accent); padding: 0; font-size: 11px; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.circuit-connection p { margin: 4px 0; font-size: 11px; }
.circuit-connection a { font-size: 10px; }
.circuit-components ol { padding-left: 18px; }
.circuit-components li { padding: 5px 0; }
.circuit-components p { font-size: 11px; margin: 4px 0; }
.interface-pads button { margin: 3px 8px 3px 0; }
.interface-pads small { display: block; font-size: 10px; margin: 5px 0; }
#sidebar { min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); background: var(--panel); }
.chip-details { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.eyebrow { font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); }
h1 { font-size: 17px; font-weight: 600; line-height: 1.4; margin: 8px 0 10px; }
h2 { font-size: 13px; font-weight: 600; margin: 6px 0 8px; }
p { color: var(--muted); margin: 8px 0; font-size: 12px; }
.availability { display: flex; align-items: flex-start; margin-top: 14px; color: var(--muted); font-size: 11px; }
.chip-links { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; }
details { margin-top: 12px; color: var(--muted); font-size: 11px; }
summary { cursor: pointer; }
#limits-content p { font-size: 11px; line-height: 1.6; }
.selection-details { padding: 18px; border-bottom: 1px solid var(--line); min-height: 154px; }
.selection-details a { font-size: 11px; }
.confidence { display: block; margin: 5px 0; color: #555e4c; font-size: 10px; }
.confidence.inferred { color: var(--accent); }
#annotation-section { padding: 15px 12px 22px; }
.annotation-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 0 5px; }
.annotation-heading h2 { margin: 0; }
.annotation-heading span { color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; margin-left: 5px; }
.annotation-heading button { border: 0; padding: 2px 0; background: transparent; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
#annotation-search { width: 100%; margin-top: 12px; padding: 7px 8px; border: 1px solid #bfc3b8; border-radius: 2px; color: var(--text); background: #fffefa; font-size: 12px; }
#layers { margin: 10px 5px; }
#layer-list { display: grid; gap: 5px; padding: 10px 0; }
#layer-list label { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.swatch { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; }
.annotation-row { display: flex; width: 100%; align-items: flex-start; gap: 9px; padding: 10px 5px; border: 0; border-top: 1px solid #e5e5dd; border-radius: 0; background: transparent; color: var(--text); text-align: left; font-size: 12px; line-height: 1.4; }
.annotation-row .swatch { margin-top: 5px; }
.annotation-row:hover { background: #efeee7; }
.annotation-row.selected { background: #ece4d9; box-shadow: inset 2px 0 var(--accent); }
.annotation-row .region-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.annotation-empty { padding: 10px 5px; font-size: 11px; }
.statusbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 5px 13px; border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; }
.statusbar > span:first-child { overflow: hidden; text-overflow: ellipsis; }
#native-map, #gds-panel { position: relative; grid-column: 1/-1; grid-row: 1; min-height: 0; overflow: hidden; }
#native-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.native-source-link { position: absolute; left: 12px; bottom: 8px; z-index: 4; padding: 4px 8px; background: #faf9f5ed; color: #97442d; font-size: 11px; }
#workspace.native .diagram-pane, #workspace.native .image-pane,
#workspace[data-mode=gds] .diagram-pane, #workspace[data-mode=gds] .image-pane { display: none; }
#workspace[data-mode=image] .diagram-pane, #workspace[data-mode=schematic] .image-pane { display: none; }
#workspace[data-mode=image], #workspace[data-mode=schematic] { grid-template-columns: minmax(0, 1fr) var(--sidebar); }
#workspace.native:not([data-mode=gds]), #workspace[data-mode=gds] { grid-template-columns: 1fr; }
#workspace.native:not([data-mode=gds]) #sidebar, #workspace[data-mode=gds] #sidebar { display: none; }
.native-note { padding: 20px; color: var(--muted); }
canvas { touch-action: none; }
[hidden] { display: none !important; }
@media (max-width: 1200px) and (min-width: 901px) {
  :root { --sidebar: 280px; }
  .topbar { gap: 16px; padding: 0 14px; }
  .brand small { display: none; }
  .chip-picker select { width: min(380px, 40vw); }
  .toolbar { gap: 12px; }
  .chip-heading { flex-basis: 100%; padding-bottom: 0; }
  .toolbar .map-buttons { margin-left: auto; padding: 8px 0; }
  #workspace:not(.native)[data-mode=split] { grid-template-columns: minmax(0, 1fr) var(--sidebar); grid-template-rows: 38% 62%; }
  .diagram-pane { grid-column: 1; grid-row: 1; border-right: 0; border-bottom: 1px solid var(--line); }
  .image-pane { grid-column: 1; grid-row: 2; }
  #sidebar { grid-column: 2; grid-row: 1/3; }
  #workspace[data-mode=image] .image-pane, #workspace[data-mode=schematic] .diagram-pane { grid-row: 1/3; }
}
@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; }
  body { display: block; overflow: auto; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .brand { margin-right: auto; }
  .brand small { display: none; }
  .chip-picker { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .chip-picker select { flex: 1; width: 0; }
  .library-link { font-size: 11px; }
  .toolbar { gap: 0 18px; padding: 0 16px 10px; }
  .chip-heading { flex-basis: 100%; }
  .view-buttons { gap: 17px; }
  .view-buttons button { padding: 7px 0; font-size: 11px; }
  .map-buttons { padding-top: 6px; margin-left: auto; }
  #workspace, #workspace[data-mode=image], #workspace[data-mode=schematic] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .diagram-pane { grid-column: 1; grid-row: 2; height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .image-pane { grid-column: 1; grid-row: 1; height: 510px; }
  #workspace[data-mode=schematic] .diagram-pane { height: 520px; }
  #workspace[data-mode=image] .image-pane { height: 620px; }
  #sidebar { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; overflow: visible; border-left: 0; border-top: 1px solid var(--line); }
  .chip-details { border-right: 1px solid var(--line); }
  .selection-details { min-height: 0; }
  #annotation-section, #circuit-section { grid-column: 1/-1; }
  #annotation-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  #native-map { height: calc(100dvh - 210px); min-height: 420px; }
  #gds-panel { height: calc(100dvh - 210px); min-height: 450px; }
  .statusbar { white-space: normal; }
  .statusbar > span:last-child { display: none; }
}
@media (max-width: 540px) {
  .toolbar { gap: 0 12px; }
  .map-buttons { flex-basis: 100%; margin-left: 0; }
  .chip-heading strong { font-size: 11px; }
  .badge { font-size: 10px; }
  .image-pane { height: 470px; }
  #sidebar { display: block; }
  .chip-details { border-right: 0; }
  #annotation-list { grid-template-columns: 1fr; }
}

.catalog-filters { display: flex; align-items: flex-end; gap: 16px; padding: 10px 20px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.catalog-filters label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 10px; }
.catalog-filters .chip-search-label { flex: 1; min-width: 150px; max-width: 560px; }
.catalog-filters input, .catalog-filters select { min-height: 31px; padding: 5px 8px; border: 1px solid #bfc3b8; border-radius: 2px; background: var(--panel); color: var(--text); font-size: 12px; }
.catalog-filters select { max-width: 210px; }
.catalog-filters button { margin-bottom: 1px; padding: 5px 0; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 11px; }
#filter-count { align-self: center; padding-top: 15px; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.map-buttons label:has(input:disabled) { opacity: .45; }
#image-message { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 340px; width: calc(100% - 48px); padding: 16px 20px; border: 1px solid #555a50; background: #171a18ed; color: #e8e7df; font-size: 12px; text-align: center; pointer-events: none; }
#record-panel, #empty-state { grid-column: 1/-1; grid-row: 1; min-height: 0; overflow: auto; background: var(--panel); }
#workspace[data-mode=record], #workspace[data-mode=empty] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#workspace[data-mode=record] .diagram-pane, #workspace[data-mode=record] .image-pane, #workspace[data-mode=record] #sidebar,
#workspace[data-mode=empty] .diagram-pane, #workspace[data-mode=empty] .image-pane, #workspace[data-mode=empty] #sidebar { display: none; }
.record-sheet { max-width: 1120px; margin: 0 auto; padding: 42px 48px 52px; }
.record-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.record-heading .eyebrow { font-size: 11px; }
.record-heading h1 { margin: 12px 0 13px; font: 34px/1.2 Manrope, "DM Sans", sans-serif; letter-spacing: -.5px; }
.record-summary { max-width: 76ch; margin: 0; font-size: 14px; line-height: 1.7; color: #4b5147; }
.record-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 58px; }
.record-section { padding: 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.record-section h2 { margin: 0 0 16px; font: 19px/1.3 Manrope, "DM Sans", sans-serif; }
.record-section p { margin: 10px 0; font-size: 12px; line-height: 1.7; }
.record-section > a { display: inline-block; margin-top: 10px; font-size: 12px; }
.record-section ul { padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.record-section li + li { margin-top: 9px; }
.record-facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px 18px; margin: 0 0 10px; font-size: 12px; }
.record-facts dt { color: var(--muted); }
.record-facts dd { margin: 0; overflow-wrap: anywhere; }
.evidence-list { margin: 0; padding-left: 18px; font-size: 12px; }
.evidence-list li { padding-left: 4px; margin-bottom: 20px; }
.evidence-list a { overflow-wrap: anywhere; }
.evidence-list .evidence-publisher { margin-top: 4px; color: var(--muted); font-size: 10px; }
.evidence-list p { margin: 5px 0; font-size: 11px; }
.evidence-list small { color: var(--muted); font-size: 10px; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding-top: 24px; font-size: 12px; }
.record-actions button { padding: 6px 12px; }
.part-search { width: 100%; padding: 7px 9px; border: 1px solid #bfc3b8; border-radius: 2px; background: #fffefa; color: var(--text); font-size: 12px; }
.record-section .part-count { font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.part-table-scroll { max-height: 380px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.part-table { width: 100%; min-width: 390px; border-collapse: collapse; font-size: 11px; }
.part-table th { position: sticky; top: 0; z-index: 1; background: var(--raised); font-weight: 500; text-align: left; }
.part-table th, .part-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.part-table .part-number { font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.part-table tr:last-child td { border-bottom: 0; }
#empty-state { padding: 70px max(24px, calc((100% - 720px)/2)); }
#empty-state h1 { font: 30px/1.3 Manrope, "DM Sans", sans-serif; }
#empty-state p { max-width: 58ch; font-size: 14px; line-height: 1.7; }
#empty-state button { margin-top: 14px; }
@media (min-width: 901px) and (max-width: 1200px) {
  .catalog-filters { gap: 12px; padding-left: 14px; padding-right: 14px; }
  .record-sheet { padding: 30px; }
  .record-columns { column-gap: 34px; }
}
@media (max-width: 900px) {
  .catalog-filters { flex-wrap: wrap; gap: 10px 14px; padding: 10px 16px 13px; }
  .catalog-filters .chip-search-label { max-width: none; flex-basis: 100%; }
  .catalog-filters select { max-width: min(210px, 38vw); }
  #filter-count { margin-left: auto; padding-top: 13px; }
  .record-sheet { padding: 30px 24px 42px; }
  .record-columns { column-gap: 32px; }
  .record-heading h1 { font-size: 30px; }
  #record-panel { overflow: visible; }
  #workspace[data-mode=record], #workspace[data-mode=empty] { display: block; }
  #native-map { height: calc(100dvh - 290px); }
}
@media (max-width: 650px) {
  .record-columns { display: block; }
  .record-sheet { padding: 26px 20px 38px; }
  .record-heading h1 { font-size: 28px; }
  .record-facts { grid-template-columns: 100px minmax(0, 1fr); gap: 9px 12px; }
  .record-notes { padding-top: 4px; }
  .catalog-filters label { flex: 1; min-width: 120px; }
  .catalog-filters select { max-width: none; width: 100%; }
  #filter-count { margin-left: 0; padding: 0; flex: 1; }
  .catalog-filters button { padding: 0; }
  .view-buttons { gap: 14px; flex-wrap: wrap; }
}

/* Published viewer accepts die photography and real GDS files only. */
.diagram-pane,#native-map,#circuit-section{display:none!important}

/* Match the host site's theme while keeping the viewer usable as a standalone page. */
html[data-theme="dark"] { color-scheme: dark; --bg: #1c1c1d; --panel: #212529; --raised: #303438; --line: #424246; --text: #e8e8e8; --muted: #b7b9bd; --accent: #67c7e2; --focus: #67c7e2; }
html[data-theme="dark"] a:hover { color: #a5e2f2; }
html[data-theme="dark"] button, html[data-theme="dark"] select, html[data-theme="dark"] input { border-color: #666b70; }
html[data-theme="dark"] .diagram-pane { background: #25292d; }
html[data-theme="dark"] #image-select, html[data-theme="dark"] #annotation-search, html[data-theme="dark"] #circuit-search, html[data-theme="dark"] .part-search { background: #292d31; color: var(--text); }
html[data-theme="dark"] .annotation-row { border-color: var(--line); }
html[data-theme="dark"] .annotation-row:hover { background: #303438; }
html[data-theme="dark"] .annotation-row.selected { background: #34444b; }
html[data-theme="dark"] .confidence, html[data-theme="dark"] .record-summary { color: var(--muted); }
html[data-theme="dark"] .diagram-node rect { fill: #303438; stroke: #9aabb0; }
html[data-theme="dark"] .diagram-node.external rect { fill: #292d31; stroke: #9aabb0; }
html[data-theme="dark"] .diagram-node.selected rect { fill: #34444b; stroke: var(--accent); }
html[data-theme="dark"] .diagram-node text { fill: var(--text); }
html[data-theme="dark"] .diagram-edge { stroke: #aab8bd; }
html[data-theme="dark"] .diagram-title, html[data-theme="dark"] .diagram-label, html[data-theme="dark"] #diagram-host .device-type { fill: var(--muted); }
html[data-theme="dark"] .native-source-link { background: #212529ed; color: var(--accent); }

/* The atlas viewer uses the same typography and restrained red accent as the host site. */
.topbar{gap:20px}.brand-title{font-weight:700;letter-spacing:-.035em}.brand small{font-size:9px;font-weight:700;letter-spacing:.08em}.library-link,.website-link{font-weight:600;text-decoration:none}.catalog-filters{background:var(--raised);gap:14px}.catalog-filters label{font-weight:600;letter-spacing:.02em}.catalog-filters input,.catalog-filters select,button,select{border-color:var(--line);border-radius:5px}.toolbar{padding-left:20px;padding-right:20px}.view-buttons button{font-weight:600}.chip-details h1,.selection-details h2,.annotation-heading h2{font-family:Manrope,"DM Sans",sans-serif;letter-spacing:-.02em}.chip-details h1{font-size:19px}.eyebrow{font-family:"DM Sans",sans-serif;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.pane-label{font-weight:600}.image-pane{background:#17191c}.image-caption{line-height:1.55}.annotation-row{border-radius:4px}.statusbar{border-top:1px solid var(--line)}
@media(max-width:900px){.topbar{gap:12px}.catalog-filters{gap:10px 14px}.toolbar{padding-left:16px;padding-right:16px}}
html[data-theme="dark"] input::placeholder{color:#b7b9bd;opacity:1}

.annotation-scope-note { margin: 8px 5px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
