/* DNS Dots. No framework, no build: tokens first, then layout, then components. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  color-scheme: dark;
  --bg: #05070c;
  --bg-elev: #0a0e16;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-strong: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2f7;
  --text-2: #a7b0c2;
  --text-3: #6c768b;
  --brand: #34e5a1;
  --brand-2: #22c9f0;
  --on-brand: #03180f;
  --ok: #34e5a1;
  --warn: #fbbf24;
  --bad: #fb7185;
  --muted: #5b6477;
  --g1: #2dd4bf;
  --g2: #a78bfa;
  --g3: #f472b6;
  --g4: #60a5fa;
  --map-land: #1d2736;
  --map-marker: #34e5a1;
  --grid-dot: rgba(255, 255, 255, 0.045);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --radius: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --panel: rgba(255, 255, 255, 0.7);
    --panel-strong: #ffffff;
    --border: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text: #0b1220;
    --text-2: #475569;
    --text-3: #7c8799;
    --brand: #0ca678;
    --brand-2: #0891b2;
    --on-brand: #ffffff;
    --ok: #0ca678;
    --warn: #d97706;
    --bad: #e11d48;
    --muted: #a3adbd;
    --g1: #0d9488;
    --g2: #7c3aed;
    --g3: #db2777;
    --g4: #2563eb;
    --map-land: #cdd5e1;
    --map-marker: #0ca678;
    --grid-dot: rgba(15, 23, 42, 0.06);
    --shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.35);
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(60rem 36rem at 50% -12rem, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(40rem 28rem at 100% 10%, color-mix(in srgb, var(--brand-2) 9%, transparent), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: color-mix(in srgb, var(--brand) 35%, transparent);
}

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- header and footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
}

.brand-mark .on {
  fill: var(--brand);
}

.brand-mark .off {
  fill: var(--text-3);
  opacity: 0.45;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-name span {
  color: var(--text-3);
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.site-footer {
  margin-top: 120px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 32px;
  font-size: 0.9rem;
  color: var(--text-3);
}

.footer-inner a:not(.brand) {
  color: var(--text-2);
  text-underline-offset: 3px;
}

.brand-small .brand-mark {
  width: 20px;
  height: 20px;
}

.brand-small .brand-name {
  font-size: 1rem;
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(48px, 9vw, 104px);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero .eyebrow {
  padding: 6px 14px 6px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  font-weight: 780;
  letter-spacing: -0.045em;
}

.gradient {
  background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 40rem;
  margin-top: 22px;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--text-2);
}

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(640px, 100%);
  margin-top: 38px;
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.check:focus-within {
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
  box-shadow: var(--shadow), 0 0 0 5px color-mix(in srgb, var(--brand) 14%, transparent);
}

.check input {
  flex: 1;
  min-width: 0;
  padding: 12px 8px 12px 20px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  outline: none;
}

.check input::placeholder {
  color: var(--text-3);
}

.check select {
  appearance: none;
  padding: 12px 30px 12px 14px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237c8799' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: var(--mono);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
}

.check select option {
  background: var(--bg-elev);
  color: var(--text);
}

.check button {
  flex: none;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s;
}

.check button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.check button:active {
  transform: translateY(0);
}

.form-error {
  min-height: 1.5em;
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--bad);
}

.assurance {
  font-size: 0.88rem;
  color: var(--text-3);
}

.map {
  width: 100%;
  margin: clamp(32px, 6vw, 56px) 0 0;
}

.map canvas {
  display: block;
  width: 100%;
  aspect-ratio: 180 / 66;
  mask-image: radial-gradient(ellipse 75% 85% at 50% 50%, black 55%, transparent 100%);
}

.map figcaption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.legend-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--map-marker);
  box-shadow: 0 0 12px var(--map-marker);
}

/* ---------- results ---------- */

.results {
  padding-top: 40px;
  scroll-margin-top: 72px;
}

.summary {
  position: relative;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.summary::before {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: radial-gradient(40rem 12rem at 0% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%);
}

.summary h2 {
  margin-top: 18px;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
}

.summary-text {
  max-width: 46rem;
  margin-top: 10px;
  color: var(--text-2);
}

.summary-eta {
  margin-top: 6px;
  font-weight: 600;
  color: var(--warn);
}

.summary-eta:empty {
  display: none;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button-ghost {
  position: relative;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-strong);
  font-size: 0.9rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.button-ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  transform: translateY(-1px);
}

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

.dotbar span,
.card-dot,
.group-dot {
  --size: 12px;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--c, var(--muted));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--muted)) 16%, transparent), 0 0 18px color-mix(in srgb, var(--c, var(--muted)) 55%, transparent);
  transition: background 0.4s, box-shadow 0.4s;
}

.dotbar span {
  --size: 14px;
}

[data-tone='pending'] .card-dot,
.dotbar span[data-tone='pending'] {
  box-shadow: none;
  animation: waiting 1.1s ease-in-out infinite alternate;
}

@keyframes waiting {
  from { opacity: 0.35; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.groups {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.group:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  transform: translateY(-1px);
}

.group[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 9%, var(--panel));
}

.group:disabled {
  cursor: default;
}

.group-dot {
  --size: 10px;
}

.group-value {
  max-width: 34ch;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-count {
  font-size: 0.85rem;
  color: var(--text-3);
}

.group-action {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 0.78rem;
  font-weight: 600;
}

.list-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 40px 0 14px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.list-title span {
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--text-3);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards-compact {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.4s, background 0.4s;
  animation: rise 0.5s var(--ease) both;
}

.card[data-tone='match'],
.card[data-tone='stale'],
.card[data-tone='failed'] {
  border-color: color-mix(in srgb, var(--c) 32%, var(--border));
  background: color-mix(in srgb, var(--c) 4%, var(--panel));
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}

.card-dot {
  margin-top: 6px;
}

.card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.card-name {
  font-weight: 650;
}

.card-ms,
.card-place,
.card-via,
.card-foot {
  font-size: 0.82rem;
  color: var(--text-3);
}

.card-value {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

[data-tone='failed'] .card-value {
  font-family: var(--font);
  color: var(--bad);
}

[data-tone='pending'] .card-value {
  color: var(--text-3);
}

.card-via {
  overflow-wrap: anywhere;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  margin-top: 6px;
}

.card-flush {
  color: var(--warn);
  font-weight: 600;
  text-decoration: none;
}

.card-flush:hover {
  text-decoration: underline;
}

/* ---------- content sections ---------- */

.section {
  padding-top: clamp(80px, 12vw, 132px);
  scroll-margin-top: 40px;
}

.section h2 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}

.section-lead {
  max-width: 44rem;
  margin-top: 18px;
  font-size: 1.08rem;
  color: var(--text-2);
}

.steps,
.layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.step,
.layers li {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.step h3,
.layers h3 {
  margin-top: 18px;
  font-size: 1.15rem;
}

.step p,
.layers p {
  margin-top: 8px;
  color: var(--text-2);
}

.step-dots {
  display: inline-flex;
  gap: 7px;
}

.step-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
}

.step-dots i.on {
  background: var(--brand);
  opacity: 1;
  box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 70%, transparent);
}

.layers {
  counter-reset: layer;
}

.layers li {
  counter-increment: layer;
}

.layers li::before {
  content: counter(layer, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
}

.tip {
  margin-top: 22px;
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--brand) 7%, transparent);
  color: var(--text-2);
}

.tip strong {
  color: var(--text);
}

.faq {
  display: grid;
  gap: 10px;
  max-width: 52rem;
  margin-top: 36px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.2s;
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-3);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 20px 20px;
  color: var(--text-2);
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .site-nav a:not(:last-child) {
    display: none;
  }
}

@media (max-width: 560px) {
  .check {
    flex-wrap: wrap;
    border-radius: 22px;
  }

  .check input {
    flex-basis: 100%;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }

  .check select {
    flex: 1;
    border-left: 0;
  }

  .check button {
    flex: 2;
  }

  .group-value {
    max-width: 22ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
  padding: 40px 20px;
  text-align: center;
}

.not-found h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  letter-spacing: -0.045em;
}

.not-found p {
  max-width: 34rem;
  margin: 16px auto 0;
  color: var(--text-2);
}

.not-found code {
  font-family: var(--mono);
  color: var(--bad);
}

.not-found .button-ghost {
  display: inline-block;
  margin-top: 28px;
  text-decoration: none;
}
