:root { font-family: system-ui, sans-serif; color: #222; background: #f6f6f5; }
* { box-sizing: border-box; }
body { margin: 0; }
header, main { max-width: 1200px; margin: auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #bbb; }
a { color: #254aac; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
p { line-height: 1.6; }
form, .more-filters, .save-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
label { display: grid; gap: 6px; }
input, select, button { font: inherit; min-height: 44px; padding: 10px; border: 1px solid #999; border-radius: 6px; width: 100%; }
button { background: #222; color: white; cursor: pointer; width: auto; }
button:disabled { opacity: .5; }
:focus-visible { outline: 3px solid #254aac; outline-offset: 4px; }
details { grid-column: 1 / -1; }
summary { cursor: pointer; padding: 12px 0; }
.check { display: flex; align-items: center; }
.check input { width: 20px; }
section { margin: 24px 0; padding: 20px; border: 1px solid #bbb; border-radius: 8px; background: white; }
#network-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
article { border: 1px solid #ccc; border-radius: 6px; padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
article h3, article p { margin: 0; }
.sources { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#edge-list li { margin: 16px 0; line-height: 1.6; }
svg { width: 100%; display: block; }
svg line { stroke: #999; stroke-width: 2; }
svg text { font-size: 13px; text-anchor: middle; fill: #222; }
svg .edge-label { font-size: 12px; paint-order: stroke; stroke: white; stroke-width: 5px; }
svg .node { cursor: pointer; }
svg .node circle { fill: #f2de83; stroke: #333; stroke-width: 2; }
svg .node:focus circle { stroke: #254aac; stroke-width: 5; }
#error { color: #8b1818; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 24px; top: -100px; }
.skip:focus { top: 10px; background: white; padding: 10px; }
@media (max-width: 600px) {
  header { flex-direction: column; align-items: stretch; }
  header, main { padding: 16px; }
  form, .more-filters, .save-controls, #network-list { grid-template-columns: 1fr; }
  section { padding: 16px; }
}
