/*
 * pages.css - layout for the generated onfire.so pages (content/pages and
 * content/blog, built by frontend/scripts/site/build.mjs). Plain CSS, no
 * Tailwind runtime, so these pages paint without waiting for a script.
 * Dark first, like the blog; html[data-theme="light"] (set by /theme.js)
 * switches the palette. Colours are the site's: #FF6B1F orange, #FFCE54 yellow.
 */
:root {
  --bg: #0a0b14; --surface: #111827; --raise: #1f2937; --line: rgba(255,255,255,.1);
  --ink: #f9fafb; --ink-2: #d1d5db; --ink-3: #9ca3af; --accent: #ff8a3d; --accent-strong: #ff6b1f;
  --warn-bg: rgba(255,107,31,.08); --warn-line: rgba(255,107,31,.35);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #faf7f4; --surface: #ffffff; --raise: #f2ede8; --line: rgba(26,20,16,.12);
  --ink: #1a1410; --ink-2: #2e2723; --ink-3: #5e5650; --accent: #c2410c; --accent-strong: #c2410c;
  --warn-bg: rgba(194,65,12,.06); --warn-line: rgba(194,65,12,.3);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--font); text-rendering: optimizeLegibility; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #ffce54; outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.pg-skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.pg-skip:focus { left: 12px; }

/* header */
.pg-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pg-nav { max-width: 72rem; margin: 0 auto; padding: 0 1rem; height: 64px; display: flex; align-items: center; gap: 1.25rem; }
.pg-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.pg-logo img { border-radius: 22%; }
.pg-nav-links { display: flex; gap: 1.1rem; margin-left: .5rem; overflow-x: auto; scrollbar-width: none; }
.pg-nav-links a { color: var(--ink-3); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.pg-nav-links a:hover, .pg-nav-links a[aria-current] { color: var(--ink); }
.pg-nav-end { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
@media (max-width: 760px) { .pg-nav-links { display: none; } }

.pg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.4rem; border-radius: 999px; background: var(--accent-strong); color: #fff; font-weight: 600; text-decoration: none; transition: transform .2s cubic-bezier(.16,1,.3,1), background-color .2s ease; }
.pg-btn:hover { background: #ea580c; text-decoration: none; }
.pg-btn:active { transform: scale(.97); }
.pg-btn--small { min-height: 36px; padding: 0 1rem; font-size: .9rem; }

/* article */
.pg-main { padding: 2rem 1rem 4rem; }
.pg-article { max-width: 46rem; margin: 0 auto; }
.pg-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 1.5rem; font-size: .85rem; color: var(--ink-3); }
.pg-crumbs li + li::before { content: "/"; margin-right: .35rem; opacity: .6; }
.pg-crumbs a { color: var(--ink-3); text-decoration: none; }
.pg-crumbs a:hover { color: var(--ink); }
.pg-eyebrow { margin: 0 0 .5rem; color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.pg-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 1rem; text-wrap: balance; }
.pg-postmeta { color: var(--ink-3); font-size: .9rem; }
.pg-postmeta p { margin: .25rem 0 0; }
.pg-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.pg-tag { display: inline-block; padding: .15rem .65rem; border-radius: 999px; background: var(--warn-bg); color: var(--accent); font-size: .78rem; font-weight: 600; }
.pg-hero-img { margin: 1.5rem 0 0; }
.pg-hero-img img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 1rem; border: 1px solid var(--line); background: var(--raise); }
.pg-hero-img figcaption { margin-top: .4rem; font-size: .75rem; color: var(--ink-3); text-align: right; }
.pg-lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink); margin: 1.5rem 0; text-wrap: pretty; }

.pg-body h2, .pg-faq h2, .pg-related h2 { font-size: 1.55rem; line-height: 1.25; letter-spacing: -.01em; margin: 2.75rem 0 .75rem; text-wrap: balance; }
.pg-body h3 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.pg-body p, .pg-body li { color: var(--ink-2); }
.pg-body p { margin: 0 0 1rem; text-wrap: pretty; }
.pg-body ul, .pg-body ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.pg-body li { margin: .35rem 0; }
.pg-body strong { color: var(--ink); }
.pg-body table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1.25rem 0; display: block; overflow-x: auto; }
.pg-body th, .pg-body td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-top: 1px solid var(--line); }
.pg-body thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.pg-body tbody th { font-weight: 500; color: var(--ink); }
.pg-body td { color: var(--ink-2); }
.pg-body .pg-note { font-size: .85rem; color: var(--ink-3); }

/* boxes */
.pg-facts, .pg-keypoints, .pg-box { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem 1.4rem; margin: 1.5rem 0; }
.pg-keypoints { border-color: var(--warn-line); }
.pg-facts h2, .pg-keypoints h2 { margin: 0 0 .75rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.pg-keypoints ul { margin: 0; padding-left: 1.2rem; }
.pg-keypoints li { margin: .35rem 0; color: var(--ink-2); }
.pg-facts dl { margin: 0; display: grid; gap: .6rem; }
.pg-facts dl > div { display: grid; grid-template-columns: minmax(8rem, 32%) 1fr; gap: 1rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.pg-facts dl > div:first-child { border-top: 0; padding-top: 0; }
.pg-facts dt { color: var(--ink-3); font-size: .9rem; }
.pg-facts dd { margin: 0; color: var(--ink); font-size: .95rem; }
@media (max-width: 520px) { .pg-facts dl > div { grid-template-columns: 1fr; gap: .15rem; } }

/* "Example of a scam message": a phone-style bubble, clearly labelled */
.pg-example { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px dashed var(--warn-line); border-radius: 1rem; background: var(--warn-bg); }
.pg-example-label { margin: 0 0 .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.pg-example-from { margin: 0 0 .35rem; font-size: .8rem; color: var(--ink-3); }
.pg-bubble { max-width: 34rem; margin: 0 0 .5rem; padding: .7rem .9rem; border-radius: 1.1rem 1.1rem 1.1rem .35rem; background: var(--raise); color: var(--ink); font-size: .95rem; line-height: 1.5; }
.pg-example-why { margin: .75rem 0 0; font-size: .9rem; color: var(--ink-2); }

.pg-checklist { list-style: none; padding-left: 0 !important; }
.pg-checklist li { position: relative; padding-left: 1.9rem; }
.pg-checklist li::before { content: ""; position: absolute; left: .1rem; top: .35rem; width: 1.05rem; height: 1.05rem; border-radius: 4px; border: 2px solid var(--accent); }

.pg-report { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.25rem; margin: 1rem 0; }
.pg-report h3 { margin-top: .25rem !important; }

/* FAQ */
.pg-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; margin: .6rem 0; }
.pg-faq summary { cursor: pointer; list-style: none; padding: 1rem 2.6rem 1rem 1.2rem; font-weight: 600; position: relative; }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: .85rem; font-size: 1.3rem; color: var(--ink-3); transition: transform .2s ease; }
.pg-faq details[open] summary::after { transform: rotate(45deg); }
.pg-faq-a { padding: 0 1.2rem 1rem; color: var(--ink-2); }
.pg-faq-a p { margin: 0 0 .6rem; }

/* related + cards */
.pg-related ul, .pg-body .pg-cards, .pg-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
@media (min-width: 640px) { .pg-cards { grid-template-columns: 1fr 1fr; } }
.pg-related a, .pg-cards a { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; text-decoration: none; color: var(--ink-2); transition: border-color .2s ease, transform .2s cubic-bezier(.16,1,.3,1); }
.pg-related a:hover, .pg-cards a:hover { border-color: var(--warn-line); transform: translateY(-2px); }
.pg-related strong, .pg-cards strong { color: var(--ink); font-size: 1.02rem; line-height: 1.35; }
.pg-related span, .pg-cards span { font-size: .9rem; line-height: 1.5; }
.pg-card-date { color: var(--ink-3); font-size: .8rem !important; }
.pg-blog-group h2 { margin-bottom: .25rem; }
.pg-blog-group > p { color: var(--ink-3); margin: 0 0 1rem; }

.pg-cta { margin: 3rem 0 1.5rem; padding: 1.6rem; text-align: center; border-radius: 1.25rem; border: 1px solid var(--warn-line); background: linear-gradient(135deg, rgba(255,107,31,.12), rgba(255,206,84,.08)); }
.pg-cta p { margin: 0 0 1rem; color: var(--ink-2); }
.pg-cta .pg-cta-title { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-bottom: .35rem; }
.pg-updated { font-size: .85rem; color: var(--ink-3); }

/* about */
.pg-person { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.pg-person .pg-avatar { width: 64px; height: 64px; border-radius: 999px; background: var(--raise); display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: 1.3rem; }

/* footer */
.pg-footer { border-top: 1px solid var(--line); padding: 3rem 1rem 2rem; color: var(--ink-3); font-size: .9rem; }
.pg-footer-top { max-width: 72rem; margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.pg-footer-brand p { margin: .75rem 0 0; max-width: 18rem; }
.pg-footer-col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0 0 .75rem; }
.pg-footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.pg-footer-col a { color: var(--ink-3); text-decoration: none; }
.pg-footer-col a:hover { color: var(--ink); }
.pg-footer-bottom { max-width: 72rem; margin: 2rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pg-footer-bottom p { margin: 0; }

/* blog index: cover-image cards (the original blog design, on the pages.css palette) */
.pg-article--wide { max-width: 64rem; }
.pg-article--wide .pg-lede { max-width: 46rem; }
.pg-bcards, .pg-body .pg-bcards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.pg-body .pg-bcards > li { margin: 0; }
@media (min-width: 640px) { .pg-bcards { grid-template-columns: 1fr 1fr; } }
.pg-body .pg-bcards--feature { margin: 2rem 0 1rem; grid-template-columns: 1fr; }
.pg-bcard { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; color: var(--ink-2); text-decoration: none; transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, border-color .25s ease; }
.pg-bcard:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--warn-line); box-shadow: 0 12px 40px rgba(255,107,31,.12); }
.pg-bcard:focus-visible { outline-offset: 3px; border-radius: 1rem; }
.pg-bcard-media { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--raise); }
.pg-bcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.pg-bcard:hover .pg-bcard-media img { transform: scale(1.05); }
.pg-bcard-media--empty { background: linear-gradient(135deg, rgba(255,107,31,.35), rgba(255,206,84,.25)); }
.pg-bcard-body { display: flex; flex-direction: column; gap: .55rem; flex: 1; padding: 1.25rem 1.4rem 1.4rem; }
.pg-bcard-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.pg-bcard-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.pg-bcard-meta time { flex-shrink: 0; color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.pg-bcard-title { color: var(--ink); font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.pg-bcard-desc { font-size: .92rem; line-height: 1.55; color: var(--ink-3); }
.pg-bcard-more { margin-top: auto; padding-top: .35rem; display: inline-flex; align-items: center; gap: .25rem; color: var(--accent); font-weight: 600; font-size: .9rem; }
.pg-bcard-more svg { transition: transform .2s ease; }
.pg-bcard:hover .pg-bcard-more svg { transform: translateX(3px); }
@media (min-width: 860px) {
  .pg-bcard-feature .pg-bcard { flex-direction: row; }
  .pg-bcard-feature .pg-bcard-media { flex: 0 0 56%; aspect-ratio: auto; min-height: 320px; }
  .pg-bcard-feature .pg-bcard-body { justify-content: center; padding: 2rem 2.25rem; }
  .pg-bcard-feature .pg-bcard-title { font-size: 1.7rem; line-height: 1.2; }
  .pg-bcard-feature .pg-bcard-desc { font-size: 1rem; }
  .pg-bcard-feature .pg-bcard-more { margin-top: .5rem; }
}
.pg-pill { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pg-pill--0 { background: rgba(255,107,31,.12); color: #ff8a3d; }
.pg-pill--1 { background: rgba(59,130,246,.12); color: #60a5fa; }
.pg-pill--2 { background: rgba(34,197,94,.12); color: #4ade80; }
.pg-pill--3 { background: rgba(168,85,247,.12); color: #c084fc; }
.pg-pill--4 { background: rgba(6,182,212,.12); color: #22d3ee; }
html[data-theme="light"] .pg-pill--0 { background: rgba(194,65,12,.1); color: #c2410c; }
html[data-theme="light"] .pg-pill--1 { background: rgba(37,99,235,.1); color: #1d4ed8; }
html[data-theme="light"] .pg-pill--2 { background: rgba(22,163,74,.1); color: #15803d; }
html[data-theme="light"] .pg-pill--3 { background: rgba(147,51,234,.1); color: #7e22ce; }
html[data-theme="light"] .pg-pill--4 { background: rgba(8,145,178,.1); color: #0e7490; }
html[data-theme="light"] .pg-bcard:hover { box-shadow: 0 12px 36px rgba(194,65,12,.12); }
.pg-blog-group { margin-top: 3rem; }
@media (prefers-reduced-motion: reduce) {
  .pg-bcard:hover, .pg-bcard:hover .pg-bcard-media img, .pg-bcard:hover .pg-bcard-more svg { transform: none; }
}

/* Table of contents for posts: a sticky left column on wide screens, a
   collapsible box above the body on narrow ones. */
.pg-body h2[id], .pg-body h3[id], .pg-faq h2 { scroll-margin-top: 84px; }
.pg-toc ol { list-style: none; margin: 0; padding: 0; }
.pg-toc a { display: block; color: var(--ink-3); text-decoration: none; font-size: .85rem; line-height: 1.4; padding: .3rem 0 .3rem .75rem; border-left: 2px solid var(--line); transition: color .15s ease, border-color .15s ease; }
.pg-toc a:hover { color: var(--ink); }
.pg-toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent-strong); }
.pg-toc .pg-toc-l3 a { padding-left: 1.5rem; font-size: .8rem; }
.pg-toc-title { margin: 0 0 .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pg-toc-side { display: none; }
.pg-toc-inline { margin: 1.5rem 0 0; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.pg-toc-inline summary { cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--ink); }
.pg-toc-inline[open] summary { margin-bottom: .6rem; }
@media (min-width: 1100px) {
  .pg-main--toc { display: grid; grid-template-columns: 14rem minmax(0, 46rem); gap: 3.5rem; justify-content: center; }
  .pg-main--toc .pg-article { margin: 0; }
  .pg-toc-side { display: block; position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-top: 3.25rem; }
  .pg-toc-inline { display: none; }
}

/* Comparison tables: a cell marked pg-yes gets a green tick, pg-no a red
   cross. The alt text after the slash is what screen readers announce. */
.pg-body td.pg-yes::before, .pg-body td.pg-no::before { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-right: .4rem; border-radius: 999px; font-size: .78rem; font-weight: 800; vertical-align: -.15rem; }
.pg-body td.pg-yes::before { content: "\2713" / "Yes: "; color: #15803d; background: rgba(22,163,74,.14); }
.pg-body td.pg-no::before { content: "\2715" / "No: "; color: #b91c1c; background: rgba(220,38,38,.12); }
html:not([data-theme="light"]) .pg-body td.pg-yes::before { color: #4ade80; background: rgba(74,222,128,.14); }
html:not([data-theme="light"]) .pg-body td.pg-no::before { color: #f87171; background: rgba(248,113,113,.14); }
