/* The Shadow Healing Audit, in the look Ahad approved on 7 Nov 2026 (launch/preview/quiz-src.html):
   one phone-width column on a deep plum night, type-led, the handwritten scribble the only flourish.
   Fonts are served from this site (the CSP allows nothing else); all four are SIL Open Font License. */

@font-face { font-family: 'Work Sans'; src: url('../fonts/work-sans-latin.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('../fonts/familjen-grotesk-latin.woff2') format('woff2'); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('../fonts/syne-latin.woff2') format('woff2'); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Reenie Beanie'; src: url('../fonts/reenie-beanie-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #1d0c2b;
  --glow1: #6b3fa0;
  --glow2: #8a3b5c;
  --ink: #fbf4ff;
  --ink-soft: #d8c7ea;
  --line: rgba(251, 244, 255, 0.16);
  --line-strong: rgba(251, 244, 255, 0.42);
  --clay: #ff8a5c;
  --clay-deep: #c0462b;
  --gold: #e3b04f;
  --card: rgba(251, 244, 255, 0.06);
  --card-on: rgba(251, 244, 255, 0.12);
  --btn: #fbf4ff;
  --btn-ink: #1f0f2b;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: 'Syne', 'Arial Narrow', sans-serif;
  --head: 'Familjen Grotesk', 'Helvetica Neue', sans-serif;
  --hand: 'Reenie Beanie', 'Bradley Hand', cursive;
  --body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(70% 45% at 80% 6%, var(--glow1), transparent 70%),
    radial-gradient(60% 40% at 0% 95%, var(--glow2), transparent 70%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--clay); color: var(--btn-ink); }
img, svg { display: block; max-width: 100%; }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(251, 244, 255, 0.5);
}
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---- frame ---- */

.preview-banner {
  background: #000;
  color: #fff;
  text-align: center;
  font: 600 13px/1.35 var(--body);
  padding: 8px 16px;
}
.preview-banner.live { background: #8E1B12; }

.site-header { padding-top: 18px; }
.brand { color: var(--ink); text-decoration: none; font: 700 15px/1 var(--display); letter-spacing: -0.01em; }

main { flex: 1; display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 32px; }
main:focus { outline: none; }
.screen { display: flex; flex-direction: column; flex: 1; }

.site-footer { padding: 18px 0 28px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; }
.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--ink-soft); }

/* ---- type ---- */

.display {
  margin: 0;
  font: 600 clamp(42px, 12.2vw, 58px)/1 var(--head);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.display:focus, .question:focus { outline: none; }
.display-sm { font-size: clamp(30px, 8.5vw, 38px); line-height: 1.08; letter-spacing: -0.02em; }

.lead { margin: 16px 0 0; font-size: 18px; text-wrap: pretty; }
.meta { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); text-align: center; }
.note { margin: 16px 0 0; font-size: 12px; color: var(--ink-soft); }
.fineprint { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.fineprint .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.fineprint a { color: var(--ink-soft); }

.ph {
  display: inline-block;
  padding: 0 6px;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font: 600 11px/1.6 var(--body);
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ---- buttons ---- */

button { font: inherit; }

.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  padding: 10px 10px 10px 24px;
  border: 0;
  border-radius: 999px;
  font: 600 17px/1.25 var(--body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6); }
.btn-primary:hover { transform: translateY(-2px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.35; cursor: default; transform: none; }
.btn .icon {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 50%;
  background: var(--clay-deep);
  color: #fff;
  stroke-width: 2.2;
}
.btn-quiet {
  justify-content: center;
  margin-top: 0;
  padding: 10px 16px;
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.spinner {
  width: 18px;
  height: 18px;
  margin-right: -4px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- start ---- */

.headline { position: relative; margin-top: auto; padding-top: 9vh; }
.hand {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  font: 400 clamp(46px, 13.4vw, 58px)/0.8 var(--hand);
  letter-spacing: 0;
  color: var(--clay);
  transform: rotate(-4deg);
  transform-origin: left;
}
.hand svg { position: absolute; left: -4%; bottom: -14px; width: 108%; height: 26px; }
.star { position: absolute; right: 6px; top: calc(9vh - 30px); width: 34px; color: var(--gold); transform: rotate(12deg); }
.screen-start .lead { margin-top: 34px; max-width: 31ch; }
.guide { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.guide img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.guide b { display: block; font: 700 15px/1.2 var(--display); }
.guide small { font-size: 13.5px; color: var(--ink-soft); }

/* ---- question screens ---- */

.bar { height: 4px; margin-top: 22px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--clay); transition: width 0.5s var(--ease); }
.qcount { margin: 22px 0 0; font: 400 30px/1 var(--hand); color: var(--clay); }
.question {
  margin: 6px 0 0;
  font: 600 clamp(28px, 8vw, 34px)/1.1 var(--head);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.answers { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.answer {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  font: 500 16.5px/1.35 var(--body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.answer:hover { border-color: var(--ink-soft); }
.answer[aria-pressed='true'] { border-color: var(--clay); background: var(--card-on); box-shadow: 0 10px 24px -16px rgba(255, 138, 92, 0.8); }
.answer-neutral { background: transparent; border-style: dashed; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 18px; }
.nav .btn { margin-top: 0; flex: 1; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 10px 6px 10px 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: 500 15px/1 var(--body);
  cursor: pointer;
}
.btn-back .icon { width: 18px; height: 18px; }

.screen-enter { animation: enter 0.4s var(--ease) both; }
@keyframes enter { from { opacity: 0.2; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- forms ---- */

.form { display: grid; gap: 18px; margin-top: 20px; }
.field label { display: block; margin-bottom: 6px; font: 600 14px/1.2 var(--body); }
.field input[type='text'], .field input[type='email'], .field input:not([type]), .field textarea {
  width: 100%;
  min-height: 54px;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: 400 17px/1.2 var(--body);
  caret-color: var(--clay);
}
.field textarea { min-height: 132px; line-height: 1.45; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--clay); outline-offset: 2px; }
.field [aria-invalid='true'] { border-color: var(--clay); }
.help { margin: -2px 0 8px; color: var(--ink-soft); font-size: 14px; }
.field-error { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; color: var(--clay); font-size: 14px; line-height: 1.4; }
.field-error .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.suggestion { margin: 8px 0 0; }
.suggestion-btn {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 15px/1.4 var(--body);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent { display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--clay); cursor: pointer; }
.consent label { margin: 0; font-weight: 400; font-size: 15px; line-height: 1.5; cursor: pointer; }
.consent .field-error { grid-column: 1 / -1; }
.consent-line { margin: 0; color: var(--ink-soft); font-size: 13.5px; }
.form .btn { margin-top: 4px; }
.trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- duplicate, error and sent states ---- */

.state-screen { margin-top: 30px; }
.badge { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; background: var(--card-on); color: var(--clay); }
.badge .icon { width: 26px; height: 26px; }
.badge-error { color: var(--clay); }
.actions { display: grid; gap: 6px; }
.state-panel { margin-top: 26px; padding: 26px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--card-on); }
.state-panel h2 { margin: 0 0 8px; font: 600 26px/1.15 var(--head); letter-spacing: -0.015em; text-wrap: balance; }
.state-panel h2:focus { outline: none; }
.state-panel p { margin: 0 0 18px; color: var(--ink-soft); }
.state-panel p:last-child { margin-bottom: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 15px; line-height: 1.5; }
.notice .icon { flex: none; color: var(--clay); }

/* ---- result ---- */

.kicker { margin: 30px 0 0; font: 400 32px/1 var(--hand); color: var(--clay); }
.result .display { margin-top: 4px; font-size: min(50px, 11vw); }
.belief { display: inline-block; margin: 16px 0 0; font: 400 clamp(34px, 10vw, 42px)/1 var(--hand); color: var(--ink); transform: rotate(-2deg); transform-origin: left; }

.mix { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.mix-row { display: grid; grid-template-columns: 112px 1fr 38px; align-items: center; gap: 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mix-row span:last-child { text-align: right; }
.mix-track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.mix-track i { display: block; height: 100%; background: var(--ink-soft); }
.mix-top .mix-track i { background: var(--clay); }

.prose { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; font-size: 17px; line-height: 1.6; }
.prose p { margin: 0; text-wrap: pretty; }
.prose .open { font: 600 clamp(24px, 6.6vw, 28px)/1.2 var(--head); letter-spacing: -0.015em; text-wrap: balance; }
.prose h2 { margin: 18px 0 0; font: 400 30px/1 var(--hand); color: var(--clay); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 20px; }
.prose li::marker { color: var(--clay); }
.prose .soft { font-size: 14.5px; color: var(--ink-soft); }
.prose .quote { padding: 14px 16px; border-left: 3px solid var(--clay); font: 400 30px/1.05 var(--hand); }
.prose-after { margin-top: 26px; }

.next-step { margin-top: 26px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--card-on); }
.next-step h2 { margin: 0; font: 600 21px/1.25 var(--head); letter-spacing: -0.01em; text-wrap: balance; }
.next-step p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15.5px; }
.next-step .btn { margin-top: 18px; }

.aside { margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; text-align: center; }
.aside a { color: var(--ink-soft); }

/* The page that lists every result, for an email that cannot link one. */
.result-list { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.result-list li { padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); }
.result-list a { font: 600 22px/1.2 var(--head); letter-spacing: -0.01em; }
.result-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ---- reading, privacy, 404 ---- */

.page-reading .display, .page-privacy .display, .page-404 .display, .page-go .display, .page-results .display { margin-top: 30px; font-size: clamp(34px, 10vw, 44px); line-height: 1.05; }
.prose-page .meta { text-align: left; }

/* ---- counted link preview ---- */

.url code { display: block; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: 500 15px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.facts { display: grid; gap: 10px; margin: 24px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* A placeholder tag on the light button keeps its contrast. */
.btn-primary .ph { color: #6b4300; border-color: #6b4300; }

/* The start screen carries its own short note, so the footer's longer one waits for the next screen. */
.page-start:has(#start:not([hidden])) .disclaimer { display: none; }
