:root {
  --bg: #000;
  --fg: #fff;
  --gray: #a3a3a3;
  --dim: #6b6b6b;
  --line: #2a2a2a;
  --panel: #0e0e0e;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font: 18px/1.55 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 20px calc(32px + env(safe-area-inset-bottom)); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 14px; }
.gray { color: var(--gray); }
.small { font-size: 15px; }
.logo { mix-blend-mode: screen; display: block; width: 120px; height: 120px; margin: 0 auto 8px; object-fit: contain; }
.logo.sm { width: 56px; height: 56px; margin: 0; }

/* Display type: outlined, per brand spec */
.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  letter-spacing: .02em; text-transform: uppercase; font-weight: 800;
}

/* Welcome */
.hero {
  background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.88)), url(/assets/faith-cover.jpg) center/cover;
  padding: 28px 20px 36px; text-align: center; border-bottom: 1px solid var(--line);
}
.hero h1 { font-size: clamp(30px, 8vw, 44px); margin-top: 8px; }
.hero .sub { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--gray); margin-bottom: 14px; }
.story { display: flex; gap: 16px; align-items: flex-start; margin: 28px 0; }
.story img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); }
.notice { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 14px 16px; margin: 20px 0; }

button, .btn {
  display: block; width: 100%; padding: 16px 20px; border-radius: 10px; border: 1px solid var(--fg);
  background: var(--fg); color: #000; font: 700 17px/1 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; text-align: center; text-decoration: none; cursor: pointer;
}
button.ghost, .btn.ghost { background: transparent; color: var(--fg); border-color: #555; }
button.link { background: none; border: 0; color: var(--gray); width: auto; padding: 8px 0; font-weight: 400; font-size: 15px; text-decoration: underline; display: inline; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.stack > * + * { margin-top: 12px; }

/* Interview */
.top { position: sticky; top: 0; background: var(--bg); z-index: 2; padding: 12px 20px 10px; border-bottom: 1px solid var(--line); }
.top-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.prog { flex: 1; }
.prog .label { font-size: 14px; color: var(--gray); letter-spacing: .04em; margin-bottom: 6px; }
.bar { display: flex; gap: 4px; }
.bar i { flex: 1; height: 4px; background: var(--line); border-radius: 2px; }
.bar i.on { background: var(--fg); }
.chat { padding-bottom: 16px; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 14px; margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.q { background: var(--panel); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.a { background: var(--fg); color: #000; margin-left: auto; border-top-right-radius: 4px; }
.msg.q.dim { color: var(--gray); }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
textarea {
  width: 100%; min-height: 96px; max-height: 40vh; resize: vertical; padding: 12px 14px; border-radius: 10px;
  background: var(--panel); color: var(--fg); border: 1px solid #444; font: 17px/1.45 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; margin-bottom: 10px;
}
.dots { color: var(--gray); letter-spacing: .3em; }
.err { border: 1px solid #777; background: var(--panel); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }

/* Results */
.sec { margin: 30px 0; }
.sec h2 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gray); font-weight: 600; margin-bottom: 14px; }
.score { padding: 14px 0; border-top: 1px solid var(--line); }
.score:last-child { border-bottom: 1px solid var(--line); }
.score .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.score .name { font-weight: 700; }
.score .num { font-variant-numeric: tabular-nums; font-weight: 800; }
.meter { height: 3px; background: var(--line); margin: 8px 0; border-radius: 2px; }
.meter i { display: block; height: 100%; background: var(--fg); border-radius: 2px; }
.score.gap .name::after { content: " · biggest gap"; color: var(--gray); font-weight: 400; font-size: 14px; }
.gapname { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.move { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.move .n { font-weight: 800; font-size: 22px; width: 24px; flex: none; }
.move .meta { color: var(--gray); font-size: 15px; margin-top: 6px; }
.move b { color: var(--fg); }
.question { font-size: 22px; font-weight: 700; line-height: 1.3; border-left: 3px solid var(--fg); padding-left: 16px; }
.foot { display: flex; align-items: center; gap: 12px; color: var(--gray); font-size: 14px; margin-top: 36px; }
.hidden { display: none !important; }

.story .lead { font-weight: 700; font-size: 17px; }

/* Static version additions */
fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
legend { font-weight: 700; font-size: 19px; line-height: 1.3; padding: 0; margin-bottom: 12px; }
.opt { display: block; position: relative; margin: 0 0 10px; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: block; padding: 14px 16px; border: 1px solid #444; border-radius: 10px; background: var(--panel); }
.opt input:checked + span { background: var(--fg); color: #000; border-color: var(--fg); font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 2px; }
.opt.skip span { color: var(--gray); font-size: 15px; padding: 10px 16px; }
.opt.skip input:checked + span { color: #000; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--gray); margin: 8px 0 22px; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: #fff; }
.row2 { display: flex; gap: 12px; }
.row2 > * { flex: 1; }
.scripture { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 16px; font-style: italic; }
.scripture b { display: block; font-style: normal; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gray); margin-top: 8px; font-weight: 600; }
label.lbl { display: block; font-size: 15px; color: var(--gray); margin: 0 0 6px; }
.why { font-size: 14px; color: var(--dim); margin-top: 6px; }

/* Foundation / lived out / fruit — Faith and Fulfillment are not just two more boxes. */
.tier { margin: 0; }
.tier-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.tier-label { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--fg); }
.tier-cap { font-size: 14px; color: var(--gray); }
.tier .score { border-top: 1px solid var(--line); }
.tier.foundation { border: 2px solid var(--fg); border-radius: 12px; padding: 14px 16px 6px; background: var(--panel); }
.tier.foundation .score { border-top: 0; }
.tier.foundation .num { font-size: 26px; }
.tier.foundation .meter { height: 5px; }
.tier.fruit { border: 1px dashed #777; border-radius: 12px; padding: 14px 16px 6px; }
.tier.fruit .score { border-top: 0; }
.tier.fruit .meter i { background: var(--gray); }
.tier.lived { padding: 4px 4px 0; }
.tier.lived .score:last-child { border-bottom: 1px solid var(--line); }
.tier-link { width: 2px; height: 22px; background: #555; margin: 0 auto; }
.score.gap .name::after { content: " · biggest gap"; }

/* Kingdom principle block */
.kingdom .principle { font-size: 24px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.kingdom .order { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 16px; }
.kingdom .order em { font-style: normal; color: var(--fg); }
.kingdom h3.sub { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); font-weight: 600; margin: 20px 0 8px; }
.kingdom .gloss { font-size: 15px; color: var(--gray); margin: -6px 0 16px; }
.kingdom .gloss b { color: var(--fg); font-weight: 600; }

/* Email gate */
.field { width: 100%; padding: 14px 16px; border-radius: 10px; background: var(--panel); color: var(--fg); border: 1px solid #444; font: 17px/1.3 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
.field:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.hint { min-height: 1.4em; margin: 0; font-size: 15px; color: var(--fg); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
