/* Vfy public site styles (home + policies). */
:root {
  color-scheme: light;   /* native controls (date picker icon, selects, scrollbars) follow the theme */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #12151c;
  --muted: #5d6573;
  --border: #e3e6eb;
  --accent: #0047ff;
  --accent-hover: #0039cc;
  --accent-soft: #e8eeff;
  --ok: #0f7b3d;
  --ok-soft: #e6f5ec;
  --warn: #9a5b00;
  --warn-soft: #fdf3e1;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1f232c;
    --text: #eef0f4;
    --muted: #9aa3b2;
    --border: #2a2f3a;
    --accent: #5b8cff;
    --accent-hover: #7aa2ff;
    --accent-soft: #1b2540;
    --ok: #4ccf86;
    --ok-soft: #12291d;
    --warn: #f0b552;
    --warn-soft: #2e2413;
    --bad: #ff7a6e;
    --bad-soft: #321816;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { max-width: 960px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { color: var(--muted); font-weight: 500; font-size: 14px; }
.header-link { color: var(--muted); font-weight: 500; font-size: 15px; }
.header-link:hover { color: var(--text); text-decoration: none; }

main { flex: 1; }

/* Hero + search
   .top wraps the transparent header and the hero so they share one brand-blue backdrop with faint
   concentric rings (echoing the fingerprint arcs in the Vfy logo). The hero fills the first screen
   (the home page has no navbar; the logo sits above the headline). Its content is vertically centred;
   the steps follow the search and are hidden while a result is showing. */
.top {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(77, 128, 255, .55) 0%, rgba(77, 128, 255, 0) 60%),
    linear-gradient(180deg, #0040f0 0%, #002ba8 100%);
}
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .075) 0 1.5px, transparent 1.5px 36px);
  -webkit-mask-image: radial-gradient(70% 65% at 50% 34%, #000 15%, transparent 100%);
          mask-image: radial-gradient(70% 65% at 50% 34%, #000 15%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  .top {
    background:
      radial-gradient(120% 70% at 50% 0%, rgba(60, 100, 230, .45) 0%, rgba(60, 100, 230, 0) 60%),
      linear-gradient(180deg, #0d2170 0%, #0a1440 100%);
  }
}
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 0;
  text-align: center;
  display: flex; flex-direction: column;
}
.hero > .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; }   /* vertically centred */
.hero-logo { width: 76px; height: 76px; margin: 0 auto 28px; padding: 3px; background: #fff; border-radius: 50%; box-shadow: 0 8px 24px rgba(0, 12, 70, .3); }
.top h1 { color: #fff; }
.top .lead { color: rgba(255, 255, 255, .82); }
.top .search { border-color: transparent; box-shadow: 0 12px 32px rgba(0, 12, 70, .35); }
.top .search:focus-within { border-color: transparent; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 12px 32px rgba(0, 12, 70, .35); }
.top .card { box-shadow: 0 16px 40px rgba(0, 12, 70, .35); border-color: transparent; color: var(--text); }  /* .top sets white text; cards need their own */
h1 { margin: 0 0 10px; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
.lead { margin: 0 auto 32px; max-width: 460px; color: var(--muted); font-size: 17px; }

.search { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 8px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 18px; font-weight: 500; letter-spacing: .02em; padding: 12px 14px;
}
.search input::placeholder { color: var(--muted); font-weight: 400; letter-spacing: 0; opacity: .8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius); padding: 12px 20px;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn:disabled { opacity: .65; cursor: progress; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); padding-left: 12px; padding-right: 12px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
#result { margin-top: 28px; outline: none; }
#result:empty { margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); overflow: hidden; text-align: left; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .spinner { animation: none; } }

.status { display: flex; align-items: center; gap: 12px; padding: 16px 24px; font-weight: 600; }
.status svg { width: 24px; height: 24px; flex: none; }
.status small { display: block; font-weight: 400; font-size: 14px; opacity: .9; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--bad-soft); color: var(--bad); }

.person { display: flex; align-items: center; gap: 16px; padding: 24px 24px 8px; }
.avatar {
  position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 24px;
}
.avatar.has-logo { background: #fff; box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgba(16, 24, 40, .08); }
.avatar.has-logo .avatar-initials, .avatar.has-photo .avatar-initials { display: none; }
.avatar-logo { width: 72%; height: 72%; object-fit: contain; }
.avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* With a portrait, the logo shrinks to a white badge on the circle's edge */
.avatar.has-photo .avatar-logo {
  position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; padding: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(16, 24, 40, .15); z-index: 1;
}
.person h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.regno { margin-top: 4px; display: inline-block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.details { margin: 0; padding: 8px 24px 20px; display: grid; grid-template-columns: max-content 1fr; column-gap: 24px; }
.details dt, .details dd { padding: 12px 0; border-top: 1px solid var(--border); margin: 0; }
.details dt { color: var(--muted); font-size: 14px; }
.details dd { font-weight: 500; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }
.actions .spacer { flex: 1; }

.empty { padding: 32px 24px 8px; text-align: center; }
.empty h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.empty p { margin: 0 auto; max-width: 420px; color: var(--muted); }
.empty ul { margin: 16px auto 0; padding: 0; max-width: 380px; list-style: none; text-align: left; color: var(--muted); font-size: 15px; }
.empty li { padding: 6px 0 6px 26px; position: relative; }
.empty li::before { content: ""; position: absolute; left: 6px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.empty + .actions { justify-content: center; background: transparent; border-top: 0; padding-top: 20px; }

.notice { margin-top: 28px; padding: 14px 18px; border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); font-size: 15px; }

/* How it works (inside the hero) */
.steps { margin-top: 48px; align-self: center; width: min(900px, calc(100vw - 40px)); }
.hero:has(#result:not(:empty)) .steps { display: none; }
.steps h2 { margin: 0 0 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .7); font-weight: 600; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  padding: 16px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.steps li b { display: flex; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; align-items: center; justify-content: center; font-size: 13px; }
.steps li strong { display: block; color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 2px; }

/* Contact */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.contact { padding: 64px 0 72px; scroll-margin-top: 16px; display: grid; gap: 24px; }
.contact h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.02em; }
.contact-intro > p { margin: 0 0 16px; color: var(--muted); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.contact-form { padding: 24px; }
.optional { color: var(--muted); font-weight: 400; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { max-width: 960px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Dialogs */
dialog {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}
dialog::backdrop { background: rgba(15, 17, 21, .55); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.dialog-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; line-height: 0; }
.close:hover { background: var(--surface-2); color: var(--text); }
.close svg { width: 20px; height: 20px; }
.dialog-body { padding: 20px 24px 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field .error { display: none; margin-top: 4px; font-size: 13px; color: var(--bad); }
.field [aria-invalid="true"] + .error { display: block; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.form-msg.ok { background: var(--ok-soft); color: var(--ok); }
.form-msg.bad { background: var(--bad-soft); color: var(--bad); }

@media (max-width: 600px) {
  .hero { padding: 40px 0; }
  .hero-logo { width: 64px; height: 64px; margin-bottom: 22px; }
  .steps { margin-top: 36px; }
  .search { flex-direction: column; padding: 6px; }
  .search input { text-align: center; }
  .search .btn { width: 100%; padding: 14px; }
  .person { padding: 20px 20px 4px; }
  .avatar { width: 64px; height: 64px; font-size: 20px; }
  .details { padding: 8px 20px 16px; grid-template-columns: 1fr; }
  .details dt { padding-bottom: 0; }
  .details dd { border-top: 0; padding-top: 2px; }
  .status, .actions { padding-left: 20px; padding-right: 20px; }
  .actions .btn { flex: 1 1 auto; }
  .actions .spacer { display: none; }
  .steps ol { grid-template-columns: 1fr; gap: 8px; }
  .steps li { padding: 12px 14px; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 20px; }
  .brand span { display: none; }
}

/* Long-form pages (policies) */
.page-head { padding: 56px 0 8px; }
.page-head .eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.page-head h1 { text-align: left; }
.page-head p { margin: 0; color: var(--muted); font-size: 17px; }
.prose { padding: 16px 0 64px; color: var(--text); }
.prose h2 { margin: 36px 0 10px; font-size: 20px; letter-spacing: -.015em; }
.prose p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; }
.prose .callout { margin: 20px 0; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); font-weight: 500; }
.link-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 500; }
.link-list a:hover { border-color: var(--accent); text-decoration: none; }
.link-list svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
@media (max-width: 600px) {
  .page-head { padding-top: 36px; }
  .link-list { grid-template-columns: 1fr; }
}

/* Verify button: arrow nudges right on hover */
.btn-arrow svg { transition: transform .15s ease; }
.btn-arrow:hover:not(:disabled) svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .btn-arrow svg { transition: none; } }

/* Line under the result card ("Something not right? Report a problem") */
.card-foot { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.top .card-foot { color: rgba(255, 255, 255, .75); }
.link-btn { border: 0; padding: 0; background: none; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.top .link-btn { color: #fff; }
.link-btn:hover { text-decoration-thickness: 2px; }
.link-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }

/* Admin sign-in: full-screen brand backdrop (reuses .top) with a centred card */
.auth { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; text-align: left; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto 20px; }
.auth-card h1 { margin: 0 0 24px; font-size: 24px; text-align: center; color: var(--text); }
.auth-submit { width: 100%; margin-top: 8px; padding: 13px 20px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.password-toggle:hover { background: var(--surface-2); color: var(--text); }
.password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.password-toggle svg { width: 18px; height: 18px; }
.field .password-wrap + .error { display: none; }
.field .password-wrap:has([aria-invalid="true"]) + .error { display: block; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: rgba(255, 255, 255, .85); font-size: 15px; font-weight: 500; }
.auth-back:hover { color: #fff; text-decoration: none; }
.auth-back svg { width: 16px; height: 16px; transition: transform .15s ease; }
.auth-back:hover svg { transform: translateX(-3px); }
@media (prefers-reduced-motion: reduce) { .auth-back svg { transition: none; } }
.auth-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 20px; font-size: 13px; color: rgba(255, 255, 255, .65); }
.auth-footer nav { display: flex; gap: 16px; }
.auth-footer a { color: rgba(255, 255, 255, .75); }
.auth-footer a:hover { color: #fff; }
@media (max-width: 600px) {
  .auth-card { padding: 24px 20px; }
  .auth-main { padding-top: 32px; }
}

/* "Verify another" under the result card */
.card-after { margin-top: 20px; text-align: center; }
.top .card-after .btn-secondary { border-color: transparent; }
