:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-strong: #101316;
  --surface-muted: #e9eef1;
  --text: #111820;
  --muted: #5b6875;
  --muted-strong: #34414f;
  --line: #d8e0e6;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --mint: #d9f8ef;
  --amber: #a35c00;
  --amber-bg: #fff1d6;
  --red: #b42318;
  --red-bg: #ffe5e0;
  --green: #167245;
  --green-bg: #e2f6e9;
  --gray-bg: #eef2f5;
  --shadow: 0 24px 70px rgba(20, 29, 38, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.1), rgba(246, 247, 249, 0) 28rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

code,
pre,
input,
button {
  font: inherit;
}

button,
input {
  border: 0;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0 5vw;
  background: rgba(246, 247, 249, 0.9);
  border-bottom: 1px solid rgba(216, 224, 230, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 760;
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-strong);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted-strong);
  font-size: 0.94rem;
  font-weight: 650;
}

.top-nav a {
  padding: 0.5rem 0;
}

.top-nav a:hover {
  color: var(--teal-dark);
}

.hero {
  min-height: calc(100vh - 4.25rem);
  padding: clamp(3rem, 6vw, 5.6rem) 5vw clamp(2.5rem, 5vw, 4.5rem);
}

.hero-inner,
.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.55rem, 6.6vw, 4.85rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.headline-word {
  display: block;
  white-space: nowrap;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-text {
  max-width: 46rem;
  margin: 1.45rem 0 0;
  color: var(--muted-strong);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-metrics > div {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.metric-value,
.metric-label {
  display: block;
}

.metric-value {
  color: var(--surface-strong);
  font-size: 1.08rem;
  font-weight: 780;
}

.metric-label {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-panel {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(216, 224, 230, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-canvas {
  display: block;
  width: 100%;
  height: clamp(8rem, 19vw, 13rem);
  border-radius: 7px;
  background: #12171b;
}

.lookup-form {
  margin-top: 1rem;
}

.lookup-form label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 720;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.input-row input {
  min-width: 0;
  width: 100%;
  height: 3.1rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  color: var(--text);
  outline: none;
}

.input-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border-radius: var(--radius);
  font-weight: 760;
  white-space: nowrap;
}

.primary-button {
  min-width: 9.6rem;
  padding: 0 1rem;
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.primary-button:disabled {
  cursor: wait;
  background: #7a9290;
}

.ghost-button {
  padding: 0 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.82rem;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.form-note {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.form-note code {
  color: var(--teal-dark);
  font-weight: 740;
}

.result-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.result-kicker {
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.result-header h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.status-pill,
.class-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 1.8rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: normal;
}

.beta-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  margin-left: 0.3rem;
  padding: 0.1rem 0.38rem;
  border: 1px solid rgba(163, 92, 0, 0.25);
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.status-idle,
.class-unknown {
  background: var(--gray-bg);
  color: #52606d;
}

.status-loading {
  background: #d7f1ff;
  color: #075985;
}

.status-found,
.class-mainstream {
  background: var(--green-bg);
  color: var(--green);
}

.status-missing {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-error,
.class-disposable,
.class-suspicious {
  background: var(--red-bg);
  color: var(--red);
}

.class-privacy-relay {
  background: var(--mint);
  color: var(--teal-dark);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.result-grid div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #e6edf2;
  border-radius: 7px;
  background: #ffffff;
}

.result-grid dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.result-grid dd {
  margin: 0.28rem 0 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.interpretation {
  margin: 1rem 0 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
}

.signal-section,
.api-section {
  padding: clamp(3rem, 6vw, 5.5rem) 5vw;
}

.signal-section {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 46rem;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.signal-card {
  min-width: 0;
  min-height: 12rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.signal-card p,
.api-copy p {
  margin: 0.75rem 0 0;
  color: var(--muted-strong);
}

.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.api-copy {
  min-width: 0;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.3rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted-strong);
  overflow-x: auto;
}

.endpoint-row span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.endpoint-row code {
  white-space: nowrap;
}

.code-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #eef7f4;
  box-shadow: var(--shadow);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #bfcbc8;
  font-size: 0.82rem;
  font-weight: 780;
}

.raw-toolbar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  color: #e7fff8;
  font-size: 0.9rem;
  line-height: 1.55;
}

.raw-json {
  max-height: 19rem;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .api-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 48rem;
  }

  h1 {
    max-width: 100%;
  }

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

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-metrics,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .result-header {
    flex-direction: column;
  }
}
