:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-soft: #f9fbfb;
  --panel-alpha: rgba(255, 255, 255, 0.94);
  --header-bg: rgba(255, 255, 255, 0.9);
  --control-bg: #ffffff;
  --canvas-bg: #fbfcfd;
  --body-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(245, 247, 248, 0.82)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.035) 0, rgba(37, 99, 235, 0.035) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(0deg, rgba(15, 118, 110, 0.035) 0, rgba(15, 118, 110, 0.035) 1px, transparent 1px, transparent 72px),
    var(--bg);
  --text: #162029;
  --muted: #64717d;
  --line: #dce3e8;
  --line-strong: #c5d0d8;
  --blue: #2563eb;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --violet: #6d28d9;
  --shadow: 0 12px 32px rgba(22, 32, 41, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1117;
  --panel: #111a24;
  --panel-soft: #162231;
  --panel-alpha: rgba(17, 26, 36, 0.95);
  --header-bg: rgba(11, 17, 23, 0.92);
  --control-bg: #0f1721;
  --canvas-bg: #111a24;
  --body-bg:
    linear-gradient(180deg, rgba(11, 17, 23, 0.94), rgba(13, 20, 29, 0.96)),
    repeating-linear-gradient(90deg, rgba(96, 165, 250, 0.045) 0, rgba(96, 165, 250, 0.045) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(0deg, rgba(45, 212, 191, 0.035) 0, rgba(45, 212, 191, 0.035) 1px, transparent 1px, transparent 72px),
    var(--bg);
  --text: #e5edf5;
  --muted: #97a6b6;
  --line: #263544;
  --line-strong: #33485a;
  --blue: #60a5fa;
  --teal: #2dd4bf;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #fb7185;
  --violet: #a78bfa;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  border-top: 1px solid rgba(64, 224, 255, 0.72);
  border-bottom: 1px solid rgba(46, 116, 148, 0.26);
  background:
    radial-gradient(circle at 55% 84%, rgba(6, 182, 212, 0.18), transparent 2px),
    linear-gradient(180deg, rgba(2, 8, 17, 0.98), rgba(3, 10, 21, 0.96));
  box-shadow: 0 10px 30px rgba(0, 8, 20, 0.22);
  backdrop-filter: blur(18px);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1440px, calc(100% - 64px));
  min-height: 64px;
  margin: 0 auto;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(45, 212, 191, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 27, 43, 0.96), rgba(3, 13, 24, 0.96)),
    #07131f;
  color: #59f6ff;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08), 0 0 18px rgba(45, 212, 191, 0.36);
}

.brand h1 {
  margin: 0;
  color: #d9ecf4;
  font-size: 18px;
  line-height: 1.2;
}

.brand p {
  display: none;
}

.header-status {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 18px;
  min-width: 0;
  color: #8996a6;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav button {
  position: relative;
  flex: 0 0 auto;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  background: transparent;
  color: #8b98a8;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}

.top-nav button:hover {
  color: #c6d6e3;
  background: rgba(51, 65, 85, 0.28);
}

.top-nav button.active {
  padding-left: 23px;
  background: rgba(6, 182, 212, 0.14);
  color: #35dff2;
}

.top-nav button.active::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px rgba(53, 223, 242, 0.72);
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.lang-switch,
.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(34, 165, 210, 0.42);
  border-radius: 8px;
  background: rgba(8, 23, 38, 0.88);
  color: #c7d8e6;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.lang-switch:hover,
.theme-switch:hover {
  border-color: rgba(45, 212, 191, 0.72);
  color: #f1fbff;
  background: rgba(10, 33, 52, 0.94);
}

.lang-switch {
  gap: 7px;
  min-width: 50px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 650;
}

.theme-switch {
  width: 36px;
  padding: 0;
}

.header-control-icon,
.header-chevron {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.header-control-icon svg,
.header-chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-chevron svg {
  width: 14px;
  height: 14px;
}

.shell {
  width: min(1400px, calc(100% - 64px));
  margin: 18px auto 42px;
}

.app-footer {
  display: grid;
  gap: 4px;
  width: min(1400px, calc(100% - 64px));
  margin: -20px auto 34px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.app-footer p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.app-footer p:first-child {
  color: var(--text);
  font-weight: 650;
}

.isp-download-view {
  display: grid;
  gap: 16px;
}

.isp-download-view[hidden] {
  display: none;
}

.isp-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alpha);
  box-shadow: var(--shadow);
}

.isp-page-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.isp-page-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.isp-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.isp-summary-grid.global-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.isp-summary-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.isp-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.isp-summary-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.isp-family-grid {
  display: grid;
  gap: 16px;
}

.isp-family-panel {
  gap: 14px;
}

.isp-range-table {
  display: grid;
  gap: 6px;
}

.isp-range-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 190px 110px 74px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.isp-range-head {
  min-height: 36px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.isp-range-row div {
  min-width: 0;
}

.isp-range-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.isp-range-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.isp-download-link {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.query-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alpha);
  box-shadow: var(--shadow);
}

.egress-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.06)),
    var(--panel-alpha);
}

.egress-panel .panel-heading {
  min-height: 30px;
  margin-bottom: 10px;
}

.egress-panel .egress-list {
  grid-template-columns: minmax(260px, 0.85fr) repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.egress-panel .egress-summary,
.egress-panel .egress-row {
  min-height: 62px;
  background: rgba(255, 255, 255, 0.56);
}

:root[data-theme="dark"] .egress-panel .egress-summary,
:root[data-theme="dark"] .egress-panel .egress-row {
  background: rgba(15, 23, 33, 0.66);
}

.query-panel {
  padding: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(15, 118, 110, 0.045) 52%, transparent),
    var(--panel-alpha);
}

.query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 48px;
  gap: 12px;
  align-items: end;
}

.input-wrap {
  display: grid;
  gap: 6px;
}

.input-wrap label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--control-bg);
  color: var(--text);
  outline: none;
  font-size: 16px;
  font-weight: 650;
}

.input-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.primary-action,
.ghost-action,
.icon-action,
.quick-targets button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--text);
}

.primary-action {
  height: 48px;
  border-color: #1d4ed8;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.primary-action:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ghost-action {
  padding: 0 12px;
  color: var(--muted);
}

.icon-action {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.query-row .icon-action {
  width: 48px;
  height: 48px;
}

.query-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.07);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.query-status[hidden] {
  display: none;
}

.query-status::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: query-status-spin 0.8s linear infinite;
}

:root[data-theme="dark"] .query-status {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.1);
}

@keyframes query-status-spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-action.small {
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 16px;
}

.quick-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-targets button {
  min-width: 84px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="dark"] .quick-targets button {
  background: rgba(15, 23, 33, 0.66);
}

.main-stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.panel-tools {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.result-actions .ghost-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.source-tools {
  align-items: center;
}

.source-tools .ghost-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.advanced-tools {
  margin-top: 16px;
}

.advanced-tools-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.advanced-tools-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.advanced-tools-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.advanced-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.advanced-tool-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 116px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel-alpha);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.advanced-tool-card:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background: var(--panel);
  transform: translateY(-1px);
}

.advanced-tool-card:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), var(--shadow);
}

.advanced-tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
}

.advanced-tool-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.advanced-tool-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.advanced-tool-copy strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
}

.advanced-tool-copy span {
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.4;
}

.advanced-tool-arrow {
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.advanced-tool-cache {
  display: none;
}

.confidence,
#sourceCount,
#bgpAsnLabel {
  color: var(--muted);
  font-size: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  padding: 14px;
  box-shadow: var(--shadow);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.metric-top,
.identity-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-icon,
.tiny-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  line-height: 0;
}

.metric-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.tiny-icon {
  width: 18px;
  height: 18px;
  border-radius: 7px;
}

.metric-icon svg,
.tiny-icon svg {
  display: block;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tiny-icon svg {
  width: 12px;
  height: 12px;
}

.flag-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  margin-right: 6px;
  overflow: hidden;
  vertical-align: -2px;
  border: 1px solid rgba(22, 32, 41, 0.16);
  border-radius: 3px;
  background: #edf2f7;
  box-shadow: 0 1px 2px rgba(22, 32, 41, 0.08);
}

.flag-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flag-icon span {
  display: none;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.12;
}

.metric-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.identity-item {
  min-height: 76px;
  padding: 12px;
  background: var(--panel-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}

.identity-item:hover {
  background: var(--panel);
}

.identity-item span,
.detail-row span,
.source-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-sub .flag-icon,
.identity-item .flag-icon,
.source-cell .flag-icon,
.identity-label .tiny-icon {
  display: inline-flex;
}

.identity-item strong,
.detail-row strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 750;
  line-height: 1.3;
}

.score-layout {
  display: grid;
  grid-template-columns: 240px minmax(220px, 1fr) 260px;
  gap: 18px;
  align-items: center;
}

.score-meter {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
}

.score-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  pointer-events: none;
}

.score-center strong {
  font-size: 34px;
  line-height: 1;
}

.score-center span {
  margin-top: 6px;
  color: var(--muted);
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e7edf1;
}

.bar-fill {
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: var(--bar-color, var(--blue));
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
  min-height: 128px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #ccd7de;
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.tag.good {
  border-color: rgba(21, 128, 61, 0.3);
  background: rgba(21, 128, 61, 0.08);
  color: var(--green);
}

.tag.warn {
  border-color: rgba(180, 83, 9, 0.32);
  background: rgba(180, 83, 9, 0.08);
  color: var(--amber);
}

.tag.bad {
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.data-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}

.service-add {
  place-items: center;
  align-content: center;
  border-style: dashed;
  background: var(--control-bg);
  color: var(--muted);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.service-add:hover {
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--blue);
}

.service-add-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 50%;
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.custom-service-card {
  min-height: 112px;
}

.custom-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-service-actions .ghost-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.service-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 780;
}

.service-icon,
.source-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.service-icon {
  width: 28px;
  height: 28px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
}

.source-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  background: rgba(100, 113, 125, 0.1);
  color: var(--text);
}

.source-icon > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  font-size: 9px;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.pill.good {
  background: rgba(21, 128, 61, 0.1);
  color: var(--green);
}

.pill.warn {
  background: rgba(180, 83, 9, 0.1);
  color: var(--amber);
}

.pill.bad {
  background: rgba(185, 28, 28, 0.1);
  color: var(--red);
}

.service-meta {
  color: var(--muted);
  font-size: 12px;
}

.bgp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: stretch;
}

#routeCanvas {
  width: 100%;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas-bg);
}

.bgp-list,
.detail-list,
.neighbor-list,
.cloud-profile,
.conflict-list,
.probe-list,
.egress-list,
.update-list,
.source-table {
  display: grid;
  gap: 8px;
}

.detail-row,
.neighbor-row,
.conflict-row,
.probe-row,
.egress-row,
.update-row,
.source-row {
  display: grid;
  gap: 6px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.neighbor-row,
.probe-row,
.egress-row,
.update-row,
.source-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.neighbor-row.current {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(37, 99, 235, 0.06);
}

.neighbor-summary {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: rgba(37, 99, 235, 0.05);
}

.neighbor-summary > strong {
  font-size: 13px;
}

.neighbor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.neighbor-summary-grid div {
  min-width: 0;
}

.neighbor-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.neighbor-summary-grid b {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.egress-summary {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.egress-summary.good {
  border-color: rgba(21, 128, 61, 0.22);
  background: rgba(21, 128, 61, 0.06);
}

.egress-summary.warn {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.07);
}

.egress-summary strong,
.egress-row strong {
  display: block;
}

.egress-summary span,
.egress-row span {
  color: var(--muted);
  font-size: 12px;
}

.update-row {
  grid-template-columns: 1fr;
}

.update-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.update-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.conflict-row {
  border-color: rgba(180, 83, 9, 0.35);
  background: rgba(180, 83, 9, 0.07);
}

.conflict-row.high {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.07);
}

.conflict-row strong,
.probe-row strong {
  overflow-wrap: anywhere;
}

.conflict-row span,
.probe-row span {
  color: var(--muted);
  font-size: 12px;
}

.source-row {
  grid-template-columns: 1fr 1.25fr 0.9fr 0.5fr;
}

.source-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-title {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 1.2;
}

.source-name {
  display: inline;
  min-width: 0;
  color: var(--text);
  font-size: inherit;
  overflow-wrap: anywhere;
}

.source-location {
  display: grid;
  gap: 3px;
  margin-top: 2px;
}

.source-location-place {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
}

.source-location-place .flag-icon {
  flex: 0 0 auto;
}

.source-location-place span {
  display: inline;
  color: var(--text);
  font-size: inherit;
  overflow-wrap: anywhere;
}

.source-location-network strong {
  display: block;
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
}

.risk-explain {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 118, 110, 0.06)), var(--panel);
}

.explain-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.explain-head strong {
  display: block;
  margin-bottom: 4px;
}

.explain-head span {
  color: var(--muted);
  line-height: 1.45;
}

.evidence-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--control-bg);
}

.evidence-chip span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-chip b {
  color: var(--text);
  font-size: 12px;
}

.reason-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reason-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(21, 128, 61, 0.16);
  border-radius: 8px;
  padding: 8px;
  background: rgba(21, 128, 61, 0.06);
  color: var(--text);
  overflow-wrap: anywhere;
}

.source-status {
  font-weight: 800;
}

.source-status.ok {
  color: var(--green);
}

.source-status.error {
  color: var(--red);
}

.source-status.not_configured {
  color: var(--amber);
}

.cloud-profile {
  min-height: 0;
}

.cloud-panel {
  background:
    linear-gradient(135deg, rgba(109, 40, 217, 0.06), rgba(15, 118, 110, 0.055)),
    var(--panel-alpha);
}

.cloud-vendor {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.08)),
    var(--panel-soft);
}

.cloud-vendor strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.2;
}

.cloud-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cloud-kpis div {
  min-height: 54px;
  border: 1px solid rgba(197, 208, 216, 0.8);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel-alpha);
}

.cloud-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.cloud-kpis b {
  display: block;
  margin-top: 4px;
}

.empty-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-alpha);
}

body.modal-open {
  overflow: hidden;
}

.config-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 13, 20, 0.48);
}

.config-overlay[hidden] {
  display: none;
}

.config-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.config-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.config-modal-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.config-modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.config-status {
  min-height: 34px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.config-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.config-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 16px 18px;
  overflow: auto;
}

.tool-modal {
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, calc(100vw - 40px));
}

.tool-modal-body {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.tool-modal-content {
  display: grid;
  gap: 8px;
}

.global-isp-ad-modal {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(380px, calc(100vw - 40px));
}

.global-isp-ad-modal .config-modal-head h2 {
  margin-top: 8px;
}

.global-isp-ad-body {
  display: grid;
  grid-template-areas:
    "file"
    "ad"
    "status";
  gap: 12px;
  justify-items: center;
  min-height: 0;
  padding: 18px;
}

.global-isp-ad-file {
  grid-area: file;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
  text-align: center;
}

.global-isp-ad-stage {
  display: grid;
  grid-area: ad;
  place-items: center;
  width: 100%;
}

.global-isp-ad-slot {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  width: 300px;
  height: 200px;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.global-isp-ad-slot iframe,
.global-isp-ad-slot ins {
  max-width: 100%;
}

.global-isp-ad-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.global-isp-ad-slot:empty::before {
  content: "";
}

.global-isp-ad-content {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
}

.global-isp-ad-content > * {
  max-width: 100%;
}

.global-isp-ad-status {
  grid-area: status;
  position: static;
  width: 100%;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.global-isp-ad-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}

.global-isp-ad-actions .primary-action {
  width: 100%;
}

.diagnostic-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.diagnostic-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.diagnostic-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.diagnostic-field input,
.diagnostic-field select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--control-bg);
  color: var(--text);
  outline: none;
}

.diagnostic-field input:focus,
.diagnostic-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.diagnostic-submit {
  height: 40px;
  min-height: 40px;
}

.diagnostic-dashboard {
  display: grid;
  gap: 12px;
}

.diagnostic-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.diagnostic-row-list {
  display: grid;
  gap: 8px;
}

.diagnostic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.diagnostic-row strong,
.diagnostic-row span {
  overflow-wrap: anywhere;
}

.diagnostic-row > div > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.diagnostic-header-row {
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
}

.diagnostic-header-row > span {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  line-height: 1.35;
}

.diagnostic-error {
  border-color: rgba(185, 28, 28, 0.28);
  background: rgba(185, 28, 28, 0.07);
  color: var(--red);
}

.geo-address-fields {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.28fr);
}

.geo-address-list {
  display: grid;
  gap: 10px;
}

.geo-address-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.geo-address-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.geo-address-card-head strong,
.geo-address-card-head span {
  overflow-wrap: anywhere;
}

.geo-address-card-head > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.geo-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.geo-address-grid .leak-row {
  grid-template-columns: 94px minmax(0, 1fr);
}

.geo-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.geo-address-actions .ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.geo-person-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.leak-dashboard {
  display: grid;
  gap: 14px;
}

.leak-overview {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.leak-overview.good {
  border-color: rgba(21, 128, 61, 0.24);
  background: rgba(21, 128, 61, 0.07);
}

.leak-overview.warn {
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(180, 83, 9, 0.08);
}

.leak-overview.bad {
  border-color: rgba(185, 28, 28, 0.32);
  background: rgba(185, 28, 28, 0.08);
}

.leak-overview strong {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.leak-overview span:not(.tiny-icon) {
  color: var(--muted);
  line-height: 1.45;
}

.leak-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.leak-metric {
  display: grid;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.leak-metric.good {
  border-color: rgba(21, 128, 61, 0.22);
  background: rgba(21, 128, 61, 0.06);
}

.leak-metric.warn {
  border-color: rgba(180, 83, 9, 0.26);
  background: rgba(180, 83, 9, 0.07);
}

.leak-metric.bad {
  border-color: rgba(185, 28, 28, 0.28);
  background: rgba(185, 28, 28, 0.07);
}

.leak-metric span,
.leak-row span,
.leak-section-head span,
.leak-candidate-row span {
  color: var(--muted);
  font-size: 12px;
}

.leak-metric strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.leak-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.leak-section,
.leak-candidates {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.leak-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leak-section-head strong {
  overflow-wrap: anywhere;
}

.leak-row-list,
.leak-candidate-list {
  display: grid;
  gap: 8px;
}

.leak-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.leak-row strong {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.leak-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel-alpha);
}

.leak-candidate-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.config-section {
  display: grid;
  gap: 10px;
}

.config-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.config-field {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.config-field.textarea {
  grid-column: 1 / -1;
}

.config-field.boolean {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.config-field-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.config-field-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.config-field-title strong {
  color: var(--text);
}

.config-field-title code {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.config-field-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.config-field input:not([type="checkbox"]),
.config-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--text);
  outline: none;
}

.config-field input:not([type="checkbox"]) {
  height: 38px;
  padding: 0 11px;
}

.config-field textarea {
  min-height: 92px;
  padding: 10px 11px;
  line-height: 1.45;
}

.config-field input:focus,
.config-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.config-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.config-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}

.config-path {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.loading {
  opacity: 0.7;
}

@media (max-width: 1180px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .isp-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .isp-range-row {
    grid-template-columns: minmax(180px, 1fr) 100px 170px 100px 70px;
  }

  .diagnostic-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnostic-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-header {
    position: sticky;
  }

  .app-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: calc(100% - 24px);
    column-gap: 10px;
    row-gap: 8px;
    padding: 10px 0;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    text-align: left;
  }

  .brand > div {
    min-width: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .header-status {
    display: contents;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .top-nav button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .top-nav button.active {
    padding-left: 20px;
  }

  .top-nav button.active::before {
    left: 9px;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 12px;
  }

  .lang-switch,
  .theme-switch {
    min-height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #c7d8e6;
  }

  .lang-switch:hover,
  .theme-switch:hover {
    border-color: transparent;
    background: transparent;
    color: #f1fbff;
  }

  .lang-switch {
    min-width: auto;
    width: auto;
    padding: 0;
  }

  .lang-switch [data-lang-label],
  .header-chevron {
    display: none;
  }

  .theme-switch {
    width: auto;
  }

  .shell {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .app-footer {
    width: calc(100% - 20px);
    margin-bottom: 24px;
  }

  .query-row {
    grid-template-columns: 1fr;
  }

  .primary-action,
  .icon-action {
    width: 100%;
  }

  .config-modal-head .icon-action {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    justify-self: end;
    font-size: 16px;
  }

  .query-row .icon-action {
    width: 100%;
  }

  .identity-grid,
  .overview-grid,
  .isp-summary-grid,
  .data-section,
  .service-grid,
  .advanced-tool-grid,
  .score-layout,
  .bgp-layout {
    grid-template-columns: 1fr;
  }

  .egress-panel .egress-list,
  .cloud-vendor,
  .cloud-kpis,
  .leak-metric-grid,
  .diagnostic-form,
  .diagnostic-fields,
  .diagnostic-summary-grid,
  .geo-address-grid,
  .geo-address-card-head,
  .leak-row {
    grid-template-columns: 1fr;
  }

  .diagnostic-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .diagnostic-header-row {
    grid-template-columns: 1fr;
  }

  .leak-candidate-row,
  .leak-section-head {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .advanced-tools-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .isp-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .isp-page-head .ghost-action {
    width: 100%;
  }

  .isp-range-head {
    display: none;
  }

  .isp-range-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .isp-download-link {
    width: 100%;
  }

  .advanced-tool-card {
    min-height: 104px;
  }

  .score-meter {
    margin: 0 auto;
  }

  .source-row {
    grid-template-columns: 1fr;
  }

  .reason-list {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .egress-panel .panel-heading {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .egress-panel #egressRefreshButton {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
  }

  .panel-tools,
  .result-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .config-overlay {
    padding: 10px;
  }

  .config-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .config-modal-head,
  .config-modal-actions,
  .global-isp-ad-actions {
    grid-template-columns: 1fr;
  }

  .config-grid,
  .config-modal-actions,
  .global-isp-ad-actions {
    grid-template-columns: 1fr;
  }

}
