/* ==========================================================================
   DON'T TAKE THE BAIT — stylesheet
   Look: technical. Terminal, monospace, dark. It should feel like security kit.
   Read: plain. Body copy stays large sans-serif because the audience is
         people who are NOT technical. The aesthetic is the hook; the words
         must never be the barrier.

   Hard rules kept from the accessible build:
     - Body text 19px+. Never below 17px anywhere.
     - Every tappable thing is at least 44px tall.
     - Nothing depends on colour alone — icons and words carry meaning too.
   Committed dark theme (deliberate). Print styles invert to ink-on-paper.
   ========================================================================== */

:root {
  --bg:        #080b10;
  --bg-2:      #0d1219;
  --surface:   #121924;
  --surface-2: #18212e;
  --line:      #232f40;
  --line-hot:  #35455c;

  --ink:       #e8edf5;
  --ink-soft:  #94a4bb;
  --ink-dim:   #64748b;

  --term:      #4ade80;  /* terminal green */
  --cyan:      #38bdf8;
  --red:       #ff5470;
  --amber:     #fbbf24;
  --violet:    #a78bfa;

  --red-bg:    #1e1013;
  --amber-bg:  #1c1608;
  --term-bg:   #0b1a13;
  --cyan-bg:   #0a1620;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code", "Consolas", "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 10px;
  --measure: 36rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 19px/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
  /* faint technical grid */
  background-image:
    linear-gradient(rgba(56, 189, 248, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, .035) 1px, transparent 1px);
  background-size: 48px 48px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 11vw, 6.5rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }

p  { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.3em; }
li { margin-bottom: .55em; }
strong { color: #fff; font-weight: 700; }
em { color: var(--ink); }
code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--cyan);
}

a { color: var(--cyan); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--term); color: #05140c;
  font-family: var(--mono); font-weight: 700;
  padding: 1rem 1.25rem; z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
  position: relative;
  scroll-margin-top: 5rem; /* clear the sticky topbar when jumped to */
}

.lede { font-size: 1.15em; color: var(--ink-soft); max-width: var(--measure); }

/* mono section labels — the "technical" texture */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--term);
  background: var(--term-bg);
  border: 1px solid rgba(74, 222, 128, .25);
  border-radius: 4px;
  padding: .35rem .7rem;
  margin-bottom: 1rem;
}
.eyebrow::before { content: "// "; color: var(--ink-dim); }

/* ============================ top bar ================================== */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8, 11, 16, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  min-height: 62px; padding-top: .4rem; padding-bottom: .4rem;
}
.brand {
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  text-decoration: none; color: var(--ink);
  display: flex; align-items: center; gap: .5rem;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--term); box-shadow: 0 0 10px var(--term);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.topbar nav { margin-left: auto; display: flex; gap: .15rem; flex-wrap: wrap; }
.topbar nav a {
  display: flex; align-items: center;
  min-height: 44px; padding: 0 .75rem;
  font-family: var(--mono); font-size: .88rem; font-weight: 500;
  text-decoration: none; color: var(--ink-soft);
  border-radius: 6px; border: 1px solid transparent;
}
.topbar nav a:hover { color: var(--cyan); border-color: var(--line-hot); background: var(--cyan-bg); }

/* ============================== hero =================================== */

.hero {
  position: relative;
  padding: 3rem 0 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255, 84, 112, .16), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

/* --- the fake terminal that "attacks" you --- */
.terminal {
  background: var(--bg-2);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  overflow: hidden;
  max-width: 46rem;
  margin-bottom: 3rem;
}
.terminal-bar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: .65rem .9rem;
}
.terminal-bar i {
  width: 11px; height: 11px; border-radius: 50%; display: block;
  background: var(--line-hot);
}
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-dim);
  margin-left: .5rem;
}
.terminal-body {
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.75;
  padding: 1.25rem;
  min-height: 15rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .ok   { color: var(--term); }
.terminal-body .warn { color: var(--amber); }
.terminal-body .bad  { color: var(--red); font-weight: 700; }
.terminal-body .cmd  { color: var(--ink); }
.terminal-body .prompt { color: var(--term); }
.cursor {
  display: inline-block; width: .6em; height: 1.05em;
  background: var(--term); vertical-align: text-bottom;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- BOOM --- */
.boom {
  font-family: var(--mono);
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 84, 112, .45);
  margin-bottom: .15em;
}
.boom-sub {
  font-size: clamp(1.3rem, 4.5vw, 2.4rem);
  font-weight: 600;
  font-family: var(--mono);
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 0 0 1.75rem;
  max-width: none;
}
.hero-reveal p { font-size: 1.12em; color: var(--ink-soft); }

.reveal-anim { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.hero-stat { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2.5rem; }
.hero-stat div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
}
.hero-stat strong { display: block; font-family: var(--mono); font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.hero-stat span { font-size: .98rem; color: var(--ink-soft); }

/* ============================ buttons ================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.5rem;
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  background: var(--term); color: #05140c;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(74, 222, 128, .25); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-hot); }
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 8px 22px rgba(56, 189, 248, .15); }
.btn-danger { background: var(--red); color: #17070b; }
.btn-danger:hover { box-shadow: 0 8px 22px rgba(255, 84, 112, .3); }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* ============================= cards =================================== */

.grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.card::before {
  content: attr(data-id);
  position: absolute; top: .8rem; right: 1rem;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-dim);
  letter-spacing: .08em;
}
.card h3 { margin-top: 0; display: flex; align-items: center; gap: .6rem; padding-right: 3rem; }
.card p { font-size: 1rem; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.5rem; line-height: 1; }

.quote {
  background: var(--bg-2);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: .85rem 1.1rem;
  margin: .85rem 0 0;
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--amber);
  max-width: none;
}

/* ======================= warning-sign list ============================= */

.signs { list-style: none; padding: 0; max-width: 50rem; counter-reset: sign; }
.signs > li {
  counter-increment: sign;
  display: flex; gap: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}
.signs > li::before {
  content: "0" counter(sign);
  flex: 0 0 auto;
  font-family: var(--mono); font-weight: 800; font-size: 1.1rem;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 6px;
  width: 3rem; height: 2.5rem;
  display: grid; place-items: center;
}
.signs h3 { margin: .1rem 0 .4rem; }
.signs p { color: var(--ink-soft); }
.signs p:last-child { margin-bottom: 0; }

/* ===================== the fake message viewer ========================= */

.tablist { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tablist button {
  font-family: var(--mono); font-weight: 600; font-size: .92rem;
  min-height: 48px; padding: 0 1.1rem;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer;
}
.tablist button:hover { border-color: var(--line-hot); color: var(--ink); }
.tablist button[aria-selected="true"] {
  background: var(--cyan-bg); border-color: var(--cyan); color: var(--cyan);
}

.fake-note {
  display: flex; align-items: center; gap: .6rem;
  background: var(--amber-bg); color: var(--amber);
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 6px;
  padding: .7rem 1rem;
  font-family: var(--mono); font-size: .9rem;
  margin-bottom: 1.5rem;
  max-width: none;
}

.mock {
  background: var(--surface);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  overflow: hidden;
}
.mock-head { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.mock-head .row { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; align-items: baseline; }
.mock-head .row:last-child { margin-bottom: 0; }
.mock-head .label {
  font-family: var(--mono); font-size: .85rem; color: var(--ink-dim);
  min-width: 5rem; text-transform: uppercase; letter-spacing: .06em;
}
.mock-body { padding: 1.4rem 1.25rem; }
.mock-body p { font-size: 1.02rem; }

.mock-phone { max-width: 27rem; }
.mock-phone .bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 1rem 1.1rem;
  margin: 1.25rem;
}
.mock-phone .bubble p { font-size: 1.02rem; margin: 0; max-width: none; }

.mock-btn {
  display: inline-block;
  background: var(--cyan); color: #04121c;
  padding: .7rem 1.5rem; border-radius: 6px;
  font-weight: 700; text-decoration: none;
  margin: .5rem 0;
}

/* clickable red-flag markers inside a mock */
.flag-btn {
  font: inherit;
  background: rgba(251, 191, 36, .1);
  color: var(--amber);
  border: 1px dashed rgba(251, 191, 36, .5);
  border-radius: 4px;
  padding: .1em .35em;
  cursor: pointer;
  text-align: left;
}
.flag-btn::after { content: " ⚑"; font-size: .8em; }
.flag-btn:hover { background: rgba(251, 191, 36, .22); border-style: solid; }
.flag-btn[aria-expanded="true"] {
  background: var(--amber); color: #171207; border-style: solid; font-weight: 600;
}
.flag-btn.seen:not([aria-expanded="true"]) { border-color: rgba(251, 191, 36, .28); opacity: .78; }

.flag-hint { font-size: .98rem; color: var(--ink-soft); margin: 1rem 0 0; max-width: none; }

.flag-readout {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  min-height: 7rem;
}
.flag-readout h3 { margin-top: 0; color: var(--amber); font-family: var(--mono); }
.flag-readout p { max-width: none; margin-bottom: 0; color: var(--ink); }
.flag-readout .placeholder { color: var(--ink-dim); font-family: var(--mono); font-size: .95rem; }
.flag-progress {
  font-family: var(--mono); font-size: .88rem; color: var(--ink-dim);
  margin-top: 1rem; letter-spacing: .04em;
}

/* raw-headers disclosure — pure technical flavour, clearly optional */
.raw {
  margin-top: 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.raw summary { font-family: var(--mono); font-size: .88rem; color: var(--ink-soft); padding: .85rem 1.1rem; }
.raw pre {
  font-family: var(--mono); font-size: .82rem; line-height: 1.7;
  color: var(--ink-soft); margin: 0; padding: 0 1.1rem 1.1rem;
  overflow-x: auto;
}
.raw pre b { color: var(--red); font-weight: 700; }
.raw pre i { color: var(--ink-dim); font-style: normal; }

/* ============================== quiz =================================== */

.quiz {
  background: var(--surface);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 48rem;
}
.quiz-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .88rem; color: var(--ink-dim);
  letter-spacing: .05em; margin-bottom: .85rem;
}
.quiz-bar { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-bottom: 1.5rem; }
.quiz-bar span { display: block; height: 100%; background: var(--cyan); width: 0; transition: width .35s ease; }

.quiz-scenario {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 0 6px 6px 0;
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.5rem;
}
.quiz-scenario p { max-width: none; margin-bottom: 0; }
.quiz-scenario .from {
  font-family: var(--mono); font-size: .86rem; color: var(--ink-dim);
  display: block; margin-bottom: .6rem; word-break: break-word;
}

.quiz-answers { display: flex; gap: .75rem; flex-wrap: wrap; }
.quiz-answers button {
  flex: 1 1 13rem;
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  min-height: 56px; padding: 0 1.25rem;
  border-radius: 8px; border: 1px solid var(--line-hot);
  background: var(--bg-2); color: var(--ink);
  cursor: pointer;
}
.quiz-answers button:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.quiz-answers button:disabled { opacity: .4; cursor: default; }

.quiz-feedback { margin-top: 1.5rem; border-radius: var(--radius); padding: 1.3rem 1.45rem; border: 1px solid; }
.quiz-feedback.right { background: var(--term-bg); border-color: rgba(74, 222, 128, .4); }
.quiz-feedback.wrong { background: var(--red-bg); border-color: rgba(255, 84, 112, .4); }
.quiz-feedback h3 { margin-top: 0; font-family: var(--mono); }
.quiz-feedback.right h3 { color: var(--term); }
.quiz-feedback.wrong h3 { color: var(--red); }
.quiz-feedback p { max-width: none; color: var(--ink); }
.quiz-feedback p:last-of-type { margin-bottom: 0; }
.quiz-feedback .btn { margin-top: 1.2rem; }

.quiz-result { text-align: center; padding: 1rem 0; }
.quiz-result .score {
  font-family: var(--mono); font-size: 4rem; font-weight: 800;
  line-height: 1; display: block; color: var(--term); margin-bottom: .5rem;
}
.quiz-result p { max-width: none; color: var(--ink-soft); }

.hidden { display: none !important; }

/* ========================= emergency steps ============================= */

.emergency {
  background: var(--red-bg);
  border: 1px solid rgba(255, 84, 112, .45);
  border-radius: var(--radius);
  padding: 1.85rem;
  max-width: 50rem;
}
.emergency h2 { color: var(--red); margin-top: 0; font-family: var(--mono); font-size: 1.5rem; }
.steps { list-style: none; padding: 0; counter-reset: step; max-width: none; }
.steps > li {
  counter-increment: step;
  display: flex; gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255, 84, 112, .22);
}
.steps > li:first-child { border-top: 0; padding-top: 0; }
.steps > li::before {
  content: counter(step);
  flex: 0 0 auto;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  background: var(--red); color: #17070b;
  border-radius: 6px; font-family: var(--mono); font-weight: 800;
}
.steps strong { display: block; font-size: 1.08rem; margin-bottom: .25rem; }
.steps p { margin: 0; max-width: none; font-size: 1rem; color: var(--ink-soft); }

/* ========================== rules of thumb ============================= */

.rule {
  background: var(--term-bg);
  border: 1px solid rgba(74, 222, 128, .35);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 0;
  max-width: 50rem;
}
.rule h3 { color: var(--term); margin-top: 0; font-family: var(--mono); }
.rule p { color: var(--ink); }
.rule p:last-child { margin-bottom: 0; }

/* ============================== FAQ ==================================== */

details:not(.raw) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: .7rem;
  max-width: 50rem;
}
details:not(.raw) summary {
  cursor: pointer; padding: 1.1rem 1.35rem;
  font-weight: 650; font-size: 1.05rem; min-height: 44px;
  list-style: none; display: flex; align-items: center; gap: .75rem;
}
summary::-webkit-details-marker { display: none; }
details:not(.raw) summary::before {
  content: "[+]"; font-family: var(--mono); color: var(--cyan);
  font-size: .95rem; font-weight: 700; flex: 0 0 auto;
}
details:not(.raw)[open] summary::before { content: "[-]"; }
details:not(.raw) > *:not(summary) { padding: 0 1.35rem; }
details:not(.raw) > *:last-child { padding-bottom: 1.35rem; }
details p { color: var(--ink-soft); }

/* ============================= footer ================================== */

footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 2.75rem 0;
  font-size: .95rem;
  color: var(--ink-dim);
}
footer p { max-width: 46rem; }
footer strong { color: var(--ink-soft); }

/* ===================== print (the one-page guide) ====================== */

@media print {
  body {
    background: #fff !important;
    background-image: none !important;
    color: #000;
    font-size: 10pt;
    line-height: 1.38;
  }
  .no-print, .topbar, .skip-link, footer, .hero::before { display: none !important; }
  section { padding: 0; border: 0; page-break-inside: avoid; }
  h1 { font-size: 19pt; color: #000; text-shadow: none; }
  h2 { font-size: 12pt; color: #000; }
  h3 { font-size: 10.5pt; color: #000; }
  p, li, .lede, .card p, .steps p, .signs p, details p { color: #000; }
  strong, em { color: #000; }
  a { color: #000; text-decoration: none; }
  .card, .signs > li, .rule, .emergency, .mock, details, .quote {
    background: #fff !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .eyebrow { background: none !important; border: 0 !important; color: #444 !important; padding: 0; }
  .steps > li::before, .signs > li::before { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; }
  code { background: none; border: 0; color: #000; }
}
