/* TiltLab phone app (/phone). Its own small sheet: an app, not a marketing page. System fonts (no web font download on
   mobile data), the TiltLab purple, light and dark. Every style lives here: the site CSP has no 'unsafe-inline'. */
/* --faint (a11y hunt 2026-11-08): at least 4.5:1 on --bg and --card in both themes, for the "off" alert kinds (was 3.2-3.5:1 light) */
:root {
  --bg:#f6f3fb; --card:#ffffff; --ink:#1d1830; --mut:#5f5873; --faint:#716b85; --rule:#e3ddef; --a:#673ab7; --on-a:#fff;
  --clear:#067060; --caution:#935614; --stop:#b3261e; --clear-bg:#e3f4ef; --caution-bg:#fbefdf; --stop-bg:#fbe4e2;
  --shadow:0 1px 2px rgba(29,24,48,.06), 0 6px 20px rgba(29,24,48,.06);
  --f:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme:light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#15121f; --card:#1f1b2c; --ink:#ece8f4; --mut:#b3abc6; --faint:#8e87a3; --rule:#332c45; --a:#a885f0; --on-a:#15121f;
    --clear:#3cc4a8; --caution:#e0a14e; --stop:#f08378; --clear-bg:#173a33; --caution-bg:#3a2b17; --stop-bg:#3f1d1b;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --bg:#15121f; --card:#1f1b2c; --ink:#ece8f4; --mut:#b3abc6; --faint:#8e87a3; --rule:#332c45; --a:#a885f0; --on-a:#15121f;
  --clear:#3cc4a8; --caution:#e0a14e; --stop:#f08378; --clear-bg:#173a33; --caution-bg:#3a2b17; --stop-bg:#3f1d1b;
}
* { box-sizing:border-box }
html { -webkit-text-size-adjust:100% }
body { margin:0; background:var(--bg); color:var(--ink); font:400 16px/1.5 var(--f); min-height:100vh; min-height:100dvh;
  overflow-x:hidden; -webkit-tap-highlight-color:transparent }
[hidden] { display:none !important }
h1 { font-size:26px; line-height:1.2; margin:8px 0 8px; letter-spacing:-.01em }
h2 { font-size:17px; margin:0 0 10px } h3 { font-size:15px; margin:0 0 10px }
p { margin:0 0 10px } a { color:var(--a) }
.muted { color:var(--mut) } .small { font-size:13.5px } .center { text-align:center }
.pa { max-width:520px; margin:0 auto; padding:calc(env(safe-area-inset-top) + 16px) max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 24px) max(16px, env(safe-area-inset-left)) }
.view.center { min-height:70vh; display:grid; place-content:center; justify-items:center; text-align:center; gap:6px }
.mark { width:72px; height:72px; border-radius:18px } .mark.sm { width:40px; height:40px; border-radius:10px }
.brand { display:flex; align-items:center; gap:10px; margin:4px 0 18px; font-size:18px }
.card { background:var(--card); border:1px solid var(--rule); border-radius:16px; padding:16px; margin:0 0 14px; box-shadow:var(--shadow) }
.btn { display:block; width:100%; min-height:48px; border:0; border-radius:12px; background:var(--a); color:var(--on-a);
  font:600 16px var(--f); padding:12px 16px; cursor:pointer }
.btn:disabled { opacity:.6 } .btn.ghost { background:transparent; color:var(--a); border:1.5px solid var(--a) }
.btn.ghost.danger { color:var(--stop); border-color:var(--stop) }
.btn:focus-visible, input:focus-visible, .bnav button:focus-visible { outline:3px solid color-mix(in srgb, var(--a) 55%, transparent); outline-offset:2px }
.form { display:grid; gap:8px } .form label { font-weight:600; font-size:14px }
.form input { min-height:48px; border:1.5px solid var(--rule); border-radius:12px; padding:10px 12px; font:16px var(--f);
  background:var(--bg); color:var(--ink) }
.form .btn { margin-top:8px }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0 }
.link-btn { justify-self:start; min-height:40px; padding:0; border:0; background:transparent; color:var(--a); font:500 15px var(--f); text-decoration:underline; cursor:pointer }
.msg { min-height:1.4em; color:var(--stop); font-size:14px; margin:0 } .msg.ok { color:var(--clear) }
.steps { list-style:none; padding:0; margin:16px 0; display:grid; gap:12px }
.steps li { display:flex; gap:12px; align-items:flex-start; background:var(--card); border:1px solid var(--rule); border-radius:14px; padding:12px 14px }
.steps .n { flex:none; width:28px; height:28px; border-radius:50%; background:var(--a); color:var(--on-a); display:grid; place-items:center; font-weight:700 }
.ic { display:inline-block; width:20px; height:20px; vertical-align:-4px; fill:none; stroke:var(--a); stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.install-hint { margin-top:16px; padding:14px; border:1px dashed var(--rule); border-radius:14px }
/* the app */
.app { padding-bottom:84px }
.top { display:flex; align-items:center; gap:10px; margin:0 0 14px } .top .who { display:grid; line-height:1.25 }
.notice { border-color:color-mix(in srgb, var(--a) 45%, var(--rule)) } .notice p { font-weight:500 }
.tab-h { font-size:22px; margin:4px 0 12px }
.pc-row { display:flex; align-items:center; gap:8px; font-size:15px }
.dot { width:10px; height:10px; border-radius:50%; background:var(--faint) } .dot.on { background:var(--clear) }
.verdict { margin:12px 0 6px; font-size:40px; font-weight:800; letter-spacing:-.02em; line-height:1; padding:14px 16px; border-radius:12px }
.verdict.clear { color:var(--clear); background:var(--clear-bg) } .verdict.caution { color:var(--caution); background:var(--caution-bg) }
.verdict.stop { color:var(--stop); background:var(--stop-bg) }
.line { font-size:17px; font-weight:500; margin:8px 0 4px } .line:empty { display:none }
/* (scan 2026-11-10) the phone can't reach TiltLab and the last answer is minutes old: the verdict word and Today's numbers
   are greyed with their age, never shown as if live */
.verdict.stale { color:var(--mut); background:color-mix(in srgb, var(--faint) 16%, var(--bg)) }
.today.stale .today-grid, .today.stale .limit, .today.stale #td_lines_box { opacity:.55 }
.td-old { margin:0 0 10px; font-size:13.5px; color:var(--mut) }
/* Today (opt-in, 2026-11-05): two big numbers, one bar, at most two notes and three of Atlas's lines */
.today-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0 0 12px }
.today-grid > div { display:grid; background:var(--bg); border-radius:12px; padding:10px 12px }
.today-grid .big { font-size:30px; font-weight:800; line-height:1.1; letter-spacing:-.02em }
.limit-h { display:flex; justify-content:space-between; gap:8px; margin:0 0 6px }
.bar { height:12px; border-radius:6px; background:var(--clear-bg); overflow:hidden }
.bar i { display:block; height:100%; width:0; background:var(--clear); border-radius:6px; transition:width .3s }
.bar.mid i { background:var(--caution) } .bar.high i { background:var(--stop) }
.td-note { margin:12px 0 0; font-weight:600 } .td-note.stop { color:var(--stop) }
#td_lines_box { margin-top:14px; border-top:1px solid var(--rule); padding-top:10px } #td_lines_box h3 { margin:0 0 6px; font-weight:600 }
.said { list-style:none; margin:0; padding:0; display:grid; gap:8px } .said li { font-size:15px } .said .w { display:block; font-size:12px; color:var(--mut) }
.more-link { margin:-4px 0 14px }
/* Review (opt-in, read-only): the week first, then one card per day */
.rv-accts { display:flex; gap:6px; overflow-x:auto; margin:0 0 10px; padding-bottom:2px; scrollbar-width:none }
.rv-acct { flex:none; min-height:40px; padding:8px 14px; border:1px solid var(--rule); border-radius:999px; background:var(--card); color:var(--ink); font:inherit; font-size:14px; cursor:pointer }
.rv-acct.on { background:var(--a); border-color:var(--a); color:var(--on-a); font-weight:700 }
.rv-one { margin:0 0 8px }
.rv-week .big { font-size:40px; font-weight:800; line-height:1; letter-spacing:-.02em }
.rv-stats { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:12px }
.rv-stats > div { display:grid; background:var(--bg); border-radius:10px; padding:8px 10px } .rv-stats b { font-size:18px }
.rv-day h3 { display:flex; justify-content:space-between; gap:8px; margin:0 0 8px; font-size:16px }
.rv-trades { list-style:none; margin:0; padding:0; display:grid; gap:8px }
.rv-trades li { border-top:1px solid var(--rule); padding-top:8px } .rv-trades li:first-child { border-top:0; padding-top:0 }
.rv-row { display:flex; gap:10px; align-items:baseline; font-size:15px } .rv-row .r { margin-left:auto; font-weight:700 }
.pos { color:var(--clear) } .neg { color:var(--stop) }
.chips { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px }
.chip { font-size:12px; padding:2px 8px; border-radius:10px; background:var(--caution-bg); color:var(--caution) } .chip.ok { background:var(--clear-bg); color:var(--clear) }
.rv-note { font-size:14px; color:var(--mut); margin:4px 0 0; font-style:italic }
/* Review's P&L calendar (2026-11-05): Mon-Fri, green / red days, dollars only with Dollars in Review on, R smaller */
.cal-h { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 4px } .cal-h h2 { margin:0; font-size:17px }
.cal-nav { width:44px; height:44px; border:1px solid var(--rule); border-radius:12px; background:var(--bg); color:var(--a); font:700 22px/1 var(--f); cursor:pointer }
.cal-nav:disabled { color:var(--faint); opacity:.5; cursor:default }
.cal-tot { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin:0 0 10px; text-align:center; justify-content:center }
.cal-tot b { font-size:20px }
.cal-grid { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; touch-action:pan-y }
.cal-wd { font-size:11.5px; color:var(--mut); text-align:center; font-weight:600 }
.cal-d { display:grid; align-content:start; justify-items:center; gap:0; min-height:56px; padding:4px 2px; border:1px solid transparent; border-radius:10px;
  background:var(--bg); color:var(--ink); font:inherit; cursor:pointer; overflow:hidden; min-width:0 }
.cal-d:disabled { cursor:default; color:var(--faint) } .cal-d.future { opacity:.5 }
.cal-d .cal-n { font-size:11.5px; justify-self:start; line-height:1.2; color:var(--mut) }
.cal-d .cal-v { font-size:13.5px; font-weight:700; line-height:1.25; white-space:nowrap; max-width:100% }
.cal-d .cal-r { font-size:11px; line-height:1.2; white-space:nowrap; opacity:.85 }
.cal-d.pos { background:var(--clear-bg); color:var(--clear) } .cal-d.neg { background:var(--stop-bg); color:var(--stop) }
.cal-d.flat { background:color-mix(in srgb, var(--faint) 18%, var(--bg)) }
.cal-d.pos .cal-n, .cal-d.neg .cal-n { color:inherit; opacity:.8 }
.cal-d.today { border-color:var(--rule) } .cal-d.sel { border-color:var(--a); box-shadow:0 0 0 1px var(--a) inset }
.cal-usd { margin:10px 0 0; text-align:center }
.rv-day.cal-sel { border-color:color-mix(in srgb, var(--a) 45%, var(--rule)) }
/* the chart picture (opt-in): one image, its age, tap for a fresh one */
.chart-pic { display:grid; place-items:center; width:100%; min-height:160px; padding:0; margin:0 0 8px; border:1px solid var(--rule);
  border-radius:12px; background:var(--bg); cursor:pointer; overflow:hidden; color:inherit; font:inherit }
.chart-pic img { display:block; width:100%; height:auto } .chart-pic.old img { opacity:.55 }
.ch-refresh { min-height:40px; padding:6px 12px; margin-left:4px; border:1px solid var(--rule); border-radius:8px; background:transparent; color:var(--a); font:inherit; font-size:12.5px; cursor:pointer }
/* the chart picture full screen (owner 2026-11-05: "click on the picture so it expands and you can zoom"): pinch / double-tap / wheel */
.ch-view { position:fixed; inset:0; z-index:50; background:#000; display:flex; flex-direction:column }
.ch-view[hidden] { display:none }
.ch-stage { position:relative; flex:1; min-height:0; overflow:hidden; touch-action:none; display:flex; align-items:center; justify-content:center; user-select:none; -webkit-user-select:none }
/* the whole picture at 1x, in portrait (as wide as the screen) and in landscape (as tall as the space above the bar):
   it was always full width, so a portrait picture on a phone turned sideways showed only its top quarter (2026-11-08) */
.ch-stage img { width:auto; height:auto; max-width:100%; max-height:100%; transform-origin:0 0; will-change:transform; -webkit-user-drag:none }
.ch-bar { display:flex; align-items:center; gap:10px; padding:10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); color:#ddd; font-size:13px }
.ch-bar span { flex:1 } .ch-bar button { min-height:44px; padding:8px 12px; border:1px solid #555; border-radius:10px; background:#1a1a1a; color:#fff; font:inherit; font-size:15px }
.ch-bar #ch_close { min-width:44px; font-size:22px; line-height:1; padding:4px 14px }
/* the timeframe switcher (owner 2026-11-05): one row of five, on the card and in the full-screen bar */
.ch-tf { display:grid; grid-template-columns:1.9fr repeat(4, 1fr); gap:0; margin:0 0 8px; border:1px solid var(--rule); border-radius:10px; overflow:hidden }
.ch-tf button { min-height:44px; padding:6px 4px; margin:0; border:0; border-left:1px solid var(--rule); border-radius:0; background:transparent;
  color:var(--mut); font:600 13.5px/1.2 var(--f); cursor:pointer; white-space:nowrap }
.ch-tf button:first-child { border-left:0 }
.ch-tf button[aria-pressed="true"] { background:var(--a); color:var(--on-a) }
.ch-bar { flex-wrap:wrap }
.ch-tf.dark { flex:1 0 100%; margin:0; border-color:#555 }
.ch-bar .ch-tf.dark button { padding:6px 4px; border:0; border-left:1px solid #555; border-radius:0; background:#1a1a1a; color:#ccc; font-size:14px }
.ch-bar .ch-tf.dark button:first-child { border-left:0 }
.ch-bar .ch-tf.dark button[aria-pressed="true"] { background:#a885f0; color:#15121f }
.share-ask { margin-top:10px; padding:12px; border-radius:12px; background:var(--bg); border:1px solid var(--rule) }
.share-ask p { font-size:14.5px } .share-btns { display:grid; grid-template-columns:1fr 1fr; gap:8px }
.tg .tg-t { display:grid } .tg .tg-t small { color:var(--mut); font-size:12.5px; line-height:1.35 }
.kinds-list { list-style:none; margin:0 0 10px; padding:0; display:grid; gap:6px }
.kinds-list li { display:flex; gap:8px; align-items:center } .kinds-list li.off { color:var(--faint); text-decoration:line-through }
.kinds-list li::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--a); flex:none } .kinds-list li.off::before { background:var(--faint) }
.alerts { list-style:none; margin:0; padding:0; display:grid; gap:10px }
.alerts li { background:var(--card); border:1px solid var(--rule); border-left:4px solid var(--a); border-radius:12px; padding:12px 14px }
.alerts li.k-nostop, .alerts li.k-conn, .alerts li.k-flatby { border-left-color:var(--stop) } .alerts li.k-copy { border-left-color:var(--caution) }
.alerts li.k-cooloff { border-left-color:var(--clear) }
.alerts .t { font-size:16px; font-weight:500 } .alerts .w { font-size:12.5px; color:var(--mut); margin-top:4px }
.empty { text-align:center; padding:30px 0 }
.toggles { display:grid; gap:2px }
.tg { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; border-bottom:1px solid var(--rule); font-size:15px }
.tg:last-child { border-bottom:0 }
.tg input { appearance:none; -webkit-appearance:none; flex:none; width:50px; height:30px; border-radius:15px; background:var(--rule); position:relative;
  cursor:pointer; transition:background .15s; margin:0 }
.tg input::after { content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3); transition:transform .15s }
.tg input:checked { background:var(--a) } .tg input:checked::after { transform:translateX(20px) }
.q-times { display:grid; grid-template-columns:auto 1fr; gap:8px 12px; align-items:center; margin:10px 0 }
.q-times input { min-height:44px; border:1.5px solid var(--rule); border-radius:10px; padding:6px 10px; font:16px var(--f); background:var(--bg); color:var(--ink) }
.bnav { position:fixed; left:0; right:0; bottom:0; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--card);
  border-top:1px solid var(--rule); padding:6px max(8px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 6px) max(8px, env(safe-area-inset-left)); z-index:5 }
.bnav button { display:grid; justify-items:center; gap:2px; border:0; background:transparent; color:var(--mut); font:600 12px var(--f);
  padding:6px 0; min-height:52px; cursor:pointer; position:relative }
.bnav button svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
.bnav button[aria-selected="true"] { color:var(--a) }
.bnav button.has-new { color:var(--ink); font-weight:800 } .bnav button.has-new[aria-selected="true"] { color:var(--a) }
/* the Floor tab (2026-11-05): the members-only web Floor (/floor/?embed=phone) fills the screen above the tab bar, with
   its own top bar (channels menu, Partners). Same site, same sign-in */
.app.floor-on .top, .app.floor-on #notif_card { display:none }
.floor-tab { position:fixed; left:0; right:0; top:0; bottom:calc(66px + env(safe-area-inset-bottom)); padding-top:env(safe-area-inset-top);
  background:var(--bg); z-index:4 }
.floor-tab iframe { position:absolute; left:env(safe-area-inset-left); top:env(safe-area-inset-top); width:calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
  height:calc(100% - env(safe-area-inset-top)); border:0;
  background:var(--bg); visibility:hidden } .floor-tab.ready iframe { visibility:visible }
.floor-wait { text-align:center; padding:40vh 16px 0; margin:0 } .floor-tab.ready .floor-wait { display:none }
.badge { position:absolute; top:2px; left:calc(50% + 6px); min-width:18px; height:18px; border-radius:9px; background:var(--stop); color:#fff;
  font-size:11px; line-height:18px; padding:0 5px }
@media (prefers-reduced-motion: reduce) { * { transition:none !important } }
