:root {
  color-scheme: dark;
  --bg: #07100e;
  --surface: #0b1714;
  --surface-2: #10201c;
  --line: rgba(186, 226, 207, .15);
  --line-bright: rgba(186, 226, 207, .3);
  --text: #edf8f2;
  --muted: #8da79c;
  --accent: #59f0a7;
  --accent-2: #b4ffd8;
  --warning: #ffc65c;
  --critical: #ff6f7d;
  --info: #7ebcff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.grid-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: -1;
}
.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; align-items: center; gap: 28px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.04em;
  font-size: 20px;
}
.brand > span:last-child span { color: var(--accent); }
.brand-mark { width: 26px; height: 26px; display: grid; align-content: center; gap: 3px; }
.brand-mark i { display: block; height: 3px; background: var(--accent); border-radius: 5px; }
.brand-mark i:nth-child(1) { width: 13px; }
.brand-mark i:nth-child(2) { width: 22px; }
.brand-mark i:nth-child(3) { width: 17px; margin-left: 5px; }
.text-button {
  border: 0;
  background: transparent;
  padding: 6px;
  color: var(--muted);
  cursor: pointer;
}
.text-button:hover { color: var(--text); }
.status-link { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 13px; }
.status-link span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero { padding: 116px 0 80px; position: relative; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow span { color: var(--accent); }
h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(58px, 8.7vw, 116px);
  line-height: .91;
  letter-spacing: -.072em;
  font-weight: 700;
}
h1 em { color: var(--accent); font-style: normal; font-weight: 500; }
.hero-copy {
  max-width: 670px;
  margin: 38px 0 48px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}
.trace-form { max-width: 900px; }
.trace-form > label { display: block; margin-bottom: 10px; font: 500 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.input-shell {
  height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border: 1px solid var(--line-bright);
  background: rgba(10, 25, 21, .88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
}
.input-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(89, 240, 167, .09); }
.protocol { margin-left: 20px; padding: 7px 9px; background: rgba(89, 240, 167, .1); color: var(--accent); font: 500 11px/1 var(--mono); }
.input-shell input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 18px;
  font: 400 17px/1 var(--mono);
}
.input-shell input::placeholder { color: #53675f; }
.input-shell button {
  align-self: stretch;
  min-width: 184px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  border: 0;
  background: var(--accent);
  color: #06110d;
  font-weight: 800;
  cursor: pointer;
}
.input-shell button:hover { background: var(--accent-2); }
.input-shell button:disabled { opacity: .55; cursor: wait; }
.input-shell svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.form-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 13px; color: #6f887d; font: 400 11px/1.5 var(--mono); }
.form-meta span::before { content: "·"; color: var(--accent); margin-right: 8px; }
.hero-route {
  position: absolute;
  right: 8px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #40564d;
  font: 500 9px/1 var(--mono);
  letter-spacing: .15em;
}
.hero-route i { width: 30px; height: 1px; background: #2c4037; }
.progress-panel, .error-panel {
  margin: 20px 0 84px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.progress-head { display: flex; justify-content: space-between; align-items: center; }
.progress-head h2 { margin: 0; font-size: 25px; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-route { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto; align-items: center; margin: 32px 0 26px; }
.route-node {
  width: 66px; height: 58px; display: grid; place-items: center;
  align-content: center; gap: 7px; border: 1px solid var(--line);
  background: #091411; color: #50675e; transition: border-color .35s, color .35s, box-shadow .35s;
}
.route-node span { font: 400 8px/1 var(--mono); }
.route-node strong { font: 500 10px/1 var(--mono); letter-spacing: .08em; }
.route-node.active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 24px rgba(89, 240, 167, .12); }
.route-node.done { color: var(--text); border-color: var(--line-bright); }
.route-wire { position: relative; height: 1px; overflow: visible; background: var(--line); }
.route-wire i {
  position: absolute; top: -2px; left: -5px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent);
  opacity: 0;
}
.route-wire.active i { opacity: 1; animation: packet 1s cubic-bezier(.45,0,.55,1) infinite; }
.route-wire.done { background: rgba(89, 240, 167, .5); }
@keyframes packet { from { left: -5px; } to { left: calc(100% - 1px); } }
.progress-track { height: 2px; margin: 28px 0 20px; background: var(--line); }
.progress-track i { display: block; height: 100%; width: 8%; background: var(--accent); transition: width .5s ease; box-shadow: 0 0 12px var(--accent); }
.progress-steps { display: flex; justify-content: space-between; padding: 0; margin: 0; list-style: none; color: #526a60; font: 400 11px/1 var(--mono); }
.progress-steps li.active { color: var(--accent); }
.progress-steps li.done { color: var(--text); }
.error-panel { display: flex; gap: 20px; align-items: start; border-color: rgba(255,111,125,.35); }
.error-code { color: var(--critical); font: 500 11px/1 var(--mono); }
.error-panel h2 { margin: 0 0 8px; font-size: 20px; }
.error-panel p { color: var(--muted); margin: 0; }
.error-panel button { margin-left: auto; border: 0; background: transparent; font-size: 25px; color: var(--muted); cursor: pointer; }
.report { padding: 48px 0 90px; }
.report-header { display: flex; justify-content: space-between; gap: 30px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 34px; }
.report-header h2 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.05em; }
.report-header > div > a { display: block; max-width: 700px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font: 400 12px/1.5 var(--mono); white-space: nowrap; }
.report-actions { display: flex; gap: 8px; flex-shrink: 0; }
.secondary-button, .icon-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-bright);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.secondary-button:hover, .icon-button:hover { border-color: var(--accent); color: var(--text); }
.icon-button { width: 42px; padding: 0; color: var(--accent); font-size: 22px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-width: 0 0 1px 1px; margin-bottom: 68px; }
.metric { padding: 24px; border-right: 1px solid var(--line); }
.metric small { display: block; color: var(--muted); font: 500 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.metric strong { display: block; margin-top: 10px; font: 500 26px/1 var(--mono); }
.metric strong.good { color: var(--accent); }
.metric strong.warn { color: var(--warning); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-heading > div, .panel-header > div { display: flex; align-items: center; gap: 14px; }
.section-number { color: var(--accent); font: 500 10px/1 var(--mono); }
.section-heading h3, .panel-header h3 { margin: 0; font-size: 18px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.evidence-badge { padding: 6px 8px; border: 1px solid var(--line); color: #668075; font: 500 9px/1 var(--mono); letter-spacing: .1em; }
.timeline { position: relative; margin-bottom: 70px; }
.hop {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.hop.replay { animation: hop-in .55s cubic-bezier(.2,.8,.2,1) both; }
.hop.replay::after {
  content: ""; position: absolute; left: 18px; bottom: -1px; width: 0; height: 1px;
  background: var(--accent); animation: scan-line .7s .12s ease-out both;
}
@keyframes hop-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scan-line { to { width: calc(100% - 18px); opacity: 0; } }
.hop:first-child { border-top: 1px solid var(--line); }
.hop-index {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-bright); color: var(--accent); font: 500 11px/1 var(--mono);
}
.hop-main { min-width: 0; }
.hop-main strong { display: block; overflow: hidden; text-overflow: ellipsis; font: 500 13px/1.5 var(--mono); white-space: nowrap; }
.hop-detail { display: flex; gap: 14px; margin-top: 5px; color: var(--muted); font: 400 10px/1.4 var(--mono); }
.hop-status { display: flex; align-items: center; gap: 18px; }
.status-code { min-width: 48px; color: var(--accent); font: 500 16px/1 var(--mono); }
.status-code.redirect { color: var(--warning); }
.status-code.error { color: var(--critical); }
.elapsed { color: var(--muted); font: 400 12px/1 var(--mono); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.panel { border: 1px solid var(--line); background: rgba(10, 22, 19, .72); }
.panel-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.dns-group { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dns-group:last-child { border-bottom: 0; }
.dns-title { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.dns-title strong { font: 500 11px/1 var(--mono); color: var(--accent); }
.dns-title span { color: var(--muted); font: 400 10px/1 var(--mono); }
.dns-answer { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 7px 0; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.dns-answer code { color: var(--text); overflow-wrap: anywhere; }
.dns-empty { color: #60766d; font: 400 11px/1.4 var(--mono); }
.finding { display: grid; grid-template-columns: 9px 1fr; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--info); }
.finding.warning .finding-dot { background: var(--warning); }
.finding.critical .finding-dot { background: var(--critical); }
.finding.positive .finding-dot { background: var(--accent); }
.finding h4 { margin: 0 0 6px; font-size: 13px; }
.finding p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.finding code { display: block; margin-top: 8px; color: #60776c; font: 400 9px/1 var(--mono); }
.dependencies-panel { margin-top: 20px; }
.filter-set { gap: 5px !important; }
.filter { padding: 6px 9px; border: 1px solid transparent; background: transparent; color: var(--muted); font: 400 10px/1 var(--mono); cursor: pointer; }
.filter.active { border-color: var(--line-bright); color: var(--accent); }
.dependency-summary { display: flex; gap: 26px; padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font: 400 11px/1 var(--mono); }
.dependency-summary strong { color: var(--text); }
.dependency-list { max-height: 420px; overflow: auto; }
.dependency {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 15px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); font: 400 10px/1.45 var(--mono);
}
.dependency:last-child { border-bottom: 0; }
.dependency .type { color: var(--accent); text-transform: uppercase; }
.dependency a { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.dependency a:hover { color: var(--text); }
.dependency .party { color: #61786e; text-align: right; }
.observation-note { display: grid; grid-template-columns: 190px 1fr; gap: 20px; margin-top: 20px; padding: 20px; border-left: 2px solid var(--accent); background: rgba(89, 240, 167, .05); }
.observation-note strong { font: 500 11px/1.5 var(--mono); color: var(--accent); text-transform: uppercase; }
.observation-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.principles { padding: 90px 0 110px; border-top: 1px solid var(--line); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principle-grid article { min-height: 240px; padding: 32px; background: var(--bg); }
.principle-grid article > span { color: var(--accent); font: 500 10px/1 var(--mono); }
.principle-grid h3 { margin: 52px 0 12px; font-size: 17px; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 100px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.brand.small { font-size: 15px; color: var(--text); }
.brand.small .brand-mark { transform: scale(.72); transform-origin: left; width: 20px; }
dialog {
  width: min(680px, calc(100% - 32px));
  padding: 38px;
  border: 1px solid var(--line-bright);
  background: #0a1613;
  color: var(--text);
  box-shadow: 0 40px 140px #000;
}
dialog::backdrop { background: rgba(1, 8, 6, .82); backdrop-filter: blur(8px); }
dialog h2 { margin: 0 0 30px; font-size: 32px; letter-spacing: -.04em; }
.dialog-close { position: absolute; top: 18px; right: 18px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.method-list article { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.method-list article > span { color: var(--accent); font: 500 10px/1.5 var(--mono); }
.method-list h3 { margin: 0 0 6px; font-size: 14px; }
.method-list p, .dialog-footnote { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialog-footnote { margin-top: 24px; padding: 16px; background: var(--surface-2); }

@media (max-width: 850px) {
  .hero { padding-top: 80px; }
  .hero-route { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:last-child { grid-column: span 2; }
  .report-grid { grid-template-columns: 1fr; }
  .report-header { align-items: start; flex-direction: column; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 180px; }
  .principle-grid h3 { margin-top: 32px; }
}
@media (max-width: 620px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header nav .text-button { display: none; }
  .hero { padding: 62px 0 54px; }
  h1 { font-size: clamp(48px, 16vw, 76px); }
  .input-shell { height: auto; grid-template-columns: auto 1fr; }
  .input-shell input { height: 64px; padding-right: 12px; font-size: 14px; }
  .input-shell button { grid-column: 1 / -1; min-height: 56px; }
  .progress-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .live-route { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .route-node { width: 100%; height: 48px; }
  .route-wire { display: none; }
  .report-actions { width: 100%; flex-wrap: wrap; }
  .secondary-button { flex: 1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 18px; }
  .section-heading { align-items: start; }
  .section-heading .evidence-badge { display: none; }
  .hop { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .hop-status { grid-column: 2; justify-content: space-between; }
  .dependency { grid-template-columns: 70px minmax(0, 1fr); }
  .dependency .party { display: none; }
  .panel-header { align-items: start; flex-direction: column; padding-block: 16px; gap: 12px; }
  .filter-set { flex-wrap: wrap; }
  .observation-note { grid-template-columns: 1fr; }
  footer { padding: 24px 0; align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
