/* ═══════════════════════════════════════════════
   FIREBRINGER QUANTUM · DESIGN SYSTEM
   Ember is the source. Mint is what survives the test.
   ═══════════════════════════════════════════════ */

:root {
  /* Background */
  --ink0: #060b09;
  --ink1: #0b1210;
  --ink2: #111916;

  /* Text */
  --text: #dfe9e3;
  --muted: #8fa79b;
  --subtle: #5a7068;

  /* Grid */
  --line: rgba(223,233,227,.09);
  --grid: rgba(126,231,179,.04);

  /* Firebringer brand — ember */
  --ember: #E06820;
  --ember-dim: rgba(224,104,32,.13);
  --ember-glow: rgba(224,104,32,.06);

  /* Evidence / verified — mint */
  --mint: #5fe3a1;
  --mint-ink: #06120c;
  --mint-dim: rgba(95,227,161,.12);

  /* Retracted / failed */
  --red: #ff7a70;
  --red-dim: rgba(255,122,112,.12);

  /* Re-scoped / caution */
  --amber: #eec36a;
  --amber-dim: rgba(238,195,106,.12);

  /* Type */
  --mono: ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --sans: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  /* Layout */
  --max: 1080px;
  --px: 24px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  background-color: var(--ink0);
  background-image:
    radial-gradient(1200px 500px at 70% -10%, rgba(95,227,161,.055), transparent 60%),
    radial-gradient(800px 400px at 15% 85%, rgba(224,104,32,.04), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 var(--px); }
section { padding: 68px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,11,9,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0; position: relative;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.nav-wordmark {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .18em;
  font-weight: 700; color: var(--text); text-transform: uppercase;
}
.nav-wordmark .ember { color: var(--ember); }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
}
.nav-links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding: 7px 10px;
  border-radius: 6px; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--mint); text-decoration: none; background: var(--mint-dim); }
.nav-cta {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  font-weight: 700; text-transform: uppercase; white-space: nowrap;
  padding: 9px 16px; border-radius: 8px;
  background: var(--ember); color: #fff;
  border: 0; cursor: pointer; text-decoration: none;
  transition: opacity .12s ease;
}
.nav-cta:hover { opacity: .88; text-decoration: none; color: #fff; }

/* Mobile burger */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-mobile {
  display: none; flex-direction: column; gap: 0;
  border-top: 1px solid var(--line);
  background: rgba(6,11,9,.96);
  padding: 8px 0 16px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a, .nav-mobile button {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 14px var(--px); background: none; border: none; cursor: pointer;
  text-align: left; text-decoration: none; width: 100%;
}
.nav-mobile a:hover, .nav-mobile button:hover { color: var(--mint); }
.nav-mobile .mob-cta { color: var(--ember); font-weight: 700; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* ── Type ── */
.kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--mint); margin-bottom: 16px;
  display: block;
}
.kicker.ember { color: var(--ember); }
h1 {
  font-size: clamp(2.2rem, 6.2vw, 3.9rem);
  line-height: 1.05; letter-spacing: -.022em; font-weight: 700;
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.15; letter-spacing: -.014em; font-weight: 700; margin-bottom: 14px;
}
h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
h4 { font-size: .97rem; font-weight: 700; margin-bottom: 4px; }
.lede {
  color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin-top: 18px; line-height: 1.7;
}
.hl { color: var(--mint); }
.ember-text { color: var(--ember); }
.strike {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2.5px;
}
p.dim { color: var(--muted); }

/* ── Buttons ── */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; font-weight: 700;
  padding: 13px 22px; border-radius: 10px;
  border: 0; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); opacity: .9; text-decoration: none; }
.btn.primary { background: var(--mint); color: var(--mint-ink); }
.btn.ember-btn { background: var(--ember); color: #fff; }
.btn.ghost { border: 1px solid rgba(95,227,161,.4); color: var(--mint); background: transparent; }
.btn.ghost-ember { border: 1px solid rgba(224,104,32,.5); color: var(--ember); background: transparent; }

/* ── Metrics bar ── */
.metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 24px; }
.metric {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.023), rgba(255,255,255,0));
}
.metric b {
  display: block; font-family: var(--mono); font-size: 1.7rem;
  color: var(--mint); font-weight: 700; letter-spacing: -.01em;
}
.metric small {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); display: block; margin-top: 5px; line-height: 1.5;
}

/* ── Cards ── */
.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.023), rgba(255,255,255,0));
}
.card p { color: var(--muted); font-size: .97rem; }
.card h3 { margin-bottom: 8px; }
.card.mint-left { border-left: 2px solid rgba(95,227,161,.4); }
.card.ember-left { border-left: 2px solid rgba(224,104,32,.4); }

/* ── Status pills ── */
.pill {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 5px; font-weight: 700; margin-bottom: 10px;
}
.pill.ok { color: var(--mint); background: var(--mint-dim); border: 1px solid rgba(95,227,161,.3); }
.pill.bad { color: var(--red); background: var(--red-dim); border: 1px solid rgba(255,122,112,.3); }
.pill.warn { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(238,195,106,.3); }
.pill.review { color: var(--amber); background: var(--amber-dim); border: 1px dashed rgba(238,195,106,.4); }
.pill.pub { color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.pill.free { color: var(--ember); background: var(--ember-dim); border: 1px solid rgba(224,104,32,.3); }

/* ── Ledger entries ── */
.entry {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px; margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.023), rgba(255,255,255,0));
}
.entry.bad { border-color: rgba(255,122,112,.22); }
.entry.warn { border-color: rgba(238,195,106,.22); }
.entry.ok { border-color: rgba(95,227,161,.22); }
.entry-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.entry-date { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.entry h2 { font-size: 1.3rem; letter-spacing: -.01em; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.entry > p { color: var(--muted); max-width: 78ch; margin-bottom: 8px; }
.entry > p strong { color: var(--text); }
.prov-line {
  font-family: var(--mono); font-size: 11px; color: var(--subtle); letter-spacing: .05em;
  border-top: 1px dashed rgba(223,233,227,.12); margin-top: 14px; padding-top: 12px; line-height: 2;
}
.prov-line a { color: var(--mint); }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Method sequence ── */
.method-seq { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 28px; counter-reset: ms; }
.ms-step {
  counter-increment: ms; border: 1px solid var(--line); padding: 22px;
  border-right: 0; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0));
}
.ms-step:last-child { border-right: 1px solid var(--line); }
.ms-step::before {
  content: counter(ms,decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--mint);
  font-weight: 700; letter-spacing: .12em; display: block; margin-bottom: 10px;
}
.ms-step h3 { font-size: .97rem; color: var(--mint); margin-bottom: 6px; }
.ms-step p { color: var(--muted); font-size: .92rem; }

/* ── Forms ── */
.form-card {
  border: 1px solid rgba(95,227,161,.3); border-radius: 16px; padding: 28px;
  background: linear-gradient(180deg, rgba(95,227,161,.055), rgba(255,255,255,0));
}
label {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px;
}
label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--line);
  border-radius: 9px; padding: 12px 14px;
  color: var(--text); font-family: var(--sans); font-size: .97rem;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--mint); border-color: transparent; outline-offset: 0;
}
select {
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),
    linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 40px;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-msg {
  display: none; font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  border-radius: 9px; padding: 13px 15px; margin-top: 14px;
}
.form-msg.ok { display: block; color: var(--mint); border: 1px solid rgba(95,227,161,.4); background: var(--mint-dim); }
.form-msg.err { display: block; color: var(--amber); border: 1px solid rgba(238,195,106,.4); background: var(--amber-dim); }

/* ── Accordion / FAQ ── */
details {
  border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px;
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0));
  overflow: hidden;
}
summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--mint); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
details[open] summary::after { content: "–"; }
details p { padding: 0 20px 18px; color: var(--muted); max-width: 74ch; }

/* ── Disclosure / callout ── */
.disclosure {
  border: 1px solid rgba(95,227,161,.28); border-radius: 14px;
  padding: 26px; background: var(--mint-dim);
}
.disclosure.ember-bg {
  border-color: rgba(224,104,32,.28); background: var(--ember-dim);
}
.disclosure p { max-width: 76ch; }
.disclosure p + p { margin-top: 10px; color: var(--muted); }

/* ── Table-style rows ── */
.row-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 22px; }
.row-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row-item:last-child { border-bottom: 0; }
.row-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mint); padding-top: 2px;
}
.row-value { color: var(--muted); font-size: .97rem; }
.row-value strong { color: var(--text); }

/* ── Hero ── */
.hero { padding: 88px 0 64px; }
.ledger-line {
  margin-top: 28px; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: .04em; border: 1px dashed rgba(223,233,227,.2); border-radius: 10px;
  padding: 12px 16px; display: inline-block; line-height: 2;
}
.ledger-line .bad-text { color: var(--red); font-weight: 700; }
.ledger-line .ok-text { color: var(--mint); }

/* ── Scorecard preview ── */
.scorecard-preview {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 22px;
}
.sc-header {
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line);
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
}
.sc-id { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sc-row { display: grid; grid-template-columns: 160px 100px 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.sc-row:last-child { border-bottom: 0; }
.sc-cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.sc-grade { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.sc-grade.ok { color: var(--mint); }
.sc-grade.bad { color: var(--red); }
.sc-grade.warn { color: var(--amber); }
.sc-grade.partial { color: var(--amber); }
.sc-finding { color: var(--muted); font-size: .93rem; line-height: 1.55; }

/* ── Founder block ── */
.founder-block {
  border: 1px solid rgba(224,104,32,.25); border-radius: 14px; padding: 32px;
  background: linear-gradient(135deg, var(--ember-dim), rgba(255,255,255,0));
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
}
.founder-block p { color: var(--muted); margin-bottom: 12px; max-width: 54ch; }
.founder-block p strong { color: var(--text); }
.founder-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--subtle); line-height: 2; }
.founder-meta b { color: var(--ember); }
.proof-img { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.proof-img img { width: 100%; }
.proof-caption { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); padding: 8px 10px; background: rgba(0,0,0,.3); }

/* ── Decisions section ── */
.decision-list { list-style: none; margin-top: 22px; }
.decision-list li {
  padding: 14px 0 14px 28px; position: relative; border-bottom: 1px dashed rgba(223,233,227,.1);
  color: var(--muted); font-size: 1rem;
}
.decision-list li:last-child { border-bottom: 0; }
.decision-list li::before { content: "→"; position: absolute; left: 0; color: var(--mint); font-family: var(--mono); }
.decision-list li strong { color: var(--text); }

/* ── Ordered steps ── */
.steps { list-style: none; counter-reset: st; margin-top: 18px; }
.steps li {
  counter-increment: st; position: relative; padding: 10px 0 10px 46px;
  border-bottom: 1px dashed rgba(223,233,227,.1); color: var(--muted);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(st,decimal-leading-zero); position: absolute; left: 0; top: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--mint); font-weight: 700; letter-spacing: .08em;
}
.steps li strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line); padding: 48px 0 64px; margin-top: 72px;
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; align-items: start;
}
.footer-brand { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; font-weight: 700; text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.footer-brand .ember { color: var(--ember); }
.footer-credo {
  font-family: var(--mono); font-size: 11px; color: var(--subtle); letter-spacing: .04em; line-height: 2;
  font-style: italic; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-family: var(--mono); font-size: 11px; color: var(--subtle); letter-spacing: .08em; text-transform: uppercase; }
.footer-links a:hover { color: var(--mint); text-decoration: none; }
.footer-legal { font-family: var(--mono); font-size: 10.5px; color: var(--subtle); letter-spacing: .04em; line-height: 1.9; }
.footer-legal a { color: var(--subtle); }
.footer-legal a:hover { color: var(--mint); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .founder-block { grid-template-columns: 1fr; gap: 22px; }
  .method-seq { grid-template-columns: 1fr 1fr; }
  .ms-step { border-right: 1px solid var(--line); border-bottom: 0; }
  .ms-step:nth-child(2n) { border-right: 0; }
  .row-item { grid-template-columns: 1fr; gap: 6px; }
  .sc-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  section { padding: 52px 0; }
  .hero { padding: 60px 0 48px; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .method-seq { grid-template-columns: 1fr; }
  .ms-step { border-right: 1px solid var(--line); border-bottom: 0; }
  .ms-step:last-child { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
}

/* ── Reality Check intake ── */
.rc-progress {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 6px;
  margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.rc-progress-step {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--subtle); line-height: 1.4;
}
.rc-progress-step.is-current { color: var(--mint); font-weight: 700; }
.rc-progress-step.is-complete { color: var(--muted); }
.rc-step { border: 0; padding: 0; min-width: 0; }
.rc-step legend { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.rc-step[hidden] { display: none; }
.rc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.rc-actions .btn[hidden] { display: none; }
.field-help { color: var(--subtle); font-size: .83rem; line-height: 1.55; margin-top: 6px; }

/* ── Utility ── */
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Blog post body ── */
.post-body h2 { font-size: 1.4rem; margin: 34px 0 12px; letter-spacing: -.01em; }
.post-body p { margin-bottom: 16px; line-height: 1.75; }
.post-body ul { margin: 0 0 18px 22px; }
.post-body li { margin-bottom: 8px; color: var(--muted); line-height: 1.7; }
.post-body li strong { color: var(--text); }
.post-body pre { margin: 18px 0; }
.post-body blockquote { border-left: 2px solid var(--mint); padding: 4px 0 4px 20px; margin: 24px 0; font-size: 1.2rem; line-height: 1.5; }
.post-body a { color: var(--mint); }
