:root {
  --bg-1: #07111e;
  --bg-2: #0c1f35;
  --panel: #f7fafc;
  --panel-soft: #f0f5fa;
  --ink: #10253f;
  --ink-soft: #4e617a;
  --line: #d9e5f2;
  --accent: #1172e7;
  --accent-2: #0eb5b0;
  --ok: #16a46d;
  --warn: #dc5332;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 20px 48px rgba(4, 16, 30, 0.26);
  --shadow-2: 0 18px 40px rgba(16, 37, 63, 0.12);
  --font-main: "Manrope", "Space Grotesk", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  line-height: 1.62;
  background: radial-gradient(circle at 10% 10%, #14365f 0%, transparent 35%),
    radial-gradient(circle at 88% -8%, #185e5a 0%, transparent 42%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.5;
}

.orb-a {
  width: 560px;
  height: 560px;
  left: -180px;
  top: -230px;
  background: radial-gradient(circle, rgba(17, 114, 231, 0.42) 0%, rgba(17, 114, 231, 0) 70%);
}

.orb-b {
  width: 520px;
  height: 520px;
  right: -150px;
  top: 180px;
  background: radial-gradient(circle, rgba(14, 181, 176, 0.38) 0%, rgba(14, 181, 176, 0) 72%);
}

.grid-noise {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 90%);
}

.page {
  width: min(1260px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 30px 0 40px;
}

.hero-shell,
.dashboard {
  animation: rise-in 0.56s ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: 16px;
  align-items: stretch;
}

.brand-block,
.query-panel,
.verdict-panel,
.detail-panel,
.raw-json,
.hero-stat {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
}

.brand-block {
  padding: 30px 30px 28px;
  color: #eff7ff;
  background: linear-gradient(125deg, rgba(10, 38, 71, 0.95), rgba(7, 29, 57, 0.92));
  backdrop-filter: blur(6px);
  display: grid;
  gap: 14px;
}

.hero-mark {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #86e6e3;
  border: 1px solid rgba(134, 230, 227, 0.3);
  background: rgba(12, 50, 79, 0.6);
}

.hero-kicker {
  margin: 0;
  color: #97b6d6;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
}

.brand-copy h1 {
  margin: 6px 0 0;
  font-size: clamp(32px, 5.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.brand-copy p {
  margin: 14px 0 0;
  max-width: 52ch;
  color: #bfcee0;
  font-size: 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 201, 236, 0.3);
  background: rgba(8, 37, 67, 0.72);
  color: #d3e7ff;
  font-size: 12px;
  font-weight: 600;
}

.query-panel {
  padding: 22px;
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #f9fcff, #f1f7fc);
  border-color: rgba(173, 200, 230, 0.78);
  box-shadow: var(--shadow-2);
}

.query-head {
  display: grid;
  gap: 6px;
}

.query-kicker,
.section-kicker,
.risk-caption,
.source-panel span,
.hero-stat span,
.snapshot-card .label {
  margin: 0;
  color: #7289a2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.query-note,
.status,
.panel-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.status {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #ebf3fb;
  border: 1px solid #d8e7f7;
}

.status.error {
  color: #bb3a1c;
  background: #ffefea;
  border-color: #f7cec3;
}

.lookup-form {
  display: grid;
  gap: 10px;
}

.lookup-form input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid #c7d8ea;
  background: #fff;
  font: 600 16px/1 var(--font-main);
  color: var(--ink);
  outline: none;
}

.lookup-form input:focus {
  border-color: rgba(17, 114, 231, 0.55);
  box-shadow: 0 0 0 4px rgba(17, 114, 231, 0.11);
}

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

button {
  appearance: none;
  border: 0;
  border-radius: var(--radius-md);
  min-height: 48px;
  padding: 0 16px;
  font: 700 15px/1 var(--font-main);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#lookup-btn {
  color: #f8fdff;
  background: linear-gradient(120deg, #0d65d6, #0995dc);
  box-shadow: 0 10px 20px rgba(13, 101, 214, 0.28);
}

.secondary {
  color: #0d5cbc;
  background: linear-gradient(180deg, #e6f1ff, #d9e9ff);
  border: 1px solid #c2d8f5;
}

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

.chip {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #d0e0ef;
  background: #f8fbff;
  color: #24476f;
  font-size: 13px;
  font-weight: 700;
}

.dashboard {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.verdict-panel {
  --tone: #1b5ca5;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 18px;
  padding: 24px 26px;
  background: linear-gradient(180deg, #f8fbff, #f2f7fc);
  border: 1px solid rgba(159, 187, 216, 0.9);
  box-shadow: var(--shadow-2);
}

.tone-residential {
  --tone: var(--ok);
}

.tone-datacenter {
  --tone: #1c7cee;
}

.tone-other,
.tone-pending {
  --tone: #26496f;
}

.verdict-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--tone);
}

.verdict-copy p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  max-width: 56ch;
}

.evidence-list {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d1e0ef;
  background: #f4f9ff;
  color: #29517d;
  font-size: 13px;
  font-weight: 600;
}

.verdict-side {
  display: grid;
  gap: 12px;
}

.risk-panel,
.source-panel {
  border-radius: var(--radius-lg);
  background: #fbfdff;
  border: 1px solid #d2e2f2;
  padding: 16px 18px;
}

.risk-score {
  display: block;
  margin-top: 4px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  color: var(--tone);
}

.risk-bar {
  margin-top: 14px;
  height: 9px;
  border-radius: 999px;
  background: #e5eef8;
  overflow: hidden;
}

.risk-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11a16f, #0e89ee, #148fca);
  transition: width 0.32s ease;
}

.risk-label {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.source-panel strong {
  display: block;
  margin-top: 8px;
  word-break: break-word;
  font-size: 14px;
  color: #224264;
}

.overview-bar,
.snapshot-grid,
.detail-grid {
  display: grid;
  gap: 12px;
}

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

.hero-stat {
  min-width: 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  border: 1px solid rgba(149, 177, 207, 0.82);
  box-shadow: var(--shadow-2);
}

.hero-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.34;
  color: #17365a;
  word-break: break-word;
}

.detail-panel,
.raw-json {
  background: linear-gradient(180deg, #f8fbff, #f2f7fd);
  border: 1px solid rgba(153, 182, 210, 0.86);
  box-shadow: var(--shadow-2);
}

.detail-panel {
  padding: 20px 22px;
}

.compact-panel {
  padding-bottom: 18px;
}

.snapshot-grid {
  margin-top: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.snapshot-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid #d0deec;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
  padding: 15px;
}

.snapshot-card .value {
  display: block;
  margin-top: 8px;
  color: #17365b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.52;
  word-break: break-word;
}

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

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h3 {
  margin: 4px 0 0;
  color: #163759;
  font-size: 22px;
  line-height: 1.2;
}

.detail-table {
  margin-top: 14px;
  display: grid;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #e3edf8;
}

.detail-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-key {
  color: #657d97;
  font-size: 14px;
}

.detail-value {
  color: #163657;
  font-size: 15px;
  word-break: break-word;
}

.table-wrap {
  margin-top: 14px;
  max-height: 450px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid #cfdfef;
  background: #fff;
}

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

.field-table th,
.field-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ebf2fa;
}

.field-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f8fe;
  color: #2c4c71;
}

.raw-json {
  padding: 18px 20px;
}

.raw-json summary {
  cursor: pointer;
  font-weight: 800;
  color: #173758;
}

.raw-json pre {
  margin: 14px 0 0;
  padding: 14px;
  max-height: 360px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid #cfdfef;
  background: #fff;
  color: #17365a;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
}

.footer {
  margin-top: 14px;
  padding: 14px 10px 4px;
  color: #a8bfd7;
  font-size: 13px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .hero-shell,
  .verdict-panel,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .query-panel {
    order: 2;
  }

  .brand-block {
    order: 1;
  }

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

@media (max-width: 760px) {
  .page {
    width: calc(100vw - 18px);
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .brand-block,
  .query-panel,
  .verdict-panel,
  .detail-panel,
  .raw-json,
  .hero-stat {
    border-radius: 16px;
  }

  .brand-block {
    padding: 22px;
  }

  .brand-copy h1 {
    font-size: clamp(30px, 10vw, 40px);
  }

  .overview-bar,
  .snapshot-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .panel-head h3 {
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .hero-mark {
    letter-spacing: 0.08em;
    font-size: 11px;
  }

  .query-note,
  .status,
  .detail-key,
  .detail-value {
    font-size: 13px;
  }

  .hero-stat strong {
    font-size: 20px;
  }
}
