/* ══════════════════════════════════════════════════════════════════════════
   trading.css - the Trading page (trading.js).
   Tokens only, both themes follow. Formal register: no motion on money,
   colour only where it carries a state or an identity.
   ══════════════════════════════════════════════════════════════════════════ */

.tr-pad{padding:16px}
.tr-muted{color:var(--muted2)}
.tr-sub{font-size:var(--t-meta);font-weight:600;color:var(--muted);margin-bottom:6px}
.tr-cap{font-size:var(--t-meta);color:var(--muted);line-height:1.5;margin-top:10px}
.neg{color:var(--attention)}
.pos{color:var(--good)}

/* glossary term: a word you can tap */
.tr-g{all:unset;cursor:pointer;color:inherit;text-decoration:underline dotted;text-decoration-color:var(--muted2);
      text-underline-offset:3px;border-radius:4px}
.tr-g:focus-visible{outline:2px solid var(--voice);outline-offset:2px}

/* ── hero ─────────────────────────────────────────────────────────────── */
.tr-hero{padding:18px 16px 16px}
.tr-hero-top{display:flex;gap:14px;align-items:center}
.tr-av{flex:none;display:block}
.tr-hero-id{min-width:0}
.tr-name{font-size:var(--t-title);font-weight:700;display:flex;align-items:center;gap:8px;letter-spacing:-.2px}
.tr-role{font-size:var(--t-meta);color:var(--muted);line-height:1.4;margin-top:2px}
.tr-mood{font-size:var(--t-meta);color:var(--text);margin-top:6px;display:flex;align-items:center;gap:7px}
.tr-dot{width:8px;height:8px;border-radius:50%;flex:none}
.tr-eq{font-size:44px;font-weight:700;letter-spacing:-1.2px;line-height:1;margin:18px 0 0}
.tr-eq span{font-size:var(--t-body);font-weight:600;color:var(--muted);letter-spacing:0;margin-left:6px}
.tr-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}
.tr-stats .k{font-size:var(--t-label);color:var(--muted2)}
.tr-stats .v{font-size:var(--t-body);font-weight:600;font-variant-numeric:tabular-nums;margin-top:2px;white-space:nowrap}
.tr-stats-sm{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:10px}
@media (max-width:380px){.tr-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* the bot's note: a speech bubble, Hanken like every report (Newsreader is Ray's) */
.tr-bubble{position:relative;margin-top:16px;padding:12px 14px;background:var(--s2);border-radius:var(--r-sm)}
.tr-bubble::before{content:"";position:absolute;top:-6px;left:26px;width:12px;height:12px;background:var(--s2);transform:rotate(45deg);border-radius:2px}
.tr-bubble-h{font-size:var(--t-label);color:var(--muted2);margin-bottom:4px}
.tr-bubble p{margin:0;font-size:var(--t-body);line-height:1.5}

/* ── your call ────────────────────────────────────────────────────────── */
.tr-q-t{font-size:var(--t-read);font-weight:600;line-height:1.35}
.tr-q-h{font-size:var(--t-meta);color:var(--muted);line-height:1.5;margin-top:6px}
.tr-q-btns{display:flex;gap:10px;margin-top:14px}
.tr-btn{appearance:none;border:1px solid var(--border2);background:var(--s2);color:var(--text);font:inherit;
        font-size:var(--t-body);font-weight:600;padding:11px 0;border-radius:var(--r-sm);flex:1;cursor:pointer;min-height:44px}
.tr-btn:hover{border-color:var(--border3)}
.tr-btn:focus-visible{outline:2px solid var(--voice);outline-offset:2px}
.tr-btn:disabled{opacity:.5}
.tr-q-done{font-size:var(--t-meta);color:var(--muted);margin-top:12px}
.tr-reveal{padding:12px 14px;border-radius:var(--r-sm);margin-bottom:14px;background:var(--s2);border-left:3px solid var(--muted2)}
.tr-reveal.ok{border-left-color:var(--good)}
.tr-reveal.miss{border-left-color:var(--watch)}
.tr-reveal-h{font-weight:600;font-size:var(--t-body)}
.tr-reveal-b{font-size:var(--t-meta);color:var(--muted);line-height:1.5;margin-top:3px}
.tr-record{font-size:var(--t-label);color:var(--muted2);margin-top:12px}

/* ── charts ───────────────────────────────────────────────────────────── */
.tr-chart{position:relative;max-width:620px;margin-top:6px;touch-action:pan-y}
.tr-chart svg{display:block;overflow:visible}
.tr-grid{stroke:var(--border2);stroke-width:1}
.tr-tick{font-size:10px;fill:var(--muted2);font-variant-numeric:tabular-nums}
.tr-end{font-size:10.5px;fill:var(--text);font-weight:600}
.tr-band{fill:var(--measured);opacity:.16}
.tr-xhair{stroke:var(--muted2);stroke-width:1}
.tr-tip{position:absolute;top:4px;background:var(--s3);color:var(--text);border-radius:var(--r-xs);
        padding:8px 10px;font-size:var(--t-label);line-height:1.5;pointer-events:none;white-space:nowrap;
        box-shadow:0 4px 16px rgba(0,0,0,.18);z-index:2}
.tr-tip-h{color:var(--muted2);margin-bottom:2px}
.tr-tip i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:0}
.tr-tip b{font-variant-numeric:tabular-nums;margin-left:4px}
.tr-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:var(--t-label);color:var(--muted)}
.tr-legend span{display:inline-flex;align-items:center;gap:6px}
.tr-legend i{display:inline-block;width:14px;height:3px;border-radius:2px}
.tr-legend .tr-legend-band{height:10px;background:var(--measured);opacity:.32;border-radius:3px}
.tr-table summary{font-size:var(--t-label);color:var(--muted2);margin-top:10px;cursor:pointer}
.tr-table table{width:100%;border-collapse:collapse;margin-top:8px;font-size:var(--t-label);font-variant-numeric:tabular-nums}
.tr-table th,.tr-table td{text-align:right;padding:4px 6px;border-bottom:1px solid var(--border)}
.tr-table th:nth-child(-n+2),.tr-table td:nth-child(-n+2){text-align:left}
.tr-table th{color:var(--muted2);font-weight:600}

/* ── holdings ─────────────────────────────────────────────────────────── */
.tr-hold + .tr-hold,.tr-hold + .card{margin-top:12px}
.tr-hold-top{display:flex;align-items:baseline;gap:10px}
.tr-coin{font-weight:700;font-size:var(--t-body);letter-spacing:.2px}
.tr-hold-w{font-size:var(--t-meta);color:var(--muted)}
.tr-hold-pl{margin-left:auto;font-weight:600;font-variant-numeric:tabular-nums}
.tr-why{margin-top:10px;border-top:1px solid var(--border);padding-top:10px}
.tr-why summary{cursor:pointer;font-size:var(--t-meta);font-weight:600;list-style:none;display:flex;gap:6px;align-items:baseline}
.tr-why summary::-webkit-details-marker{display:none}
.tr-why summary::after{content:"+";margin-left:auto;color:var(--muted2);font-weight:400}
.tr-why[open] summary::after{content:"\2212"}
.tr-why p{margin:8px 0 0;font-size:var(--t-meta);color:var(--muted);line-height:1.55}
.tr-side{font-weight:700}
.tr-side.buy{color:var(--good)}
.tr-side.sell{color:var(--attention)}
.tr-empty{display:flex;gap:12px;align-items:center;font-size:var(--t-meta);color:var(--muted);line-height:1.5}

/* ── watchlist ────────────────────────────────────────────────────────── */
.tr-w + .tr-w{border-top:1px solid var(--border)}
.tr-w-row{all:unset;box-sizing:border-box;display:grid;grid-template-columns:56px 1fr 92px;align-items:center;gap:12px;
          width:100%;padding:11px 0;cursor:pointer;min-height:44px}
.tr-w-row:focus-visible{outline:2px solid var(--voice);outline-offset:2px;border-radius:6px}
.tr-w-r{text-align:right;font-size:var(--t-meta);font-variant-numeric:tabular-nums;white-space:nowrap}
.tr-range{position:relative;height:8px;border-radius:999px;
          background:linear-gradient(90deg,color-mix(in srgb,var(--attention) 30%,var(--s3)),var(--s3) 50%,color-mix(in srgb,var(--good) 30%,var(--s3)))}
.tr-range-dot{position:absolute;top:50%;width:12px;height:12px;border-radius:50%;background:var(--text);
              border:2px solid var(--s1);transform:translate(-50%,-50%);box-sizing:border-box}
.tr-w-more{padding:2px 0 12px}

/* ── lesson ───────────────────────────────────────────────────────────── */
.tr-lesson-t{font-size:var(--t-read);font-weight:700;line-height:1.3}
.tr-lesson p{font-size:var(--t-body);line-height:1.55;margin:8px 0 0}
.tr-lesson-seen{font-size:var(--t-meta);color:var(--text);background:var(--s2);border-radius:var(--r-xs);padding:9px 11px;margin-top:12px;line-height:1.5}
.tr-lesson-more{font-size:var(--t-meta);color:var(--muted);margin-top:10px}

/* ── retired ──────────────────────────────────────────────────────────── */
.tr-ret + .tr-ret{border-top:1px solid var(--border)}
.tr-ret-row{all:unset;box-sizing:border-box;display:flex;gap:12px;align-items:flex-start;width:100%;padding:12px 0;cursor:pointer}
.tr-ret-row:focus-visible{outline:2px solid var(--voice);outline-offset:2px;border-radius:6px}
.tr-ret-id{display:flex;flex-direction:column;gap:3px;min-width:0}
.tr-ret-n{font-weight:700;font-size:var(--t-body)}
.tr-ret-l{font-size:var(--t-meta);color:var(--muted);line-height:1.45}
.tr-ret-role{font-size:var(--t-meta);color:var(--muted2);line-height:1.45}

/* ── words ────────────────────────────────────────────────────────────── */
.tr-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.tr-chips .tr-g{text-decoration:none;font-size:var(--t-meta);padding:7px 12px;border-radius:999px;background:var(--s1);
                border:1px solid var(--border);color:var(--text)}
.tr-sheet{position:fixed;inset:0;z-index:1000;background:rgba(10,7,5,.45);display:flex;align-items:flex-end;justify-content:center}
.tr-sheet[hidden]{display:none}
.tr-sheet-in{background:var(--s1);color:var(--text);width:100%;max-width:520px;border-radius:var(--r-lg) var(--r-lg) 0 0;
             padding:22px 20px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -8px 32px rgba(0,0,0,.25)}
.tr-sheet-t{font-size:var(--t-title);font-weight:700}
.tr-sheet-in p{font-size:var(--t-body);line-height:1.55;margin:10px 0 0}
.tr-sheet-a{color:var(--muted)}
.tr-sheet-in .tr-btn{width:100%;margin-top:18px}
