* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff;
  color: #1a1a1a;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: inherit;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}

.nav {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.nav a {
  color: #666;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: #1a1a1a;
}

.nav a.active {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom-color: #1a1a1a;
}

.nav .short {
  display: none;
}

h1 {
  font-size: 1.75em;
  font-weight: 700;
  margin-bottom: 8px;
}

.desc {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 24px;
}

footer {
  text-align: center;
  padding: 30px 0 20px;
  color: #8b949e;
  font-size: 0.82em;
}

.mono {
  font-family: inherit;
}

.muted,
.subtle {
  color: #8b949e;
}

.text-left {
  text-align: left;
}

.ip-section {
  margin-bottom: 32px;
}

.ip-card {
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.secondary-card {
  min-height: 162px;
}

.label {
  font-size: 0.78em;
  color: #8b949e;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.title-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  vertical-align: -2px;
}

.ip-value,
.ip-addr {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a1a1a;
  min-height: 1.7em;
}

.ip-geo {
  color: #444;
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 0.98em;
  min-height: 1.6em;
}

.ip-geo .geo-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-source {
  font-size: 0.72em;
  color: #adb5bd;
  margin-top: 10px;
  min-height: 1.4em;
}

.ip-card-top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.ip-info-col {
  flex-shrink: 0;
  min-width: 240px;
}

.ping-col {
  flex: 1;
  min-width: 0;
}

.ping-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ping-item {
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82em;
  min-width: 0;
}

.ping-icon,
.favicon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ping-item .ping-icon {
  width: 16px;
  height: 16px;
}

.ping-item-main {
  flex: 1;
  min-width: 0;
}

.ping-name {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-flag-img {
  width: 14px;
  height: auto;
  border-radius: 1px;
  flex-shrink: 0;
}

.ping-ms {
  font-size: 1em;
  font-weight: 600;
  white-space: nowrap;
}

.ping-dots {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-good {
  background: #1b8a2d;
}

.dot-warn {
  background: #6fcf7c;
}

.dot-bad {
  background: #f0c040;
}

.dot-fail {
  background: #b2bec3;
}

.dot-pending {
  background: #dfe6e9;
}

.section-divider {
  border: none;
  border-top: 1px solid #e1e4e8;
  margin: 32px 0;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.75em;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-head p {
  color: #666;
  font-size: 0.9em;
  line-height: 1.5;
}

.main-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d8dce0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.main-table th {
  text-align: left;
  padding: 10px 16px;
  background: linear-gradient(180deg, #f8f9fb 0%, #eef0f3 100%);
  border-bottom: 1px solid #d8dce0;
  font-weight: 600;
  font-size: 0.85em;
  color: #57606a;
}

.main-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
}

.main-table tbody tr:nth-child(even) {
  background: #f8f9fb;
}

.main-table tbody tr:hover {
  background: #eef1f5;
}

.main-table tr:last-child td {
  border-bottom: none;
}

.flag-col {
  width: 52px;
}

.site-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-width: 0;
}

.site-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flag-icon {
  width: 24px;
  height: auto;
  border-radius: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

.geo-col {
  color: #57606a;
  font-size: 0.88em;
}

.geo-copy {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.site-badge,
.tag,
.status-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.site-badge.domestic {
  background: #dbeafe;
  color: #1d4ed8;
}

.site-badge.international {
  background: #d1fae5;
  color: #065f46;
}

.site-badge.ai {
  background: #fce4ec;
  color: #c62828;
}

.site-badge.crypto {
  background: #fef3c7;
  color: #92400e;
}

.site-badge.social,
.site-badge.dev {
  background: #f3e5f5;
  color: #7b1fa2;
}

.site-badge.tools {
  background: #e0f2f1;
  color: #00695c;
}

.site-badge.speed {
  background: #fff3e0;
  color: #e65100;
}

.site-badge.media {
  background: #e8eaf6;
  color: #283593;
}

.site-badge.static {
  background: #e5e7eb;
  color: #4b5563;
}

.tag.good,
.status-badge.ok,
.tag-safe,
.tag-safe-dark {
  background: #d1fae5;
  color: #065f46;
}

.tag.warn,
.status-badge.warn,
.tag-warn {
  background: #fef3c7;
  color: #92400e;
}

.tag.bad,
.status-badge.bad,
.tag-danger {
  background: #fce4ec;
  color: #c62828;
}

.tag.neutral,
.status-badge.neutral,
.tag-neutral {
  background: #e5e7eb;
  color: #4b5563;
}

.tag-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.loading-bar {
  display: inline-block;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb 25%, #d1d5db 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.loading-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e5e7eb 25%, #d1d5db 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.ip-dual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ip-hero {
  border: 1px solid #d8dce0;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  min-width: 0;
}

.ip-hero .label {
  margin-bottom: 6px;
}

.ip-hero .ip-addr {
  margin-bottom: 6px;
}

.ip-truncate {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
  vertical-align: bottom;
  font-size: 0.85em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cards-single {
  grid-template-columns: 1fr;
}

.card {
  border: 1px solid #d8dce0;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  min-width: 0;
}

.card-title {
  font-size: 0.82em;
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.inline-action {
  font-size: 0.75em;
  color: #666;
  cursor: pointer;
  font-weight: 400;
  padding: 2px 8px;
  border: 1px solid #d8dce0;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
}

.inline-link {
  display: inline-flex;
  align-items: center;
}

.risk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
  gap: 12px;
}

.risk-row:last-child {
  border-bottom: none;
}

.risk-label {
  flex-shrink: 0;
  color: #57606a;
  font-size: 0.92em;
}

.risk-value {
  min-width: 0;
  text-align: right;
  font-weight: 600;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.dev-long {
  font-size: 0.78em;
  line-height: 1.4;
  max-width: 62%;
  word-break: break-word;
}

.gauge-wrap {
  text-align: center;
  padding: 10px 0;
}

.gauge-score {
  font-size: 1.5em;
  font-weight: 700;
}

.gauge-text {
  font-size: 0.85em;
  color: #57606a;
  margin-top: 2px;
  min-height: 2.6em;
}

.gauge-bar {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #c0392b 0%, #e17055 25%, #f0c040 50%, #6fcf7c 75%, #1b8a2d 100%);
  position: relative;
  margin: 12px 0 6px;
}

.gauge-pointer {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 22px;
  background: #1a1a1a;
  border-radius: 2px;
  transform: translateX(-50%);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72em;
  color: #8b949e;
}

.sub-card-title {
  margin: 18px 0 8px;
  color: #57606a;
  font-size: 0.88em;
  font-weight: 600;
}

.list-block {
  padding-left: 18px;
  color: #344054;
  font-size: 0.92em;
}

.list-block li + li {
  margin-top: 8px;
}

.list-emphasis li::marker {
  color: #c62828;
}

.list-actions li {
  font-weight: 600;
}

.advice-summary {
  margin-bottom: 8px;
}

.advice-title {
  font-size: 1em;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.advice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.advice-score {
  font-size: 1.35em;
  font-weight: 700;
  color: #1a1a1a;
}

.action-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.82em;
  font-weight: 600;
}

.action-chip-strong {
  background: #dbeafe;
  color: #1d4ed8;
}

.action-chip-warn {
  background: #fef3c7;
  color: #92400e;
}

.action-chip-good {
  background: #d1fae5;
  color: #065f46;
}

.history-note {
  color: #8b949e;
  font-size: 0.82em;
  margin-bottom: 10px;
}

.history-grid {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef0f3;
  border-radius: 10px;
}

.history-item span {
  display: block;
  color: #8b949e;
  font-size: 0.75em;
}

.history-item strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.empty {
  color: #8b949e;
  font-size: 0.88em;
}

@media (max-width: 768px) {
  .container {
    padding: 16px 14px;
  }

  .main-table {
    font-size: 0.82em;
  }

  .main-table th,
  .main-table td {
    padding: 8px 10px;
  }

  .geo-col {
    display: none;
  }

  .ip-card-top {
    flex-direction: column;
    gap: 14px;
  }

  .ip-info-col {
    min-width: 0;
  }

  .ping-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ip-card {
    padding: 18px 20px;
  }

  .ip-dual {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .nav .full {
    display: none;
  }

  .nav .short {
    display: inline;
  }

  .nav {
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px 10px;
  }

  h1,
  .section-head h2 {
    font-size: 1.4em;
  }

  .desc,
  .section-head p {
    font-size: 0.82em;
  }

  .ip-card,
  .ip-hero,
  .card {
    padding: 14px 16px;
  }

  .ip-value,
  .ip-addr {
    font-size: 1.15em;
    gap: 6px;
  }

  .ip-truncate {
    max-width: 120px;
    font-size: 0.78em;
  }

  .ip-geo {
    font-size: 0.85em;
  }

  .ping-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .ping-item {
    padding: 6px 8px;
    font-size: 0.78em;
  }

  .ping-item .ping-icon,
  .site-cell .favicon {
    width: 16px;
    height: 16px;
  }

  .ping-dots {
    gap: 1px;
  }

  .ping-dot {
    width: 4px;
    height: 4px;
  }

  .main-table {
    font-size: 0.78em;
  }

  .main-table th,
  .main-table td {
    padding: 7px 8px;
  }

  .site-cell {
    gap: 5px;
  }

  .site-badge {
    padding: 1px 5px;
    font-size: 0.65em;
    margin-left: 3px;
  }

  .site-badge.speed,
  .site-badge.static,
  .site-badge.media,
  .site-badge.tools,
  .site-badge.crypto,
  .site-badge.social,
  .site-badge.ai,
  .site-badge.dev {
    display: none;
  }

  .flag-icon {
    width: 18px;
  }

  .section-divider {
    margin: 20px 0;
  }

  .card-title-row {
    align-items: flex-start;
  }

  .dev-long {
    max-width: 56%;
    font-size: 0.72em;
  }

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card {
  border: 1px solid #d8dce0;
  border-radius: 12px;
  background: #fafbfc;
  padding: 14px;
}

.metric-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
  color: #111827;
  margin-bottom: 6px;
}

.metric-card span {
  display: block;
  color: #6b7280;
  font-size: 0.92rem;
}

.mini-note {
  color: #8b949e;
  font-size: 0.92rem;
}

.empty-state {
  color: #6b7280;
  padding: 8px 0;
}

.site-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tiny-dot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tiny-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: #c7ccd1;
}

.tiny-dot.reachable {
  background: #00a36c;
}

.tiny-dot.degraded {
  background: #f59e0b;
}

.tiny-dot.timeout,
.tiny-dot.blocked {
  background: #ef4444;
}

.stacked-lines {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.pill-row {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  margin: 0 8px 8px 0;
  border-radius: 999px;
  border: 1px solid #d8dce0;
  background: #f8fafc;
}

.candidate-list code {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.85rem;
}


.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d8dce0;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
  color: #3d4954;
  font-size: 0.88rem;
}

.hero-card {
  padding: 20px 20px 18px;
}

.card-desc {
  color: #5f6b76;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.hero-action {
  min-width: 104px;
}

.hero-action.secondary {
  background: #f6f8fa;
}

.callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.callout-card {
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 14px 16px;
}

.callout-title {
  color: #66707b;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.callout-main {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.callout-subtle {
  color: #6f7a85;
  font-size: 0.88rem;
}

.wrap-anywhere {
  word-break: break-word;
}

.candidate-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.candidate-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #eef2f6;
  color: #556371;
}

.candidate-type-badge.host {
  background: #e8f1ff;
  color: #1d4ed8;
}

.candidate-type-badge.srflx {
  background: #e6f6ee;
  color: #057a55;
}

.candidate-type-badge.relay {
  background: #fff4dd;
  color: #a16207;
}

.candidate-type-badge.prflx {
  background: #f5e8ff;
  color: #7c3aed;
}

.candidate-ip-list {
  color: #5f6b76;
  font-size: 0.84rem;
}

@media (max-width: 740px) {
  .candidate-row-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.title-icon,
.flag-icon,
.mini-flag-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.title-icon {
  width: 16px;
  height: 16px;
  font-size: 14px;
}

.flag-icon {
  width: 24px;
  height: 24px;
  font-size: 18px;
}

.mini-flag-img {
  width: 14px;
  height: 14px;
  font-size: 12px;
}
