@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2ede1;
  --paper-light: #faf7ef;
  --surface: #fffdf8;
  --ink: #10231d;
  --ink-deep: #0a1914;
  --ink-soft: #48564e;
  --muted: #5f6a62;
  --line: rgba(16, 35, 29, 0.13);
  --line-strong: rgba(16, 35, 29, 0.23);
  --gold: #a67c3d;
  --gold-ink: #7e5927;
  --gold-button: #8b632b;
  --gold-button-hover: #765225;
  --gold-light: #d6c19a;
  --gold-wash: rgba(166, 124, 61, 0.1);
  --success: #1e5b45;
  --error: #983e31;
  --error-wash: rgba(152, 62, 49, 0.07);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --shadow-card: 0 30px 80px -44px rgba(16, 35, 29, 0.45);
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 560px at 83% -10%, rgba(196, 165, 106, 0.2), transparent 62%),
    radial-gradient(720px 540px at -8% 102%, rgba(35, 91, 68, 0.1), transparent 62%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

svg {
  display: block;
}

::selection {
  color: var(--surface);
  background: var(--success);
}

.page-frame {
  position: fixed;
  inset: 16px;
  z-index: 20;
  pointer-events: none;
  border: 1px solid rgba(16, 35, 29, 0.12);
}

.page {
  width: min(100%, 1180px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 30px clamp(24px, 5vw, 64px) 24px;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 99;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--surface);
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
  transition: transform 0.2s, opacity 0.2s;
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page > main {
  flex: 1 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  animation: fade-in 0.7s var(--ease) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}

.brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.5);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(166, 124, 61, 0.45);
  border-radius: inherit;
}

.brand-mark span {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-1px);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg);
  background: var(--surface);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.brand-sub {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(30, 91, 69, 0.09);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(64px, 10.5vh, 116px) 0 0;
  text-align: center;
}

.hero-copy {
  max-width: 1000px;
  animation: fade-up 0.9s 0.08s var(--ease) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  color: var(--gold-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow-rule {
  width: 38px;
  height: 1px;
  background: var(--gold-light);
}

h1 {
  margin: 24px 0 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 8.8vw, 6.7rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.title-line {
  display: block;
  white-space: nowrap;
}

h1 em {
  color: var(--gold);
  font-weight: 350;
  font-style: italic;
}

.title-slash {
  display: inline-block;
  margin: 0 0.065em;
  color: var(--gold-light);
  font-weight: 300;
  font-style: italic;
  transform: translateY(-0.015em);
}

.lede {
  max-width: 35rem;
  margin: 26px auto 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  font-weight: 450;
  line-height: 1.65;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.search-panel {
  width: min(100%, 820px);
  margin-top: clamp(34px, 5vh, 48px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: calc(var(--radius-lg) + 2px);
  background: rgba(255, 253, 248, 0.74);
  box-shadow:
    0 30px 70px -48px rgba(16, 35, 29, 0.52),
    inset 0 0 0 1px rgba(16, 35, 29, 0.035);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fade-up 0.9s 0.2s var(--ease) both;
}

.search-form {
  text-align: left;
}

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

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.input-wrap:hover {
  border-color: var(--line-strong);
}

.input-wrap:focus-within {
  border-color: var(--gold);
  background: #fffefa;
  box-shadow: 0 0 0 4px rgba(166, 124, 61, 0.11);
}

.input-wrap.has-error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(152, 62, 49, 0.08);
}

.input-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin-left: 21px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.input-wrap:focus-within .input-icon {
  color: var(--gold-ink);
}

#full-name {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 16px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  appearance: none;
}

#full-name::placeholder {
  color: #69736c;
  opacity: 1;
  font-weight: 450;
}

#full-name::-webkit-search-cancel-button {
  display: none;
}

.clear-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  margin-right: 13px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(16, 35, 29, 0.055);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.clear-button[hidden] {
  display: none;
}

.clear-button:hover {
  color: var(--ink);
  background: rgba(16, 35, 29, 0.1);
}

.clear-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.clear-button svg {
  width: 15px;
  height: 15px;
}

.search-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 64px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  color: var(--surface);
  background: var(--ink);
  box-shadow: 0 14px 30px -16px rgba(10, 25, 20, 0.7);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition:
    transform 0.28s var(--ease),
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.search-button:hover {
  transform: translateY(-2px);
  background: #17382d;
  box-shadow: 0 20px 36px -18px rgba(10, 25, 20, 0.8);
}

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

.search-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.search-button:disabled {
  cursor: wait;
  transform: none;
}

.button-arrow {
  width: 19px;
  height: 19px;
  transition: transform 0.28s var(--ease);
}

.search-button:hover .button-arrow {
  transform: translateX(3px);
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 253, 248, 0.35);
  border-top-color: var(--surface);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

.search-button.is-loading .button-spinner {
  display: block;
}

.search-button.is-loading .button-arrow {
  display: none;
}

.search-button.is-loading .button-label {
  opacity: 0.88;
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 8px 1px;
}

.field-hint,
.form-message {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.field-hint {
  color: var(--muted);
}

.form-message {
  color: var(--error);
  font-weight: 650;
  text-align: right;
}

.form-message:empty {
  display: none;
}

.form-message[data-tone="loading"] {
  color: var(--gold-ink);
}

.assurances {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 38px);
  padding: 11px 10px 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.assurances span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.assurances svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.results {
  width: min(100%, 820px);
  margin: 0 auto;
}

.results:focus {
  outline: none;
}

.matches-panel {
  margin-top: 20px;
  animation: result-in 0.55s var(--ease) both;
}

.matches-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.matches-head h2 {
  margin: 4px 0 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.matches-list {
  display: grid;
  gap: 12px;
}

.result-card--match {
  margin-top: 0;
}

.result-card--match .result-body {
  padding-bottom: 18px;
}

.result-card--match .download-note {
  margin-top: -6px;
}

.result-card {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 29, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  animation: result-in 0.55s var(--ease) both;
}

.result-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 124, 61, 0.55), transparent);
}

.result-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(30, 91, 69, 0.06), rgba(255, 253, 248, 0) 58%);
}

.result-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--surface);
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(30, 91, 69, 0.08);
}

.result-mark svg {
  width: 22px;
  height: 22px;
}

.result-kicker {
  margin: 0;
  color: var(--gold-ink);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.result-heading {
  min-width: 0;
}

.result-heading h2,
.result-card--empty h2 {
  margin: 3px 0 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.reset-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  justify-content: flex-end;
  padding: 8px 2px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.reset-button:hover {
  color: var(--ink);
}

.reset-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.reset-button svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.reset-button:hover svg {
  transform: translateX(2px);
}

.result-body {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 25px;
}

.document-file {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.pdf-tile {
  position: relative;
  width: 51px;
  height: 64px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(166, 124, 61, 0.35);
  border-radius: 5px;
  background: linear-gradient(145deg, #fffefa, #f3eddf);
  box-shadow: 0 5px 12px -7px rgba(16, 35, 29, 0.35);
}

.pdf-tile::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 9px;
  right: 14px;
  height: 1px;
  background: rgba(16, 35, 29, 0.17);
  box-shadow: 0 5px 0 rgba(16, 35, 29, 0.13), 0 10px 0 rgba(16, 35, 29, 0.1);
}

.pdf-tile i {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  border-bottom: 1px solid rgba(166, 124, 61, 0.32);
  border-left: 1px solid rgba(166, 124, 61, 0.32);
  background: var(--paper);
}

.pdf-tile span {
  position: absolute;
  bottom: 7px;
  left: 9px;
  color: #9a4234;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.file-details {
  min-width: 0;
}

.file-name {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.meta-dot {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--gold-light);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  margin-left: auto;
  padding: 0 20px;
  border: 1px solid #6f4d22;
  border-radius: 14px;
  color: #fffdf8;
  background: var(--gold-button);
  box-shadow: 0 12px 24px -15px rgba(122, 87, 37, 0.9);
  cursor: pointer;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
  transition:
    transform 0.25s var(--ease),
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.download-button:hover {
  transform: translateY(-2px);
  background: var(--gold-button-hover);
  box-shadow: 0 17px 28px -15px rgba(122, 87, 37, 0.95);
}

.download-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.download-button:disabled {
  cursor: wait;
  transform: none;
}

.download-button svg {
  width: 17px;
  height: 17px;
}

.download-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 253, 248, 0.35);
  border-top-color: var(--surface);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

.download-button.is-loading .download-spinner {
  display: block;
}

.download-button.is-loading svg {
  display: none;
}

.download-note {
  margin: -8px 25px 21px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: right;
}

.download-note strong {
  color: var(--ink-soft);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.result-error {
  margin: -2px 25px 20px;
  padding: 10px 12px;
  border: 1px solid rgba(152, 62, 49, 0.2);
  border-radius: 10px;
  color: var(--error);
  background: var(--error-wash);
  font-size: 10.5px;
  font-weight: 600;
}

.preview-bar {
  border-top: 1px solid var(--line);
  padding: 13px 25px;
}

.preview-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.preview-link:hover {
  color: var(--ink);
}

.preview-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.preview-eye {
  width: 15px;
  height: 15px;
  color: var(--gold-ink);
}

.preview-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.preview-open svg {
  width: 12px;
  height: 12px;
}

.result-card--empty {
  padding: 44px 28px 40px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border: 1px solid rgba(166, 124, 61, 0.3);
  border-radius: 50%;
  color: var(--gold-ink);
  background: var(--gold-wash);
}

.empty-mark--error {
  border-color: rgba(152, 62, 49, 0.22);
  color: var(--error);
  background: var(--error-wash);
}

.empty-mark svg {
  width: 25px;
  height: 25px;
}

.result-card--empty .result-kicker {
  font-size: 8.5px;
}

.result-card--empty h2 {
  margin-top: 7px;
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
}

.empty-message {
  max-width: 32rem;
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.empty-help {
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 10.5px;
}

.secondary-button {
  height: 45px;
  margin-top: 23px;
  padding: 0 21px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease);
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: rgba(16, 35, 29, 0.04);
}

.secondary-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 54px 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child {
  color: var(--ink-soft);
  font-weight: 700;
}

.noscript-note {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: 340px;
  padding: 14px 18px;
  border: 1px solid rgba(152, 62, 49, 0.25);
  border-radius: 12px;
  color: var(--error);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 12px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes gentle-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(30, 91, 69, 0.08); }
  50% { box-shadow: 0 0 0 7px rgba(30, 91, 69, 0.035); }
}

.result-mark {
  animation: gentle-pulse 2.8s 0.5s ease-in-out 2;
}

@media (max-width: 960px) {
  .page {
    padding-right: clamp(24px, 4vw, 44px);
    padding-left: clamp(24px, 4vw, 44px);
  }

  h1 {
    font-size: clamp(1.75rem, 8.8vw, 6.7rem);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-bottom: 21px;
  }

  .hero {
    padding-top: 58px;
  }

  h1 {
    font-size: clamp(1.7rem, 8.8vw, 4.8rem);
    line-height: 0.95;
  }

  .search-panel {
    margin-top: 36px;
    border-radius: 23px;
  }

  .search-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .input-wrap {
    height: 60px;
  }

  .search-button {
    width: 100%;
    height: 56px;
  }

  .form-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 4px;
  }

  .form-message {
    text-align: left;
  }

  .assurances {
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-top: 12px;
  }

  .matches-head {
    align-items: flex-start;
  }

  .result-head {
    align-items: flex-start;
  }

  .reset-button {
    padding-top: 4px;
  }

  .result-body {
    flex-wrap: wrap;
  }

  .download-button {
    width: 100%;
    height: 48px;
    margin-left: 0;
  }

  .download-note {
    margin-top: -4px;
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding-top: 40px;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 20px 18px 18px;
  }

  .page-frame {
    inset: 8px;
  }

  .header-status {
    display: none;
  }

  .hero {
    padding-top: 50px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.2em;
  }

  h1 {
    margin-top: 20px;
    font-size: clamp(1.7rem, 8.8vw, 3.15rem);
    letter-spacing: -0.055em;
    line-height: 0.96;
  }

  .lede {
    max-width: 20rem;
    margin-top: 20px;
    font-size: 0.95rem;
  }

  .search-panel {
    margin-top: 30px;
    padding: 8px;
    border-radius: 21px;
  }

  .input-wrap {
    height: 58px;
    border-radius: 15px;
  }

  .input-icon {
    width: 19px;
    height: 19px;
    margin-left: 16px;
  }

  #full-name {
    padding: 0 12px;
    font-size: 16px;
  }

  .search-button {
    height: 56px;
    border-radius: 15px;
    font-size: 0.84rem;
  }

  .form-meta {
    min-height: 31px;
    padding: 9px 6px 2px;
  }

  .field-hint,
  .form-message {
    font-size: 10px;
  }

  .assurances {
    justify-content: center;
    gap: 7px 15px;
    padding: 10px 6px 4px;
  }

  .assurances span {
    font-size: 9px;
  }

  .result-head {
    gap: 12px;
    padding: 19px;
  }

  .result-mark {
    width: 40px;
    height: 40px;
  }

  .result-mark svg {
    width: 19px;
    height: 19px;
  }

  .result-heading h2 {
    font-size: 1.19rem;
  }

  .reset-button {
    font-size: 9.5px;
  }

  .reset-button svg {
    width: 16px;
    height: 16px;
  }

  .result-body {
    padding: 21px 19px 16px;
  }

  .download-note {
    margin: -3px 19px 18px;
    font-size: 10px;
  }

  .result-error {
    margin-right: 19px;
    margin-left: 19px;
  }

  .preview-bar {
    padding: 13px 19px;
  }

  .result-card--empty {
    padding: 38px 22px 34px;
  }

  .empty-message {
    font-size: 0.93rem;
  }

  .site-footer {
    font-size: 9.5px;
  }
}

@media (max-width: 360px) {
  .brand-sub {
    display: none;
  }

  .reset-button span {
    display: none;
  }

  .assurances {
    gap: 6px 12px;
  }

  .result-body {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .search-button,
  .download-button,
  .result-mark {
    border: 1px solid ButtonText;
  }

  .input-wrap,
  .search-panel,
  .result-card {
    border: 1px solid CanvasText;
  }
}
