:root {
  --bg: #050604;
  --ink: #f4f5ee;
  --muted: rgba(244, 245, 238, 0.64);
  --faint: rgba(244, 245, 238, 0.38);
  --line: rgba(244, 245, 238, 0.14);
  --line-strong: rgba(244, 245, 238, 0.22);
  --panel: rgba(12, 14, 11, 0.84);
  --acid: #b7ff2a;
  --acid-2: #7cff68;
  --danger: #ff5c3f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(183, 255, 42, 0.06), transparent 360px),
    radial-gradient(circle at 50% 0%, rgba(183, 255, 42, 0.11), transparent 420px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(244, 245, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 238, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 75%);
}

button,
input {
  font: inherit;
}

button {
  min-height: 52px;
  border: 1px solid var(--acid);
  border-radius: 6px;
  background: var(--acid);
  color: #081006;
  cursor: pointer;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 180ms ease-out, opacity 180ms ease-out, border-color 180ms ease-out;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: Inter, sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.topline,
.eyebrow,
.status,
.scan-panel label,
.footer {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topline {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.56fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 116px);
  padding: clamp(52px, 9vh, 92px) 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--acid);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(58px, 7.1vw, 112px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.88;
}

.scan-panel {
  align-self: center;
  border: 1px solid var(--line-strong);
  background: rgba(5, 6, 4, 0.72);
  padding: 28px;
}

.scan-panel label {
  display: block;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0;
  min-height: 58px;
  border: 1px solid var(--line-strong);
  background: #090a08;
}

.input-row span {
  padding-left: 18px;
  color: var(--acid);
  font-weight: 900;
}

.input-row input {
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.input-row input::placeholder {
  color: var(--faint);
}

.input-row button {
  height: 56px;
  border-radius: 0;
  border-width: 0 0 0 1px;
}

.status {
  min-height: 32px;
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.status.error {
  color: var(--danger);
}

.result-view {
  padding: clamp(30px, 4.5vh, 52px) 0 clamp(40px, 7vh, 72px);
}

.result-view.is-active {
  display: block;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  margin-bottom: clamp(18px, 3vh, 30px);
}

.back-link {
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 13px 15px;
  text-decoration: none;
  text-transform: uppercase;
}

.result-card-wrap {
  width: min(920px, 100%);
  min-height: 0;
  margin: clamp(14px, 3vh, 28px) auto 0;
  border: 1px solid var(--line);
  background: rgba(7, 8, 6, 0.64);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.result-card-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.loading-card {
  display: grid;
  place-items: center;
  min-height: clamp(260px, 38vw, 420px);
  width: 100%;
  padding: 42px 22px;
  text-align: center;
}

.loading-card p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.loading-dots {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.loading-dots span {
  width: 13px;
  height: 13px;
  background: var(--acid);
  border-radius: 999px;
  animation: dotPulse 900ms ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.result-summary h2 {
  margin: 0 0 14px;
  max-width: 760px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.result-summary p:not(.eyebrow) {
  color: var(--muted);
  max-width: 640px;
  font-size: 18px;
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.result-controls {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 18px;
  background: rgba(5, 6, 4, 0.48);
}

.result-controls button {
  min-width: 180px;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 54px;
  padding-top: 18px;
  color: var(--faint);
  font-size: 10px;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero,
  .result-header {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: calc(100vh - 100px);
    gap: 34px;
    padding: 58px 0 38px;
  }

}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topline {
    display: none;
  }

  h1 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .scan-panel {
    padding: 14px;
  }

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

  .input-row button {
    grid-column: 1 / -1;
    border-width: 1px 0 0;
  }

  .result-view {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .result-card-wrap {
    margin-top: 18px;
  }

  .result-controls button {
    width: 100%;
  }
}
