:root {
  color-scheme: light;
  --ink: #172b45;
  --muted: #78899c;
  --line: #e8edf3;
  --blue: #4777d7;
  --green: #218a74;
  --amber: #a87a32;
  --coral: #c47857;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  color: var(--ink);
  background: #f4f6fa;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #5d85dc; outline-offset: 3px; }
a { text-decoration: none; color: #507abb; }
img { display: block; width: 18px; height: 18px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 214px; padding: 31px 18px 20px; background: #14263f; color: #b5c2d6; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; gap: 11px; align-items: center; color: white; font-size: 21px; font-weight: 650; letter-spacing: -.7px; padding: 0 12px; }
.brand-symbol { display: grid; place-items: center; width: 35px; height: 35px; background: #466de0; border-radius: 11px; box-shadow: 0 4px 12px #0a193644; }
.brand-symbol img { width: 22px; height: 22px; filter: invert(1); }
.sidebar-caption { font-size: 10px; letter-spacing: 1px; color: #7b8fae; padding: 0 14px; margin: 43px 0 13px; }
.main-nav { display: grid; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 0 14px; border-radius: 7px; color: #a3b4cd; font-size: 12px; }
.main-nav img { width: 16px; height: 16px; filter: invert(.8); opacity: .65; }
.main-nav a.current { color: #e8efff; background: #253f64; }
.main-nav a.current img { filter: invert(1); opacity: .95; }
.main-nav a:hover { background: #203956; }
.sidebar-section { display: flex; justify-content: space-between; margin: 34px 14px 13px; color: #7f95b2; font-size: 10px; }
.node-nav { display: grid; gap: 4px; }
.node-nav button { display: flex; align-items: center; gap: 10px; min-height: 39px; width: 100%; padding: 8px 13px; background: transparent; border: 0; border-radius: 6px; color: #a1b3ce; text-align: left; font-size: 11px; }
.node-nav button:not(.active) img { visibility: hidden; }
.node-nav button.active { background: #1e3655; color: #e0eaff; }
.node-nav button:hover { background: #203956; }
.node-nav i { width: 5px; height: 5px; border-radius: 50%; background: #68b9a4; flex: 0 0 auto; }
.node-nav img { margin-left: auto; width: 14px; height: 14px; filter: invert(.8); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin: auto 12px 0; padding-top: 28px; color: #91a6c3; font-size: 10px; }
.sidebar-footer img { filter: invert(.75); opacity: .7; width: 19px; height: 19px; }
.sidebar-footer small { display: block; color: #647c9b; font-size: 9px; margin-top: 3px; }
.app-shell { margin-left: 214px; }
.topbar { height: 72px; background: #fff; border-bottom: 1px solid #e6ebf2; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 11px; color: #8b99aa; }
.breadcrumb img { opacity: .35; width: 13px; height: 13px; }
.breadcrumb strong { color: #485e78; font-weight: 500; }
.mobile-brand { display: none; }
.live-status { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #609586; background: #f0f7f4; border: 1px solid #e5eee9; border-radius: 25px; padding: 5px 10px; }
.live-status i, .mobile-summary i { width: 5px; height: 5px; border-radius: 50%; background: #5aa98f; display: inline-block; }
.live-status.problem { color: #ad8749; background: #fff9ec; }
main { max-width: 1700px; padding: 33px 32px 25px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 27px; gap: 20px; }
h1 { margin: 0; font-size: 29px; font-weight: 650; letter-spacing: -1px; line-height: 1.3; }
h1 span { display: inline-block; font-size: 12px; color: #8290a3; font-weight: 400; letter-spacing: 0; margin-left: 17px; padding-left: 17px; border-left: 1px solid #dce3ec; vertical-align: middle; }
.page-heading p { margin: 8px 0 0; font-size: 11px; color: #8390a1; }
.refresh { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid #dce4ed; border-radius: 7px; font-size: 11px; background: #fff; color: #516884; box-shadow: 0 1px 2px #1d365307; }
.refresh img { width: 14px; height: 14px; opacity: .6; }
.refresh:hover { border-color: #8ca9d6; background: #f9fbff; }
.desktop-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 25px; }
.metric { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid #e7ecf3; border-radius: 10px; box-shadow: 0 3px 6px #243f6002; }
.metric-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 auto; border-radius: 11px; }
.metric-icon.green { background: #edf7f3; }
.metric-icon.blue { background: #edf2ff; }
.metric-icon.violet { background: #f2effb; }
.metric-icon img { width: 19px; height: 19px; opacity: .55; }
.metric label { font-size: 10px; color: #8a99aa; }
.metric p { margin: 6px 0 0; line-height: 1.15; font-family: var(--mono); font-size: 27px; letter-spacing: -.7px; }
.metric small { font-size: 10px; color: #98a4b3; font-family: inherit; margin-left: 7px; letter-spacing: 0; }
.mobile-summary { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 23px; align-items: start; }
.workspace.all-regions { grid-template-columns: minmax(0, 1fr); }
.workspace.all-regions .detail-slot { max-width: none; }
.workspace.all-regions .detail { max-height: 900px; }
.workspace.all-regions .detail-body { max-width: 700px; }
.panel { border: 1px solid #e5eaf1; border-radius: 11px; background: #fff; overflow: hidden; box-shadow: 0 4px 10px #283f5703; }
.comparison-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 21px 22px; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -.2px; margin: 0; }
.comparison-toolbar p { margin: 5px 0 0; color: #94a0af; font-size: 10px; }
.region-tabs { position: relative; display: flex; padding: 3px; gap: 2px; background: #f3f5f9; border-radius: 7px; }
.region-tabs button { position: relative; z-index: 1; border: 0; background: transparent; color: #8b99ab; padding: 6px 12px; border-radius: 5px; font-size: 10px; min-height: 30px; }
.region-tabs button.active { background: transparent; color: #507ac2; font-weight: 550; }
.table-scroll { position: relative; overflow: auto; scrollbar-width: thin; scrollbar-color: #cad5e2 transparent; }
.matrix-table { width: 100%; border-collapse: collapse; text-align: center; }
.matrix-table thead th { font-size: 10px; font-weight: 500; padding: 11px 7px; border-bottom: 1px solid #edf0f5; background: #f9fbfe; color: #7288a4; }
.matrix-table thead tr:first-child th { border-top: 1px solid #edf0f5; }
.matrix-table thead th[colspan] { color: #647d9c; font-size: 11px; }
.matrix-table .node-column { min-width: 145px; width: 145px; text-align: left; padding-left: 21px; position: sticky; left: 0; z-index: 2; background: #f7f9fc; color: #7a8ba2; }
.node-column span { color: #a0adbb; font-size: 9px; }
.matrix-table tbody th { text-align: left; position: sticky; left: 0; z-index: 1; background: #fff; padding: 18px 12px 18px 21px; border-bottom: 1px solid #f0f3f7; min-width: 145px; }
.matrix-table tbody tr.source-selected th { background: #fafcff; }
.node-label { display: block; font-size: 11px; font-weight: 550; color: #3b526f; white-space: nowrap; }
.matrix-table tbody th small { display: block; color: #a3afbd; font-size: 9px; font-weight: 400; margin-top: 5px; }
.matrix-table tbody th i { display: inline-block; width: 4px; height: 4px; background: #77b7a4; border-radius: 50%; margin: 0 5px 2px 0; }
.matrix-table td { border-bottom: 1px solid #f0f3f7; padding: 5px 4px; min-width: 90px; }
.matrix-table tbody tr:last-child td, .matrix-table tbody tr:last-child th { border-bottom: 0; }
.matrix-cell { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; min-height: 70px; width: 100%; border: 0; background: transparent; border-radius: 7px; padding: 11px 5px; }
.matrix-cell:hover { background: #f2f6fd; }
.matrix-cell.selected { background: transparent; }
.cell-number { font-family: var(--mono); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -.6px; }
.cell-annotation { font-size: 9px; color: #94a3b5; white-space: nowrap; }
.speed-fast { color: #378f7c; }
.speed-medium { color: #ab8a4d; }
.speed-slow { color: #c08166; }
.speed-unknown { color: #bdc7d3; }
.matrix-table th.carrier-ct { color: #668bbd; }
.matrix-table th.carrier-cu { color: #a588b5; }
.matrix-table th.carrier-cm { color: #6c9e8b; }
.comparison-footer { padding: 17px 21px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid #edf1f6; font-size: 9px; color: #9ca8b8; }
.latency-legend { display: flex; gap: 14px; }
.latency-legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.latency-legend i { width: 4px; height: 4px; border-radius: 50%; }
.fast { background: #5ba590; }
.medium { background: #baa06c; }
.slow { background: #ca957c; }
.comparison-note { font-size: 10px; color: #99a7b8; background: #fbfcfe; border-top: 1px solid #f0f3f7; padding: 14px 21px; margin: 0; line-height: 1.8; }
.detail-slot { min-width: 0; position: sticky; top: 22px; }
.detail { max-height: calc(100vh - 44px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d5deea transparent; }
.detail-heading { padding: 23px 22px 19px; border-bottom: 1px solid #edf1f7; }
.detail-kicker { color: #91a3b9; font-size: 10px; }
.detail-heading h2 { margin: 8px 0 5px; font-size: 14px; color: #334e72; }
.detail-heading p { margin: 0; font-family: var(--mono); font-size: 9px; color: #98a7ba; }
.trace-state { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; color: #6d9d8b; margin-top: 12px; }
.trace-state i { width: 4px; height: 4px; border-radius: 50%; background: #7eaf9c; }
.trace-state.partial { color: #b99b64; }
.trace-state.partial i { background: #c2ad82; }
.latency-hero { display: flex; align-items: center; justify-content: space-between; padding: 24px 22px 18px; background: linear-gradient(120deg,#fbfdff,#f5f8fe); }
.latency-hero > div > span { font-size: 10px; color: #8a9bb1; }
.latency-hero p { font-family: var(--mono); font-size: 43px; letter-spacing: -2px; font-weight: 500; line-height: 1; margin: 14px 0 0; }
.latency-hero p small { font-size: 12px; margin-left: 7px; letter-spacing: 0; color: #9caac0; }
.protocol { padding: 4px 8px; background: #fff; border: 1px solid #e6edf7; border-radius: 5px; font-family: var(--mono); font-size: 9px; color: #8198b6; align-self: flex-end; margin-bottom: 5px; }
.detail-facts { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 22px 20px; padding: 18px 0; border-bottom: 1px solid #edf2f8; }
.detail-facts > div + div { padding-left: 17px; border-left: 1px solid #edf1f6; }
.detail-facts label { display: block; font-size: 9px; color: #9cabbc; margin-bottom: 8px; }
.detail-facts strong { font-family: var(--mono); font-weight: 500; font-size: 19px; color: #4b6483; }
.detail-facts small { font-size: 10px; color: #a2afc0; }
.attempts { margin: 0 22px 22px; background: #f8fbff; border: 1px solid #e7edf6; border-radius: 6px; overflow: hidden; }
.attempts summary, .hop-section > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: 12px; color: #718aaa; font-size: 10px; }
summary::-webkit-details-marker { display: none; }
.attempts summary small, .hop-section summary small { display: block; font-size: 9px; color: #a1afc1; margin-top: 3px; }
.attempts summary img, .hop-section summary img { width: 13px; height: 13px; opacity: .35; }
.attempts[open] summary img, .hop-section[open] summary img { transform: rotate(90deg); }
.attempt-grid { padding: 0 10px 10px; }
.attempt-item { padding: 10px 3px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e9eef6; gap: 8px; }
.attempt-item code { color: #7590ad; font-size: 10px; }
.attempt-item span:not(.chosen-label) { display: block; color: #a0b0c2; font-size: 9px; margin-top: 4px; }
.chosen-label { background: #ebf5ef; color: #7b9f8b; padding: 3px 5px; border-radius: 4px; font-size: 8px; white-space: nowrap; }
.observed-path { padding: 0 22px 22px; }
.observed-path h3 { margin: 0 0 11px; font-size: 10px; font-weight: 500; color: #8a9bb0; }
.network-chain { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.network-pill { display: flex; flex-direction: column; padding: 6px 9px; background: #f7f9fd; border: 1px solid #e5ecf6; border-radius: 5px; color: #718cad; font-size: 9px; }
.network-pill small { font-size: 8px; color: #a7b4c6; margin-top: 2px; }
.chain-arrow { width: 10px; height: 10px; opacity: .25; }
.subtle { font-size: 10px; color: #9ca9bb; }
.hop-section { border-top: 1px solid #edf1f7; }
.hop-section > summary { padding: 17px 22px; color: #66809f; font-size: 11px; }
.hop-section > summary span { display: flex; align-items: center; gap: 10px; }
.hop-section summary small { display: inline; margin: 0; font-size: 9px; }
.hop-list { list-style: none; padding: 0 20px 10px 22px; margin: 0; }
.hop-list > li { display: flex; position: relative; min-height: 61px; gap: 12px; }
.hop-list > li:not(:last-child)::before { content: ''; position: absolute; top: 24px; bottom: 0; left: 10px; width: 1px; background: #e1e9f3; }
.hop-number { font-family: var(--mono); display: grid; place-items: center; border: 1px solid #e0e8f3; background: #f7faff; color: #8aa0bd; font-size: 9px; border-radius: 50%; width: 21px; height: 21px; flex: 0 0 auto; }
.hop-content { flex: 1; min-width: 0; }
.hop-address { padding-bottom: 17px; }
.hop-address > div { display: flex; justify-content: space-between; align-items: start; gap: 10px; font-size: 10px; }
.hop-address code { font-size: 10px; color: #637f9f; }
.hop-rtt { font-family: var(--mono); font-size: 10px; white-space: nowrap; color: #6d87a5; }
.hop-rtt small { color: #b1bdcc; font-size: 8px; }
.hop-address p { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 5px 0 0; font-size: 8px; color: #9eafc3; }
.hop-address p span { color: #b4bfce; }
.hop-list .missing { min-height: 45px; color: #b6c1cf; }
.hop-list .missing .hop-number { border-color: #edf1f6; color: #c0cad7; background: #fff; }
.hop-list .missing::before { background: repeating-linear-gradient(to bottom,#e5ebf3 0,#e5ebf3 3px,transparent 3px,transparent 6px); }
.detail-note { padding: 15px 22px 18px; border-top: 1px solid #edf1f7; color: #a0afc2; font-size: 9px; line-height: 1.85; margin: 0; }
.method { margin-top: 25px; scroll-margin-top: 22px; }
.method > summary { cursor: pointer; padding: 17px 21px; display: flex; align-items: center; gap: 9px; font-size: 11px; color: #899ab0; list-style: none; }
.method > summary img { opacity: .4; width: 15px; height: 15px; }
.method .disclosure { width: 13px; height: 13px; margin-left: auto; }
.method[open] .disclosure { transform: rotate(90deg); }
.method-content { padding: 0 22px 22px; font-size: 11px; line-height: 1.9; color: #8a9bb0; }
.method-content p { max-width: 900px; margin: 0 0 12px; }
.target-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 20px 0; }
.target-item { padding: 13px 15px; border: 1px solid #e8eef5; border-radius: 6px; background: #fbfcfe; }
.target-item strong { display: block; color: #728ba9; font-size: 11px; font-weight: 500; margin-bottom: 7px; }
.target-item a { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: #95a7be; padding: 3px 0; }
.target-item img { width: 11px; height: 11px; opacity: .25; }
.source-links { display: flex; gap: 20px; font-size: 10px; }
.source-links a { color: #7691b7; }
footer { display: flex; justify-content: space-between; margin-top: 28px; color: #a2aec0; font-size: 9px; }
.error-message { border: 1px solid #e8d9b8; background: #fff9ed; color: #a3844e; padding: 12px 16px; font-size: 12px; border-radius: 7px; margin-bottom: 20px; }
.empty { padding: 40px 22px; color: #a0adbf; font-size: 12px; text-align: center; }
.mobile-cards, .mobile-card-heading, #route-dialog, .detail-back { display: none; }
@media (max-width: 1200px) and (min-width: 761px) {
  .sidebar { width: 184px; padding: 28px 13px 20px; }
  .brand { font-size: 18px; padding-left: 9px; }
  .app-shell { margin-left: 184px; }
  main { padding: 28px 24px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .detail-slot { position: static; }
  .detail { max-height: 800px; }
  .desktop-metrics { gap: 12px; }
  .metric { padding: 17px; }
  h1 span { display: block; margin: 7px 0 0; padding: 0; border: 0; }
}
@media (max-width: 760px) {
  body { background: #f4f6fa; font-size: 14px; }
  .sidebar, .breadcrumb, .desktop-metrics, .desktop-matrix, .detail-slot, .all-region, .comparison-note { display: none; }
  .app-shell { margin: 0; }
  .topbar { height: 65px; padding: 0 20px; background: #fff; }
  .mobile-brand { display: flex; gap: 8px; align-items: center; color: #2a4161; font-size: 15px; font-weight: 650; letter-spacing: -.4px; }
  .mobile-brand img { width: 26px; height: 26px; background: #e7eefc; border-radius: 7px; padding: 4px; }
  .live-status { font-size: 9px; gap: 5px; padding: 5px 8px; }
  main { padding: 26px 18px 23px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 17px; }
  h1 { font-size: 28px; letter-spacing: -.8px; }
  h1 span { display: block; border: 0; margin: 8px 0 0; padding: 0; color: #8f9eb1; font-size: 12px; }
  .page-heading p { display: none; }
  .refresh { min-height: 38px; width: 38px; border: 1px solid #e0e7f1; padding: 10px; margin-top: 3px; }
  .refresh span { display: none; }
  .refresh img { width: 16px; height: 16px; opacity: .55; }
  .mobile-summary { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; font-size: 10px; color: #97a6b9; margin-bottom: 22px; }
  .mobile-summary span:first-child { display: flex; gap: 6px; align-items: center; color: #739c8f; }
  .mobile-summary span:last-child { display: none; }
  .workspace { display: block; }
  .comparison { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  .comparison-toolbar { padding: 0; display: block; position: sticky; top: 0; z-index: 10; background: #f4f6fa; padding-top: 5px; padding-bottom: 18px; }
  .comparison-toolbar > div:first-child { display: none; }
  .region-tabs { width: 100%; padding: 4px; gap: 4px; border: 1px solid #e5eaf3; background: #eaf0f8; border-radius: 10px; }
  .region-tabs button { flex: 1; min-height: 40px; font-size: 13px; padding: 8px 12px; border-radius: 7px; }
  .region-tabs button.active { color: #486db2; font-weight: 550; }
  .mobile-card-heading { display: flex; align-items: center; justify-content: space-between; margin: 1px 2px 14px; }
  .mobile-card-heading h2 { font-size: 13px; color: #526b8b; font-weight: 550; }
  .mobile-card-heading span { font-size: 10px; color: #a0aec0; }
  .mobile-cards { display: grid; gap: 14px; }
  .node-card { background: #fff; border: 1px solid #e3eaf3; border-radius: 12px; box-shadow: 0 3px 9px #28496a03; overflow: hidden; }
  .node-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 17px 0; }
  .node-card-name { display: flex; gap: 9px; align-items: center; }
  .node-card-name img { width: 15px; height: 15px; opacity: .35; }
  .node-card-name h3 { font-size: 14px; font-weight: 550; margin: 0; color: #365477; }
  .node-card-heading > span { display: flex; gap: 5px; align-items: center; color: #91b0a2; font-size: 9px; }
  .node-card-heading > span i { height: 4px; width: 4px; border-radius: 50%; background: #8db49f; }
  .node-carriers { display: grid; grid-template-columns: repeat(3,1fr); padding: 15px 9px 12px; }
  .carrier-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 0; border-radius: 7px; min-height: 99px; width: 100%; padding: 9px 2px 13px; }
  .carrier-cell + .carrier-cell::before { content: ''; position: absolute; left: -1px; top: 17px; bottom: 20px; width: 1px; background: #edf1f7; }
  .carrier-cell.selected { background: #f3f7fe; }
  .carrier-cell:active { background: #eaf1fd; }
  .carrier-name { font-size: 11px; color: #839bb8; }
  .carrier-cu { color: #a394b2; }
  .carrier-cm { color: #7eaa99; }
  .carrier-cell .cell-number { font-size: 25px; font-weight: 500; letter-spacing: -1px; }
  .cell-number small { font-size: 9px; margin-left: 3px; letter-spacing: 0; color: #b2bed0; }
  .carrier-cell .cell-annotation { font-size: 9px; color: #a0aec0; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .cell-chevron { width: 10px; height: 10px; position: absolute; top: 11px; right: 10px; opacity: .17; }
  .node-card-footer { display: flex; justify-content: space-between; font-size: 9px; color: #a7b4c5; border-top: 1px solid #f0f3f8; padding: 9px 17px; background: #fdfdff; }
  .comparison-footer { display: flex; flex-direction: column; align-items: center; padding: 20px 0 0; border: 0; gap: 10px; font-size: 9px; }
  .latency-legend { gap: 17px; }
  .method { margin-top: 22px; background: #fff; }
  .method > summary { font-size: 11px; padding: 17px 16px; min-height: 52px; }
  .method-content { padding: 0 17px 20px; font-size: 11px; }
  .target-list { grid-template-columns: repeat(2,1fr); gap: 9px; }
  .target-item { padding: 10px; }
  .target-item strong { font-size: 10px; }
  .target-item a { font-size: 9px; }
  .source-links { flex-direction: column; gap: 6px; }
  footer { flex-direction: column; gap: 5px; text-align: center; font-size: 9px; margin-top: 25px; }
  #route-dialog[open] { transform-origin: 0 0; will-change: transform, clip-path; display: block; position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; background: #fff; color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
  #route-dialog::backdrop { background: transparent; }
  #route-dialog .detail { display: block; border: 0; border-radius: 0; max-height: none; overflow: visible; box-shadow: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .detail-back { display: flex; gap: 9px; align-items: center; width: 100%; min-height: 60px; padding: 16px 22px; border: 0; border-bottom: 1px solid #edf1f7; background: #fff; color: #627fa5; font-size: 13px; position: sticky; top: 0; z-index: 5; }
  .detail-back img { width: 18px; height: 18px; opacity: .5; }
  .detail-heading { padding: 22px 24px 21px; }
  .detail-kicker { font-size: 11px; }
  .detail-heading h2 { font-size: 17px; margin-top: 11px; }
  .detail-heading p { font-size: 11px; margin-top: 8px; }
  .trace-state { font-size: 10px; }
  .latency-hero { padding: 25px 24px 23px; }
  .latency-hero > div > span { font-size: 11px; }
  .latency-hero p { font-size: 52px; }
  .latency-hero p small { font-size: 13px; }
  .protocol { font-size: 10px; padding: 5px 9px; }
  .detail-facts { margin: 0 24px 23px; padding: 23px 0; }
  .detail-facts label { font-size: 10px; }
  .detail-facts strong { font-size: 21px; }
  .detail-facts small { font-size: 11px; }
  .attempts { margin: 0 24px 25px; border-radius: 8px; }
  .attempts summary { padding: 14px; font-size: 12px; min-height: 61px; }
  .attempts summary small { font-size: 10px; }
  .attempt-item { padding: 12px 4px; }
  .attempt-item code { font-size: 12px; }
  .attempt-item span:not(.chosen-label) { font-size: 10px; }
  .chosen-label { font-size: 9px; }
  .observed-path { padding: 0 24px 26px; }
  .observed-path h3 { font-size: 11px; margin-bottom: 12px; }
  .network-pill { font-size: 10px; padding: 8px 10px; }
  .network-pill small { font-size: 9px; }
  .hop-section > summary { padding: 20px 24px; font-size: 13px; }
  .hop-section summary small { font-size: 10px; }
  .hop-list { padding: 0 24px 12px; }
  .hop-list > li { gap: 14px; min-height: 70px; }
  .hop-number { width: 25px; height: 25px; font-size: 10px; }
  .hop-list > li:not(:last-child)::before { left: 12px; top: 28px; }
  .hop-address { padding-bottom: 20px; }
  .hop-address code, .hop-rtt { font-size: 12px; }
  .hop-rtt small { font-size: 9px; }
  .hop-address p { margin-top: 6px; font-size: 10px; line-height: 1.6; }
  .hop-address > div { font-size: 12px; }
  .detail-note { padding: 20px 24px; font-size: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background .2s, box-shadow .2s, color .2s, transform .2s; }
  .matrix-cell:active, .carrier-cell:active, .refresh:active { transform: scale(.98); }
  .refreshing img { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .region-indicator, .matrix-cursor { transition: none !important; }
}

.region-indicator { position: absolute; top: 3px; bottom: 3px; left: 0; background: #fff; border-radius: 5px; box-shadow: 0 1px 4px #203d5e0c; pointer-events: none; transition: transform .42s cubic-bezier(.65,0,.35,1), width .42s cubic-bezier(.65,0,.35,1); }
.matrix-cursor { position: absolute; top: 0; left: 0; border: 1px solid #bfd1ee; border-radius: 7px; background: #edf3ff; pointer-events: none; z-index: 0; transition: transform .42s cubic-bezier(.65,0,.35,1), width .42s, height .42s; }
@media (max-width: 760px) { .region-indicator { top: 4px; bottom: 4px; border-radius: 7px; } .matrix-cursor { display: none; } }
@media (max-width: 360px) {
  .node-carriers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carrier-cell { min-width: 0; }
  .carrier-cell .cell-number { font-size: 22px; }
  .carrier-cell .cell-annotation { max-width: 78px; }
}
