/* BurnGuard: one stylesheet, no framework. Light + dark via prefers-color-scheme. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-elev: #ffffff;
  --fg: #0f1419;
  --fg-muted: #5b6573;
  --border: #e4e7ec;
  --brand: #f05a28;          /* ember */
  --brand-strong: #d9481a;
  --brand-soft: #fff1eb;
  --ok: #12805c;   --ok-soft: #e7f6ef;
  --warn: #a15c00; --warn-soft: #fff5e0;
  --bad: #c62828;  --bad-soft: #fdecec;
  --code-bg: #0f1419;
  --code-fg: #e6edf3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e12;
    --bg-soft: #12161c;
    --bg-elev: #161b22;
    --fg: #e6edf3;
    --fg-muted: #9aa5b1;
    --border: #262d36;
    --brand: #ff7043;
    --brand-strong: #ff8a65;
    --brand-soft: #2a1710;
    --ok: #3fb68b;   --ok-soft: #0f2a20;
    --warn: #e0a43a; --warn-soft: #2b2110;
    --bad: #ef5350;  --bad-soft: #2d1414;
    --code-bg: #0d1117;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--bg-soft); border: 1px solid var(--border); padding: .1em .35em; border-radius: 6px; }
pre { background: var(--code-bg); color: var(--code-fg); padding: 1rem 1.1rem; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.5; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--fg-muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--brand-strong); }
.lead { font-size: 1.2rem; color: var(--fg-muted); max-width: 640px; }

/* Header / nav */
.site-header, .app-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 1.25rem; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--fg); }
.logo svg { color: var(--brand); }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.1rem; margin-left: 1rem; }
.nav-links a { color: var(--fg-muted); font-size: .95rem; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-secondary { background: var(--bg-elev); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg-muted); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: .5rem .8rem; font-size: .875rem; }
.btn-lg { padding: .9rem 1.4rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero { padding: 88px 16px 56px; }
.hero h1 { max-width: 820px; }
.hero .row { margin-top: 1.5rem; }

/* Cards */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card-flat { box-shadow: none; }
.stat { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.stat-label { color: var(--fg-muted); font-size: .875rem; }

/* Pricing */
.price { font-size: 2.2rem; font-weight: 700; }
.price small { font-size: 1rem; color: var(--fg-muted); font-weight: 500; }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 1rem 0; }
.checklist li { padding-left: 1.5rem; position: relative; margin: .4rem 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* Forms */
form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--fg); font: inherit;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hint { color: var(--fg-muted); font-size: .85rem; margin-top: .3rem; }
.auth-card { max-width: 420px; margin: 64px auto; }

/* Alerts & badges */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-soft); margin-bottom: 1rem; }
.alert-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg-soft); color: var(--fg-muted); }
.badge-allow { background: var(--ok-soft); color: var(--ok); }
.badge-review { background: var(--warn-soft); color: var(--warn); }
.badge-block { background: var(--bad-soft); color: var(--bad); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: var(--bg-soft); font-weight: 600; color: var(--fg-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }

/* Bar chart (pure CSS) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.bars > div { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }

/* Prose (blog/docs) */
.prose { max-width: 720px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose table { margin: 1rem 0; }
.prose blockquote { margin: 1rem 0; padding: .2rem 1rem; border-left: 3px solid var(--brand); color: var(--fg-muted); }
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; padding: 40px 16px; }
.docs-nav a { display: block; color: var(--fg-muted); padding: .3rem 0; }
.docs-nav a.active, .docs-nav a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } }

/* Tools */
.tool-box { max-width: 680px; }
.result { margin-top: 1rem; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: .4rem 1rem; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 48px 0 24px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted); }
.footer-grid a { display: block; color: var(--fg); padding: .2rem 0; font-size: .93rem; }
.footer-bottom { margin-top: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Utilities */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* site: marketing pages, free tools, blog, docs (Builder C) */
.topbar { background: var(--fg); text-align: center; font-size: .85rem; padding: .45rem 16px; }
.topbar a { color: var(--bg); }
.hero-tight { padding: 56px 16px 24px; }
.center-block { margin-left: auto; margin-right: auto; }
.center-row { justify-content: center; }
.btn-block { width: 100%; margin-top: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.stat-grid { grid-template-columns: 1fr; gap: .75rem; }
.stat-grid .card { padding: 1rem 1.2rem; }
.stat-grid .stat-label { margin: 0; }
a.source { font-size: .8rem; white-space: nowrap; }
a.source::before { content: "↗ "; }
.steps .card { position: relative; }
.step-num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; margin-bottom: .6rem; }
.badge-limit { background: #e8f0fe; color: #1a56c4; }
@media (prefers-color-scheme: dark) { .badge-limit { background: #13233f; color: #7aa7ff; } }
.badge-brand { background: var(--brand-soft); color: var(--brand-strong); margin-bottom: .4rem; }
.decision-ladder { display: grid; gap: .6rem; }
.ladder-row { display: grid; grid-template-columns: 80px 70px 1fr; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .93rem; }
.code-sample { margin: 0; font-size: .82rem; max-height: 460px; }
.cta-band { padding: 72px 0; background: linear-gradient(135deg, var(--brand-soft), var(--bg-soft)); border-top: 1px solid var(--border); }
.plans .plan { display: flex; flex-direction: column; }
.plans .checklist { flex: 1; }
.faq { display: grid; gap: .6rem; }
.faq-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .2rem 1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: .7rem 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--fg-muted); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--fg-muted); }
.pilot-form textarea { resize: vertical; }
.tool-link { color: var(--fg); transition: border-color .15s, transform .15s; }
.tool-link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
.tool-box-wide { max-width: 860px; }
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc-out { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 1.2rem; align-self: start; }
.calc-big { display: grid; margin-bottom: 1rem; }
.calc-big strong { font-size: 2.4rem; letter-spacing: -.02em; color: var(--bad); }
.meter { height: 8px; background: var(--border); border-radius: 99px; margin: 1rem 0 .6rem; overflow: hidden; }
.meter-bar { height: 100%; width: 0; background: var(--bad); transition: width .2s; }
.verdict { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--bg-soft); }
.verdict-score { font-size: 1.3rem; }
.verdict-block { background: var(--bad-soft); }
.verdict-review { background: var(--warn-soft); }
.reasons { list-style: none; padding: 0; margin: 1rem 0; }
.reasons li { padding: .45rem 0; border-bottom: 1px dashed var(--border); }
.inline-check { display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; margin: 0; }
td.wrap { white-space: normal; word-break: break-all; }
.post-card { color: var(--fg); display: block; }
.post-card:hover { border-color: var(--brand); text-decoration: none; }
.article { max-width: 760px; padding-top: 48px; }
.article-head { margin-bottom: 2rem; }
.article-cta { margin: 3rem 0 1rem; }
.prose pre { font-size: .84rem; }
.prose img { border-radius: var(--radius-sm); }
.prose th, .prose td { white-space: normal; }
.docs-nav { position: sticky; top: 80px; align-self: start; }
.docs-nav-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted); font-weight: 600; margin: 1.2rem 0 .3rem; }
.docs-nav-title:first-child { margin-top: 0; }
@media (max-width: 860px) { .docs-nav { position: static; } }
.legal { padding-top: 40px; }

/* app (Builder B): dashboard + auth */
.btn-block { width: 100%; }
.app-main { padding: 24px 16px 64px; }
.app-toolbar { justify-content: space-between; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.project-switch select { width: auto; min-width: 180px; padding: .45rem .6rem; }
.subnav { display: flex; gap: .25rem; flex-wrap: wrap; }
.subnav a { color: var(--fg-muted); padding: .35rem .7rem; border-radius: 8px; font-size: .92rem; }
.subnav a:hover { background: var(--bg-soft); color: var(--fg); text-decoration: none; }
.subnav a.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.page-head { margin-bottom: 1rem; }
.push-right { margin-left: auto; }
.verify-banner { justify-content: space-between; }
.empty { text-align: center; padding: 2.5rem 1.5rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.reasons code { margin-right: .3rem; font-size: .8rem; }
.reason-list { list-style: none; padding: 0; margin: 0; }
.reason-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.reason-list li:last-child { border-bottom: 0; }
.filters input[type=text], .filters select { width: auto; min-width: 150px; padding: .45rem .6rem; }
.badge-limit { background: var(--brand-soft); color: var(--brand-strong); }
.badge + .badge { margin-left: .3rem; }
.chart { width: 100%; height: 140px; display: block; }
.chart .bar-total { fill: var(--border); }
.chart .bar-flagged { fill: var(--brand); }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 .25rem 0 .5rem; vertical-align: middle; }
.legend-total { background: var(--border); }
.legend-flagged { background: var(--brand); }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; }
.mono { font-family: var(--mono); font-size: .88rem; }
.tabs { margin-top: .5rem; }
.tab-list { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: .75rem; flex-wrap: wrap; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: .5rem .8rem; font: 600 .9rem var(--font); color: var(--fg-muted); cursor: pointer; }
.tab.active { color: var(--fg); border-bottom-color: var(--brand); }
.tab-panel pre { margin: 0 0 .5rem; max-height: 420px; }
.radio { display: block; font-weight: 400; margin: .4rem 0; }
.radio input { margin-right: .35rem; }
textarea { font-family: var(--mono); font-size: .85rem; }
meter { width: 100%; height: 14px; margin-top: .4rem; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
dl.kv { margin: 0; }
dl.kv dt { color: var(--fg-muted); font-size: .88rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .app-toolbar { flex-direction: column; align-items: stretch; } .push-right { margin-left: 0; } }
