/* headwell: shared stylesheet for every page.
   Mobile first. Palette is the existing placeholder palette; swap tokens here
   when the final brand colours are supplied. */

:root {
  --ink: #10242b;
  --ink-soft: #3f5860;
  --teal: #0f6b74;
  --teal-dark: #0a4f56;
  --teal-tint: #e7f2f2;
  --teal-line: #cfe6e6;
  --mist: #f4f8f8;
  --line: #dce7e7;
  --white: #ffffff;
  --amber-bg: #fbf6ec;
  --amber-line: #e8d9b8;
  --amber-ink: #7a5a12;
  --amber-tag: #f2e4c4;
  --rose-bg: #fdf1f0;
  --rose-line: #f0cfcb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,36,43,.06), 0 8px 24px rgba(16,36,43,.06);
  --maxw: 1080px;
  --readw: 720px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.app { background: var(--mist); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.read { max-width: var(--readw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap, .read { padding: 0 24px; } }
a { color: var(--teal-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--white); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid #7cc4c9; outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1rem;
}
.brand .word { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; line-height: 1.1; }
.brand small { display: block; font-weight: 500; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.nl { color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav a.nl:hover { color: var(--teal-dark); }
@media (max-width: 820px) { .nav a.nl { display: none; } }
.nav-cta {
  display: inline-block; background: var(--teal); color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-dark); }
.brand-link { font-size: .9rem; text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.brand-link:hover { color: var(--teal-dark); }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block; text-decoration: none; text-align: center; border: 0; cursor: pointer;
  padding: 15px 26px; border-radius: 12px; font-weight: 700; font-size: 1.02rem; font-family: inherit;
  transition: transform .12s ease, background .15s ease; line-height: 1.3;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-primary[disabled] { background: #8fb3b6; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--white); color: var(--teal-dark); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--mist); }
.btn-row { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
@media (max-width: 480px) { .btn-row .btn-primary, .btn-row .btn-secondary { width: 100%; } }
.muted-link { color: var(--ink-soft); font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: .92rem; }

/* Landing: hero */
.hero { background: linear-gradient(180deg, var(--teal-tint) 0%, var(--white) 100%); padding: 44px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.eyebrow { display: inline-block; background: var(--white); border: 1px solid var(--line); color: var(--teal-dark); font-weight: 600; font-size: .8rem; padding: 5px 13px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 2rem; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 40ch; margin: 0 0 24px; }
.cta-row { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
.cta-note { font-size: .9rem; color: var(--ink-soft); }
.cta-note strong { color: var(--ink); font-weight: 600; }
@media (min-width: 860px) {
  .hero { padding: 72px 0 64px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .hero h1 { font-size: 2.6rem; }
}
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel h2, .panel h3 { font-size: 1.05rem; margin-bottom: 12px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; padding: 8px 0; color: var(--ink-soft); font-size: .98rem; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: 0 0 20px; height: 20px; margin-top: 3px; border-radius: 999px;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.numlist { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numlist li { counter-increment: n; display: flex; gap: 12px; padding: 8px 0; color: var(--ink-soft); align-items: flex-start; }
.numlist li::before { content: counter(n); flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--teal-tint); color: var(--teal-dark); font-weight: 700; font-size: .85rem; display: grid; place-items: center; margin-top: 1px; }
.numlist strong { color: var(--ink); }

/* Landing: sections */
section.band { padding: 52px 0; }
@media (min-width: 760px) { section.band { padding: 68px 0; } }
section.tinted { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin: 0 auto 32px; text-align: center; }
.section-head h2 { font-size: 1.6rem; }
@media (min-width: 760px) { .section-head h2 { font-size: 1.9rem; } }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.tinted .tile { background: var(--white); }
.tile h3 { font-size: 1.05rem; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: s; }
.step::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

.note-card { max-width: 780px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.note-card h2 { font-size: 1.35rem; }
.note-card p { color: var(--ink-soft); margin: 0 0 12px; }
.note-card p:last-child { margin-bottom: 0; }

.price-card { max-width: 780px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
@media (min-width: 760px) { .price-card { grid-template-columns: 220px 1fr; padding: 32px; } }
.price { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.price-sub { color: var(--ink-soft); font-size: .92rem; margin-top: 8px; }
.price-card h3 { font-size: 1.05rem; }

.final { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: #fff; text-align: center; }
.final h2 { color: #fff; font-size: 1.7rem; }
.final p { color: rgba(255,255,255,.9); font-size: 1.05rem; max-width: 50ch; margin: 0 auto 24px; }
.final .btn-primary { background: #fff; color: var(--teal-dark); }
.final .btn-primary:hover { background: #eef7f7; }
.final .cta-note { color: rgba(255,255,255,.85); margin-top: 16px; display: block; }
.final .cta-note a { color: #fff; }

/* Support band (landing) */
.support { background: var(--amber-bg); border-top: 1px solid var(--amber-line); }
.support-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .support-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .support-grid { grid-template-columns: repeat(3, 1fr); } }
.support-card { background: var(--white); border: 1px solid var(--amber-line); border-radius: 12px; padding: 18px; }
.support-card h3 { font-size: 1rem; margin-bottom: 4px; }
.support-card p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.support-card a { font-weight: 600; }

/* App pages (check, contact, legal) */
main.app-main { padding: 32px 0 56px; }
.page-head { margin-bottom: 22px; }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head h1 { font-size: 1.8rem; }
@media (min-width: 640px) { .page-head h1 { font-size: 2rem; } }
.page-head p.sub { font-size: 1.06rem; color: var(--ink-soft); margin: 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
@media (min-width: 640px) { .card { padding: 28px; } }
.card h2 { font-size: 1.22rem; }
.card h3 { font-size: 1.04rem; margin-top: 1.2em; }
.card p, .card li { color: var(--ink-soft); }
.card p.tight { margin: 0; }
.card ul { padding-left: 1.2em; }
.small { font-size: .86rem; }

/* Progress */
.progress { background: var(--white); border-bottom: 1px solid var(--line); }
.progress ol { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 auto; padding: 12px 16px; max-width: var(--readw); font-size: .8rem; }
.progress li { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.progress .dot { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--line); color: var(--ink-soft); }
.progress li.done .dot { background: var(--teal-tint); color: var(--teal-dark); }
.progress li.active { color: var(--ink); font-weight: 600; }
.progress li.active .dot { background: var(--teal); color: #fff; }

/* Placeholder notes: deliberately loud so none go live by accident */
.placeholder {
  background: var(--amber-bg); border: 1px dashed #d8b86e; border-radius: 12px;
  padding: 12px 14px; margin: 16px 0; color: var(--amber-ink); font-size: .9rem;
  display: flex; gap: 10px; align-items: flex-start;
}
.placeholder::before { content: "Placeholder"; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; background: var(--amber-tag); padding: 2px 7px; border-radius: 6px; white-space: nowrap; margin-top: 2px; }
.placeholder.decision::before { content: "Decision"; }
.ph { background: var(--amber-tag); color: var(--amber-ink); border-radius: 4px; padding: 0 4px; font-weight: 600; font-size: .92em; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c9d8d8; border-radius: 10px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--teal-tint); border-color: var(--teal); }
.field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.error-text { color: #a1271b; font-size: .88rem; font-weight: 600; margin: 8px 0 0; }
[aria-invalid="true"] { border-color: #c0392b !important; }

.consent { background: var(--teal-tint); border: 1px solid var(--teal-line); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.consent.optional { background: var(--mist); border-color: var(--line); }
.consent label { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink); cursor: pointer; font-weight: 400; }
.consent input { margin-top: 3px; flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--teal); }
.consent ul { margin: 8px 0 0; padding-left: 1.2em; font-size: .88rem; color: var(--ink-soft); }

/* Question blocks */
fieldset.q { border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; margin: 0 0 12px; background: var(--white); min-width: 0; }
fieldset.q legend { font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 10px; float: left; width: 100%; }
fieldset.q legend + * { clear: both; }
fieldset.q.missing { border-color: #c0392b; background: #fffafa; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opts span { display: inline-block; border: 1px solid #c9d8d8; border-radius: 999px; padding: 8px 14px; font-size: .9rem; color: var(--ink); background: var(--white); user-select: none; }
.opts label:hover span { border-color: var(--teal); }
.opts input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.opts input:focus-visible + span { outline: 3px solid #7cc4c9; outline-offset: 2px; }
@media (max-width: 480px) {
  .opts.scale { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .opts.scale span { display: block; text-align: left; border-radius: 10px; }
}
.instrument { border: 1px solid var(--teal-line); border-radius: var(--radius); background: var(--white); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); }
.instrument-head { background: var(--teal-tint); padding: 16px 18px; border-bottom: 1px solid var(--teal-line); }
.instrument-head h2 { font-size: 1.1rem; margin: 0 0 4px; }
.instrument-head p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.instrument-body { padding: 16px 14px 6px; }
@media (min-width: 640px) { .instrument-body { padding: 20px 18px 8px; } }
.instrument-foot { padding: 12px 18px 16px; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--mist); }
.instrument-foot p { margin: 0 0 4px; }

/* Result */
.result-band { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; background: var(--teal-tint); border: 1px solid var(--teal-line); }
.result-band .score { width: 72px; height: 72px; border-radius: 999px; background: var(--white); border: 3px solid var(--teal); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: var(--teal-dark); flex: 0 0 auto; text-align: center; line-height: 1; }
.result-band .score small { display: block; font-size: .62rem; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.result-band h2 { margin: 0 0 4px; font-size: 1.1rem; }
.result-band p { margin: 0; }
.label-chip { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal-dark); background: var(--white); border: 1px solid var(--teal-line); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }

.kv { display: grid; grid-template-columns: 1fr; gap: 2px 18px; margin: 0; }
.kv dt { color: var(--ink-soft); font-size: .9rem; }
.kv dd { margin: 0 0 10px; font-weight: 600; }
@media (min-width: 520px) { .kv { grid-template-columns: 170px 1fr; gap: 10px 18px; } .kv dd { margin: 0; } }

.callout { border-radius: 12px; padding: 14px 16px; margin: 16px 0; background: var(--mist); border: 1px solid var(--line); font-size: .95rem; }
.callout p { margin: 0 0 6px; } .callout p:last-child { margin: 0; }
.callout.warm { background: var(--amber-bg); border-color: var(--amber-line); }
.callout.crisis { background: var(--rose-bg); border-color: var(--rose-line); }
.callout.crisis strong { color: var(--ink); }
.callout ul { margin: 6px 0 0; padding-left: 1.2em; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 2px 16px; margin-bottom: 10px; background: var(--white); }
.faq summary { cursor: pointer; font-weight: 600; padding: 13px 0; }
.faq details > *:not(summary) { color: var(--ink-soft); margin: 0 0 14px; }

/* Legal pages */
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal h2:first-child { margin-top: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 10px 0; }
.legal th, .legal td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.legal th { color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* Footer: crisis lines on every page, never gated */
footer.site { background: var(--ink); color: #c7d6d8; padding: 32px 0 28px; font-size: .9rem; }
footer.site a { color: #eaf3f3; }
.foot-urgent { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; }
.foot-urgent p { margin: 0 0 6px; } .foot-urgent p:last-child { margin: 0; }
.foot-urgent strong { color: #fff; }
.foot-cols { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 20px; }
@media (min-width: 700px) { .foot-cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-cols h3 { color: #fff; font-size: .9rem; margin-bottom: 6px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { padding: 2px 0; }
.foot-brand { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; color: #9fb4b6; font-size: .84rem; line-height: 1.7; }
.foot-legal p { margin: 0 0 6px; }
footer.site .ph { background: #4a3d1c; color: #f2e4c4; }
