/* LEDGER — app demo by Forma */
@font-face { font-family: 'Geist'; src: url('fonts/geist-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/geist-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/geist-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Big Shoulders'; src: url('fonts/big-shoulders-display-latin-900-normal.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --bg: #050506; --s1: #0d0e10; --s2: #15161a; --s3: #1f2026; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --tx: #f2f3f5; --tx2: rgba(242,243,245,.6); --tx3: rgba(242,243,245,.36);
  --up: #39ff88; --dn: #ff4d5e; --up-bg: rgba(57,255,136,.12); --dn-bg: rgba(255,77,94,.12);
  --accent: #39ff88;
  --chrome: linear-gradient(180deg, #fff 0%, #cfd2d9 30%, #6b6f79 50%, #f4f5f7 56%, #9a9ea8 78%, #fff 100%);
  --r: 18px; --ease: cubic-bezier(.2,.8,.2,1);
  --sans: 'Geist', system-ui, -apple-system, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace; --disp: 'Big Shoulders', Impact, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: #000; color: var(--tx); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.up { color: var(--up); } .dn { color: var(--dn); } .t2 { color: var(--tx2); } .t3 { color: var(--tx3); }
.lbl { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tx3); }

/* desktop stage: the phone floats beside the story; on phones the app is the page */
.stage { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(30px, 6vw, 110px); padding: 40px clamp(20px, 6vw, 110px); background: radial-gradient(80% 60% at 70% 40%, rgba(57,255,136,.07), transparent 60%), #000; }
.story { max-width: 520px; }
.story .mark { font: 900 64px/.8 var(--disp); letter-spacing: .01em; text-transform: uppercase; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 22px; }
.story h1 { font: 500 clamp(28px, 3vw, 42px)/1.08 var(--sans); letter-spacing: -.03em; margin: 0 0 18px; }
.story p { color: var(--tx2); margin: 0 0 22px; }
.story ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.story li { display: flex; gap: 10px; color: var(--tx2); } .story li::before { content: '▸'; color: var(--accent); }
.story .fine { font: 400 12px var(--mono); color: var(--tx3); }
.phone { position: relative; width: 390px; height: 844px; border-radius: 58px; padding: 12px; background: linear-gradient(145deg, #2a2b30, #0c0c0e 40%, #1d1e22); box-shadow: 0 0 0 1.5px #3a3b41, 0 60px 120px -30px rgba(0,0,0,.9), 0 30px 80px -40px rgba(57,255,136,.25); }
.phone::before { content: ''; position: absolute; top: 24px; left: 50%; translate: -50% 0; width: 118px; height: 34px; background: #000; border-radius: 20px; z-index: 30; }
.app { position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden; background: var(--bg); isolation: isolate; }
@media (max-width: 900px) {
  .stage { display: block; padding: 0; }
  .story { display: none; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .phone::before { display: none; }
  .app { border-radius: 0; }
}

/* app chrome */
.status { height: 54px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 30px 6px; font: 600 15px var(--sans); }
.status .bars { display: flex; gap: 6px; align-items: center; font: 500 12px var(--mono); }
@media (max-width: 900px) { .status { display: none; } }
.scr { position: absolute; inset: 54px 0 0; overflow-y: auto; padding: 8px 20px 120px; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
@media (max-width: 900px) { .scr { inset: 0; padding-top: max(16px, env(safe-area-inset-top)); } }
.scr[hidden] { display: none; }
.hd { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 18px; }
.hd h2 { font: 600 28px/1 var(--sans); letter-spacing: -.035em; margin: 0; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; border: 1px solid var(--line); }
.icon-btn svg { width: 18px; height: 18px; }

/* cards */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.hero-pl { padding: 20px 18px 10px; background: radial-gradient(120% 90% at 0% 0%, rgba(57,255,136,.10), transparent 55%), var(--s1); }
.hero-pl .big { font: 500 46px/1 var(--mono); letter-spacing: -.05em; margin: 10px 0 4px; }
.hero-pl .chg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; font: 500 12px var(--mono); }
.hero-pl canvas { width: 100%; height: 110px; margin-top: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini .v { font: 500 26px/1.05 var(--mono); letter-spacing: -.04em; margin-top: 10px; }
.ring { position: relative; width: 64px; height: 64px; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 500 14px var(--mono); }
.rules { display: grid; gap: 2px; }
.rule { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule .box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line2); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.rule.on .box { background: var(--accent); border-color: var(--accent); }
.rule .box svg { width: 13px; height: 13px; opacity: 0; transition: opacity .2s; color: #001a0b; }
.rule.on .box svg { opacity: 1; }
.rule .box { flex: none; }
.rule > span:last-child { flex: 1; text-align: left; } .rule.on > span:last-child { color: var(--tx2); text-decoration: line-through; text-decoration-color: var(--tx3); }

/* trade rows */
.seg { display: flex; padding: 4px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.seg button { flex: 1; height: 36px; border-radius: 10px; font: 500 13px var(--sans); color: var(--tx2); transition: background .25s var(--ease), color .2s; }
.seg button[aria-pressed="true"] { background: var(--s3); color: var(--tx); }
.list { display: grid; }
.trade { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.trade .tk { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 600 11px var(--mono); background: var(--s2); border: 1px solid var(--line); }
.trade .nm { font-weight: 500; } .trade .sub { font: 400 12px var(--mono); color: var(--tx3); margin-top: 2px; }
.trade .pl { text-align: right; font: 500 15px var(--mono); } .trade .r { font: 400 11.5px var(--mono); color: var(--tx3); text-align: right; margin-top: 2px; }
.trade.new { animation: slideIn .6s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-14px); background: var(--up-bg); } }
.daysep { margin: 18px 0 2px; }

/* calendar */
.cal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cal-h b { font: 600 18px var(--sans); letter-spacing: -.02em; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; padding-bottom: 4px; }
.day { aspect-ratio: 1; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 6px; font: 500 10px var(--mono); color: var(--tx3); transition: transform .2s var(--ease); }
.day:active { transform: scale(.94); }
.day b { font: 500 10px var(--mono); }
.day.has { color: var(--tx); }
.day.sel { outline: 1.5px solid var(--tx); outline-offset: 1px; }
.legend { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 3px; }

/* stats */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.metric { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.metric .v { font: 500 22px/1.1 var(--mono); letter-spacing: -.04em; margin-top: 8px; }
.bars { display: grid; gap: 12px; }
.barrow { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.barrow .track { height: 8px; background: var(--s2); border-radius: 8px; overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 8px; transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
canvas.equity { width: 100%; height: 170px; }

/* tab bar */
.tabs { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 20; height: 70px; border-radius: 26px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: rgba(21,22,26,.78); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line2); }
@media (max-width: 900px) { .tabs { bottom: max(14px, env(safe-area-inset-bottom)); } }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 10px var(--sans); color: var(--tx3); transition: color .2s; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--tx); }
.fab { justify-self: center; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: #001a0b; box-shadow: 0 10px 30px -8px rgba(57,255,136,.6); transition: transform .25s var(--ease); }
.fab:active { transform: scale(.92); }
.fab svg { width: 24px; height: 24px; }

/* sheets */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 92%; overflow-y: auto; background: var(--s1); border-radius: 28px 28px 0 0; border-top: 1px solid var(--line2); padding: 10px 20px 34px; transform: translateY(105%); transition: transform .5s var(--ease); touch-action: pan-y; }
.sheet.on { transform: translateY(0); }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line2); margin: 0 auto 16px; }
.sheet h3 { font: 600 22px/1.1 var(--sans); letter-spacing: -.03em; margin: 0 0 16px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field input { height: 48px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); color: var(--tx); padding: 0 14px; font: 500 16px var(--mono); }
.field input:focus { outline: none; border-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.side button { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--s2); font-weight: 600; transition: all .2s; }
.side button[aria-pressed="true"][data-side="long"] { background: var(--up-bg); border-color: var(--up); color: var(--up); }
.side button[aria-pressed="true"][data-side="short"] { background: var(--dn-bg); border-color: var(--dn); color: var(--dn); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tags button { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--s2); font-size: 13px; color: var(--tx2); }
.tags button[aria-pressed="true"] { border-color: var(--tx); color: var(--tx); }
.preview { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: 14px; background: var(--s2); margin-bottom: 14px; }
.preview .num { font-size: 26px; }
.primary { width: 100%; height: 54px; border-radius: 16px; background: var(--tx); color: #000; font-weight: 600; font-size: 16px; transition: transform .2s var(--ease); }
.primary:active { transform: scale(.98); }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; }
canvas.candles { width: 100%; height: 220px; margin: 12px 0; border-radius: 12px; background: var(--s2); }
.kv { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kv div { background: var(--s2); border-radius: 12px; padding: 12px; }
.kv b { display: block; font: 500 16px var(--mono); margin-top: 6px; }
.note { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--s2); color: var(--tx2); font-size: 14px; }
.toast { position: absolute; left: 50%; top: 64px; z-index: 60; translate: -50% -20px; opacity: 0; padding: 10px 16px; border-radius: 99px; background: var(--tx); color: #000; font-weight: 600; font-size: 13px; transition: all .4s var(--ease); white-space: nowrap; }
.toast.on { translate: -50% 0; opacity: 1; }
.disclaimer { text-align: center; margin: 20px 0 0; font: 400 11px var(--mono); color: var(--tx3); }
::view-transition-old(screen), ::view-transition-new(screen) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
