178 lines
8.4 KiB
CSS
178 lines
8.4 KiB
CSS
:root {
|
|
--bg: #f4f5f7;
|
|
--card: #ffffff;
|
|
--text: #1c2430;
|
|
--muted: #6b7686;
|
|
--line: #d3d9e1;
|
|
--down: #98a2b3;
|
|
--panel: rgba(255, 255, 255, 0.92);
|
|
--warn: #c67a08;
|
|
--crit: #d64545;
|
|
--n0: #2f6fdb;
|
|
--n1: #0e8a8a;
|
|
--n2: #7a4fd0;
|
|
--n3: #c03a8e;
|
|
--n4: #9a6510;
|
|
--n5: #4b8a2c;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg: #12161c;
|
|
--card: #1b2129;
|
|
--text: #e6eaf0;
|
|
--muted: #93a0b3;
|
|
--line: #313a47;
|
|
--down: #6b7686;
|
|
--panel: rgba(27, 33, 41, 0.92);
|
|
--warn: #ffb04a;
|
|
--crit: #ff6b6b;
|
|
--n0: #6c9cff;
|
|
--n1: #3cc7c7;
|
|
--n2: #ab8cff;
|
|
--n3: #ff7cc8;
|
|
--n4: #e0b04a;
|
|
--n5: #8fd06a;
|
|
}
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body { height: 100%; }
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100dvh;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 15px/1.45 system-ui, sans-serif;
|
|
}
|
|
|
|
[hidden] { display: none !important; }
|
|
|
|
::selection { background: color-mix(in srgb, var(--n0) 35%, transparent); }
|
|
|
|
header { padding: 0 16px 6px; }
|
|
|
|
h1 { margin: 10px 0 0; font-size: 22px; }
|
|
.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
|
|
p { margin: 4px 0; }
|
|
.summary { color: var(--muted); }
|
|
.muted { color: var(--muted); font-size: 13px; }
|
|
.error { color: var(--crit); font-weight: 600; }
|
|
|
|
.alerts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
|
.alerts:empty { display: none; }
|
|
.alert { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1.5px solid; }
|
|
.alert.bad { color: var(--crit); border-color: var(--crit); }
|
|
.alert.warn { color: var(--warn); border-color: var(--warn); }
|
|
.alert.info { color: var(--muted); border-color: var(--line); }
|
|
|
|
.route-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; font-size: 14px; }
|
|
.route-line:empty { display: none; }
|
|
.route-line .hint { font-size: 12.5px; }
|
|
.route { padding: 1px 9px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; }
|
|
.route.direct { border-color: var(--muted); }
|
|
.route.via { border-color: var(--net); background: color-mix(in srgb, var(--net) 16%, transparent); }
|
|
.route.none { border-color: var(--muted); border-style: dashed; color: var(--muted); }
|
|
.route.unknown { color: var(--muted); border-style: dashed; }
|
|
|
|
|
|
#stage { position: relative; flex: 1; min-height: 260px; overflow: hidden; border-top: 1px solid var(--line); background: var(--bg); }
|
|
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
|
|
#map:active { cursor: grabbing; }
|
|
#map:focus { outline: none; }
|
|
#world { transform-origin: 0 0; }
|
|
|
|
.n0 { --net: var(--n0); }
|
|
.n1 { --net: var(--n1); }
|
|
.n2 { --net: var(--n2); }
|
|
.n3 { --net: var(--n3); }
|
|
.n4 { --net: var(--n4); }
|
|
.n5 { --net: var(--n5); }
|
|
|
|
.region { transition: opacity 0.2s; }
|
|
.region-box { fill: color-mix(in srgb, var(--net) 9%, var(--bg)); stroke: var(--net); stroke-width: 2; vector-effect: non-scaling-stroke; }
|
|
.region.selected .region-box { stroke-width: 3.5; }
|
|
.region.dim { opacity: 0.4; }
|
|
.region-grab { fill: transparent; cursor: move; }
|
|
.region-dot { fill: var(--net); pointer-events: none; }
|
|
.region-title { fill: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
|
|
.region-count { fill: var(--muted); font-size: 11.5px; font-weight: 400; }
|
|
|
|
.spoke { fill: none; stroke: var(--net); stroke-width: 2.5; opacity: 0.45; vector-effect: non-scaling-stroke; }
|
|
.spoke.hidden { opacity: 0; }
|
|
.spoke.lit { opacity: 0.95; stroke-width: 3.5; }
|
|
.spoke-end { fill: var(--net); opacity: 0.6; }
|
|
.spoke-end.used { opacity: 1; }
|
|
.flow { fill: none; stroke: var(--net); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
|
|
.arrow path { fill: var(--net); }
|
|
|
|
.node { cursor: pointer; outline: none; }
|
|
.disc { fill: var(--card); stroke: var(--net); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
|
|
.dot { fill: var(--net); }
|
|
.halo { fill: none; stroke: none; }
|
|
.node.down { opacity: 0.65; }
|
|
.node.down .disc { stroke-dasharray: 4 3; }
|
|
.node.down .dot { fill: var(--down); }
|
|
.node.gateway .disc { stroke-width: 4; }
|
|
.node.none .halo, .node.unknown .halo { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
|
|
.node.reached .halo { stroke: var(--net); stroke-width: 2; }
|
|
.node:hover .halo { stroke: var(--muted); stroke-dasharray: none; }
|
|
.node.origin .halo, .node.selected .halo { stroke: var(--text); stroke-width: 2.5; stroke-dasharray: none; }
|
|
.node:focus-visible .halo { stroke: var(--text); stroke-width: 3.5; stroke-dasharray: none; }
|
|
.node.dragging { cursor: grabbing; opacity: 0.85; }
|
|
.node.dim { opacity: 0.35; }
|
|
|
|
.l-name, .l-roles, .l-caption { paint-order: stroke; stroke: color-mix(in srgb, var(--net) 9%, var(--bg)); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
|
|
.l-name { fill: var(--text); font-size: 13px; font-weight: 600; }
|
|
.l-roles { fill: var(--muted); font-size: 11px; }
|
|
.l-caption { fill: var(--net); font-size: 11px; font-weight: 600; }
|
|
.node.none .l-caption, .node.unknown .l-caption { fill: var(--muted); }
|
|
|
|
/* Level of detail: one class on the root, decided by the zoom. */
|
|
.lod0 .l-name, .lod0 .l-roles, .lod0 .l-caption { display: none; }
|
|
.lod0 .region-title { font-size: 38px; }
|
|
.lod0 .region-count { font-size: 24px; }
|
|
.lod0 .region-dot { r: 12px; }
|
|
.lod1 .l-roles { display: none; }
|
|
.lod0 .node.full .l-name, .lod0 .node.full .l-roles, .lod0 .node.full .l-caption, .lod1 .node.full .l-roles { display: inline; }
|
|
.lod0 .l-caption { display: none; }
|
|
|
|
.flow { stroke-dasharray: none; }
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.flow { stroke-dasharray: 9 7; animation: flow 0.9s linear infinite; }
|
|
.node { transition: transform 0.25s ease-out; }
|
|
.node.dragging { transition: none; }
|
|
.region { transition: opacity 0.2s, transform 0.25s ease-out; }
|
|
}
|
|
@keyframes flow { to { stroke-dashoffset: -16; } }
|
|
|
|
.controls { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; align-items: center; }
|
|
.controls button, .legend-open, .legend > button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
|
|
.controls button.text { padding: 0 12px; font-size: 13px; }
|
|
.controls button:hover, .legend-open:hover, .legend > button:hover { border-color: var(--muted); }
|
|
.controls button:focus-visible, .legend-open:focus-visible, .legend > button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
|
|
.controls button.on svg { stroke: var(--n0); }
|
|
.controls svg, .legend > button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
@media (pointer: coarse) { .controls button, .legend-open, .legend > button { min-width: 44px; height: 44px; } }
|
|
|
|
.legend { position: absolute; left: 12px; bottom: 12px; max-width: min(360px, calc(100% - 24px)); padding: 10px 12px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 12.5px; color: var(--muted); }
|
|
.legend > button { position: absolute; top: 4px; right: 4px; min-width: 28px; height: 28px; border: 0; background: transparent; }
|
|
.legend ul { list-style: none; margin: 0 24px 6px 0; padding: 0; display: grid; gap: 3px; }
|
|
.legend p { margin: 0; }
|
|
.legend-open { position: absolute; left: 12px; bottom: 12px; font-weight: 700; }
|
|
.stamp { position: absolute; left: 14px; top: 8px; margin: 0; pointer-events: none; }
|
|
|
|
.swatch { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }
|
|
.swatch.network { border-radius: 4px; background: color-mix(in srgb, var(--n0) 14%, transparent); border: 2px solid var(--n0); }
|
|
.swatch.node { background: var(--card); border: 2.5px solid var(--n1); }
|
|
.swatch.gateway { width: 14px; height: 14px; border-radius: 4px; background: var(--card); border: 4px solid var(--n2); vertical-align: -2px; }
|
|
.swatch.flow { width: 20px; height: 0; border-radius: 0; border: 0; border-top: 3.5px dashed var(--text); vertical-align: 3px; }
|
|
.swatch.none { background: transparent; border: 2px dashed var(--muted); }
|
|
|
|
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|