/* Ascent — Still Water tokens, seven mineral gems for the seven domains. */
:root {
  --canvas: #F5F6F8; --raised: #FBFBFD; --panel: #FFFFFF; --hairline: #E1E4EC;
  --t-strong: #232A40; --t-body: #495064; --t-faint: #6B7288;
  --accent: #3E6C9E; --em: #4C4F8B; --accent-2: #7A5FA6;
  --warn-bg: #FFF4CC; --ok-bg: #EEF3F9; --crisis: #8F2F3B;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--t-strong); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--accent); }
button { font: inherit; }
[hidden] { display: none !important; }

.crisis-strip { background: #EDEFF2; color: var(--t-body); font-size: 0.8rem; text-align: center; padding: 0.45rem 1rem; }
.crisis-strip a { color: var(--crisis); font-weight: 600; text-decoration: none; }

.app { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.screen { width: 100%; max-width: 560px; display: flex; flex-direction: column; min-height: calc(100dvh - 110px); padding-top: 18px; }
.screen.interlude { background: var(--ok-bg); margin: 12px -16px 0; padding: 36px 24px 28px; max-width: none; width: calc(100% + 32px); }
@media (min-width: 600px) { .screen.interlude { width: 100%; max-width: 560px; margin: 12px 0 0; border-radius: 20px; min-height: auto; } .screen { min-height: auto; } }

.topline { display: flex; align-items: center; gap: 12px; }
.back { width: 44px; height: 44px; margin-left: -10px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 22px; cursor: pointer; color: var(--t-strong); }
.back:hover { background: var(--hairline); }
.bar { flex: 1; height: 4px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); transition: width 300ms ease; }
.where { font-size: 0.78rem; color: var(--t-faint); white-space: nowrap; }

.eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 26px 0 0; }
.prefix { font-size: 0.9rem; color: var(--t-faint); margin: 20px 0 0; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 5.2vw, 2.1rem); line-height: 1.2; margin: 10px 0 0; letter-spacing: -0.005em; }
h1 .display-em, .display-em { font-style: italic; color: var(--em); }
h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 26px 0 0; }
.help { font-size: 0.95rem; color: var(--t-body); margin: 10px 0 0; line-height: 1.5; }
.interlude p.body { font-size: 1.08rem; line-height: 1.6; color: var(--t-body); margin: 16px 0 0; }
.statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.45rem, 4.8vw, 1.9rem); line-height: 1.3; margin: 22px 0 0; }

.options { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.opt { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 12px 16px; border: 1.5px solid var(--hairline); border-radius: var(--r); background: var(--panel); text-align: left; cursor: pointer; color: var(--t-strong); font-size: 1rem; line-height: 1.35; transition: border-color 120ms, background 120ms; }
.opt:hover { border-color: var(--accent); }
.opt[aria-checked="true"] { border-color: var(--accent); background: var(--ok-bg); font-weight: 500; }
.dot { flex: none; width: 22px; height: 22px; border-radius: 11px; border: 2px solid #9AA4B4; }
.opt[aria-checked="true"] .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff; }

textarea, input[type=text], input[type=email], select { width: 100%; font: 400 1rem/1.5 var(--font-body); color: var(--t-strong); padding: 12px 14px; border: 1.5px solid #C9D0DC; border-radius: 12px; background: var(--raised); margin-top: 10px; }
textarea { resize: none; min-height: 120px; }
label.lbl { display: block; font-size: 0.82rem; font-weight: 600; color: var(--t-body); margin-top: 18px; }

.slider { margin-top: 28px; }
.slider input[type=range] { width: 100%; accent-color: var(--accent); }
.slider .val { font-family: var(--font-display); font-size: 2.6rem; text-align: center; color: var(--em); }
.slider .ends { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--t-faint); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { min-height: 40px; padding: 0 14px; border: 1.5px solid #C9D0DC; border-radius: 22px; background: #fff; cursor: pointer; color: var(--t-strong); font-size: 0.9rem; }
.chip[aria-checked="true"] { border-color: var(--accent); background: var(--ok-bg); font-weight: 500; }

.spacer { flex: 1; min-height: 20px; }
.actions { display: flex; flex-direction: column; gap: 6px; margin-top: 22px; }
.actions.row { flex-direction: row; }
.actions.row .btn { flex: 1; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--t-faint); background: var(--panel); color: var(--t-strong); font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--t-strong); color: #fff; border-color: var(--t-strong); }
.btn-primary:hover { background: #2F3754; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--t-faint); font-size: 0.9rem; min-height: 44px; }

/* ----- home / dashboard ----- */
.home h1 { margin-top: 8px; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: 0.02em; margin: 22px 0 0; display: flex; justify-content: space-between; align-items: baseline; }
.wordmark small { font-family: var(--font-body); font-weight: 400; font-size: 0.72rem; color: var(--t-faint); letter-spacing: 0.1em; text-transform: uppercase; }
.domains { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.domain-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 16px; text-decoration: none; color: var(--t-strong); transition: border-color 120ms, box-shadow 120ms; }
.domain-card:hover { border-color: #C6CBDA; box-shadow: 0 8px 26px rgba(35,42,64,0.06); }
.domain-card.soon { opacity: 0.62; }
.domain-card .name { font-weight: 600; }
.domain-card .sub { font-size: 0.82rem; color: var(--t-faint); margin-top: 2px; }
.domain-card .tag { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-faint); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 9px; }
.domain-card .tag.live { color: var(--accent); border-color: var(--accent); }
.mark { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.mark svg { width: 26px; height: 26px; }
.mark.lg { width: 84px; height: 84px; border-radius: 42px; margin-top: 26px; }
.mark.lg svg { width: 50px; height: 50px; }

/* ----- profile report ----- */
.bars { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.brow { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; }
.brow .mark { width: 32px; height: 32px; border-radius: 16px; } .brow .mark svg { width: 19px; height: 19px; }
.brow .track { height: 10px; background: var(--hairline); border-radius: 5px; overflow: hidden; position: relative; }
.brow .track > div { height: 100%; border-radius: 5px; transition: width 600ms ease; }
.brow .lbl2 { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 4px; }
.brow .band { font-size: 0.82rem; color: var(--t-body); white-space: nowrap; }
.callout { background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 16px; padding: 16px 18px; margin-top: 22px; line-height: 1.5; }
.callout.accent { border-color: var(--accent); background: var(--ok-bg); }
.callout h3 { margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.callout.refer { border-color: var(--crisis); } .callout.refer h3 { color: var(--crisis); }

/* ----- block hub ----- */
.hub-head { display: flex; gap: 16px; align-items: center; margin-top: 22px; }
.weeks { display: flex; gap: 6px; margin-top: 18px; }
.weeks span { flex: 1; height: 6px; border-radius: 3px; background: var(--hairline); }
.weeks span.done { background: var(--accent); } .weeks span.now { background: var(--em); }
.stat-row { display: flex; gap: 10px; margin-top: 18px; }
.stat { flex: 1; background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 14px; padding: 12px 14px; }
.stat .n { font-family: var(--font-display); font-size: 1.9rem; color: var(--em); line-height: 1; }
.stat .l { font-size: 0.74rem; color: var(--t-faint); margin-top: 4px; letter-spacing: 0.04em; }

/* ----- deck ----- */
.tiers { display: flex; gap: 8px; margin-top: 18px; }
.tiers .chip { flex: 1; text-align: center; }
.deck { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 16px; padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; color: var(--t-strong); font-size: 0.98rem; line-height: 1.4; }
.card:hover { border-color: var(--accent); }
.card .cat { flex: none; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-faint); margin-top: 4px; min-width: 76px; }
.card.done { opacity: 0.55; }
.evidence { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.evidence li { background: var(--panel); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 0.93rem; line-height: 1.45; }
.evidence .meta { font-size: 0.76rem; color: var(--t-faint); margin-top: 6px; display: flex; gap: 10px; }
.delta { font-weight: 600; } .delta.down { color: #2F6E4F; } .delta.up { color: var(--crisis); }

/* ----- communication ----- */
.topic { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.25; margin: 26px 0 0; }
.timer { display: flex; flex-direction: column; align-items: center; margin-top: 30px; }
.ring { width: 160px; height: 160px; border-radius: 80px; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--accent) var(--pct, 0%), var(--hairline) 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--canvas); }
.ring .t { position: relative; z-index: 1; font-family: var(--font-display); font-size: 3rem; color: var(--em); }
.ring::after { pointer-events: none; }
.ring.live { background: conic-gradient(var(--crisis) var(--pct, 0%), var(--hairline) 0); }
.mic-note { font-size: 0.82rem; color: var(--t-faint); margin-top: 14px; text-align: center; }
.live-text { margin-top: 18px; min-height: 60px; font-size: 0.98rem; line-height: 1.5; color: var(--t-body); }
.score { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.score .big { font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--em); }
.score .of { color: var(--t-faint); }
.score .verdict { margin-left: auto; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--t-body); }
.score .verdict.pass { color: #2F6E4F; border-color: #2F6E4F; }
.dims { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.dims li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 0.92rem; }
.dims .dn { font-weight: 600; } .dims .note { color: var(--t-body); grid-column: 1 / -1; font-size: 0.88rem; line-height: 1.45; }
.dims .pts { font-family: var(--font-display); font-size: 1.3rem; color: var(--em); }
.quote { margin: 20px 0 0; padding: 14px 18px; border-left: 3px solid var(--em); font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; color: var(--t-strong); background: var(--panel); border-radius: 0 12px 12px 0; }
.source { font-size: 0.74rem; color: var(--t-faint); margin-top: 10px; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-top: 14px; }
.trend span { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 3px; opacity: 0.85; }
.trend span.pass { background: #2F6E4F; }

.overlay { position: fixed; inset: 0; background: rgba(35,42,64,0.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; z-index: 50; }
@media (min-width: 600px) { .overlay { align-items: center; } }
.crisis-card { background: #fff; border-radius: 20px; padding: 24px; max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(11,14,26,0.3); }
.crisis-card h2 { margin: 0; }
.crisis-card p { color: var(--t-body); line-height: 1.5; }
.crisis-lines { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 20px; }
.crisis-lines a { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px solid var(--crisis); border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--crisis); }
.crisis-lines span { text-align: center; color: var(--t-faint); font-size: 0.85rem; }
.fine { font-size: 0.78rem; color: var(--t-faint); line-height: 1.5; margin-top: 18px; }
.testbar { background: #232A40; color: #E9ECF5; font-size: 0.8rem; text-align: center; padding: 0.45rem 1rem; }
.testbar button { margin-left: 0.75rem; background: transparent; color: #E9ECF5; border: 1px solid #6B7288; border-radius: 999px; padding: 0.15rem 0.7rem; cursor: pointer; }

/* ----- Today: three pillars ----- */
.seven-ring { margin-top: 22px; background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.seven-ring .dots { display: flex; gap: 7px; }
.seven-ring .dots span { width: 14px; height: 14px; border-radius: 7px; border: 2px solid #C9D0DC; }
.seven-ring .dots span.on { background: var(--em); border-color: var(--em); }
.seven-ring .r-label { font-size: 0.8rem; color: var(--t-body); text-align: right; }
.pillar { display: block; margin-top: 12px; padding: 14px 16px; background: var(--panel); border: 1.5px solid var(--hairline); border-radius: 16px; text-decoration: none; color: var(--t-strong); transition: border-color 120ms, box-shadow 120ms; }
.pillar:hover { border-color: #C6CBDA; box-shadow: 0 8px 26px rgba(35,42,64,0.06); }
.pillar.done { border-color: var(--accent); background: var(--ok-bg); }
.p-head { display: flex; align-items: baseline; gap: 10px; }
.p-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.p-sub { font-size: 0.74rem; color: var(--t-faint); flex: 1; }
.p-check { font-weight: 700; color: var(--accent); }
.p-body { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; }
.p-title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; }
.p-line { font-size: 0.88rem; color: var(--t-body); margin-top: 4px; line-height: 1.45; }
.steps { padding-left: 20px; margin: 12px 0 0; color: var(--t-body); font-size: 0.93rem; line-height: 1.5; }
.steps li { margin-top: 8px; }
.chip[aria-checked="true"] { border-color: var(--accent); }

/* ----- Dull after dark: Ascent takes the same medicine ----- */
/* Night: a calm, low-stimulation dark palette (deep indigo, silver text, pastel lavender / rose / ice accents). Replaces the old red filter. */
html.night { --canvas: #0E1017; --raised: #141726; --panel: #191C2C; --hairline: #272B3E; --t-strong: #ECEAF4; --t-body: #B7B4CA; --t-faint: #7E7C95; --accent: #B9A6F0; --em: #E1A9D3; --accent-2: #9CD4EE; --warn-bg: #2A2740; --ok-bg: #1A1E30; --crisis: #E08AA0; color-scheme: dark; }
html.night body { background: var(--canvas); }
html.night .crisis-strip { background: #141726; }
html.night .bubble.me { background: #1E2236; border-color: #2E3350; }
html.night .options .opt[aria-checked="true"] { background: #232842; }
html.night .btn-primary { background: var(--accent); color: #0E1017; border-color: var(--accent); }
html.night .pillar.done, html.night .card.done { opacity: 0.75; }
html.night img, html.night .mark { filter: saturate(0.85); }
html.night-grey { filter: grayscale(1) brightness(0.9); }

/* ---------- the Guide (chat-first home) ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.bubble { max-width: 88%; padding: 11px 14px; border-radius: 18px; line-height: 1.45; font-size: 0.98rem; white-space: pre-wrap; }
.bubble.guide { align-self: flex-start; background: var(--panel); border: 1.5px solid #C9CFDC; box-shadow: 0 1px 2px rgba(35,42,64,0.06); border-bottom-left-radius: 6px; color: var(--t-strong); font-family: var(--font-display); font-size: 1.12rem; }
.bubble.me { align-self: flex-end; background: #E4EAF4; border: 1.5px solid #C2CCE0; border-bottom-right-radius: 6px; color: var(--t-body); }
.bubble.thinking { color: var(--t-faint); letter-spacing: 0.2em; }
.picks { margin-top: 6px; }
.pillar.pick { cursor: default; }
.chat-input { margin-top: 14px; }
.chat-input .chips { margin-top: 0; margin-bottom: 10px; }
.chat-row { display: flex; gap: 8px; align-items: center; }
.chat-row input { flex: 1; min-height: 44px; margin: 0; }
.mic { width: 44px; height: 44px; border-radius: 22px; border: 1.5px solid var(--hairline); background: var(--panel); color: var(--crisis); font-size: 0.9rem; cursor: pointer; flex: none; }
.mic.live { background: var(--crisis); color: #fff; border-color: var(--crisis); animation: pulse 1.1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(143,47,59,0.35); } 100% { box-shadow: 0 0 0 12px rgba(143,47,59,0); } }
.wordmark .more { background: none; border: none; color: var(--t-faint); font-size: 1.2rem; letter-spacing: 0.1em; cursor: pointer; padding: 0 4px; }
.menu-row { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.chat-row .send { min-height: 44px; width: 44px; padding: 0; border-radius: 22px; font-size: 1.2rem; }
.sheet-head { display: flex; gap: 14px; align-items: flex-start; margin-top: 10px; }
.sheet-mark .mark { width: 64px; height: 64px; font-size: 1.6rem; }
.greyed { color: var(--t-faint); }
.next-row { margin-top: 14px; }
.options .opt[aria-checked="true"] { border-color: var(--em); background: var(--ok-bg); }
.setup-steps li { margin-bottom: 12px; }
.setup-steps li.done strong { color: var(--t-faint); }
.setup-steps li.now strong { color: var(--em); }
.btn:not(.btn-primary):not(.btn-link):hover { background: var(--ok-bg); }
html.night .bubble.guide { border-color: #343955; box-shadow: none; }
.pillar.resume { border-style: dashed; }
.chip { border-color: #C9CFDC; }
.beats { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.beat { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--hairline); background: var(--panel); }
.beat.now { border-color: var(--em); }
.beat.past { opacity: 0.6; }
.beat.next { opacity: 0.45; }
.beat-name { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.beat-text { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.35; margin-top: 4px; }
.done-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-top: 8px; border-radius: 12px; background: var(--ok-bg); color: var(--t-body); font-size: 0.9rem; }
.done-row .p-check { margin-left: auto; color: #2F6E4F; }
.bubble.guide { display: flex; gap: 10px; align-items: flex-start; }
.bubble.guide > span { flex: 1; }
.listen { flex: none; width: 34px; height: 34px; border-radius: 17px; border: 1.5px solid #C9CFDC; background: var(--canvas); color: var(--t-body); font-size: 0.75rem; cursor: pointer; margin-top: 2px; }
.listen.playing { background: var(--em); color: #fff; border-color: var(--em); }
html.night .listen { border-color: #343955; background: #141726; }
details.more { margin-top: 12px; }
details.more > summary { list-style: none; cursor: pointer; font-size: 0.85rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { color: var(--t-faint); }
.more-body { margin-top: 6px; }
.more-body .help { margin-top: 6px; font-size: 0.9rem; }
html.night .chip { background: var(--panel); color: var(--t-body); border-color: #343955; }
html.night .chip[aria-checked="true"] { background: #232842; color: var(--t-strong); border-color: var(--accent); }
