/* Bullion Station member app. One shell, themed per group via [data-theme] tokens (+ admin overrides set at runtime). */
@font-face { font-family: "Michroma"; src: url("fonts/michroma-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("fonts/albert-sans-var-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ── group themes ───────────────────────────────────────── */
[data-theme="bullion"] { --bg:#0b0906; --surface:#16120c; --surface-2:#211a11; --line:#3a2e1c; --ink:#f4ecd8; --body:#d9cfb8; --muted:#a99c80;
  --accent:#e2b257; --accent-hi:#f3cd7e; --accent-ink:#231806; --up:#e2b257; --down:#b8a58a; --sell:#e98a6a; --buy:#e2b257; --brand:"Bullion Station"; color-scheme: dark; }
[data-theme="mom"] { --bg:#f5efe3; --surface:#fffdf8; --surface-2:#f0e8d8; --line:#e2d5bc; --ink:#2a2014; --body:#4a3d2a; --muted:#7d6d52;
  --accent:#b88a2e; --accent-hi:#a77a20; --accent-ink:#ffffff; --up:#b88a2e; --down:#8d7c63; --sell:#b4532f; --buy:#2f7a4f; color-scheme: light; }
[data-theme="cj"] { --bg:#07070b; --surface:#12121b; --surface-2:#1b1b28; --line:#2b2b40; --ink:#f2f2f7; --body:#cfcfdc; --muted:#9a9ab2;
  --accent:#e8283f; --accent-hi:#ff4a5f; --accent-ink:#ffffff; --up:#3d8bff; --down:#e8283f; --sell:#ff5a6e; --buy:#4d95ff; color-scheme: dark; }
[data-theme="fourx"] { --bg:#05131b; --surface:#0b2230; --surface-2:#11303f; --line:#1d4256; --ink:#ebf6f8; --body:#c4dce2; --muted:#8db0ba;
  --accent:#2fd18f; --accent-hi:#5fe6ac; --accent-ink:#04261a; --up:#2fd18f; --down:#7d9aa4; --sell:#ff8f6b; --buy:#2fd18f; color-scheme: dark; }

[hidden] { display: none !important; }   /* the hidden attribute always wins over component display rules */
:root { --ease: cubic-bezier(.16,1,.3,1); --r: 18px; --tabs-h: 72px; --top-h: 58px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 15px/1.5 "Albert Sans", system-ui, sans-serif; background: #050505; color: var(--body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
h2, h3 { color: var(--ink); margin: 0; }

/* ── desktop: the app sits in a phone-width frame. phone: full screen ── */
body { display: flex; align-items: center; justify-content: center; min-height: 100svh; padding: 24px;
  background: radial-gradient(ellipse at 70% 40%, #1d1710, #050505 70%); }
.device { width: 400px; height: min(860px, calc(100svh - 48px)); border-radius: 48px; padding: 12px; background: #000;
  box-shadow: 0 0 0 2px #2a2a2a, 0 40px 120px -20px #000, inset 0 0 0 1px #333; flex: none; }
.app { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg);
  display: grid; grid-template-rows: var(--top-h) 1fr var(--tabs-h); transition: background .5s var(--ease); }
@media (max-width: 760px) {
  body { padding: 0; display: block; background: var(--bg); }
    .device { width: 100%; height: 100svh; border-radius: 0; padding: 0; box-shadow: none; background: none; }
  .app { border-radius: 0; }
}

/* ── top bar ── */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
[data-theme="mom"] .brand-logo, [data-theme="cj"] .brand-logo { border-radius: 50%; object-fit: cover; }
.brand-name { font: 400 .8rem/1.2 "Michroma", sans-serif; color: var(--ink); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .85rem; }

/* ── screens ── */
.screens { position: relative; overflow: hidden; }
.screen { position: absolute; inset: 0; overflow-y: auto; padding: 12px 16px 24px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .3s; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .35s var(--ease); }

/* ── tabs ── */
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
.tab { display: grid; place-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font-size: .72rem; font-weight: 500; padding: 10px 0 12px; min-height: 56px; }
.tab svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; }
.tab.is-on { color: var(--accent); }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.2rem; border-radius: 14px; border: 0; font-weight: 600; transition: transform .2s var(--ease), filter .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 1rem; border-radius: 12px; font-size: .9rem; }
.btn-icon { width: 48px; padding: 0; border-radius: 50%; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: .5rem 0; min-height: 40px; }

/* ── signals ── */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--body); border-radius: 999px; padding: 0 14px; min-height: 36px; font-size: .88rem; }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.feed { display: grid; gap: 12px; }
.sig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.sig-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.sig-ch { color: var(--body); font-weight: 600; }
.sig-main { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.side { font-weight: 700; font-size: .78rem; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.side.sell { background: color-mix(in oklab, var(--sell) 18%, transparent); color: var(--sell); }
.side.buy { background: color-mix(in oklab, var(--buy) 18%, transparent); color: var(--buy); }
.sig-sym { font: 400 1.05rem/1 "Michroma", sans-serif; color: var(--ink); }
.sig-entry { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.levels div { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.levels dt { font-size: .7rem; color: var(--muted); }
.levels dd { margin: 0; font-size: .82rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.levels .hit { outline: 1px solid var(--accent); }
.sig-foot { display: flex; gap: 8px; align-items: center; }
.sig-foot .btn-primary { flex: 1; }
.status { font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sig.is-copied .btn-primary { background: var(--surface-2); color: var(--ink); }
.update { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px 16px; font-size: .9rem; color: var(--body); }
.update b { color: var(--ink); }

/* ── chart ── */
.chart-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 10px; }
.sym { margin: 0; font: 400 .9rem "Michroma", sans-serif; color: var(--ink); }
.px { margin: 2px 0 0; font-size: 1.6rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tf { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tf button { border: 0; background: none; color: var(--muted); padding: 0 10px; min-height: 34px; border-radius: 8px; font-size: .82rem; }
.tf .is-on { background: var(--surface-2); color: var(--ink); }
.chart { width: 100%; height: 360px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); margin: 10px 2px 16px; }
.ln { display: inline-block; width: 16px; height: 2px; margin-right: 6px; vertical-align: middle; }
.ln-entry { background: var(--ink); } .ln-sl { background: var(--sell); } .ln-tp { background: var(--accent); }

/* ── matrix ── */
.matrix-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.matrix-kicker { font: 400 .72rem "Michroma", sans-serif; color: var(--accent); letter-spacing: .08em; margin: 0 0 6px; }
.matrix-hero h2 { font-size: 1.25rem; margin-bottom: 6px; }
.sub { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.master { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .25s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform .3s var(--ease), background .25s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent-ink); }
.channel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.ch-name { color: var(--ink); font-weight: 600; }
.ch-card { grid-column: 1; font-size: .85rem; color: var(--muted); }
.ch-card button { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 4px 0; font-size: .85rem; }
.ch .switch { grid-row: 1 / span 2; grid-column: 2; }
.fine { font-size: .82rem; color: var(--muted); margin: 14px 2px; }

/* ── journal ── */
.j-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.j-summary > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.k { margin: 0; font-size: .75rem; color: var(--muted); }
.v { margin: 2px 0 0; font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.h-section { font-size: 1rem; margin: 6px 0 10px; }
.insights { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: i; }
.insights li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 48px; position: relative; font-size: .9rem; counter-increment: i; }
.insights li::before { content: counter(i); position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.insights b { color: var(--ink); display: block; margin-bottom: 2px; }
.trades { list-style: none; margin: 0; padding: 0; }
.trades li { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.t-tag { grid-row: span 2; font-size: .7rem; font-weight: 700; padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.t-main { color: var(--ink); font-weight: 600; font-size: .92rem; }
.t-sub { grid-column: 2; font-size: .78rem; color: var(--muted); }
.t-res { grid-row: span 2; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-res.pos { color: var(--up); } .t-res.neg { color: var(--down); }

/* ── chat ── */
.screen-chat { display: flex; flex-direction: column; padding-bottom: 0; }
.room-pill { align-self: center; font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 12px; display: flex; gap: 6px; align-items: center; }
.room-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.msg { max-width: 82%; }
.msg .who { font-size: .75rem; color: var(--muted); margin: 0 0 3px 4px; }
.msg .who b { color: var(--accent); font-weight: 600; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 9px 13px; color: var(--ink); font-size: .92rem; }
.msg.me { align-self: flex-end; }
.msg.me .bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.pin .bubble { border-color: var(--accent); }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 14px; background: var(--bg); }
.composer input { flex: 1; min-height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 18px; color: var(--ink); }

/* ── sheets ── */
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); z-index: 30; animation: fade .25s var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 18px 22px;
  max-height: 88%; overflow-y: auto; box-shadow: 0 -20px 60px rgb(0 0 0 / .35); animation: up .4s var(--ease); }
.sheet[hidden], .scrim[hidden], .onboard[hidden] { display: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet h3 { font-size: 1.2rem; }
.sheet-sub { margin: 2px 0 14px; color: var(--muted); font-size: .88rem; }
.order { background: var(--surface-2); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.order-side { font-weight: 700; letter-spacing: .04em; color: var(--sell); margin-bottom: 8px; }
.order-side.buy { color: var(--buy); }
.order dl { margin: 0; display: grid; gap: 8px; }
.order dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.order dt { color: var(--muted); } .order dd { margin: 0; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.order small { color: var(--muted); }
.warn { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: .85rem; margin-bottom: 10px; }
.card-line { font-size: .9rem; color: var(--muted); margin: 0 0 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-line b { color: var(--ink); }
.cards { display: grid; gap: 8px; margin-bottom: 12px; }
.cardopt { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.cardopt[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cardopt .radio { grid-row: span 2; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--muted); }
.cardopt[aria-checked="true"] .radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.cardopt b { color: var(--ink); font-size: .95rem; }
.cardopt span:last-child { font-size: .82rem; color: var(--muted); }
.rec { font-size: .7rem; font-weight: 700; color: var(--accent); margin-left: 6px; }
.more { margin: 4px 0 14px; border-top: 1px solid var(--line); }
.more summary { cursor: pointer; padding: 12px 0; color: var(--accent); font-weight: 600; list-style: none; min-height: 44px; }
.more summary::-webkit-details-marker { display: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink); font-size: .92rem; }
.row select, .field select, .field input { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 0 12px; }
.settings { list-style: none; margin: 8px 0 12px; padding: 0; }
.settings li { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); gap: 12px; }
.settings span { color: var(--muted); } .settings b { color: var(--ink); font-weight: 500; text-align: right; } .settings .ok { color: var(--up); }
.powered { display: flex; flex-direction: column; align-items: center; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin: 8px 0; }
.powered img { width: 110px; height: auto; }
[data-theme="mom"] .powered img { background: #111; border-radius: 12px; }

/* ── onboarding ── */
.onboard { position: absolute; inset: 0; z-index: 50; background: var(--bg); padding: 28px 22px; display: grid; }
.ob-step { display: none; align-content: center; gap: 14px; }
.ob-step.is-on { display: grid; animation: fade .4s var(--ease); }
.ob-logo { width: 96px; height: 96px; margin: 0 auto 6px; object-fit: contain; border-radius: 22px; }
.ob-step h2 { font: 400 1.3rem/1.35 "Michroma", sans-serif; text-align: left; }
.ob-step p { margin: 0; color: var(--muted); }
.ob-count { font-size: .8rem; color: var(--accent) !important; font-weight: 600; }
.field { display: grid; gap: 6px; color: var(--ink); font-size: .9rem; }
.pick { display: grid; gap: 8px; }
.pick label { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.pick input { accent-color: var(--accent); width: 20px; height: 20px; }

/* ── toast ── */
.toast { position: absolute; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + 14px); z-index: 60; background: var(--ink); color: var(--bg); border-radius: 14px;
  padding: 12px 16px; font-size: .9rem; font-weight: 500; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s var(--ease), transform .35s var(--ease); }
.toast.show { opacity: 1; transform: none; }

@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.brand-mono { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 400 .8rem "Michroma", sans-serif; }

/* ── sign-up flow ── */
form.ob-step { margin: 0; }
.onboard { overflow-y: auto; }
.pw, .at { display: flex; align-items: center; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; }
.pw input, .at input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; }
.pw-toggle { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 0 14px; min-height: 44px; }
.at > span { padding-left: 12px; color: var(--muted); }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .85rem; color: var(--body); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.ob-err { color: var(--sell) !important; font-size: .88rem; }
.ob-small { font-size: .82rem; text-align: center; }
.ob-switch { justify-self: center; }
.pf-photo { display: flex; align-items: center; gap: 14px; }
.pf-av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 1.3rem "Albert Sans"; }
.pf-preview { background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; padding: 12px; }
.pf-preview .who { margin: 0 0 4px 4px; font-size: .78rem; color: var(--muted); }
.pf-preview .who b { color: var(--accent); }
.pf-preview .bubble { display: inline-block; }

/* ═══ real-app additions ═══════════════════════════════════════════ */
.top-actions { display: flex; align-items: center; gap: 8px; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.conn.on { background: var(--up); }

/* banners: confirm-email nudge, announcements, copy-trading notice */
.banner { background: var(--surface); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: .88rem; color: var(--body); display: grid; gap: 6px; }
.banner b { color: var(--ink); }
.banner .link { justify-self: start; min-height: 32px; padding: 0; }
.banner-row { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.banner .x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; min-width: 32px; min-height: 32px; }

/* empty + loading states */
.empty { text-align: center; color: var(--muted); padding: 36px 12px; font-size: .92rem; display: grid; gap: 10px; justify-items: center; }
.empty b { color: var(--ink); font-size: 1rem; }
.skel { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear;
  border-radius: var(--r); height: 150px; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.chart-empty { display: grid; place-items: center; height: 360px; border-radius: var(--r); border: 1px dashed var(--line); color: var(--muted); font-size: .9rem; text-align: center; padding: 20px; }
.more-btn { justify-self: center; }

/* signal states */
.sig.is-closed { opacity: .82; }
.sig-note { font-size: .85rem; color: var(--body); margin: -4px 0 12px; }
.levels .stop-hit { outline: 1px solid var(--sell); }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.live { background: color-mix(in oklab, var(--accent) 20%, transparent); color: var(--accent); }

/* sheets: forms + plans + messages */
.sheet form, .stack { display: grid; gap: 12px; }
.sheet .field input, .sheet .field select, .sheet .field textarea { width: 100%; }
.field textarea { min-height: 80px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 10px 12px; resize: vertical; font: inherit; }
.form-err { color: var(--sell); font-size: .88rem; margin: 0; }
.form-err:empty { display: none; }
.note { font-size: .85rem; color: var(--muted); margin: 0; }
.danger { color: var(--sell) !important; }
.btn-danger { background: var(--sell); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.plans { display: grid; gap: 10px; margin-bottom: 12px; }
.plan { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; }
.plan.is-current { border-color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan-head b { color: var(--ink); font-size: 1.02rem; }
.plan-price { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.plan p { margin: 0; font-size: .86rem; color: var(--muted); }
.kv { display: grid; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 12px; font-size: .9rem; }
.kv code { font-size: .95rem; letter-spacing: .08em; color: var(--ink); word-break: break-all; }
.legs { font-size: .85rem; color: var(--muted); margin: -4px 0 12px; }
.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sessions li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .85rem; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }

/* chat extras */
.msg .bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.deleted .bubble { font-style: italic; color: var(--muted); background: transparent; }
.msg .role { font-size: .65rem; font-weight: 700; color: var(--accent); margin-left: 4px; letter-spacing: .04em; }
.msg-btn { background: none; border: 0; padding: 0; text-align: inherit; color: inherit; font: inherit; display: block; max-width: 100%; }
.load-older { align-self: center; }

/* journal extras */
.j-actions { display: flex; gap: 8px; margin: -6px 0 16px; }
.j-actions .btn { flex: 1; }
.t-note { grid-column: 2 / span 2; font-size: .78rem; color: var(--body); font-style: italic; }

/* matrix extras */
.soon { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 3px 9px; border-radius: 99px; margin-bottom: 8px; }
.ch.is-disabled { opacity: .6; }

.onboard .note { text-align: center; }
.ob-legal { font-size: .8rem; color: var(--muted); text-align: center; }
.ob-legal a, .consent a { color: var(--accent); }
.code-input { letter-spacing: .4em; font-size: 1.3rem !important; text-align: center; }
.j-actions .btn { border: 1px solid var(--line); }
.insights li.empty { padding: 14px; }
.insights li.empty::before { display: none; }

/* ═══ Mindset (Jessica Kops) ═══ */
.tabs { grid-template-columns: repeat(6, 1fr); }
.tab { font-size: .66rem; }
.mind-head { margin: 4px 2px 14px; }
.mind-head h2 { font-size: 1.2rem; margin-bottom: 4px; }
.mind-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.mind-card h3 { font-size: 1rem; }
.mind-card p { margin: 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.day { display: inline-grid; justify-items: center; gap: 4px; font-size: .72rem; color: var(--muted); }
.day i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: block; }
.day.kept i { background: var(--accent); border-color: var(--accent); }
.day.slipped i { background: transparent; border-color: var(--sell); }
.day.future i { border-style: dashed; opacity: .5; }
.legend-dots { font-size: .76rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend-dots .day { display: inline-flex; } .legend-dots .day i { width: 12px; height: 12px; }
.pause-q { font-size: 1.15rem; margin: 6px 0 4px; }
.daychips { display: flex; gap: 6px; flex-wrap: wrap; }
.daychips label { display: inline-flex; }
.daychips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.daychips span { border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; font-size: .82rem; cursor: pointer; }
.daychips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.daychips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mind-card .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.mind-card .field input { width: 100%; }
.compound { font-weight: 600; color: var(--ink); }
.reset { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 6px 0 4px; }
.breath { width: 160px; height: 160px; display: grid; place-items: center; }
.breath span { width: 70px; height: 70px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 35%, transparent); box-shadow: 0 0 40px color-mix(in oklab, var(--accent) 45%, transparent);
  animation: breathe 10s ease-in-out infinite; }
/* in ~4 s, out ~6 s — the coach asks for no breath holds */
@keyframes breathe { 0% { transform: scale(1); } 40% { transform: scale(2.1); } 100% { transform: scale(1); } }
.breath-label { font-weight: 600; color: var(--ink); min-height: 1.5em; }
.reset-steps { text-align: left; margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }
.reset-left { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .breath span { animation: none; transform: scale(1.6); } }

/* ═══ Mindset phase 2: Pause button, check-ins, tool library, weekly report ═══ */
.mind-now { display: grid; gap: 12px; margin-bottom: 12px; }
.pausebtn { display: grid; gap: 4px; text-align: left; width: 100%; border: 0; border-radius: var(--r); padding: 20px 18px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); transition: transform .2s var(--ease); }
.pausebtn b { font: 400 1.25rem/1 "Michroma", sans-serif; letter-spacing: .04em; }
.pausebtn span { font-size: .9rem; opacity: .9; }
.pausebtn:active { transform: scale(.985); }
.cooling { display: grid; gap: 4px; border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; font-size: .88rem; color: var(--body);
  background: color-mix(in oklab, var(--accent) 10%, var(--surface)); }
.cooling b { color: var(--ink); }
.checkin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 14px; }
.checkin summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--ink); font-weight: 600; }
.checkin form { margin-bottom: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips label { display: inline-flex; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span, .chips .chip { border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; font-size: .84rem; cursor: pointer; color: var(--body); background: var(--surface); min-height: 0; }
.chips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.moods { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.moods legend { font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0; }
.moods label { display: block; }
.moods input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.moods span { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 2px; font-size: .7rem; color: var(--muted); cursor: pointer; min-height: 52px; }
.moods span b { font-size: 1rem; color: var(--ink); }
.moods input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.moods input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tooltabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.tooltabs button { border: 0; background: none; color: var(--muted); min-height: 40px; border-radius: 9px; font-size: .85rem; font-weight: 600; }
.tooltabs [aria-selected="true"] { background: var(--surface); color: var(--ink); }
.toolrun { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 4px 0; }
.tooltext { color: var(--ink); line-height: 1.5; max-width: 34ch; }
.coolpick { display: flex; gap: 6px; flex-wrap: wrap; }
.coolpick label { display: inline-flex; }
.coolpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.coolpick span { border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: .85rem; cursor: pointer; }
.coolpick input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.focus { display: grid; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; color: var(--ink); font-weight: 600; margin: 0; }
.focus .note { font-weight: 400; }
.liblist { display: grid; gap: 8px; }
.libitem { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--body); font-size: .82rem; cursor: pointer; }
.libitem b { color: var(--ink); font-size: .95rem; }
.toolcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.toolcard h4 { margin: 0 0 4px; color: var(--accent); font-size: .8rem; letter-spacing: .04em; }
.toolcard p { margin: 0; color: var(--body); font-size: .9rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .pausebtn { transition: none; } }
