:root {
  /* Light Mode - Indigo / Tech Blue */
  --bg-color: #f5f7ff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  --nav-bg: rgba(255, 255, 255, 0.7);
  --nav-border: rgba(255, 255, 255, 0.4);
  
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.8);
  --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
  --card-hover-shadow: 0 12px 48px rgba(79, 70, 229, 0.15);
  
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --accent-color: #e0e7ff;
  
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --info-bg: #e0e7ff;
  --info-text: #3730a3;

  --skeleton-bg: #e2e8f0;
  --skeleton-shine: rgba(255,255,255,0.6);
  
  --topo-line: #c7d2fe;
  --topo-packet: #4f46e5;
  --topo-local: #a7f3d0;
  --topo-local-packet: #059669;
  --topo-limited: #fde68a;
  --topo-limited-packet: #d97706;
  --topo-blocked: #fecaca;
  --topo-blocked-packet: #dc2626;
  --topo-disabled: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --nav-bg: rgba(15, 23, 42, 0.7);
    --nav-border: rgba(255, 255, 255, 0.1);
    
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 12px 48px rgba(99, 102, 241, 0.2);
    
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --accent-color: rgba(99, 102, 241, 0.15);

    --success-bg: rgba(16, 185, 129, 0.2);
    --success-text: #34d399;
    --warning-bg: rgba(245, 158, 11, 0.2);
    --warning-text: #fbbf24;
    --danger-bg: rgba(239, 68, 68, 0.2);
    --danger-text: #f87171;
    --info-bg: rgba(99, 102, 241, 0.2);
    --info-text: #818cf8;

    --skeleton-bg: #1e293b;
    --skeleton-shine: rgba(255,255,255,0.05);
    
    --topo-line: #3730a3;
    --topo-packet: #818cf8;
    --topo-local: #065f46;
    --topo-local-packet: #34d399;
    --topo-limited: #92400e;
    --topo-limited-packet: #fbbf24;
    --topo-blocked: #991b1b;
    --topo-blocked-packet: #f87171;
    --topo-disabled: #334155;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s, opacity 0.18s ease, transform 0.18s ease;
}
body.page-leave { opacity: 0; transform: translateY(8px); }

.corner-brand {
  position: fixed;
  top: 18px;
  left: 24px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.corner-back {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--primary-color);
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.corner-back:hover { transform: translateY(-1px); background: rgba(99, 102, 241, 0.16); border-color: rgba(99, 102, 241, 0.38); }
.corner-back:active { transform: translateY(0); }
.corner-back:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 4px; }

/* Glassmorphism Nav */
nav {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nav-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { height: 0; }
nav .logo {
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  transition: transform 0.2s ease;
  transform-origin: left center;
}
nav .logo:hover { transform: scale(1.05); }
nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
nav a:hover {
  color: var(--text-primary);
  background: var(--accent-color);
}
nav a.active {
  color: white;
  background: var(--primary-color);
}
nav a.active:hover { background: var(--primary-hover); }

.container { width: 100%; max-width: 1200px; margin: 28px auto 48px; padding: 0 24px; box-sizing: border-box; overflow-x: hidden; }
.page-title { margin-bottom: 44px; text-align: center; }
.page-title h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.page-title p { color: var(--text-secondary); font-size: 15px; margin: 10px auto 0; line-height: 1.6; max-width: 860px; }

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.dashboard-top-right { display: flex; align-items: center; gap: 10px; }
.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-color);
  color: var(--primary-color);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-icon-link:hover { transform: translateY(-1px); }

.dashboard-hero {
  text-align: center;
  margin: 44px auto 20px;
  max-width: 980px;
}
.dashboard-hero h1 {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.dashboard-hero p {
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  max-width: 840px;
}

.search-section {
  max-width: 980px;
  margin: 24px auto 0;
  padding: 18px;
  border-radius: 26px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 70px rgba(31, 38, 135, 0.10);
  position: relative;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .search-section {
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.10);
  }
}
.search-section::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.38), rgba(99, 102, 241, 0) 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.search-section:focus-within::before { opacity: 1; }
.search-section:focus-within {
  box-shadow: 0 18px 70px rgba(31, 38, 135, 0.14), 0 0 32px rgba(99, 102, 241, 0.28);
  border-color: rgba(99, 102, 241, 0.25);
}
.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.search-input-wrap .search-input { width: 100%; }
.search-input {
  flex: 1 1 auto;
  height: 56px;
  padding: 0 20px;
  border: none;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 700;
  outline: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  min-width: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}
.search-clear-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.search-clear-btn.show { display: none; }
.search-input-wrap:hover .search-clear-btn.show,
.search-input-wrap:focus-within .search-clear-btn.show { display: inline-flex; }
.search-clear-btn:hover { background: rgba(148, 163, 184, 0.10); color: var(--text-primary); transform: translateY(-50%) translateY(-1px); }
.search-clear-btn:active { transform: translateY(-50%); }
.search-clear-btn:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
@media (prefers-color-scheme: dark) {
  .search-input {
    background: rgba(30, 41, 59, 0.58);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }
}
.search-input:focus { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(99, 102, 241, 0.18); }
.search-btn {
  height: 56px;
  border-radius: 18px;
  padding: 0 22px;
  font-size: 15px;
}
@media (max-width: 680px) {
  .search-row { flex-direction: column; align-items: stretch; }
  .search-btn { width: 100%; }
}

.dashboard-result-wrap {
  max-width: 800px;
  margin: 14px auto 0;
}
.dashboard-result-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
body.has-check-results .dashboard-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .dashboard-result-grid { grid-template-columns: 1fr; }
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-primary);
}
.card-title i { color: var(--primary-color); }
.dash-card { animation: card-in 260ms ease both; }
@keyframes card-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.muted { color: var(--text-secondary); }

.form-container {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  border-radius: 26px;
  box-shadow: 0 14px 54px rgba(31, 38, 135, 0.08);
  overflow: hidden;
}
.form-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 14px 54px rgba(31, 38, 135, 0.12), 0 0 0 2px rgba(79, 70, 229, 0.45), 0 0 24px rgba(79, 70, 229, 0.25);
}
.form-loading-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0), rgba(99, 102, 241, 0.95), rgba(99, 102, 241, 0));
  background-size: 260% 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.35));
}
.is-loading .form-loading-bar {
  opacity: 1;
  animation: form-loading 1s linear infinite;
}
@keyframes form-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}



/* Bento Grid & Glass Card */
.bento-card {
  position: relative; /* Ensure it's not absolute */
  height: auto;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}
a.bento-card,
a.bento-card:visited,
a.bento-card:hover,
a.bento-card:active {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.bento-card:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 4px; }
.bento-card.hoverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary-color);
}

/* Skeleton Screen */
.skeleton {
  background: var(--skeleton-bg);
  background-image: linear-gradient(90deg, var(--skeleton-bg) 0px, var(--skeleton-shine) 40px, var(--skeleton-bg) 80px);
  background-size: 200% 100%;
  animation: shine 1.5s infinite linear;
  border-radius: 8px;
}
@keyframes shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  min-width: 96px;
  border-radius: 12px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }

.issue.issue-error { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.35); }
.issue.issue-warning { background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.35); }
.issue.issue-info { background: var(--info-bg); border-color: rgba(99, 102, 241, 0.22); }
.issue-title i { flex: none; }

.level { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.level-error { background: var(--danger-bg); color: var(--danger-text); }
.level-warning { background: var(--warning-bg); color: var(--warning-text); }
.level-info { background: var(--info-bg); color: var(--info-text); }

.overall-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 90px;
  border-radius: 20px;
  border: 2px solid currentColor;
  background: var(--bg-color);
  animation: breathe 2s infinite alternate;
  padding: 0 16px;
}
.overall-rating.score-Aplus, .overall-rating.score-A { color: var(--success-text); border-color: var(--success-text); filter: drop-shadow(0 0 8px var(--success-text)); }
.overall-rating.score-B { color: var(--warning-text); border-color: var(--warning-text); filter: drop-shadow(0 0 8px var(--warning-text)); }
.overall-rating.score-C, .overall-rating.score-F { color: var(--danger-text); border-color: var(--danger-text); filter: drop-shadow(0 0 8px var(--danger-text)); }
@keyframes breathe {
  0% { opacity: 0.8; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.02); }
}
.rating-label { font-size: 11px; font-weight: 900; text-transform: uppercase; margin-bottom: 4px; opacity: 0.8; letter-spacing: 1px; }
.rating-value { font-size: 36px; font-weight: 900; line-height: 1; }

.days-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--skeleton-bg);
  border: 1px solid var(--card-border);
  margin-top: 6px;
}
.days-fill {
  height: 100%;
  width: var(--days-pct, 0%);
  background: var(--days-color, var(--success-text));
  border-radius: 999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.days-text.days-ok { color: var(--success-text); }
.days-text.days-warn { color: var(--warning-text); }
.days-text.days-danger { color: var(--danger-text); }

/* Common Grid & Tool Card Styles */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.tool-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tool-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--primary-color); background: var(--accent-color); }

.tool-name { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.tool-desc { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; flex: 1; }

.tool-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag { font-size: 12px; font-weight: 600; color: var(--text-secondary); background: var(--skeleton-bg); padding: 4px 10px; border-radius: 999px; }

.tool-actions { display: flex; justify-content: flex-end; margin-top: auto; }

.tool-card { padding: 32px; }
.tool-card .tool-top { justify-content: center; width: 100%; margin-bottom: 18px; }
.tool-card .tool-desc { margin-bottom: 18px; text-align: center; }
.tool-card .tool-meta { margin-bottom: 0; justify-content: center; }

.landing-hero {
  text-align: center;
  margin: 44px auto 24px;
  max-width: 880px;
}
.landing-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.landing-hero p {
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  max-width: 720px;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 18px auto 0;
  max-width: 980px;
}
@media (max-width: 860px) {
  .landing-cards { grid-template-columns: 1fr; }
}
.landing-card {
  min-height: 200px;
  padding: 32px;
}
.landing-card-top {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
}
.landing-card .tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}
.landing-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}
.landing-card-desc {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

body.landing-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 44px;
}
body.landing-page .container {
  margin: 0;
  padding: 0;
  max-width: 980px;
}
body.landing-page .landing-hero { margin: 0 auto 24px; }
body.landing-page .landing-cards { margin: 0 auto 0; }

body.audit-page:not(.has-audit) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(72px, 11vh, 120px) 24px 0;
  overflow-y: auto;
  position: relative;
  padding-bottom: calc(min(1600px, 160vw) * 0.76 + 120px);
}
body.audit-page:not(.has-audit) .container {
  margin: 0;
  padding: 0;
  width: min(100%, 980px);
  max-width: 980px;
  position: relative;
  z-index: 1;
}
body.audit-page:not(.has-audit) .page-title { margin-bottom: 24px; }
body.audit-page:not(.has-audit) #auditWorkspace { display: none; }

.intro-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(10px);
}
.intro-logo { position: relative; }
.intro-logo-text {
  display: inline-block;
  font-size: clamp(54px, 8vw, 96px);
  font-weight: 950;
  letter-spacing: -1.6px;
  color: rgba(248, 250, 252, 0.98);
  background: linear-gradient(90deg, rgba(139,92,246,1) 0%, rgba(59,130,246,1) 45%, rgba(34,211,238,1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 70px rgba(99,102,241,0.34));
}

body.audit-page.intro-active:not(.has-audit) .intro-splash {
  opacity: 1;
  visibility: visible;
  animation: intro-splash-fade 600ms ease 900ms forwards;
}
body.audit-page.intro-active:not(.has-audit) .intro-logo-text {
  animation: intro-logo-pop 900ms cubic-bezier(0.16, 1, 0.3, 1) 0ms both;
}
body.audit-page.intro-active:not(.has-audit) .container {
  opacity: 0;
  transform: translate3d(0, 140px, 0);
  animation: intro-content-in 820ms cubic-bezier(0.16, 1, 0.3, 1) 1050ms forwards;
}
body.audit-page.intro-active:not(.has-audit) .hero-globe {
  opacity: 0;
  transform: translateX(-50%) translateY(calc(var(--globe-half, 62%) + 220px));
  animation: intro-globe-in 980ms cubic-bezier(0.16, 1, 0.3, 1) 1200ms forwards;
}
body.audit-page.intro-active:not(.has-audit) .hero-globe-texture { animation-play-state: paused !important; }

@keyframes intro-logo-pop {
  0% { transform: scale(0.88); filter: blur(10px) drop-shadow(0 18px 70px rgba(99,102,241,0.34)); opacity: 0; }
  55% { transform: scale(1.03); filter: blur(0px) drop-shadow(0 22px 90px rgba(99,102,241,0.38)); opacity: 1; }
  100% { transform: scale(1); filter: blur(0px) drop-shadow(0 18px 70px rgba(99,102,241,0.34)); opacity: 1; }
}
@keyframes intro-splash-fade {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}
@keyframes intro-content-in {
  from { opacity: 0; transform: translate3d(0, 140px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes intro-globe-in {
  from { opacity: 0; transform: translateX(-50%) translateY(calc(var(--globe-half, 62%) + 220px)); }
  to { opacity: 0.72; transform: translateX(-50%) translateY(var(--globe-half, 62%)); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-splash { display: none; }
  body.audit-page.intro-active:not(.has-audit) .container { animation: none !important; opacity: 1; transform: none; }
  body.audit-page.intro-active:not(.has-audit) .hero-globe { animation: none !important; opacity: 0.72; transform: translateX(-50%) translateY(var(--globe-half, 62%)); }
  body.audit-page.intro-active:not(.has-audit) .hero-globe-texture { animation-play-state: running !important; }
}

body.audit-page:not(.has-audit)::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  background:
    radial-gradient(920px 640px at 50% 112%, rgba(139, 92, 246, 0.42), rgba(59, 130, 246, 0.18) 52%, rgba(0, 0, 0, 0) 76%),
    radial-gradient(860px 620px at 30% 90%, rgba(236, 72, 153, 0.10), rgba(0, 0, 0, 0) 66%),
    radial-gradient(980px 720px at 78% 22%, rgba(59, 130, 246, 0.10), rgba(0, 0, 0, 0) 66%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.18s ease;
}
body.audit-page:not(.has-audit)::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.20), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 28% 14%, rgba(255,255,255,0.16), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 44% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 62% 18%, rgba(255,255,255,0.16), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 78% 30%, rgba(255,255,255,0.14), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 86% 20%, rgba(255,255,255,0.18), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 18% 70%, rgba(255,255,255,0.12), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 50% 78%, rgba(255,255,255,0.10), rgba(0,0,0,0) 60%),
    radial-gradient(1px 1px at 74% 72%, rgba(255,255,255,0.12), rgba(0,0,0,0) 60%),
    radial-gradient(1200px 900px at 50% 45%, rgba(2, 6, 23, 0.0), rgba(2, 6, 23, 0.28));
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
body.audit-page:not(.has-audit).fx-typing::before { opacity: 0.98; }
body.audit-page:not(.has-audit).is-checking::before { opacity: 1; animation: gh-breathe 1.35s ease-in-out infinite; }
@keyframes gh-breathe {
  0% { filter: blur(18px) brightness(1); transform: translateY(0); }
  50% { filter: blur(18px) brightness(1.08); transform: translateY(-10px); }
  100% { filter: blur(18px) brightness(1); transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body.audit-page:not(.has-audit)::before { animation: none !important; }
}

.hero-globe {
  --globe-half: 76%;
  --globe-tilt: 0.96;
  --globe-lift: 0%;
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 0;
  width: min(1600px, 160vw);
  height: min(1600px, 160vw);
  transform: translateX(-50%) translateY(var(--globe-half));
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 -10px 80px rgba(0, 255, 100, 0.25)) drop-shadow(0 0 120px rgba(0, 255, 100, 0.15)) drop-shadow(0 0 40px rgba(0, 255, 100, 0.4));
  z-index: 1;
}
.hero-globe-hit-layer {
  --globe-half: 76%;
  --globe-tilt: 0.96;
  --globe-lift: 0%;
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 0;
  width: min(1600px, 160vw);
  height: min(1600px, 160vw);
  transform: translateX(-50%) translateY(var(--globe-half));
  pointer-events: none;
  z-index: 12;
}
.hero-globe-hotspots {
  position: absolute;
  inset: 0;
  transform: translateY(var(--globe-lift)) scaleY(var(--globe-tilt));
  transform-origin: 50% 50%;
  pointer-events: none;
}
.hero-globe::before {
  content: "";
  position: absolute;
  inset: 9% 8% 24%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0) 44%),
    radial-gradient(circle at 50% 58%, rgba(59, 130, 246, 0.16), rgba(0, 0, 0, 0) 72%);
  filter: blur(18px);
  opacity: 0.95;
  pointer-events: none;
}
.hero-globe::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6%;
  height: 24%;
  background: none;
  pointer-events: none;
}
@media (max-width: 520px) {
  .hero-globe {
    --globe-half: 62%;
    --globe-tilt: 0.98;
    --globe-lift: 0%;
    bottom: 0;
    width: 124vw;
    height: 124vw;
  }
  .hero-globe-hit-layer {
    --globe-half: 62%;
    --globe-tilt: 0.98;
    --globe-lift: 0%;
    bottom: 0;
    width: 124vw;
    height: 124vw;
  }
}
body.audit-page.has-audit .hero-globe { display: none; }
body.audit-page.has-audit .hero-globe-hit-layer { display: none; }
body.audit-page.globe-pick .hero-globe { animation: none !important; opacity: 0.22; }
body.audit-page.globe-pick .hero-globe-hit-layer { display: none; }
body.audit-page.globe-pick .hero-globe-texture { animation: none !important; }
.hero-globe-canvas-abs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateY(var(--globe-lift)) scaleY(var(--globe-tilt));
  transform-origin: 50% 50%;
  border-radius: 50%;
  filter: saturate(1.14) contrast(1.12) brightness(1.08);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, rgba(255,255,255,1) 58%, rgba(255,255,255,0.82) 76%, rgba(255,255,255,0) 100%);
  mask-image: radial-gradient(circle at 50% 48%, rgba(255,255,255,1) 58%, rgba(255,255,255,0.82) 76%, rgba(255,255,255,0) 100%);
}
.hero-globe-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateY(var(--globe-lift)) scaleY(var(--globe-tilt));
  transform-origin: 50% 50%;
}
.hero-globe-rotor { transform-origin: 500px 500px; }
.hero-globe-canvas { width: 100%; height: 100%; display: block; }
.hero-globe-texture {
  transform-origin: 0 0;
  will-change: transform;
  transform: translate3d(-463.1px, 0, 0);
  animation: globe-texture 72s linear infinite;
}
.hero-globe { animation: globe-float 9s ease-in-out infinite; }
.hero-globe-hit-layer { animation: globe-float 9s ease-in-out infinite; }
body.audit-page.fx-typing .hero-globe { opacity: 0.8; }
body.audit-page.is-checking .hero-globe { opacity: 0.92; }
body.audit-page.intro-active:not(.has-audit) .hero-globe-hit-layer { animation: none !important; opacity: 0; }
@keyframes globe-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes globe-texture {
  from { transform: translate3d(-463.1px, 0, 0); }
  to { transform: translate3d(-1935.1px, 0, 0); }
}
@keyframes globe-float {
  0% { transform: translateX(-50%) translateY(var(--globe-half, 62%)); }
  50% { transform: translateX(-50%) translateY(calc(var(--globe-half, 62%) - 10px)); }
  100% { transform: translateX(-50%) translateY(var(--globe-half, 62%)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-globe { animation: none !important; }
  .hero-globe-hit-layer { animation: none !important; }
}

.audit-hero {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 18px;
  position: relative;
  z-index: 2;
  min-height: 300px;
}
.audit-search { margin-top: 0; }
.audit-search { position: relative; }
body.audit-page:not(.has-audit) .audit-search .search-row {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
body.audit-page:not(.has-audit) .audit-search .search-btn {
  min-width: 148px;
  width: auto;
}
.audit-page .audit-search.search-section {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}
.audit-page .audit-search.search-section::before { display: none; }
.audit-page .audit-search.search-section:focus-within { box-shadow: none; border-color: transparent; }
.audit-page .audit-search .search-row {
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 10px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.22);
}
.audit-page .audit-search .search-input {
  background: transparent;
  box-shadow: none;
  border-radius: 999px;
  height: 58px;
  padding-left: 22px;
}
.audit-page .audit-search .search-input:focus { transform: none; box-shadow: none; }
.audit-page .audit-search .search-btn {
  height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.audit-page .audit-search .search-clear-btn { right: 14px; }
.audit-page .audit-search.has-error .search-input { box-shadow: none; }
.audit-search .search-input {
  height: 60px;
  font-size: 18px;
  font-weight: 600;
  padding-right: 52px;
}
.audit-search .search-input::placeholder { color: rgba(148, 163, 184, 0.78); }
.audit-search .search-btn { height: 60px; }
.search-btn-label { display: inline; }
.audit-search.has-error .search-input { box-shadow: 0 12px 30px rgba(239, 68, 68, 0.20); }
.audit-search.has-error .search-input-wrap { animation: audit-shake 0.28s linear 0s 1; }
.audit-page-title {
  text-align: center;
  margin-bottom: 30px;
}
.audit-page-title h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.audit-page-title p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 10px auto 0;
  line-height: 1.6;
  max-width: 860px;
}
.audit-error {
  margin: 10px auto 0;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.18);
  font-size: 12px;
  font-weight: 800;
  color: var(--danger-text);
  display: none;
}
.audit-error.show { display: block; }
.audit-error.show { animation: audit-fade-in 0.16s ease; }
@keyframes audit-fade-in {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes audit-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.audit-samples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
body.audit-page.has-audit #auditSamples { display: none; }
body.audit-page.is-checking #auditSamples { opacity: 0.6; pointer-events: none; }
.audit-chip {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.audit-chip:hover { transform: translateY(-1px); color: var(--text-primary); border-color: rgba(99, 102, 241, 0.35); background: rgba(99, 102, 241, 0.10); }
.audit-chip:active { transform: translateY(0); }
.audit-chip:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }

.audit-workspace {
  max-width: 980px;
  margin: 18px auto 0;
  padding: 18px;
  gap: 16px;
  position: relative;
}
@media (max-width: 760px) {
  body.audit-page:not(.has-audit) {
    padding-top: 56px;
  }
  .audit-page-title {
    margin-bottom: 18px;
  }
  .audit-page-title h1 {
    font-size: 28px;
  }
  .audit-page-title p {
    font-size: 13px;
    line-height: 1.65;
  }
  .audit-page .audit-search .search-row {
    flex-direction: column;
    gap: 12px;
  }
  .audit-search .search-input {
    height: 56px;
    font-size: 18px;
    padding-left: 20px;
  }
  .audit-page .audit-search .search-btn { width: 100%; }
}
.audit-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.audit-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
  min-width: 240px;
}
.audit-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.audit-info-label {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-secondary);
}
.audit-info-val {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-primary);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.audit-mode-switch { display: flex; align-items: center; }
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
@media (prefers-color-scheme: dark) {
  .mode-pill { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.16); }
}
.mode-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.mode-btn:hover { color: var(--text-primary); transform: translateY(-1px); }
.mode-btn:active { transform: translateY(0); }
.mode-btn.active {
  background: var(--accent-color);
  color: var(--text-primary);
}
.mode-btn:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.audit-tab {
  appearance: none;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
@media (prefers-color-scheme: dark) {
  .audit-tab { background: rgba(30, 41, 59, 0.35); }
}
.audit-tab:hover { transform: translateY(-1px); color: var(--text-primary); border-color: rgba(99, 102, 241, 0.35); }
.audit-tab.active {
  background: var(--accent-color);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.45);
}

.audit-content { min-height: 0; }
body.has-audit .audit-content { min-height: 220px; }
.audit-panel {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 22px;
  box-shadow: 0 12px 46px rgba(15, 23, 42, 0.06);
}
@media (prefers-color-scheme: dark) {
  .audit-panel {
    background: rgba(15, 23, 42, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 12px 46px rgba(0, 0, 0, 0.22);
  }
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
@media (max-width: 760px) {
  .audit-grid { grid-template-columns: 1fr; }
}
.audit-mini-card {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.40);
}
@media (prefers-color-scheme: dark) {
  .audit-mini-card { background: rgba(30, 41, 59, 0.35); }
}

.audit-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--text-secondary);
}
.audit-empty-icon {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background: var(--accent-color);
  display: grid;
  place-items: center;
  color: var(--primary-color);
}
.audit-empty-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.audit-empty-desc { font-size: 13px; line-height: 1.75; max-width: 520px; }

.risk-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.risk-banner.success {
  color: var(--success-text);
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.22);
}

.csp-risk {
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.28);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 800;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.dual { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.dual-left { display: grid; gap: 14px; align-content: start; }
.dual-right { display: grid; gap: 14px; align-content: start; }
@media (max-width: 860px) { .dual { grid-template-columns: 1fr; } }

.friendly-block {
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.22);
}
@media (prefers-color-scheme: dark) {
  .friendly-block { background: rgba(30, 41, 59, 0.25); }
}
.friendly-title { font-size: 13px; font-weight: 900; color: var(--text-primary); margin-bottom: 10px; }
.friendly-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.friendly-text { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.raw-box {
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .raw-box { background: rgba(30, 41, 59, 0.25); }
}
.raw-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 900; color: var(--text-secondary); letter-spacing: 0.6px; margin-bottom: 10px; }
.raw-kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 12px; }
.raw-k { color: var(--text-secondary); font-weight: 800; }
.raw-v { color: var(--text-primary); font-weight: 800; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
@media (max-width: 860px) { .raw-kv { grid-template-columns: 1fr; } }
.raw-more { margin-top: 12px; text-align: left; border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 14px; padding: 10px 12px; background: rgba(148, 163, 184, 0.08); }
.raw-more summary { cursor: pointer; font-weight: 900; color: var(--text-secondary); }
.raw-more-body { margin-top: 10px; font-size: 12px; line-height: 1.7; max-height: none; overflow: visible; white-space: pre-wrap; word-break: break-word; }

.raw-json { margin: 0; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text-primary); }

.raw-direct-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.raw-direct-title { font-size: 12px; font-weight: 900; color: var(--text-secondary); letter-spacing: 0.6px; }
.raw-direct { margin: 0; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text-primary); }

.hdr-dashboard { padding: 22px; }
.hdr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.hdr-sub { margin-top: 6px; font-size: 13px; }
.hdr-head-left { display: flex; align-items: center; }
.hdr-head-right { display: flex; align-items: center; gap: 12px; }
.hdr-actions { display: flex; align-items: center; gap: 10px; }
.hdr-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.hdr-btn-ghost:hover { background: rgba(148, 163, 184, 0.15); }

.hdr-metrics {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 1080px) { .hdr-metrics { grid-template-columns: 1.2fr 1fr 1fr; } }
@media (max-width: 640px) { .hdr-metrics { grid-template-columns: 1fr 1fr; } }

.hdr-metric-card {
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .hdr-metric-card { background: rgba(30, 41, 59, 0.35); box-shadow: 0 14px 44px rgba(0, 0, 0, 0.20); }
}
.hdr-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(148, 163, 184, 0.1);
}
.hdr-metric-card[data-type="high"] .hdr-metric-icon { color: var(--danger-text); background: var(--danger-bg); }
.hdr-metric-card[data-type="opt"] .hdr-metric-icon { color: var(--warning-text); background: var(--warning-bg); }
.hdr-metric-card[data-type="ok"] .hdr-metric-icon { color: var(--success-text); background: var(--success-bg); }
.hdr-metric-card[data-type="unknown"] .hdr-metric-icon { color: var(--text-secondary); background: rgba(148, 163, 184, 0.15); }
.hdr-metric-label { margin-top: 10px; font-size: 12px; font-weight: 900; color: var(--text-secondary); letter-spacing: 0.4px; }
.hdr-metric-value { font-size: 28px; font-weight: 900; color: var(--text-primary); }
.hdr-metric-desc { margin-top: 6px; font-size: 12px; line-height: 1.6; }

.hdr-score-ring {
  --pct: calc(var(--score) * 1%);
  --ring: rgba(148, 163, 184, 0.25);
  --ring-color: var(--warning-text);
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) var(--pct), var(--ring) 0);
  position: relative;
  margin-bottom: 8px;
}
.hdr-score-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (prefers-color-scheme: dark) {
  .hdr-score-ring::before { background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255, 255, 255, 0.10); }
}
.hdr-score-ring.ok { --ring-color: var(--success-text); }
.hdr-score-ring.warn { --ring-color: var(--warning-text); }
.hdr-score-ring.bad { --ring-color: var(--danger-text); }
.hdr-score-num { position: relative; font-size: 28px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.hdr-score-sub { position: relative; margin-top: 2px; font-size: 11px; font-weight: 900; color: var(--text-secondary); }

.hdr-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-primary);
}
.hdr-section-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hdr-section-link:hover { color: var(--primary-color); }

.hdr-risk-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 860px) { .hdr-risk-wrap { grid-template-columns: 1fr; } }
.hdr-risk-card {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (prefers-color-scheme: dark) {
  .hdr-risk-card { background: rgba(30, 41, 59, 0.25); }
}
.hdr-risk-tag {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  background: var(--danger-bg);
  color: var(--danger-text);
}
.hdr-risk-title { font-size: 14px; font-weight: 900; color: var(--text-primary); margin-top: 4px; }
.hdr-risk-title span { color: var(--danger-text); margin-left: 6px; }

.hdr-risk-left { flex: 1; min-width: 0; }
.hdr-risk-title { font-size: 14px; font-weight: 900; color: var(--text-primary); margin-top: 8px; }
.hdr-risk-desc { margin-top: 6px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.hdr-risk-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.10);
  color: var(--primary-color);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.hdr-risk-btn:hover { transform: translateY(-1px); }

.hdr-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hdr-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hdr-filter {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.20);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .hdr-filter { background: rgba(30, 41, 59, 0.25); }
}
.hdr-filter.active { background: var(--accent-color); color: var(--text-primary); border-color: rgba(99, 102, 241, 0.35); }

.hdr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.20);
  color: var(--text-secondary);
}
@media (prefers-color-scheme: dark) {
  .hdr-search { background: rgba(30, 41, 59, 0.25); }
}
.hdr-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  width: 220px;
  min-width: 140px;
}

.hdr-list { display: grid; gap: 10px; }
.hdr-entry {
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .hdr-entry { background: rgba(30, 41, 59, 0.18); }
}
.hdr-summary {
  list-style: none;
  padding: 14px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr minmax(160px, 360px) 34px;
  gap: 12px;
  align-items: center;
}
.hdr-summary-static {
  cursor: default;
  grid-template-columns: 1fr minmax(160px, 360px);
}
@media (max-width: 860px) {
  .hdr-summary { grid-template-columns: 1fr; gap: 10px; }
  .hdr-summary-static { grid-template-columns: 1fr; }
}
.hdr-entry > summary::-webkit-details-marker { display: none; }
.hdr-sum-title { font-size: 14px; font-weight: 900; color: var(--text-primary); }
.hdr-sum-code { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.hdr-sum-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.hdr-issue-list { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.hdr-issue { font-size: 11px; font-weight: 900; color: var(--danger-text); background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.25); padding: 2px 8px; border-radius: 999px; }
.hdr-sum-value { font-size: 12px; font-weight: 800; color: var(--text-primary); text-align: right; word-break: break-word; min-width: 0; }
.hdr-sum-arrow { display: flex; align-items: center; justify-content: flex-end; color: var(--text-secondary); }
.hdr-sum-arrow i { transition: transform 0.15s ease; }
.hdr-entry[open] .hdr-sum-arrow i { transform: rotate(180deg); }
@media (max-width: 860px) { .hdr-sum-value { text-align: left; } .hdr-sum-arrow { display: none; } }

.hdr-detail { border-top: 1px solid var(--card-border); padding: 14px; }
.hdr-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .hdr-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hdr-detail-grid { grid-template-columns: 1fr; } }

.hdr-issue-detail { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hdr-issue-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-primary); }
.hdr-issue-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--danger-text); margin-top: 6px; flex-shrink: 0; }
.hdr-issue-more { font-size: 12px; color: var(--primary-color); text-decoration: none; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }

.hdr-repair-tabs { display: flex; align-items: center; gap: 16px; margin-top: 20px; border-top: 1px solid var(--card-border); padding-top: 16px; }
.hdr-repair-label { font-size: 13px; font-weight: 900; color: var(--text-secondary); }
.hdr-repair-list { display: flex; align-items: center; gap: 12px; }
.hdr-repair-tab {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.hdr-repair-tab:hover { color: var(--text-primary); }
.hdr-repair-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.hdr-repair-link { margin-left: auto; font-size: 12px; color: var(--text-secondary); text-decoration: none; }

.hdr-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; border-top: 1px solid var(--card-border); padding-top: 24px; }
@media (max-width: 760px) { .hdr-footer { grid-template-columns: 1fr; } }
.hdr-footer-card {
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (prefers-color-scheme: dark) {
  .hdr-footer-card { background: rgba(30, 41, 59, 0.25); }
}
.hdr-footer-title { font-size: 15px; font-weight: 900; }
.hdr-footer-desc { font-size: 13px; color: var(--text-secondary); }
.hdr-footer-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hdr-footer-card.guide { flex-direction: row; align-items: center; justify-content: space-between; }
.hdr-footer-icon-wrap { width: 48px; height: 48px; border-radius: 14px; background: rgba(99, 102, 241, 0.1); color: var(--primary-color); display: flex; align-items: center; justify-content: center; }

.hdr-block {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: visible;
}
@media (prefers-color-scheme: dark) {
  .hdr-block { background: rgba(30, 41, 59, 0.18); }
}
.hdr-block-title { font-size: 12px; font-weight: 900; color: var(--text-secondary); letter-spacing: 0.5px; margin-bottom: 8px; }
.hdr-block-body { font-size: 12px; color: var(--text-primary); font-weight: 800; line-height: 1.7; max-height: none; overflow: visible; white-space: pre-wrap; word-break: break-word; }
.hdr-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.10);
  color: var(--primary-color);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.hdr-copy:hover { transform: translateY(-1px); }

.dns-speed { margin-bottom: 10px; }
.dns-speed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.dns-speed-label { color: var(--text-secondary); font-weight: 700; }
.dns-speed-ms { font-weight: 900; }
.dns-speed-ms.speed-fast { color: var(--success-text); }
.dns-speed-ms.speed-mid { color: var(--warning-text); }
.dns-speed-ms.speed-slow { color: var(--danger-text); }
.dns-speed-bar { height: 8px; border-radius: 999px; overflow: hidden; background: var(--skeleton-bg); border: 1px solid var(--card-border); margin-top: 6px; }
.dns-speed-fill { height: 100%; border-radius: 999px; transition: width 0.2s ease; }
.dns-speed-fill.speed-fast { background: var(--success-text); }
.dns-speed-fill.speed-mid { background: var(--warning-text); }
.dns-speed-fill.speed-slow { background: var(--danger-text); }

.dns-table { display: grid; gap: 12px; }
.dns-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.40);
}
@media (prefers-color-scheme: dark) {
  .dns-row { background: rgba(30, 41, 59, 0.35); }
}
@media (max-width: 760px) {
  .dns-row { grid-template-columns: 1fr; }
}
.dns-node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dns-node-left { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dns-flag { font-size: 14px; line-height: 1; }
.dns-name { font-weight: 900; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dns-meta { margin-top: 8px; color: var(--text-secondary); font-size: 12px; word-break: break-word; }
.dns-ips { display: grid; gap: 10px; align-content: start; }
.dns-ipgroup { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.dns-type-label { color: var(--text-secondary); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; padding-top: 2px; }
.dns-iplist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) { .dns-iplist { justify-content: flex-start; } }
.dns-friendly { margin-top: 10px; font-size: 12px; color: var(--text-secondary); font-weight: 700; }
.dns-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.site-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  background: #0a0e1e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 0;
}
.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer a:hover {
  color: var(--primary-color);
}
.site-footer .footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer .footer-row + .footer-row {
  margin-top: 12px;
}
