:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #171717;
  --muted: #686762;
  --line: #d8d5cb;
  --panel: #fffefa;
  --accent: #f5c842;
  --accent-soft: #fff3bb;
  --clear: #176b45;
  --clear-soft: #e8f4ec;
  --shadow: 0 18px 50px rgba(23, 23, 23, 0.08);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: 30px 0 0;
}

.wordmark {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.wordmark:focus-visible,
.creator-link:focus-visible,
.source-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.page-shell {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 56px 24px 88px;
}

.creator-credit {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.creator-link {
  color: var(--ink);
  font-weight: 720;
  text-underline-offset: 3px;
}

.creator-link:hover {
  text-decoration-thickness: 2px;
}

.hero {
  width: min(100%, 720px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

h1 {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(2.65rem, 6vw, 4.5rem);
  font-weight: 760;
  letter-spacing: -0.064em;
  line-height: 0.98;
}

.intro {
  max-width: 610px;
  margin: 28px auto 0;
  color: #44433f;
  font-size: clamp(1.03rem, 2.3vw, 1.22rem);
  line-height: 1.55;
}

.scan-button {
  position: relative;
  display: inline-grid;
  width: min(100%, 490px);
  min-height: 72px;
  margin-top: 36px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 0 #c9a11e;
  cursor: pointer;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 740;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.scan-button:hover:not(:disabled) {
  background: #2a2a28;
  transform: translateY(-2px);
  box-shadow: 0 9px 0 #c9a11e;
}

.scan-button:active:not(:disabled) {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #c9a11e;
}

.scan-button:focus-visible {
  outline: 4px solid var(--accent-soft);
  outline-offset: 5px;
}

.scan-button:disabled {
  cursor: wait;
}

.spinner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
}

.scan-button.is-loading .button-label {
  opacity: 0;
}

.scan-button.is-loading .spinner {
  opacity: 1;
  animation: spin 700ms linear infinite;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 23px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.privacy-note svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.results {
  width: min(100%, 620px);
  margin: 42px auto 0;
  text-align: left;
  animation: reveal 260ms ease both;
}

.results:focus {
  outline: none;
}

.result-summary {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.result-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.result-kicker::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.results--clear .result-kicker::before {
  background: var(--clear);
}

.result-title {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.result-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.match-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.match-card {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.match-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.match-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.status-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #d8ae13;
  border-radius: 5px;
  color: #4c3b00;
  background: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.015em;
}

.status-chip--community {
  border-color: #aaa79e;
  color: #474640;
  background: transparent;
}

.match-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.source-link {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.limitation {
  margin: 17px auto 0;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
  text-align: center;
}

.probe-frame {
  position: fixed;
  top: -10px;
  left: -10px;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.noscript {
  margin-top: 28px;
  color: #9c2e23;
  font-size: 0.9rem;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 36px, 1180px);
    padding-top: 22px;
  }

  .page-shell {
    align-items: start;
    padding: 74px 18px 56px;
  }

  .creator-credit {
    margin-top: 16px;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .intro {
    margin-top: 22px;
  }

  .scan-button {
    min-height: 66px;
    margin-top: 30px;
  }

  .privacy-note {
    max-width: 290px;
  }

  .results {
    margin-top: 34px;
  }

  .result-summary,
  .match-card {
    padding: 20px;
  }

  .match-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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