:root{--bg:#0b0f16;--panel:#111723;--card:#131a27;--line:#1a2230;--text:#e2e8f0;--muted:#94a3b8;
--up:#22c55e;--down:#ef4444;--accent:#22d3ee;--warn:#f59e0b;--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
*{box-sizing:border-box}
/* cvyx (partner 1 Nov, iPhone standalone, viewport-fit=cover): --cvp-sab = the bottom safe-area inset (home indicator, 34 px
   portrait / 21 px sideways on iPhones, 0 elsewhere) as ONE custom property; every phone height rule subtracts it so the
   time axis + crosshair time tag end above the indicator. A browser never exposes env() to scripts: a sim overrides the var. */
html{--cvp-sab:env(safe-area-inset-bottom,0px)}
html,body{margin:0;background:var(--bg);color:var(--text);font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
  overflow-x:hidden;-webkit-text-size-adjust:100%}
a{color:var(--accent)}
.top{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line);
  background:var(--panel);padding-top:max(10px,env(safe-area-inset-top))}
.brand{display:flex;gap:8px;align-items:center;white-space:nowrap}
.logo{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;background:#0e2a33;
  color:var(--accent);font-weight:700;font-size:12px;border:1px solid var(--accent)}
.tag{font-size:11px;color:var(--muted);border:1px solid var(--line);border-radius:10px;padding:0 6px}
/* job logo: ChartiQt wordmark (2x PNG) in the header, full logo above the login card */
.brand-mark{display:block;height:30px;width:auto}
.login-logo{display:block;width:300px;max-width:80vw;height:auto;margin:0 auto 20px}
.controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex:1;min-width:0}
.ticker{width:130px;background:#0d131d;border:1px solid var(--line);color:var(--text);border-radius:8px;
  padding:7px 10px;font:600 15px var(--mono);text-transform:uppercase}
/* cvtop2 B ("show border here all the time"): the ticker box always shows a visible border, brighter on focus - all widths */
.ticker{border-color:#3b4a60}
.ticker:focus{border-color:var(--accent);outline:0;box-shadow:0 0 0 2px rgba(34,211,238,.16)}
.chips,.session{display:flex;flex-wrap:wrap;gap:4px}
.chip{background:#0d131d;border:1px solid var(--line);color:var(--muted);border-radius:7px;padding:5px 9px;
  font:600 12px var(--mono);cursor:pointer}
.chip.on{color:var(--bg);background:var(--accent);border-color:var(--accent)}
.go{background:var(--up);color:#04130a;border:0;border-radius:8px;padding:8px 16px;font-weight:700;cursor:pointer}
.go:disabled{opacity:.6}
/* cvpx: chart full width on every screen; the analysis panel sits BELOW it as a card grid (1 / 2 / 3 cols) */
.layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px 14px;max-width:2400px;margin:0 auto}
.chart-col{min-width:0;display:flex;flex-direction:column;gap:10px}
/* cvtile: the analysis cards are uniform TILES. Phones: 1 column, auto height (no inner scroll trap).
   >= 700 px: 2 columns, every tile the same fixed height, overflow scrolls inside the tile (thin scrollbar).
   >= 1200 px: auto-fill 320 px+ columns. The ⤢ control expands a tile to the full row width, auto height. */
.side-col{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch;
  grid-auto-flow:row dense;--tile-h:320px}
.tile{display:flex;flex-direction:column;border-radius:12px;padding:0;overflow:hidden}
.tile>.card-h{display:flex;align-items:center;gap:8px;margin:0;padding:9px 12px 7px;border-bottom:1px solid var(--line);
  flex:0 0 auto}
.tile-t{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile-pill:empty{display:none}
.tile-pill .pill{font-size:11px;padding:1px 7px;text-transform:none;letter-spacing:0}
.tile-x{flex:0 0 auto;background:none;border:1px solid var(--line);color:var(--muted);border-radius:6px;width:24px;height:22px;
  padding:0;font-size:13px;line-height:1;cursor:pointer}
.tile-x:hover,.tile.expanded .tile-x{color:var(--accent);border-color:var(--accent)}
.tile-body{flex:1 1 auto;min-height:0;padding:8px 12px 10px;overflow:visible}
/* cvern: one plain-English line under every tile header; the beginner Summary / Earnings tiles */
.tile-desc{flex:0 0 auto;padding:6px 12px 0;font-size:12px;color:#a7b1c2;line-height:1.35}
.sum p{margin:0 0 7px;font-size:13px;line-height:1.45}
.sum .k{color:var(--muted)}
.sum .legend-line{font-size:11px;color:var(--muted);margin-top:4px}
.good{color:var(--up)}.bad{color:var(--down)}.wait{color:var(--warn)}
.tip{cursor:help;border-bottom:1px dotted var(--muted)}
.earn-sum{font-size:13px;margin-bottom:6px}
.badges{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.badge{font-size:11px;padding:1px 8px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:#0f1521}
.badge.good{color:var(--up);border-color:rgba(74,222,128,.4)}.badge.bad{color:var(--down);border-color:rgba(248,113,113,.4)}
.earn-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.earn{border-collapse:separate;border-spacing:0;table-layout:auto;min-width:560px;width:100%}   /* auto: the global table rule is fixed-layout (headers overlapped) */
.earn th,.earn td{white-space:nowrap;padding:3px 5px;text-align:right}
.earn th:first-child,.earn td:first-child{text-align:left;position:sticky;left:0;background:var(--card);z-index:1}
.earn th{font-weight:500;color:var(--muted);border-bottom:1px solid var(--line)}
.earn tr.est td{font-style:italic;color:#a7b1c2}
.earn .num{font-family:var(--mono)}
.earn-key{font-size:11px;color:var(--muted);margin:6px 0 0}
@media (min-width:700px){
  .side-col{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tile{height:var(--tile-h)}
  .tile-body{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#2a3446 transparent}
  .tile-body::-webkit-scrollbar{width:6px}.tile-body::-webkit-scrollbar-thumb{background:#2a3446;border-radius:3px}
  .tile.expanded{grid-column:1/-1;height:auto}
  .tile.expanded .tile-body{overflow:visible}
}
@media (min-width:1200px){.side-col{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}}
/* cvern (measured 1440x900: 4 columns of 344 px): the Earnings tile takes two columns so its 7-column table fits
   without a horizontal scroll; the order Summary · Trade plan · Earnings stays row one. ⤢ (expanded) still wins */
@media (min-width:1200px){#earn-card:not(.expanded){grid-column:span 2}}
/* cvtile: Direction strip - one row on desktop (direction, price, change, READY/WAIT, confidence, reason);
   wraps to max 2 lines on phones (reason ellipsised on the second line) */
.dir-strip{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:7px 12px;min-width:0}
.dir-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;min-height:30px}
.dir-line .big{font-size:20px}
.dir-line .dir-k{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.dir-line .dir-reason{flex:1 1 220px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--warn);font-size:12px}
.dir-line .skeleton{flex:1 1 100%;height:22px;min-height:22px}
.dir-pills{display:contents}   /* cvmv: the pills-row wrapper is layout-neutral on desktop (phones: see the cvmv block) */
@media (max-width:699px){
  .dir-line{gap:3px 8px;max-height:64px;overflow:hidden}
  .dir-line .big{font-size:17px}
  .dir-line .dir-k{display:none}
  .dir-line .dir-reason{flex-basis:100%}
}
.status-line{min-height:20px}
/* cvmob: the chart card = price chart (top, flex) + volume chart (bottom 16 %, own lwc instance; bmo: 24 % -> 16 %,
   partner 1 Nov "volume area little smaller"). The card keeps the heights the single chart had (560 / --chart-h / 460),
   so the desktop footprint is unchanged. .jump / .nav / .draw-pad below assume the same 16 %. */
.chart-card{position:relative;background:var(--card);border:1px solid var(--line);border-radius:10px;overflow:hidden;
  display:flex;flex-direction:column;height:560px}
.chart{flex:1 1 auto;min-height:0;width:100%;overflow:hidden}
.vchart{flex:0 0 16%;min-height:0;width:100%;overflow:hidden;border-top:1px solid var(--line)}
.chart-row,.chart-side{display:flex;flex-direction:column;gap:10px;min-width:0}
/* cvlay (desktop): chart LEFT takes the remaining width and is much taller; the Overlays legend is a fixed RIGHT
   sidebar, same height as the chart, one item per line, scrolling inside when taller than the chart; Download /
   Copy buttons sit under the legend in the same sidebar (visible without scrolling) */
@media (min-width:1200px){
  .layout{--chart-h:clamp(620px,calc(100vh - 196px),1000px)}
  .chart-row{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:start}
  .chart-row .chart-card{height:var(--chart-h)}
  .chart-side{height:calc(var(--chart-h) + 2px)}
  .chart-side>.legend{flex:1 1 auto;min-height:0;overflow-y:auto}
  .chart-row .legend-items{flex-direction:column;flex-wrap:nowrap;gap:7px}
}
/* job pfall: the panel table rules (table-layout:fixed, td padding) must not reach the chart library's own
   layout table - they squeezed the right price-axis cell (28 px for a 56 px axis) and its labels were cut */
.chart table{width:auto;table-layout:auto;border-collapse:separate}
.chart td,.chart th{padding:0;border:0;font-size:inherit;vertical-align:top;text-align:left}
/* cvmob: the volume chart (second lwc instance) needs the same protection */
.vchart table{width:auto;table-layout:auto;border-collapse:separate}
.vchart td,.vchart th{padding:0;border:0;font-size:inherit;vertical-align:top;text-align:left}
.empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted)}
.empty[hidden]{display:none}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 12px;min-width:0}
.card-h{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px;cursor:default}
details>summary.card-h{cursor:pointer;margin:0}
/* cvmob: Overlays box. Desktop (> 640 px): looks + behaves like the old static header (no marker, not collapsible,
   no count). Phones: a real disclosure with a live "(N on)" count. */
details.legend>summary.card-h{margin-bottom:6px;list-style:none;pointer-events:none}
details.legend>summary.card-h::-webkit-details-marker{display:none}
.ovl-n{display:none;text-transform:none;letter-spacing:0}
.legend-items{display:flex;flex-wrap:wrap;gap:6px 12px}
.legend-items label{display:flex;gap:5px;align-items:center;font-size:12px;color:var(--muted);cursor:pointer}
.sw{display:inline-block;width:10px;height:10px;border-radius:2px}
.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.btn{background:#0d131d;border:1px solid var(--line);color:var(--text);border-radius:8px;padding:7px 12px;
  font-size:13px;text-decoration:none;cursor:pointer}
.btn[aria-disabled=true],.btn:disabled{opacity:.45;pointer-events:none}
.muted{color:var(--muted)}.small{font-size:12px}.mono{font-family:var(--mono)}
.pill{display:inline-block;border-radius:999px;padding:2px 9px;font:700 12px var(--mono);border:1px solid}
.pill.LONG,.pill.READY{color:var(--up);border-color:var(--up)}
.pill.SHORT{color:var(--down);border-color:var(--down)}
.pill.NEUTRAL,.pill.UNSUPPORTED{color:var(--muted);border-color:var(--muted)}
.pill.WAIT{color:var(--warn);border-color:var(--warn);background:rgba(245,158,11,.14);font-size:13px}
.pill.UNAVAILABLE,.pill.PARTIAL,.pill.INSUFFICIENT_HISTORY,.pill.PLAN_UNAVAILABLE{color:var(--warn);border-color:var(--warn)}
.dir-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.big{font:700 22px var(--mono)}
table{width:100%;border-collapse:collapse;table-layout:fixed}
td,th{padding:4px 4px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;font-size:12px;
  overflow-wrap:anywhere}
th{color:var(--muted);font-weight:500}
td.num,th.num{font-family:var(--mono);text-align:right}   /* cvsu: numeric headers right-aligned like their cells */
ul{margin:4px 0 0 16px;padding:0}
li{margin:2px 0;overflow-wrap:anywhere}
h4{margin:8px 0 2px;font-size:12px;color:var(--muted);font-weight:600}
.skeleton{color:transparent;background:linear-gradient(90deg,#151d2b,#1b2536,#151d2b);background-size:200% 100%;
  animation:sk 1.2s infinite;border-radius:6px;min-height:20px}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
.err{color:var(--down)}
.foot{padding:14px;color:var(--muted);font-size:12px;text-align:center;padding-bottom:max(14px,env(safe-area-inset-bottom))}
@media (max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr);padding:10px}
  .chart-card{height:460px}
  .ticker{width:110px}
  .brand{width:100%}
  .brand-mark{height:26px}
  .top{padding:8px 10px}
  .controls{gap:6px}
}

.chip.disabled,.chip:disabled{opacity:.35;cursor:not-allowed}

/* cvtop: wrappers added for the phone layout are layout-neutral everywhere else (display:contents = the children sit in
   their old flex containers exactly as before); the phone summary rows (.col-sum) exist only on phones */
.tfrow,.col{display:contents}
.col-sum{display:none}
/* cvpol: the one-line tile summaries exist only on phones */
.tile-sub{display:none}
/* cvtop2 A: the R / E / G short labels exist only on phones (the full words are also the title / aria-label) */
.lbl-abbr{display:none}
/* cvtop2 C: "go to the latest bar" - a round button at the bottom-right of the PRICE pane: above the volume pane
   (16 % of the card, bmo) and left of the price axis (--cvp-axis = the measured axis width, app.js syncAxis) */
.jump{position:absolute;z-index:6;right:calc(var(--cvp-axis,58px) + 8px);bottom:calc(16% + 10px);width:34px;height:34px;
  border-radius:50%;background:rgba(15,20,29,.88);border:1px solid var(--accent);color:var(--accent);
  font:700 18px/1 var(--mono);display:grid;place-items:center;padding:0 0 2px;cursor:pointer;touch-action:manipulation}
.jump:hover{background:#0e2a33}
.jump[hidden]{display:none}
/* cvtop2 E: left-edge history note on the price pane ("Loading older…", "+N older bars · price only", "Start of history") */
.hist-note{position:absolute;z-index:6;left:8px;top:6px;font:10px/1.5 var(--mono);color:var(--muted);
  background:rgba(15,20,29,.8);border:1px solid var(--line);border-radius:6px;padding:1px 6px;cursor:help;white-space:nowrap}
.hist-note[hidden]{display:none}
/* cvnv 5b: navigation row (− + < > ↺) bottom-centre of the PRICE pane: above the volume pane (16 % of the card, bmo,
   same bottom as .jump) and left of #jump (which sits at the right next to the price axis). Desktop: shown while the
   pointer is over the chart card (or a button has focus); phones / no-hover devices: always faint (see below) */
.nav{position:absolute;z-index:6;left:50%;transform:translateX(-50%);bottom:calc(16% + 10px);display:flex;gap:4px;
  opacity:0;transition:opacity .15s;pointer-events:none;
  background:rgba(15,20,29,.78);border-radius:10px;padding:3px}   /* cvov: semi-opaque pill (it sat on the Demand line) */
.chart-card:hover .nav,.nav:focus-within{opacity:1;pointer-events:auto}
.nb,.db{width:30px;height:30px;border-radius:7px;background:rgba(15,20,29,.88);border:1px solid #3b4a60;color:var(--text);
  font:700 15px/1 var(--mono);display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation}
.nb:hover,.db:hover{border-color:var(--accent);color:var(--accent)}
/* cvnav2 (partner Ahmed 7 Nov, iPhone: "make it disappear and come back if you touch screen"): touch screens = the row is
   hidden, a tap on the chart card shows it (.nav-on, app.js navShow), it fades out again 3 s after the last tap. A sticky
   iOS :hover / a focused button never keeps it on screen. A mouse keeps the hover rule above. */
@media (hover:none),(pointer:coarse){.chart-card .nav,.chart-card:hover .nav,.nav:focus-within{opacity:0;pointer-events:none}
  .chart-card.nav-on .nav,.chart-card.nav-on:hover .nav{opacity:1;pointer-events:auto}}
/* cvnv 5b drawing tools - cvov: now a row at the top of the indicator drawer (no permanent left toolbar); the active
   tool is filled */
.dtools{display:flex;align-items:center;gap:6px}
.db.on,.db.on:hover{background:var(--accent);color:var(--bg);border-color:var(--accent)}
/* cvov (partner 29 Oct): indicator drawer on the LEFT edge of the price pane. The tab is always visible (24 x 48 px,
   centred on the price pane); the drawer slides in over the chart (transform only - no layout shift, the chart stays
   interactive outside it), covers the price pane (not the volume pane), 300 px on desktop / 78vw max 300 px on phones */
.drawer-tab{position:absolute;z-index:8;left:0;top:calc(38% - 24px);width:24px;height:48px;padding:0;border:1px solid #3b4a60;
  border-left:0;border-radius:0 8px 8px 0;background:rgba(15,20,29,.88);color:var(--muted);font-size:14px;line-height:1;
  display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
.drawer-tab:hover,.drawer-tab[aria-expanded=true]{color:var(--accent);border-color:var(--accent)}
.drawer{position:absolute;z-index:9;left:0;top:0;bottom:0;width:300px;max-width:min(78vw,300px);transform:translateX(-102%);
  transition:transform .2s ease;will-change:transform;background:#0f141d;border-right:1px solid var(--line);
  display:flex;flex-direction:column;gap:8px;padding:8px 10px;overflow:hidden}
.drawer.open{transform:none;box-shadow:8px 0 24px rgba(0,0,0,.45)}
.drawer-h{display:flex;align-items:center;justify-content:space-between}
.drawer-h .card-h{margin:0}
.drawer-q{width:100%;background:#0d131d;border:1px solid #3b4a60;color:var(--text);border-radius:8px;padding:6px 9px;font-size:13px}
.drawer-q:focus{border-color:var(--accent);outline:0}
.drawer-btns{display:flex;gap:6px}
.btn.small{padding:4px 9px;font-size:12px}
.drawer-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#3b4a60 transparent;-webkit-mask-image:linear-gradient(#000 calc(100% - 18px),transparent)}
.dgrp h5{margin:8px 0 2px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600}
.dgrp[hidden]{display:none}
.ditem{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);min-height:28px;cursor:pointer}
.ditem[hidden]{display:none}
/* cvrot: width-only - the drawer is 78 % of a NARROW screen; a phone held sideways keeps the 300 px desktop drawer */
@media (max-width:640px){.drawer{width:78vw;max-width:300px}}
/* the pad covers the price pane only (not the price axis, not the volume pane) and takes pointer events only while a
   tool is active (.chart-card.drawing); touch-action:none = a finger draws instead of scrolling the page */
.draw-pad{position:absolute;z-index:5;left:0;top:0;right:var(--cvp-axis,58px);bottom:16%;pointer-events:none;touch-action:none}
.chart-card.drawing .draw-pad{pointer-events:auto;cursor:crosshair}
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  .nav{left:calc(50% - 24px)}   /* cvnav2: visibility = the touch rule above (tap shows, idle hides) */
  .nb,.db{width:28px;height:28px;font-size:14px}
}

/* cvmob (partner 28 Oct, phone screenshots): phones only (cvrot: the phone condition, portrait or sideways) - desktop untouched */
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  /* 2. status = one line, ellipsis, never wraps; LIVE pill stays, its detail + the tz badge go (both in the title) */
  .status-line{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;overflow:hidden;white-space:nowrap}
  #status{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #live{flex:0 0 auto;white-space:nowrap}
  .live-x,.tzb{display:none}
  /* 3. Overlays collapsed by default (JS restores the remembered state) */
  details.legend>summary.card-h{pointer-events:auto;cursor:pointer;margin-bottom:0;display:flex;align-items:center;gap:6px}
  details.legend[open]>summary.card-h{margin-bottom:6px}
  details.legend>summary.card-h::before{content:"\25B8";font-size:12px;color:var(--accent)}
  details.legend[open]>summary.card-h::before{content:"\25BE"}
  .ovl-n{display:inline}
  /* 4. chart (price + volume) at least as tall as the PFO modal chart: max(460 px, 58 vh); Direction strip compact */
  .chart-card{height:max(460px,58vh)}
  .dir-strip{padding:5px 10px}
  .dir-line{max-height:60px;min-height:0}
  .dir-line .big{font-size:16px}
  .dir-line .dir-reason{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    font-size:11px;line-height:1.25}
}

/* cvtop (partner 28 Oct, round 2, 390 px recording: "Top hide move down", "Collapse everything under chart like
   overlay"): phones ONLY (cvrot: the phone condition, portrait or sideways) - desktop/tablet untouched. Cascades after the
   cvmob block (same specificity, later wins). */
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  /* 1. TOP compact, not sticky: row A = small logo (22 px) + ticker search (flex:1); row B (cvtop2 A, partner: "put this
        in tf row letter R E G") = TF chips + R / E (session) + G (Generate) in ONE horizontally scrollable row (no wrap),
        the active session highlighted like a TF chip, G green. Target: chart canvas top <= 120 px at scrollY 0 */
  .top{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:6px 8px;align-items:center;
    padding:max(6px,env(safe-area-inset-top)) 10px 6px}
  .brand{width:auto;grid-row:1;grid-column:1}
  .brand-mark{height:22px}
  .controls{display:contents}
  .tbox{grid-row:1;grid-column:2;min-width:0}
  .ticker{width:100%;padding:6px 9px}
  .tfrow{grid-row:2;grid-column:1/-1;display:flex;flex-wrap:nowrap;gap:4px;align-items:center;overflow-x:auto;overflow-y:hidden;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .tfrow::-webkit-scrollbar{display:none}
  .tfrow .chips,.tfrow .session{flex:0 0 auto;flex-wrap:nowrap}
  .tfrow .chip{white-space:nowrap;padding:5px 5px}
  .tfrow .session{margin-left:4px;padding-left:8px;border-left:1px solid var(--line)}
  .tfrow #idx-note{display:none}
  .session .chip .lbl-full,.go .lbl-full{display:none}
  .session .chip .lbl-abbr,.go .lbl-abbr{display:inline}
  .tfrow .go{flex:0 0 auto;margin-left:4px;padding:5px 9px;font:700 12px var(--mono);border-radius:7px;position:sticky;right:0}
  /* cvx: the toolbar Expand = icon only on phones, pinned next to G like G itself (the row's content is wider than the box on
     a 390 px phone - measured 394 vs 370 px - so an unpinned ⤢ sat UNDER the sticky G and a tap hit Generate); right = G's
     width (24 px) + the natural 8 px gap, so the pinned and the scrolled-out positions coincide */
  .tfrow .xexp{flex:0 0 auto;margin-left:4px;padding:5px 7px;border-radius:7px;position:sticky;right:32px;background:#0d131d;box-shadow:-8px 0 6px -2px var(--bg)}
  .tfrow .xexp .lbl-full{display:none}
  a#xmulti{display:none}
  .top:has(#xmulti) .navmenu .navlink[data-page=multi]{display:inline-flex}
  /* 2. cvsig (partner 29 Oct "Move on top under ticker line"): the status line + Direction block sit directly UNDER
        the sticky header (ticker / TF row), ABOVE the chart; Overlays etc. follow the volume pane (CSS order; the DOM is unchanged so rotation / resize both ways just re-cascades) */
  .chart-row{display:contents}
  .dirbox{order:0}
  .chart-card{order:1}
  .chart-side{order:3}   /* cvx: order 2 (the cvui Basic | Advanced tab row) is gone with the toolbar toggle */
  /* 3. chart + volume pane fill the first screen: max(420 px, 100svh - top rows - 8 px - bottom safe-area inset). --cvp-top =
        the card's page-top (header rows + layout padding), measured by app.js; 96 px fallback. The cvmob rule (volume = own pane)
        is kept. cvyx: - var(--cvp-sab) = the time axis + crosshair time tag sit above an iPhone's home indicator (was: the card
        ended 8 px above the viewport bottom = inside the 34 px indicator band, the "Oct 28 '26 08:00" tag half covered) */
  .chart-card{height:max(420px,calc(100vh - var(--cvp-top,96px) - 8px - var(--cvp-sab,0px)))}
  .chart-card{height:max(420px,calc(100svh - var(--cvp-top,96px) - 8px - var(--cvp-sab,0px)))}
  /* 4. COLLAPSE UNDER CHART like Overlays: .col blocks (Direction/status, Export) + every tile = one-line tap row
        (summary) + body; .closed hides the body; open/closed remembered per device (cvp:collapse:v1:<id>, app.js) */
  .col{display:block;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:0}
  .col>.col-sum{display:flex;align-items:center;gap:6px;padding:0 12px;min-height:37px;cursor:pointer;user-select:none;
    font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);overflow:hidden;white-space:nowrap}
  .col>.col-sum .col-sub{overflow:hidden;text-overflow:ellipsis;min-width:0}
  .col-mark::before,.tile>.card-h::before{content:"\25BE";font-size:12px;color:var(--accent);flex:0 0 auto}
  .col.closed .col-mark::before,.tile.closed>.card-h::before{content:"\25B8"}
  .col.closed>:not(.col-sum){display:none}
  .dir-d.LONG{color:var(--up)}.dir-d.SHORT{color:var(--down)}.dir-d.NEUTRAL{color:var(--muted)}
  .dirbox>.col-sum{font:600 13px var(--mono);letter-spacing:0;text-transform:none;color:var(--text)}
  .dirbox>.col-sum>#dir-brief{min-width:0;overflow:hidden;text-overflow:ellipsis}   /* cvmv: shrinks before the ≡ opener */
  .dirbox .status-line{padding:0 10px 6px}
  .dirbox.merged>.col-sum .status-line{padding:0;flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    font:500 12px var(--mono);color:#a7b1c2}   /* cvdl: open = status in the tap row, 2 lines before the chart */
  .dirbox .dir-strip{border:0;border-top:1px solid var(--line);border-radius:0;padding:5px 10px 7px}
  .export .actions{padding:0 10px 8px}
  /* Direction stays ONE compact block: reason ellipsised to 1 line (full text in title); tap expands it */
  .dir-line{max-height:none}
  .dir-line .dir-reason{-webkit-line-clamp:1;cursor:pointer}
  .dir-line .dir-reason.open{display:block;white-space:normal;-webkit-line-clamp:none}
  /* tiles: the header row is the tap target (summary = title + pill); opened tile = natural height (no inner scroll,
     the >= 700 px fixed-height rules do not apply here); the ⤢ expand control is desktop-only */
  .tile{padding:0}
  .tile>.card-h{cursor:pointer;user-select:none;padding:0 12px;border-bottom:0;min-height:37px;gap:6px}
  .tile:not(.closed)>.card-h{border-bottom:1px solid var(--line)}
  .tile>.card-h .tile-t .small{display:none}
  .tile.closed>.tile-body{display:none}
  .tile.closed>.tile-desc{display:none}   /* cvern: the plain-English line belongs to the opened tile */
  .tile>.tile-desc{padding:6px 24px 0}
  .earn{min-width:560px}
  .tile-x{display:none}
  /* 5. cvpol (QA of the 390 px screenshot): EVERY collapsed row = the Overlays row. One recipe for Overlays, the .col
        rows and the tiles: container padding 0, summary row padding 0 12px + min-height 37px (= the Overlays row today:
        10 px card padding + the 16.8 px chevron line), chevron + 6 px gap, 11 px uppercase muted title; the status
        pills one size (WAIT included) and uppercase; the summary text (.col-sub / .tile-sub) one ellipsised line */
  details.legend{padding:0}
  details.legend>summary.card-h{padding:0 12px;min-height:37px;margin-bottom:0}
  details.legend[open]>summary.card-h{margin-bottom:0}
  details.legend>.legend-items{padding:6px 12px 10px}
  .tile>.card-h .tile-t{flex:0 1 auto}
  .tile>.card-h .tile-t:has(+.tile-sub:not(:empty)){max-width:60%}
  .tile>.card-h .tile-pill{flex:0 0 auto;margin-left:auto}
  .tile-sub{display:block;flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-size:11px;letter-spacing:0;text-transform:none;color:#a7b1c2}
  .tile-sub:empty{display:none}
  .col>.col-sum .col-t{flex:0 0 auto}
  .col>.col-sum .col-sub{flex:1 1 0;font-size:11px;letter-spacing:0;text-transform:none;color:#a7b1c2}
  .tile-pill .pill,.tile-pill .pill.WAIT{font-size:11px;line-height:15px;padding:0 7px;text-transform:uppercase;letter-spacing:0}
  /* opened tile: the body keeps the position it had (the 12 px .card padding it lost is folded into its own padding) */
  .tile>.tile-body{padding:8px 24px 20px}
}

/* cvln (owner order 28 Oct): app navigation - Chart / Settings / Admin (role admin) + user menu. Desktop: right side of the
   header row. Phones (<= 640 px): ONE ☰ button in header row A (32 px tall = the ticker box, so the cvtop 2-row header
   keeps its height; the ::before inset gives a 40 px tap area) that opens a small sheet under the header. Same markup
   on /settings and /admin (.top-plain = header without the ticker / TF rows). nav.js marks the current page. */
.appnav{position:relative;display:flex;align-items:center;margin-left:auto}
.navbtn{display:none}
.navmenu{display:flex;align-items:center;gap:2px}
.navlink{color:var(--muted);text-decoration:none;font-size:13px;padding:7px 10px;border-radius:8px;min-height:32px;
  display:inline-flex;align-items:center;white-space:nowrap}
.navlink:hover{color:var(--text);background:#131a27}
.navlink.on{color:var(--accent);background:rgba(34,211,238,.08)}
.navuser{display:flex;align-items:center;gap:4px;margin-left:8px;padding-left:10px;border-left:1px solid var(--line)}
#nav-user{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nav-user:empty{display:none}
.top-plain{gap:14px}
.page{max-width:980px;margin:18px auto;padding:0 14px;display:flex;flex-direction:column;gap:12px}
.page h1{font-size:20px;margin:4px 0 0}
.page .lead{color:var(--muted);margin:0 0 4px;font-size:13px}
.errpage{max-width:420px;margin:48px auto;padding:0 16px}
.errmsg{font-size:16px;margin:4px 0 8px}
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  .top{position:relative;grid-template-columns:auto minmax(0,1fr) auto}
  .top-plain{grid-template-rows:auto}
  .appnav{grid-row:1;grid-column:3;margin-left:0}
  /* cvrot: the Direction-row ≡ drawer opener (cvmv) shares THIS rule = same size / look as the header ≡ (cannot drift) */
  .navbtn,.drawer-tab.in-dir{display:grid;place-items:center;width:36px;height:32px;padding:0;border-radius:8px;background:#0d131d;border:1px solid #3b4a60;
    color:var(--text);font-size:17px;line-height:1;cursor:pointer;position:relative;touch-action:manipulation}
  .navbtn::before{content:"";position:absolute;inset:-4px -2px}
  .appnav.open .navbtn{border-color:var(--accent);color:var(--accent)}
  .navmenu{display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:200px;flex-direction:column;align-items:stretch;
    gap:2px;padding:6px;background:#0f141d;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.5)}
  .appnav.open .navmenu{display:flex}
  .navlink{min-height:40px;font-size:14px}
  .navuser{flex-direction:column;align-items:stretch;margin:4px 0 0;padding:6px 0 0;border-left:0;border-top:1px solid var(--line)}
  #nav-user{padding:4px 10px;max-width:none}
}

/* cvzm (partner 30 Oct, 2nd "too much zoom out"): the export's one-time "Zoomed out: N bars" hint = a small bubble
   on the clicked button (never blocks the export) */
.actions{position:relative}
.zoom-hint{position:absolute;z-index:6;width:max-content;max-width:100%;font-size:12px;padding:4px 8px;border-radius:6px;
  background:#1e293b;color:var(--text);border:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,.4);pointer-events:none}
.zoom-hint[hidden]{display:none}
/* cvzm Part C: phones - the last row is never under Safari's / Chrome's floating bottom toolbar: page bottom padding =
   the safe-area inset + ~80 px toolbar room */
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  body{padding-bottom:calc(var(--cvp-sab,0px) + 80px)}
  .zoom-hint{max-width:100%}
}

/* cvmv (partner 30 Oct, SPY 1D iPhone, "Move this here"): <= 640 px the ≡ indicator-drawer opener is no longer a floating
   tab over the chart's left edge (it covered candles and the "Handle" label). app.js moves the SAME button into the
   status block: right end of the pills row (block open) or of the one-line brief (folded). The row never wraps: the
   change % / conf text shrink with an ellipsis first. Desktop untouched. cvrot (partner 31 Oct "Make size bigger like
   above"): the opener is the SAME size / look as the header ≡ menu button - one shared rule in the cvln block
   (.navbtn,.drawer-tab.in-dir = 36 x 32 px, radius 8, same colours / font); the row grows a few px, never wraps. */
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  .dir-line .dir-pills{display:flex;flex:1 1 100%;flex-wrap:nowrap;align-items:center;gap:8px;min-width:0}
  .dir-pills>*{flex:0 0 auto}
  .dir-pills>.dir-chg,.dir-pills>.dir-conf{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .drawer-tab.in-dir{position:relative;top:auto;left:auto;flex:0 0 auto;margin-left:auto}   /* size / look: the shared .navbtn rule (cvln block) */
  .drawer-tab.in-dir[aria-expanded=true]{border-color:var(--accent);color:var(--accent)}   /* open = like .appnav.open .navbtn */
  .drawer-tab.in-dir::after{content:"";position:absolute;inset:-4px -2px}   /* 40 x 40 px finger target = .navbtn::before */
}

/* cvrot (partner 31 Oct, landscape iPhone shot, "When u rotate it is mess up lock not showing etc"): a phone held SIDEWAYS
   (coarse pointer, <= 500 px tall, landscape) keeps the PHONE layout (every phone block above matches it too) and gets
   this polish: header = ONE compact row (small wordmark, search, TF chips + R E / Basic Pro / G scrolling sideways, ≡;
   target <= 56 px, still sticky via the cvfx block), Direction row folded to one line by default (app.js), chart card =
   what is left of the short viewport (no 420 / 350 px floor: price + volume + time axis fit in 390 px), tiles one
   column / natural height like portrait, and the notch insets (left / right) on the header, the page column and the
   pills. Desktop mouse windows and tablets taller than 500 px never match. Placed before the cvbeg block. */
@media (pointer:coarse) and (max-height:500px) and (orientation:landscape){
  .top{grid-template-columns:auto minmax(96px,170px) minmax(0,1fr) auto;grid-template-rows:auto;gap:6px;
    padding:max(4px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) 4px max(10px,env(safe-area-inset-left,0px))}
  .brand-mark{height:18px}
  .ticker{padding:5px 8px;font-size:14px}
  #tfrow{grid-row:1;grid-column:3}
  .appnav{grid-column:4}
  .layout{padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px))}
  html{--cvp-more-left:max(44px,calc(env(safe-area-inset-left,0px) + 10px));--cvp-lock-min:200px}
  .chart-card{height:max(220px,calc(100vh - var(--cvp-top,96px) - 8px - var(--cvp-sab,0px)))}
  .chart-card{height:max(220px,calc(100svh - var(--cvp-top,96px) - 8px - var(--cvp-sab,0px)))}
  .dir-line{gap:3px 8px}
  .dir-line .big{font-size:17px}
  .dir-line .dir-k{display:none}
  .dir-line .dir-reason{flex-basis:100%}
  .side-col{grid-template-columns:minmax(0,1fr)}
  .tile{height:auto}
  .tile-body{overflow:visible}
  /* bmo: the volume pane is 16 % of the card everywhere; sideways the card is only ~280 px, so 16 % (45 px) would leave
     17 px of bars under the 28 px time axis and the HV labels no longer fit - floor it at 64 px (36 px of bars, close to
     the old 24 %); the nav row / jump button / drawing pad move up with the same floor */
  .vchart{flex-basis:max(16%,64px)}
  .nav,.jump{bottom:calc(max(16%,64px) + 10px)}
  .draw-pad{bottom:max(16%,64px)}
}

/* ios1: iOS zooms the page in when a field under 16 px takes the focus and may leave it panned sideways */
@media (pointer:coarse){.ticker,.drawer-q{font-size:16px}}

/* cvbeg (plan cvbeg + owner mockup steer, 30 Oct): Beginner / Advanced view. No data-mode yet (before app.js) =
   Beginner. Advanced = the tiles exactly as before (every rule below is scoped to Beginner or to the new classes).
   Beginner: >= 1200 px chart LEFT + Analysis Summary RIGHT, 6 x 2 cards, trade setup + key takeaways; 900-1199 3
   columns, 600-899 2, phones 1 with summary + trade setup first. Status = colour + TEXT badge (aria-label = the word). */
body:not([data-mode="advanced"]) #tiles{display:none}
body[data-mode="advanced"] #beg{display:none}
/* cvx (partner Ahmed, 4 Nov 2026, "instead of using advance button add expand button to expand chart"): the toolbar's
   Beginner / Advanced chip pair is gone; its slot holds ONE Expand button (#xexp = the cvex xpOpen path, app.js). Desktop /
   tablet: icon + "Expand", chip metrics; pressed look while expanded (aria-pressed, app.js xpApply). The in-chart ⤢
   (.xpand, cvex) is hidden where the labelled toolbar button is on screen (>= 641 px with a fine pointer, or any >= 641 px
   window taller than a sideways phone); phones keep it (their TF row scrolls - the toolbar icon can sit off-screen).
   Advanced -> Beginner = the #adv-bar row at the top of the tiles (only Advanced shows #tiles). */
.xexp{display:inline-flex;align-items:center;gap:5px;margin-left:6px;padding:5px 9px;border:1px solid var(--line);border-radius:7px;
  background:#0d131d;color:var(--text);font:600 12px var(--mono);cursor:pointer;white-space:nowrap;touch-action:manipulation}
.xexp:hover{border-color:var(--accent);color:var(--accent)}
.xexp[aria-pressed="true"]{color:#fff;background:#2563eb;border-color:#2563eb}
.xexp-ico{font:700 15px/1 var(--mono)}
.adv-bar{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;padding:8px 12px;
  border:1px solid var(--line);border-radius:10px;background:var(--panel)}
@media (min-width:641px) and (pointer:fine),(min-width:641px) and (min-height:501px){.chart-card>.xpand{display:none}}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* cvhdr: Basic | Advanced in the header, always visible: active side filled; the height of the Generate button */
.mode-sw{display:inline-flex;flex:0 0 auto;align-self:stretch;min-width:0;border:1px solid var(--line,#26324a);border-radius:8px;overflow:hidden}
.mode-opt{flex:1 1 0;padding:0 11px;border:0;background:transparent;color:var(--muted);font:inherit;font-weight:600;cursor:pointer}
.mode-opt+.mode-opt{border-left:1px solid var(--line,#26324a)}
.mode-opt.on{background:#2563eb;color:#fff}
.mode-opt:focus-visible{outline:2px solid #93c5fd;outline-offset:-2px}
.beg{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;grid-template-areas:"sum" "trade" "cards" "more"}
.bsum{grid-area:sum}.beg-trow{grid-area:trade}.beg-grid{grid-area:cards}.beg-more{grid-area:more}
.beg-trow,.beg-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:stretch}
.GREEN{--st:#22c55e;--stt:#4ade80;--stb:rgba(34,197,94,.13)}.RED{--st:#ef4444;--stt:#f87171;--stb:rgba(239,68,68,.13)}
.YELLOW{--st:#f59e0b;--stt:#fbbf24;--stb:rgba(245,158,11,.13)}.GRAY{--st:#94a3b8;--stt:#cbd5e1;--stb:rgba(148,163,184,.12)}
.fic{width:20px;height:20px;flex:0 0 auto;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fic.sm{width:14px;height:14px;margin-right:5px;vertical-align:-2px;stroke:currentColor}
.fbadge{flex:0 0 auto;margin-left:auto;padding:1px 8px;border:1px solid var(--st);border-radius:999px;background:var(--stb);
  color:var(--stt);font:700 10px/16px var(--mono);letter-spacing:.03em;text-transform:uppercase;white-space:nowrap}
.fcard{display:flex;flex-direction:column;gap:6px;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:10px;
  padding:10px 11px;cursor:pointer}
.fcard:hover{border-color:#2b3a50}
.fc-h{display:flex;align-items:center;gap:7px;min-width:0}
.fc-n{margin:0;font-size:13px;font-weight:700;line-height:1.25;color:var(--text);min-width:0}
.fc-q{margin:0;font-size:12.5px;font-weight:600;color:#60a5fa}
.fb{margin:0;padding-left:15px;font-size:12px;line-height:1.45;color:#cbd5e1}
.fb li{margin:1px 0}
.fb li::marker{color:var(--st)}
.fbox{background:#0f1520;border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:11.5px;line-height:1.4;color:#cbd5e1}
.fbox p{margin:0}
.fbox .fnext{margin-top:3px;color:#a7b1c2}
.fwhy{color:var(--stt);margin-bottom:3px!important}
.fk{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#e2e8f0}
.fact{margin-top:auto;width:100%;padding:6px 8px;font-size:12px;text-align:center}
.fmore{font-size:11.5px;color:#a7b1c2}
.fmore[hidden]{display:none}
.fmore ul{margin:0;padding-left:15px}
.fmore a{color:var(--accent)}
.fmeta{font-size:10.5px;color:var(--muted)}
.btn.primary{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.btn:disabled{opacity:.55;cursor:not-allowed}
.bsum{display:flex;flex-direction:column;gap:9px;padding:12px 14px;min-width:0}
.bs-top{display:flex;align-items:center;gap:8px}
.bs-k{margin:0;font-size:14px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text)}
.bs-upd{margin-left:auto;font-size:11px;color:var(--muted);white-space:nowrap}
.bs-banner{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--st);border-radius:10px;background:var(--stb)}
.bs-arrow{width:34px;height:34px;flex:0 0 auto;fill:none;stroke:var(--stt);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;
  padding:5px;border-radius:8px;background:rgba(0,0,0,.25)}
.bs-h{font-size:18px;font-weight:800;line-height:1.2;color:var(--stt);letter-spacing:.01em}
.bs-count{font-size:13px;color:var(--text);margin-top:2px}
.bs-text{margin:0;font-size:13.5px;line-height:1.5}
.bs-conf,.bs-caut{margin:0;font-size:12px;line-height:1.4}
.bs-caut{color:#fcd34d}
.bs-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;list-style:none;margin:0;padding:0}
.bchip{display:flex;flex-direction:column;gap:1px;margin:0;padding:5px 9px;border:1px solid var(--st);border-radius:8px;background:var(--stb);min-width:0}
.bchip span{font-size:11px;color:var(--muted)}
.bchip b{font-size:13px;color:var(--stt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bs-btns{display:flex;flex-wrap:wrap;gap:8px}
.bs-btns .btn{flex:1 1 auto}
.bs-why{border-top:1px solid var(--line);padding-top:6px;font-size:13px}
.bs-why[hidden]{display:none}
.bs-why p{margin:2px 0}
.bs-note{margin:0;font-size:11px;color:var(--muted)}
.btrade,.btake{display:flex;flex-direction:column;gap:8px;padding:12px 14px;min-width:0}
.bt-h{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bt-h .fbadge{margin-left:0}
.bt-basis{font-size:11px;color:var(--muted)}
.bt-cells{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.bt-cell{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 4px;background:#0f1520;text-align:center;min-width:0}
.bt-cell span{font-size:11px;color:var(--muted)}
.bt-cell b{font:700 14px var(--mono);color:var(--text);overflow-wrap:anywhere}
.bt-cell.good b{color:#4ade80}.bt-cell.bad b{color:#f87171}
.bt-foot{display:flex;flex-direction:column;gap:8px}
.bt-mean{font-size:12.5px;line-height:1.45}
.bt-mean p{margin:0 0 3px}
.bt-risk{color:#fcd34d;font-size:11.5px}
.bt-btns{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start}
.kt{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.kt ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px}
.kt li{display:flex;gap:7px;align-items:flex-start;margin:0;font-size:12.5px;line-height:1.35}
.kt-i{flex:0 0 auto;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;font:700 10px/1 var(--mono);color:#04130a}
.kt li.ok .kt-i{background:#22c55e}.kt li.warn .kt-i{background:#f59e0b}
.kt-best{margin:4px 0 0;font-size:12.5px}
.pcalc{border-top:1px solid var(--line);padding-top:8px}
.pcalc[hidden]{display:none}
.pc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pc-grid label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted);min-width:0}
.pc-grid input{width:100%;min-width:0;background:#0d131d;border:1px solid #3b4a60;color:var(--text);border-radius:6px;padding:6px 8px;font:13px var(--mono)}
.pc-out{margin:8px 0 2px;font-size:13px;font-weight:600}
.beg-more>summary{cursor:pointer;margin:0}
.beg-more ul{margin:4px 0 0 16px}
.beg-note{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:12;max-width:90%;padding:4px 12px;border-radius:999px;
  background:rgba(15,20,29,.92);border:1px solid var(--accent);color:var(--accent);font-size:12px;pointer-events:none;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.beg-note[hidden]{display:none}
.chart-card.pulse{animation:cvbegpulse 1.2s ease-out 2}
@keyframes cvbegpulse{0%{box-shadow:0 0 0 0 rgba(34,211,238,.75)}100%{box-shadow:0 0 0 10px rgba(34,211,238,0)}}
@media (prefers-reduced-motion:reduce){.chart-card.pulse{animation:none;outline:2px solid var(--accent)}}
.legend-items label.focus,.ditem.focus{color:var(--accent);background:rgba(34,211,238,.12);border-radius:4px}
@media (min-width:600px){
  .beg{grid-template-areas:"sum" "cards" "trade" "more"}
  .beg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bt-cells{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:900px){
  .beg-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .beg-trow{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr)}
  .bt-cells{grid-template-columns:repeat(6,minmax(0,1fr))}
  .bt-foot{flex-direction:row;align-items:flex-end}
  .bt-mean{flex:1 1 auto;min-width:0}
  .bt-btns{flex:0 0 auto;max-width:48%;justify-content:flex-end}
  .kt{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
/* >= 1200 px Beginner: #beg's children join the page grid - chart (3 fr) | summary (2 fr) on the first row; the chart
   column is shorter and the Overlays list folds into the left-edge indicator drawer (same toggles, same state) */
@media (min-width:1200px){
  body:not([data-mode="advanced"]) .layout{grid-template-columns:minmax(0,3fr) minmax(372px,2fr);
    grid-template-areas:"chart sum" "cards cards" "trade trade" "more more";--chart-h:clamp(340px,calc(100vh - 430px),560px)}
  body:not([data-mode="advanced"]) .beg{display:contents}
  body:not([data-mode="advanced"]) .chart-col{grid-area:chart}
  body:not([data-mode="advanced"]) .chart-row{display:flex;flex-direction:column;align-items:stretch}
  body:not([data-mode="advanced"]) .chart-side{height:auto}
  body:not([data-mode="advanced"]) #ovl-box{display:none}
  .beg-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
}
/* cvbeg3 (Hermes review): Beginner strip = no raw code / confidence (plain reason span instead); phone mini summary;
   summary + takeaways columns filled (no dead block); card footers on one line */
.beg-mini,.dir-plain{display:none}
body:not([data-mode="advanced"]) #direction .dir-conf,body:not([data-mode="advanced"]) #direction .dir-reason{display:none}
body:not([data-mode="advanced"]) #direction .dir-plain{display:inline;font-size:12px;color:#fcd34d}
.fmeta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bt-cell small{font-size:10.5px;line-height:1.35;color:var(--muted)}
.btake{justify-content:space-between}
@media (min-width:1200px){body:not([data-mode="advanced"]) .bsum{justify-content:space-between}}
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  body:not([data-mode="advanced"]) #beg-mini{display:flex;flex-direction:column;gap:8px;padding:9px 10px}
  body:not([data-mode="advanced"]) #beg-sum .bs-banner,body:not([data-mode="advanced"]) #beg-sum .bs-chips{display:none}
  .beg-mini .bs-h{font-size:14px}
  .beg-mini .bs-arrow{width:28px;height:28px}
}
/* phones: Beginner summary text sizes (cvui). The cvui Basic | Advanced tab row that lived in this block is gone (cvx: the
   view-mode toggle left the UI; #beg-adv / #adv-beg switch the mode, the toolbar slot holds the Expand button) */
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  .bs-h{font-size:16px}
  .bs-chips{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pc-grid{grid-template-columns:minmax(0,1fr)}
}

/* cvhdr: phones = row 3 of the header: the switch left, the zone picker right (the status line has no room for it); never in a menu.
   Sideways phones: the one header row gets two more columns */
.tz-wrap{display:inline-flex;align-items:center;white-space:nowrap}
.tz-pick{display:inline-flex;margin-left:6px;vertical-align:middle;border:1px solid var(--line,#26324a);border-radius:6px;overflow:hidden}
.tz-opt{padding:1px 6px;border:0;background:transparent;color:var(--muted);font:600 11px var(--mono);cursor:pointer}
.tz-opt+.tz-opt{border-left:1px solid var(--line,#26324a)}
.tz-opt.on{background:#334155;color:#fff}
.tz-opt:focus-visible{outline:2px solid #93c5fd;outline-offset:-2px}
@media (max-width:640px),(pointer:coarse) and (max-height:500px){
  .mode-sw{grid-row:3;grid-column:1/-1;justify-self:start;height:30px}
  .mode-opt{padding:0 12px;font-size:13px}
  #tz-pick{grid-row:3;grid-column:1/-1;justify-self:end;align-self:center;height:30px;margin-left:0}
  .tz-opt{padding:0 9px;font-size:12px}
}
@media (pointer:coarse) and (max-height:500px) and (orientation:landscape){
  .top{grid-template-columns:auto minmax(96px,170px) minmax(0,1fr) auto auto auto}
  .mode-sw{grid-row:1;grid-column:4}
  #tz-pick{grid-row:1;grid-column:5}
  .appnav{grid-column:6}
}
/* cvex (partner Ahmed, 2 Nov, "please add option to expand the chart in the web too" - the Android app has one): ⤢ Expand
   = a 30 px button at the top-right of the PRICE pane, left of the price axis (--cvp-axis, app.js syncAxis) and inside the
   scale's top margin, so it covers no candle, no axis tag, and never the See more / Lock pills (top-LEFT) nor #jump
   (bottom-right). Expanded = html.cvp-expanded: the chart card fills the viewport - the Fullscreen API (the browser's own
   fixed box) where available, else app.js sets the overlay styles INLINE on the card (the sheet keeps the cvtop / cvui pins:
   nothing fixed here); a header row (#xbar: ticker · TF · session, live pill, the ≡ opener on phones, ✕) sits in flow ABOVE
   the price pane, --cvp-xbar tall, and every pane-top anchored child (draw pad, drawer, history note, note toast, empty
   state) shifts down by it; the volume pane / nav row / jump keep their bottom anchors. Both charts follow through their
   autoSize path - no request, no re-generate. Esc / ✕ / browser Back close it; per tab only (memory), nothing saved.
   Phone sideways: the same rules (no new phone query; the notch / home-indicator insets pad the card). */
.xpand{position:absolute;z-index:10;top:6px;right:calc(var(--cvp-axis,58px) + 8px);width:30px;height:30px;border-radius:7px;
  background:rgba(15,20,29,.88);border:1px solid #3b4a60;color:var(--muted);font:700 15px/1 var(--mono);display:grid;
  place-items:center;padding:0;cursor:pointer;touch-action:manipulation}
.xpand:hover{border-color:var(--accent);color:var(--accent)}
.xbar{display:none}
html.cvp-expanded{--cvp-xbar:40px;overflow:hidden;overscroll-behavior:none}
html.cvp-expanded .xpand{display:none}
html.cvp-expanded .chart-card{border:0;border-radius:0;padding:0 env(safe-area-inset-right,0px) var(--cvp-sab,0px) env(safe-area-inset-left,0px)}
html.cvp-expanded .chart-card>.xbar{display:flex;flex:0 0 var(--cvp-xbar);align-items:center;gap:8px;min-width:0;padding:0 8px 0 10px;
  border-bottom:1px solid var(--line);background:var(--panel)}
.xbar-t{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 14px var(--mono)}
.xbar-t>span{margin-left:8px}
.xbar-t .chip{cursor:default}
#xbar-live{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#xbar-live:empty{display:none}
.xbar-x{flex:0 0 auto;width:32px;height:32px;border-radius:8px;background:#0d131d;border:1px solid #3b4a60;color:var(--text);
  font:400 20px/1 var(--mono);display:grid;place-items:center;padding:0 0 2px;cursor:pointer;touch-action:manipulation}
.xbar-x:hover{border-color:var(--accent);color:var(--accent)}
html.cvp-expanded .chart-card>.more{display:none}   /* the See more / Lock pills belong to the page, not the overlay */
html.cvp-expanded .chart-card>.empty{top:var(--cvp-xbar)}
html.cvp-expanded .draw-pad{top:var(--cvp-xbar)}
html.cvp-expanded .drawer{top:var(--cvp-xbar)}
html.cvp-expanded .drawer-tab:not(.in-dir){top:calc(var(--cvp-xbar) + 38% - 24px)}
html.cvp-expanded .hist-note{top:calc(var(--cvp-xbar) + 6px)}
html.cvp-expanded .beg-note{top:calc(var(--cvp-xbar) + 8px)}
html.cvp-expanded #chart,html.cvp-expanded #vchart{touch-action:none}   /* no page rubber-band behind the overlay; lwc keeps its gestures */

/* cvlock (partner 31 Oct, iPhone INTC 5m, "a lock button to lock this area ... stay in chart zone"; 2nd screenshot: "see
   more area should have lock unlock"): ONE "🔒 Lock" / "🔓 Unlock" pill directly right of the "See more" pill (it shares the
   .more class = same style, absolute inside the chart card next to See more (cvui), hidden on desktop; app.js moreSync shows
   it with See more on phones only and lockPillPlace sets --cvp-lockpill-left = See more width + 8 px). Tapping it pins the chart zone -
   TF row (sticky header) + Direction row + price chart + volume + time axis - to the screen. Locked (html.cvp-locked,
   app.js): the page is frozen (app.js sets the iOS-safe body offset inline, nothing here), the chart card is sized to what
   is left of the viewport under the header + Direction row (--cvp-lock-sub = measured px above the card; price chart
   >= ~260 px; --cvp-lock-min = the card floor, 350 px / 200 px sideways), and every touch on the price / volume panes goes to the chart (vertical = price pan, horizontal = time,
   pinch = zoom). Unlocked = exactly the cvios / cvax behaviour (none of these rules apply). Desktop: hidden, unchanged. */
.more.lockpill{left:var(--cvp-lockpill-left,140px)}
.more.lockpill[aria-pressed=true]{background:#0e2a33}
html.cvp-locked{overflow:hidden;overscroll-behavior:none}
html.cvp-locked body{overscroll-behavior:none}
html.cvp-locked .chart-card{height:max(var(--cvp-lock-min,350px),calc(100vh - var(--cvp-lock-sub,130px) - var(--cvp-sab,0px)))}
html.cvp-locked .chart-card{height:max(var(--cvp-lock-min,350px),calc(100dvh - var(--cvp-lock-sub,130px) - var(--cvp-sab,0px)))}
html.cvp-locked #chart,html.cvp-locked #vchart{touch-action:none}

/* cvfx (partner Ahmed, 29 Oct, phone): <= 760 px the header block (logo row, ticker box, TF row with R/E/G) is LOCKED
   at the top - sticky positioning, page background, safe-area inset (the padding-top rules above), above the chart - and
   the chart, volume, signal card and panels scroll under it. Its height is unchanged (sticky adds no box). > 760 px
   (tablet / desktop) nothing changes. header.top (0,1,1) beats the inline .top{position:relative} (0,1,0) of the page.
   cvrot: a phone held sideways (coarse pointer, <= 500 px tall) is included; --cvp-more-left = the pill's left (the
   landscape block moves it past the notch). cvui (partner 31 Oct, "Lock unlock get stuck ... when you rotate screen"):
   the pills are no longer viewport-fixed at a measured top - they are ABSOLUTE children of .chart-card (top 6 px), so a
   rotation cannot leave them over the Direction row by construction; "Back to chart" (See more open) sits IN the sticky
   header row (.brand, app.js moves the node), never over a card title. */
.more{display:none}
@media (max-width:760px),(pointer:coarse) and (max-height:500px){
  #adv-bar>.bst-tabs{width:100%;margin-left:0}   /* REV002 (Ahmed PR #1): the Advanced-bar tabs go full width on phones */
  /* html,body{overflow-x:hidden} (top of this sheet) makes <body> a scroll container of its own, which silently turns
     the sticky header off (measured: the header scrolled away). overflow-x:clip still cuts horizontal overflow but
     creates no scroll container, so the header sticks to the viewport. */
  body{overflow-x:clip}
  header.top{position:sticky;top:0;z-index:50;background:var(--panel)}
  /* "See more ⌄" / "🔒 Lock" pills: absolute at the top-left INSIDE the chart card (6 px in), left-aligned past the
     drawer tab = clear of the (wide) price axis and the newest bars on the right; on the price pane they sit inside the
     price scale's 8 % top margin (scaleMargins.top 0.08), so they never cover candles. z 10 = above the indicator drawer (9) */
  .more{position:absolute;left:var(--cvp-more-left,44px);top:6px;z-index:10;
    display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:999px;font:600 12px var(--mono);
    color:var(--accent);background:rgba(15,20,29,.9);border:1px solid var(--accent);cursor:pointer;
    box-shadow:0 4px 14px rgba(0,0,0,.4);touch-action:manipulation;white-space:nowrap;line-height:1.4}
  .more[hidden]{display:none}
  /* open state ("Back to chart ⌃"): the same button, moved by app.js into the header's brand cell = an in-flow pill
     right of the wordmark inside the sticky header band (content scrolls under the header, so it covers no card title) */
  .top .brand>.more{position:static;z-index:auto;box-shadow:none;margin-left:2px}
  /* status note of the live layer ("Busy - chart kept, next refresh in 23 s"): one short line next to the LIVE pill */
  #regen{flex:0 0 auto;white-space:nowrap}
  #regen:empty{display:none}
}
/* cvmc: the toolbar's Multi-chart link: an Expand-style button; only #xexp stays pinned in the phone TF row */
a.xexp{text-decoration:none}
a#xmulti{position:static;box-shadow:none}
/* cvmc: the toolbar button replaces a second nav link; phones do the opposite (phone block: the one-line TF row stays as it was, Multi-chart is in the menu) */
.top:has(#xmulti) .navlink[data-page=multi]{display:none}

/* REV002: One Basic / Advanced selector controls the EXISTING full-page view mode.
   The duplicate independent analysis-summary tab state has been removed. */
.bst-tabs{display:inline-grid;grid-template-columns:repeat(2,minmax(92px,1fr));gap:3px;padding:3px;border:1px solid #334155;border-radius:10px;background:#0b1120;max-width:100%}
.bst-tabs button{appearance:none;min-width:0;padding:8px 12px;border:0;border-radius:7px;background:transparent;color:#cbd5e1;font:600 13px var(--mono);cursor:pointer;touch-action:manipulation}
.bst-tabs button.active,.bst-tabs button[aria-pressed="true"]{background:#315be7;color:#fff}
.bst-tabs button:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}
#beg-sum>.bst-tabs{width:100%}
#adv-bar>.bst-tabs{margin-left:auto}
