/* ==========================================================================
   IPGuard · Precision Instrument Design System
   Swiss editorial / industrial hardware manual · light, 1px borders, no shadows
   ========================================================================== */

:root {
  --paper: #f9f9f7;
  --surface: #ffffff;
  --surface-alt: #f2f2ef;
  --surface-soft: #eeeeec;
  --ink: #111111;
  --muted: #555555;
  --muted-2: #7b7f7e;
  --line: #d8d8d4;
  --line-soft: #e6e6e2;
  --orange: #ff4d00;
  --orange-soft: rgba(255, 77, 0, 0.07);
  --green: #00875a;
  --green-soft: rgba(0, 135, 90, 0.07);
  --red: #ba1a1a;
  --red-soft: rgba(186, 26, 26, 0.06);
  --radius: 2px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "tnum" on, "lnum" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--ink);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.text-muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.ellipsis {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ta-r {
  text-align: right;
}

.sep {
  color: var(--line);
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 56px;
}

.grid {
  display: grid;
  gap: 20px;
}

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

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--ink);
}

.topbar__inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.brand__mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.brand__mark .ico {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.brand__mark--sm {
  width: 20px;
  height: 20px;
}

.brand__mark--sm .ico {
  width: 12px;
  height: 12px;
}

.brand__name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: #fff;
  padding: 1px 5px;
  border-radius: var(--radius);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav__link {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  white-space: nowrap;
  flex: 0 0 auto;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav__link:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.nav__link.is-active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.search {
  position: relative;
  width: 232px;
}

.search__icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 30px;
  padding: 0 42px 0 29px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.search__input::placeholder {
  color: var(--muted-2);
}

.search__input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.search__kbd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 4px;
  pointer-events: none;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-alt);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: #2f3130;
}

.btn--sm {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
}

.btn--sm .ico {
  width: 14px;
  height: 14px;
}

.btn--icon {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-color: var(--line);
}

.btn--icon:hover {
  border-color: var(--ink);
}

.btn.is-spinning .ico {
  animation: spin 0.9s linear infinite;
}

.btn.is-live {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

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

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  text-transform: uppercase;
}

.badge--green {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.badge--orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.badge--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot--green {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.dot--orange {
  background: var(--orange);
}

.dot--red {
  background: var(--red);
}

/* ---------------------------------------------------------------- notice */

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.notice__left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  min-width: 0;
}

.notice__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius);
  flex: none;
}

.notice__muted {
  color: var(--muted);
}

/* ---------------------------------------------------------------- card */

.card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.card--alert {
  border-left: 4px solid var(--orange);
}

.card__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.card__hd h2,
.card__hd h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.card__hd h2 .ico,
.card__hd h3 .ico {
  width: 15px;
  height: 15px;
}

.card__hd--split {
  align-items: flex-start;
}

.card__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0;
}

.card__bd {
  padding: 18px 20px;
}

.card__foot {
  font-size: 11px;
  color: var(--muted);
  padding: 10px 20px 12px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}

.empty {
  padding: 26px 20px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------- hero */

.hero__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 20px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--muted);
}

.hero__strip-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__strip-text strong {
  color: var(--ink);
}

.hero__strip-right {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero__strip-right span {
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--green);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.hero__main {
  padding: 26px 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  border-right: 1px solid var(--ink);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero__ip-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__flag {
  font-size: 30px;
  line-height: 1;
}

.hero__ip {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  word-break: break-all;
}

.hero__loc {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.hero__loc strong {
  color: var(--ink);
  font-weight: 600;
}

.hero__loc .ico {
  color: var(--ink);
}

.hero__loc-sep {
  color: var(--line);
}

.hero__loc-cn {
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--radius);
  white-space: nowrap;
}

.chip b {
  color: var(--ink);
  font-weight: 600;
}

.hero__side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  background: var(--paper);
}

.gauge {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.gauge + .gauge {
  border-top: 1px solid var(--ink);
}

.gauge__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge__top .ico {
  width: 14px;
  height: 14px;
  color: var(--ink);
}

.gauge__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.gauge__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.gauge__value.is-good {
  color: var(--green);
}

.gauge__value.is-warn {
  color: var(--orange);
}

.gauge__value.is-bad {
  color: var(--red);
}

.gauge__note {
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
}

/* ---------------------------------------------------------------- scoreboard */

.score-big {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  flex: none;
}

.score-big__value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-big__unit {
  font-size: 11px;
  color: var(--muted);
}

.score-big__label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.barwrap {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.segbar {
  position: relative;
  height: 20px;
  background: var(--surface);
  border: 1px solid var(--ink);
  padding: 2px;
}

.segbar__fill {
  height: 100%;
  background: var(--ink);
  position: relative;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.segbar__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent 12px,
    rgba(255, 255, 255, 0.85) 12px,
    rgba(255, 255, 255, 0.85) 14px
  );
  opacity: 0.55;
}

.segbar__fill.is-warn {
  background: var(--orange);
}

.segbar__fill.is-bad {
  background: var(--red);
}

.segbar__scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}

.clean-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 8px;
}

.clean-note b {
  color: var(--ink);
}

.checkgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.check {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  border-left: 1px solid var(--line-soft);
  min-width: 0;
}

.check:first-child {
  border-left: 0;
}

.check__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.check__label {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.check__label .ico {
  width: 13px;
  height: 13px;
}

.check__state {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.check__value {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.check[data-state="pass"] .check__state { color: var(--green); }
.check[data-state="warn"] .check__state { color: var(--orange); }
.check[data-state="fail"] .check__state { color: var(--red); }
.check[data-state="info"] .check__state { color: var(--muted); }

.check[data-state="warn"],
.check[data-state="fail"] {
  background: var(--orange-soft);
  box-shadow: inset 0 2px 0 var(--orange);
}

.check[data-state="fail"] {
  background: var(--red-soft);
  box-shadow: inset 0 2px 0 var(--red);
}

.check[data-state="warn"] .check__value {
  color: var(--orange);
}

.check[data-state="fail"] .check__value {
  color: var(--red);
}

/* ---------------------------------------------------------------- key/value */

.kv {
  margin: 0;
}

.kv__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 20px;
  border-top: 1px solid var(--line-soft);
  min-height: 40px;
}

.kv__row:first-child {
  border-top: 0;
}

.kv__k {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  flex: none;
}

.kv__k .ico {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.kv__v {
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
  max-width: 62%;
  overflow-wrap: anywhere;
}

.kv__v.mono {
  font-size: 11.5px;
}

.kv__sub {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.kv--tight .kv__row {
  padding: 8px 0;
}

.state-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  white-space: nowrap;
}

.state-chip[data-state="pass"] {
  color: var(--green);
  border-color: rgba(0, 135, 90, 0.35);
  background: var(--green-soft);
}

.state-chip[data-state="warn"] {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-soft);
}

.state-chip[data-state="fail"] {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
}

.state-chip[data-state="skip"],
.state-chip[data-state="info"] {
  color: var(--muted);
  border-color: var(--line);
}

.hash {
  font-family: var(--mono);
  font-size: 10.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: var(--radius);
  display: inline-block;
  word-break: break-all;
}

/* ---------------------------------------------------------------- tables */

.tablewrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table th {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 8px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 9px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--paper);
}

.table--dense th {
  padding: 7px 14px;
}

.table--dense td {
  padding: 6px 14px;
  font-size: 11.5px;
}

.table--dense td:first-child {
  white-space: nowrap;
}

.table .ta-r {
  text-align: right;
}

.kind {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.kind--proxy {
  color: var(--orange);
  border-color: rgba(255, 77, 0, 0.5);
  background: var(--orange-soft);
}

.kind--cdn {
  color: var(--ink);
  border-color: var(--ink);
}

.kind--fingerprint {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-alt);
}

.kind--ingress {
  color: var(--ink);
  border-color: var(--muted-2);
  background: var(--surface-alt);
}

.json {
  margin: 0;
  padding: 14px 20px;
  background: var(--paper);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink);
  overflow: auto;
  max-height: 320px;
  white-space: pre;
}

/* ---------------------------------------------------------------- diag */

.diag {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.diag__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: var(--radius);
  flex: none;
}

.diag__icon--ok {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.diag--ok {
  border-left-color: var(--green);
}

.diag__body {
  flex: 1 1 420px;
  min-width: 0;
}

.diag__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.diag__title h4 {
  font-size: 13px;
  font-weight: 700;
}

.diag__text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.diag__list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag__list strong {
  color: var(--ink);
  font-weight: 600;
}

.diag__list .mono {
  color: var(--orange);
  font-weight: 600;
  margin-right: 2px;
}

.diag__sep {
  color: var(--line);
  margin: 0 4px;
}

.diag__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------------------------------------------------------------- page head */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 720px;
}

.page-head .row-actions {
  margin-top: 0;
}

/* ---------------------------------------------------------------- stats */

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  padding: 14px 18px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat:first-child {
  border-left: 0;
}

.stat__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat__value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat__value[data-state="pass"] { color: var(--green); }
.stat__value[data-state="warn"] { color: var(--orange); }
.stat__value[data-state="fail"] { color: var(--red); }

.stat__note {
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- prose */

.prose {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 10px;
}

.prose h4 {
  font-size: 12.5px;
  font-weight: 700;
  margin: 18px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prose h4:first-child {
  margin-top: 0;
}

.prose ul {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prose code.code,
.code {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1px 5px;
  font-size: 11px;
}

.prose pre.json {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 8px;
  max-height: 260px;
}

.prose .method {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.prose .method--post {
  background: var(--green);
}

.prose .method--del {
  background: var(--orange);
}

/* ---------------------------------------------------------------- resolve */

.resolve-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 20px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 320px;
}

.field__label {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  height: 34px;
  padding: 0 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  font-size: 12.5px;
  color: var(--ink);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.field__input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

/* ---------------------------------------------------------------- footer */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--ink);
  padding: 22px 0 26px;
  margin-top: auto;
  font-size: 11.5px;
  color: var(--muted);
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer__name {
  font-weight: 600;
  color: var(--ink);
}

.footer__meta {
  font-size: 10.5px;
}

.footer__sep {
  color: var(--line);
}

.footer__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
}

.footer__bottom p {
  font-family: var(--sans);
  font-size: 11px;
}

.footer__status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

/* ---------------------------------------------------------------- loading */

body.is-loading .hero__ip {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

body.is-loading .check__value {
  opacity: 0.6;
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: calc(100vw - 40px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__main {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .hero__side {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
  }

  .gauge + .gauge {
    border-top: 0;
    border-left: 1px solid var(--ink);
  }

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

  .check {
    border-top: 1px solid var(--line-soft);
  }

  .check:nth-child(1),
  .check:nth-child(2),
  .check:nth-child(3) {
    border-top: 0;
  }

  .check:nth-child(4) {
    border-left: 0;
  }

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

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

  .search {
    width: 180px;
  }
}

@media (max-width: 700px) {
  .wrap {
    padding: 0 16px;
  }

  .hide-sm {
    display: none !important;
  }

  .main {
    gap: 16px;
    padding-top: 16px;
  }

  .search {
    display: none;
  }

  .notice {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .notice__left {
    align-items: flex-start;
  }

  .notice__tag {
    margin-top: 2px;
  }

  .hero__main {
    padding: 20px 18px;
  }

  .gauge__value {
    font-size: 20px;
    white-space: nowrap;
  }

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

  .check:nth-child(3),
  .check:nth-child(5) {
    border-left: 0;
  }

  .check:nth-child(2) {
    border-left: 1px solid var(--line-soft);
  }

  .check:nth-child(3) {
    border-top: 1px solid var(--line-soft);
  }

  .kv__v {
    max-width: 58%;
  }

  .score-big__value {
    font-size: 26px;
  }

  .diag__actions {
    margin-left: 0;
    width: 100%;
  }

  .diag__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .table {
    min-width: 640px;
  }

  .table th,
  .table td {
    padding: 8px 12px;
  }

  .table .ellipsis {
    max-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------- print */

@media print {
  .topbar,
  .footer,
  .diag__actions,
  .row-actions,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card {
    break-inside: avoid;
    border-color: #999;
  }
}

/* 未知值：等到数据到达前保持留白，不写占位文案 */
.kv__v:empty::after,
.hash:empty::after {
  content: '—';
  color: var(--muted-2, #9A9A96);
}

