:root {
  color-scheme: dark;
  --bg: #07110e;
  --bg-deep: #030806;
  --surface: #0c1814;
  --surface-raised: #11211b;
  --surface-soft: #14261f;
  --line: #213b31;
  --line-bright: #345748;
  --text: #f2f8f4;
  --text-soft: #b9c9c0;
  --muted: #789086;
  --mint: #9cf6c3;
  --mint-strong: #69e9a1;
  --mint-ink: #072316;
  --amber: #f4cc7c;
  --red: #ff9d91;
  --radius: 18px;
  --shadow: 0 32px 90px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(156, 246, 195, .34);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.backdrop {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 780px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(53, 157, 105, .18), transparent 28%),
    radial-gradient(circle at 18% 12%, rgba(156, 246, 195, .08), transparent 34%),
    linear-gradient(180deg, #0b1813 0%, var(--bg) 82%);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(156, 246, 195, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 246, 195, .12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.site-header, main, .site-footer {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgba(156, 246, 195, .14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -.02em;
}
.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--mint);
  color: var(--mint-ink);
  font-size: 15px;
  font-weight: 900;
}

nav { display: flex; align-items: center; gap: 26px; }
nav a, .site-footer a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}
nav a:hover, .site-footer a:hover { color: var(--mint); }
.service-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 25px;
  border-left: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
}
.pulse, .mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-strong);
  box-shadow: 0 0 0 5px rgba(105, 233, 161, .1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
  gap: 80px;
  align-items: center;
  min-height: 540px;
  padding: 76px 0 62px;
}
.eyebrow, .section-label {
  margin: 0;
  color: var(--mint);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 23px; }
.eyebrow span { width: 24px; height: 1px; background: var(--mint); }
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(47px, 6.2vw, 78px);
  line-height: 1.02;
  letter-spacing: -.062em;
}
h1 em { color: var(--mint); font-style: normal; }
.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.7;
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 26px;
  padding: 0;
  margin: 30px 0 0;
  list-style: none;
}
.trust-list li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.trust-list li::before { content: "✓"; margin-right: 8px; color: var(--mint); }

.proof-card {
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 34, 28, .96), rgba(7, 17, 14, .96));
  box-shadow: var(--shadow);
}
.proof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.live-tag {
  padding: 5px 8px;
  border: 1px solid rgba(156, 246, 195, .24);
  border-radius: 5px;
  color: var(--mint);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.pipeline { padding: 7px 20px 9px; margin: 0; list-style: none; }
.pipeline li {
  display: grid;
  grid-template-columns: 30px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(52, 87, 72, .5);
}
.pipeline li:last-child { border: 0; }
.pipeline li > span { color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.pipeline strong, .pipeline small { display: block; }
.pipeline strong { font-size: 13px; }
.pipeline small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.pipeline b { color: var(--mint); font-size: 12px; }

.resolver {
  position: relative;
  z-index: 2;
  padding: 30px;
  border: 1px solid var(--line-bright);
  border-radius: 22px 22px 0 0;
  background: rgba(12, 24, 20, .94);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .3);
}
.resolver-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.resolver h2 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.03em; }
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}
.mode-badge.sample .mode-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(244, 204, 124, .09); }
.mode-badge.error .mode-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 157, 145, .09); }

.search-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 24px; }
.url-field { position: relative; }
.url-field svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 21px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 52px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #07110e;
  color: var(--text);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
input:hover { border-color: var(--line-bright); }
input:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(105, 233, 161, .08); }
input::placeholder { color: #587066; }
.primary-button, .secondary-button, .text-button, .tab-bar button {
  border: 0;
  cursor: pointer;
}
.primary-button {
  display: inline-flex;
  min-width: 184px;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border-radius: 11px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 780;
  box-shadow: 0 10px 28px rgba(105, 233, 161, .13);
  transition: transform .2s, background .2s;
}
.primary-button:hover { transform: translateY(-1px); background: #b1fbd0; }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.search-support { display: flex; justify-content: space-between; gap: 15px; margin-top: 12px; }
.search-support p { margin: 0; color: var(--muted); font-size: 12px; }
.text-button {
  padding: 0;
  background: transparent;
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
}
.text-button:hover { text-decoration: underline; }

.workspace {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: var(--surface);
}
.empty-state {
  max-width: 580px;
  margin: auto;
  padding: 72px 30px 84px;
  text-align: center;
}
.empty-visual {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
}
.empty-visual div {
  position: absolute;
  inset: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  background: var(--surface-raised);
  color: var(--mint);
  font-weight: 800;
}
.empty-visual span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.empty-visual span:nth-child(2) { inset: 10px; }
.empty-visual span:nth-child(3) { inset: 19px; }
.empty-state h2 { margin: 10px 0 12px; font-size: 28px; letter-spacing: -.035em; }
.empty-state > p:not(.section-label) { margin: 0 auto; color: var(--muted); line-height: 1.7; }
.secondary-button {
  min-height: 42px;
  margin-top: 23px;
  padding: 0 17px;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 700;
}
.secondary-button:hover { border-color: var(--mint); color: var(--mint); }

.loading-state {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  align-items: center;
  max-width: 720px;
  margin: auto;
  padding: 125px 30px;
}
.loading-state p { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); text-align: center; }
.loading-avatar { width: 76px; height: 76px; border-radius: 20px; }
.loading-copy { display: grid; gap: 10px; }
.loading-copy span { display: block; height: 13px; border-radius: 6px; }
.loading-copy span:first-child { width: 42%; height: 21px; }
.loading-copy span:nth-child(2) { width: 68%; }
.loading-copy span:nth-child(3) { width: 28%; }
.shimmer {
  background: linear-gradient(90deg, var(--surface-raised), var(--surface-soft), var(--surface-raised));
  background-size: 220% 100%;
  animation: shimmer 1.35s infinite linear;
}
@keyframes shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shimmer { animation: none; }
  * { transition: none !important; }
}

.error-state {
  display: grid;
  grid-template-columns: auto minmax(0, 580px);
  gap: 20px;
  justify-content: center;
  padding: 88px 30px;
}
.error-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 157, 145, .35);
  border-radius: 50%;
  background: rgba(255, 157, 145, .08);
  color: var(--red);
  font-weight: 900;
}
.error-state h2 { margin: 8px 0 10px; font-size: 26px; }
.error-state > div > p:not(.section-label) { color: var(--text-soft); line-height: 1.6; }
.error-actions { display: flex; gap: 18px; align-items: center; }
.error-actions .secondary-button { margin-top: 10px; }

.profile-result { min-width: 0; }
.profile-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(156, 246, 195, .045), transparent 45%);
}
.avatar {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 20px;
  background: linear-gradient(145deg, #1d3c30, #0d1e18);
  color: var(--mint);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.04em;
}
.identity { min-width: 0; }
.identity-row { display: flex; align-items: center; gap: 12px; }
.identity h2 { overflow: hidden; margin: 0; font-size: 28px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.source-chip {
  flex: none;
  padding: 5px 8px;
  border: 1px solid rgba(156, 246, 195, .2);
  border-radius: 6px;
  background: rgba(156, 246, 195, .06);
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.source-chip.sample { border-color: rgba(244, 204, 124, .25); background: rgba(244, 204, 124, .06); color: var(--amber); }
.profile-headline { margin: 6px 0 3px; color: var(--text-soft); font-size: 14px; }
.profile-location { margin: 0; color: var(--muted); font-size: 12px; }
.external-link {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.external-link:hover { border-color: var(--mint); color: var(--mint); }

.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.signal { min-width: 0; padding: 21px 24px; border-right: 1px solid var(--line); }
.signal:last-child { border: 0; }
.signal span, .signal small, .signal strong { display: block; }
.signal span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.signal strong { margin-top: 7px; font: 700 21px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.signal small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.tab-bar { display: flex; gap: 28px; padding: 0 30px; border-bottom: 1px solid var(--line); }
.tab-bar button {
  position: relative;
  padding: 17px 1px 15px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.tab-bar button[aria-selected="true"] { color: var(--text); }
.tab-bar button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--mint);
}

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); }
.main-column { min-width: 0; border-right: 1px solid var(--line); }
.side-column { min-width: 0; }
.content-section { padding: 28px 30px; border-bottom: 1px solid var(--line); }
.content-section:last-child { border-bottom: 0; }
.content-section.compact { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading > span { color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.body-copy { margin: 15px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.75; }

.timeline { margin-top: 21px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding-bottom: 25px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; top: 13px; bottom: -2px; left: 4px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 4px; border: 2px solid var(--surface); border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 1px var(--line-bright); }
.timeline-title { margin: 0; font-size: 14px; font-weight: 760; }
.timeline-subtitle { margin: 4px 0 0; color: var(--text-soft); font-size: 12px; }
.timeline-meta { margin: 5px 0 0; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.timeline-description { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chip {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(156, 246, 195, .035);
  color: var(--text-soft);
  font-size: 11px;
}
.detail-list { display: grid; gap: 13px; margin-top: 16px; }
.detail-item { display: grid; gap: 3px; }
.detail-item strong { font-size: 12px; }
.detail-item span { color: var(--muted); font-size: 10px; }
.provenance-card { background: rgba(156, 246, 195, .018); }
.provenance-card dl { display: grid; gap: 9px; margin: 16px 0 0; }
.provenance-card dl div { display: flex; justify-content: space-between; gap: 15px; }
.provenance-card dt { color: var(--muted); font-size: 10px; }
.provenance-card dd { overflow: hidden; margin: 0; color: var(--text-soft); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.limitations { display: grid; gap: 8px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.limitations p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.limitations p::before { content: "i"; display: inline-grid; width: 14px; height: 14px; margin-right: 7px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--text-soft); font-size: 8px; }

.json-toolbar { display: flex; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
#json-output {
  max-height: 720px;
  overflow: auto;
  padding: 25px 30px;
  margin: 0;
  color: #c5e6d5;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.result-footer { display: flex; justify-content: space-between; gap: 20px; padding: 14px 30px; border-top: 1px solid var(--line); color: var(--muted); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }

.platform-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 50px 0 74px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.platform-strip > div { display: grid; padding: 24px; border-right: 1px solid var(--line); }
.platform-strip > div:last-child { border: 0; }
.platform-strip strong { margin-bottom: 23px; color: var(--mint); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.platform-strip span { font-size: 12px; font-weight: 760; }
.platform-strip small { margin-top: 5px; color: var(--muted); font-size: 10px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer b { color: var(--mint); }
.site-footer div { display: flex; gap: 18px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 65px 0 55px; }
  .proof-card { max-width: 620px; }
  .overview-grid { grid-template-columns: 1fr; }
  .main-column { border-right: 0; }
  .side-column { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
  .side-column .content-section { border-right: 1px solid var(--line); }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .signal:nth-child(2) { border-right: 0; }
  .signal:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .platform-strip { grid-template-columns: repeat(2, 1fr); }
  .platform-strip > div:nth-child(2) { border-right: 0; }
  .platform-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .site-header, main, .site-footer { width: min(100% - 28px, 1220px); }
  .site-header { min-height: 68px; }
  nav > a { display: none; }
  .service-status { padding-left: 0; border: 0; }
  h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero { min-height: 0; padding: 52px 0 42px; }
  .hero-lead { font-size: 16px; }
  .resolver { padding: 21px; }
  .resolver-heading { align-items: flex-start; flex-direction: column; }
  .mode-badge { align-self: flex-start; }
  .search-form { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .search-support { align-items: flex-start; flex-direction: column; }
  .profile-header { grid-template-columns: auto 1fr; padding: 22px; }
  .external-link { grid-column: 1 / -1; text-align: center; }
  .avatar { width: 62px; height: 62px; border-radius: 16px; }
  .identity h2 { font-size: 22px; }
  .identity-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .signal { padding: 17px; }
  .signal strong { font-size: 18px; }
  .content-section, .content-section.compact { padding: 22px; }
  .side-column { grid-template-columns: 1fr; }
  .side-column .content-section { border-right: 0; }
  .platform-strip { grid-template-columns: 1fr; }
  .platform-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .platform-strip > div:nth-child(3) { border-bottom: 1px solid var(--line); }
  .result-footer, .site-footer { align-items: flex-start; flex-direction: column; }
  .result-footer { padding-inline: 22px; }
  .site-footer { padding-bottom: 28px; }
}

@media (max-width: 420px) {
  .service-status { font-size: 10px; }
  .trust-list { display: grid; }
  .proof-card { margin-inline: -2px; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal { border-right: 0; border-bottom: 1px solid var(--line); }
  .signal:nth-child(3) { border-bottom: 1px solid var(--line); }
}
