/* LegitInformant
 * -----------------------------------------------------------------------
 * Ink and paper. The site has no brand colour on purpose: colour is
 * reserved entirely for verdict meaning, so when a worried person sees
 * green or red it always tells them something. Buttons, links and nav are
 * ink. Type carries the personality instead.
 */

/* --- Fonts ------------------------------------------------------------ */
/* Self-hosted. A tool people use to check scam links should not report
   every lookup to a third-party font CDN. */

@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "InstrumentSans";
  src: url("/static/fonts/instrument-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "InstrumentSans";
  src: url("/static/fonts/instrument-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("/static/fonts/jetbrains-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("/static/fonts/jetbrains-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* --- Tokens ----------------------------------------------------------- */

:root {
  --paper: #f7f8f7;
  --paper-raised: #ffffff;
  --paper-sunk: #eeefee;
  --ink: #14171c;
  --ink-soft: #4a5158;
  --ink-faint: #6b7278;
  --rule: #d9dcda;
  --rule-strong: #b9bebb;

  /* Verdict semantics. The only colour in the system. */
  --v-strong: #1a5f40;
  --v-strong-bg: #e7f0ea;
  --v-ok: #1f6f4a;
  --v-ok-bg: #e9f1ec;
  --v-caution: #8a5a00;
  --v-caution-bg: #f6efe0;
  --v-risk: #a32020;
  --v-risk-bg: #f8e9e9;

  --display: "Archivo", "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --body: "InstrumentSans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrainsMono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r: 4px;           /* one radius, everywhere */
  --maxw: 1080px;
  --gap: clamp(1rem, 3vw, 1.75rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101317;
    --paper-raised: #171b20;
    --paper-sunk: #0b0e11;
    --ink: #e8eaec;
    --ink-soft: #a8b0b7;
    --ink-faint: #7d858c;
    --rule: #272c32;
    --rule-strong: #3a4149;

    --v-strong: #5cc191;
    --v-strong-bg: #12261d;
    --v-ok: #4fb583;
    --v-ok-bg: #10231a;
    --v-caution: #d9a441;
    --v-caution-bg: #251d0d;
    --v-risk: #e8736f;
    --v-risk-bg: #2a1414;
  }
}

/* --- Reset ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.86rem; }
.nowrap { white-space: nowrap; }

/* --- Header / footer -------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 68px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.16rem;
  letter-spacing: -0.03em; text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--ink-faint); font-weight: 600; }
.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a { font-size: 0.94rem; text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

@media (max-width: 640px) {
  .masthead-inner { height: auto; padding: 0.8rem 0; flex-wrap: wrap; }
  .nav { gap: 1rem; width: 100%; }
  .nav a { font-size: 0.88rem; }
}

.footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem; padding: 2rem 0 3rem;
  color: var(--ink-soft); font-size: 0.88rem;
}
.footer-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 940px) { .footer-grid { grid-template-columns: 2fr 1fr 1.1fr 1fr; } }
.footer a { color: var(--ink-soft); }
.footer h4 { font-family: var(--body); font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin: 0 0 0.5rem; color: var(--ink-faint); font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }

/* --- The check form (the hero) ---------------------------------------- */

.hero { padding: clamp(2.5rem, 7vw, 4.5rem) 0 2.5rem; }
.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.15rem);
  max-width: 17ch;
  margin-bottom: 0.9rem;
}
.hero p.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.16rem);
  color: var(--ink-soft); max-width: 54ch; margin-bottom: 1.9rem;
}

.checkform { max-width: 720px; }
.checkform label {
  display: block; font-size: 0.9rem; font-weight: 500;
  margin-bottom: 0.45rem;
}
.checkform .hint { color: var(--ink-soft); font-size: 0.86rem; margin: 0.55rem 0 0; }
.field-row { display: flex; gap: 0.6rem; align-items: stretch; }
@media (max-width: 620px) { .field-row { flex-direction: column; } }

textarea.target, input.target {
  flex: 1; width: 100%;
  font-family: var(--mono); font-size: 0.98rem;
  padding: 0.85rem 0.95rem;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r);
  resize: vertical;
  min-height: 3.2rem;
}
textarea.target { min-height: 6.5rem; line-height: 1.5; }
textarea.target::placeholder, input.target::placeholder { color: var(--ink-faint); }
textarea.target:focus, input.target:focus {
  border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 1px;
}

.btn {
  font-family: var(--body); font-weight: 500; font-size: 1rem;
  padding: 0.85rem 1.6rem;
  background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink); border-radius: var(--r);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease;
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn:active { transform: translateY(1px); }
.btn-quiet {
  background: transparent; color: var(--ink); border-color: var(--rule-strong);
}
.btn-quiet:hover { background: var(--paper-sunk); border-color: var(--ink); }

.examples { margin-top: 1.1rem; font-size: 0.88rem; color: var(--ink-soft); }
.examples a { margin-right: 0.9rem; display: inline-block; }

.alert {
  border-left: 3px solid var(--v-risk);
  background: var(--v-risk-bg); color: var(--ink);
  padding: 0.8rem 1rem; border-radius: 0 var(--r) var(--r) 0;
  margin-bottom: 1.4rem;
}

/* --- Verdict block ---------------------------------------------------- */

.record { padding: 2.2rem 0 0; }

.verdict {
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper-raised);
}
.verdict-band {
  padding: 1.4rem clamp(1rem, 3vw, 1.9rem);
  border-left: 6px solid var(--vc, var(--ink-faint));
  background: var(--vbg, var(--paper-sunk));
}
.verdict[data-v="high_risk"] { --vc: var(--v-risk); --vbg: var(--v-risk-bg); }
.verdict[data-v="caution"]   { --vc: var(--v-caution); --vbg: var(--v-caution-bg); }
.verdict[data-v="likely_ok"] { --vc: var(--v-ok); --vbg: var(--v-ok-bg); }
.verdict[data-v="strong"]    { --vc: var(--v-strong); --vbg: var(--v-strong-bg); }

.verdict-tag {
  display: inline-block;
  font-family: var(--body); font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--vc); margin-bottom: 0.5rem;
}
.verdict h1 {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  margin-bottom: 0.6rem;
}
.verdict .line { color: var(--ink); font-weight: 500; margin-bottom: 0.4rem; }
.verdict .summary { color: var(--ink-soft); margin: 0; max-width: 68ch; }

.verdict-meta {
  display: flex; flex-wrap: wrap; gap: 0 1.6rem;
  padding: 0.85rem clamp(1rem, 3vw, 1.9rem);
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft);
}
.verdict-meta b { color: var(--ink); font-weight: 500; }

.target-line {
  padding: 0.9rem clamp(1rem, 3vw, 1.9rem);
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.95rem;
  word-break: break-all;
}
.target-line .k {
  font-family: var(--body); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-faint); display: block; margin-bottom: 0.2rem;
}
blockquote.msg {
  margin: 0; padding: 0.9rem 1rem;
  background: var(--paper-sunk); border-left: 3px solid var(--rule-strong);
  border-radius: 0 var(--r) var(--r) 0;
  font-family: var(--body); font-size: 0.95rem; white-space: pre-wrap;
  word-break: break-word; color: var(--ink-soft);
}

/* --- The evidence ledger (signature element) -------------------------- */

.ledger { margin-top: 2.6rem; }
.ledger > h2 {
  font-size: 1.28rem; margin-bottom: 0.3rem;
}
.ledger > p.intro { color: var(--ink-soft); font-size: 0.94rem; max-width: 62ch; margin-bottom: 1.4rem; }

.exhibit {
  display: grid;
  grid-template-columns: 2.6rem 1fr 4.5rem;
  gap: 0 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.exhibit:last-child { border-bottom: 1px solid var(--rule); }

.exhibit-n {
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint);
  padding-top: 0.2rem;
}
.exhibit-body h3 {
  font-family: var(--body); font-weight: 500; font-size: 1rem;
  letter-spacing: 0; line-height: 1.4; margin-bottom: 0.25rem;
}
.exhibit-body .detail { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 0.4rem; }
.exhibit-body .src {
  font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint);
}
.exhibit-w {
  font-family: var(--mono); font-size: 0.92rem; text-align: right;
  padding-top: 0.15rem; white-space: nowrap;
}
.exhibit[data-sev="critical"] .exhibit-w,
.exhibit[data-sev="warn"] .exhibit-w { color: var(--v-risk); }
.exhibit[data-sev="good"] .exhibit-w { color: var(--v-ok); }
.exhibit[data-sev="info"] .exhibit-w { color: var(--ink-faint); }

.exhibit[data-sev="critical"] .exhibit-n::after {
  content: ""; display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--v-risk); margin-top: 0.4rem;
}

@media (max-width: 560px) {
  .exhibit { grid-template-columns: 2rem 1fr; }
  .exhibit-w { grid-column: 2; text-align: left; padding-top: 0.35rem; }
}

.ledger-total {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding: 1rem 0; font-family: var(--mono); font-size: 0.86rem;
  color: var(--ink-soft);
}
.ledger-total b { color: var(--ink); font-weight: 500; }

/* --- Sections, cards, lists ------------------------------------------- */

.section { padding: 2.6rem 0 0; }
.section > h2 { font-size: 1.3rem; margin-bottom: 0.9rem; }

.stack { display: grid; gap: 0; }
.row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--rule);
  text-decoration: none;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row:hover { background: var(--paper-sunk); }
.row .t { font-family: var(--mono); font-size: 0.92rem; word-break: break-all; }
.row .v {
  font-size: 0.78rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.07em; white-space: nowrap;
}
.row[data-v="high_risk"] .v { color: var(--v-risk); }
.row[data-v="caution"] .v { color: var(--v-caution); }
.row[data-v="likely_ok"] .v { color: var(--v-ok); }
.row[data-v="strong"] .v { color: var(--v-strong); }

.grid-2 { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1.35fr 1fr; } }

.panel {
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.2rem 1.3rem; background: var(--paper-raised);
}
.panel h3 { font-family: var(--body); font-weight: 500; font-size: 1rem; margin-bottom: 0.5rem; }
.panel p:last-child { margin-bottom: 0; }

.statline {
  display: flex; flex-wrap: wrap; gap: 1.8rem;
  font-family: var(--mono); font-size: 0.84rem; color: var(--ink-soft);
  padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.statline b { display: block; font-size: 1.35rem; color: var(--ink); font-weight: 500; }

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.3rem; margin: 2.2rem 0 0.7rem; }
.prose h3 { font-family: var(--body); font-weight: 500; font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  font-size: 0.86rem; padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  text-decoration: none; color: var(--ink-soft);
}
.chip[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover { border-color: var(--ink); color: var(--ink); }

/* --- Report form ------------------------------------------------------ */

.reportform { display: grid; gap: 0.9rem; max-width: 560px; }
.reportform fieldset { border: 0; padding: 0; margin: 0; }
.reportform legend { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.5rem; padding: 0; }
.stance { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stance label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1.5px solid var(--rule-strong); border-radius: var(--r);
  padding: 0.5rem 0.9rem; cursor: pointer; font-size: 0.92rem;
}
.stance input { accent-color: var(--ink); }
.stance label:has(input:checked) { border-color: var(--ink); background: var(--paper-sunk); }
.reportform textarea, .reportform select, .reportform input[type="text"] {
  font-family: var(--body); font-size: 0.96rem; padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--rule-strong); border-radius: var(--r);
  background: var(--paper-raised); color: var(--ink); width: 100%;
}
.reportform label.fl { font-size: 0.9rem; font-weight: 500; display: block; margin-bottom: 0.35rem; }

.notice {
  border: 1px solid var(--rule-strong); border-left: 3px solid var(--v-ok);
  background: var(--v-ok-bg); padding: 0.8rem 1rem; border-radius: 0 var(--r) var(--r) 0;
  margin-bottom: 1.4rem; font-size: 0.94rem;
}

.disclaimer {
  margin-top: 2.6rem; padding: 1.1rem 1.2rem;
  border: 1px dashed var(--rule-strong); border-radius: var(--r);
  font-size: 0.88rem; color: var(--ink-soft);
}
.disclaimer strong { color: var(--ink); }

.empty {
  padding: 2rem 1.2rem; border: 1px dashed var(--rule-strong);
  border-radius: var(--r); color: var(--ink-soft); text-align: center;
}

/* --- Guidelines compliance ------------------------------------------- */
/* color-scheme tells the browser to render native controls, scrollbars and
   form widgets in the right theme. The media query alone does not do this. */
html { color-scheme: light dark; }

/* Numbers sit in columns all over both sites, so they must not jitter. */
.mono, .exhibit-w, .verdict-meta, .plan-figs, .assumptions,
.card .v, table.cmp td.num, .deadline .days, textarea.target, input.target {
  font-variant-numeric: tabular-nums;
}

/* Kills the 300ms tap delay and the grey flash on the mobile audience this
   is actually built for. */
a, button, input, select, textarea, label, .row, .chip {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(20, 23, 28, 0.12);
}

/* Stops headings breaking with one orphaned word on the last line. */
h1, h2, h3 { text-wrap: balance; }
p, .plan-note, .exhibit-body .detail { text-wrap: pretty; }

/* Long domains, wallet addresses and pasted text must never blow out a layout. */
.row .t, .target-line, .exhibit-body h3 { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .masthead, .footer, .checkform, .reportform, .btn { display: none; }
  body { background: #fff; color: #000; }
  .verdict { border: 2px solid #000; }
}
