/* =========================================================
   SCAN-SAFELY — full-screen black console
   Plain gray monospace on black, like an old Linux box with
   no desktop. No windows, no glow, no color effects.
   Standalone stylesheet (this page does not load style.css).
   ========================================================= */

:root {
  --bg: #000000;
  --fg: #bdbdbd;
  --dim: #8a8a8a;
  --bright: #ffffff;
  --warn: #d7b44a;
  --mono: "Courier New", Courier, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body.tty {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.4;
  padding: 14px 16px 64px;
}

main { max-width: 980px; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 6px 10px; background: var(--fg); color: #000;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 1px dashed var(--bright); outline-offset: 3px; }

/* ---------- Skip / run again ---------- */
.tty-controls {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 10;
}
.tty-btn {
  min-height: 36px;
  padding: 4px 6px;
  background: var(--bg);
  color: var(--dim);
  border: 0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.tty-btn:hover { color: var(--bright); }
.tty-btn[hidden] { display: none; }

/* ---------- Console output ---------- */
.term-screen { min-height: calc(100vh - 28px); }
.term-output { white-space: pre-wrap; word-break: break-word; }
.term-line { margin: 0; min-height: 1.4em; }
.term-line.is-dim { color: var(--dim); }
.term-line.is-warn { color: var(--warn); }
.term-line.is-prompt { color: var(--bright); }
.term-line.is-big {
  margin: 12px 0 4px;
  color: var(--bright);
  font-weight: 700;
  font-size: 1.6em;
}
.term-line .term-key { color: var(--dim); }
.term-line .term-val { color: var(--bright); }
.term-line .term-ok { color: var(--bright); }

.term-cursor { color: var(--fg); animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Once the lesson shows, the console no longer needs a full screen */
body.is-revealed .term-screen { min-height: 0; }

/* ---------- The README that follows ---------- */
.reveal, .lesson { max-width: 76ch; }

.reveal { margin-top: 28px; }
.reveal h2 {
  margin: 6px 0 10px;
  color: var(--bright);
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.2;
}
.reveal h2:focus { outline: none; }
.reveal p, .lesson p { margin: 0 0 14px; }
.dim { color: var(--dim); }
.bright { color: var(--bright); }
b, strong { color: var(--bright); font-weight: 700; }

.theme-note { color: var(--warn); }
.theme-note::before { content: "NOTE: "; font-weight: 700; }
.theme-note[hidden] { display: none; }

a { color: var(--bright); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--fg); color: #000; text-decoration: none; }

.lesson { margin-top: 36px; }
.lesson h2 {
  margin: 28px 0 10px;
  color: var(--bright);
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lesson h2::before { content: "## "; color: var(--dim); }
.lesson h3 { margin: 18px 0 6px; color: var(--bright); font-size: 1em; }
.lesson h3::before { content: "> "; color: var(--dim); }
.lesson code { color: var(--bright); font-family: inherit; }
.lesson i { font-style: normal; text-decoration: underline; }
.lesson hr {
  border: 0;
  margin: 26px 0;
  height: 1.4em;
  overflow: hidden;
}
.lesson hr::before { content: "----------------------------------------------------------------"; color: var(--dim); white-space: nowrap; }

.facts { border-collapse: collapse; margin: 0 0 10px; }
.facts th, .facts td { padding: 1px 0; text-align: left; vertical-align: top; font-weight: 400; }
.facts th { color: var(--dim); white-space: nowrap; padding-right: 2ch; }
.facts th::after { content: ":"; }
.facts td { color: var(--bright); word-break: break-word; }

.threats dt { color: var(--bright); margin-top: 12px; }
.threats dt::before { content: "* "; color: var(--dim); }
.threats dd { margin: 2px 0 0 2ch; }

.lesson ol, .lesson ul { padding-left: 3ch; margin: 0 0 14px; }
.lesson li { margin-bottom: 8px; }
.lesson li::marker { color: var(--dim); }

.sig { color: var(--dim); }
.sig-links { color: var(--dim); }

/* ---------- Opt-in QR scam-awareness simulation ---------- */
html.qr-flow,
html.qr-flow body {
  min-height: 100%;
  background: #fff;
}

html.qr-flow body {
  padding: 0;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
}

html.qr-flow [data-standard],
html.qr-flow .skip-link,
html.qr-flow .tty-controls {
  display: none !important;
}

.qr-flow[data-qr-flow] { display: none; }
html.qr-flow [data-qr-flow] { display: block; }

html.qr-flow[data-qr-stage="redirect"] .qr-offer,
html.qr-flow[data-qr-stage="redirect"] .qr-stop,
html.qr-flow[data-qr-stage="offer"] .qr-redirect,
html.qr-flow[data-qr-stage="offer"] .qr-stop,
html.qr-flow[data-qr-stage="stop"] .qr-redirect,
html.qr-flow[data-qr-stage="stop"] .qr-offer {
  display: none;
}

html.qr-flow[data-qr-stage="stop"] body { background: #000; }

.qr-redirect {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: #555;
  font-size: 14px;
}

.qr-redirect p { margin: 0; }

.qr-offer {
  min-height: 100vh;
  padding: 22px 16px 40px;
  background: #f4f5f7;
}

.qr-offer-header {
  display: flex;
  max-width: 720px;
  margin: 0 auto 38px;
  align-items: center;
  justify-content: space-between;
}

.qr-brand { margin: 0; font-size: 16px; font-weight: 700; }
.qr-demo-label { margin: 0; color: #555; font-size: 12px; }

.qr-offer-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 26px;
  border: 1px solid #e0e2e5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 22px rgb(0 0 0 / 7%);
  text-align: center;
}

.qr-kicker {
  margin: 0 0 10px;
  color: #596579;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.qr-offer-card h1 { margin: 0 0 12px; font-size: clamp(26px, 7vw, 36px); }
.qr-offer-copy { margin: 0 0 26px; color: #4b5563; line-height: 1.5; }
.qr-countdown-label { margin: 0 0 4px; color: #555; font-size: 13px; }
.qr-countdown { margin: 0 0 22px; color: #a32626; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }

.qr-claim {
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  background: #176b43;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.qr-claim:hover { background: #105536; }
.qr-claim:disabled { cursor: wait; opacity: .75; }
.qr-claim:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.qr-terms { margin: 18px 0 0; color: #666; font-size: 12px; line-height: 1.5; }
.qr-processing { min-height: 1.5em; margin: 16px 0 0; color: #333; font-size: 14px; }

.qr-stop {
  min-height: 100vh;
  padding: 32px 20px;
  background: #000;
  color: #eee;
}

.qr-stop-content { max-width: 680px; margin: 0 auto; }
.qr-stop-word { margin: 8vh 0 20px; color: #fff; font-size: clamp(56px, 16vw, 112px); font-weight: 900; line-height: 1; }
.qr-stop-message { color: #fff; font-size: clamp(20px, 5vw, 28px); font-weight: 700; line-height: 1.3; }
.qr-stop-detail, .qr-stop-safety { max-width: 60ch; color: #bbb; line-height: 1.65; }
.qr-stop-safety { margin-top: 28px; font-size: 14px; }
.qr-stop a { color: #fff; }

/* ---------- Highlights ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0 0 8px; }
.stat { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-num { color: var(--bright); font-size: 2.6em; font-weight: 700; line-height: 1; }
.stat-label { color: var(--fg); }
.cases dt { color: var(--warn); margin-top: 14px; }
.cases dt::before { content: "* "; color: var(--dim); }
.cases dd { margin: 3px 0 0 2ch; }
.tips li { margin-bottom: 10px; }
.sources { color: var(--dim); font-size: 0.85em; }
.sources a { color: var(--dim); }

/* ---------- Reveal gating ---------- */
html.js body:not(.is-revealed) [data-reveal] { display: none; }

@media (max-width: 600px) {
  body.tty { font-size: 14px; padding: 10px 10px 48px; }
  .tty-controls { top: 4px; right: 4px; }
}

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

@media print {
  .tty-controls, .term-screen { display: none; }
  html.js body [data-reveal] { display: block !important; }
  html, body.tty { background: #fff; color: #000; }
}

/* ---------- Highlights under the STOP screen ---------- */
html.qr-flow[data-qr-stage="stop"] [data-standard] { display: block !important; }
html.qr-flow[data-qr-stage="stop"] body { color: var(--fg); font-family: var(--mono); }
html.qr-flow[data-qr-stage="stop"] main { max-width: 680px; margin: 0 auto; padding: 8px 16px 64px; }
html.qr-flow[data-qr-stage="stop"] [data-hl-head] { display: none; }
html.qr-flow[data-qr-stage="stop"] .lesson { margin-top: 0; }

/* Direct visits (no flyer tag) see only the highlights */
.hl-head h1 { margin: 24px 0 8px; color: var(--bright); font-size: 2em; line-height: 1.15; }
.hl-head p { margin: 0; color: var(--fg); }
html.qr-flow[data-qr-stage="stop"] body { display: flex; flex-direction: column; }
html.qr-flow[data-qr-stage="stop"] [data-qr-flow] { order: 0; }
html.qr-flow[data-qr-stage="stop"] main { order: 1; width: 100%; }
