/* Pull: one typeface family chosen for legibility (Atkinson Hyperlegible,
   made for low-vision readers), so look-alike addresses such as "paypa1"
   are easy to spot. One motif: the wavy anti-forgery print used on checks. */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/atkinson-next.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Mono';
  src: url('/fonts/atkinson-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Mono';
  src: url('/fonts/atkinson-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f5f7fb;
  --sheet: #ffffff;
  --ink: #19223a;
  --ink-2: #4a5470;
  --rule: #d5dbe7;
  --tint: #b4c2dc;
  --focus: #1f5eff;
  --scam: #b3261e;
  --warn: #8a5200;
  --none: #3d5a80;
  --scam-text: #b3261e;
  --warn-text: #8a5200;
  --none-text: #3d5a80;
  --hover: #2b3757;
  --radius: 8px;
  --font: 'Atkinson Hyperlegible Next', Verdana, system-ui, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1528;
    --sheet: #161e36;
    --ink: #e9edf7;
    --ink-2: #aab3cb;
    --rule: #2d3757;
    --tint: #33416a;
    --focus: #84a6ff;
    --scam-text: #ff8f86;
    --warn-text: #f0b35c;
    --none-text: #a8c0e6;
    --hover: #d3daea;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 40rem) { .wrap { padding: 0 24px; } }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 8px;
}
.wordmark {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.masthead nav { display: flex; gap: 20px; font-size: 1rem; }

/* ---------- intro ---------- */
.intro { padding: 32px 0 24px; }
h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.25rem);
  font-weight: 780;
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0 0 16px;
  max-width: 15em;
}
.lede { margin: 0; max-width: 36em; color: var(--ink-2); font-size: 1.1875rem; }

h2 {
  font-size: 1.5rem;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
p { margin: 0 0 12px; max-width: 38em; }

/* ---------- the form, printed like a check ---------- */
.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.sheet::before {
  content: '';
  display: block;
  height: 36px;
  background-color: var(--tint);
  -webkit-mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
  mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
}
.sheet-body { padding: 4px 20px 20px; }

.label { display: block; font-weight: 700; font-size: 1rem; margin: 16px 0 6px; }
.optional { font-weight: 400; color: var(--ink-2); }

textarea, input[type="text"], select {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 12px 14px;
}
textarea { min-height: 13rem; resize: vertical; line-height: 1.5; }
textarea::placeholder, input::placeholder { color: var(--ink-2); opacity: 0.85; }
textarea:focus-visible, input:focus-visible, select:focus-visible { border-color: var(--focus); outline-offset: 0; }

.shot { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; }
.shot img { max-width: 140px; max-height: 180px; border: 1px solid var(--rule); border-radius: 4px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--sheet);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
.button:hover { background: var(--hover); border-color: var(--hover); }
.button:disabled { opacity: 0.7; cursor: progress; }
.button-quiet { color: var(--ink); background: transparent; }
.button-quiet:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
.file-button:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.text-button {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.hint { font-size: 1rem; color: var(--ink-2); margin: 14px 0 0; }

.dom { font-family: var(--mono); font-size: 0.94em; overflow-wrap: anywhere; }

/* ---------- result ---------- */
.result { margin-top: 40px; outline: none; }
.result:empty { margin-top: 0; }

.checking {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sheet);
  overflow: hidden;
}
.checking p { padding: 16px 20px 18px; margin: 0; color: var(--ink-2); }
.band {
  height: 36px;
  background-color: var(--ink);
  -webkit-mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
  mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
  animation: printing 1.2s linear infinite;
}
@keyframes printing {
  from { -webkit-mask-position: 0 0; mask-position: 0 0; }
  to { -webkit-mask-position: 120px 0; mask-position: 120px 0; }
}

.problem {
  border: 2px solid var(--scam-text);
  border-radius: var(--radius);
  padding: 16px 20px 4px;
  background: var(--sheet);
}

/* the one loud moment: the verdict, printed in its color */
.verdict {
  position: relative;
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 22px 52px;
  overflow: hidden;
  animation: stamp 520ms cubic-bezier(.2,.7,.2,1) both;
}
.verdict::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.3);
  -webkit-mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
  mask: url('/guilloche.svg') repeat-x 0 0 / 120px 36px;
}
.v-likely_scam { background: var(--scam); }
.v-suspicious { background: var(--warn); }
.v-no_red_flags { background: var(--none); }
.verdict-label {
  font-size: clamp(2.75rem, 1.9rem + 4.2vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.verdict-score { margin: 0; font-size: 1.0625rem; max-width: 34em; }
@keyframes stamp {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.summary { font-size: 1.1875rem; margin-top: 20px; }
.saved-test { margin-top: 12px; color: var(--ink-2); font-size: 1rem; }

.pull {
  margin-top: 24px;
  padding: 18px 20px 8px;
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.pull h2 { margin: 0 0 8px; font-size: 1.375rem; }
.pull p { margin-bottom: 10px; }
.official {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.source { font-size: 1rem; color: var(--ink-2); margin: 6px 0 0; }

/* the evidence, itemized like a bill: points on the left add up to the score */
.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.ledger li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger .pts {
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.25;
  text-align: right;
}
.lvl-critical .pts, td.lvl-critical { color: var(--scam-text); }
.lvl-strong .pts, .lvl-medium .pts, td.lvl-strong, td.lvl-medium { color: var(--warn-text); }
.lvl-info .pts, td.lvl-info { color: var(--ink-2); }
.flag-title { font-weight: 700; margin: 0; }
.flag-detail { margin: 4px 0 0; color: var(--ink-2); font-size: 1rem; }
.ledger .total { border-bottom: 2px solid var(--ink); }
.ledger .total .pts { color: var(--ink); }
.ledger .total .flag-title { font-size: 1.375rem; line-height: 1.25; }

.advice { padding-left: 1.2em; margin: 0; }
.advice li { margin: 6px 0; max-width: 38em; }

.checked {
  margin: 32px 0 20px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.checked summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.check-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: 1rem; }
.check-list li {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr auto;
  gap: 4px 14px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.check-list .svc { font-weight: 700; }
.check-list .ms { color: var(--ink-2); white-space: nowrap; }
.status-error .state { color: var(--scam-text); font-weight: 700; }
.status-skipped .note { color: var(--ink-2); }
@media (max-width: 36rem) {
  .check-list li { grid-template-columns: 1fr auto; }
  .check-list .note { grid-column: 1 / -1; grid-row: 2; }
}
.found { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 1rem; margin: 0 0 16px; }
.found dt { font-weight: 700; }
.found dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- how it works ---------- */
.how { margin-top: 72px; padding-top: 8px; border-top: 2px solid var(--ink); }
.how h2:first-child { margin-top: 24px; }
.steps { padding-left: 1.4em; margin: 0 0 28px; }
.steps li { margin: 0 0 12px; padding-left: 4px; max-width: 38em; }
.steps li::marker { font-weight: 800; }

.points { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 1rem; }
.points caption { text-align: left; font-weight: 700; padding-bottom: 8px; font-size: 1.125rem; }
.points th { text-align: left; font-weight: 700; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); }
.points td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.points td:first-child { font-weight: 800; font-size: 1.25rem; width: 4.5rem; }

.footer { margin: 64px 0 40px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 1rem; }

/* ---------- stats page ---------- */
.stat-table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 8px 0 12px; }
.stat-table caption { text-align: left; font-weight: 700; font-size: 1.125rem; padding-bottom: 8px; }
.stat-table th, .stat-table td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.stat-table thead th { border-bottom: 2px solid var(--ink); }
.stat-table td.num, .stat-table th.num { text-align: right; }
.table-scroll { overflow-x: auto; }
.big-number { font-size: 2.5rem; font-weight: 800; line-height: 1; }

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