:root { color-scheme: light; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: #20262b; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
button, select { font: inherit; color: inherit; }
button { min-width: 44px; min-height: 44px; padding: .3rem .65rem; border: 1px solid #bac4cb; border-radius: 5px; background: #fff; cursor: pointer; }
button:hover { background: #eef3f7; }
:focus-visible { outline: 3px solid #075ea8; outline-offset: 2px; }
a { color: #065da4; text-underline-offset: .14em; }
.toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; padding: .45rem .8rem; border-bottom: 1px solid #c8d0d6; background: #f5f7f9; z-index: 2; }
.brand { font-weight: 650; white-space: nowrap; }
.target-label { flex: 1; display: flex; align-items: center; gap: .4rem; min-width: 190px; }
select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #bac4cb; border-radius: 5px; background: #fff; padding: .3rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .25rem; }
.buttons button { font-size: .875rem; padding-inline: .3rem; }
#workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#workspace.has-inspector[data-layout="desktop"] { grid-template-columns: minmax(0, 1fr) min(40%, 560px); }
#workspace.has-inspector[data-layout="portrait"] { grid-template-rows: minmax(0, 1fr) minmax(0, 2fr); }
#workspace.has-inspector[data-layout="landscape"] { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
#schematic { position: relative; min-height: 0; min-width: 0; overflow: hidden; background: #f1f3f4; touch-action: none; }
#schematic:focus-visible { outline-offset: -3px; }
.hotspots { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.hotspot { fill: transparent; stroke: #000; stroke-opacity: .25; stroke-width: 2pt; stroke-dasharray: 1 5; stroke-linecap: round; pointer-events: none; }
.hotspot.hover, .hotspot:focus-visible { stroke-opacity: 1; }
.hotspot.selected { stroke: #d00000; stroke-opacity: 1; }
.hotspot:focus-visible { outline: none; stroke: #075ea8; stroke-dasharray: 4 3; }
.hotspot.selected:focus-visible { stroke: #d00000; }
.over-hotspot .openseadragon-canvas { cursor: pointer; }
#inspector { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; border-left: 1px solid #aebbc5; box-shadow: -3px 0 14px #182c3c12; }
[data-layout="portrait"] #inspector { border-left: 0; border-top: 1px solid #aebbc5; }
.inspector-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: .65rem .85rem; border-bottom: 1px solid #d5dce1; }
.inspector-header h1 { margin: 0; font-size: 1.2rem; }
.inspector-header p { margin: .15rem 0 0; font-size: .85rem; color: #56626b; }
.inspector-header p:empty { display: none; }
#information { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
dialog { width: min(92vw, 650px); max-height: 88dvh; border: 1px solid #8fa2af; border-radius: 8px; padding: 1.25rem; color: inherit; overflow: auto; }
dialog::backdrop { background: #152c3c70; }
dialog h1 { margin-top: 0; font-size: 1.45rem; }
dialog li { margin-block: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.explanation { display: block; height: auto; overflow: auto; padding: .3rem 1rem 1.2rem; overflow-wrap: anywhere; }
.explanation p { margin: .8rem 0; }
.explanation h2 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.explanation table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.explanation th, .explanation td { border: 1px solid #ccd5db; text-align: left; padding: .35rem; vertical-align: top; }
.explanation th { background: #f1f5f8; }
.explanation img { max-width: 100%; height: auto; }
.explanation pre { overflow: auto; }
.parent-link { border-top: 1px solid #d5dce1; padding-top: .65rem; margin-top: 1.3rem; font-size: .85rem; }
.component-list { padding-left: 1.3rem; }
.component-list li { margin: .4rem 0; }
@media (max-width: 650px) {
  .toolbar { gap: .25rem .5rem; padding: .3rem .45rem; }
  .brand { font-size: .85rem; }
  .target-label { font-size: .85rem; }
  .buttons { gap: .18rem; }
  button { padding-inline: .4rem; }
  .inspector-header { padding: .4rem .65rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
