/* src/scripts/probe-detail-v2/style.css */
:root {
  --page:#f3f5f9;
  --surface:#fff;
  --soft:#f6f7fa;
  --soft-2:#eef1f6;
  --text:#1d2433;
  --text-2:#465065;
  --muted:#667086;
  --border:#e3e7ee;
  --border-strong:#cfd6e1;
  --grid:#eceff4;
  --accent:#2337ff;
  --accent-soft:#eef0ff;
  --accent-tint:rgba(35,55,255,.10);
  --on-accent:#fff;
  --intl:#0e8fa6;
  --green:#23a55a;
  --red:#dc4343;
  --warn:#b7791f;
  --missing:#e6e9ef;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 6px 24px rgba(16,24,40,.05);
  --shadow-pop:0 12px 32px rgba(16,24,40,.16);
  --series-1:#2a78d6;
  --series-2:#eb6834;
  --series-3:#1baf7a;
  --series-4:#eda100;
  --series-5:#e87ba4;
  --series-6:#008300;
  --series-7:#6250d6;
  --series-8:#e34948;
  --series-9:#0e8fa6;
  --radius:12px;
  --control-h:36px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: weight;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.dark {
  --page:#1a1b23;
  --surface:#252632;
  --soft:#2c2e3c;
  --soft-2:#313444;
  --text:#e2e3ec;
  --text-2:#c3c7d6;
  --muted:#a0a9bd;
  --border:#3a3d4c;
  --border-strong:#4a4e60;
  --grid:#353847;
  --accent:#6b7eff;
  --accent-soft:#30364f;
  --accent-tint:rgba(107,126,255,.16);
  --on-accent:#11152b;
  --intl:#3fb6cc;
  --green:#34b46e;
  --red:#f06b6b;
  --warn:#e9bf66;
  --missing:#3a3d4c;
  --shadow:none;
  --shadow-pop:0 14px 36px rgba(0,0,0,.45);
  --series-1:#3987e5;
  --series-2:#d95926;
  --series-3:#199e70;
  --series-4:#c98500;
  --series-5:#d55181;
  --series-6:#008300;
  --series-7:#9085e9;
  --series-8:#e66767;
  --series-9:#1f97ad;
  color: var(--text);
  background: var(--page);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.dark):not(.light) {
    --page:#1a1b23;
    --surface:#252632;
    --soft:#2c2e3c;
    --soft-2:#313444;
    --text:#e2e3ec;
    --text-2:#c3c7d6;
    --muted:#a0a9bd;
    --border:#3a3d4c;
    --border-strong:#4a4e60;
    --grid:#353847;
    --accent:#6b7eff;
    --accent-soft:#30364f;
    --accent-tint:rgba(107,126,255,.16);
    --on-accent:#11152b;
    --green:#34b46e;
    --red:#f06b6b;
    --missing:#3a3d4c;
    --shadow:none;
    color-scheme: dark;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
label {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a {
  color: inherit;
  text-decoration: none;
}
label {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  margin: 0;
}
h2 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}
h3 {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
input[type=checkbox] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  cursor: inherit;
}
main {
  max-width: 1240px;
  margin: 32px auto;
  padding: 0 24px;
}
.detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: clip;
  overflow-clip-margin: 24px;
}
.detail-header {
  padding: 28px 32px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.identity {
  min-width: 0;
}
.eyebrow {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}
.online:empty {
  display: none;
}
.online::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.online.offline {
  color: var(--muted);
  background: var(--soft);
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tags:empty {
  display: none;
}
.tag {
  font-size: 12px;
  line-height: 22px;
  background: var(--soft);
  color: var(--text-2);
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.result-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 13px;
  max-width: 560px;
}
.result-links > a,
.result-links > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: nowrap;
  background: var(--surface);
}
.result-links > a {
  color: var(--text);
  font-weight: 550;
}
.result-links > a::after {
  content: "\2197";
  color: var(--muted);
  font-size: 12px;
}
.result-links > a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.result-links > a:hover::after {
  color: var(--accent);
}
.result-links > span {
  color: var(--muted);
  background: var(--soft);
  border-style: dashed;
  opacity: .75;
  cursor: default;
}
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
}
.tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs > button[role=tab] {
  position: relative;
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
}
.tabs > button[role=tab]:hover {
  color: var(--text);
}
.tabs > button[role=tab]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}
.tabs > button[role=tab][aria-selected=true] {
  color: var(--accent);
  font-weight: 650;
}
.tabs > button[role=tab][aria-selected=true]::after {
  background: var(--accent);
}
.tabs > button[role=tab]:focus-visible {
  outline-offset: -4px;
  border-radius: 8px;
}
.sync {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.latency {
  padding: 28px 32px 24px;
  --section-color:var(--accent);
}
.international-latency {
  --section-color:var(--intl);
  border-top: 8px solid var(--soft);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.latency-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}
.latency-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--section-color);
  flex-shrink: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 10px;
  margin-bottom: 22px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filters {
  min-width: 0;
  flex: 1 1 auto;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.region-control {
  position: relative;
}
.region-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.region-toggle:hover:not(:disabled) {
  border-color: var(--accent);
}
.region-toggle[aria-expanded=true] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.region-toggle .toggle-count {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.region-toggle > [aria-hidden=true] {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  font-size: 0;
  line-height: 0;
  flex: 0 0 12px;
  transition: transform .15s;
}
.region-toggle > [aria-hidden=true]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.region-toggle[aria-expanded=true] > [aria-hidden=true] {
  transform: rotate(180deg);
}
.region-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 360px;
  max-width: calc(100vw - 48px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 12px;
}
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  font-weight: 650;
  padding: 2px 4px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.menu-header small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.menu-header > span:last-child {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.region-options,
.pool-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  max-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
}
.line-options {
  max-height: 320px;
  overflow: auto;
  overscroll-behavior: contain;
}
.line-options fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}
.line-options fieldset:last-child {
  margin-bottom: 0;
}
.line-options legend {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 4px 4px;
}
.region-options label,
.pool-options label,
.line-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.region-options label:hover,
.pool-options label:hover,
.line-options label:hover {
  background: var(--soft);
}
.region-options label:has(:checked),
.pool-options label:has(:checked),
.line-options label:has(:checked) {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}
.region-options label:has(:disabled:not(:checked)),
.pool-options label:has(:disabled:not(:checked)),
.line-options label:has(:disabled:not(:checked)) {
  opacity: .45;
  cursor: not-allowed;
}
.region-options label:has(:checked:disabled),
.pool-options label:has(:checked:disabled),
.line-options label:has(:checked:disabled) {
  cursor: not-allowed;
}
.chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.carriers label,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--text-2);
  user-select: none;
}
.carriers label:hover:not(:has(:disabled)),
.chip:hover:not(:has(:disabled)) {
  border-color: var(--accent);
}
.carriers label:has(:checked),
.chip:has(:checked) {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--accent-soft);
}
.carriers label:has(:disabled),
.chip:has(:disabled) {
  opacity: .45;
  cursor: not-allowed;
}
.carriers label:has(:focus-visible),
.chip:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.filter-separator {
  width: 1px;
  height: 20px;
  background: var(--border-strong);
  margin: 0 2px;
}
.selected-pools {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 550;
  padding: 0 4px;
  overflow-wrap: anywhere;
}
.selected-pools:empty {
  display: none;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--soft-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.segmented button {
  flex: 1 1 0;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.segmented button:hover:not([aria-pressed=true]):not(:disabled) {
  color: var(--text);
}
.segmented button[aria-pressed=true] {
  background: var(--surface);
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}
.dark .segmented button[aria-pressed=true] {
  background: var(--accent-soft);
  box-shadow: none;
}
.chart-card {
  min-width: 0;
}
.chart-heading,
.quality-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
}
.legend {
  display: flex;
  gap: 6px 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
  justify-content: flex-end;
  min-width: 0;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.legend-item i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}
.legend-item.has-error {
  color: var(--red);
}
.chart-wrap {
  position: relative;
  margin-top: 8px;
}
.latency-chart {
  height: 340px;
  width: 100%;
}
.chart-message {
  position: absolute;
  inset: 30px 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-radius: 8px;
}
body.loading #chart-message::before,
.latency[aria-busy=true] .chart-message::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--section-color);
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.loading #chart-message::before,
  .latency[aria-busy=true] .chart-message::before {
    animation: none;
  }
}
.quality-card {
  margin-top: 20px;
  padding: 16px 18px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.quality-heading {
  margin-bottom: 12px;
}
.quality-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.quality-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quality-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.good {
  background: var(--green);
}
.bad {
  background: var(--red);
}
.missing {
  background: var(--missing);
}
.quality-columns,
.quality-row,
.quality-axis {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 84px 100px;
  column-gap: 0;
  align-items: center;
}
.quality-columns {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.quality-columns > span:nth-child(n+3) {
  text-align: right;
}
.quality-row {
  min-height: 40px;
  font-size: 13px;
  border-bottom: 1px solid var(--grid);
}
.quality-row:last-child {
  border-bottom: 0;
}
.quality-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 12px;
  color: var(--text);
}
.quality-name > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.quality-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quality-error {
  font-style: normal;
  font-size: 11px;
  color: var(--red);
  white-space: nowrap;
  flex-shrink: 0;
}
.quality-row canvas {
  height: 12px;
  width: 100%;
  display: block;
  border-radius: 3px;
  cursor: crosshair;
  touch-action: pan-y;
}
.metric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 550;
  white-space: nowrap;
}
.metric.loss {
  color: var(--red);
}
.metric small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
  font-weight: 400;
}
.quality-axis {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.quality-times {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.quality-rows:empty {
  min-height: 0;
}
.chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.load-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.load-status.error {
  color: var(--red);
}
.tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 40;
  max-width: min(320px, calc(100vw - 16px));
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  line-height: 1.6;
}
.tt-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.tt-time > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.75;
}
.tt-row > i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.tt-name {
  flex: 1;
  min-width: 0;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-row > b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: 12px;
}
.chart-tooltip .tt {
  padding: 10px 12px;
  min-width: 180px;
}
.panel-status {
  font-size: 13px;
  color: var(--muted);
  padding: 14px 16px;
  margin-bottom: 18px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.panel-status.is-error {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--red) 30%, var(--border));
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background:
    linear-gradient(
      to left,
      var(--surface) 30%,
      transparent) right center/36px 100% no-repeat local,
    radial-gradient(
      farthest-side at 100% 50%,
      rgba(16, 24, 40, .16),
      transparent) right center/14px 100% no-repeat scroll;
}
.dark .table-scroll {
  background:
    linear-gradient(
      to left,
      var(--surface) 30%,
      transparent) right center/36px 100% no-repeat local,
    radial-gradient(
      farthest-side at 100% 50%,
      rgba(0, 0, 0, .5),
      transparent) right center/14px 100% no-repeat scroll;
}
.icon-button {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.icon-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
html.probe-detail-embed,
html.probe-detail-embed body {
  background: transparent;
}
html.probe-detail-embed main {
  max-width: none;
  margin: 0;
  padding: 0;
}
html.probe-detail-embed .detail-header {
  padding-right: 72px;
}
html.probe-latency-embed,
html.probe-latency-embed body {
  background: transparent;
}
html.probe-latency-embed main {
  max-width: none;
  margin: 0;
  padding: 0;
}
html.probe-latency-embed .detail {
  box-shadow: none;
  border-radius: 14px;
}
html.probe-latency-embed .detail-header,
html.probe-latency-embed .tabs-bar,
html.probe-latency-embed #panel-ip-quality,
html.probe-latency-embed #panel-performance,
html.probe-latency-embed #panel-routing {
  display: none !important;
}
html.probe-latency-embed #panel-latency {
  display: block;
}
html.probe-latency-embed .latency {
  padding: 22px 22px 18px;
}
@media (max-width: 1024px) {
  main {
    margin: 20px auto;
    padding: 0 16px;
  }
  .detail-header {
    flex-direction: column;
    gap: 16px;
  }
  .result-links {
    justify-content: flex-start;
    max-width: none;
  }
  .latency-chart {
    height: 310px;
  }
}
@media (max-width: 860px) {
  .quality-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .quality-columns {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .quality-columns > span:nth-child(1) {
    flex: 0 0 auto;
  }
  .quality-columns > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 400;
  }
  .quality-columns > span:nth-child(3) {
    width: 64px;
    flex: 0 0 64px;
  }
  .quality-columns > span:nth-child(4) {
    width: 76px;
    flex: 0 0 76px;
  }
  .quality-row {
    grid-template-columns: minmax(0, 1fr) 64px 76px;
    grid-template-rows: auto 12px;
    row-gap: 7px;
    padding: 9px 0 11px;
    min-height: 0;
  }
  .quality-name {
    grid-row: 1;
    grid-column: 1;
  }
  .quality-row canvas {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .quality-row > .metric:nth-child(3) {
    grid-row: 1;
    grid-column: 2;
  }
  .quality-row > .metric:nth-child(4) {
    grid-row: 1;
    grid-column: 3;
  }
  .quality-axis {
    display: block;
    margin-top: 4px;
  }
  .quality-axis > span {
    display: none;
  }
  .quality-name {
    align-items: flex-start;
  }
  .quality-name > i {
    margin-top: 6px;
  }
  .quality-name > span {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
}
@media (max-width: 760px) {
  :root {
    --control-h:44px;
  }
  main {
    margin: 0 auto;
    padding: 0;
  }
  .detail {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .detail-header {
    padding: 20px 16px 16px;
    gap: 14px;
  }
  h1 {
    font-size: 22px;
  }
  .result-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    width: 100%;
    gap: 8px;
  }
  .result-links > a,
  .result-links > span {
    min-height: 44px;
    padding: 0 10px;
  }
  .tabs-bar {
    padding: 0 6px 0 4px;
    gap: 8px;
  }
  .tabs {
    gap: 0;
  }
  .tabs > button[role=tab] {
    min-height: 48px;
    padding: 0 12px;
    font-size: 14px;
  }
  .sync {
    font-size: 11px;
  }
  .latency {
    padding: 20px 16px 18px;
  }
  .international-latency {
    border-top-width: 6px;
  }
  .latency-section-title {
    font-size: 16px;
  }
  .section-head {
    margin-bottom: 12px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 8px;
    margin-bottom: 18px;
  }
  .filter-row {
    gap: 6px;
  }
  .region-control {
    position: static;
  }
  .region-toggle {
    padding: 0 12px;
  }
  .region-menu {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    top: calc(100% + 6px);
  }
  .region-options,
  .pool-options {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }
  .region-options label,
  .pool-options label,
  .line-options label {
    min-height: 44px;
  }
  .line-options fieldset {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .carriers label,
  .chip {
    padding: 0 11px;
  }
  .filter-row > .region-control,
  .filter-row > .carriers,
  .filter-row > .edu-label {
    flex: 1 1 auto;
  }
  .region-toggle {
    width: 100%;
  }
  .carriers label {
    flex: 1 1 0;
    justify-content: center;
  }
  .edu-label {
    justify-content: center;
  }
  .filter-separator {
    display: none;
  }
  .toolbar-right {
    margin-left: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .segmented {
    display: flex;
    width: 100%;
  }
  .segmented button {
    min-height: 36px;
    padding: 0 8px;
  }
  .selected-pools {
    flex-basis: 100%;
    padding: 2px 4px 0;
    font-size: 12px;
  }
  .chart-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .legend {
    justify-content: flex-start;
    gap: 6px 12px;
  }
  .latency-chart {
    height: 280px;
  }
  .chart-message {
    inset: 30px 0 60px;
  }
  .quality-card {
    margin-top: 16px;
    padding: 12px 12px 10px;
  }
  html.probe-detail-embed .detail {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  html.probe-detail-embed .detail-header {
    padding-top: calc(env(safe-area-inset-top) + 22px);
  }
  html.probe-latency-embed .detail {
    border-radius: 12px;
    border: 1px solid var(--border);
  }
  html.probe-latency-embed .latency {
    padding: 16px 12px 14px;
  }
}
@media (max-width: 380px) {
  .latency {
    padding: 18px 12px 16px;
  }
  html.probe-latency-embed .latency {
    padding: 14px 10px 12px;
  }
  .detail-header {
    padding: 18px 12px 14px;
  }
  .result-links {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }
  .carriers label,
  .chip {
    padding: 0 9px;
    gap: 6px;
  }
  .quality-card {
    padding: 10px 10px 8px;
  }
  .quality-row {
    grid-template-columns: minmax(0, 1fr) 58px 68px;
  }
  .quality-columns > span:nth-child(3) {
    width: 58px;
    flex-basis: 58px;
  }
  .quality-columns > span:nth-child(4) {
    width: 68px;
    flex-basis: 68px;
  }
  .quality-row,
  .metric {
    font-size: 12px;
  }
  .latency-chart {
    height: 260px;
  }
}

/* src/scripts/probe-detail-v2/performance.css */
.performance {
  padding: 24px 32px 28px;
}
.cpu-overview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.metric-label {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
#cpu-model {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  min-width: 0;
}
.cpu-cores {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
}
.cpu-cores strong {
  font-size: 18px;
  color: var(--text);
  font-weight: 650;
  margin-right: 3px;
  font-variant-numeric: tabular-nums;
}
.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.benchmark-section {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.benchmark-section[data-tool=gb5] {
  grid-column: 1/-1;
}
.benchmark-grid:not(:has(> [data-tool=ecs])) > [data-tool=gb6],
.benchmark-grid:not(:has(> [data-tool=gb6])) > [data-tool=ecs] {
  grid-column: 1/-1;
}
.benchmark-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.benchmark-heading h2,
.performance-section-heading h2 {
  font-size: 15px;
  font-weight: 650;
}
.test-threads {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.benchmark-latest {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 16px 20px;
  margin: 16px 0 0;
}
.benchmark-section:not([data-tool=gb5]) .benchmark-latest {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.benchmark-number {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.benchmark-number > span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.benchmark-number strong {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.benchmark-subscore {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.benchmark-subscore > span:first-child {
  grid-column: 1/-1;
}
.benchmark-subscore-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.benchmark-subscore-value small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.benchmark-subscore-value strong {
  font-size: 18px;
}
.gb5-single {
  margin-top: 14px;
}
.gb5-single-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.gb5-single-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.gb5-single-heading strong {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gb5-score-bar {
  position: relative;
  height: 10px;
  background: var(--soft-2);
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}
.gb5-score-fill {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      #dc545b 0%,
      #e8bb42 50%,
      #32ad7c 100%);
  clip-path: inset(0 calc(100% - var(--score-percent)) 0 0);
}
.gb5-reference {
  position: relative;
  height: 12px;
  border-radius: 0 0 5px 5px;
  background:
    linear-gradient(
      90deg,
      #dc545b 0%,
      #e8bb42 50%,
      #32ad7c 100%);
  opacity: .55;
}
.gb5-reference:hover,
.gb5-reference:focus-within {
  opacity: 1;
}
.gb5-reference-marker {
  position: absolute;
  top: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: help;
  outline-offset: 2px;
}
.gb5-reference-marker::before {
  content: "";
  position: absolute;
  inset: -10px -8px;
}
.gb5-reference-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #10131a;
}
.gb5-reference-tooltip {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 0;
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
  z-index: 5;
  overflow-wrap: anywhere;
}
.gb5-reference-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.performance-section {
  margin-top: 16px;
  padding: 18px 20px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.performance-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.section-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.performance-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.performance-table th,
.performance-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--grid);
  font-size: 13px;
  white-space: nowrap;
}
.performance-table thead th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--border);
}
.performance-table th:first-child {
  text-align: left;
  padding-left: 0;
  position: sticky;
  left: 0;
  background: var(--surface);
}
.performance-table th:last-child,
.performance-table td:last-child {
  padding-right: 0;
}
.performance-table tbody th {
  font-weight: 650;
}
.performance-table tbody tr:last-child > * {
  border-bottom: 0;
}
.quantity {
  white-space: nowrap;
  font-weight: 550;
}
.quantity small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 400;
}
.fio-table {
  min-width: 480px;
}
@media (max-width: 1050px) {
  .benchmark-latest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .performance {
    padding: 18px 16px 22px;
  }
  .cpu-overview {
    padding: 14px;
    gap: 8px 10px;
  }
  #cpu-model {
    font-size: 17px;
    flex-basis: 100%;
  }
  .cpu-cores {
    margin-left: 0;
  }
  .benchmark-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .benchmark-section {
    padding: 16px 14px;
  }
  .benchmark-latest {
    gap: 14px 12px;
  }
  .benchmark-number strong {
    font-size: 20px;
  }
  .benchmark-subscore-value {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .performance-section {
    padding: 16px 14px 6px;
    margin-top: 12px;
  }
  .performance-table th,
  .performance-table td {
    padding: 10px 10px;
  }
}
@media (max-width: 380px) {
  .performance {
    padding: 16px 12px 20px;
  }
}

/* src/scripts/probe-detail-v2/routing.css */
.routing {
  padding: 24px 32px 28px;
}
.route-tool-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--soft-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  width: fit-content;
  max-width: 100%;
}
.route-tool-tabs::-webkit-scrollbar {
  display: none;
}
.route-tool-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.route-tool-tabs button:hover:not(:disabled):not([aria-pressed=true]) {
  color: var(--text);
}
.route-tool-tabs button[aria-pressed=true] {
  background: var(--surface);
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}
.dark .route-tool-tabs button[aria-pressed=true] {
  background: var(--accent-soft);
  box-shadow: none;
}
.route-form {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--soft);
}
.route-target-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.route-target {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.route-target > span,
.route-param > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.route-target input,
.route-param input:not([type=checkbox]) {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  min-height: 40px;
  min-width: 0;
  outline-offset: 1px;
}
.route-target input {
  width: 100%;
  font-size: 14px;
}
.route-target input:focus,
.route-param input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  outline: none;
}
.route-target input:disabled {
  background: var(--soft-2);
  color: var(--muted);
}
.route-actions {
  display: flex;
  gap: 8px;
}
.route-run {
  min-height: 40px;
  padding: 0 18px;
  white-space: nowrap;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}
.route-run:hover:not(:disabled) {
  filter: brightness(1.08);
}
.route-run > span {
  font-size: 10px;
  margin-right: 4px;
}
.route-stop {
  width: 40px;
  height: 40px;
  font-size: 13px;
  color: var(--red);
}
.route-params {
  display: flex;
  gap: 14px 20px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
}
.route-params:empty {
  display: none;
}
.route-param {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.route-param input {
  width: 104px;
  font-size: 13px;
}
.route-param input[name=bitrate] {
  width: 110px;
}
.route-param .segmented button {
  min-height: 32px;
  font-size: 12px;
  padding: 0 12px;
}
.route-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-height: 40px;
  white-space: nowrap;
}
.route-public-ip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 40px;
  max-width: 100%;
}
.route-ip-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.route-ip-value {
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.route-error {
  font-size: 13px;
  color: var(--red);
  line-height: 1.6;
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--red) 30%, var(--border));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border-radius: 10px;
}
.route-result {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.route-result-heading {
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
}
.route-result-meta {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.route-state {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 650;
}
.route-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.route-state[data-state=completed] {
  color: var(--green);
}
.route-state[data-state=partial],
.route-state[data-state=canceled],
.route-state[data-state=agent_lost] {
  color: var(--warn);
}
.route-state[data-state=failed],
.route-state[data-state=refused],
.route-state[data-state=timeout],
.route-state[data-state=uncertain] {
  color: var(--red);
}
#route-result-target {
  overflow-wrap: anywhere;
  color: var(--text-2);
}
#route-elapsed {
  font-variant-numeric: tabular-nums;
}
.route-result-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.route-result-actions .icon-button {
  height: 34px;
  min-width: 34px;
  font-size: 13px;
}
.route-result-actions #route-download {
  font-size: 16px;
}
#route-output {
  height: 320px;
  min-height: 200px;
  resize: vertical;
  overflow: auto;
  margin: 0;
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  font:
    12px/1.75 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    "Liberation Mono",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    monospace;
  white-space: pre;
  tab-size: 4;
  overscroll-behavior: contain;
}
@media (max-width: 760px) {
  .routing {
    padding: 18px 16px 22px;
  }
  .route-tool-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    width: 100%;
    margin-bottom: 16px;
    overflow: visible;
  }
  .route-tool-tabs button {
    min-height: 44px;
    padding: 0 8px;
  }
  .route-form {
    padding: 12px;
  }
  .route-target-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .route-target input {
    min-height: 44px;
    font-size: 16px;
  }
  .route-actions .route-run {
    flex: 1;
    min-height: 44px;
  }
  .route-stop {
    width: 44px;
    height: 44px;
  }
  .route-params {
    gap: 12px;
  }
  .route-param input:not([type=checkbox]) {
    min-height: 44px;
    font-size: 16px;
    width: 112px;
  }
  .route-param .segmented button {
    min-height: 38px;
  }
  .route-toggle {
    min-height: 44px;
  }
  .route-ip-button {
    min-height: 44px;
  }
  .route-result-heading {
    padding: 8px 8px 8px 12px;
    align-items: flex-start;
  }
  .route-result-actions .icon-button {
    height: 44px;
    min-width: 44px;
  }
  #route-output {
    height: 300px;
    padding: 12px;
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .routing {
    padding: 16px 12px 20px;
  }
}

/* src/scripts/probe-detail-v2/ip-quality.css */
.ip-quality {
  padding: 24px 32px 28px;
}
.ip-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.ip-family {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ip-type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: help;
}
.ip-type-native {
  background: #e4f4eb;
  color: #18794e;
}
.ip-type-broadcast {
  background: #fff1c8;
  color: #8a5b0a;
}
.ip-type-unknown {
  background: var(--soft);
  color: var(--muted);
}
.dark .ip-type-native {
  background: #203e32;
  color: #79d6a5;
}
.dark .ip-type-broadcast {
  background: #443b22;
  color: #f0ce78;
}
.ip-dynamic {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #e7c566;
  border-radius: 999px;
  background: #fff5d8;
  color: #7a5a10;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
}
.dark .ip-dynamic {
  border-color: #75612e;
  background: #3b3422;
  color: #e9cb7b;
}
.ip-port {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}
.ip-port > span {
  color: var(--muted);
}
.ip-port strong {
  font-weight: 650;
}
.ip-good {
  color: var(--green);
}
.ip-bad {
  color: var(--red);
}
.ip-unknown {
  color: var(--muted);
}
.ip-section {
  padding: 20px 0 0;
}
.ip-section + .ip-section {
  border-top: 1px solid var(--border);
  margin-top: 22px;
}
.ip-section:first-child {
  padding-top: 0;
}
.ip-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ip-section-heading h2 {
  font-size: 15px;
  font-weight: 650;
}
.ip-overview {
  padding-top: 0;
}
.ip-geography {
  display: flex;
  align-items: center;
  gap: 16px 28px;
  min-width: 0;
  flex-wrap: wrap;
}
.ip-location {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: help;
  outline-offset: 4px;
  max-width: 100%;
  min-width: 0;
}
.ip-consensus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 8px;
  overflow: hidden;
  min-width: 120px;
}
.ip-consensus-part {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: center;
}
.ip-consensus-part + .ip-consensus-part {
  border-left: 1px solid var(--surface);
}
.ip-consensus-match {
  background: #e4f4eb;
  color: #18794e;
}
.ip-consensus-outlier,
.ip-consensus-distinct-0 {
  background: #fff1c8;
  color: #8a5b0a;
}
.ip-consensus-distinct-1 {
  background: #e2efff;
  color: #2465ad;
}
.ip-consensus-distinct-2 {
  background: #fce5eb;
  color: #a53d60;
}
.ip-consensus-distinct-3 {
  background: #eee6ff;
  color: #73529d;
}
.ip-consensus-missing {
  background: var(--soft);
  color: var(--muted);
}
.dark .ip-consensus-match {
  background: #203e32;
  color: #79d6a5;
}
.dark .ip-consensus-outlier,
.dark .ip-consensus-distinct-0 {
  background: #443b22;
  color: #f0ce78;
}
.dark .ip-consensus-distinct-1 {
  background: #24374d;
  color: #8ac0ff;
}
.dark .ip-consensus-distinct-2 {
  background: #472d39;
  color: #f0a5be;
}
.dark .ip-consensus-distinct-3 {
  background: #382c48;
  color: #c9aceb;
}
.ip-location-divider {
  color: var(--muted);
}
.ip-geo-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  white-space: pre-line;
  width: max-content;
  max-width: min(650px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.ip-location:hover .ip-geo-tooltip,
.ip-location:focus .ip-geo-tooltip {
  display: block;
}
.ip-asn {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  min-width: 0;
  flex-wrap: wrap;
}
.ip-asn strong {
  white-space: nowrap;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ip-asn > span {
  overflow-wrap: anywhere;
  color: var(--muted);
}
.ip-type-table,
.ip-factor-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.ip-type-table {
  min-width: 560px;
}
.ip-factor-table {
  min-width: 660px;
}
.ip-type-table th,
.ip-type-table td,
.ip-factor-table th,
.ip-factor-table td {
  height: 44px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow-wrap: anywhere;
}
.ip-type-table thead th,
.ip-factor-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  background: var(--soft);
}
.ip-type-table thead th:first-child,
.ip-factor-table thead th:first-child {
  border-top-left-radius: 8px;
}
.ip-type-table thead th:last-child,
.ip-factor-table thead th:last-child {
  border-top-right-radius: 8px;
}
.ip-type-table th:first-child,
.ip-factor-table th:first-child {
  width: 88px;
  padding-left: 12px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}
.ip-type-table thead th:first-child,
.ip-factor-table thead th:first-child {
  background: var(--soft);
}
.ip-type-table tbody th,
.ip-factor-table tbody th {
  font-weight: 550;
}
.ip-type-table tbody tr:last-child > *,
.ip-factor-table tbody tr:last-child > * {
  border-bottom: 0;
}
.ip-type-residential {
  color: var(--green);
  font-weight: 600;
}
.ip-type-datacenter {
  color: var(--red);
  font-weight: 600;
}
.ip-type-other {
  color: #8a5b0a;
  font-weight: 600;
}
.dark .ip-type-other {
  color: #f0ce78;
}
.ip-score-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.ip-score-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
  font-size: 13px;
  white-space: nowrap;
}
.ip-score-item > span {
  color: var(--muted);
}
.ip-score-item strong {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ip-factor-cell {
  position: relative;
}
.ip-factor-swatch {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  border-radius: 6px;
}
.ip-factor-yes .ip-factor-swatch,
.ip-factor-legend .ip-factor-yes {
  background: var(--red);
}
.ip-factor-no .ip-factor-swatch,
.ip-factor-legend .ip-factor-no {
  background: var(--green);
}
.ip-factor-unknown .ip-factor-swatch,
.ip-factor-legend .ip-factor-unknown,
.ip-missing {
  background-color: var(--soft);
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 4px,
      var(--muted) 4px,
      var(--muted) 5px);
  opacity: .7;
}
.ip-factor-cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.ip-factor-legend {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.ip-factor-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ip-factor-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: block;
}
.ip-missing {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}
.ip-score-item .ip-missing {
  margin-left: 3px;
}
.ip-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  align-items: start;
}
.ip-media-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  table-layout: fixed;
}
.ip-media-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
.ip-media-table td {
  height: 46px;
  padding: 6px;
  border-bottom: 1px solid var(--grid);
  line-height: 18px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.ip-media-table td:first-child,
.ip-media-table th:first-child {
  padding-left: 0;
}
.ip-media-table tbody tr:last-child td {
  border-bottom: 0;
}
.ip-service {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ip-service-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  background: var(--surface) !important;
  padding: 2px;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--border);
}
.dark .ip-service-icon {
  background: #fff !important;
}
.ip-status-cell {
  white-space: nowrap;
  font-weight: 600;
}
.ip-status-block {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  vertical-align: 0;
  border-radius: 3px;
  background: var(--muted);
}
.ip-status-available {
  color: var(--green);
}
.ip-status-available .ip-status-block {
  background: var(--green);
}
.ip-status-blocked {
  color: var(--red);
}
.ip-status-blocked .ip-status-block {
  background: var(--red);
}
.ip-status-other {
  color: #a86f12;
}
.ip-status-app-only,
.ip-status-china {
  color: #8a5b0a;
}
.ip-status-app-only .ip-status-block,
.ip-status-china .ip-status-block {
  background: #d79722;
}
.dark .ip-status-app-only,
.dark .ip-status-china,
.dark .ip-status-other {
  color: #f0ce78;
}
.ip-region {
  white-space: nowrap;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ip-country-flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  vertical-align: -1px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #17212a22;
  font-size: 0;
  object-fit: cover;
}
.ip-media-table td:last-child > .ip-missing {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  vertical-align: -1px;
}
.ip-flag-us {
  background:
    repeating-linear-gradient(
      to bottom,
      #b22234 0 1px,
      #fff 1px 2px);
  position: relative;
}
.ip-flag-us:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 7px;
  background: #3c3b6e;
}
.ip-flag-cn {
  background: #de2910;
  position: relative;
}
.ip-flag-cn:before {
  content: "\2605";
  position: absolute;
  color: #ffde00;
  font-size: 6px;
  left: 2px;
  top: -2px;
}
.ip-flag-hk {
  background: #de2910;
  position: relative;
}
.ip-flag-hk:before {
  content: "\273f";
  position: absolute;
  color: #fff;
  font-size: 8px;
  left: 5px;
  top: -2px;
}
.ip-flag-de {
  background:
    linear-gradient(
      #111 0 33%,
      #d00 33% 66%,
      #ffce00 66%);
}
@media (max-width: 760px) {
  .ip-quality {
    padding: 18px 16px 22px;
  }
  .ip-toolbar {
    margin-bottom: 16px;
  }
  .ip-section + .ip-section {
    margin-top: 18px;
  }
  .ip-geography {
    width: 100%;
    gap: 12px;
  }
  .ip-location {
    gap: 6px;
    width: 100%;
  }
  .ip-consensus {
    flex: 1;
    min-width: 0;
  }
  .ip-consensus-part {
    padding: 8px 3px;
    font-size: 11px;
  }
  .ip-score-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ip-score-item {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 8px 12px;
  }
  .ip-media {
    grid-template-columns: minmax(0, 1fr);
  }
  .ip-media-table + .ip-media-table thead {
    display: none;
  }
  .ip-media-table td {
    padding: 6px 4px;
  }
  .ip-service {
    gap: 8px;
  }
}
@media (max-width: 380px) {
  .ip-quality {
    padding: 16px 12px 20px;
  }
}
@media (max-width: 340px) {
  .ip-score-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .ip-score-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
  }
}
