:root { --bg:#0a0a0a; --panel:#141414; --line:#262626; --text:#f4f1ea; --muted:#9a968c; --gold:#e8b94a; --navy:#0B2A6F; }
* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--text); font-family:'Hind','Segoe UI',system-ui,sans-serif; -webkit-text-size-adjust:100%; }
body { min-height:100dvh; display:flex; flex-direction:column; }
.top { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:12px; padding:10px 16px; background:rgba(10,10,10,.92); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.top img { border-radius:10px; }
.top h1 { margin:0; font-size:18px; line-height:1.1; }
.top p { margin:2px 0 0; font-size:12.5px; color:var(--muted); }
main { flex:1; width:100%; max-width:980px; margin:0 auto; padding:14px 16px 120px; }
.chat { display:flex; flex-direction:column; gap:12px; }
.msg { max-width:min(640px,92%); padding:11px 14px; border-radius:16px; font-size:15px; line-height:1.5; overflow-wrap:anywhere; }
.msg.bot { align-self:flex-start; background:var(--panel); border:1px solid var(--line); border-top-left-radius:4px; }
.msg.me { align-self:flex-end; background:var(--gold); color:#1a1405; border-top-right-radius:4px; font-weight:500; }
.msg.wide { max-width:100%; width:100%; padding:12px; }
.muted { color:var(--muted); font-size:13px; }
.msg.me .muted { color:#4a3d12; }
code, pre { font-family:ui-monospace,Menlo,Consolas,monospace; background:#0d0d0d; border:1px solid var(--line); border-radius:8px; }
code { padding:1px 6px; }
pre { padding:10px 12px; margin:8px 0; overflow:auto; }
.shot { display:block; max-width:min(260px,100%); border-radius:10px; }
.composer { position:fixed; left:0; right:0; bottom:0; display:flex; align-items:flex-end; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:rgba(10,10,10,.96); border-top:1px solid var(--line); }
.composer textarea { flex:1; min-height:44px; max-height:180px; resize:none; padding:11px 14px; border-radius:22px; border:1px solid #333; background:#161616; color:var(--text); font:inherit; font-size:16px; outline:none; }
.composer textarea:focus { border-color:var(--gold); }
.composer button { border:0; cursor:pointer; font:inherit; color:var(--text); }
.ic, .go { width:44px; height:44px; border-radius:50%; background:#1c1c1c; font-size:19px; flex:none; }
.go { background:var(--gold); color:#1a1405; }
.ex { height:44px; padding:0 12px; border-radius:22px; background:transparent; border:1px solid #333 !important; color:var(--muted) !important; font-size:13px; }

/* the ledger, like the apps */
.ledhead { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; align-items:center; margin-bottom:8px; }
.tools button, .after button, .mtabs button, .sides button { border:1px solid #333; background:#1c1c1c; color:var(--text); border-radius:999px; padding:7px 14px; font:inherit; font-size:13.5px; cursor:pointer; }
.tools { display:flex; gap:6px; }
.mname { font-weight:700; font-size:17px; margin:4px 0 8px; color:var(--gold); }
.mtabs, .sides { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px; }
.mtabs button.on, .sides button.on { background:var(--gold); color:#1a1405; border-color:var(--gold); font-weight:700; }
.notes { font-size:13.5px; background:#1a1608; border:1px solid #3a3010; border-radius:10px; padding:9px 12px; margin-bottom:10px; }
.after { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.sheet { color:#111; }
.sec { background:#fff; border:1px solid; border-radius:12px; overflow:hidden; margin-bottom:14px; }
.sec header { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:9px 12px; color:#fff; }
.sec h4 { margin:0; font-size:16px; font-weight:900; }
.sec header span { background:rgba(255,255,255,.22); border-radius:8px; padding:3px 10px; font-weight:900; font-size:14.5px; white-space:nowrap; }
.scroll { padding:8px; overflow-x:auto; }
.line { display:flex; align-items:stretch; gap:4px; margin-bottom:4px; width:max-content; }
.lab { width:34px; text-align:center; font-weight:900; font-size:14px; align-self:center; }
.cell { flex:none; text-align:center; padding:5px 0; border:1px solid #d9dee8; border-radius:6px; background:#fff; }
.cn { display:block; font-size:11.5px; color:#6b7280; font-weight:600; }
.cell b { display:block; font-size:14px; font-weight:900; color:#000; }
.cell b.dim { color:#9aa1ad; }
.cs { display:block; font-size:10.5px; color:#6b7280; }
.tcell { flex:none; display:flex; align-items:center; justify-content:center; border-radius:6px; font-weight:900; font-size:14.5px; padding:0 4px; }
.colh { width:58px; flex:none; text-align:center; font-weight:900; font-size:14px; }
.colh.tot { width:74px; }
.bgroup { margin-bottom:10px; }
.bt { font-weight:900; margin-bottom:4px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { border:1px solid; border-radius:8px; padding:5px 10px; font-weight:800; font-size:13.5px; }
.check { margin-top:8px; padding:10px; border-radius:8px; font-weight:800; font-size:13.5px; }
.check.good { background:#2E9E5B1a; color:#2E9E5B; } .check.bad { background:#D930251a; color:#D93025; }
.pad { padding:8px; } .sec .muted { color:#6b7280; }
.sum { background:#fff; border:1px solid #e3e6ee; border-radius:12px; padding:12px; }
.sum h4 { margin:0 0 8px; font-size:17px; font-weight:900; }
.srow { display:flex; justify-content:space-between; align-items:center; border-radius:10px; padding:10px 12px; margin-bottom:6px; font-weight:700; font-size:15px; }
.srow b { font-size:16.5px; font-weight:900; }
.grand { display:flex; justify-content:space-between; align-items:center; background:var(--navy); color:#fff; border-radius:10px; padding:12px 14px; margin-top:2px; font-weight:900; font-size:16px; }
.grand b { font-size:19px; }
.meta { display:flex; justify-content:space-between; margin-top:6px; font-size:14px; } .meta b { font-weight:900; }

/* markets overview */
.ov { background:#fff; color:#111; border:1px solid #e3e6ee; border-radius:12px; padding:12px; margin-bottom:12px; }
.ov h4 { margin:0 0 8px; font-size:17px; font-weight:900; display:flex; align-items:center; gap:8px; }
.ov h4 span { background:#0B2A6F; color:#fff; border-radius:999px; font-size:12px; padding:1px 9px; }
.ovrow { border-top:1px solid #eef0f5; padding:8px 0; } .ovrow:first-of-type { border-top:0; }
.ovtop { display:flex; justify-content:space-between; gap:8px; font-size:15.5px; }
.ovtot { font-weight:900; }
.ovsplit { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:3px; font-size:13.5px; } .pt b { font-weight:900; }
.ovrow.all { background:#0B2A6F; color:#fff; border-radius:8px; padding:9px 10px; margin-top:6px; border-top:0; }
button.mini { margin-top:6px; border:1px solid #333; background:#1c1c1c; color:var(--text); border-radius:999px; padding:6px 12px; font:inherit; font-size:13px; cursor:pointer; }

@media print {
  body { background:#fff; color:#000; display:block; }
  .top, .composer, .msg:not(.printing), .tools, .mtabs, .sides, .after { display:none !important; }
  main { padding:0; max-width:none; }
  .msg.printing { border:0; background:#fff; padding:0; max-width:none; }
  .ledhead, .mname { color:#000; }
  .scroll { overflow:visible; }
  .sec, .sum { break-inside:avoid; }
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
