* { box-sizing: border-box }
body { margin: 0; background: var(--bg); background-image: var(--paper-dots); background-size: 16px 16px; font-family: var(--font-primary); color: var(--fg) }
[hidden] { display: none !important }
a, button, input { accent-color: var(--accent) }
a { color: var(--accent); text-underline-offset: .22em }
button, .actions a, .mast a { font: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
.mast { background: var(--bg-panel); border-bottom: 1px solid var(--border) }
.mast > div, main, footer { max-width: 1032px; margin: auto; padding: 0 32px }
.mast > div, nav, .brand, .actions, .actions > div, .map-top, .map-foot, .controlbar, .controlbar > div, .legend, footer { display: flex; align-items: center }
.mast > div, .actions, .map-top, .map-foot, footer { justify-content: space-between }
.mast > div { min-height: 65px }
.brand { gap: .65rem; font-weight: 700 !important; color: var(--white); font-size: 19px !important; text-decoration: none }
nav { gap: 20px; font-size: 13px }
nav a { text-decoration: none }
.intro { padding: clamp(24px,4vw,48px) 0 22px }
.eyebrow, .edge-type, .code { color: var(--accent); font-size: 12px; font-weight: bold; letter-spacing: .09em }
.eyebrow { text-transform: uppercase; margin: 0 0 10px }
h1 { margin: 0; color: var(--white); font-size: clamp(33px,5.3vw,67px); letter-spacing: -.075em; line-height: 1.08; overflow-wrap: anywhere }
.subtitle { margin: 12px 0 0; max-width: 82ch; color: var(--fg-dim); line-height: 1.5; font-size: 15px }
.map { color: var(--fg); background: var(--bg); border: 1px solid var(--border-bright); position: relative; overflow: hidden }
.map-top,.map-foot,.controlbar { padding: 10px 20px; gap: 12px; font-size: 12px; color: var(--fg-dim) }
.map-top { background: var(--bg-panel); border-bottom: 1px solid var(--border); min-height: 39px }
.controlbar { flex-wrap: wrap; gap: 10px 24px; padding-block: 9px; border-bottom: 1px solid var(--border) }
.controlbar > div { gap: 4px }
.controlbar > div > span { margin-right: 5px }
.controlbar button, #more { color: var(--fg); background: var(--bg-panel); border: 1px solid var(--border-bright); font: inherit; min-width: 34px; min-height: 32px }
.controlbar button[aria-pressed=true] { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: bold }
.controlbar label { display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px }
.controlbar input { margin: 0; width: 15px; height: 15px }
#stage { position: relative; isolation: isolate; background: var(--bg) }
#art { position: relative; z-index: 1 }
#art svg, noscript svg { display: block; width: 100%; height: auto }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; visibility: hidden }
.is-gl #sky { visibility: visible }
.is-gl .sky rect, .is-gl .sky circle, .is-gl .geometry { visibility: hidden }
.labels a { cursor: pointer }
.labels a:focus-visible .focus-ring, .labels a:hover .focus-ring, .labels a[aria-current=true] .focus-ring { opacity: 1; stroke-width: 3 }
.map-foot { min-height: 38px; border-top: 1px solid var(--border); flex-wrap: wrap }
.legend { gap: 8px; flex-wrap: wrap }
.legend i { width: 20px; border-top: 2px solid var(--accent) }
.legend .dotted { margin-left: 7px; border-top: 2px dashed var(--fg-dim) }
.skip { position: absolute; left: -10000px }
.skip:focus { left: 12px; z-index: 3; background: var(--bg); padding: 8px }
.actions { flex-wrap: wrap; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); font-size: 13px }
.actions > div { gap: 12px }
.actions button, .actions #download, .open-root { padding: 9px 13px; color: var(--accent); background: var(--bg-panel); border: 1px solid var(--border-bright); text-decoration: none }
#status { font-size: 13px; color: var(--fg-dim) }
#status:empty { display: none }
#selection { border-left: 3px solid var(--accent); background: var(--bg-panel); margin-top: 20px; padding: 8px 18px }
.node-detail { padding: 12px 0; scroll-margin-top: 20px }
.node-detail small { color: var(--accent) }
.node-detail h3 { margin: 6px 0 }
.node-detail p,.evidence p { margin: 6px 0; line-height: 1.55 }
.open-root { display: inline-block; font-size: 13px; margin-top: 6px }
h2 { font-size: clamp(20px,3vw,30px); letter-spacing: -.045em; margin: 28px 0 10px }
.evidence { list-style: none; padding: 0; margin: 0 }
.evidence-row { border-top: 1px solid var(--border); padding: 16px 0; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; font-size: 14px }
.edge-pair { display: grid; align-content: start; gap: 4px }
.evidence-row p { margin-top: 0 }
.evidence-row a { font-size: 12px }
footer { margin-block: 28px; border-top: 1px solid var(--border); min-height: 64px; font-size: 13px }
.narrow { display: none }
@media(max-width:600px){
  .mast > div,main,footer { padding-inline: 12px }
  .mast > div { min-height: 52px }
  .brand { font-size: 15px !important; gap: 4px }
  .brand img { width: 24px; height: 24px }
  nav { gap: 9px; font-size: 12px }
  .map-top,.map-foot,.controlbar { padding-inline: 10px; gap: 6px 12px; font-size: 11px }
  .controlbar button { min-width: 36px; min-height: 36px }
  .map-foot { align-items: flex-start }
  .actions { font-size: 12px; gap: 8px }
  .actions > div { gap: 5px }
  .actions button,.actions #download { padding: 8px }
  .evidence-row { grid-template-columns: 1fr; gap: 8px }
  .wide { display: none }
  .narrow { display: block }
}

.edge-hit text { opacity: 0 }
.edge-hit:focus-visible text, .edge-hit:hover text { opacity: 1 }
.evidence-row:focus { background:var(--bg-panel) }
.edge-hit:focus-visible { outline:none }
