/* Pulse — Earshot's system: warm beige, drifting wash, frosted glass, one number per view. */

@font-face {
  font-family: 'Bricolage';
  src: url('fonts/bricolage.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #F6F1EA;
  --ink: #2A241E;
  --ink-2: #544A40;
  --muted: #72675B;
  --line: rgba(42, 36, 30, .09);
  --glass: rgba(255, 255, 255, .46);
  --glass-hi: rgba(255, 255, 255, .7);
  --glass-edge: rgba(255, 255, 255, .72);
  --shadow: 0 1px 2px rgba(60, 44, 28, .05), 0 14px 34px rgba(60, 44, 28, .08);
  --gain: #3A7236;
  --gain-fill: #4E8F4A;
  --loss: #A3321F;
  --display: 'Bricolage', ui-rounded, -apple-system, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* per-view hue family */
  --accent: #4E8F4A; --accent-ink: #3A7236; --accent-soft: rgba(78, 143, 74, .16);
  --w1: #D9EBCF; --w2: #EEE6C4; --w3: #CFE6DB;
}
body[data-view="me"]         { --accent: #C8663A; --accent-ink: #A64B22; --accent-soft: rgba(200, 102, 58, .16); --w1: #FFD9B8; --w2: #F3D3E4; --w3: #FBE6CF; }
body[data-view="signals"]    { --accent: #3F7DBA; --accent-ink: #2F649A; --accent-soft: rgba(63, 125, 186, .16); --w1: #CFE0F2; --w2: #DCD6F0; --w3: #CDE9EC; }
body[data-view="positions"]  { --accent: #C8663A; --accent-ink: #A64B22; --accent-soft: rgba(200, 102, 58, .16); --w1: #FFD9B8; --w2: #F9C9C0; --w3: #FBE6CF; }
body[data-view="memes"]      { --accent: #23937A; --accent-ink: #1A7461; --accent-soft: rgba(35, 147, 122, .16); --w1: #CDEBE0; --w2: #E3D5F3; --w3: #FBE6CF; }
body[data-view="strategies"] { --accent: #8A5CBF; --accent-ink: #6F45A2; --accent-soft: rgba(138, 92, 191, .16); --w1: #E3D5F3; --w2: #F3D3E4; --w3: #D8DDF5; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--accent-soft); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- wash ---------- */
.wash { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.wash i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; transition: background 1.2s var(--ease-out); }
.wash i:nth-child(1) { width: 80vmax; height: 80vmax; left: -42vmax; top: -46vmax; background: var(--w1); animation: d1 26s ease-in-out infinite alternate; }
.wash i:nth-child(2) { width: 66vmax; height: 66vmax; right: -44vmax; top: 22vh; background: var(--w2); animation: d2 31s ease-in-out infinite alternate; }
.wash i:nth-child(3) { width: 58vmax; height: 58vmax; left: -14vmax; bottom: -48vmax; background: var(--w3); animation: d3 23s ease-in-out infinite alternate; }
@keyframes d1 { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes d2 { to { transform: translate(-10vmax, -4vmax) scale(.94); } }
@keyframes d3 { to { transform: translate(6vmax, -8vmax) scale(1.1); } }
.wash::after {
  content: ''; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .5; mix-blend-mode: multiply;
}

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
  border-radius: 28px;
}

/* ---------- chrome ---------- */
.bar { position: sticky; top: 0; z-index: 20; max-width: 640px; margin: 0 auto; padding: 14px 20px 10px; }
.bar::before {
  content: ''; position: absolute; inset: 0 -100vw -24px; z-index: -1;
  background: rgba(246, 241, 234, .55);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.bar.scrolled::before { opacity: 1; }
.row { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 19px/1 var(--display); letter-spacing: -.015em; }
.brand svg { color: var(--accent); transition: color .6s var(--ease-out); }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--glass-edge); font: 600 12.5px/1 var(--text); letter-spacing: .01em;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok .dot { background: var(--gain-fill); box-shadow: 0 0 0 3px rgba(78, 143, 74, .18); }
.pill.warn .dot { background: #B7801F; }
.pill.bad .dot { background: var(--loss); }

.tabs { position: relative; display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr); padding: 4px; margin-top: 10px; border-radius: 16px; }
.tabs button { position: relative; z-index: 1; height: 36px; border-radius: 12px; font: 600 13.5px/1 var(--text); color: var(--ink-2); transition: color .3s var(--ease), transform .1s; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button:active { transform: scale(.96); }
.tab-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--tabs, 5)); border-radius: 12px;
  background: var(--glass-hi); box-shadow: 0 1px 2px rgba(60, 44, 28, .08), 0 4px 12px rgba(60, 44, 28, .08), inset 0 1px 0 #fff;
  transition: transform .5s var(--ease);
}

/* ---------- views ---------- */
main { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 18px 20px 80px; }
.view { display: none; }
.view.on { display: block; }
.view.on > * { animation: rise .8s var(--ease-out) both; }
.view.on > *:nth-child(2) { animation-delay: 60ms; }
.view.on > *:nth-child(3) { animation-delay: 120ms; }
.view.on > *:nth-child(4) { animation-delay: 180ms; }
.view.on > *:nth-child(n+5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .view.on > * { animation: none; } .wash i { animation: none; } }

.lead { margin: 18px 0 4px; font: 500 21px/1.25 var(--display); letter-spacing: -.01em; color: var(--ink-2); }
.display { font: 700 clamp(64px, 17vw, 92px)/.92 var(--display); letter-spacing: -.04em; display: flex; align-items: baseline; min-height: .92em; }
.display .unit { font-size: .42em; font-weight: 500; color: var(--accent-ink); margin-left: .08em; letter-spacing: -.02em; }
.display .unit.pre { margin: 0 .04em 0 0; }
.display.gain { color: var(--gain); } .display.loss { color: var(--loss); }
.note { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); max-width: 46ch; }
.note b { color: var(--ink); font-weight: 650; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { padding: 6px 11px; border-radius: 99px; background: var(--glass-hi); border: 1px solid var(--glass-edge); font: 650 13.5px/1.2 var(--text); font-variant-numeric: tabular-nums; }
.chip.gain { color: var(--gain); } .chip.loss { color: var(--loss); }
.sub { font: 650 17px/1.2 var(--display); letter-spacing: -.015em; margin: 28px 4px 10px; }

.panel { padding: 18px 16px 16px; margin-top: 24px; }
.panel-head { display: flex; justify-content: space-between; font: 600 13.5px/1 var(--text); margin-bottom: 12px; }
.curve { width: 100%; height: 170px; display: block; overflow: visible; }
.curve .area { fill: var(--accent-soft); }
.curve .line { fill: none; stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.curve .base { stroke: var(--line); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.curve-empty { display: grid; place-items: center; height: 170px; color: var(--muted); font-size: 14.5px; text-align: center; padding: 0 20px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; padding: 6px 16px; margin-top: 14px; }
.fact { padding: 13px 0; border-bottom: 1px solid var(--line); }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 2px 0 0; font: 650 17px/1.2 var(--text); font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */
.list { padding: 4px 0; margin-top: 16px; }
.item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); transition: background .2s; }
.item:last-child { border-bottom: 0; }
.item:hover { background: rgba(255, 255, 255, .35); }
.item:active { transform: scale(.99); }
.badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 700 12px/1 var(--display); letter-spacing: -.01em; }
.badge.long { background: rgba(78, 143, 74, .15); color: var(--gain); }
.badge.short { background: rgba(163, 50, 31, .12); color: var(--loss); }
.item .t { font: 700 16px/1.2 var(--display); letter-spacing: -.01em; }
.item .s { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .v { text-align: right; font: 650 15px/1.2 var(--text); font-variant-numeric: tabular-nums; }
.item .v small { display: block; font: 400 12.5px/1.3 var(--text); color: var(--muted); }
.gain { color: var(--gain); } .loss { color: var(--loss); }
.empty { padding: 26px 20px; text-align: center; color: var(--ink-2); font-size: 15px; }
.empty b { display: block; font: 650 17px/1.3 var(--display); color: var(--ink); margin-bottom: 4px; }

.filters { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.fchip { padding: 8px 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-edge); font: 600 13.5px/1 var(--text); color: var(--ink-2); transition: all .25s var(--ease); }
.fchip.on { background: var(--ink); color: #FFF8EF; border-color: var(--ink); }

/* progress between stop and target */
.track { position: relative; height: 6px; border-radius: 3px; background: rgba(42, 36, 30, .1); margin-top: 8px; }
.track i { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .8); }
.track .entry { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-2); border-radius: 1px; }
.track-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pos { padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pos:last-child { border-bottom: 0; }
.pos-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }

/* ---------- strategy cards ---------- */
.strat { padding: 18px 16px; margin-top: 14px; }
.strat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.strat h3 { margin: 0; font: 700 18px/1.15 var(--display); letter-spacing: -.015em; }
.strat .hyp { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.verdict { flex: none; padding: 5px 10px; border-radius: 99px; font: 650 12.5px/1 var(--text); }
.verdict.deploy { background: rgba(78, 143, 74, .15); color: var(--gain); }
.verdict.refine { background: rgba(183, 128, 31, .15); color: #8A5E10; }
.verdict.abandon { background: rgba(42, 36, 30, .08); color: var(--muted); }
.strat.off { opacity: .72; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.kv div { font-size: 12.5px; color: var(--muted); }
.kv b { display: block; font: 650 16px/1.25 var(--text); color: var(--ink); font-variant-numeric: tabular-nums; }
.mini { width: 100%; height: 64px; margin-top: 12px; display: block; }
.mini .line { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.mini .area { fill: var(--accent-soft); }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.checks li { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .55); color: var(--ink-2); }
.checks li.no { color: var(--loss); background: rgba(163, 50, 31, .07); }
.live-line { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.live-line b { color: var(--ink); font-weight: 650; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(42, 36, 30, .18); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto;
  max-width: 640px; margin: 0 auto; padding: 10px 20px 32px;
  background: rgba(248, 244, 238, .9); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  border-radius: 30px 30px 0 0; box-shadow: 0 -10px 60px rgba(60, 44, 28, .18);
  transform: translateY(105%); transition: transform .55s var(--ease);
}
.sheet.on { transform: none; }
@media (min-width: 700px) { .sheet { bottom: auto; top: 50%; border-radius: 30px; transform: translateY(-40%) scale(.96); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .3s; } .sheet.on { transform: translateY(-50%); opacity: 1; pointer-events: auto; } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(42, 36, 30, .18); margin: 0 auto 12px; }
.close { position: absolute; right: 14px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.close:active { transform: scale(.9); }
.sheet h2 { margin: 6px 0 2px; font: 700 26px/1.05 var(--display); letter-spacing: -.03em; }
.sheet .meta { color: var(--ink-2); font-size: 14.5px; }
.chart { height: 300px; margin-top: 16px; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .5); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.levels div { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .6); font-size: 12.5px; color: var(--muted); }
.levels b { display: block; font: 650 16px/1.3 var(--text); color: var(--ink); font-variant-numeric: tabular-nums; }
.reasons { margin: 14px 0 0; padding: 0; list-style: none; }
.reasons li { padding: 9px 0 9px 22px; position: relative; border-bottom: 1px solid var(--line); font-size: 15px; }
.reasons li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.timeline div { display: flex; justify-content: space-between; padding: 6px 0; }

/* rolling digits */
.roll { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.roll span { display: block; transition: transform 1.25s var(--ease-out); }
.roll span i { display: block; height: 1em; font-style: normal; }

@media (max-width: 420px) { .kv { grid-template-columns: repeat(2, 1fr); } .levels { grid-template-columns: 1fr 1fr 1fr; } }

/* login page */
.login { max-width: 440px; padding-top: 12vh; }
.login .panel { margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 20px; border-radius: 16px; background: var(--ink); color: #FFF8EF; font: 600 16px/1 var(--text); text-decoration: none; box-shadow: 0 2px 4px rgba(42, 36, 30, .16), 0 10px 26px rgba(42, 36, 30, .18); transition: transform .35s var(--ease); }
.btn:active { transform: scale(.96); transition-duration: .1s; }

/* memecoins */
.coin { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; font: 700 13px/1 var(--display); color: var(--accent-ink); }
.ladder { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; }
.ladder i { width: 7px; height: 7px; border-radius: 50%; background: rgba(42, 36, 30, .15); }
.ladder i.on { background: var(--accent); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font: 650 11.5px/1.5 var(--text); background: rgba(42, 36, 30, .07); color: var(--ink-2); }
.tag.signal { background: rgba(35, 147, 122, .16); color: var(--accent-ink); }
.tag.watching { background: rgba(63, 125, 186, .14); color: #2F649A; }
.tag.unsafe { background: rgba(163, 50, 31, .1); color: var(--loss); }
.radar-why { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .tabs button { font-size: 12px; } }

/* member accounts */
.brand-icon { border-radius: 50%; box-shadow: 0 2px 8px rgba(60, 44, 28, .15); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn.ghost { background: var(--glass-hi); color: var(--ink); box-shadow: var(--shadow), inset 0 1px 0 #fff; border: 1px solid var(--glass-edge); }
.btn:disabled { opacity: .45; }
button.btn { border: 0; cursor: pointer; }
.link { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.item.static { cursor: default; }
.item.static:hover { background: none; }
.item.mine { background: var(--accent-soft); }
.prefs { padding: 4px 16px; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pref:last-child { border-bottom: 0; }
.pref b { display: block; font-weight: 650; font-size: 15px; }
.pref small { display: block; color: var(--muted); font-size: 13px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 51px; height: 31px; border-radius: 99px; background: rgba(42, 36, 30, .16); position: relative; cursor: pointer; transition: background .3s var(--ease); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .35s var(--ease); }
.switch:checked { background: var(--gain-fill); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .4; cursor: not-allowed; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 16px; font-weight: 600; font-size: 14.5px; pointer-events: none; transition: all .4s var(--ease); max-width: calc(100% - 32px); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.form { display: grid; gap: 12px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input, .form select { height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, .72); font: 400 16px var(--text); color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, .5); }
.seg2 label { display: block; }
.seg2 input { position: absolute; opacity: 0; }
.seg2 span { display: grid; place-items: center; height: 40px; border-radius: 12px; font-weight: 650; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.seg2 input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(60, 44, 28, .08), 0 4px 12px rgba(60, 44, 28, .08); }
.locked-card { position: relative; z-index: 1; max-width: 600px; margin: 18px auto 0; width: calc(100% - 40px); }
