/* /diagnostic/: the decision diagnostic (intro, eight areas, results), in the Clarity look
   (/css/clarity.css, loaded first): one background, hairlines instead of boxes, navy for what
   matters, line icons. The page's markup is written by the script in src/pages/diagnostic.html. */

.nd { --tx: var(--ink); --tx2: var(--mute-2); --tx3: var(--mute); --f: var(--soft); --e: cubic-bezier(.23, 1, .32, 1); min-height: 70vh; }
.nd *, .nd *::before, .nd *::after { margin: 0; padding: 0; box-sizing: border-box; }
.nd svg { display: inline-block; flex-shrink: 0; }
.nd .cl-ill { display: block; }

/* Tones: critical, needs work, fair, good */
.nd-t-cr { --t: var(--pink); --tb: #fbe7ed; }
.nd-t-wa { --t: #b86e14; --tb: #fbefdc; }
.nd-t-fa { --t: var(--mute-2); --tb: var(--soft); }
.nd-t-go { --t: var(--blue); --tb: var(--blue-t); }

/* Buttons */
.nd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 26px; border-radius: 14px; border: 0; font: 700 1rem/1.2 Figtree, sans-serif; letter-spacing: -.01em; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s, transform .25s; }
.nd-btn svg { width: 16px; height: 16px; }
.nd-btn:disabled { opacity: .3; cursor: not-allowed; transform: none !important; }
.nd-bd { background: var(--ink); color: #fff !important; box-shadow: 0 4px 16px rgba(19, 35, 61, .18); }
.nd-bd:not(:disabled):hover { background: #fff; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--ink); transform: translateY(-2px); }
.nd-bgh { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.nd-bgh:not(:disabled):hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); transform: translateY(-2px); }
.nd-bl { padding: 16px 32px; font-size: 1.0625rem; }
.nd-sending { opacity: .6; pointer-events: none; }

/* Intro */
.nd-hero { padding: 96px 24px 104px; text-align: center; }
.nd-hero-c { max-width: 760px; margin: 0 auto; }
.nd-gauge { width: 168px; margin: 0 auto 28px; }
.nd-hero .cl-h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 720px; margin: 0 auto 22px; text-wrap: balance; }
.nd-hero .cl-lead { margin: 0 auto 44px; }
.nd-vstack { display: grid; grid-template-columns: 1fr 1fr; max-width: 640px; margin: 0 auto 44px; text-align: left; border-top: 1px solid var(--line); }
.nd-vstack li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: .9688rem; font-weight: 600; line-height: 1.45; }
.nd-vstack li:nth-child(odd) { padding-right: 20px; }
.nd-vstack li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.nd-vstack svg { width: 16px; height: 16px; margin-top: 3px; color: var(--blue); }
.nd-start { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.nd-start .nd-btn { width: 100%; max-width: 400px; }
.nd-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; font-size: .875rem; font-weight: 600; color: var(--mute); }
.nd-meta-i { display: inline-flex; align-items: center; gap: 7px; }
.nd-free { margin-top: 10px; font-size: .8125rem; color: var(--mute); }

/* Progress */
.nd-prog { display: none; position: sticky; top: 0; z-index: 100; padding: 14px 24px 12px; background: rgba(249, 252, 254, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nd-prog.on { display: block; }
.nd-prog-in { max-width: 760px; margin: 0 auto; }
.nd-prog-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.nd-plbl { font-size: .78125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.nd-pcnt { font-size: .8125rem; font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; }
.nd-ptrk { height: 2px; background: var(--line); }
.nd-pbar { width: 0; height: 100%; background: var(--ink); transition: width .4s var(--e); }
.nd-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.nd-dt { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: width .25s, background .25s; }
.nd-dt.dn { background: var(--mute); }
.nd-dt.act { width: 22px; background: var(--ink); }

/* Questions */
.nd-diag { display: none; padding: 64px 24px 40px; }
.nd-diag.on { display: block; }
.nd-step { display: none; max-width: 760px; margin: 0 auto; }
.nd-step.act { display: block; animation: ndu .45s var(--e) both; }
@keyframes ndu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.nd-sh { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.nd-si { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink); flex-shrink: 0; }
.nd-si svg { width: 22px; height: 22px; stroke-width: 1.6; }
.nd-sn { font-size: .78125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }
.nd-st { font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.nd-sd { font-size: 1.0625rem; line-height: 1.6; color: var(--mute-2); margin-bottom: 36px; }
.nd-card { padding: 30px 0 32px; border-top: 1px solid var(--line); }
.nd-step > .nd-card:last-of-type, #mythStep .nd-card, #costStep .nd-card { border-bottom: 1px solid var(--line); }
.nd-qt { position: relative; padding-right: 34px; margin-bottom: 18px; font-size: 1.125rem; font-weight: 700; line-height: 1.45; letter-spacing: -.01em; }
.nd-qc { margin-top: 6px; font-size: .9375rem; font-weight: 500; line-height: 1.5; color: var(--mute); }
.nd-chk { position: absolute; right: 0; top: 2px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s var(--e); }
.nd-chk svg { width: 11px; height: 11px; }
.nd-card.ok .nd-chk { opacity: 1; transform: none; }
.nd-opts { display: flex; flex-direction: column; gap: 6px; }
.nd-opt { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .15s, box-shadow .15s; }
.nd-opt:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.nd-opt.sel { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.nd-rad { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-2); flex-shrink: 0; transition: border-color .15s, background .15s; }
.nd-opt.sel .nd-rad { border-color: var(--ink); background: var(--ink); }
.nd-opt.sel .nd-rad::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.nd-ol { flex: 1; font-size: .9688rem; font-weight: 500; line-height: 1.5; color: var(--ink-2); }
.nd-opt.sel .nd-ol { color: var(--ink); font-weight: 600; }
.nd-hint { margin-top: 20px; text-align: center; font-size: .875rem; color: var(--mute); opacity: 0; transition: opacity .3s; }
.nd-hint.show { opacity: 1; }
.nd-nav { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 36px auto 0; padding-bottom: 40px; }

/* Beliefs */
.nd-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nd-pill { padding: 10px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: .9375rem; font-weight: 600; line-height: 1.3; color: var(--ink); cursor: pointer; user-select: none; transition: background .2s, color .2s, box-shadow .2s; }
.nd-pill:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.nd-pill.sel { background: var(--ink); color: #fff; box-shadow: none; }
.nd-pill-cnt { margin-top: 18px; font-size: .875rem; font-weight: 600; color: var(--mute); }

/* Cost inputs */
.nd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.nd-ig { margin-bottom: 26px; }
.nd-il { display: block; margin-bottom: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute-2); }
.nd-if { width: 100%; padding: 8px 0 10px; border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0; background: transparent; font: 600 1.125rem/1.3 Figtree, sans-serif; color: var(--ink); outline: 0; transition: border-color .2s; }
.nd-if:focus { border-color: var(--ink); }
.nd-if::placeholder { color: #a8b4c8; font-weight: 500; }

/* Results */
.nd-res { display: none; padding: 72px 24px 0; }
.nd-res.on { display: block; }
.nd-res-in { max-width: 860px; margin: 0 auto; }
.nd-score-h { text-align: center; padding-bottom: 64px; animation: ndu .5s var(--e) both; }
.nd-rw { position: relative; width: 176px; height: 176px; margin: 0 auto 26px; }
.nd-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.nd-rbg { fill: none; stroke: var(--line); stroke-width: 3; }
.nd-rf { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 502; stroke-dashoffset: 502; transition: stroke-dashoffset 1.4s var(--e); }
.nd-sv { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.nd-snum { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.nd-stot { margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--mute); }
.nd-slbl { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -.034em; margin-bottom: 12px; }
.nd-score-h .nd-slbl { color: var(--t, var(--ink)); }
.nd-score-h .nd-rf { stroke: var(--t, var(--ink)); }
.nd-sdesc { max-width: 560px; margin: 0 auto; font-size: 1.125rem; line-height: 1.65; color: var(--mute); font-weight: 500; }

.nd-bt, .nd-ct { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.15; letter-spacing: -.028em; }
.nd-bt svg, .nd-ct svg { width: 22px; height: 22px; color: var(--mute); stroke-width: 1.8; }
.nd-cst { margin-bottom: 24px; font-size: 1rem; line-height: 1.6; color: var(--mute-2); }
.nd-res-in > div:nth-child(2) { padding-top: 56px; border-top: 1px solid var(--line); margin-bottom: 0 !important; }
.nd-res-in > div:nth-child(2) .nd-bt { margin-bottom: 20px; }
.nd-sec { padding: 56px 0 0; margin-top: 56px; border-top: 1px solid var(--line); animation: ndu .5s var(--e) both; }

/* Area breakdown */
.nd-ac { padding: 18px 0; border-top: 1px solid var(--line); animation: ndu .4s var(--e) both; }
.nd-ac:last-child { border-bottom: 1px solid var(--line); }
.nd-ah { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.nd-an { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: 700; }
.nd-an svg { width: 18px; height: 18px; color: var(--mute); stroke-width: 1.8; }
.nd-ab, .nd-hs-level, .nd-sev { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--tb, var(--soft)); color: var(--t, var(--mute-2)); }
.nd-ab-cr { --t: var(--pink); --tb: #fbe7ed; }
.nd-ab-wa { --t: #b86e14; --tb: #fbefdc; }
.nd-ab-fa { --t: var(--mute-2); --tb: var(--soft); }
.nd-ab-go { --t: var(--blue); --tb: var(--blue-t); }
.nd-abt, .nd-hs-bar { height: 3px; margin-bottom: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.nd-abf, .nd-hs-fill { height: 100%; border-radius: 99px; background: var(--t, var(--ink)); transition: width .8s var(--e); }
.nd-ai { font-size: .9375rem; line-height: 1.55; color: var(--mute-2); }

/* Callouts */
.nd-callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 40px; padding: 4px 0 4px 18px; border-left: 2px solid var(--ink); }
.nd-callout-warn { border-left-color: var(--pink); }
.nd-callout-success { border-left-color: var(--blue); }
.nd-callout svg { width: 18px; height: 18px; margin-top: 3px; color: var(--mute-2); }
.nd-callout-txt { font-size: 1rem; line-height: 1.6; color: var(--mute-2); }
.nd-callout-txt strong { color: var(--ink); }
.nd-callout-txt a { color: var(--ink); font-weight: 700; }

/* Health signals: a 2 × 2 grid split by hairlines */
.nd-hs-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.nd-hs { padding: 24px 28px 26px 0; border-bottom: 1px solid var(--line); animation: ndu .4s var(--e) both; }
.nd-hs:nth-child(even) { padding: 24px 0 26px 28px; border-left: 1px solid var(--line); }
.nd-hs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.nd-hs-ico, .nd-sc-ico, .nd-cico, .nd-gate-bk-ico { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink); }
.nd-hs-ico svg, .nd-sc-ico svg, .nd-cico svg { width: 15px; height: 15px; stroke-width: 1.8; }
.nd-hs-name { font-size: 1rem; font-weight: 700; }
.nd-hs-level { margin-left: auto; }
.nd-hs-desc { font-size: .9375rem; line-height: 1.55; color: var(--mute-2); }

/* Beliefs found */
.nd-mt { display: inline-block; margin: 0 6px 8px 0; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .875rem; font-weight: 700; }

/* Cost */
.nd-cr { margin-top: 4px; }
.nd-crt { margin-bottom: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute-2); }
.nd-cbig { font-size: clamp(2.6rem, 7vw, 4.25rem); font-weight: 800; line-height: 1; letter-spacing: -.045em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.nd-crng { margin-bottom: 26px; font-size: .9375rem; color: var(--mute); font-weight: 500; }
.nd-crow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.nd-crow:last-child { border-bottom: 1px solid var(--line); }
.nd-clbl { display: flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 500; color: var(--ink-2); }
.nd-cval { font-size: 1.0625rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Symptoms */
.nd-sg { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.nd-sc { display: flex; gap: 12px; align-items: flex-start; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); }
.nd-sc:nth-child(even) { padding: 18px 0 18px 24px; border-left: 1px solid var(--line); }
.nd-sc-ico { width: 28px; height: 28px; border-radius: 9px; }
.nd-sc-ico svg { width: 13px; height: 13px; }
.nd-stx { font-size: .9688rem; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }

/* Action plan, behind the email gate */
.nd-ap-gate { position: relative; margin-top: 56px; border-top: 1px solid var(--line); }
.nd-ap-blur { padding: 56px 0 24px; filter: blur(7px); pointer-events: none; user-select: none; opacity: .7; }
.nd-ap-overlay { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.nd-ap-box { width: 100%; max-width: 560px; padding: 36px 32px; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 24px; }
.nd-ap-box .nd-ct { justify-content: center; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.nd-em-row { display: flex; gap: 14px; align-items: flex-end; max-width: 480px; margin: 0 auto; }
.nd-em-row .nd-if { flex: 1; }
.nd-err { display: none; margin-top: 10px; font-size: .875rem; font-weight: 600; color: var(--pink); }
.nd-ok-msg { display: none; margin-top: 12px; font-size: .9375rem; font-weight: 700; color: var(--blue); }
.nd-gate-or { display: flex; align-items: center; gap: 16px; margin: 24px 0; font-size: .8125rem; font-weight: 600; color: var(--mute); }
.nd-gate-or::before, .nd-gate-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.nd-gate-bk { display: flex; align-items: center; gap: 16px; text-align: left; }
.nd-gate-bk-ico { width: 44px; height: 44px; border-radius: 13px; }
.nd-ap-revealed { display: none; animation: ndu .5s var(--e) both; }
.nd-ap-revealed.on { display: block; }
.nd-ap-item { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.nd-ap-item:last-of-type { border-bottom: 1px solid var(--line); }
.nd-ap-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: #fff; font-size: .875rem; font-weight: 800; flex-shrink: 0; }
.nd-ap-txt { font-size: 1rem; line-height: 1.6; color: var(--mute-2); }
.nd-ap-txt strong { display: block; margin-bottom: 2px; font-size: 1.0625rem; color: var(--ink); }

/* Closing */
.nd-urg { margin-top: 56px; padding: 88px 0 104px; border-top: 1px solid var(--line); text-align: center; }
.nd-uq { max-width: 720px; margin: 0 auto 14px; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.nd-uq strong { font-weight: 800; }
.nd-un { margin-bottom: 34px; font-size: 1rem; color: var(--mute); font-weight: 500; }
.nd-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

@media (max-width: 700px) {
  .nd-hero { padding: 64px 20px 80px; }
  .nd-gauge { width: 136px; margin-bottom: 22px; }
  .nd-vstack, .nd-row, .nd-hs-grid, .nd-sg { grid-template-columns: 1fr; }
  .nd-vstack li, .nd-vstack li:nth-child(n) { padding: 14px 2px; border-left: 0; }
  .nd-hs, .nd-hs:nth-child(even) { padding: 22px 0; border-left: 0; }
  .nd-sc, .nd-sc:nth-child(even) { padding: 16px 0; border-left: 0; }
  .nd-diag { padding: 40px 20px 32px; }
  .nd-res { padding: 56px 20px 0; }
  .nd-prog { padding: 12px 20px 10px; }
  .nd-opt { padding: 12px 14px; }
  .nd-nav .nd-btn { padding: 14px 18px; }
  .nd-ah { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nd-em-row { flex-direction: column; align-items: stretch; }
  .nd-ap-box { padding: 28px 20px; }
  .nd-gate-bk { flex-direction: column; text-align: center; }
  .nd-ctas { flex-direction: column; align-items: stretch; }
  .nd-ctas .nd-btn, .nd-start .nd-btn { width: 100%; white-space: normal; }
  .nd-bl { padding: 15px 22px; }
  .nd-urg { padding: 64px 0 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .nd-step.act, .nd-sec, .nd-ac, .nd-hs, .nd-score-h, .nd-ap-revealed { animation: none; }
  .nd-rf, .nd-pbar, .nd-abf, .nd-hs-fill { transition: none; }
}
