/* ==========================================================================
   ScamSense — stylesheet
   One stylesheet for the whole site. No external dependencies, no web fonts.
   ========================================================================== */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #141922;
  --muted: #566072;
  --border: #e1e7f0;
  --brand: #1f5fe0;
  --brand-ink: #123f9e;
  --brand-soft: #e8f0ff;
  --ok: #0b8a5c;
  --ok-soft: #e4f6ee;
  --warn: #b45309;
  --warn-soft: #fdf1e0;
  --danger: #c02626;
  --danger-soft: #fdecec;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px rgba(15, 23, 42, .06);
  --radius: 14px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b24;
    --surface-2: #1b222d;
    --text: #e8edf5;
    --muted: #9aa6b8;
    --border: #26303d;
    --brand: #6ea1ff;
    --brand-ink: #a8c6ff;
    --brand-soft: #16233c;
    --ok: #4ed0a0;
    --ok-soft: #10291f;
    --warn: #f0a95c;
    --warn-soft: #2b2013;
    --danger: #ff8080;
    --danger-soft: #2d1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 16px; flex: none;
}
.brand-text strong { color: var(--brand); }

.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a {
  color: var(--muted); font-size: .95rem; font-weight: 600;
  padding: 8px 12px; border-radius: 9px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.nav-toggle {
  display: none; width: 42px; height: 38px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 9px; cursor: pointer; padding: 9px 10px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; gap: 2px;
    display: none; box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 46px;
  background:
    radial-gradient(900px 380px at 15% -10%, var(--brand-soft), transparent 70%),
    radial-gradient(700px 340px at 90% 0%, var(--ok-soft), transparent 70%);
}
.hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.16rem; color: var(--muted); max-width: 62ch; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 650; font-size: .97rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
.section-head { max-width: 64ch; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin: 8px 0 8px; font-size: 1.13rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--brand); text-decoration: none; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 14px; }
.card .read-more { margin-top: auto; font-weight: 650; font-size: .92rem; }
.card-icon { font-size: 1.6rem; line-height: 1; }

.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 999px;
}

/* ---------- Article ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 20px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.post-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 26px; }
.lead { font-size: 1.12rem; color: var(--muted); }

.article-body h2 { border-top: 1px solid var(--border); padding-top: 1.1em; }
.article-body ul, .article-body ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .55em; }

.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0;
}
.toc h2 { margin: 0 0 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border: 0; padding: 0; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: .35em; }

.callout {
  border-radius: var(--radius); padding: 18px 22px; margin: 26px 0;
  border: 1px solid var(--border); background: var(--surface);
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: .3em; }
.callout-warn { background: var(--warn-soft); border-color: var(--warn); }
.callout-warn strong { color: var(--warn); }
.callout-danger { background: var(--danger-soft); border-color: var(--danger); }
.callout-danger strong { color: var(--danger); }
.callout-ok { background: var(--ok-soft); border-color: var(--ok); }
.callout-ok strong { color: var(--ok); }

.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: "\2713"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800;
}
.redflags { list-style: none; padding: 0 !important; }
.redflags li { position: relative; padding-left: 30px; }
.redflags li::before { content: "\2691"; position: absolute; left: 0; top: 0; color: var(--danger); font-weight: 800; }

.table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq details[open] summary { margin-bottom: .6em; }

.next-reads { margin: 46px 0 10px; }
.next-reads h2 { font-size: 1.15rem; border: 0; margin-top: 0; }

.info-list { list-style: none; padding: 0; }
.info-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 60px; padding: 48px 0 26px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); font-size: .95rem; }
.footer-grid a:hover { color: var(--brand); }
.footer-about p { color: var(--muted); font-size: .95rem; max-width: 44ch; }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 34px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.footer-bottom p { color: var(--muted); font-size: .87rem; margin: 0; }

.center { text-align: center; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
