:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", sans-serif; color: #263b36; background: #fff; line-height: 1.6; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 12px; }
main { max-width: 1000px; margin: auto; }
h1 { font-size: 21px; line-height: 1.4; margin: 5px 0; }
p { margin: 6px 0 12px; }
a { color: #277668; text-underline-offset: 3px; }
.kicker { margin: 0; color: #527568; font-size: 12px; }
.sub, .scope, .legend { color: #55685f; font-size: 13px; }
button { font: inherit; font-size: 13px; min-height: 40px; padding: 7px 12px; color: inherit; border: 1px solid #b3c8c0; border-radius: 5px; background: #fff; cursor: pointer; }
button:hover { background: #eff7f3; border-color: #277668; }
button:disabled { opacity: .45; cursor: default; }
button[aria-pressed="true"] { background: #e8f4ee; border-color: #277668; color: #205e50; font-weight: 600; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #377aaf; outline-offset: 3px; }
.modes, .controls, .steps { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.modes { border-bottom: 1px solid #dce5e0; padding-bottom: 12px; }
.modes button { flex: 1 1 auto; }
.count { margin-left: auto; align-self: center; font-size: 12px; color: #55685f; }
.scroll-hint { color: #38685f; font-size: 13px; margin: 8px 0; }
.viewport { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid #dce5e0; border-radius: 5px; }
svg { display: block; width: 100%; min-width: 700px; height: auto; }
.node { cursor: pointer; }
.node.active rect { stroke: #15654d; stroke-width: 3.2; fill: #e6f5ec; }
.node.active .label { fill: #12513e; }
.node.muted rect { fill: #fbfcfc; stroke: #c9d4d0; }
.edge.muted { opacity: .4; }
.node:hover rect, .node:focus-visible rect { stroke: #377aaf; stroke-width: 3; }
.node:focus-visible { outline: none; }
.edge.active { stroke: #15654d; stroke-width: 3; }
.explanation { border-left: 3px solid #277668; background: #f4f8f5; padding: 12px 16px; min-height: 116px; }
.explanation h2 { font-size: 16px; margin: 0 0 5px; }
.explanation p { font-size: 14px; margin: 0; }
.legend { font-size: 12px; margin-top: 10px; }
footer { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 13px; border-top: 1px solid #dce5e0; padding-top: 12px; }
.sources { margin-top: 12px; color: #55685f; font-size: 12px; }
.sources summary { cursor: pointer; }
#fallback { overflow-x: auto; }
#fallback img { width: 100%; min-width: 700px; }
@media (max-width: 480px) { body { padding: 8px; } h1 { font-size: 19px; } button { min-height: 44px; padding: 7px 9px; } .count { width: 100%; margin: 0; } .explanation { min-height: 160px; } }
@media print { .modes, .controls, .steps, .viewport, .scroll-hint, .explanation, .legend, footer { display: none; } #fallback[hidden] { display: block !important; } #fallback img { min-width: 0; } }
