/* Emotional Health Project — one quiet white page, a black line of choice, a single yellow dot.
   Single deliberate light look (brand): colors set explicitly, no dark variant. */
:root {
  --bg: #FFFFFF;
  --ink: #111111;
  --ink-2: #333333;
  --muted: #6B6B6B;
  --faint: #A3A3A3;
  --rule: #ECECEC;
  --panel: #F7F7F5;
  --sun: #F6E05E;
  --sun-deep: #E8C93A;
  --cream: #FDF6CC;
  --cream-rule: #F0E3A0;
  --alert: #B42318;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1180px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
@media (max-width: 560px) { .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }
.num { font-variant-numeric: tabular-nums; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--rule); backdrop-filter: saturate(1.2) blur(6px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); flex: none; }
.dot.sm { width: 10px; height: 10px; border-width: 0; }
.nav { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 16px; padding: 8px 0 6px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sun); }
.tag-admin { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--rule); border-radius: 99px; padding: 3px 10px; }
@media (max-width: 760px) {
  .site-head .wrap { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
  .nav { gap: 20px; }
}

/* type */
.eyebrow-q { font-size: 18px; margin: 0 0 18px; }
h1.display { font-size: clamp(42px, 7vw, 76px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 0 0 22px; text-wrap: balance; }
h2.title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 21px; letter-spacing: -.015em; font-weight: 600; margin: 0 0 6px; line-height: 1.25; text-wrap: balance; }
.byline { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.byline b { color: var(--ink); font-weight: 600; }
.lede { color: var(--muted); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.65; max-width: 34em; margin: 0; }
.prose { max-width: 42em; }
.prose p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

main { padding-bottom: 96px; }
.page { padding-top: clamp(48px, 9vw, 96px); }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--bg); color: var(--ink); font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--cream); }
.btn.solid { background: var(--ink); color: #fff; }
.btn.solid:hover { background: #2B2B2B; }
.btn.solid .dot { border-color: var(--sun); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.danger { border-color: var(--alert); color: var(--alert); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }

/* line of choice hero */
.loc { position: relative; max-width: 808px; height: 250px; margin: clamp(48px, 9vw, 120px) 0 40px; touch-action: none; user-select: none; -webkit-user-select: none; }
.loc .row { position: absolute; left: 80px; display: flex; gap: clamp(16px, 3.5vw, 36px); flex-wrap: nowrap; font-size: clamp(16px, 2vw, 18px); transition: color .3s; }
.loc .above { top: 22px; color: var(--faint); }
.loc .below { top: 132px; color: var(--muted); }
.loc .below span:nth-child(even) { transform: translateY(4px); }
.loc .bar { position: absolute; left: 0; right: 0; top: 78px; height: 2px; background: var(--ink); }
.loc .bar-label { position: absolute; right: 0; top: 92px; font-size: 14px; color: var(--muted); }
.loc .tether { position: absolute; left: 29px; width: 2px; top: 80px; background: var(--sun-deep); }
.loc .knob { position: absolute; left: 8px; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; cursor: grab; }
.loc .knob::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--rule); transition: opacity .3s; }
.loc .knob::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
.loc .knob:active { cursor: grabbing; }
.loc .hint { position: absolute; left: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.loc.is-up .above { color: var(--ink); }
.loc.is-up .below { color: var(--faint); }
.loc.is-up .knob::before { opacity: 0; }
@media (max-width: 560px) {
  .loc .row { left: 64px; }
  .loc .row span:nth-child(4) { display: none; }
}
.loc-caption { font-size: 18px; line-height: 1.6; max-width: 40em; margin: 0 0 28px; min-height: 3.2em; }
.loc-caption b { font-weight: 600; }

/* sections */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.tile { border-top: 2px solid var(--ink); padding-top: 18px; }
.tile p { margin: 0; color: var(--muted); }
.tile .k { font-size: 14px; color: var(--muted); margin-bottom: 8px; display: block; }
.note { display: flex; gap: 14px; align-items: flex-start; background: var(--cream); border-radius: 18px; padding: 18px 22px; margin-top: 36px; max-width: 46em; }
.note .dot { margin-top: 4px; }
.sched { border-top: 1px solid var(--rule); margin-top: 28px; }
.sched-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
@media (max-width: 640px) { .sched-row { grid-template-columns: 1fr; gap: 4px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill.fill { background: var(--ink); color: var(--cream); }
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
@media (max-width: 860px) { .lines { grid-template-columns: 1fr; } }
.line-card { border: 2px solid var(--ink); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.line-card .phone { font-size: 28px; font-weight: 600; letter-spacing: -.02em; user-select: all; }
.line-card .meta { color: var(--muted); font-size: 14px; }

/* need to talk */
.talk { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 14px 22px; font-size: 16px; font-weight: 500; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.talk .dot { border: 0; width: 10px; height: 10px; }
.sheet { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 41; width: min(380px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.sheet h3 { color: #fff; }
.sheet p { color: #D6D6D6; margin: 0 0 14px; font-size: 15px; }
.sheet .hl { border-top: 1px solid #2E2E2E; padding: 12px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sheet .hl b { font-size: 20px; font-weight: 600; color: var(--sun); user-select: all; }
.sheet .hl span { font-size: 14px; color: #D6D6D6; }
.sheet .x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: #B5B5B5; font-size: 22px; cursor: pointer; }

/* forms and survey */
.panel { border: 1px solid var(--rule); border-radius: 24px; padding: clamp(20px, 4vw, 36px); max-width: 760px; }
.panel.cream { background: var(--cream); border-color: var(--cream-rule); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field > label, .field > .flabel { font-weight: 600; font-size: 16px; }
.input, select.input, textarea.input { border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; background: #fff; min-height: 48px; width: 100%; max-width: 420px; }
textarea.input { max-width: 100%; min-height: 96px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin-top: 2px; flex: none; }
.hint-s { font-size: 14px; color: var(--muted); }
.ok-s { font-size: 14px; color: var(--ink); }
.err-s { font-size: 14px; color: var(--alert); }
.scale-q { border-top: 1px solid var(--rule); padding: 18px 0; }
.scale-q:last-of-type { border-bottom: 1px solid var(--rule); }
.scale-q p { margin: 0 0 12px; font-weight: 500; }
.seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 6px 4px; border: 2px solid var(--rule); border-radius: 12px; font-size: 13px; line-height: 1.2; color: var(--muted); cursor: pointer; }
.seg input:checked + span { border-color: var(--ink); background: var(--sun); color: var(--ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--sun-deep); outline-offset: 2px; }
@media (max-width: 520px) { .seg span { font-size: 11px; min-height: 58px; } }
.mood { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 560px; }
.mood label { position: relative; }
.mood input { position: absolute; opacity: 0; inset: 0; }
.mood span { display: flex; align-items: center; justify-content: center; height: 46px; border: 2px solid var(--rule); border-radius: 12px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.mood input:checked + span { border-color: var(--ink); background: var(--sun); }
.mood input:focus-visible + span { outline: 3px solid var(--sun-deep); outline-offset: 2px; }
.mood-ends { display: flex; justify-content: space-between; max-width: 560px; font-size: 13px; color: var(--muted); }
.rec { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.steps { display: flex; gap: 8px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.steps span { font-size: 13px; color: var(--faint); }
.steps span.on { color: var(--ink); font-weight: 600; }
.steps i { width: 18px; height: 2px; background: var(--rule); }

/* game */
.game { display: flex; flex-direction: column; gap: 12px; }
.hud { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 10px 22px; align-items: end; }
.hud .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.hud .lvl { color: var(--ink); font-weight: 600; font-size: 15px; }
.meter { height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s; }
.meter.xp i { background: var(--sun); box-shadow: inset 0 0 0 1px var(--sun-deep); }
.meter.pr i { background: var(--ink); }
.chips { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--rule); border-radius: 99px; padding: 4px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.on { border-color: var(--ink); background: var(--sun); }
.centres { display: inline-flex; gap: 4px; }
.centres i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.centres i.on { background: var(--sun); }
@media (max-width: 640px) { .hud { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .chips { grid-column: 1 / -1; } }
.stage { position: relative; border: 1px solid var(--rule); border-radius: 24px; overflow: hidden; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { display: block; width: 100%; }
.ov { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(255,255,255,.88); }
.ov.dim { background: rgba(17,17,17,.35); }
.card { background: #fff; border: 2px solid var(--ink); border-radius: 22px; padding: 20px 22px; width: 100%; max-width: 600px; max-height: 100%; overflow-y: auto; }
.card.cream { background: var(--cream); border-color: var(--cream-rule); }
.card h3 { font-size: 24px; margin-bottom: 8px; }
.card p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.card ul { margin: 0 0 16px; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.card li { margin-bottom: 4px; }
kbd { font-family: var(--font); font-size: 12px; border: 1px solid #CFCFCF; border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: #fff; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.scen { font-size: clamp(21px, 3vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 12px !important; color: var(--ink) !important; text-wrap: balance; }
.timer { height: 4px; background: var(--cream-rule); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.timer i { display: block; height: 100%; width: 100%; background: var(--ink); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; } }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 15px; font-weight: 500; line-height: 1.35; cursor: pointer; }
.opt:hover { background: var(--sun); }
.opt b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { border-top: 2px solid var(--ink); padding-top: 8px; }
.stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.review { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
.review li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.4; }
.review .mk { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); margin-top: 4px; }
.review .mk.up { background: var(--sun); }
@media (max-width: 640px) {
  .stage .ov { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .stage .ov.dim { background: rgba(17,17,17,.55); }
}
.toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(460px, calc(100% - 28px)); background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.4; pointer-events: none; transition: opacity .3s; }
.toast strong { display: block; color: var(--sun); font-size: 17px; font-weight: 600; }
.ctrls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ctrl { min-height: 52px; border: 2px solid var(--ink); background: #fff; border-radius: 16px; font-size: 16px; font-weight: 600; cursor: pointer; }
.ctrl:active { background: var(--sun); }
.ctrl.obs[disabled] { border-color: var(--rule); color: var(--faint); cursor: default; }
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share code { font-family: var(--font); font-weight: 600; background: var(--panel); border-radius: 10px; padding: 10px 14px; font-size: 15px; word-break: break-all; user-select: all; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.compare div { border-top: 2px solid var(--ink); padding-top: 10px; }
.compare b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.compare span { font-size: 13px; color: var(--muted); }

footer.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 100px; color: var(--muted); font-size: 14px; }
footer.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
