:root {
  --bg: #080b16;
  --surface: rgba(20, 26, 44, 0.72);
  --surface-solid: #121a2c;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.32);
  --text: #e8edf7;
  --muted: #94a3b8;
  --brand: #818cf8;
  --brand-2: #22d3ee;
  --valid: #34d399;
  --likely: #60a5fa;
  --risky: #fbbf24;
  --invalid: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  padding: 0 20px 64px;
  font-family: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 700px at 15% -10%, #1b2450 0%, transparent 60%),
              radial-gradient(900px 600px at 90% 0%, #0d3446 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.glow-a { width: 520px; height: 520px; background: #4338ca; top: -160px; left: -120px; }
.glow-b { width: 460px; height: 460px; background: #0891b2; top: 120px; right: -160px; }

main, .site-header, .site-footer { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 4px 10px;
  flex-wrap: wrap;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo { display: inline-flex; }
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: 0.3px; display: flex; align-items: baseline; gap: 8px; }
.brand-text small { font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand-2); opacity: 0.85; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; }
/* `hidden` must beat any author display rule (cards / badges / toast rely on it). */
[hidden] { display: none !important; }
.pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(129, 140, 248, 0.1);
  color: #c7d2fe;
}
.pill.mode { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.12); color: #a5f3fc; }

.hero { padding: 26px 4px 22px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.5px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--brand) 0%, var(--brand-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub { margin: 0; color: var(--muted); font-size: 15px; }
.hero code, .info-card code, .hint code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: #cbd5e1; letter-spacing: 0.2px; }
.field input,
.select-field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: rgba(8, 11, 22, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: #64748b; }
.field input:focus, .select-field select:focus {
  border-color: rgba(129, 140, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix {
  position: absolute;
  left: 13px;
  color: var(--brand-2);
  font-weight: 700;
  font-size: 15px;
  pointer-events: none;
}
.input-group input { padding-left: 32px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }

.options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.select-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #cbd5e1; }
.select-field select { min-width: 170px; padding: 9px 12px; font-size: 13px; }
.check-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #cbd5e1; cursor: pointer; }
.check-field input { width: 16px; height: 16px; accent-color: var(--brand); }

.actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary {
  border: none;
  background: linear-gradient(96deg, #6366f1, #22d3ee);
  color: #051226;
  box-shadow: 0 14px 34px -16px rgba(99, 102, 241, 0.9);
}
.btn.ghost { background: transparent; color: var(--muted); }
.btn.small { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; font-weight: 600; }

.error {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
  font-size: 13px;
}

.domain-card { display: grid; gap: 14px; }
.domain-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.domain-name { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0; }
.domain-item {
  background: rgba(8, 11, 22, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}
.domain-item dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 0 0 2px; }
.domain-item dd { margin: 0; font-size: 13px; word-break: break-all; }
.note-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }

.results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.results-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; margin: 2px 0 0; }

.progress { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; font-size: 12.5px; color: var(--muted); }
.progress-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.16); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width 0.25s ease; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip b { font-weight: 700; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.valid { color: #86efac; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.chip.likely { color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.1); }
.chip.risky { color: #fcd34d; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
.chip.invalid { color: #fda4af; border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.1); }

.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(129, 140, 248, 0.06); }
.email-cell { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; word-break: break-all; }
.email-cell .person { display: block; font-family: inherit; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.order-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(129, 140, 248, 0.12);
  color: #c7d2fe;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.valid { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.badge.likely { color: #93c5fd; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
.badge.risky { color: #fcd34d; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
.badge.invalid { color: #fda4af; background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.3); }
.badge.unknown { color: #cbd5e1; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.3); }
.badge.pending { color: #94a3b8; background: rgba(100, 116, 139, 0.12); border-color: rgba(100, 116, 139, 0.3); }
.badge.pending .dot { animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.conf { display: flex; align-items: center; gap: 8px; min-width: 92px; }
.conf-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(148, 163, 184, 0.18); overflow: hidden; }
.conf-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #22d3ee); }
.conf span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.reason { color: #cbd5e1; font-size: 12.5px; max-width: 420px; }
.reason details { margin-top: 4px; }
.reason summary { cursor: pointer; color: var(--muted); font-size: 11.5px; }
.checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.checks li { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; }
.checks li .mark { font-weight: 700; }
.checks li.pass .mark { color: var(--valid); }
.checks li.fail .mark { color: var(--invalid); }
.checks li.warn .mark { color: var(--risky); }
.checks li.info .mark { color: var(--likely); }

.row-actions { white-space: nowrap; }
.icon-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

.info-card h2 { margin-bottom: 14px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.info-grid h3 { margin: 0 0 6px; font-size: 14px; color: #c7d2fe; }
.info-grid p { margin: 0; font-size: 13px; color: var(--muted); }
.disclaimer {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 12.5px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  padding: 8px 4px 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #0f172a;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 30;
}

@media (max-width: 760px) {
  body { padding: 0 14px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .hide-sm { display: none; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(8, 11, 22, 0.45);
  }
  tbody td { border: none; padding: 4px 0; }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    margin-bottom: 2px;
  }
  tbody td:last-child::before { display: none; }
  .reason { max-width: none; }
  .results-tools { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
