:root {
  color-scheme: light;
  --green: #76b900;
  --green-dark: #4f7f00;
  --ink: #111111;
  --muted: #62676d;
  --line: #dfe3e6;
  --surface: #ffffff;
  --soft: #f5f6f6;
  --active-bg: #eff8e2;
  --red: #a52424;
  --red-bg: #fff0f0;
  --amber: #9a6500;
  --amber-bg: #fff7df;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(118,185,0,.07), transparent 35%),
    #eef0f1;
}

button, input { font: inherit; }

.shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.shell--centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(17,17,17,.08);
  box-shadow: 0 22px 60px rgba(25,32,38,.11);
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.brand {
  display: block;
  width: min(360px, 72vw);
  height: auto;
}

.site-header span,
.eyebrow,
.status-label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.lookup-card { width: 100%; padding: clamp(28px, 7vw, 56px); }
.lookup-card .brand { margin-bottom: 36px; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.04; }
.intro { color: var(--muted); font-size: 1.04rem; line-height: 1.55; }

.lookup-form { margin-top: 30px; }
.lookup-form label { display: block; margin-bottom: 8px; font-size: .82rem; font-weight: 800; }
.lookup-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.lookup-row input {
  width: 100%; min-width: 0; padding: 14px 15px;
  border: 1px solid #b9bec3; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .04em;
}
.lookup-row input:focus { outline: 3px solid rgba(118,185,0,.22); border-color: var(--green-dark); }
.lookup-row button {
  border: 0; border-radius: 4px; padding: 0 24px;
  color: white; background: var(--ink); font-weight: 800; cursor: pointer;
}
.lookup-row button:hover { background: #2c2c2c; }
.form-error { margin: 9px 0 0; color: var(--red); font-size: .88rem; }
.privacy-note { margin: 22px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }

.state-card { padding: 64px 32px; text-align: center; }
.state-card p { color: var(--muted); }
.spinner {
  width: 42px; height: 42px; margin: 0 auto 24px;
  border: 4px solid #d9dddf; border-top-color: var(--green);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.authorization-card { overflow: hidden; }
.status-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 24px clamp(22px, 5vw, 42px); background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.status-banner h1 { margin: 2px 0 0; font-size: clamp(1.55rem, 5vw, 2.25rem); }
.status-dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 7px rgba(98,103,109,.12); }
.status-banner.is-active { background: var(--active-bg); }
.status-banner.is-active .status-dot { background: var(--green); box-shadow: 0 0 0 7px rgba(118,185,0,.16); }
.status-banner.is-active h1 { color: var(--green-dark); }
.status-banner.is-scheduled { background: var(--amber-bg); }
.status-banner.is-scheduled .status-dot { background: var(--amber); }
.status-banner.is-scheduled h1 { color: var(--amber); }
.status-banner.is-expired, .status-banner.is-revoked { background: var(--red-bg); }
.status-banner.is-expired .status-dot, .status-banner.is-revoked .status-dot { background: var(--red); }
.status-banner.is-expired h1, .status-banner.is-revoked h1 { color: var(--red); }

.authorization-body { padding: clamp(26px, 6vw, 48px); }
.authorization-body h2 { margin: 7px 0 28px; font-size: clamp(1.55rem, 5vw, 2.35rem); line-height: 1.08; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 17px 0; border-bottom: 1px solid var(--line); }
.facts > div:nth-child(odd) { padding-right: 22px; }
.facts > div:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
.facts .facts__wide { grid-column: 1 / -1; padding-left: 0; padding-right: 0; border-left: 0; }
.facts dt { margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.4; }
.notice { margin-top: 24px; padding: 15px 17px; border-left: 4px solid var(--muted); background: var(--soft); font-weight: 700; line-height: 1.45; }
.notice.is-active { border-color: var(--green); background: var(--active-bg); }
.notice.is-scheduled { border-color: var(--amber); background: var(--amber-bg); }
.notice.is-expired, .notice.is-revoked { border-color: var(--red); background: var(--red-bg); }
.verification-time { margin: 18px 0 0; color: var(--muted); font-size: .78rem; }

.state-card--error .error-mark {
  width: 56px; height: 56px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 50%; color: white; background: var(--red); font-size: 2.2rem; line-height: 1;
}
.secondary-action { display: inline-block; margin-top: 14px; color: var(--ink); font-weight: 800; }
.site-footer { display: grid; gap: 5px; margin-top: 20px; color: var(--muted); font-size: .75rem; text-align: center; }
.site-footer strong { color: var(--ink); }

@media (max-width: 580px) {
  .shell { width: min(100% - 18px, 760px); padding-top: 14px; }
  .site-header { align-items: center; }
  .site-header span { display: none; }
  .lookup-card { padding: 30px 22px; }
  .lookup-row { grid-template-columns: 1fr; }
  .lookup-row button { min-height: 48px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div:nth-child(odd), .facts > div:nth-child(even) { padding: 15px 0; border-left: 0; }
  .facts .facts__wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
