:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, "Segoe UI", sans-serif;
  color: #152440;
  background: #f1f5fb;
  --ink: #152440;
  --muted: #4b5e78;
  --line: #dce5f1;
  --surface: #fff;
  --accent: #234cc7;
  --accent-soft: #eaf0ff;
  --rail: #101b33;
  --sent: #087c71;
  --received: #175eb0;
  --review: #b03746;
  --shadow: 0 2px 6px #16346108, 0 14px 36px #16346106;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #4774fa; outline-offset: 3px; }
section[id], details[id] { scroll-margin-block: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; font-weight: 750; }
h1 { font-size: clamp(2.4rem, 4.55vw, 4.4rem); }
h2 { font-size: clamp(1.34rem, 2.45vw, 1.95rem); }
h3 { font-size: 1.13rem; }
p, small { color: var(--muted); }

body { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.top { background: var(--rail); color: #eaf0fd; }
.top-inner { position: sticky; top: 0; min-height: 100svh; display: flex; flex-direction: column; gap: 30px; padding: 28px 16px 21px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1rem; line-height: 1.18; letter-spacing: -.035em; font-weight: 800; text-decoration: none; }
.packet-mark { flex: 0 0 39px; height: 39px; display: grid; place-items: center; border: 1px solid #35736f; border-radius: 10px; position: relative; background: #173a47; }
.packet-mark::before { content: ""; width: 23px; height: 12px; margin-bottom: 5px; border: 1.5px solid #9deee1; border-radius: 2px; background: linear-gradient(90deg, #9deee1 0 24%, transparent 24% 49%, #9deee1 49% 55%, transparent 55% 75%, #9deee1 75% 81%, transparent 81%); }
.packet-mark::after { content: ""; position: absolute; width: 19px; height: 4px; top: 23px; left: 10px; border: solid #6abcb4; border-width: 0 1.5px 1.5px; border-radius: 0 0 2px 2px; }
.workspace-nav { display: grid; gap: 5px; }
.workspace-nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 11px; border-radius: 9px; color: #bfcde6; font-size: .88rem; font-weight: 740; text-decoration: none; white-space: nowrap; }
.workspace-nav a:hover { background: #203050; color: #fff; }
.workspace-nav a[aria-current] { color: #fff; background: #263d75; }
.workspace-nav a[aria-current]::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 4px; background: #a5baff; }
.nav-icon { position: relative; width: 15px; height: 15px; border: 1.5px solid currentColor; flex: none; border-radius: 4px; opacity: .9; }
.map-icon { border-radius: 50%; }
.map-icon::before, .map-icon::after { content: ""; position: absolute; inset: 0 3px; border: 1px solid currentColor; border-radius: 50%; }
.map-icon::after { inset: 5px 0 auto; border: 0; border-top: 1px solid currentColor; }
.overview-icon { transform: rotate(45deg) scale(.8); }
.overview-icon::before { content: ""; position: absolute; inset: 4px; background: currentColor; border-radius: 50%; }
.apps-icon::before, .apps-icon::after { content: ""; position: absolute; inset: 3px 2px auto; height: 1px; background: currentColor; box-shadow: 0 4px currentColor; }
.rail-bottom { margin-top: auto; padding: 12px 3px 0; display: grid; gap: 11px; border-top: 1px solid #30405f; }
.rail-bottom .link-button { text-align: left; color: #e0e9fb; font-size: .82rem; padding: 5px 0; }
.privacy { color: #b3c2dc; display: flex; gap: 7px; align-items: center; font-size: .69rem; }
.privacy i, .source-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #8dd9bc; }

main { width: min(100%, 1510px); min-width: 0; margin-inline: auto; padding: clamp(16px, 2.6vw, 36px); }
.site-footer { display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: space-between; margin-block: 28px 8px; padding: 18px 2px 0; border-top: 1px solid var(--line); scroll-margin-block: 18px; }
.site-footer > div { max-width: 56ch; }
.site-footer h2 { font-size: 1rem; letter-spacing: -.015em; }
.site-footer p, .site-footer a { margin-top: 5px; font-size: .88rem; }
.site-footer a { display: inline-block; color: var(--accent); font-weight: 720; overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 6px; }
.contact-actions .button { min-height: 34px; padding: 4px 9px; }
.rail-bottom a.link-button { text-decoration: none; }
.rail-bottom a.link-button:hover { text-decoration: underline; }
.intro { isolation: isolate; overflow: hidden; position: relative; min-height: 208px; display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 21px clamp(19px, 3vw, 42px); margin-bottom: 19px; color: #fff; border-radius: 20px; background: #0e1e30; box-shadow: var(--shadow); }
.intro::before { content: ""; position: absolute; pointer-events: none; z-index: -1; inset: 0; background: linear-gradient(90deg, #071522 2%, #07152299 43%, #07152214 71%), url("./packet-banner.jpg") right center / cover no-repeat; }
.intro > div:first-child { min-width: 0; }
.intro h1 { margin: 8px 0; }
.eyebrow { border: 1px solid #afc5ff59; background: #0c193e55; padding: 4px 10px; width: fit-content; max-width: 100%; border-radius: 99px; display: flex; align-items: center; gap: 7px; color: #ecf1ff; font-size: .77rem; font-weight: 770; overflow-wrap: anywhere; }
.intro .site-introduction { color: #e3ebff; max-width: 48ch; font-size: .96rem; }
#summary { margin-top: 6px; color: #c3d2f3; font-size: .81rem; overflow-wrap: anywhere; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
main[data-view]:not([data-view=overview]) .intro { min-height: 0; padding-block: 17px; margin-bottom: 19px; align-items: center; }
main[data-view]:not([data-view=overview]) .intro::before { display: none; }
main[data-view]:not([data-view=overview]) .intro h1 { font-size: clamp(1.6rem, 3vw, 2.55rem); margin-block: 3px; }
main[data-view]:not([data-view=overview]) .site-introduction { display: none; }
main[data-view]:not([data-view=overview]) .beginner-trigger { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 8px 14px; border: 1px solid transparent; border-radius: 9px; font-weight: 780; font-size: .84rem; white-space: nowrap; text-decoration: none; }
.primary { color: #fff; background: #2854dc; box-shadow: 0 2px 5px #1f44bb2d; }
.primary:hover { background: #1c3fb3; }
.intro .primary { color: #163984; background: #fff; }
.intro .primary:hover { background: #e4ecff; }
.intro .secondary { color: #fff; background: #10214b77; border-color: #9fb7f888; }
.intro .secondary:hover { background: #142a64; }
.secondary, .close { background: var(--surface); color: var(--ink); border-color: #cedbef; }
.secondary:hover, .close:hover { background: var(--accent-soft); }
.button:disabled, select:disabled { opacity: .56; cursor: default; }
.open-icon { display: inline-block; width: 15px; height: 10px; border: 1px solid currentColor; border-radius: 2px; position: relative; }
.open-icon::before { content: ""; position: absolute; top: -4px; left: 0; width: 5px; height: 3px; border: 1px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 780; }
.link-button:hover { text-decoration: underline; }

.view-intro { margin-bottom: 13px; }
.view-intro p, .card-heading p { max-width: 73ch; font-size: .89rem; margin-top: 4px; }
.scope-overview, .metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.metrics { margin: 8px 0 0; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.scope-tile { position: relative; min-width: 0; display: grid; align-content: start; justify-items: start; gap: 2px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; padding: 10px 13px; text-decoration: none; box-shadow: var(--shadow); }
.scope-tile:hover { border-color: #9cb4f5; background: #fafbff; }
.scope-tile strong { font-size: 1.95rem; line-height: 1.1; margin: 2px 0; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.scope-tile small { font-size: .77rem; }
.scope-arrow { position: absolute; top: 11px; right: 12px; color: #3453a2; font-size: 1.12rem; }
.scope-tag { display: inline-block; width: fit-content; padding: 3px 8px; border-radius: 6px; color: #374c6a; background: #eaf0f8; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.scope-tag[data-scope=remote] { color: #2348ac; background: #e7eeff; }
.scope-tag[data-scope=local] { color: #096153; background: #def4ee; }
.scope-tag[data-scope=other] { color: #704b20; background: #f9edd8; }
.metric { min-width: 0; display: flex; align-items: center; gap: 10px; border-radius: 11px; padding: 8px 10px; }
.metric-dot { width: 31px; height: 31px; display: grid; place-items: center; color: var(--accent); background: #e3ebfe; border-radius: 9px; font-size: 1.05rem; flex: none; }
.metric-dot.sent { color: var(--sent); background: #daf3ee; }
.metric-dot.received { color: var(--received); background: #e3effd; }
.metric-label { color: var(--muted); display: block; font-size: .78rem; font-weight: 740; }
.metric strong { display: block; font-size: 1.12rem; line-height: 1.22; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { display: block; font-size: .72rem; overflow-wrap: anywhere; }

.card { border: 1px solid var(--line); min-width: 0; background: var(--surface); border-radius: 17px; margin-bottom: 15px; box-shadow: var(--shadow); }
.card-heading { padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-card { padding: 0 12px; }
.map-card > .card-heading { padding: 14px 6px; }
.segmented { display: flex; min-inline-size: 0; margin: 0; gap: 2px; padding: 3px; border: 1px solid var(--line); background: #edf2fb; border-radius: 9px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label span { display: inline-flex; align-items: center; min-height: 33px; padding: 4px 9px; border: 1px solid transparent; border-radius: 6px; font-size: .8rem; white-space: nowrap; color: var(--muted); font-weight: 770; }
.segmented input:checked + span { background: #fff; box-shadow: 0 1px 3px #1839651c; color: var(--accent); border-color: var(--line); }
.segmented input:focus-visible + span { outline: 2px solid #4774fa; }
.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr) clamp(215px, 25%, 280px); gap: 10px; }
.map-area, .locations { min-width: 0; height: clamp(335px, 35vw, 505px); border: 1px solid #d5e3f7; border-radius: 13px; }
.map-area { position: relative; overflow: hidden; background: #edf4ff; }
.map-area canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.map-area canvas:active { cursor: grabbing; }
.map-area canvas[data-placing] { cursor: crosshair; }
.map-area canvas:focus-visible { outline-offset: -3px; border-radius: 12px; }
.device-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 6px 10px; }
.device-status { display: flex; flex: 1 1 200px; align-items: center; gap: 8px; }
.device-status p, .device-bar .link-button { font-size: .8rem; }
.device-chip { width: 19px; height: 19px; flex: 0 0 19px; display: grid; place-items: center; border-radius: 5px; background: #173c88; }
.device-chip::after { content: ""; width: 10px; height: 7px; border: 1px solid #fff; border-bottom-width: 2px; border-radius: 2px; }
.device-bar .button { min-height: 34px; padding: 5px 9px; }
.origin-card .card-heading { align-items: flex-start; }
.origin-card h2 { font-size: clamp(1.13rem, 2vw, 1.53rem); }
.origin-status, .origin-note { margin: 0 20px 10px; font-size: .82rem; }
.origin-facts { margin: 0 17px 9px; padding: 9px 11px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 7px 12px; border-radius: 9px; background: #f0f5ff; font-size: .83rem; }
.origin-note a { margin-left: 4px; white-space: nowrap; }
.origin-details { margin: 0 17px 11px; font-size: .82rem; }
.origin-details > summary { color: var(--accent); font-weight: 780; }
.origin-details .origin-facts { margin: 7px 0 0; }
.origin-facts dt { color: var(--muted); font-size: .75rem; }
.origin-facts dd { margin: 2px 0 0; font-weight: 780; overflow-wrap: anywhere; }
@media (max-width: 720px) { .origin-card .card-heading { flex-wrap: wrap; } }
.map-tools { display: grid; position: absolute; right: 10px; bottom: 10px; border: 1px solid #cbd9ee; box-shadow: var(--shadow); overflow: hidden; border-radius: 8px; }
.map-tools button { width: 36px; height: 34px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.15rem; }
.map-tools button:last-child { border-bottom: 0; }
.map-tools button:hover { background: var(--accent-soft); }
.map-tools button:focus-visible { outline-offset: -3px; }
.map-key { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 60px); padding: 6px 9px; border: 1px solid #cfddf1; border-radius: 8px; background: #fffffff5; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 5px 11px; font-size: .73rem; font-weight: 760; pointer-events: none; box-shadow: var(--shadow); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item i, .city-dot { display: grid; place-items: center; width: 14px; height: 14px; flex: none; border-radius: 50%; background: #365bc4; color: #fff; font: 700 10px/1 system-ui, sans-serif; }
.map-key[data-mode=connections] #map-key-symbol, .legend-item .legend-zero, .legend-item .legend-missing,
.city-dot[data-kind=locations], .city-dot[data-kind=missing], .city-dot[data-kind=zero] { width: 9px; height: 9px; justify-self: center; }
.city-dot[data-kind=traffic][data-mode=sentBytes] { background: var(--sent); }
.city-dot[data-kind=traffic][data-mode=receivedBytes] { background: var(--received); }
.map-key[data-mode=sentBytes] #map-key-symbol, .map-key[data-mode=receivedBytes] #map-key-symbol { background: none; font-size: 15px; }
.map-key[data-mode=sentBytes] #map-key-symbol { color: var(--sent); }
.map-key[data-mode=receivedBytes] #map-key-symbol { color: var(--received); }
.legend-item .legend-missing, .city-dot[data-kind=missing] { background: #63748c; }
.legend-item .legend-zero, .city-dot[data-kind=zero] { border: 1px solid #63748c; background: #fff; }
.legend-item .legend-review { width: 11px; height: 11px; background: transparent; border: 2px solid var(--review); }
.city[data-review] .city-dot { outline: 2px solid var(--review); outline-offset: 1px; }
.review-city { color: #98323e; font-weight: 780; }
.traffic-help { padding: 8px 11px; margin-bottom: 9px; background: var(--accent-soft); color: #253960; border-radius: 8px; box-shadow: inset 3px 0 #779af9; font-size: .82rem; }
.locations { padding: 12px; overflow: auto; background: #f6f9ff; }
.locations-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 9px; }
.locations-heading .link-button { font-size: .74rem; }
input[type=search], select { min-width: 0; min-height: 39px; max-width: 100%; border: 1px solid #ccd9ec; background: #fff; color: var(--ink); padding: 7px 10px; border-radius: 8px; font-size: .84rem; }
#city-search { width: 100%; }
#map-status { margin-block: 7px; font-size: .75rem; }
#city-list { display: grid; gap: 6px; }
.city { width: 100%; display: grid; grid-template-columns: 14px minmax(0,1fr) max-content; align-items: center; gap: 8px; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px; min-width: 0; }
.city:hover, .city[aria-pressed=true] { border-color: #91aaf1; background: #ecf2ff; }
.city-text { min-width: 0; display: grid; overflow-wrap: anywhere; }
.city strong { line-height: 1.18; font-size: .85rem; }
.city small, .city-count { font-size: .74rem; }
.city-count { color: #314d7b; text-align: right; font-weight: 780; }
.city-detail { margin: 8px 0; padding: 8px; border: 1px solid #b0c6f3; border-radius: 8px; background: #eaf1ff; font-size: .84rem; }
.city-detail p { font-size: .77rem; margin: 3px 0; }
.city-network-heading { margin: 7px 0 3px; font-size: .77rem; }
.city-networks { list-style: none; padding: 0; margin: 0 0 6px; }
.city-networks li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1px 6px; border-top: 1px solid #d5e0f6; padding: 3px 0; font-size: .77rem; }
.city-networks span { min-width: 0; overflow-wrap: anywhere; }
.city-networks small { font-size: .73rem; white-space: nowrap; }
.map-settings { margin: 6px 6px 0; border-bottom: 1px solid var(--line); padding: 5px 0; font-size: .8rem; }
.map-settings summary { width: fit-content; color: var(--accent); font-weight: 780; }
.playback-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 0 4px; color: var(--muted); }
.playback-bar .button { min-height: 34px; }
.map-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 9px 6px; color: var(--muted); font-size: .73rem; }
.map-footer a { text-underline-offset: 2px; }

.activity-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; padding: 0 17px 17px; }
.activity-group, .other-activity { border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow: clip; }
.group-heading { display: flex; align-items: start; justify-content: space-between; gap: 6px; padding: 13px; background: #f3f6fe; }
#activity-local .group-heading { background: #f0f8f6; }
.group-heading p, .other-activity > p { font-size: .8rem; margin-top: 4px; }
.other-activity { grid-column: 1 / -1; }
.other-activity > summary { display: flex; gap: 10px; align-items: center; list-style: none; padding: 12px 14px; background: #fffaf0; font-size: .92rem; font-weight: 800; }
.other-activity > summary::-webkit-details-marker, .app-row summary::-webkit-details-marker { display: none; }
.other-activity > summary::after { content: "⌄"; margin-left: auto; color: #72542b; }
.other-activity[open] > summary::after { rotate: 180deg; }
.other-activity:not([open]) .other-hide, .other-activity[open] .other-show { display: none; }
.other-activity > p { padding: 7px 14px; }
.other-list { list-style: none; margin: 0; padding: 0 12px 8px; }
.other-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: .82rem; overflow-wrap: anywhere; }
.other-list small { display: block; font-size: .73rem; }
.other-endpoint code { font-size: .77rem; }
.city-filter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 7px 10px; margin: 0 17px 11px; border-radius: 7px; color: #304477; background: var(--accent-soft); font-size: .8rem; }
.app-row { border-top: 1px solid var(--line); padding: 0 12px; }
.app-row summary { list-style: none; padding: 9px 0; display: flex; align-items: center; gap: 8px; }
.app-row summary:hover .app-title strong { color: var(--accent); }
.app-mark { width: 34px; height: 34px; border-radius: 8px; background: #ebf1ff; color: #3156af; display: grid; place-items: center; font-size: .76rem; font-weight: 800; flex: none; }
#activity-local .app-mark { background: #e6f4f0; color: #146454; }
.app-title { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.app-title strong { line-height: 1.2; font-size: .91rem; }
.app-title small, .app-count { font-size: .76rem; }
.app-count { text-align: right; color: var(--muted); white-space: nowrap; }
.chevron { color: var(--muted); flex: none; }
.app-row[open] .chevron { rotate: 180deg; }
.app-body { padding: 0 0 12px; font-size: .84rem; }
.steps { padding: 8px 10px; background: #f4f7fd; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.steps ol { padding-left: 19px; margin: 4px 0; }
.address-list { max-height: 20rem; overflow: auto; list-style: none; padding: 0; margin: 6px 0; }
.address-list li { padding: 7px 1px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.address-list li:last-child { border-bottom: 0; }
.connection-place { display: block; font-weight: 760; }
.connection-hostname { display: block; color: var(--accent); font-size: .82rem; overflow-wrap: anywhere; }
.connection-network { display: block; margin-bottom: 2px; color: var(--muted); font-size: .79rem; }
.connection-address { margin-right: 10px; font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
.activity-source { padding: 0 17px 13px; color: var(--muted); font-size: .73rem; }
.address-list .link-button { font-size: .77rem; }
.empty { padding: 13px; font-size: .84rem; }
.overview-explanation > summary { padding: 12px 18px; font-size: .92rem; font-weight: 800; color: var(--accent); }
#report-explanation { padding: 0 18px 13px; font-size: .86rem; }
#report-explanation > * + * { margin-top: 5px; }
#report-explanation a { display: inline-block; }
.report-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 7px; margin: 0 0 9px; }
.report-highlights > div { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #f7faff; padding: 8px 10px; }
.report-highlights dt { color: var(--muted); font-size: .76rem; font-weight: 700; }
.report-highlights dd { margin: 1px 0 0; font-weight: 680; overflow-wrap: anywhere; }
.report-highlights button { margin-top: 3px; text-align: left; }
.report-example { background: #f0f5ff; border: 1px solid #d5e2fc; border-radius: 9px; padding: 9px 11px; }
.report-example > summary { color: var(--accent); font-weight: 750; }
.report-example[open] > summary { margin-bottom: 7px; }
.report-example label { display: inline-block; font-weight: 750; margin: 0 5px 3px 0; }
.report-example select { min-height: 34px; }
.report-example p { margin-block: 4px; }
.plain-explanation { background: #f0f5ff; border: 1px solid #d5e2fc; border-radius: 12px; margin-top: 12px; padding: 13px; }
.explain-fields { display: grid; gap: 5px; margin: 8px 0 0; font-size: .86rem; }
.explain-fields dt { font-weight: 800; }
.explain-fields dd { margin: -4px 0 4px; color: var(--muted); }
.compact-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#compare-title, #timeline-title { font-size: clamp(1.19rem, 2.1vw, 1.65rem); }
#compare-results:not(:empty) { border-top: 1px solid var(--line); padding: 12px 17px 15px; font-size: .85rem; }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 9px; margin-top: 9px; }
.comparison-side { background: #f6f9ff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.comparison-side[data-change=added] { background: #edf8f5; }
.comparison-side[data-change=removed] { background: #fff7eb; }
.comparison-side h3 { margin-bottom: 5px; font-size: 1rem; }
.comparison-side details { padding-block: 4px; border-top: 1px solid var(--line); }
.comparison-side summary { font-weight: 760; }
.comparison-shared { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 12px; }
.comparison-shared > summary { color: var(--accent); font-weight: 760; }
.comparison-shared p { margin-top: 4px; }
.comparison-windows { margin-top: 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; }
.comparison-windows h3 { margin: 0 0 4px; font-size: .96rem; }
.comparison-windows details { margin-top: 5px; }
.experiment { margin: 0 17px 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #f6f9ff; font-size: .85rem; }
.experiment summary { color: var(--accent); font-weight: 780; }
.experiment ol { margin: 6px 0 9px; padding-left: 20px; }
.experiment p { margin-top: 6px; }
.beginner-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; margin: 12px 0; }
.beginner-options section { background: #f6f9ff; border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.beginner-options p, .beginner-options ol { font-size: .88rem; }
.beginner-options p { margin-top: 4px; }
.beginner-options ol { margin: 7px 0 0; padding-left: 20px; }
.beginner-options li + li { margin-top: 5px; }
.beginner-options a { color: var(--accent); font-weight: 700; }
#beginner { width: min(660px, calc(100% - 24px)); }
.timeline-meta, .timeline-axis { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--muted); font-size: .77rem; }
.timeline-axis span:last-child { text-align: right; }
.timeline-clock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 8px; }
.timeline-clock p, .timeline-clock label { color: var(--muted); font-size: .8rem; }
.timeline-clock select { margin-left: 4px; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 13px; }
.timeline-legend span { display: inline-flex; gap: 5px; align-items: center; }
.timeline-legend span::before { content: ""; height: 9px; width: 9px; border-radius: 2px; background: var(--sent); }
.timeline-legend span + span::before { background: var(--received); }
#timeline-content { margin: 0 17px; }
#timeline-bars { display: grid; grid-template-columns: repeat(var(--interval-count, 1), minmax(0, 1fr)); gap: 2px; min-height: 108px; height: clamp(108px, 15vw, 170px); padding: 2px; margin-block: 5px; border: 1px solid var(--line); border-radius: 7px; background: repeating-linear-gradient(to top, #dce5f1 0 1px, #f8faff 1px 25%); }
#timeline-bars button { display: flex; flex-direction: column; justify-content: end; min-width: 0; padding: 0; border: 0; background: #dce5f131; border-bottom: 2px solid #aebfe0; border-radius: 3px 3px 0 0; }
#timeline-bars button:hover, #timeline-bars button[aria-pressed=true] { background: #d2e0fe; border-bottom-color: var(--accent); }
#timeline-bars button:focus-visible { z-index: 1; outline-offset: -1px; }
.bar-sent, .bar-received { width: 100%; }
.bar-sent { background: var(--sent); }
.bar-received { background: var(--received); }
.timeline-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.timeline-range label { color: var(--muted); font-size: .82rem; font-weight: 760; }
.timeline-range .button { min-height: 39px; }
.timeline-status { padding: 8px 17px 13px; font-size: .82rem; }
.window-notice { margin: 0 17px 10px; padding: 6px 9px; background: var(--accent-soft); border-radius: 7px; color: #2a4175; font-size: .82rem; }
.window-notice.map-window { margin-inline: 5px; }

.notice { color: #70471e; background: #fff5e6; border: 1px solid #eddbbd; border-radius: 9px; padding: 9px 11px; margin: 8px 0; }
dialog { border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; max-height: calc(100% - 26px); width: min(590px, calc(100% - 24px)); padding: clamp(13px, 3vw, 24px); box-shadow: 0 20px 72px #0e255655; }
dialog::backdrop { background: #101b3385; backdrop-filter: blur(3px); }
.modal-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 9px; }
.close { width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.35rem; line-height: 1; }
.drop { padding: 20px 12px; margin: 12px 0; border: 1px dashed #88a5ee; background: #f1f5ff; border-radius: 10px; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .86rem; text-align: center; }
.drop.drag { background: #dfe9ff; border-color: var(--accent); }
.modal-note { font-size: .83rem; }
.modal-note a { color: var(--accent); }
.capture-picker { display: grid; gap: 7px; padding: 11px; margin: 10px 0; background: #f3f6fc; border: 1px solid var(--line); border-radius: 9px; }
.capture-picker label, .guide dt { font-weight: 800; }
.capture-picker .button { justify-self: start; }
.guide { margin: 0; }
.guide dt { margin: 10px 0 3px; }
.guide dd { margin: 0; color: var(--muted); font-size: .89rem; }
.review-list { display: grid; gap: 16px; padding: 0 20px 18px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 9px; margin-top: 7px; }
.review-item { text-align: left; background: #fffaf1; border: 1px solid #eee0c8; color: #594121; border-radius: 9px; padding: 10px; }
.review-item:hover { border-color: #ad8050; }
.review-item strong, .review-item span, .review-item small { display: block; }
.review-item strong { font-size: .9rem; }
.review-item span { font-size: .81rem; margin: 3px 0; }
.review-item small { color: #735326; font-size: .77rem; font-weight: 800; }
.table-toolbar { display: flex; padding: 0 17px 11px; align-items: center; flex-wrap: wrap; gap: 7px; }
.table-toolbar input { flex: 1 1 215px; }
.table-scroll { overflow: auto; margin: 0 13px; border: 1px solid var(--line); border-radius: 9px; scrollbar-color: #8da7d7 #eaf0fa; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .8rem; }
thead { color: #334d7b; background: #edf3fd; }
th, td { padding: 8px 9px; border-bottom: 1px solid #e8eef6; }
tbody tr:nth-child(even) { background: #f8faff; }
td { vertical-align: top; }
td small { display: block; margin-top: 3px; }
th { font-weight: 800; white-space: nowrap; }
.technical-code { font-family: ui-monospace, Consolas, monospace; max-width: 20ch; overflow-wrap: anywhere; }
.record-open { text-align: left; overflow-wrap: anywhere; }
.table-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; padding: 9px 13px 13px; }
.table-nav span { margin-right: auto; color: var(--muted); font-size: .81rem; }
.table-nav .button { min-height: 35px; padding: 5px 9px; }
.flag { display: inline-block; font-size: .74rem; color: #69451e; background: #fbefdb; border-radius: 6px; padding: 2px 7px; font-weight: 770; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-section { margin: 12px 0; }
.detail-section p { font-size: .85rem; margin-top: 3px; }
.detail-section .button { margin-top: 6px; min-height: 35px; }
.detail-kv { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0,1.2fr); gap: 4px 8px; margin: 7px 0; font-size: .83rem; }
.detail-kv dt { font-weight: 760; color: #31486d; }
.detail-kv dd { margin: 0; overflow-wrap: anywhere; }
.detail-section details summary { color: var(--accent); font-weight: 780; font-size: .86rem; }

@media (max-width: 1060px) {
  body { display: block; }
  .top-inner { position: static; min-height: 0; padding: 11px 20px; display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px 14px; }
  .workspace-nav { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 3px; overflow-x: auto; padding-block: 2px; }
  .workspace-nav a { flex: 0 0 auto; min-height: 39px; }
  .rail-bottom { grid-row: 1; grid-column: 2; align-self: center; margin: 0; border: 0; padding: 0; }
  .privacy { display: none; }
}
@media (max-width: 720px) {
  .intro { min-height: 0; flex-wrap: wrap; align-items: start; margin-bottom: 20px; }
  .intro::before { background-image: linear-gradient(90deg, #071522f2 4%, #071522c4 62%, #07152270), url("./packet-banner.jpg"); }
  .map-workspace, .activity-body { grid-template-columns: 1fr; }
  .map-area { height: clamp(265px, 56vw, 395px); }
  .locations { height: auto; max-height: 284px; }
  #city-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-card .card-heading { flex-wrap: wrap; }
  .card-heading { padding: 15px; }
  .activity-body { padding: 0 12px 12px; gap: 10px; }
}
@media (max-width: 470px) {
  main { padding: 11px; }
  .top-inner { padding: 9px 11px; }
  .workspace-nav a { padding-inline: 8px; font-size: .77rem; }
  .workspace-nav .nav-icon { display: none; }
  .intro { border-radius: 14px; }
  .scope-overview, .metrics { gap: 5px; }
  .scope-tile { padding: 7px 6px; }
  .scope-tile small { font-size: .69rem; line-height: 1.25; }
  .scope-arrow { display: none; }
  .metric { padding: 5px 3px; display: block; }
  .metric-dot { margin-bottom: 4px; width: 25px; height: 25px; }
  .metric-label, .metric small { font-size: .69rem; line-height: 1.25; }
  .metric strong { font-size: .96rem; }
  .card-heading { flex-wrap: wrap; }
  .map-card { padding: 0 6px; }
  #city-list { grid-template-columns: 1fr; }
  .other-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .other-list .link-button { grid-column: 2; grid-row: 1 / span 2; }
}
