/*
 * Check a Monq letter (verify.monq.io): one small page, no app bundle. It follows monq.io:
 * a dark brown bar and footer, warm off-white page, a serif headline (Hedvig Letters Serif
 * when installed, else Georgia, as monq.io falls back), Instrument Sans or the system sans for
 * text, and yellow pill buttons. No web fonts are loaded: the host serves only its listed files.
 */
:root {
  --bar: #2a211e;
  --bar-ink: #f9f8f7;
  --bar-muted: #c9bfb6;
  --bar-line: rgba(249, 248, 247, 0.12);
  --bg: #f9f8f7;
  --card: #ffffff;
  --soft: #f7f4f1;
  --ink: #322825;
  --muted: #5d5448;
  --line: #e9e5e2;
  --cta: #fdc700;
  --cta-ink: #322825;
  --good: #1f6b43;
  --good-bg: #e5f2ea;
  --bad: #a8321f;
  --bad-bg: #fbe9e4;
  --wait: #7a5300;
  --wait-bg: #fff4d1;
  --focus: #322825;
  --serif: 'Hedvig Letters Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bar: #1f1816;
    --bar-line: rgba(249, 248, 247, 0.1);
    --bg: #2a211e;
    --card: #342a26;
    --soft: #2a211e;
    --ink: #f9f8f7;
    --muted: #c9bfb6;
    --line: #4a3e38;
    --good: #8fd6ad;
    --good-bg: #1f3a2b;
    --bad: #f4a796;
    --bad-bg: #44251e;
    --wait: #f5cf6b;
    --wait-bg: #43361a;
    --focus: #fdc700;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Top bar, as monq.io's header. */
.topbar { background: var(--bar); color: var(--bar-ink); }
.topbar-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.home { display: inline-flex; color: var(--bar-ink); border-radius: 6px; }
.logo { display: block; }
.topbar-label { font-size: 15px; font-weight: 500; color: var(--bar-muted); }

/* Page. */
.main { flex: 1; max-width: 640px; padding-top: 56px; padding-bottom: 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px 36px 32px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 18px; line-height: 1.4; margin: 0 0 28px; }
label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 8px; }
.row { display: flex; gap: 10px; }
input#code { flex: 1; min-width: 0; height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font: 500 17px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
input#code::placeholder { color: var(--muted); opacity: 0.55; }
input#code:focus { border-color: var(--ink); outline: none; }
.cta { height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 6px 0 22px; border: 0; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font: 500 15px var(--sans); cursor: pointer; white-space: nowrap; transition: filter 0.15s ease; }
.cta:hover { filter: brightness(0.96); }
.cta:disabled { opacity: 0.5; cursor: default; }
.cta-arrow { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.45); }
.error { color: var(--bad); margin: 12px 0 0; font-size: 14px; }
.skeleton { height: 120px; border-radius: 12px; background: var(--soft); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .cta { transition: none; } }

/* Result. */
.status { display: flex; gap: 18px; align-items: flex-start; }
.status h1 { font-size: 36px; }
.status .lede { margin-bottom: 24px; }
.badge { flex: none; width: 48px; height: 48px; margin-top: 2px; border-radius: 999px; display: grid; place-items: center; font-weight: 600; font-size: 22px; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.wait { background: var(--wait-bg); color: var(--wait); }
.facts { display: grid; grid-template-columns: max-content 1fr; margin: 0 0 24px; border-radius: 12px; background: var(--soft); padding: 6px 20px; }
.facts dt, .facts dd { padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt:first-of-type, .facts dd:first-of-type { border-top: 0; }
.facts dt { color: var(--muted); font-size: 14px; padding-right: 24px; line-height: 1.5; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; line-height: 1.5; }
.facts code { font: 500 15px var(--mono); letter-spacing: 0.04em; }
.compare { border: 1px dashed var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; }
.compare label { margin-bottom: 4px; }
.compare .hint { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 14px; }
.compare input { width: 100%; font: 14px var(--sans); color: var(--muted); }
.compare input::file-selector-button { margin-right: 12px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--card); font: 500 14px var(--sans); cursor: pointer; }
#compare-result { margin: 12px 0 0; font-size: 14px; font-weight: 500; }
#compare-result.good { color: var(--good); }
#compare-result.bad { color: var(--bad); }
.again { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--card); font-weight: 500; font-size: 15px; text-decoration: none; }

.trust { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 14px; }
.trust li::before { content: '\2713'; margin-right: 8px; color: #f7a43f; font-weight: 600; }

/* Footer, as monq.io's. */
.footer { background: var(--bar); color: var(--bar-ink); padding: 40px 0 32px; }
.footer-text { color: var(--bar-muted); font-size: 14px; line-height: 1.5; max-width: 320px; margin: 14px 0 32px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--bar-line); font-size: 14px; color: var(--bar-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--bar-ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { height: 58px; }
  .main { padding-top: 28px; padding-bottom: 48px; }
  .card { padding: 24px 20px; border-radius: 16px; }
  h1 { font-size: 32px; }
  .status { gap: 14px; }
  .status h1 { font-size: 28px; }
  .badge { width: 40px; height: 40px; font-size: 19px; }
  .lede { font-size: 16px; }
  .row { flex-direction: column; }
  input#code { flex: none; }
  .cta { width: 100%; justify-content: space-between; }
  .facts { grid-template-columns: 1fr; padding: 4px 16px; }
  .facts dt { padding: 12px 0 0; }
  .facts dd { padding: 2px 0 12px; border-top: 0; }
  .facts dt:first-of-type { border-top: 0; }
  .again { width: 100%; justify-content: center; }
}
