:root {
  --bg: #06100b; --panel: #0a1510; --card: #112019;
  /* Translucent edges read as depth on the gradient background instead of
     hard outlines; the strong variant is for hover/focus. */
  --border: rgba(255,255,255,0.07); --border-strong: rgba(255,255,255,0.14);
  --edge: inset 0 1px 0 rgba(255,255,255,0.04);
  /* Contrast on --card (#112019): muted ≈ 8:1, faint ≈ 4.7:1 (WCAG AA). */
  --text: #ffffff; --muted: #a9b5ae; --faint: #7d8b83;
  --field: rgba(255,255,255,0.05); --field-hover: rgba(255,255,255,0.08); --field-border: rgba(255,255,255,0.09);
  --accent: #3dd68c; --accent-ink: #06100b; --accent-glow: rgba(61,214,140,0.45);
  --green: #3dd68c; --red: #f0565c; --red-glow: rgba(240,86,92,0.35);
  --star: #fbbf24;
  /* Consistent rounding scale — small controls go fully round (pill/circle),
     larger containers get a generous but bounded radius. */
  --r-full: 999px; --r-xl: 24px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  /* Built-in CSS easings are too weak to feel intentional. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
* { box-sizing: border-box; }
/* Scrollbar: thin, no track, just a faint thumb. */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border: 2px solid transparent; border-radius: 99px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.16); }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-track { margin: 12px 0; }
html::-webkit-scrollbar-track { margin: 0; }
/* Page scrollbar: dark canvas behind it (a transparent track would otherwise
   show the light default), filled with the page color so no band shows. */
:root { color-scheme: dark; }
html::-webkit-scrollbar-track, html::-webkit-scrollbar-corner { background: #06100b; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; } }
/* Page background lives on <html> so it covers the whole canvas (no hard
   edge below the first screen) and sits behind the page scrollbar too. */
html {
  background:
    radial-gradient(1500px 900px at 15% -10%, rgba(61,214,140,0.11), transparent 62%),
    radial-gradient(1100px 700px at 100% 0%, rgba(61,214,140,0.07), transparent 58%),
    linear-gradient(160deg, #0a1811 0%, #06100b 55%, #040b07 100%);
  background-attachment: fixed;
}
html, body { height: 100%; }
body {
  margin: 0; color: var(--text);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font-family: inherit; }
::selection { background: rgba(61,214,140,0.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* Soft glow that follows the cursor — pure light (screen blend), so it
   brightens instead of ever obscuring text underneath. Moved with a
   transform on its own element: a CSS variable on :root would restyle the
   whole document on every mouse move. */
#cursorGlow {
  position: fixed; top: 0; left: 0; width: 720px; height: 720px; margin: -360px 0 0 -360px;
  pointer-events: none; z-index: 5; border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(61,214,140,0.06), transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 400ms ease; will-change: transform;
}
#cursorGlow.on { opacity: 1; }
#cursorGlow { display: none; } /* the soft glow is off; cards still light up their edges on hover */
@media (hover: none) { #cursorGlow { display: none; } }

#loadingBar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2000; opacity: 0; transform: scaleX(0); transform-origin: left;
  transition: transform 600ms var(--ease-out), opacity 300ms ease;
}

@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/geist-latin.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/geistmono-latin.woff2) format("woff2"); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr 260px; min-height: 100vh; }
@media (max-width: 1140px) { .shell { grid-template-columns: 248px 1fr; } .rightPanel { display: none; } }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar .navGroup { flex: 1; }
  nav#pageNav { flex-direction: row; }
  .sidebar .sidebarFooter { display: none; }
  .brand { margin-bottom: 0; margin-right: 16px; }
  .navLabel { display: none; }
}

/* ---------- Sidebar ---------- */
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 26px 16px; display: flex; flex-direction: column; }
.brand { font-weight: 800; font-size: 17px; margin: 4px 8px 30px; letter-spacing: -.02em; }
.brand img { display: block; height: 22px; width: auto; }
.navLabel { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; margin: 0 12px 10px; }
nav#pageNav { display: flex; flex-direction: column; gap: 4px; }
.navItem {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out);
}
.navItem svg { flex-shrink: 0; opacity: .8; width: 18px; height: 18px; transition: transform 250ms var(--ease-out); }
.navItem:active { transform: scale(0.98); }
.navItem.active { color: var(--text); background: #1a2b22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.45); }
.navItem.active svg { opacity: 1; color: var(--accent); }

.sidebarFooter { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border); }
.connStatus { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.connStatus .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; transition: background-color 300ms ease, box-shadow 300ms ease; }
.connStatus .dot.ok { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.connStatus .dot.err { background: var(--red); }
.projId { color: var(--faint); font-size: 10.5px; margin-top: 4px; word-break: break-all; }

/* ---------- Main ---------- */
.main { padding: 26px 30px 60px; min-width: 0; background: radial-gradient(1600px 750px at 0% -10%, rgba(61,214,140,0.10), transparent 62%); }
.topRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.pageTitle { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.configHint { color: #fbbf24; font-size: 11.5px; margin-top: 4px; }
.topActions { display: flex; align-items: center; gap: 8px; }

/* Page switch — translate only, never scale: the charts measure their
   rendered box to set their viewBox, and a scale would skew that. */
.pageView { animation: pageIn 220ms var(--ease-out); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes fadeIn { from { opacity: 0; } }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-full); padding: 3px; box-shadow: var(--edge); }
.tab {
  color: var(--muted); padding: 6px 14px; border-radius: var(--r-full); cursor: pointer; font-size: 12px; font-weight: 600; user-select: none;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out);
}
.tab:active { transform: scale(0.96); }
.tab.active { color: var(--text); background: #1a2b22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.45); }

.iconBtn, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 7px 14px; border-radius: var(--r-full); cursor: pointer; font-size: 12px; font-weight: 600; user-select: none;
  box-shadow: var(--edge);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease, opacity 150ms ease, transform 160ms var(--ease-out);
}
.iconBtn { padding: 7px 10px; color: var(--text); opacity: .75; }
.btn:active, .iconBtn:active { transform: scale(0.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:disabled:active { transform: none; }
.iconBtn.spinning { opacity: 1; }
.iconBtn.spinning svg { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconBtn.dictating, .jcDictate.dictating { background: rgba(240,86,92,0.14); border-color: var(--red); color: var(--red); opacity: 1; animation: dictatePulse 1.1s ease-in-out infinite; }
@keyframes dictatePulse { 0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); } 50% { box-shadow: 0 0 0 6px transparent; } }

#periodTabs { margin-bottom: 20px; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 18px; }
.heroLabel { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.heroValue { font-family: "Geist Mono", ui-monospace, monospace; font-size: 40px; font-weight: 800; line-height: 1.15; margin-top: 4px; letter-spacing: -.025em; }
.heroValue.up { text-shadow: 0 0 26px var(--accent-glow); }
.heroValue.down { text-shadow: 0 0 26px var(--red-glow); }
.heroSub { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.heroSub b { font-weight: 700; }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--text); }

/* ---------- Stat grid ---------- */
.statGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 20px; }
.statTile { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 13px; box-shadow: var(--edge); }
.statTile .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.statTile .v { font-weight: 800; font-size: 16px; margin-top: 5px; letter-spacing: -.01em; }

/* ---------- Charts ---------- */
.chartCard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-bottom: 20px; position: relative; box-shadow: var(--edge); }
.chartHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.chartHead .label { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.chartHead .val { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); }
.chartEmpty { color: var(--faint); text-align: center; padding: 30px 0; font-size: 12px; }
#equitySvg { width: 100%; height: 100px; display: block; cursor: crosshair; }
#dailySvg { width: 100%; height: 90px; display: block; }
.chartTooltip {
  position: absolute; top: 44px; transform: translateX(-50%); pointer-events: none;
  background: #14241c; border: 1px solid var(--border-strong); border-radius: 10px; padding: 7px 11px;
  font-size: 11px; white-space: nowrap; opacity: 0; transition: opacity 120ms ease; z-index: 5;
  box-shadow: var(--edge), 0 8px 20px rgba(0,0,0,0.45);
}
.chartTooltip.visible { opacity: 1; }
.chartTooltip .tt-date { color: var(--muted); font-size: 10px; }
.chartTooltip .tt-val { font-weight: 700; margin-top: 2px; }
.chartTooltip .tt-sub { color: var(--muted); font-size: 10px; margin-top: 3px; }
#dailySvg rect.pos, #dailySvg rect.neg { transition: opacity 150ms ease; }
#dailySvg rect.dim { opacity: 0.35; }
#dailyTooltip { transform: none; }
/* First load: a soft skeleton instead of an empty-state flash. */
#page-dashboard.isLoading .chartsRow .chartCard svg, #page-dashboard.isLoading .chartsRow .chartEmpty { visibility: hidden; }
#page-dashboard.isLoading .chartsRow .chartCard::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 18px; height: 60px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.025) 100%);
  background-size: 200% 100%; animation: skeleton 1.3s linear infinite;
}
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #page-dashboard.isLoading .chartsRow .chartCard::after { animation: none; } }
.appFoot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11.5px;
}
.appFoot nav { display: flex; gap: 16px; }
.appFoot a { color: var(--muted); text-decoration: none; transition: color 150ms ease; }
.appFoot a:hover { color: var(--text); }
.emoBtn {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 10px; border-radius: 999px;
  border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.emoBtn svg { opacity: .6; transition: transform 200ms var(--ease-out); }
.emoBtn.set { border-style: solid; border-color: var(--border-strong); background: var(--panel); color: var(--text); }
.emoBtn:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }
.emoE { font-size: 13px; line-height: 1; }
.emoMenu {
  position: fixed; z-index: 3000; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; min-width: 260px;
  background: #10211a; border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--edge), 0 18px 40px rgba(0,0,0,0.55); animation: emoIn 160ms var(--ease-out);
}
@keyframes emoIn { from { opacity: 0; transform: scale(0.96); } }
.emoMenu button {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 120ms ease;
}
.emoMenu button:hover, .emoMenu button:focus-visible { background: rgba(255,255,255,0.06); outline: none; }
.emoMenu button:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.emoMenu button.on { background: rgba(61,214,140,0.12); color: var(--accent); }
.emoMenu button.clear { grid-column: 1 / -1; justify-content: center; color: var(--muted); border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 2px; }
.confirmOverlay {
  position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 16px;
  background: rgba(2,6,4,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: cfFade 160ms ease-out;
}
.confirmOverlay.closing { animation: cfFade 160ms ease-in reverse forwards; }
@keyframes cfFade { from { opacity: 0; } }
.confirmCard {
  width: min(360px, 100%); padding: 22px; text-align: center; background: var(--card); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); box-shadow: var(--edge), 0 24px 60px rgba(0,0,0,0.55); animation: cfIn 220ms var(--ease-out);
}
@keyframes cfIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } }
.cfIcon { width: 42px; height: 42px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--text); }
.cfIcon.danger { background: rgba(240,86,92,0.12); color: var(--red); }
.cfIcon svg { width: 18px; height: 18px; }
.confirmCard h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.confirmCard p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.confirmCard .cfNote { margin-top: 6px; color: var(--faint); font-size: 12px; }
.cfActions { display: flex; gap: 8px; margin-top: 18px; }
.cfActions .btn { flex: 1; justify-content: center; padding: 10px 0; font-size: 13px; }
.platIcon { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; vertical-align: -2px; opacity: .9; }
.chartsRow { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 860px) { .chartsRow { grid-template-columns: 1fr; } }

/* ---------- Coach chat ---------- */
#aiCard {
  margin-bottom: 0; border-color: rgba(61,214,140,0.32);
  background: linear-gradient(180deg, rgba(61,214,140,0.07), transparent 140px), var(--card);
  box-shadow: var(--edge), 0 0 0 1px rgba(61,214,140,0.06), 0 18px 48px rgba(61,214,140,0.07);
}
#aiCard > .chartHead { margin-bottom: 14px; }
#aiCard .coachLabel { gap: 10px; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; }
#aiCard .coachSub { font-size: 14px; }
#aiCard .coachLabel .coachFace { width: 30px; }
.chatHeadActions { display: flex; align-items: center; gap: 8px; }
.chatModel { color: var(--faint); font-size: 10.5px; }
.chatMemory {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin: 4px 0 8px;
  font-size: 12px; color: var(--muted); line-height: 1.6; white-space: pre-wrap; animation: msgIn 220ms var(--ease-out);
}
.chatMemory b { color: var(--text); }
.chatLog {
  height: 400px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px;
  padding: 8px 4px 12px; margin: 2px 0 10px;
}
.chatEmpty { margin: auto; max-width: 440px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.chatEmpty b { color: var(--text); }
/* Empty chat: one insight + quick prompts, so the first move is a click. */
.chatStart { margin: auto; width: min(500px, 100%); max-width: none; text-align: left; font-size: 13px; display: flex; flex-direction: column; gap: 16px; animation: msgIn 260ms var(--ease-out); }
.csInsight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid rgba(61,214,140,0.28); background: linear-gradient(135deg, rgba(61,214,140,0.11), rgba(61,214,140,0.02)); box-shadow: var(--edge); }
.csInsight.alert { border-color: rgba(240,86,92,0.4); background: linear-gradient(135deg, rgba(240,86,92,0.12), rgba(240,86,92,0.02)); }
.csInsight.alert .mcAvatar { background: var(--red); color: #fff; }
.csInsight .mcAvatar { margin-top: 1px; }
.csTag { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.csInsight.alert .csTag { color: var(--red); }
.csInsight p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.csLabel { text-align: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.csChips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.csChip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 15px; border-radius: var(--r-full);
  background: var(--field); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.csChip span { color: var(--accent); }
.csChip:hover { border-color: rgba(61,214,140,0.5); background: rgba(61,214,140,0.08); transform: translateY(-1px); }
.csChip:active { transform: scale(0.97); }
.chatEmpty code { font-size: 11.5px; color: var(--accent); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.chatMore { align-self: center; color: var(--faint); font-size: 11px; }
.msg {
  max-width: 82%; padding: 9px 13px 7px; border-radius: 16px; font-size: 13px; line-height: 1.55;
  overflow-wrap: anywhere; animation: msgIn 260ms var(--ease-out);
}
.msg.user {
  align-self: flex-end; white-space: pre-wrap; border-bottom-right-radius: 6px;
  background: rgba(61,214,140,0.12); border: 1px solid rgba(61,214,140,0.25);
}
.msg.model { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--edge); }
.msg.model h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin: 12px 0 5px; }
.msg.model h4:first-child { margin-top: 2px; }
.msg.model p { margin: 0 0 8px; }
.msg.model ul { margin: 0 0 8px; padding-left: 18px; }
.msg.model li { margin-bottom: 4px; }
.msgTime { color: var(--faint); font-size: 10px; margin-top: 3px; text-align: right; white-space: normal; }
.msg.model .msgTime { text-align: left; }
.msg.pending {
  align-self: center; max-width: 92%; text-align: center; font-size: 12px; color: var(--red);
  background: rgba(240,86,92,0.08); border: 1px solid rgba(240,86,92,0.3); padding: 9px 13px;
}
.msg.pending .btn { margin-top: 8px; padding: 6px 14px; }
.typing {
  align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 16px; border-bottom-left-radius: 6px;
  background: var(--panel); border: 1px solid var(--border); animation: msgIn 200ms var(--ease-out);
}
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typingDot 1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.chatInputRow {
  display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--edge);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.chatInputRow:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#chatInput {
  flex: 1; min-width: 0; resize: none; background: transparent; border: none; outline: none; color: var(--text);
  font-family: inherit; font-size: 13px; line-height: 1.5; padding: 7px 0; max-height: 140px;
}
#chatInput::placeholder { color: var(--faint); }
.btn.chatSend { width: 34px; height: 34px; padding: 0; flex-shrink: 0; background: #fff; color: var(--accent-ink); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 14px rgba(0,0,0,0.3); }
.btn.chatSend:disabled { background: var(--card); color: var(--muted); box-shadow: none; }
#chatDictate { align-self: center; }
@media (pointer: coarse) { #chatInput { font-size: 16px; } }

/* ---------- Filter row ---------- */
.filterRow { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filterRow .searchBox { flex: 1 1 200px; }

/* ---------- Waitlist admin ---------- */
.wlTools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wlTools .searchBox { width: 240px; }
.wlTable { max-height: 440px; overflow: auto; margin: 4px -4px 0; }
.wlTr { display: grid; grid-template-columns: 34px minmax(0, 2.2fr) minmax(0, 1.2fr) 110px 120px 40px; align-items: center; gap: 8px; padding: 9px 8px; border-top: 1px solid var(--border); font-size: 13px; }
.wlTr.sel { background: rgba(61,214,140,0.06); }
.wlTh { position: sticky; top: 0; z-index: 1; border-top: 0; background: var(--card); color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wlTr input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.wlEmail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; }
.wlEmail small { margin-left: 6px; color: var(--faint); }
.wlSrc { display: flex; flex-wrap: wrap; gap: 4px; }
.wlSrc span { padding: 2px 8px; border-radius: 999px; font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); }
.wlDate { color: var(--muted); font-size: 12px; }
.wlBadge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.wlBadge.ok { color: var(--accent); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.3); }
.wlBadge.off { color: var(--faint); background: var(--panel); border: 1px solid var(--border); }
.wlEmpty { padding: 34px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.wlEmpty.small { padding: 18px 12px; }
.wlPresets { display: flex; gap: 6px; flex-wrap: wrap; }
.wlCompose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; margin-top: 6px; }
.wlFields { display: grid; gap: 12px; align-content: start; }
.wlF { display: grid; gap: 6px; }
.wlF > span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.wlF > span small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); margin-left: 6px; }
.wlF .input { width: 100%; background: var(--field); border: 1px solid var(--field-border); color: var(--text); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 13.5px; }
.wlF textarea.input { resize: vertical; line-height: 1.55; min-height: 160px; }
.wlF .input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wlRow2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.wlAudience { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--border); font-size: 13px; }
.wlAudience label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.wlAudience input { accent-color: var(--accent); }
.wlAudience b { font-family: "Geist Mono", ui-monospace, monospace; color: var(--accent); }
.wlActions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.wlActions .btn { padding: 10px 18px; font-size: 13px; }
.wlNote { margin: 0; min-height: 18px; font-size: 12.5px; color: var(--muted); text-align: right; }
.wlNote.ok { color: var(--accent); }
.wlNote.err { color: var(--red); }
.wlPreview { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--panel); overflow: hidden; }
.wlPrevHead { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wlPrevHead .tabs { font-size: 11px; text-transform: none; letter-spacing: 0; }
.wlFrameWrap { position: relative; flex: 1; min-height: 620px; background: #eef2f0; display: flex; justify-content: center; }
#wlPreview { width: 100%; height: 100%; min-height: 620px; border: 0; background: #eef2f0; transition: width 300ms var(--ease-out); }
#wlPreview.mobile { width: 375px; max-width: 100%; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.wlFrameMsg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #5b6b63; font-size: 13px; background: #eef2f0; }
.wlFrameMsg[hidden] { display: none; }
.wlHist { display: grid; }
.wlHr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); font-size: 13px; }
.wlHr:first-child { border-top: 0; }
.wlHr b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlHr span { color: var(--muted); font-size: 12px; }
@media (max-width: 1500px) { .wlCompose { grid-template-columns: 1fr; } }
html.mobile .wlTools { width: 100%; }
html.mobile .wlTools .searchBox { flex: 1; width: auto; }
html.mobile .wlTr { grid-template-columns: 28px minmax(0, 1fr) 84px 32px; }
html.mobile .wlTr > :nth-child(3), html.mobile .wlTr > :nth-child(5) { display: none; }
html.mobile .wlRow2 { grid-template-columns: 1fr; }
html.mobile .wlHr { grid-template-columns: 1fr; gap: 2px; }

/* ---------- Journal sort + filters ---------- */
.jTools { display: flex; gap: 8px; margin-left: auto; }
.jToolBtn { gap: 7px; padding: 8px 13px; }
.jToolBtn svg { opacity: .75; }
.jToolBtn[aria-expanded="true"] { border-color: rgba(61,214,140,0.45); color: var(--accent); }
.jCount { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; }
.jCount[hidden] { display: none; }
.jChips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.jChips:empty { display: none; }
.jMeta { color: var(--muted); font-size: 12px; margin-right: 4px; }
.jChip {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 8px 0 11px; border-radius: 999px; cursor: pointer;
  background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.3); color: var(--text); font: inherit; font-size: 12px; font-weight: 600;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.jChip .x { font-size: 14px; line-height: 1; opacity: .55; transition: opacity 150ms ease; }
.jChip:hover { background: rgba(61,214,140,0.16); }
.jChip:hover .x { opacity: 1; }
.jClear { background: none; border: 0; padding: 4px 2px; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.jClear:hover { color: var(--text); }
.jPop {
  position: fixed; z-index: 3000; padding: 6px; background: #10211a; border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--edge), 0 18px 40px rgba(0,0,0,0.55); animation: emoIn 160ms var(--ease-out);
}
.jPop.sort { min-width: 210px; display: grid; gap: 2px; }
.jPop.sort button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 120ms ease;
}
.jPop.sort button:hover, .jPop.sort button:focus-visible { background: rgba(255,255,255,0.06); outline: none; }
.jPop.sort button:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.jPop.sort button.on { color: var(--accent); background: rgba(61,214,140,0.1); }
.jPop.filter { width: 360px; max-width: calc(100vw - 16px); padding: 16px; max-height: min(72vh, 600px); overflow: auto; }
.fSec + .fSec { margin-top: 16px; }
.fSec h4 { margin: 0 0 8px; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.fPills { display: flex; flex-wrap: wrap; gap: 6px; }
.fPill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.fPill:hover { color: var(--text); border-color: var(--border-strong); }
.fPill:active { transform: scale(0.96); }
.fPill.on { color: var(--accent); background: rgba(61,214,140,0.12); border-color: rgba(61,214,140,0.4); }
.fFoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.fFoot .btn { padding: 9px 16px; }
html.mobile .jTools { margin-left: 0; width: 100%; }
html.mobile .jToolBtn { flex: 1; justify-content: center; }
html.mobile .jPop.filter {
  left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; max-height: 82vh; max-height: 82dvh;
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.searchBox { position: relative; max-width: 280px; }
.searchBox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchBox input {
  width: 100%; background: var(--field); border: 1px solid var(--field-border); color: var(--text);
  border-radius: var(--r-full); padding: 8px 10px 8px 31px; font-size: 12.5px; font-family: inherit;
  box-shadow: var(--edge); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.searchBox input::placeholder { color: var(--faint); }
.searchBox input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Journal (card list) ---------- */
.journalList { display: flex; flex-direction: column; gap: 6px; }
/* Marked trade: yellow, so it stands out in the list (hover included). */
.journalCard.marked, .journalCard.marked:hover { border-color: rgba(251,191,36,0.55); background: linear-gradient(90deg, rgba(251,191,36,0.12), transparent 70%), var(--card); }
.journalCard.marked:hover { border-color: rgba(251,191,36,0.8); background: linear-gradient(90deg, rgba(251,191,36,0.17), transparent 70%), #15261d; }
/* Notifications: bell, "What's new" panel, composer */
.iconBtn.bellBtn { position: relative; overflow: visible; }
.bellDot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 800 10px/17px "Geist Mono", ui-monospace, monospace; text-align: center; box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--accent-glow); }
.bellDot[hidden] { display: none; }
.notifCard { width: min(620px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; }
.notifList { overflow: auto; display: grid; gap: 12px; padding-right: 2px; }
.notifItem { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); }
.notifItem.unread { border-color: rgba(61,214,140,0.4); }
.notifMeta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11.5px; }
.notifVer { padding: 1px 8px; border-radius: 99px; border: 1px solid rgba(61,214,140,0.35); color: var(--accent); font: 700 10.5px "Geist Mono", ui-monospace, monospace; }
.notifNew { margin-left: auto; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.notifItem h3 { margin: 8px 0 6px; font-size: 15.5px; letter-spacing: -0.01em; }
.notifBody { color: var(--muted); font-size: 13px; line-height: 1.55; }
.notifBody p { margin: 0 0 8px; }
.notifBody ul { margin: 0 0 8px; padding-left: 18px; }
.notifBody li { margin-bottom: 3px; }
.notifBody strong { color: var(--text); }
.notifImgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 10px; }
.notifImgs img { display: block; width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }
.anForm { display: grid; gap: 8px; }
.anRow { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 8px; }
.anForm textarea { resize: vertical; font: inherit; line-height: 1.5; padding: 10px 12px; }
.anActions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
@media (max-width: 720px) { .anRow { grid-template-columns: 1fr; } }

/* Waitlist page: testers */
.tsForm { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin: 4px 0 10px; }
.tsInternal { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tsLink { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.tsLink code { color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.tsRows { display: grid; gap: 6px; margin-top: 6px; }
.tsRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); }
.tsMail { font-weight: 600; overflow-wrap: anywhere; }
.tsMeta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tsTag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(251,191,36,0.14); color: var(--star); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 720px) { .tsForm { grid-template-columns: 1fr; } .tsRow { grid-template-columns: 1fr; } }
.markedHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panelLink { border: 0; background: none; padding: 0; color: var(--accent); font: 600 11.5px inherit; cursor: pointer; }
.panelLink:hover { text-decoration: underline; }
button.recentRow { width: 100%; border: 1px solid transparent; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.recentRow.markedRow { border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.05); }
.recentRow.markedRow + .recentRow.markedRow { margin-top: 6px; }
.recentRow.markedRow:hover { border-color: rgba(251,191,36,0.75); background: rgba(251,191,36,0.09); }
.bwOpen { cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.bwOpen:hover { border-color: var(--border-strong); }
.bwOpen:focus-visible, button.recentRow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.recentEmpty svg { width: 12px; height: 12px; vertical-align: -1px; color: var(--star); }
.fPill svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.jcMark {
  display: grid; place-items: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; flex-shrink: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.jcMark svg { width: 14px; height: 14px; }
.jcMark:hover { color: var(--text); background: var(--field-hover); }
.jcMark[aria-pressed="true"] { color: var(--star); }
.jcMark[aria-pressed="true"] svg { fill: currentColor; }
.jcMark:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* "Flex" (share card) buttons: journal cards, best / worst cards, panel rows. */
.flexMini {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 99px; background: transparent; color: var(--muted);
  font: 700 11px/1 inherit; cursor: pointer; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.flexMini:hover { color: var(--text); border-color: rgba(61,214,140,0.45); background: rgba(61,214,140,0.08); }
.flexMini:focus-visible, .rFlex:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bwLinks { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.bwLinks .flexMini { height: 22px; padding: 0 8px; font-size: 10.5px; }
.rRow { display: flex; align-items: center; gap: 2px; }
.rRow .recentRow { flex: 1; min-width: 0; }
.recentList:has(.markedRow) { gap: 6px; }
.rFlex { height: 22px; padding: 0 8px; font-size: 10.5px; margin-left: 4px; opacity: .6; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, opacity 150ms ease; }
.rRow:hover .rFlex, .rFlex:focus-visible { opacity: 1; }
.journalCard {
  display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 9px 14px; cursor: pointer; box-shadow: var(--edge);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 250ms var(--ease-out), transform 250ms var(--ease-out);
}
.jcAvatar .avatar { width: 40px; height: 40px; border-radius: var(--r-sm); font-size: 13px; box-shadow: 0 0 0 1px var(--border); }
.jcMain { flex: 1; min-width: 0; }
.jcTop { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.jcTop a.tok { font-size: 14.5px; letter-spacing: -.01em; }
.jcMeta { color: var(--muted); font-size: 11.5px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcStats { display: flex; gap: 14px; flex-shrink: 0; }
.jcStat { text-align: right; min-width: 64px; }
.jcStat .v .pct { font-size: 11px; opacity: .7; }
.jcStat .k { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.jcStat .v { font-weight: 700; font-size: 14px; margin-top: 3px; white-space: nowrap; }
.emotionSelect {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 3px 8px; font-size: 11px; font-family: inherit; cursor: pointer;
  transition: border-color 150ms ease;
}
.emotionSelect:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* Stars render 5→1 in the DOM; row-reverse flips them back to 1→5 on
   screen so the `~` sibling selector can light up "this one and every
   star before it" on hover without any JS. */
.starRow { display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 2px; vertical-align: middle; }
.starBtn { background: none; border: none; padding: 0; cursor: pointer; color: var(--faint); line-height: 0; transition: color 100ms ease, transform 160ms var(--ease-out); }
.starBtn svg { width: 100%; height: 100%; display: block; }
.starBtn.filled { color: var(--star); }
.starBtn:active { transform: scale(0.88); }

.avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #06100b; flex-shrink: 0; object-fit: cover; background: var(--panel); transition: transform 250ms var(--ease-out); }
a.tok { color: var(--text); text-decoration: none; font-weight: 700; transition: color 100ms ease; }

.barTrack { width: 64px; height: 5px; border-radius: 999px; background: var(--panel); overflow: hidden; margin: 4px 0 0 auto; }
.barFill { height: 100%; background: var(--accent); border-radius: 999px; box-shadow: 0 0 6px var(--accent-glow); }

.notesRow { display: flex; align-items: center; gap: 2px; }
.notes {
  flex: 1; min-width: 0; background: var(--field); border: 1px solid var(--field-border); color: var(--text);
  font-family: inherit; font-size: 12.5px; padding: 4px 9px; border-radius: var(--r-sm);
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}
.notes::placeholder { color: var(--faint); }
.notes:focus { background: var(--panel); outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.notes.saving { opacity: .5; }
.jcDictate {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); opacity: .5; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 6px 7px; border-radius: var(--r-full); flex-shrink: 0;
  transition: opacity 150ms ease, color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.jcDictate:active { transform: scale(0.9); }
.empty { color: var(--muted); text-align: center; padding: 40px; }
.err { color: var(--red); background: rgba(240,86,92,0.08); border: 1px solid rgba(240,86,92,0.25); border-radius: var(--r-md); padding: 12px 14px; margin-top: 16px; font-size: 12.5px; }

/* ---------- Calendar ---------- */
.calHeader { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.calHeader .calFlex { margin-left: auto; gap: 7px; }
/* Month PnL bar (won vs lost) */
.calBar { margin: -4px 0 18px; }
.cbTotal { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.cbTotal b { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 700; }
.cbTrack { position: relative; display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--red); }
.cbWin { display: block; height: 100%; background: var(--green); border-radius: 99px 0 0 99px; box-shadow: 0 0 10px rgba(61,214,140,0.35); transition: width 400ms var(--ease-out); }
.cbLegend { display: flex; justify-content: space-between; margin-top: 6px; font: 700 12.5px "Geist Mono", ui-monospace, monospace; }
.cbLegend .up { color: var(--green); } .cbLegend .down { color: var(--red); }
#calTitle { font-weight: 700; font-size: 14px; min-width: 150px; text-align: center; text-transform: capitalize; }
.calGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calDow { text-align: center; color: var(--faint); font-size: 10px; text-transform: uppercase; padding-bottom: 6px; }
.calCell {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); min-height: 68px; padding: 7px;
  box-shadow: var(--edge); transition: border-color 150ms ease, box-shadow 250ms var(--ease-out), transform 220ms var(--ease-out);
}
.calCell.hasTrades { cursor: pointer; user-select: none; }
.calCell.hasTrades:active { transform: scale(0.97); }
/* Out-of-month days: no content, but the grid stays readable. */
.calCell.dim { opacity: .6; background: transparent; border: 1px dashed rgba(255,255,255,0.12); box-shadow: none; }
.calCell .day { font-size: 11px; color: var(--muted); }
.calCell .pnl { font-size: 12px; font-weight: 700; margin-top: 10px; }
.calCell .cnt { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.calCell.upCell { background: rgba(61,214,140,0.08); border-color: rgba(61,214,140,0.25); }
.calCell.downCell { background: rgba(240,86,92,0.08); border-color: rgba(240,86,92,0.25); }

/* ---------- Right panel ---------- */
.rightPanel { background: var(--panel); border-left: 1px solid var(--border); padding: 24px 18px; }
.panelHead { color: var(--text); font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.bwGrid { display: flex; flex-direction: column; gap: 10px; }
.bwCard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 13px; box-shadow: var(--edge); }
.bwCard .top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.bwCard .lbl { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.bwTicker { font-weight: 700; font-size: 12.5px; margin-top: 2px; }
.bwCard .v { font-size: 16px; font-weight: 800; margin-top: 2px; letter-spacing: -.01em; }
.bwCard a { font-size: 11px; color: var(--accent); text-decoration: none; font-weight: 700; }

.recentList { display: flex; flex-direction: column; gap: 2px; }
.recentRow { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-radius: var(--r-md); text-decoration: none; transition: background-color 120ms ease, transform 220ms var(--ease-out); }
.recentRow .avatar { width: 28px; height: 28px; font-size: 10px; }
.recentRow .info { flex: 1; min-width: 0; }
.recentRow .tokName { font-weight: 600; font-size: 12px; color: var(--text); }
.recentRow .tokDate { font-size: 10.5px; color: var(--faint); }
.recentRow .pnl { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.recentEmpty { color: var(--faint); font-size: 12px; padding: 10px 4px; }

/* ---------- Modal ----------
   Enter: backdrop fades, card rises from 0.96 (never from 0) via
   @starting-style, which fires when JS flips display:none → flex.
   Exit stays instant — the system responding should be fast. Modals
   keep a centered transform-origin: they aren't anchored to a trigger. */
.modalOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
  transition: opacity 200ms var(--ease-out);
}
.modalCard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px;
  width: min(760px, 100%); max-height: 82vh; max-height: 82dvh; overflow: auto;
  box-shadow: var(--edge), 0 24px 48px rgba(0,0,0,0.5);
  transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out);
}
@starting-style {
  .modalOverlay { opacity: 0; }
  .modalCard { opacity: 0; transform: scale(0.96) translateY(6px); }
}
.modalHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modalHead .title { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.modalHead button {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); font-size: 16px; cursor: pointer;
  padding: 7px; border-radius: var(--r-full);
  transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.modalHead button:active { transform: scale(0.9); }

/* ---------- Trade detail modal ---------- */
.tdHead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatarLg .avatar { width: 44px; height: 44px; border-radius: var(--r-md); font-size: 15px; box-shadow: 0 0 0 1px var(--border); }
.tdName { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.tdSub { color: var(--muted); font-size: 10.5px; font-weight: 500; margin-left: 4px; }
.tdLink { font-size: 11.5px; color: var(--accent); text-decoration: none; font-weight: 700; }
#tradeModal .modalCard { padding: 22px 24px; }
.tdGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
@media (max-width: 560px) { .tdGrid { grid-template-columns: 1fr 1fr; } }
.tdStat { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 13px; }
/* "?" hint: hover or focus shows a short explanation over the stat card. */
.hint {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 3px; padding: 0; vertical-align: -3px;
  border: 0; border-radius: 50%; background: transparent; color: var(--faint);
  text-transform: none; letter-spacing: 0; cursor: help; transition: color 150ms ease;
}
.hint > svg { width: 14px; height: 14px; }
.hint:hover, .hint:focus-visible { color: var(--accent); }
.hint:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hintBox {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 5; min-width: 180px;
  padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: #0d1a13; box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  color: var(--text); font: 500 11.5px/1.45 inherit; text-align: left; text-transform: none; letter-spacing: 0; white-space: normal;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 150ms ease, transform 150ms var(--ease-out);
}
.hint:hover .hintBox, .hint:focus .hintBox { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hintBox { transform: none; } }
.tdStat .k { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.tdStat .v { font-weight: 700; font-size: 14px; margin-top: 6px; }
.tdEmotions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.emoPill {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted); border-radius: 999px;
  padding: 9px 15px; min-height: 36px; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 600; user-select: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.emoPill:active { transform: scale(0.95); }
.emoPill.active { background: rgba(61,214,140,0.12); color: var(--accent); border-color: rgba(61,214,140,0.35); }
.tdNotesLabel { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.sellTable { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.sellRow { display: grid; grid-template-columns: 1fr 0.8fr 1.4fr 0.9fr; gap: 8px; font-size: 11px; padding: 7px 9px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); white-space: nowrap; }
.sellRow.sellHead { background: transparent; border: none; color: var(--faint); text-transform: uppercase; font-size: 9.5px; padding: 0 9px; }
.sellsBadge { color: var(--accent); font-weight: 600; }
.tdNotes {
  width: 100%; background: var(--field); border: 1px solid var(--field-border); color: var(--text);
  border-radius: var(--r-md); padding: 10px 12px; font-family: inherit; font-size: 13px; resize: vertical; min-height: 80px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.tdNotes::placeholder { color: var(--faint); }
.tdNotes:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.btn.danger { background: rgba(240,86,92,0.1); border-color: rgba(240,86,92,0.35); color: var(--red); }

.rowDelete {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 14px;
  padding: 8px 9px; border-radius: var(--r-full); flex-shrink: 0;
  transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.rowDelete:active { transform: scale(0.9); }

@media (max-width: 720px) {
  .journalCard { flex-wrap: wrap; }
  .jcStats { width: 100%; justify-content: space-between; margin-top: 10px; }
}
@media (max-width: 560px) {
  .heroValue { font-size: 30px; }
  .main { padding: 20px 16px 50px; }
}
/* iOS zooms the page into any field under 16px. */
@media (pointer: coarse) {
  .notes, .tdNotes, .searchBox input, .emotionSelect { font-size: 16px; }
}

/* ---------- Motion kit ---------- */

/* Sliding active pill shared by the sidebar nav and the pill tab groups:
   one element travels between items instead of each item swapping its own
   background. Positioned by JS (initSlider) from the active item's box. */
nav#pageNav, .tabs { position: relative; }
.slideInd {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  transition: transform 340ms var(--ease-out), width 340ms var(--ease-out), height 340ms var(--ease-out);
}
.slideInd.noAnim { transition: none; }
.tabs .slideInd { border-radius: var(--r-full); background: #1a2b22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.45); }
#pageNav .slideInd { border-radius: var(--r-sm); background: #1a2b22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.45); }
.hasInd > .tab, .hasInd > .navItem { z-index: 1; }
.hasInd > .tab.active, .hasInd > .navItem.active { background: transparent; box-shadow: none; }
/* Nav text flips to dark ink as the pill arrives, not before it lands. */
.hasInd > .navItem { transition: background-color 150ms ease, color 200ms ease 70ms, transform 220ms var(--ease-out); }

/* Click ripple — spawned at the pointer by JS, expands and fades out. */
.btn, .iconBtn, .tab, .navItem, .emoPill, .journalCard, .calCell, .recentRow { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,0.22), rgba(255,255,255,0) 62%); }
.btn.primary .ripple, .btn.chatSend .ripple { background: radial-gradient(circle, rgba(255,255,255,0.5), rgba(255,255,255,0) 62%); }

/* Cursor spotlight on cards — a glowing edge plus a faint inner wash that
   follow the pointer. --sx/--sy are set by JS on the hovered card only. */
.statTile, .bwCard, .chartCard { position: relative; }
.statTile::before, .bwCard::before, .chartCard::before, .journalCard::before, .calCell::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), rgba(61,214,140,0.6), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 250ms ease;
}
.statTile::after, .bwCard::after, .chartCard::after, .journalCard::after, .calCell::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--sx, 50%) var(--sy, 50%), rgba(61,214,140,0.07), transparent 65%);
  opacity: 0; transition: opacity 250ms ease;
}

/* Enter cascade — played by JS on page / period / unit / month changes,
   then removed so later re-renders (typing in search…) don't replay it. */
.enter > * { animation: riseIn 440ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--step, 40ms)); }
.chartsRow.enter { --step: 90ms; }
#calGrid.enter { --step: 22ms; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(3px); } }

/* Charts: the curve draws in left→right, bars grow out of the zero line. */
#equitySvg.reveal { animation: clipReveal 900ms var(--ease-in-out) both; }
.chartsRow.quickFade svg { animation: quickFade 220ms ease-out both; }
@keyframes quickFade { from { opacity: 0; } }
@keyframes clipReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#dailySvg rect { transform-box: fill-box; }
#dailySvg rect.pos { transform-origin: 50% 100%; }
#dailySvg rect.neg { transform-origin: 50% 0%; }
#dailySvg.reveal rect { animation: barGrow 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms + 150ms); }
@keyframes barGrow { from { transform: scaleY(0); } }

/* Selected emotion pill pops when chosen. */
.emoPill.active { animation: pop 340ms var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.9); } 55% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } 85% { transform: rotate(-4deg); } }

.iconBtn svg, .btn svg, .jcDictate svg, .rowDelete svg, .tdLink svg, .bwCard a svg { transition: transform 250ms var(--ease-out); }

/* ---------- Hover — fine pointers only ----------
   Touch devices fire hover on tap and leave it stuck afterwards. Where a
   hover moves an element, a matching :hover:active keeps the press scale. */
@media (hover: hover) and (pointer: fine) {
  .navItem:not(.active):hover { color: var(--text); background: var(--card); transform: translateX(3px); }
  .navItem:not(.active):hover:active { transform: translateX(3px) scale(0.98); }
  .navItem:hover svg { transform: scale(1.12); }
  .tab:not(.active):hover { color: var(--text); }
  .btn:not(:disabled):not(.dictating):hover, .iconBtn:not(.dictating):hover {
    border-color: var(--border-strong); opacity: 1; box-shadow: var(--edge), 0 0 14px rgba(61,214,140,0.16);
  }
  .btn.danger:hover { background: rgba(240,86,92,0.18); border-color: rgba(240,86,92,0.5); box-shadow: 0 0 14px rgba(240,86,92,0.18); }
  #refresh:hover svg { transform: rotate(60deg); }
  .btn.chatSend:not(:disabled):hover svg { transform: translate(2px, -2px); }
  #chatMemoryBtn:hover svg { transform: scale(1.12); }

  .journalCard:hover { border-color: var(--border-strong); background: #15261d; transform: translateY(-2px); box-shadow: var(--edge), 0 12px 28px rgba(0,0,0,0.35); }
  .journalCard:hover .jcAvatar .avatar { transform: scale(1.06) rotate(-3deg); }
  .statTile:hover, .bwCard:hover, .chartCard:hover { border-color: var(--border-strong); }
  .statTile:hover::before, .bwCard:hover::before, .chartCard:hover::before, .journalCard:hover::before, .calCell:not(.dim):hover::before,
  .statTile:hover::after, .bwCard:hover::after, .chartCard:hover::after, .journalCard:hover::after, .calCell:not(.dim):hover::after { opacity: 1; }
  .bwCard:hover .avatar { transform: scale(1.08); }

  .starRow:hover .starBtn { color: var(--faint); }
  .starRow .starBtn:hover,
  .starRow .starBtn:hover ~ .starBtn { color: var(--star); transform: scale(1.15); }
  a.tok:hover { color: var(--accent); text-decoration: underline; }
  .notes:not(:focus):hover { background: var(--field-hover); border-color: var(--border-strong); }
  .jcDictate:not(.dictating):hover { opacity: 1; color: var(--text); background: var(--panel); }
  .jcDictate:not(.dictating):hover svg, #tdDictate:not(.dictating):hover svg { transform: scale(1.15); }

  .calCell.hasTrades:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--edge), 0 10px 24px rgba(0,0,0,0.35); }
  .calCell.hasTrades:hover:active { transform: scale(0.97); }
  .calCell.upCell.hasTrades:hover { border-color: rgba(61,214,140,0.45); }
  .calCell.downCell.hasTrades:hover { border-color: rgba(240,86,92,0.45); }

  .bwCard a:hover, .tdLink:hover { text-decoration: underline; }
  .tdLink:hover svg, .bwCard a:hover svg { transform: translate(2px, -2px); }
  .recentRow:hover { background: var(--card); transform: translateX(3px); }
  .recentRow:hover:active { transform: translateX(3px) scale(0.98); }
  .recentRow:hover .avatar { transform: scale(1.08); }
  .modalHead button:hover { color: var(--text); background: rgba(255,255,255,0.06); }
  .modalHead button:hover svg { transform: rotate(90deg); }
  .modalHead button svg { transition: transform 250ms var(--ease-out); }
  .emoPill:not(.active):hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
  .emoPill:not(.active):hover:active { transform: scale(0.95); }
  .rowDelete:hover { color: var(--red); background: rgba(240,86,92,0.1); }
  .rowDelete:hover svg { animation: wiggle 420ms var(--ease-out); }
}

/* ---------- Views (landing / auth / app) ---------- */
[hidden] { display: none !important; }
/* Every figure (PnL, prices, counts) uses the mono face, on every page. */
.mono, .statTile .v, .jcStat .v, .calCell .pnl, .bwCard .v, .recentRow .pnl, .tdStat .v { font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: -0.02em; }
.logoImg { display: block; height: 22px; width: auto; }
.btn.primary { background: #fff; color: var(--accent-ink); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 6px 20px rgba(0,0,0,0.3); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.lg { padding: 12px 22px; font-size: 14px; }
.btn.block { width: 100%; gap: 10px; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); background: rgba(255,255,255,0.06); border: 1px solid var(--border-strong); color: var(--text); white-space: nowrap; }
.badge.pro { background: rgba(61,214,140,0.12); border-color: rgba(61,214,140,0.3); color: var(--accent); }

/* Landing */
.lpNav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 5vw, 56px); background: rgba(6,16,11,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.lpLinks { display: flex; gap: 28px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.lpLinks a { text-decoration: none; transition: color 150ms ease; }
.lpNavCta { display: flex; gap: 6px; }
.lpWrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 56px); }
.lpHero { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px 56px; align-items: center; padding-top: 88px; padding-bottom: 80px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--accent);
  background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.22); padding: 5px 12px; border-radius: var(--r-full);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.lpHero h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 22px 0 20px; text-wrap: balance; }
.lpHero h1 em { font-style: normal; color: var(--accent); }
/* Logo typeface (Helios Extended), embedded so the page stays a single file. */
@font-face { font-family: "Helios Extended"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/heliosext.otf") format("opentype"); }
@font-face { font-family: "Helios Extended"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/heliosext_bold.otf") format("opentype"); }
@font-face { font-family: "Helios Extended"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/heliosext_italic.ttf") format("truetype"); }
@font-face { font-family: "Helios Extended"; font-weight: 700; font-style: italic; font-display: swap; src: url("fonts/heliosext_bold_italic.ttf") format("truetype"); }
/* Helios Extended (logo face) is reserved for the hero's key word. It has
   no accented glyphs (é, à, ç…), so only ever use it on accent-free text. */
.lpHero h1 em.brandFont {
  font-family: "Helios Extended", "Geist", sans-serif; font-style: italic; font-weight: 700;
  font-size: 0.96em; letter-spacing: -0.03em; color: var(--accent-ink);
  /* Highlighter: dark text on a slanted green block that sweeps in. */
  position: relative; z-index: 0; display: inline-block; padding: 0 0.14em 0 0.1em; margin-left: 0.04em;
  /* Starts green (readable before the block arrives), inks as it sweeps. */
  animation: markText 750ms var(--ease-out) 550ms both;
}
@keyframes markText { from { color: var(--accent); } }
.lpHero h1 em.brandFont::before {
  content: ""; position: absolute; z-index: -1; inset: 0.12em 0 0.04em 0;
  background: var(--accent); border-radius: 0.06em;
  box-shadow: 0 0 36px rgba(61,214,140,0.35);
  transform: skewX(-12deg); transform-origin: left center;
  animation: markIn 750ms var(--ease-out) 550ms both;
}
@keyframes markIn { from { transform: skewX(-12deg) scaleX(0); } }
.lpLead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 520px; margin: 0 0 30px; text-wrap: pretty; }
.lpCtas { display: flex; gap: 10px; flex-wrap: wrap; }
.lpNote { color: var(--faint); font-size: 12px; margin: 18px 0 0; }

.mock { position: relative; padding-bottom: 64px; }
.mockWidget { background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--edge), 0 30px 70px rgba(0,0,0,0.5); }
.mwHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mwToken { display: flex; align-items: center; gap: 10px; }
.mwToken b { display: block; font-size: 14px; }
.mwToken small { color: var(--muted); font-size: 11.5px; }
.mwAvatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--accent-ink); background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.mwStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mwStats div { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px; }
.mwStats small { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.mwStats b { font-family: "Geist Mono", ui-monospace, monospace; font-size: 14px; }
.up { color: var(--green); }
.mwRow { display: grid; grid-template-columns: 64px repeat(3, 1fr); gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.mwRow button { font: inherit; font-family: "Geist Mono", ui-monospace, monospace; color: var(--text); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.22); border-radius: var(--r-full); padding: 8px 0; }
.mwRow.sell button { background: rgba(240,86,92,0.08); border-color: rgba(240,86,92,0.25); }
.mockCoach {
  position: absolute; left: -28px; right: 48px; bottom: 0; display: flex; gap: 12px; align-items: flex-start;
  background: rgba(17,32,25,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.mockCoach p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.mockCoach b { display: block; color: var(--text); font-size: 12px; margin-bottom: 2px; }
.coachFace { display: inline-block; flex-shrink: 0; height: auto; }
.coachSub { color: var(--muted); font-weight: 600; }
.coachLabel, .coachEyebrow { display: inline-flex; align-items: center; gap: 8px; }
.mcAvatar.face, .csInsight.alert .mcAvatar.face, .cmInsight .mcAvatar.face { background: none; border-radius: 0; }
.mcAvatar.face img { width: 26px; height: auto; display: block; }
.mcAvatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

.lpSection { padding-top: 88px; padding-bottom: 8px; scroll-margin-top: 64px; }
.lpHead { margin-bottom: 36px; }
.lpHead h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.035em; line-height: 1.1; margin: 0; text-wrap: balance; }
.lpHead p { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.lpGrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lpCard, .priceCard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--edge); }
.lpCard h3, .lpSteps h3 { font-size: 15px; margin: 18px 0 8px; letter-spacing: -0.01em; }
.lpCard p, .lpSteps p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.lpIcon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.2); }
.lpSteps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lpSteps li { border-top: 1px solid var(--border-strong); padding-top: 18px; }
.lpSteps span { font-family: "Geist Mono", ui-monospace, monospace; color: var(--accent); font-size: 12px; }
.lpPricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; }
.priceCard { display: flex; flex-direction: column; padding: 28px; }
.priceCard.featured {
  border-color: rgba(61,214,140,0.55);
  background: radial-gradient(120% 70% at 50% 0%, rgba(61,214,140,0.14), transparent 65%), #13261d;
  box-shadow: var(--edge), 0 0 0 1px rgba(61,214,140,0.18), 0 0 46px rgba(61,214,140,0.22), 0 24px 70px rgba(61,214,140,0.14);
}
.priceCard h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.price { font-family: "Geist Mono", ui-monospace, monospace; font-size: 38px; font-weight: 700; letter-spacing: -0.03em; margin: 14px 0 18px; }
.price small { font-family: "Geist", sans-serif; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.priceCard ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; font-size: 13.5px; color: var(--muted); flex: 1; }
.priceCard li { display: flex; gap: 10px; }
.priceCard li::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat; }
.lpCta { margin-top: 96px; text-align: center; padding: 64px 24px; border: 1px solid var(--border); border-radius: var(--r-xl); background: radial-gradient(600px 240px at 50% 0%, rgba(61,214,140,0.12), transparent 70%), var(--panel); }
.lpCta h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.035em; margin: 0 0 22px; }
.lpFoot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 96px; margin-top: 64px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12px; }
.lpFoot p { max-width: 520px; margin: 0; line-height: 1.6; }
@media (max-width: 900px) {
  .lpHero { grid-template-columns: 1fr; padding-top: 56px; }
  .mockCoach { left: 16px; right: 16px; }
  .lpGrid3, .lpSteps, .lpPricing { grid-template-columns: 1fr; }
}
@media (max-width: 720px) { .lpLinks { display: none; } .lpNavCta .ghost { display: none; } }

/* Auth */
.au { min-height: 100vh; display: grid; place-items: center; padding: 72px 16px; position: relative; }
.auBack { position: absolute; top: 22px; left: clamp(16px, 5vw, 40px); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: color 150ms ease; }
.auCard { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px 28px; box-shadow: var(--edge), 0 30px 70px rgba(0,0,0,0.45); animation: pageIn 260ms var(--ease-out); }
.auTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.auCard h2 { font-size: 22px; letter-spacing: -0.025em; margin: 0 0 6px; }
.auSub { color: var(--muted); margin: 0 0 22px; font-size: 13.5px; line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); }
.input { background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 11px 13px; color: var(--text); font: inherit; font-size: 14px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.auLink { color: var(--muted); cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.auCheck { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; cursor: pointer; }
.auCheck input { accent-color: var(--accent); }
#authSubmit { margin-top: 6px; }
.auErr { color: var(--red); font-size: 12.5px; line-height: 1.45; margin: -2px 0 12px; }
.auErr.ok { color: var(--accent); }
.auCheck a { color: var(--text); }
.lpFoot a { color: var(--muted); text-decoration: none; }
.lpFoot a:hover { color: var(--text); }
.auSwitch { text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.auSwitch a { color: var(--text); font-weight: 600; cursor: pointer; }

/* Account page */
.acGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acCard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--edge); }
.acCard.wide { grid-column: 1 / -1; }
.acCard h3 { margin: 0; font-size: 14px; }
.acTitleRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acSub { color: var(--muted); font-size: 12.5px; margin: 4px 0 16px; }
.acProfile { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.acAvatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 19px; flex-shrink: 0; }
.acName { font-weight: 700; font-size: 15px; }
.acNameInput { width: 100%; max-width: 240px; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.acNameHint { color: var(--faint); font-size: 11px; margin-top: 4px; }
.acMail { color: var(--muted); font-size: 12.5px; }
.acRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.acRow b { color: var(--text); font-weight: 600; }
.acUsage { margin-bottom: 16px; }
.acUsageHead { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.acUsageHead b { color: var(--text); }
.meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.06); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.acActions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.ok { color: var(--text); }
.status.ok::before { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,0.12); cursor: pointer; transition: background-color 200ms ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 220ms var(--ease-out); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }
@media (max-width: 860px) { .acGrid { grid-template-columns: 1fr; } }

/* Sidebar user chip */
.userChip { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px; border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms ease; }
.ucAvatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.ucName { font-weight: 600; font-size: 13px; }
.ucPlan { color: var(--muted); font-size: 11.5px; }

/* Preview switcher — dev-only way to browse every screen without auth. */
.devNav {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3000;
  display: flex; align-items: center; gap: 2px; max-width: calc(100vw - 32px); overflow-x: auto; scrollbar-width: none;
  padding: 4px; border-radius: var(--r-full); background: rgba(10,21,16,0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.devNav button { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 7px 12px; border-radius: var(--r-full); cursor: pointer; white-space: nowrap; transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); }
.devNav button:active { transform: scale(0.96); }
.devNav button.active { color: var(--text); background: #1a2b22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.45); }
.devLabel { font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); padding: 0 8px 0 10px; }
.devNav.min [data-go] { display: none; }

@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover { background: #e3f4ea; }
  .btn.ghost:hover, .lpLinks a:hover, .auBack:hover, .devNav button:not(.active):hover { color: var(--text); }
  .userChip:hover { background: rgba(255,255,255,0.04); }
}
@media (prefers-reduced-motion: reduce) { .auCard { animation: none; } }

/* Background 3D candlesticks — fixed behind the landing content. The base
   layer is plainly blurred; #candlesFx is a copy of the same frame with a
   chromatic blur (R/G/B blurred and offset differently by an SVG filter),
   masked to show only toward the edges, like a lens vignette. */
#candles, #candlesFx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1200ms ease; }
#candles { filter: blur(2px); }
/* Darkening comes from opacity: CSS brightness/contrast filters wash out
   this translucent canvas to grey. */
#candles.on { opacity: 0.82; }
#candlesFx {
  filter: url(#candleChroma);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 42%, rgba(0,0,0,0.55) 72%, #000 100%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 42%, rgba(0,0,0,0.55) 72%, #000 100%);
}
#candlesFx.on { opacity: 0.7; }
/* Film grain over the background layer: a tiled noise texture that jitters
   in steps (cheap — no per-frame JS, no repaint of the canvas). */
#grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.1 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: 0.16; mix-blend-mode: soft-light;
  animation: grainShift 900ms steps(1) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 17% { transform: translate(-7%, 4%); } 34% { transform: translate(5%, -9%); }
  51% { transform: translate(-3%, 8%); } 68% { transform: translate(8%, 2%); } 85% { transform: translate(-6%, -5%); }
}
@media (prefers-reduced-motion: reduce) { #grain { animation: none; } }
#view-landing > :not(#candles):not(#candlesFx):not(#grain):not(#mBg):not(.lpNav) { position: relative; z-index: 1; }

/* Scroll reveal — opacity + the standalone `translate` property only
   (compositor-friendly, and `translate` composes with the tilt's inline
   transform instead of fighting it). Classes are removed once played. */
.revealReady .reveal {
  opacity: 0; translate: 0 var(--rv, 24px);
  transition: opacity 700ms var(--ease-out) var(--d, 0ms), translate 900ms var(--ease-out) var(--d, 0ms);
}
.revealReady .reveal.in { opacity: 1; translate: 0 0; }
.lpSteps li { position: relative; }
.lpSteps li::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 1px; background: var(--accent);
  transform: scaleX(var(--line, 1)); transform-origin: left; transition: transform 1000ms var(--ease-out) calc(var(--d, 0ms) + 200ms);
}
.revealReady .lpSteps li.reveal { --line: 0; }
.revealReady .lpSteps li.reveal.in { --line: 1; }
@media (prefers-reduced-motion: reduce) { .reveal { --rv: 8px; } }

/* Scroll-linked effects, run natively by the browser (no JS per frame). */
@supports (animation-timeline: scroll()) {
  .lpNav { animation: navSolid linear both; animation-timeline: scroll(root); animation-range: 0px 120px; }
  @keyframes navSolid { from { background-color: rgba(6,16,11,0); border-bottom-color: transparent; } }
  .lpHero > div:first-child { animation: heroOut linear both; animation-timeline: view(); animation-range: exit 10% exit 95%; }
  @keyframes heroOut { to { opacity: 0.1; translate: 0 -56px; } }
  .mockCoach { animation: coachDrift linear both; animation-timeline: view(); animation-range: cover 30% exit 100%; }
  @keyframes coachDrift { to { translate: 0 -40px; } }
  @media (prefers-reduced-motion: reduce) {
    @keyframes heroOut { to { opacity: 0.1; } }
    @keyframes coachDrift { to { translate: 0 -12px; } }
  }
}

/* 3D tilt — the card leans toward the cursor, children float on Z for
   parallax, and a soft glare follows the pointer. JS only feeds the
   --rx/--ry/--gx/--gy variables; transform does the work. */
/* Rest pose in degrees (unitless so JS can read it). */
.mock { --rx0: 5; --ry0: -9; }
.lpCard, .priceCard { position: relative; }
@media (hover: hover) and (pointer: fine) {
  /* Transform is written every frame by JS (smoothed toward the pointer),
     so it must NOT have a CSS transition — two easings fighting is what
     produced the freeze/teleport. --h (0→1) is the eased hover amount. */
  .tilt { transform-style: preserve-3d; will-change: transform; transition: border-color 250ms ease, box-shadow 350ms ease; }
  .mock.tilt { transform: perspective(1000px) rotateX(5deg) rotateY(-9deg); }
  .lpCard.tilting, .priceCard.tilting { border-color: var(--border-strong); box-shadow: var(--edge), 0 28px 60px rgba(0,0,0,0.45); }
  .priceCard.featured.tilting { border-color: rgba(61,214,140,0.7); box-shadow: var(--edge), 0 28px 60px rgba(0,0,0,0.45), 0 0 60px rgba(61,214,140,0.3); }
  .tilt::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,0.075), transparent 60%);
    opacity: var(--h, 0);
  }
  .tilt.noGlare::after { display: none; }
  .tilt .lpIcon { transform: translateZ(calc(36px + 14px * var(--h, 0))) scale(calc(1 + 0.06 * var(--h, 0))); }
  .tilt h3, .tilt .price { transform: translateZ(22px); }
  /* Buttons inside a tilting card sit on their own Z layer: left on the
     card's plane (z = 0) they z-fight with the card in hit-testing, so the
     hover state flickers and clicks land on the card instead. */
  .tilt .btn { transform: translateZ(16px); }
  .tilt .btn.lg:hover { transform: translateZ(16px) translateY(-1px); }
  .tilt .btn.lg:hover:active { transform: translateZ(16px) scale(0.97); }
  .mock .mockWidget, .mock .term { transform: translateZ(0); }
  .mock .mockCoach { transform: translateZ(calc(60px + 30px * var(--h, 0))); }
  .btn.lg { transition: background-color 150ms ease, border-color 150ms ease, box-shadow 200ms ease, transform 200ms var(--ease-out); }
  .btn.lg:hover { transform: translateY(-1px); border-color: var(--border-strong); }
  .btn.lg:hover:active { transform: scale(0.97); }
  .btn.primary.lg:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 10px 30px rgba(61,214,140,0.18); }
  .lpSteps li { transition: border-color 250ms ease; }
  .lpSteps li:hover { border-color: var(--accent); }
}
/* =====================================================================
   MOBILE VERSION — everything below is scoped to html.mobile (layout) or
   html.lite (no WebGL), so the desktop site is untouched.
   ===================================================================== */
.mMenuBtn, .mBg, .mMenu, .mTabBar, .mBrand { display: none; }

/* Lightweight background: two static SVG candle layers that float on the
   compositor (transform only), instead of the Three.js scene. */
html.lite #candles, html.lite #candlesFx, html.lite #grain,
html.mobile #candles, html.mobile #candlesFx, html.mobile #grain { display: none; }
html.lite .mBg, html.mobile .mBg {
  display: block; position: absolute; top: 0; left: 0; right: 0; height: min(115vh, 940px); z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent);
}
.mBg::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 45% at 85% 18%, rgba(61,214,140,0.16), transparent 70%); }
.mBg svg { position: absolute; will-change: transform; -webkit-mask-image: linear-gradient(to right, transparent 5%, #000 60%); mask-image: linear-gradient(to right, transparent 5%, #000 60%); }
.mBg .far { right: -18%; top: 60px; width: 74%; max-width: 520px; opacity: .2; filter: blur(2.5px); animation: mFloat 10s ease-in-out infinite alternate; }
.mBg .near { right: -14%; top: 120px; width: 60%; max-width: 440px; opacity: .3; animation: mFloat 7.5s ease-in-out -3s infinite alternate-reverse; }
@keyframes mFloat { from { transform: translate3d(0, -12px, 0); } to { transform: translate3d(0, 14px, 0); } }
@media (prefers-reduced-motion: reduce) { .mBg svg { animation: none; } }

html.mobile, html.mobile body { -webkit-tap-highlight-color: transparent; }
html.mobile button, html.mobile a, html.mobile .tab, html.mobile .navItem { touch-action: manipulation; }

/* ---- Public pages ---- */
html.mobile .lpNav { padding: 12px 16px; gap: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html.mobile .lpNav .logoImg { height: 22px; }
html.mobile .lpLinks, html.mobile .lpNavCta .ghost { display: none; }
html.mobile .lpNavCta { align-items: center; gap: 8px; }
html.mobile .lpNavCta .btn { padding: 8px 14px; }
html.mobile .mMenuBtn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border-strong); color: var(--text); cursor: pointer; padding: 0;
}
.mMenuBtn svg { transition: transform 220ms var(--ease-out); }
.mMenuBtn[aria-expanded="true"] svg { transform: rotate(90deg); }
html.mobile .mMenu {
  display: block; position: fixed; z-index: 60; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; padding: 8px;
  background: rgba(13,26,20,0.97); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--edge), 0 24px 60px rgba(0,0,0,0.6); transform-origin: top right; animation: mMenuIn 200ms var(--ease-out);
}
.mMenu[hidden] { display: none !important; }
@keyframes mMenuIn { from { opacity: 0; transform: scale(0.96) translateY(-6px); } }
.mMenu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px; border-radius: var(--r-md); color: var(--text); text-decoration: none; font-size: 16px; font-weight: 600; }
.mMenu a::after { content: "→"; color: var(--faint); }
.mMenu a:active { background: rgba(255,255,255,0.05); }
.mMenu a.cta { margin-top: 6px; background: #fff; color: var(--accent-ink); justify-content: center; }
.mMenu a.cta::after { content: none; }

html.mobile .lpWrap { padding-left: 16px; padding-right: 16px; }
html.mobile .lpHero { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; padding-bottom: 48px; }
html.mobile .lpHero h1 { font-size: clamp(34px, 10.5vw, 46px); margin: 18px 0 16px; }
html.mobile .lpLead { font-size: 15.5px; }
html.mobile .lpCtas { flex-direction: column; gap: 10px; }
html.mobile .lpCtas .btn { width: 100%; justify-content: center; }
html.mobile .lpHero > div:first-child, html.mobile .mockCoach { animation: none !important; }
html.mobile .mock { transform: none !important; padding-bottom: 0; }
html.mobile .mockCoach { position: relative; left: auto; right: auto; bottom: auto; margin: -22px 14px 0; transform: none !important; }
html.mobile .lpSection { padding-top: 64px; }
html.mobile .lpHead { margin-bottom: 24px; }
html.mobile .lpCard, html.mobile .priceCard { padding: 22px; }
html.mobile .lpCta { margin-top: 64px; padding: 44px 20px; }
html.mobile .lpCta .btn { width: 100%; justify-content: center; }
html.mobile .lpFoot { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 48px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
html.mobile .prHero { padding-top: 40px; padding-bottom: 32px; }
html.mobile .prHero h1 { font-size: clamp(32px, 9.5vw, 42px); }
html.mobile .prSection { padding-top: 72px; }
html.mobile .prRow.prHeadRow { top: 62px; }

/* ---- App: top bar content, scrollable period tabs, bottom tab bar ---- */
html.mobile .shell { grid-template-columns: 1fr; }
html.mobile .sidebar, html.mobile .rightPanel { display: none; }
html.mobile .mBrand { display: block; height: 20px; width: auto; margin-bottom: 14px; }
html.mobile .main { padding: calc(16px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)); }
html.mobile .topRow { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
html.mobile .pageTitle { font-size: 20px; }
html.mobile .topActions { justify-content: space-between; }
html.mobile #periodTabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -2px; margin-right: -2px; margin-bottom: 16px; }
html.mobile #periodTabs::-webkit-scrollbar { display: none; }
html.mobile #periodTabs .tab { flex-shrink: 0; }
html.mobile .heroValue { font-size: 34px; }
html.mobile .statGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.mobile .chartsRow { grid-template-columns: 1fr; }
html.mobile .debrief { padding: 14px 14px 14px 18px; }
html.mobile .dbAsk { margin-left: 0; width: 100%; justify-content: center; order: 3; }
html.mobile .dbMain { font-size: 14px; }
html.mobile .chatLog { height: 340px; }
html.mobile .onboard { padding: 40px 18px; }
html.mobile .journalCard { flex-wrap: wrap; padding: 10px 12px; }
html.mobile .jcStats { width: 100%; justify-content: space-between; margin-top: 8px; }
html.mobile .searchBox { max-width: none; }
html.mobile .calGrid { gap: 4px; }
html.mobile .calCell { min-height: 54px; padding: 5px; border-radius: 10px; }
html.mobile .calCell .pnl { font-size: 9.5px; margin-top: 6px; letter-spacing: -0.03em; }
html.mobile .calCell .cnt { display: none; }
html.mobile .calDow { font-size: 9px; }
html.mobile .acGrid { grid-template-columns: 1fr; }
html.mobile .acActions { flex-wrap: wrap; }
html.mobile .appFoot { flex-direction: column; align-items: flex-start; gap: 8px; }

html.mobile .mTabBar {
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(8,18,13,0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
}
.mTab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 0 6px; border: 0; border-radius: 12px;
  background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.mTab svg { width: 21px; height: 21px; }
.mTab:active { transform: scale(0.94); }
.mTab.active { color: var(--accent); background: rgba(61,214,140,0.09); }
html.mobile body[data-view="app"] .devNav { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ---- Modals become bottom sheets ---- */
html.mobile .modalOverlay { align-items: flex-end; padding: 0; }
html.mobile .modalCard { width: 100% !important; max-height: 90vh; max-height: 90dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
html.mobile #tradeModal .modalCard { padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); }
html.mobile .tdGrid { grid-template-columns: 1fr 1fr; gap: 8px; }
html.mobile .shActions .btn { flex: 1 1 100%; justify-content: center; }
html.mobile .confirmCard { margin: 0 16px; }

/* ---------- Hero: fake terminal with the extension on top ---------- */
.term {
  position: relative; overflow: hidden; border-radius: 16px; font-size: 11px;
  background: linear-gradient(180deg, #0c1612, #08110d); border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--edge), 0 40px 90px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.35);
}
.term::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(125deg, rgba(255,255,255,0.06), transparent 32%); }
.termTop { display: flex; align-items: flex-end; gap: 14px; height: 34px; padding: 0 10px; background: #0a1410; border-bottom: 1px solid rgba(255,255,255,0.06); }
.termDots { display: flex; gap: 6px; align-self: center; }
.termDots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.termDots i:first-child { background: rgba(240,86,92,0.55); }
.termTabs { display: flex; gap: 2px; min-width: 0; }
.termTab { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px 8px 0 0; color: var(--faint); font-weight: 600; white-space: nowrap; }
.termTab.on { background: #0e1a15; color: var(--text); border: 1px solid rgba(255,255,255,0.07); border-bottom-color: #0e1a15; margin-bottom: -1px; }
.ttIco { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; font-weight: 800; color: #06100b; background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.termUrl {
  display: flex; align-items: center; gap: 8px; margin: 8px 10px; padding: 6px 8px 6px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: var(--faint); font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px;
}
.termUrl > span:not(.termExt) { overflow: hidden; text-overflow: ellipsis; }
.termUrl b { color: var(--muted); font-weight: 500; }
.termExt {
  margin-left: auto; flex-shrink: 0; width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center;
  background: #06100b; border: 1px solid rgba(61,214,140,0.55); color: #fff; font: italic 800 10px "Geist", sans-serif; box-shadow: 0 0 12px rgba(61,214,140,0.35);
}
.termExt i { color: var(--accent); font-style: normal; }
.termBody { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 8px; padding: 0 10px 10px; }
.termChart { position: relative; min-width: 0; padding: 8px 8px 6px; border-radius: 10px; background: #08100c; border: 1px solid rgba(255,255,255,0.06); }
.tcHead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; white-space: nowrap; }
.tcSym { color: var(--text); font-weight: 700; }
.tcTf { margin-left: auto; display: flex; gap: 2px; }
.tcTf i { font-style: normal; padding: 1px 5px; border-radius: 4px; }
.tcTf i.on { background: rgba(255,255,255,0.08); color: var(--text); }
.tcSvg { display: block; width: 100%; height: auto; }
.tcTape { display: grid; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.05); font-family: "Geist Mono", ui-monospace, monospace; font-size: 9px; }
.tcTape div { display: grid; grid-template-columns: 34px 1fr auto; color: var(--faint); }
.termTracer {
  position: relative; align-self: start; margin-top: 4px; padding: 12px 10px 10px; border-radius: 12px;
  background: linear-gradient(180deg, #13271e, #0c1813); border: 1px solid rgba(61,214,140,0.38);
  box-shadow: 0 14px 34px rgba(0,0,0,0.55), 0 0 34px rgba(61,214,140,0.14);
}
.termTracer::before {
  content: "EXTENSION"; position: absolute; top: -7px; right: 10px; padding: 3px 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 7.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .12em;
}
.ttHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ttHead img { height: 13px; width: auto; }
.ttBal { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 700; font-size: 11px; }
.ttLbl { margin: 9px 0 4px; color: var(--faint); font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ttGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ttGrid.sell { grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.ttGrid i {
  font-style: normal; text-align: center; padding: 5px 0; border-radius: 999px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; font-weight: 600;
  color: var(--text); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.24);
}
.ttGrid.sell i { background: rgba(240,86,92,0.08); border-color: rgba(240,86,92,0.26); }
.ttStats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ttStats div { padding: 5px 6px; border-radius: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.ttStats .pnl { grid-column: 1 / -1; }
.ttStats small { display: block; color: var(--faint); font-size: 7.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.ttStats b { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; }
.mock .mockCoach { left: -24px; right: 72px; bottom: -6px; }
html.mobile .termBody { grid-template-columns: minmax(0, 1fr) 128px; gap: 6px; padding: 0 8px 8px; }
html.mobile .termTab:not(.on) { display: none; }
html.mobile .termTracer { padding: 10px 8px 8px; }
html.mobile .ttGrid { grid-template-columns: repeat(2, 1fr); }
html.mobile .ttGrid.sell { grid-template-columns: repeat(3, 1fr); }
html.mobile .ttGrid.sell i { font-size: 8.5px; }
html.mobile .tcTf { display: none; }

/* ---------- Hero: on-chain proof + engine status ---------- */
.proof { grid-column: 1 / -1; display: grid; gap: 12px; }
.proofStats {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}
.proofStats::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(61,214,140,0.45), transparent); }
.pStat { padding: 18px 20px 16px; }
.pStat + .pStat { border-left: 1px solid var(--border); }
.pStat b { display: block; font-family: "Geist Mono", ui-monospace, monospace; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.pStat b.down { color: var(--red); }
.pStat b.acc { color: var(--accent); }
.pStat p { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.pSrc { display: inline-block; margin-top: 10px; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.08); color: var(--faint); font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; }
.engine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--muted); font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; }
.eBadge { padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); cursor: default; }
.eLive { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--text); }
.eLive i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); color: var(--accent); animation: alertPulse 1.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .eLive i { animation: none; } }
html.mobile .proofStats { grid-template-columns: 1fr; }
html.mobile .pStat + .pStat { border-left: 0; border-top: 1px solid var(--border); }
html.mobile .eLive { margin-left: 0; }

/* ---------- Landing: simulation realism (fill ticket + specs) ---------- */
.realGrid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.fillTicket {
  position: sticky; top: 88px; padding: 16px 18px; border-radius: 14px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), #0a1410; border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--edge), 0 24px 60px rgba(0,0,0,0.45);
}
.fillTicket::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(61,214,140,0.5), transparent); }
.ftHead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px dashed rgba(255,255,255,0.1); color: var(--text); font-weight: 600; font-size: 11.5px; }
.ftTag { padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(61,214,140,0.35); color: var(--accent); font-size: 9.5px; letter-spacing: .1em; }
.ftRow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 6px 0; color: var(--faint); }
.ftRow b { color: var(--text); font-weight: 500; text-align: right; }
.ftRow em { font-style: normal; min-width: 64px; text-align: right; font-size: 11px; }
.ftRow em.acc { color: var(--accent); }
.ftRow em.down, .ftFoot b.down { color: var(--red); }
.ftFoot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.1); color: var(--muted); }
.ftFoot b { font-size: 16px; }
.specGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spec {
  position: relative; padding: 18px 18px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); transition: border-color 200ms ease, background-color 200ms ease;
}
.spec:hover { border-color: rgba(61,214,140,0.3); }
.specFig { display: inline-block; padding: 3px 9px; border-radius: 6px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; font-weight: 700; color: var(--accent); background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.25); }
.spec h3 { margin: 12px 0 6px; font-size: 15px; letter-spacing: -0.01em; }
.spec p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.realNote { margin: 16px 0 0; color: var(--faint); font-size: 12.5px; text-align: center; }
@media (max-width: 900px) { .realGrid { grid-template-columns: 1fr; } .fillTicket { position: relative; top: 0; } }
html.mobile .realGrid { grid-template-columns: 1fr; }
html.mobile .fillTicket { position: relative; top: 0; }
html.mobile .specGrid { grid-template-columns: 1fr; }

/* ---------- Landing: the AI coach that follows you ---------- */
.coachGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.coachCopy h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.035em; line-height: 1.1; margin: 16px 0 14px; text-wrap: balance; }
.coachLead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.coachList { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.coachList li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.clIco { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.25); }
.coachList b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.coachList p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.coachMock {
  position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 18px; font-size: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), #0a1410; border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--edge), 0 30px 70px rgba(0,0,0,0.5), 0 0 60px rgba(61,214,140,0.06);
}
.coachMock::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(61,214,140,0.5), transparent); }
.cmHead { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cmTitle { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.cmLive { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); color: var(--accent); animation: alertPulse 1.6s ease-out infinite; }
.cmMem { font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--faint); padding: 2px 8px; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; }
.cmInsight { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(240,86,92,0.4); background: linear-gradient(135deg, rgba(240,86,92,0.12), rgba(240,86,92,0.02)); }
.cmInsight .mcAvatar { background: var(--red); color: #fff; }
.cmTag { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--red); }
.cmInsight p { margin: 4px 0 0; line-height: 1.5; }
.cmInsight p b { color: var(--red); }
.cmMsg { max-width: 88%; padding: 10px 13px; border-radius: 14px; line-height: 1.5; }
.cmMsg.user { justify-self: end; background: #fff; color: var(--accent-ink); font-weight: 600; border-bottom-right-radius: 4px; }
.cmMsg.coach { justify-self: start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.cmMsg.coach p { margin: 0; }
.cmMsg.coach p + p { margin-top: 7px; }
.cmMsg.coach b { color: var(--accent); }
.cmRemember { display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; color: var(--accent); background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.25); }
.cmChips { display: flex; flex-wrap: wrap; gap: 6px; }
.cmChips span { padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--field); border: 1px solid var(--border-strong); }
.cmInput { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); color: var(--faint); }
.cmInput i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent-ink); }
@media (max-width: 900px) { .coachGrid { grid-template-columns: 1fr; } }
html.mobile .coachGrid { grid-template-columns: 1fr; gap: 28px; }
html.mobile .coachMock { padding: 14px; }
html.mobile .cmMsg { max-width: 94%; }

/* ---------- Private beta: waitlist form + notice ---------- */
.wlForm { max-width: 520px; margin-top: 30px; scroll-margin-top: 140px; }
.wlForm.center { margin: 0 auto; }
.wlField {
  display: flex; gap: 6px; padding: 6px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--edge);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.wlField:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wlField input[type="email"] { flex: 1; min-width: 0; padding: 0 16px; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.wlField input::placeholder { color: var(--faint); }
.wlField .btn { flex-shrink: 0; }
.wlHp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wlMsg { display: flex; align-items: center; gap: 10px; margin: 12px 0 0 6px; color: var(--muted); font-size: 13px; }
.wlForm.center .wlMsg { justify-content: center; margin-left: 0; }
.wlMsg.err { color: var(--red); }
.wlLock { white-space: nowrap; flex-shrink: 0; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(61,214,140,0.35); color: var(--accent); font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.wlDone { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(61,214,140,0.4); background: rgba(61,214,140,0.08); text-align: left; animation: emoIn 200ms var(--ease-out); }
.wlDone .ck { width: 18px; height: 18px; }
.wlDone b { display: block; font-size: 15px; }
.wlDone span { color: var(--muted); font-size: 13px; }
.lpCtas { margin-top: 18px; }
.betaNotice {
  position: fixed; z-index: 90; top: 76px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 14px;
  background: rgba(40,14,16,0.95); border: 1px solid rgba(240,86,92,0.5); box-shadow: 0 18px 40px rgba(0,0,0,0.5); font-size: 13.5px; animation: emoIn 220ms var(--ease-out);
}
.betaNotice[hidden] { display: none; }
.betaNotice b { color: #ffb1b4; }
.betaNotice button { margin-left: auto; flex-shrink: 0; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text); font-size: 16px; cursor: pointer; }
html.mobile .lpNavCta .btn.ghost.guestOnly { display: inline-flex; padding: 8px 10px; }
html.mobile .wlField { flex-direction: column; border-radius: 18px; }
html.mobile .wlField input[type="email"] { padding: 12px 12px; }
html.mobile .wlField .btn { width: 100%; justify-content: center; }
html.mobile .betaNotice { top: 70px; }

/* ---------- Hero: two-line title + full-width join row ---------- */
.lpHero h1 { font-size: clamp(32px, 3.7vw, 54px); }
.lpHero h1 .h1l { display: block; white-space: nowrap; }
.heroJoin { grid-column: 1 / -1; display: grid; gap: 16px; }
.heroJoin .lpTrust { margin: 0; flex-wrap: nowrap; gap: 28px; }
.heroJoin .wlForm { max-width: none; margin: 0; }
.heroJoin .wlField { padding: 8px; }
.heroJoin .wlField input[type="email"] { font-size: 16px; padding: 0 22px; }
.heroJoin .lpCtas { margin: 0; }
html.mobile .lpHero h1 { font-size: clamp(25px, 8.3vw, 40px); }
html.mobile .heroJoin { order: 1; }
html.mobile .lpHero { row-gap: 28px; }
html.mobile .lpHero .mock { order: 2; }
html.mobile .proof { order: 3; }
html.mobile .heroJoin .lpTrust { flex-wrap: wrap; gap: 9px; }

/* ---------- Landing: reassurance bullets, leak numbers ---------- */
.lpTrust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 20px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.lpTrust li { display: inline-flex; align-items: center; gap: 8px; }
html.mobile .lpTrust { flex-direction: column; gap: 9px; }
.leakNo { display: block; font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 2px 0 6px; }

/* ---------- Signed-in vs guest controls (public pages) ---------- */
body[data-auth="in"] .guestOnly, body:not([data-auth="in"]) .userOnly { display: none !important; }
.btn .arr { margin-left: 6px; transition: transform 160ms var(--ease-out); }
.btn:hover .arr { transform: translateX(2px); }
.lpMore { margin: 22px 0 0; font-size: 13.5px; }
.lpMore a { color: var(--accent); font-weight: 600; text-decoration: none; }
.lpMore a:hover { text-decoration: underline; }

/* ---------- Pricing page ---------- */
#view-pricing { min-height: 100vh; background: radial-gradient(900px 420px at 50% -60px, rgba(61,214,140,0.14), transparent 70%); }
.lpLinks a.on { color: var(--text); }
.prHero { text-align: center; padding-top: 80px; padding-bottom: 44px; }
.prHero h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.045em; line-height: 1.05; margin: 18px auto 14px; max-width: 760px; text-wrap: balance; }
.prHero p { color: var(--muted); font-size: 16px; line-height: 1.55; margin: 0 auto 30px; max-width: 520px; }
.prBilling { display: inline-flex; }
.prBilling .tab { display: inline-flex; align-items: center; }
.prSave { font-size: 10px; font-weight: 700; color: var(--accent); background: rgba(61,214,140,0.12); border-radius: var(--r-full); padding: 2px 7px; margin-left: 7px; }
.prPlans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 860px; margin: 0 auto; align-items: stretch; }
.prTag { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 0; min-height: 40px; }
.prPlans .price { margin: 18px 0 4px; }
.prBilled { color: var(--faint); font-size: 12px; margin: 0 0 22px; min-height: 16px; }
.prListHead { font-size: 12px; font-weight: 700; margin: 22px 0 12px; }
.prPlans .btn.lg { justify-content: center; gap: 8px; }
.priceCard.prPro {
  border-color: transparent;
  background: radial-gradient(120% 70% at 50% 0%, rgba(61,214,140,0.14), transparent 65%) padding-box, linear-gradient(#13261d, #13261d) padding-box, linear-gradient(160deg, rgba(61,214,140,0.9), rgba(61,214,140,0.15) 45%, rgba(61,214,140,0.55)) border-box;
  box-shadow: var(--edge), 0 0 46px rgba(61,214,140,0.22), 0 24px 70px rgba(61,214,140,0.14);
}
.priceCard.prPro.tilting { box-shadow: var(--edge), 0 28px 60px rgba(0,0,0,0.45), 0 0 60px rgba(61,214,140,0.3); }
.priceCard.prPro.tilting { border-color: transparent; }
.prPopular { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 4px 11px; border-radius: var(--r-full); box-shadow: 0 6px 20px rgba(61,214,140,0.35); white-space: nowrap; }
.prNote { color: var(--faint); font-size: 11.5px; text-align: center; margin: 10px 0 0; }
.prTrust { display: flex; justify-content: center; gap: 10px 26px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 28px; }
.prTrust span { display: inline-flex; align-items: center; gap: 7px; }
.ck { display: inline-block; width: 15px; height: 15px; flex-shrink: 0; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat; }
.no { display: inline-block; width: 12px; height: 2px; border-radius: 2px; background: var(--faint); }
.prSection { padding-top: 100px; scroll-margin-top: 64px; }
.prSection > h2 { text-align: center; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.035em; margin: 0 0 10px; }
.prSection > p { text-align: center; color: var(--muted); font-size: 14.5px; margin: 0 0 30px; }
.prTable { max-width: 860px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--edge); overflow: clip; }
.prRow { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.prRow > * { padding: 13px 18px; font-size: 13.5px; }
.prRow > :first-child { color: var(--muted); }
.prRow > :not(:first-child) { display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; }
.prRow > :nth-child(3) { background: rgba(61,214,140,0.04); }
.prRow.prHeadRow { position: sticky; top: 64px; z-index: 2; border-top: 0; background: rgba(17,32,25,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.prHeadRow > * { font-size: 14px; font-weight: 700; color: var(--text) !important; padding-top: 16px; padding-bottom: 16px; }
.prHeadRow > :nth-child(3) { color: var(--accent) !important; gap: 7px; }
.prGroup { padding: 22px 18px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); border-top: 1px solid var(--border); }
.prFaq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.prFaq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--edge); transition: border-color 150ms ease; }
.prFaq details[open] { border-color: var(--border-strong); }
.prFaq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.prFaq summary::-webkit-details-marker { display: none; }
.prFaq summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 500; line-height: 1; transition: transform 220ms var(--ease-out); }
.prFaq details[open] summary::after { transform: rotate(45deg); }
.prFaq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
@media (max-width: 860px) { .prPlans { grid-template-columns: 1fr; max-width: 460px; } }
@media (max-width: 560px) {
  .prRow { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.8fr)); }
  .prRow > * { padding: 11px 10px; font-size: 12.5px; }
  .prRow.prHeadRow { top: 58px; }
}

/* ---------- Share card (trade recap image for X) ---------- */
.shImgWrap { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--panel); aspect-ratio: 16 / 9; margin: 0 auto; }
.shImgWrap[data-format="square"] { max-width: min(100%, 380px); }
.shImgWrap[data-format="story"] { max-width: min(100%, 230px); }
.flexCard { max-height: min(92vh, 1000px); overflow: auto; }
/* Flex options */
.flexOpts { display: grid; gap: 10px; margin-top: 16px; }
.foRow { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; }
.foK { color: var(--muted); font-size: 12px; font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 99px; background: var(--panel); border: 1px solid var(--border); width: max-content; max-width: 100%; }
.seg button { border: 0; background: none; color: var(--muted); font: 600 12.5px inherit; padding: 6px 12px; border-radius: 99px; cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { background: rgba(61,214,140,0.16); color: var(--accent); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* SOL shown as the Solana logo in the SOL / $ switches. */
.solMark { display: block; flex-shrink: 0; opacity: .55; transition: opacity 150ms ease; }
.seg button:has(.solMark), .tab:has(.solMark) { display: inline-flex; align-items: center; justify-content: center; }
.seg button.on .solMark, .tab.active .solMark, .seg button:hover .solMark, .tab:hover .solMark { opacity: 1; }
.foChecks { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12.5px; }
.foChecks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.foChecks label[hidden] { display: none; }
.foHandle { max-width: 240px; }
@media (max-width: 560px) { .foRow { grid-template-columns: 1fr; gap: 6px; } }
.shImgWrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shImgWrap.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%) 0 0 / 200% 100%; animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.shActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.shActions .btn { gap: 7px; padding: 10px 16px; font-size: 13px; }
.shActions .btn.shareX { flex: 1; min-width: 200px; }
.shHint { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; min-height: 18px; }
.shHint.ok { color: var(--accent); }
.shHint kbd { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--field); color: var(--text); }

/* ---------- Landing: tilt alert mockup ---------- */
.mockCoach.alert {
  border-color: rgba(240,86,92,0.55);
  background: linear-gradient(135deg, rgba(240,86,92,0.18), rgba(17,32,25,0.92) 70%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 34px rgba(240,86,92,0.28);
}
.mockCoach.alert .mcAvatar { background: var(--red); color: #fff; }
.mockCoach.alert b { display: flex; align-items: center; gap: 7px; color: var(--red); letter-spacing: .08em; }
.mockCoach.alert p { color: var(--text); }
.mcDot, .dbDot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: currentColor; animation: alertPulse 1.6s ease-out infinite; }
@keyframes alertPulse { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .mcDot, .dbDot { animation: none; } }

/* ---------- Dashboard: AI session debrief ---------- */
.debrief {
  --db: var(--accent);
  position: relative; overflow: hidden; margin-bottom: 20px; padding: 16px 18px 16px 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--edge);
}
.debrief.alert { --db: var(--red); border-color: rgba(240,86,92,0.45); background: linear-gradient(90deg, rgba(240,86,92,0.13), transparent 65%), var(--card); }
.debrief.warn { --db: #f5b942; border-color: rgba(245,185,66,0.35); background: linear-gradient(90deg, rgba(245,185,66,0.09), transparent 65%), var(--card); }
.debrief.empty { --db: var(--faint); }
.dbHead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dbBadge { display: inline-flex; align-items: center; gap: 7px; color: var(--db); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.dbPeriod { color: var(--faint); font-size: 11px; }
.dbAsk { margin-left: auto; gap: 6px; }
.dbMain { font-size: 15px; font-weight: 700; line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.debrief.alert .dbMain b { color: var(--red); }
.dbChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dbChip { font-size: 11.5px; padding: 4px 10px; border-radius: var(--r-full); background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
.dbChip b { color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; }
.dbChip.bad b { color: var(--red); }

/* ---------- Dashboard: onboarding (no extension, no trades) ---------- */
.onboard { display: none; text-align: center; padding: 56px 24px; margin-bottom: 20px; background: radial-gradient(ellipse at 50% 0%, rgba(61,214,140,0.10), transparent 60%), var(--card); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--edge); }
#page-dashboard.onboarding .onboard { display: block; }
#page-dashboard.onboarding .debrief, #page-dashboard.onboarding .hero, #page-dashboard.onboarding #statGrid, #page-dashboard.onboarding .chartsRow { display: none; }
.obIcon { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.3); box-shadow: 0 0 28px rgba(61,214,140,0.18); }
.onboard h2 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -0.03em; line-height: 1.2; margin: 0 auto 10px; max-width: 520px; text-wrap: balance; }
.onboard h2 span { color: var(--accent); }
.onboard p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 auto 22px; max-width: 460px; }

/* ---------- Top bar: Pro export ---------- */
.proBtn { gap: 7px; }
.proBtn .badge.pro { font-size: 9.5px; padding: 1px 6px; letter-spacing: .05em; }
.proBtn svg { opacity: .8; }
@media (max-width: 560px) { .proBtn .pbLabel { display: none; } }

/* ---------- Trade modal: playbook, on-chain context, actions ---------- */
.tdChain { margin-bottom: 16px; }
.tdNotesLabel small { text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 11px; }
.chainRow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chainBar { height: 4px; border-radius: 999px; background: var(--border); margin-top: 8px; overflow: hidden; }
.chainBar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 400ms var(--ease-out); }
.chainBar i.risky { background: var(--red); }
.tdActions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.tdActions .btn { justify-content: center; gap: 7px; padding: 10px 20px; font-size: 13px; }
/* Destructive action kept available but quiet: a text link, red only on intent. */
.tdDeleteLink {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.2);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
.tdDeleteLink svg { width: 13px; height: 13px; }
.tdDeleteLink:hover, .tdDeleteLink:focus-visible { color: var(--red); text-decoration-color: currentColor; }
.btn.shareX { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 6px 22px rgba(61,214,140,0.3); }
.btn.shareX:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 8px 28px rgba(61,214,140,0.45); }

/* ---------- Positioning update (2026-10-08): proof source, why pay / trust, early-access pricing ---------- */
.pSrcLine { margin-left: auto; color: var(--faint); font-size: 10.5px; letter-spacing: .02em; }
.lpGrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lpGrid2 .lpCard h3 { font-size: 18px; margin-top: 4px; }
.lpGrid2 .lpCard p + p { margin-top: 12px; }
.lpCard code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--text); background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 5px; }
.lpCard a { color: var(--accent); }
.seeList { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.seeList b { display: block; font-size: 11px; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin-bottom: 2px; }
.seeList b.acc { color: var(--accent); }
.seeList b.down { color: var(--red); }
.priceNote { margin: -6px 0 16px; color: var(--faint); font-size: 12px; }
.priceCard li.soon { color: var(--faint); }
.priceCard li.soon::before { background: var(--faint); }
.soonCell { color: var(--muted); font-size: 12px; }
@media (max-width: 820px) {
  .lpGrid2 { grid-template-columns: 1fr; }
  .pSrcLine { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Lot 1 (2026-10-08): nav CTA, landing visible without JS, waitlist question, mid-page form ---------- */
html.vPricing #view-landing { display: none; }
.lpTrust li a { display: inline-flex; align-items: center; gap: inherit; color: inherit; text-decoration: none; }
.lpTrust li a:hover { color: var(--text); }
.midJoin { padding-top: 0; }
.midJoin .wlForm { max-width: 640px; margin: 0 auto; }
.wlAsk { margin-top: 12px; }
.wlAsk p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wlAskOpts { display: flex; flex-wrap: wrap; gap: 8px; }
.wlAskOpts button { font: 600 13px "Geist", sans-serif; color: var(--text); background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.3); border-radius: var(--r-full); padding: 8px 14px; min-height: 36px; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.wlAskOpts button:hover { background: rgba(61,214,140,0.16); border-color: rgba(61,214,140,0.55); }
.wlAskOpts button:focus-visible, .wlDone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wlDone:focus { outline: none; }
html.mobile .lpNavCta .navLogin { display: none !important; }
.fieldHead { display: flex; justify-content: space-between; align-items: baseline; }
.fieldHead label { font-size: 12px; font-weight: 600; color: var(--muted); }
button.auLink { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; }
.navItem[hidden], .mTab[hidden] { display: none !important; }
.chatQuota { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; color: var(--faint); font-size: 11.5px; }
.chatQuota.low { color: var(--muted); }
#err { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wlFollow { display: inline-block; margin-top: 10px; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.wlFollow:hover { text-decoration: underline; text-underline-offset: 3px; }
.footX { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 32px; height: 32px; margin: -6px 2px -6px 0; border-radius: 8px; opacity: 0.85; transition: opacity 150ms ease, background-color 150ms ease; }
.footX img { display: block; width: 20px; height: 20px; }
.footX:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.footX:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Centered forms: the message is one paragraph (it can hold a link), not a flex row. */
.wlForm.center .wlMsg { display: block; text-align: center; line-height: 1.5; }
.wlMsg a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* ---------- App shell (2026-10-08): side columns pinned to the window, only the page scrolls ---------- */
@media (min-width: 721px) {
  html:not(.mobile) .sidebar, html:not(.mobile) .rightPanel {
    position: sticky; top: 0; align-self: start;
    height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  html:not(.mobile) .sidebar::-webkit-scrollbar, html:not(.mobile) .rightPanel::-webkit-scrollbar { display: none; }
}
#pageNavBottom { display: flex; flex-direction: column; margin: 0 -10px 10px; }
.sidebar.onBottomNav #pageNav .slideInd { opacity: 0; }

/* ---------- Lot 2 (2026-10-08): accessibility and robustness ---------- */
.skipLink { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skipLink:focus { top: 12px; }
main:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1.pageTitle { margin: 0; }
/* S19: a visible focus ring on every field and control */
.navItem:focus-visible, .tab:focus-visible, .calCell:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.calCell.hasTrades { cursor: pointer; }
/* S21: comfortable footer links on touch */
.lpFoot a:not(.footX), .appFoot a:not(.footX), .lpMore a { display: inline-block; padding: 8px 2px; }
/* A8: toasts */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border-strong); box-shadow: 0 16px 40px rgba(0,0,0,0.5); color: var(--text); font-size: 13px; animation: emoIn 200ms var(--ease-out); }
.toast button { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; }
html.mobile #toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
.modalOverlay { overscroll-behavior: contain; }
/* A dialog is open: the page behind it stays put (the gutter avoids a layout jump when the scrollbar goes). */
html { scrollbar-gutter: stable; }
html.scrollLock, html.scrollLock body { overflow: hidden; }
.modalCard, .notifList { overscroll-behavior: contain; }
/* A17 / A19 / A20: phone sizes */
html.mobile .calCell .day, html.mobile .calDow { font-size: 11px; }
html.mobile .calCell .pnl { font-size: 11px; }
html.mobile .tabs > .tab { min-height: 38px; display: inline-flex; align-items: center; }
html.mobile .iconBtn { min-width: 40px; min-height: 40px; }
html.mobile #exportCsv::after { content: "CSV"; margin-left: 4px; font-weight: 600; font-size: 12px; }
/* S15: reduced motion: page entrances fade without sliding (the rest of the site is already tuned) */
@media (prefers-reduced-motion: reduce) {
  @keyframes pageIn { from { opacity: 0; } }
}
[aria-invalid="true"] { border-color: var(--red) !important; }
.cfType { display: grid; gap: 8px; margin: 14px 0 4px; text-align: left; color: var(--muted); font-size: 12.5px; }
.cfType b { color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; }
.confirmCard .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Lot 3 (2026-10-08): sessions, clickable flags, onboarding steps, journal pages ---------- */
/* Debrief flags are buttons when they lead to trades */
button.dbChip { font: inherit; font-size: 11.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: border-color 150ms ease, background-color 150ms ease; }
button.dbChip:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.04); }
.dbGo { color: var(--faint); margin-left: 2px; transition: transform 160ms var(--ease-out), color 150ms ease; }
button.dbChip:hover .dbGo { color: var(--text); transform: translateX(2px); }
.dbJump { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; margin-left: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* Sessions of the period */
.dbSessions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.dbSessions::-webkit-scrollbar { display: none; }
.dbSessions[hidden] { display: none; }
.dbSess { flex-shrink: 0; display: grid; gap: 2px; text-align: left; font: inherit; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.dbSess b { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.dbSess span { font-size: 11px; white-space: nowrap; }
.dbSess i { font-style: normal; font-family: "Geist Mono", ui-monospace, monospace; }
.dbSess:hover { border-color: var(--border-strong); }
.dbSess.on { border-color: var(--accent); background: rgba(61,214,140,0.08); }
.dbSess.alert:not(.on) { border-color: rgba(240,86,92,0.35); }
/* Onboarding steps */
.obSteps { list-style: none; padding: 0; margin: 4px auto 22px; max-width: 520px; display: grid; gap: 10px; text-align: left; }
.obStep { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--panel); color: var(--muted); }
.obStep b { color: var(--text); font-size: 14px; }
.obStep p { margin: 2px 0 0 !important; max-width: none !important; font-size: 13px !important; }
.obStep .btn { margin-top: 10px; text-decoration: none; }
.obPlats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.obPlats .btn { margin-top: 0; gap: 7px; text-decoration: none; }
.obPlats img { width: 16px; height: 16px; border-radius: 4px; }
.obPlats span { opacity: .6; }
.obNum { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px "Geist Mono", ui-monospace, monospace; color: var(--muted); border: 1px solid var(--border-strong); }
.obStep.done .obNum { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.obStep.done b { color: var(--muted); }
.obStep.current { border-color: rgba(61,214,140,0.45); background: rgba(61,214,140,0.06); }
.obStep.current .obNum { border-color: var(--accent); color: var(--accent); }
.obMobile { display: none; }
html.mobile .obMobile { display: block; color: var(--text) !important; background: rgba(61,214,140,0.08); border: 1px solid rgba(61,214,140,0.3); border-radius: var(--r-md); padding: 10px 12px; max-width: 520px; }
.obExample { max-width: 640px; margin: 8px auto 0; text-align: left; }
.obExTag { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: var(--r-full); border: 1px dashed var(--border-strong); color: var(--faint); font: 600 10.5px "Geist Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
#page-dashboard.onboarding .obExample .debrief { display: block; margin-bottom: 0; opacity: 0.92; }
/* While there's no trade at all, hide the controls that would act on nothing */
.shell.isOnboarding #periodTabs, .shell.isOnboarding #exportCsv, .shell.isOnboarding #unitToggle { display: none !important; }
.shell.isOnboarding .rightPanel { display: none !important; }
/* Journal pages */
.jMore { display: flex; justify-content: center; margin: 18px 0 6px; }
.jMore[hidden] { display: none; }
#journalList > * { content-visibility: auto; contain-intrinsic-size: auto 150px; }
/* Example insight in the coach, never mistaken for the user's data */
.csInsight.example { border-style: dashed; border-color: var(--border-strong); background: var(--panel); }
.csInsight.example .csTag { color: var(--faint); }
/* ---------- Lot 3 (site): debrief first, trust higher, why Pro ---------- */
/* Hero: the debrief card in front of the terminal */
.mockDebrief > div { min-width: 0; }
.mockDebrief p { margin: 2px 0 0; }
.mdChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mdChips span { font-size: 11px; padding: 3px 9px; border-radius: var(--r-full); background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
.mdChips i { font-style: normal; font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; color: var(--text); margin-left: 3px; }
.mdChips .bad i { color: var(--red); }
/* Phones: the debrief card alone (the terminal mock is too small to read there) */
html.mobile .mock .term { display: none; }
html.mobile .mock .mockCoach { margin: 0; }
/* S27: a soft shade behind the hero text, so the background candles never cross the copy */
.lpHero > div:first-child { position: relative; isolation: isolate; }
.lpHero > div:first-child::before { content: ""; position: absolute; inset: -40px -60px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(6,16,11,0.78), rgba(6,16,11,0)); }
/* "Your debrief" section */
.dbDemo { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.dbDemo .debrief { margin-bottom: 0; }
.dbDemo .dbSess { cursor: default; }
.dbDemoList { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.dbDemoList li { color: var(--muted); font-size: 13.5px; line-height: 1.6; padding-left: 16px; border-left: 2px solid rgba(61,214,140,0.4); }
.dbDemoList b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.trustCard { max-width: 860px; margin: 0 auto; }
.trustCard h3 { font-size: 18px; margin-top: 4px; }
/* Why Pro, beside the two plans */
.lpPricing:has(.whyPro) { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.9fr); max-width: none; }
.whyPro { align-self: center; padding: 4px 4px 4px 20px; border-left: 2px solid rgba(61,214,140,0.4); }
.whyPro p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.whyPro b { color: var(--text); }
/* Coach mock: visibly an example */
.cmExample { margin-left: 8px; padding: 2px 8px; border-radius: var(--r-full); border: 1px dashed var(--border-strong); color: var(--faint); font: 600 10px "Geist Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 820px) {
  .dbDemo, .lpPricing:has(.whyPro) { grid-template-columns: minmax(0, 1fr); }
  .whyPro { padding-left: 16px; }
}
.cmHead .cmExample { margin-right: auto; }
.dbDemo > *, .obExample, #page-dashboard > * { min-width: 0; }

/* ---------- Lot 4 (2026-10-08): discipline page, rules, weekly review, dashboard line ---------- */
.discRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: -6px 0 20px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card); box-shadow: var(--edge); font-size: 13px; color: var(--muted); }
.discRow[hidden] { display: none; }
.drItem b { color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; font-weight: 700; margin-right: 3px; }
.drItem b.up { color: var(--green); } .drItem b.down { color: var(--red); }
.drK { color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-right: 8px; }
.drGo { margin-left: auto; gap: 6px; }
#page-dashboard.onboarding .discRow { display: none; }

.dsTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dsWeekNav { display: flex; align-items: center; gap: 10px; }
.dsWeekLabel { font-weight: 700; font-size: 15px; min-width: 200px; text-align: center; }
.dsWeekNav .iconBtn[disabled] { opacity: .35; cursor: default; }
.dsPro { font: 600 10.5px "Geist Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding: 4px 10px; border-radius: var(--r-full); border: 1px solid rgba(61,214,140,0.35); background: rgba(61,214,140,0.08); }
.dsStats { margin-bottom: 16px; }
.dsCard { margin-bottom: 16px; }
.dsLead { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 4px 0 14px; }
.dsReviewed .dsOk { font-size: 11px; }
.dsFacts { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.dsFacts b { color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; }
.dsFacts b.down { color: var(--red); }
.dsPair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dsPick { display: grid; gap: 3px; text-align: left; font: inherit; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; transition: border-color 150ms ease; }
.dsPick:hover { border-color: var(--border-strong); }
.dsPick.bad { border-color: rgba(240,86,92,0.35); }
.dsPick.good { border-color: rgba(61,214,140,0.35); }
.dsPickK { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.dsPick b { color: var(--text); font-size: 13.5px; }
.dsPick span:last-child, .dsSessMain span { font-size: 12px; }
.dsPick i, .dsSessMain i { font-style: normal; font-family: "Geist Mono", ui-monospace, monospace; }
.dsKeep { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.dsKeepRow { display: grid; gap: 8px; }
.dsKeepRow [hidden] { display: none; }
.dsActions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dsStatus { margin-right: auto; color: var(--muted); font-size: 12.5px; }
.dsRule { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.dsRule:first-child { border-top: 0; padding-top: 0; }
.dsRuleSwitch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.dsRuleSwitch input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.dsRuleSwitch b { display: block; color: var(--text); font-size: 13.5px; }
.dsRuleSwitch small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.45; }
.dsRuleVal { display: flex; align-items: center; gap: 8px; }
.dsRuleVal .input { min-width: 0; text-align: right; font-family: "Geist Mono", ui-monospace, monospace; }
.dsRuleVal .input:disabled { opacity: .45; }
.dsUnit { color: var(--faint); font-size: 12px; width: 44px; }
#dsRulesForm .dsActions { padding-top: 14px; border-top: 1px solid var(--border); }
.dsSessList { display: grid; gap: 8px; }
.dsSessRow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; cursor: pointer; transition: border-color 150ms ease; }
.dsSessRow:hover { border-color: var(--border-strong); }
.dsSessMain { display: grid; gap: 2px; min-width: 0; }
.dsSessMain b { color: var(--text); font-size: 13px; }
.dsSessFlags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.dsOk, .dsBad { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-full); white-space: nowrap; }
.dsOk { color: var(--green); background: rgba(61,214,140,0.1); border: 1px solid rgba(61,214,140,0.3); }
.dsBad { color: var(--red); background: rgba(240,86,92,0.08); border: 1px solid rgba(240,86,92,0.3); }
html.mobile .dsPair, html.mobile .dsRule { grid-template-columns: minmax(0, 1fr); }
html.mobile .dsSessRow { grid-template-columns: minmax(0, 1fr) auto; }
html.mobile .dsSessFlags { grid-column: 1 / -1; justify-content: flex-start; }
html.mobile .dsWeekLabel { min-width: 0; }
html.mobile .drGo { margin-left: 0; }

/* Open beta: join buttons (replace the waitlist forms) */
.joinCtas { display: grid; gap: 10px; }
.joinCtas.center { justify-items: center; text-align: center; }
.joinBtns { display: flex; flex-wrap: wrap; gap: 10px; }
.joinCtas.center .joinBtns { justify-content: center; }
.joinBtns .btn { gap: 8px; text-decoration: none; }
.addChrome svg { flex-shrink: 0; }
.joinNote { margin: 0; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.joinCtas.center .joinNote { justify-content: center; }
@media (max-width: 560px) { .joinBtns { flex-direction: column; align-items: stretch; } .joinBtns .btn { justify-content: center; } }

/* ---------- Stats (founder only) ---------- */
.stHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.stHead .dsLead { margin: 0; }
.stHead .btn { gap: 6px; flex-shrink: 0; }
.stHead .btn svg { width: 14px; height: 14px; }
.stTiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.mobile .stTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stTiles .statTile .stSub { color: var(--faint); font-size: 11px; margin-top: 4px; }
.stChartTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stChartSum { color: var(--muted); font-size: 12.5px; }
.stChartSum b { color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; }
.stChartSum .pos { color: var(--accent); font-weight: 600; }
.stChartSum .neg { color: var(--red, #f0565c); font-weight: 600; }
.stChart { display: block; width: 100%; height: 150px; }
.stChart g:hover rect:not(.hit) { opacity: 1; }
.stAxis { display: flex; justify-content: space-between; gap: 10px; color: var(--faint); font-size: 11px; margin-top: 8px; }
.stCards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; align-items: start; }
.stCard { margin-bottom: 16px; }
.stKv > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.stKv > div:first-child { border-top: 0; }
.stKv span { color: var(--muted); }
.stKv b { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; text-align: right; letter-spacing: -0.02em; }
.stKv em, .stRow em, .stStepTop em { font-style: normal; color: var(--faint); font-weight: 500; font-size: 11px; }
.stSubhead { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.stList { display: flex; flex-direction: column; gap: 9px; }
.stRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; }
.stK { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stV { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: -0.02em; }
.stBar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: var(--field, rgba(255,255,255,0.05)); overflow: hidden; }
.stBar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .8; }
.stBar.big { height: 8px; }
.stFunnel { display: flex; flex-direction: column; gap: 12px; }
.stStepTop { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.stStepTop b { font-family: "Geist Mono", ui-monospace, monospace; margin-left: auto; }
.stNote, .stEmpty { color: var(--faint); font-size: 12px; line-height: 1.5; margin: 12px 0 0; }
.stEmpty { margin: 0; }
.stNote a { color: var(--accent); text-decoration: none; font-weight: 600; }
.stLinks { display: flex; flex-direction: column; gap: 9px; }
.stLinks a { color: var(--text); font-size: 13px; text-decoration: none; }
.stLinks a:hover { color: var(--accent); }
html.mobile .stHead { flex-direction: column; align-items: flex-start; }

/* ---------- Open positions (from the extension) ---------- */
.openBadge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; border: 1px solid rgba(61,214,140,0.4); background: rgba(61,214,140,0.1); color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; flex-shrink: 0; }
.openBadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: opPulse 1.6s ease-in-out infinite; }
.openBadge.sm { height: 18px; padding: 0 7px; font-size: 10px; margin-left: 4px; }
@keyframes opPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .openBadge::before { animation: none; } }
.panelCount { color: var(--accent); font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; }
#openPosPanel { margin-bottom: 26px; }
.openPosList { display: flex; flex-direction: column; gap: 8px; }
.openPos { padding: 12px; border-radius: var(--r-md); border: 1px solid rgba(61,214,140,0.3); background: linear-gradient(180deg, rgba(61,214,140,0.07), rgba(61,214,140,0.02)); }
.opTop { display: flex; align-items: center; gap: 9px; }
.opTop .avatar { width: 28px; height: 28px; font-size: 10px; }
.opName { flex: 1; min-width: 0; }
.opName b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opName small { color: var(--faint); font-size: 10.5px; }
.opStats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.opStats span { display: block; color: var(--faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; }
.opStats b { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: -0.02em; }
.opLink { color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none; }
.opLink:hover { text-decoration: underline; }
.jOpenPos { margin-bottom: 14px; }
.jOpenHead { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 8px; }
.jOpenHead span { color: var(--accent); font-family: "Geist Mono", ui-monospace, monospace; }
.jOpenGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.journalCard.isOpen { border-style: dashed; border-color: rgba(61,214,140,0.35); cursor: default; }
.journalCard.isOpen .tok { color: var(--text); }
.jcLocked { color: var(--faint); font-size: 12px; margin-top: 6px; }
.openPosList .opStats b { font-size: 11px; white-space: nowrap; }
.openPosList .opName small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
