:root {
  color-scheme: light;
  --red: #d5000d;
  --red-dark: #aa0009;
  --graphite: #292b2f;
  --ink: #1d2024;
  --muted: #686e77;
  --line: #dfe2e6;
  --paper: #f4f5f6;
  --white: #fff;
  --green: #20744b;
}

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

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 10%, rgba(213, 0, 13, .09), transparent 30rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 14px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--red);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.validator-header {
  min-height: 76px;
  padding: 14px max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}

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

.brand-logo {
  width: 146px;
  height: 42px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.home-link {
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  color: #4d5259;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.validator-main {
  width: min(calc(100% - 40px), 980px);
  margin: auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 92px);
}

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

.eyebrow span { width: 28px; height: 2px; background: var(--red); }

.intro h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.intro > p:last-child {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.validator-card {
  padding: clamp(24px, 4vw, 36px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(24, 27, 31, .12);
}

.card-heading { display: flex; align-items: center; gap: 14px; }

.shield {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 14px 14px 17px 17px;
  font-size: 21px;
  font-weight: 900;
}

.card-heading h2 { margin: 0; font-size: 21px; }
.card-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

form { margin-top: 28px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }

.serial-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }

input,
button { font: inherit; }

input {
  min-width: 0;
  min-height: 50px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #bfc4ca;
  border-radius: 10px;
  font-size: 16px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

input::placeholder { color: #92979d; letter-spacing: 0; text-transform: none; }
input[aria-invalid="true"] { border-color: var(--red); }

button {
  min-height: 50px;
  padding: 11px 18px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

button:hover { background: var(--red-dark); transform: translateY(-1px); }

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(213, 0, 13, .24);
  outline-offset: 3px;
}

.field-help,
.form-message { margin: 8px 0 0; font-size: 12px; }
.field-help { color: var(--muted); }
.form-message { min-height: 18px; color: var(--red-dark); font-weight: 700; }

.privacy-note {
  margin-top: 22px;
  padding-top: 19px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid #eceef0;
  font-size: 12px;
}

.privacy-note > span {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--green);
  background: #eaf5ef;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.privacy-note p { margin: 0; }
.privacy-note strong { color: #3f454c; }

footer {
  min-height: 62px;
  padding: 18px max(22px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #8a8f95;
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

@media (max-width: 760px) {
  .validator-main {
    width: min(calc(100% - 28px), 580px);
    padding: 44px 0;
    display: block;
  }

  .intro { margin-bottom: 30px; }
  .intro h1 { font-size: clamp(36px, 11vw, 52px); }
  .intro > p:last-child { font-size: 15px; }
}

@media (max-width: 520px) {
  .validator-header { min-height: 68px; padding-inline: 14px; }
  .brand-logo { width: 126px; height: 36px; }
  .home-link { min-height: 38px; padding: 8px 10px; font-size: 11px; }
  .validator-main { width: min(calc(100% - 20px), 580px); padding: 32px 0; }
  .validator-card { padding: 21px 17px; border-radius: 14px; }
  .card-heading { align-items: flex-start; }
  .card-heading p { line-height: 1.45; }
  .serial-field { grid-template-columns: 1fr; }
  button { width: 100%; }
  footer { padding-inline: 16px; flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
