/* Phishing Triage Field Guide — shared styles
   Type: Atkinson Hyperlegible (Braille Institute), chosen because it keeps
   look-alike characters (rn / m, l / 1 / I, 0 / O) distinct — the same skill
   readers need when checking sender domains. */

:root {
  --paper: #f4f6f9;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-soft: #46546b;
  --rule: #d3dae5;
  --link: #0b6478;
  --link-hover: #084b5a;
  --warn-ink: #8a1c1c;
  --warn-bg: #fbeceb;
  --warn-edge: #c0392b;
  --note-ink: #6b4300;
  --note-bg: #fdf3dc;
  --note-edge: #c98a12;
  --code-bg: #e8edf4;
  --focus: #f2a900;
  --measure: 70ch;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Header and navigation ---------- */
.site-header {
  background: var(--ink);
  color: #fff;
}
.header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0.9rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-name {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.01em;
}
.site-name:hover { color: #fff; }
.site-name span { font-weight: 400; color: #b9c6dc; }

.menu-toggle {
  display: none;
  font: inherit; font-size: 1rem; color: #fff;
  background: transparent; border: 1px solid #6c7d9c; border-radius: 6px;
  padding: 0.35rem 0.8rem; cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.25rem; }
.site-nav a {
  display: block; color: #dbe3f0; text-decoration: none;
  padding: 0.35rem 0.6rem; border-radius: 6px; font-size: 0.98rem;
}
.site-nav a:hover { background: #22325a; color: #fff; }
.site-nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.4rem 0 0.6rem; }
  .site-nav a { padding: 0.6rem 0.6rem; }
}

/* ---------- Page layout ---------- */
main { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1rem 3rem; }
.content { max-width: var(--measure); }
.wide { max-width: 60rem; }

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin: 0 0 0.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin: 2.6rem 0 0.7rem; padding-top: 1.2rem; border-top: 2px solid var(--ink); }
h3 { font-size: 1.25rem; margin: 1.8rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.28rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.meta { color: var(--ink-soft); font-size: 0.95rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }
li > ul, li > ol { margin-top: 0.4rem; }

code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--code-bg); padding: 0.08em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre {
  background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ink);
  padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5; border-radius: 4px; margin: 0 0 1.4rem;
}
pre code { background: none; padding: 0; overflow-wrap: normal; }

/* ---------- Home hero: the look-alike sender ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; margin-bottom: 1rem; }
.lookalike {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.4rem 1.4rem 1.2rem;
}
.lookalike p.prompt { margin: 0 0 0.9rem; font-weight: 700; }
.lookalike .addr {
  font-family: var(--mono); font-size: clamp(1.05rem, 0.8rem + 1.3vw, 1.55rem);
  padding: 0.55rem 0.7rem; border-radius: 6px; background: var(--paper); margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
}
.lookalike details { margin-top: 0.9rem; }
.lookalike summary { cursor: pointer; color: var(--link); font-weight: 700; }
.lookalike details p { margin: 0.6rem 0 0; }
mark { background: #ffe08a; color: var(--ink); padding: 0 0.1em; border-radius: 3px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
}

.start-button {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700;
  padding: 0.75rem 1.3rem; border-radius: 8px; margin-top: 0.4rem;
}
.start-button:hover { background: #22325a; color: #fff; }

/* ---------- Callouts ---------- */
.callout { border-left: 5px solid; padding: 0.9rem 1.1rem; margin: 1.4rem 0; border-radius: 0 6px 6px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 0.2rem; }
.callout.warning { background: var(--warn-bg); border-color: var(--warn-edge); color: var(--warn-ink); }
.callout.note { background: var(--note-bg); border-color: var(--note-edge); color: var(--note-ink); }
.callout.takeaway { background: var(--surface); border-color: var(--link); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
caption { text-align: left; font-weight: 700; padding: 0.8rem 1rem 0.2rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); }
thead th { background: var(--code-bg); font-size: 0.95rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 700; }
@media (max-width: 640px) { th, td { min-width: 9rem; } }

/* ---------- Glossary ---------- */
.glossary dt { font-weight: 700; font-size: 1.15rem; margin-top: 1.4rem; }
.glossary dd { margin: 0.3rem 0 0; padding-left: 1rem; border-left: 3px solid var(--rule); }
.glossary dd p { margin-bottom: 0.4rem; }
.glossary .why { color: var(--ink-soft); }
.term-index { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.term-index a { display: inline-block; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.95rem; text-decoration: none; }

/* ---------- Procedure steps (a real sequence, so numbered) ---------- */
.phase { margin-top: 2.2rem; }
.steps { list-style: none; padding: 0; counter-reset: step var(--start, 0); }
.steps > li {
  counter-increment: step; position: relative; padding: 0 0 1.4rem 3.4rem; margin: 0;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 1.05rem;
}
.steps > li::after {
  content: ""; position: absolute; left: 1.13rem; top: 2.4rem; bottom: 0.3rem; width: 2px; background: var(--rule);
}
.steps > li:last-child::after { display: none; }
.steps .step-title { font-weight: 700; display: block; margin-bottom: 0.2rem; font-size: 1.15rem; }

figure { margin: 1.6rem 0 2rem; }
figure.flow { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem; max-width: 46rem; }
figcaption { color: var(--ink-soft); font-size: 0.98rem; margin-top: 0.6rem; }
.flow-text summary { cursor: pointer; color: var(--link); font-weight: 700; margin-top: 0.4rem; }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; margin: 0 0 0.7rem; }
.faq summary {
  cursor: pointer; font-weight: 700; padding: 0.9rem 1.1rem; list-style: none; position: relative; padding-right: 2.8rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 0.75rem; font-size: 1.3rem; color: var(--link); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.1rem 1rem; }

/* ---------- References ---------- */
.references li { margin-bottom: 0.9rem; padding-left: 2rem; text-indent: -2rem; list-style: none; overflow-wrap: anywhere; }
.references { padding-left: 0; }

/* ---------- Page footer navigation ---------- */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pager a { text-decoration: none; display: block; max-width: 48%; }
.pager a span { display: block; color: var(--ink-soft); font-size: 0.9rem; }
.pager a strong { font-size: 1.1rem; }
.pager .next { margin-left: auto; text-align: right; }

.site-footer { border-top: 1px solid var(--rule); background: var(--surface); }
.site-footer .inner { max-width: 72rem; margin: 0 auto; padding: 1.4rem 1rem; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer p { margin: 0 0 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .pager, .site-footer, .skip-link { display: none; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}
