/* ---------- the look: styles (html[data-style]) and accents (html[data-accent]) ----------
   Every colour in this file is a variable. :root holds Studio's; Quest, Nebula and Classic (the look before 0.8, and the
   default look since 0.14: the server always writes data-style) override the neutrals, fonts and shapes; an accent overrides only --accent / --accent-ink / --accent-text.
   The chart has its own colours (chart settings), which follow the style until the user picks their own. */
:root {
  --bg: #14110e; --panel: #1d1915; --panel2: #27211b; --sunken: #17130f; --chrome: #1a1612;
  --hover: #221c17; --rowline: #26201a; --menu: #231e19; --float: #231e19f2;
  --line: #2e2720; --line2: #3a3129; --faint: #4a3f33;
  --text: #f4ede3; --text-hi: #fffaf2; --muted: #b5a898;
  --accent: #ffb454; --accent-ink: #1a1208; --accent-text: #ffc98a;
  --green: #5cc8b0; --red: #ff7a66; --up-text: #8fdcc8; --down-text: #ffa596;
  --buy-bg: #5cc8b0; --buy-ink: #0b1a16; --sell-bg: #ff7a66; --sell-ink: #230a06;
  --orange: #ff9f43; --yellow: #ffd166; --gold: #ffc677; --warn: #ffd166; --warn-text: #ffe0a0;
  --mode-text: #d9c8ff;
  --sess-asia: #a48bff; --sess-london: #56b4ff; --sess-ny: #ff8a65;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --radius: 10px; --radius-lg: 18px; --radius-btn: 999px; --lip: none;
  /* the Round 2 designs: text shades, the warm hero, meters and rings */
  --soft: #e6dccf; --dim: #9a8d7e; --hero-muted: #d8c7b1; --seg-off: #3d342b; --open-ring: #a07a45; --sand: #cdbfae;
  --flame: #ff9f43; --shield: #cdbfae; --lipc: transparent; --icon-stroke: 2;
  color-scheme: dark;
}
:root[data-style="quest"] {
  --bg: #0a0b18; --panel: #131530; --panel2: #1c1f42; --sunken: #0e0f22; --chrome: #0f1026;
  --hover: #181a3a; --rowline: #20234a; --menu: #171938; --float: #171938f2;
  --line: #2a2e5c; --line2: #3a3f7a; --faint: #3a3f7a;
  --text: #f3f2ff; --text-hi: #ffffff; --muted: #a6a9d0;
  --accent: #6e4bff; --accent-ink: #ffffff; --accent-text: #a48bff;
  --green: #3ddc97; --red: #ff6b6b; --up-text: #a8f0cc; --down-text: #ffb3b3;
  --buy-bg: #3ddc97; --buy-ink: #0a0b18; --sell-bg: #ff6b6b; --sell-ink: #0a0b18;
  --orange: #ff8a3d; --yellow: #ffc15e; --gold: #ffc15e; --warn: #ffb547; --warn-text: #ffd08a;
  --mode-text: #c9b8ff;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Figtree', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --radius: 10px; --radius-lg: 18px; --radius-btn: 12px; --lip: 0 3px 0 #07081a;
  --soft: #dcdaf5; --dim: #8589b6; --hero-muted: #a6a9d0; --seg-off: #2a2e5c; --open-ring: #8589b6; --sand: #45c6ff;
  --flame: #ff8a3d; --shield: #45c6ff; --lipc: #07081a; --icon-stroke: 2.25;
}
:root[data-style="nebula"] {
  --bg: #06070f; --panel: #0a0d1c; --panel2: #121833; --sunken: #06070f; --chrome: #0a0d1c;
  --hover: #141a34; --rowline: #141a34; --menu: #10152e; --float: #10152ef2;
  --line: #1f2542; --line2: #2b3358; --faint: #39447a;
  --text: #eef1ff; --text-hi: #ffffff; --muted: #b7bedf;
  --accent: #6cc4ff; --accent-ink: #03101c; --accent-text: #8fd3ff;
  --green: #4fe3b5; --red: #ff7a8a; --up-text: #8ff0d2; --down-text: #ff9aa6;
  --buy-bg: #4fe3b5; --buy-ink: #03140e; --sell-bg: #ff7a8a; --sell-ink: #1c0508;
  --orange: #ffb86b; --yellow: #f5ce72; --gold: #f5ce72; --warn: #f5ce72; --warn-text: #fff1c9;
  --mode-text: #b69cff;
  --sess-asia: #b69cff; --sess-london: #6cc4ff; --sess-ny: #ffb86b;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Manrope', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, Consolas, monospace;
  --radius: 12px; --radius-lg: 22px; --radius-btn: 999px; --lip: none;
  --soft: #d4d9f2; --dim: #7a83ab; --hero-muted: #b7bedf; --seg-off: #1a2040; --open-ring: #39447a; --sand: #b7bedf;
  --flame: #f5ce72; --shield: #6cc4ff; --lipc: transparent; --icon-stroke: 1.8;
  /* Nebula's own: the gold of the stars (never the accent), the violet of the nebulae, the deepest shade */
  --star: #f5ce72; --star-pale: #fff1c9; --star-ink: #1a1405; --violet: #b69cff; --void: #04050b; --deep: #0d1122; --raised: #18204a;
}
:root[data-style="classic"] {
  --bg: #0b0d12; --panel: #12151c; --panel2: #171b24; --sunken: #0d1016; --chrome: #0f1218;
  --hover: #151924; --rowline: #1a1e28; --menu: #1a1f2b; --float: #1a1f2bf2;
  --line: #232835; --line2: #2d3444; --faint: #3a4152;
  --text: #d7dce5; --text-hi: #ffffff; --muted: #8089a0;
  --accent: #4c9aff; --accent-ink: #ffffff; --accent-text: #cfe2ff;
  --green: #26a69a; --red: #ef5350; --up-text: #b8f5dc; --down-text: #ffcdd2;
  --buy-bg: #1f8a7c; --buy-ink: #ffffff; --sell-bg: #c9403d; --sell-ink: #ffffff;
  --orange: #ff9800; --yellow: #e6c229; --gold: #f5c542; --warn: #ffb74d; --warn-text: #ffd699;
  --mode-text: #c9c3ff;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --radius: 8px; --radius-lg: 10px; --radius-btn: 6px; --lip: none;
  --soft: #c3c9d4; --dim: #6b7389; --hero-muted: #aab2c3; --seg-off: #2d3444; --open-ring: #6b7389; --sand: #8089a0;
  --flame: #ff9800; --shield: #4c9aff; --lipc: transparent; --icon-stroke: 2;
}
/* accents: the text colour on an accent fill (--accent-ink) and a light version for text on dark (--accent-text) */
:root[data-accent="amber"] { --accent: #ffb454; --accent-ink: #1a1208; --accent-text: #ffc98a; }
:root[data-accent="violet"] { --accent: #6e4bff; --accent-ink: #ffffff; --accent-text: #b39dff; }
:root[data-accent="blue"] { --accent: #4c9aff; --accent-ink: #07101f; --accent-text: #a8cbff; }
:root[data-accent="teal"] { --accent: #2ec4b6; --accent-ink: #04161a; --accent-text: #8fe6dc; }
:root[data-accent="rose"] { --accent: #ff7aa2; --accent-ink: #2a0a14; --accent-text: #ffb3c9; }
:root[data-accent="ion"] { --accent: #6cc4ff; --accent-ink: #03101c; --accent-text: #8fd3ff; }
:root[data-accent="azure"] { --accent: #0071e3; --accent-ink: #ffffff; --accent-text: #7cb8ff; }
:root[data-accent="shu"] { --accent: #c8402f; --accent-ink: #ffffff; --accent-text: #f0907f; }
/* tints made from the colours above, so every style and accent gets matching ones */
:root, :root[data-style] {
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--panel));
  --accent-line: color-mix(in srgb, var(--accent) 50%, var(--panel));
  --up-soft: color-mix(in srgb, var(--green) 16%, var(--panel));
  --up-line: color-mix(in srgb, var(--green) 42%, var(--panel));
  --down-soft: color-mix(in srgb, var(--red) 16%, var(--panel));
  --down-line: color-mix(in srgb, var(--red) 42%, var(--panel));
  --warn-soft: color-mix(in srgb, var(--warn) 13%, var(--panel));
  --warn-line: color-mix(in srgb, var(--warn) 40%, var(--panel));
  --mode-soft: color-mix(in srgb, var(--mode-text) 14%, var(--panel));
  --mode-line: color-mix(in srgb, var(--mode-text) 38%, var(--panel));
  --accent-hover: color-mix(in srgb, var(--accent) 80%, var(--text-hi)); /* hover on an accent fill, follows the accent */
  --hero: color-mix(in srgb, var(--accent) 8%, var(--panel));
  --hero-edge: color-mix(in srgb, var(--accent) 24%, var(--panel));
  --accent-hi: color-mix(in srgb, var(--accent) 62%, #ffffff);
  --accent-lip: color-mix(in srgb, var(--accent) 55%, #000000);
  --flame-soft: color-mix(in srgb, var(--flame) 16%, var(--panel));
  --lamp: radial-gradient(460px 320px at 16% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font-body); }
/* pages (main.js): the next one is built out of sight at full size (so its charts measure themselves) and swapped in
   when it is ready; its animations wait, and it never takes part in a page transition (motion.css). Hidden with
   opacity, not visibility: visibility is inherited, so under Calm (every property "transitions" in .01 ms) the whole
   page would stay hidden for one frame after the swap; the wrapper itself never transitions. */
.page-next { position: fixed; inset: 0; opacity: 0; pointer-events: none; z-index: -1; overflow: hidden; }
#app > .page { transition: none !important; }
.page-next * { animation-play-state: paused !important; view-transition-name: none !important; }
/* a page that takes a moment: a progress cursor and a thin bar along the top */
html.route-busy, html.route-busy * { cursor: progress !important; }
html.route-busy body::after { content: ""; position: fixed; left: 0; top: 0; z-index: 8500; width: 100%; height: 2px; pointer-events: none;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(.6); }
@media (prefers-reduced-motion: no-preference) { html.route-busy body::after { animation: route-bar 2.4s cubic-bezier(.1, .7, .3, 1) both; } }
@keyframes route-bar { from { transform: scaleX(.05); } to { transform: scaleX(.9); } }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 0 0 8px; }
h4 { font-size: 12px; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); }
textarea { width: 100%; resize: vertical; }
input:disabled { opacity: .5; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; margin-left: auto; }
.grow { flex: 1; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.pos-bg { background: var(--green); }
.neg-bg { background: var(--red); }
.hint { color: var(--muted); font-size: 11.5px; margin: 2px 0 0; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 110px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 11.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--down-text); }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn.block { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.icon-btn:hover { color: var(--text); background: var(--panel2); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.card.callout { border-color: var(--accent-line); background: var(--accent-soft); margin-bottom: 16px; }
.badge { background: var(--accent-soft); color: var(--accent-text); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--rowline); }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.table.compact td, .table.compact th { padding: 4px 8px; }
.tabs { display: flex; gap: 2px; }
.tab { background: none; border: none; color: var(--muted); padding: 8px 12px; cursor: pointer; border-radius: var(--radius-btn); text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel2); }

/* toasts & modals */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 1000; max-width: 380px; }
.toast { background: var(--menu); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 9px 12px; border-radius: 6px; box-shadow: 0 6px 24px #0008; transition: opacity .3s, transform .3s; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
.toast.out { opacity: 0; transform: translateX(20px); }
.modal-wrap { position: fixed; inset: 0; background: #000a; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 900; overflow: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 100%; box-shadow: 0 20px 60px #000c; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
/* the question of ui.js confirmBox: its lines (\n) stay lines */
.confirm-msg { margin: 0; white-space: pre-line; line-height: 1.5; }

/* home */
.home { min-height: 100%; }
.home-top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.logo { width: 24px; height: 24px; display: block; }
.home-body { padding: 24px; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.home-foot { max-width: 1200px; margin: 0 auto; padding: 0 24px 22px; }
.home.styled .home-foot { max-width: 1180px; padding: 0 32px 24px; }
.whatsnew-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.whatsnew-link:hover { color: var(--text); text-decoration: underline; }
/* What's new (whatsnew.js) */
.whatsnew { display: flex; flex-direction: column; gap: 20px; max-height: 68vh; overflow: auto; padding-right: 4px; }
.wn-head { display: flex; align-items: baseline; gap: 10px; }
.wn-version { font-weight: 700; font-variant-numeric: tabular-nums; }
.wn-date { font-size: 12px; color: var(--muted); }
.wn-tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.wn-entry h4 { margin: 4px 0 2px; font-size: 17px; color: var(--text-hi); text-transform: none; letter-spacing: 0; }
.wn-intro { margin: 2px 0 6px; color: var(--muted); line-height: 1.45; }
.wn-group h5 { margin: 12px 0 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.wn-group ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; line-height: 1.45; }
.wn-note { margin: 0; }
.wn-before { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.wn-toast a { color: var(--accent-text); font-weight: 600; }
.page-head { display: flex; align-items: center; justify-content: space-between; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.session-card { cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.session-card:hover { border-color: var(--line2); }
.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sc-stats div { display: flex; flex-direction: column; font-size: 12px; }
.sc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 > .card, .grid3 > .card { display: flex; flex-direction: column; gap: 10px; }
.progress { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.steps { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.preset-list { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* workspace */
.ws { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.ws-top { display: flex; align-items: center; gap: 14px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ws-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.chips { margin-left: auto; display: flex; gap: 6px; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 4px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; }
.chip b.pos { color: var(--green); } .chip b.neg { color: var(--red); }
.ws-replay { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ws-alt { flex: 1; overflow: auto; }
.ws-toolbar { display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--chrome); flex-wrap: wrap; }
.tf-group { display: flex; gap: 1px; background: var(--sunken); border-radius: var(--radius-btn); padding: 2px; }
.tf { background: none; border: none; color: var(--muted); padding: 4px 6px; border-radius: var(--radius-btn); cursor: pointer; font-size: 12px; font-weight: 600; }
.tf:hover { color: var(--text); }
.tf.active { background: var(--accent-soft); color: var(--accent-text); }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ctl { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 4px 10px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.ctl:hover { border-color: var(--line2); }
.ctl.play { min-width: 38px; font-weight: 700; }
.ctl.play.on { background: var(--up-soft); border-color: var(--green); color: var(--up-text); }
.speed { padding: 3px 4px; font-size: 12px; }
.skip { display: inline-flex; gap: 2px; align-items: center; }
.skip-n { width: 52px; padding: 3px 5px; font-size: 12px; }
.replay-time { font-size: 12.5px; white-space: nowrap; }
.replay-time .clock { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-hi); }
.tzname { font-size: 11px; }
.ws-body { flex: 1; display: flex; min-height: 0; }
.toolbox { width: 40px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-right: 1px solid var(--line); background: var(--chrome); }
.tool { width: 30px; height: 30px; background: none; border: none; color: var(--muted); border-radius: var(--radius-btn); cursor: pointer; font-size: 15px; }
.tool:hover { background: var(--panel2); color: var(--text); }
.tool.active { background: var(--accent-soft); color: var(--accent-text); }
.chart { flex: 1; position: relative; min-width: 0; }
/* a market with no candles here (Workspace.noCandles): a plain note in the middle of the empty chart */
.chart-note { position: absolute; z-index: 5; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; background: var(--panel);
  color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 8px 28px #0006; }
.chart-note b { color: var(--text-hi); }
.chart-note p { margin: 0; color: var(--muted); line-height: 1.45; }
.chart.picking { outline: 2px dashed var(--accent); outline-offset: -2px; cursor: crosshair; }
.chart-host { position: relative; }
.chart-overlay { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; }
/* the hidden chart journal pictures are drawn on (Workspace.pictureOf): a fixed 16:9 size, off the screen */
.chart-host.shot-host { position: fixed; left: -99999px; top: 0; pointer-events: none; overflow: hidden; }
/* the "dot" mouse cursor, the lock badge, and the card shown on a news line */
/* the mouse pointer on the chart: the cursor style (🎨 → Chart), a cross while drawing, a grabbing hand while dragging
   (not with the dot: it stays a dot, Theo 0.22.0) */
.chart[data-cursor=cross] { cursor: crosshair; }
.chart[data-cursor=dot] { cursor: none; }
.chart[data-cursor=arrow] { cursor: default; }
.chart.tool-on { cursor: crosshair !important; }
.chart.panning:not([data-cursor=dot]) { cursor: grabbing !important; }
.chart.picking { cursor: crosshair !important; }
.chart.tool-on .chart-dot { display: none !important; }
.chart-dot { position: absolute; z-index: 6; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 1px var(--bg); pointer-events: none; display: none; }
.lock-btn { width: 24px; font-size: 12px; }
.news-card { position: absolute; z-index: 6; display: none; max-width: 320px; pointer-events: none; background: var(--float); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 6px 20px #0009; }
.news-card .nc-time { color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.news-card .nc-soon { color: var(--orange); }
.news-card .nc-row { margin-top: 5px; line-height: 1.35; }
.news-card .nc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.news-card .nc-vals { display: flex; gap: 12px; color: var(--muted); font-size: 11.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.news-card .nc-vals b { color: var(--text); font-weight: 600; }
/* pop-ups where a target, stop or pending order filled (chart.js flash) */
.chart-fx { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.fx-pill { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.fx-in { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 10px; border: 1px solid currentColor; font: 600 12px var(--font-body); font-variant-numeric: tabular-nums; box-shadow: 0 2px 10px #0009; animation: fx-rise 2.2s ease-out forwards; }
@keyframes fx-rise {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  12% { opacity: 1; transform: translateY(-6px) scale(1.08); }
  25% { transform: translateY(-10px) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-34px) scale(1); }
}
@keyframes fx-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fx-in { animation: fx-fade 2.2s linear forwards; } }
.chart-legend { position: absolute; left: 10px; top: 20px; z-index: 4; display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); pointer-events: none; font-variant-numeric: tabular-nums; }
.chart-legend b { color: var(--text); font-weight: 500; }
.side { width: 330px; border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.stabs { display: flex; border-bottom: 1px solid var(--line); }
.stab { flex: 1; background: none; border: none; color: var(--muted); padding: 9px 0; cursor: pointer; border-bottom: 2px solid transparent; }
.stab.active { color: var(--text); border-bottom-color: var(--accent); }
.side-body { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.bottom { position: relative; display: flex; flex-direction: column; height: 170px; min-height: 0; border-top: 1px solid var(--line); background: var(--panel); }
.bottom.collapsed { height: auto; }
.bottom.collapsed .trades { display: none; }
.bottom-grip { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 6; }
.bottom-grip:hover, .bottom-grip.dragging { background: linear-gradient(transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); }
.bottom-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px; font-size: 12px; white-space: nowrap; min-height: 30px; }
.bottom-head .bh-item { color: var(--muted); margin-left: 12px; }
.bottom-head .bh-item b { color: var(--text); font-weight: 600; }
.bottom-head .bh-item b.pos { color: var(--green); } .bottom-head .bh-item b.neg { color: var(--red); }
.bottom-toggle { font-size: 13px; }
.trades { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 6px; }
.tf-more { padding: 4px 5px; }
.tool-list { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tool-more { font-size: 16px; letter-spacing: -1px; }
.popover { min-width: 230px; }
.cmenu-icon { width: 20px; text-align: center; color: var(--muted); }
.fav-star { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--faint); padding: 0 2px; margin-left: 10px; line-height: 1; }
.fav-star:hover { color: var(--muted); }
.fav-star.on { color: var(--gold); }

/* ticket */
.ticket { display: flex; flex-direction: column; gap: 8px; }
.side-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-btn { padding: 9px; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 700; }
.side-btn.buy.active, .side-btn.buy:hover { background: var(--up-soft); border-color: var(--green); color: var(--up-text); }
.side-btn.sell.active, .side-btn.sell:hover { background: var(--down-soft); border-color: var(--red); color: var(--down-text); }
.segs { display: flex; background: var(--sunken); border-radius: var(--radius-btn); padding: 2px; }
.seg { flex: 1; background: none; border: none; color: var(--muted); padding: 5px; border-radius: var(--radius-btn); cursor: pointer; }
.seg.active { background: var(--panel2); color: var(--text); }
.trow { display: flex; align-items: center; gap: 6px; }
.trow > label { width: 58px; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.trow > input, .trow > select { flex: 1; }
.tp-block { display: flex; flex-direction: column; gap: 4px; }
.tp-rows { display: flex; flex-direction: column; gap: 4px; }
.tp-row { display: flex; align-items: center; gap: 4px; }
.tp-label { width: 34px; color: var(--green); font-size: 12px; flex-shrink: 0; }
.tp-price { flex: 1; min-width: 84px; }
.tp-pct { width: 54px; flex-shrink: 0; padding-right: 2px; }
.tp-row .muted.small { white-space: nowrap; min-width: 44px; }
.ticket-summary { background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.place { padding: 10px; font-weight: 700; color: var(--buy-ink); }
.place.buy { background: var(--buy-bg); border-color: var(--buy-bg); }
.place.sell { background: var(--sell-bg); border-color: var(--sell-bg); color: var(--sell-ink); }
/* Place stays in view at the bottom of the Trade panel however many rules and confluences the setup has (the
   panel-coloured ring hides what scrolls under it; the styled looks use their own footer, looks.css .tk-foot) */
.ticket:not(.styled) > .place { position: sticky; bottom: -2px; z-index: 2; box-shadow: 0 0 0 8px var(--panel); }
.dim { opacity: .45; }
.positions { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.pos-card { border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--panel2); }
.pos-card.sell { border-left-color: var(--red); }
.pos-card.pending { border-left-color: var(--accent); border-style: dashed; }
.pos-head { display: flex; align-items: baseline; gap: 4px; }
.pos-tps { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tp-chip { background: var(--up-soft); border: 1px solid var(--up-line); border-radius: 4px; padding: 1px 2px 1px 6px; font-size: 11.5px; }
.tp-chip.filled { opacity: .55; padding-right: 6px; }
.pos-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.empty { text-align: center; padding: 8px; }

/* news */
.folder { display: inline-flex; vertical-align: -2px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.news-list { display: flex; flex-direction: column; gap: 2px; }
.news-row { display: grid; grid-template-columns: 50px 20px 36px 1fr; gap: 4px 6px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--rowline); font-size: 12px; }
.news-row.upcoming .ntitle { color: var(--text-hi); }
.news-row.past { opacity: .8; }
.ntime { font-variant-numeric: tabular-nums; color: var(--muted); }
.ncur { font-weight: 700; font-size: 11px; }
.nvals { grid-column: 2 / -1; display: flex; gap: 10px; color: var(--muted); font-size: 11px; }
.nvals b { color: var(--text); font-weight: 500; }
.news-head { display: flex; align-items: baseline; gap: 4px; }

/* day log */
.day-tab { display: flex; flex-direction: column; gap: 10px; }
.day-head { display: flex; align-items: baseline; }

/* journal */
.journal { display: grid; grid-template-columns: 420px 1fr; gap: 16px; padding: 16px; align-items: start; }
.journal-left { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { font-size: 10.5px; color: var(--muted); text-align: center; }
.cal-cell { min-height: 52px; background: var(--chrome); border: 1px solid var(--rowline); border-radius: 5px; padding: 3px; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; font-size: 10.5px; color: var(--muted); text-align: left; }
.cal-cell.empty { background: none; border: none; cursor: default; }
.cal-cell.win { background: var(--up-soft); border-color: var(--up-line); color: var(--text); }
.cal-cell.loss { background: var(--down-soft); border-color: var(--down-line); color: var(--text); }
.cal-cell.sel { outline: 2px solid var(--accent); }
.cal-d { font-weight: 600; display: flex; align-items: center; gap: 3px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cal-pnl { font-weight: 600; margin-top: auto; }
.cal-weeks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11px; }
.day-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; max-height: 40vh; overflow: auto; }
.day-list h4 { margin-top: 4px; }
.day-row { display: grid; grid-template-columns: 1.4fr 1fr .5fr 1fr; gap: 6px; width: 100%; background: none; border: none; border-bottom: 1px solid var(--rowline); padding: 6px 2px; cursor: pointer; text-align: left; font-size: 12px; }
.day-row:hover, .day-row.sel { background: var(--hover); }
.day-row span:last-child { text-align: right; }
.day-detail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dd-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
/* the day's trades: numbers on one line, the setup and the words wrap within a sensible width, and the table scrolls
   sideways inside the panel when the panel is narrower (a live account's journal, a laptop): it never runs past the panel */
.dd-trades { overflow-x: auto; max-width: 100%; }
.dd-trades .table td { white-space: nowrap; }
.dd-trades .table td.dd-setup { white-space: normal; min-width: 96px; max-width: 200px; }
.dd-trades .table td.dd-words { white-space: normal; min-width: 96px; max-width: 220px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; }
.shots img { height: 110px; border-radius: 6px; border: 1px solid var(--line); display: block; }
.shot { position: relative; }
.shot .icon-btn { position: absolute; top: 2px; right: 2px; background: #000a; }
@media (max-width: 1000px) { .journal { grid-template-columns: 1fr; } .journal-left { position: static; } }

/* the journal's view switch (Calendar | Trades; Clarity: Timeline too) */
.j-head { display: flex; align-items: center; gap: 10px; }
.j-view { display: inline-flex; }
.j-view .seg { padding: 4px 14px; font-size: 12.5px; }
.journal.j-logwrap { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.j-log { min-width: 0; }

/* the journal's Trades list (tradelog.js) */
.tl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); }
.tl-bar .grow { flex: 1; }
.tl-add { display: inline-flex; align-items: center; gap: 4px; }
.tl-cols-btn { display: inline-flex; align-items: center; gap: 4px; }
.tl-chip { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); font-size: 12.5px; color: var(--text); overflow: hidden; }
.tl-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.tl-chip-main { border: 0; background: none; color: inherit; font: inherit; padding: 4px 4px 4px 11px; cursor: pointer; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-chip:not(.on) .tl-chip-main { color: var(--muted); }
.tl-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 9px 4px 5px; font-size: 11px; line-height: 1; }
.tl-chip-x:hover, .tl-chip-main:hover { color: var(--text); }
.tl-clear { font-size: 12.5px; }
/* the list scrolls inside its own box, so the column titles (sticky) stay at its top while you read down a long list */
.tl-wrap { overflow: auto; max-height: max(280px, calc(100vh - 320px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tl-table th { padding: 0; white-space: nowrap; position: sticky; top: 0; background: var(--panel); z-index: 1; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.tl-table td { white-space: nowrap; }
.tl-table td.tl-mis, .tl-table td.tl-good { white-space: normal; min-width: 120px; max-width: 260px; font-size: 12px; }
.tl-table td.tl-mis { color: var(--red); }
.tl-table td.tl-good { color: var(--green); }
.tl-table td.tl-ico { color: var(--muted); }
.tl-table td.tl-ico svg { vertical-align: -3px; }
.tl-sort { display: inline-flex; align-items: center; gap: 4px; width: 100%; border: 0; background: none; color: inherit; font: inherit; padding: 6px 8px; cursor: pointer; text-align: left; }
.tl-sort:hover { color: var(--text); }
.tl-table th.sorted { color: var(--text); }
.tl-arrow { font-size: 9px; color: var(--accent); min-width: 8px; }
.tl-empty { padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tl-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.tl-foot b { font-weight: 600; }
.tl-pop { display: flex; flex-direction: column; gap: 6px; min-width: 230px; max-width: 320px; padding: 4px 4px 2px; }
.tl-pop-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.tl-pop-head .grow { flex: 1; }
.tl-pop-hint { margin: 0; padding: 0 4px; line-height: 1.4; }
.tl-find { width: 100%; }
.tl-opts { display: flex; flex-direction: column; max-height: 300px; overflow: auto; }
.tl-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tl-opt[hidden] { display: none; } /* (display: grid above would beat the browser's own hidden rule: the Search box hides rows) */
.tl-opt:hover { background: var(--hover); }
.tl-opt.none { opacity: .55; }
.tl-n { font-variant-numeric: tabular-nums; }
.tl-pop-foot { display: flex; gap: 14px; padding: 4px 6px 2px; border-top: 1px solid var(--rowline); }
.tl-range { display: flex; gap: 10px; padding: 0 4px 4px; }
.tl-range label { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tl-range input { width: 100%; min-width: 0; }
.tl-col { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 13px; }
.tl-col:hover { background: var(--hover); }
.tl-col label { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; }
.tl-col-move { display: inline-flex; gap: 2px; }
.tl-col-move .icon-btn { width: 24px; height: 22px; padding: 0; }
.tl-col-move .icon-btn:disabled { opacity: .3; cursor: default; }

/* stars to look at (the Trades list, the day's trades) */
.stars-view { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars-view i { width: var(--s, 12px); height: var(--s, 12px); display: block; color: var(--seg-off, var(--line2)); }
.stars-view i.on { color: var(--gold); }
.stars-view svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.stars-view .sb { fill: color-mix(in srgb, var(--text) 25%, transparent); }
.stars-view i.on .sb { fill: color-mix(in srgb, var(--gold) 45%, var(--text-hi, var(--text))); }

/* trade editor */
.trade-editor { display: flex; flex-direction: column; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.facts div { display: flex; flex-direction: column; font-size: 12px; }
.chip-set { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip-toggle { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 12px; }
.chip-toggle.on { background: var(--down-soft); border-color: var(--red); color: var(--down-text); }

/* analytics */
.analytics { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.an-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-body .analytics { padding: 0; }
.empty-state { text-align: center; padding: 60px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tiles.small { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
/* a day's four tiles: beside its title while there's room, else on a line of their own, and two by two in a narrow day
   panel (a laptop, a live account): an amount never runs under the next tile */
.dd-head { container: dd / inline-size; }
.dd-head .tiles.small { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 536px); }
@container dd (max-width: 535px) { .dd-head .tiles.small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-label { font-size: 11px; color: var(--muted); }
.tile-value { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-chart { height: 240px; position: relative; }
/* one grid for all the rows (each row a subgrid), so the columns line up and a narrow card (three cards on a laptop)
   shrinks the label and the bar instead of pushing the numbers past the card's edge */
.hbars { display: grid; grid-template-columns: minmax(40px, 90px) minmax(24px, 1fr) max-content max-content; gap: 5px 6px; align-items: center; }
.hbar { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; font-size: 12px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 3px; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-extra { font-size: 11px; text-align: right; white-space: nowrap; }
.vbars { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.vbar-fill { width: 100%; border-radius: 3px 3px 0 0; min-height: 1px; }
.vbar-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
.vbar-n { font-size: 11px; }

.card.featured { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--panel)); display: flex; flex-direction: column; gap: 10px; }
.cost { font-size: 13px; }
.tf.rth { color: var(--orange); }
.ctl.on { background: var(--warn-soft); border-color: var(--orange); color: var(--warn-text); }

/* context menu */
/* a submenu sits inside its row: it sets its own text colour, so a highlighted row's colour (Clarity, Dojo) never leaks into it */
.cmenu { position: fixed; z-index: 2000; min-width: 210px; background: var(--menu); border: 1px solid var(--line2); border-radius: 8px; padding: 4px; box-shadow: 0 10px 30px #000a; font-size: 13px; color: var(--text); }
.cmenu-subpanel { position: absolute; left: 100%; top: -5px; display: none; max-height: calc(100vh - 16px); overflow-y: auto; }
.cmenu-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 4px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.cmenu-item:hover { background: var(--accent-soft); }
.cmenu-item:hover > .cmenu-subpanel { display: block; }
.cmenu-item.disabled { opacity: .45; cursor: default; }
.cmenu-item.danger { color: var(--down-text); }
.cmenu-check { width: 16px; text-align: center; color: var(--accent); }
.cmenu-label { flex: 1; }
.cmenu-hint { color: var(--muted); font-size: 11px; margin-left: 16px; }
.cmenu-arrow { color: var(--muted); }
.cmenu-sep { height: 1px; background: var(--line2); margin: 4px 2px; }
.cmenu-header { padding: 4px 10px 2px 26px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.color-in { width: 34px; height: 26px; padding: 0 2px; border-radius: 5px; cursor: pointer; background: none; }

/* floating drawing toolbar */
.draw-bar { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 4px; background: var(--float); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 6px; box-shadow: 0 6px 20px #0008; }
.draw-bar.moved { transform: none; }
.draw-bar .db-grip { cursor: grab; color: var(--muted); font-size: 12px; letter-spacing: -3px; padding: 2px 5px 2px 1px; user-select: none; touch-action: none; }
.draw-bar .db-grip:hover { color: var(--text); }
.draw-bar.dragging, .draw-bar.dragging .db-grip { cursor: grabbing; }
.draw-bar select { padding: 3px 4px; font-size: 12px; }
.draw-bar .tname { font-size: 12px; color: var(--muted); padding: 0 4px; }
.draw-bar .icon-btn { font-size: 14px; }
.auto-btn { position: absolute; z-index: 5; width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--line2); background: var(--float); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; }
.auto-btn.on { color: var(--text-hi); background: var(--accent-soft); border-color: var(--accent-line); }
.settings-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.settings-grid .lbl { color: var(--muted); font-size: 12.5px; }
.settings-grid .ctrl { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
/* a drawing tool's templates in its settings window (drawingSettings): click to choose, drag to reorder (ui.js dragToReorder) */
.tpl-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); user-select: none; }
.tpl-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 4px; border-radius: 6px; cursor: grab; font-size: 13px; color: var(--text); }
.tpl-row:hover { background: var(--hover); }
.tpl-row.on { background: var(--accent-soft); color: var(--text-hi); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tpl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tpl-row .tpl-grip { display: flex; color: var(--dim); }
.tpl-row .tpl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-row .tpl-def { font-size: 11px; color: var(--muted); padding: 1px 6px; border: 1px solid var(--line2); border-radius: 999px; }
.tpl-list.sorting, .tpl-list.sorting .tpl-row { cursor: grabbing; }
.tpl-row.dragging { background: var(--panel2); box-shadow: 0 4px 14px color-mix(in srgb, var(--bg) 70%, transparent), inset 0 0 0 1px var(--accent-line); }
.tpl-acts { flex-wrap: wrap; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.tz-sel { font-size: 12px; padding: 3px 4px; max-width: 150px; }
.session-sel { font-size: 12px; padding: 3px 4px; width: 96px; }
.ctl.ny { border-color: var(--accent-line); color: var(--accent-text); }
.time-box { display: flex; align-items: center; gap: 6px; }
.skip-n { width: 44px; }
.callout-warn { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; }
code { background: var(--sunken); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* color picker & line pickers (colorpicker.js) */
.swatch { width: 28px; height: 24px; padding: 3px; border-radius: 5px; border: 1px solid var(--line2); cursor: pointer;
  background: repeating-conic-gradient(#3a3f4b 0 25%, #1b1f28 0 50%) 0 0 / 8px 8px; }
.swatch:hover { border-color: var(--muted); }
.swatch-chip { display: block; width: 100%; height: 100%; border-radius: 3px; }
.color-pop { padding: 8px; min-width: 0; }
.color-box { display: flex; flex-direction: column; gap: 6px; }
.sw-grid { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.sw-row { display: flex; gap: 3px; flex-wrap: wrap; max-width: 207px; align-items: center; min-height: 18px; }
.sw { width: 18px; height: 18px; border-radius: 3px; border: 1px solid #0006; padding: 0; cursor: pointer; }
.sw:hover { transform: scale(1.15); }
.sw.on { outline: 2px solid var(--text-hi); outline-offset: 1px; }
.sw-add { background: var(--panel2); color: var(--muted); border: 1px dashed var(--line2); font-size: 13px; line-height: 14px; }
/* the position box's targets on its bar (drawui.js targetsControl, 0.23.6) */
.pos-tps-ctl { display: inline-flex; gap: 3px; }
.pos-tp-split { font-variant-numeric: tabular-nums; }
.pos-tp-box { display: flex; flex-direction: column; gap: 6px; padding: 4px; min-width: 220px; }
.pos-tp-row { display: flex; align-items: center; gap: 6px; }
.pos-tp-n { width: 30px; font-weight: 600; }
.pos-tp-p { flex: 1; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.pos-tp-in { width: 56px; }
.pos-tp-x { width: 26px; text-align: center; }
/* right-click one of your own colours: remove it (colorpicker.js, 0.23.6) */
.sw-rm { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: 207px; }
.sw-rm[hidden] { display: none; }
.sw-rm-chip { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #0006; flex: none; }
.sw-rm .btn.small { padding: 2px 6px; font-size: 11px; }
.hidden-color { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.op-row { display: flex; align-items: center; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line2); }
.op-range { flex: 1; accent-color: var(--accent); }
.op-val { width: 36px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
/* a page that could not open, with nothing to go back to (main.js errorPage) */
.route-error { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.route-error-card { max-width: 440px; padding: 28px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.route-error-card h2 { margin: 0 0 8px; font-size: 20px; }
.route-error-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.route-error-card .row { justify-content: center; gap: 8px; }
/* Chart settings (0.17.0): preset tiles, your own presets, opacity next to a colour */
.op-inline { display: inline-flex; align-items: center; gap: 6px; width: 132px; margin-left: 4px; }
.op-inline .op-range { min-width: 0; }
.op-inline.off { opacity: .4; }
.cp-wrap { display: flex; flex-direction: column; gap: 8px; }
.cp-wrap h4 { margin: 6px 0 0; }
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cp-tile { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; min-width: 0; }
.cp-tile:hover { border-color: var(--line2); }
.cp-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cp-tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cp-tile.on .cp-name { color: var(--accent-text); font-weight: 600; }
.cp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-prev { position: relative; display: block; height: 40px; border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); }
.cp-prev i { position: absolute; display: block; }
.cp-gh { left: 0; right: 0; height: 1px; } .cp-gv { top: 0; bottom: 0; width: 1px; }
.cp-scale { top: 0; bottom: 0; right: 10px; width: 1px; }
.cp-wick { width: 1px; } .cp-body { width: 8px; border-radius: 1px; }
.cp-del { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; line-height: 18px; font-size: 10px;
  background: var(--panel); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.cp-tile:hover .cp-del, .cp-del:focus-visible { opacity: 1; }
.cp-del:hover { color: var(--down-text); }
.cp-add { align-items: center; justify-content: center; border-style: dashed; color: var(--muted); min-height: 66px; }
.cp-add:hover { color: var(--text); }
.cp-plus { font-size: 20px; line-height: 1; }
.cp-parts { display: flex; flex-direction: column; gap: 6px; }
.cp-candles .ctrl { flex-wrap: nowrap; }
.line-btn { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px; border-radius: 5px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; }
.line-btn:hover { border-color: var(--line2); }
.line-btn .caret { font-size: 9px; color: var(--muted); }
.line-icon { display: inline-flex; align-items: center; min-width: 34px; justify-content: center; }
.line-pop { min-width: 140px; }
.small-segs { display: inline-flex; }
.small-segs .seg { flex: none; padding: 3px 9px; font-size: 12px; }
.stack.tight { gap: 4px; align-items: flex-end; }
.ticon { display: inline-flex; align-items: center; justify-content: center; }
.ticon svg { display: block; }
.draw-bar .place-pos { padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--buy-ink); border: none; }
.draw-bar .place-pos.buy { background: var(--buy-bg); } .draw-bar .place-pos.buy:hover { filter: brightness(1.12); }
.draw-bar .place-pos.sell { background: var(--sell-bg); color: var(--sell-ink); } .draw-bar .place-pos.sell:hover { filter: brightness(1.12); }
.warn-line { color: var(--warn); font-size: 12px; line-height: 1.35; margin-top: 4px; }
:root:is([data-style="clarity"], [data-style="dojo"]) .warn-line { color: var(--warn-text); } /* on light paper the fill shade was too faint to read */
.shot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.shot-tf { position: absolute; left: 4px; bottom: 4px; background: #000b; color: #fff; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; }
.ind-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ind-row select { padding: 4px 6px; font-size: 12px; }
.ind-row input[type=time] { padding: 3px 5px; font-size: 12px; }
.ind-num { width: 64px; padding: 4px 6px; }
.ind-name { width: 110px; padding: 4px 6px; }
.ind-dialog h4 { margin: 6px 0 0; }
.text-edit { position: absolute; z-index: 7; min-width: 140px; padding: 4px 5px; margin: 0; border: 1px solid var(--accent); border-radius: 4px;
  background: var(--float); font-family: var(--font-body); line-height: 1.3; resize: none; overflow: hidden; outline: none; }
.tool:disabled { opacity: .35; cursor: default; background: none; }
.draw-bar .icon-btn.on { color: var(--text); background: var(--panel2); }
.tool:is([data-mode="strong"], [data-mode="medium"]) { position: relative; }
.tool:is([data-mode="strong"], [data-mode="medium"])::after { content: 'S'; position: absolute; right: 1px; bottom: 0; font-size: 8px; font-weight: 800; color: var(--gold); }
.tool[data-mode="medium"]::after { content: 'M'; }
/* multi-chart layouts */
.charts { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; gap: 2px; background: var(--line); }
.charts.l-2h { grid-template-columns: 1fr 1fr; }
.charts.l-2v { grid-template-rows: 1fr 1fr; }
.charts.l-3, .charts.l-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.charts.l-3 .cell-main { grid-row: 1 / span 2; }
.chart-cell { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chart-cell > .chart { flex: 1; min-height: 0; }
.charts:not(.l-1) .chart-cell.active { box-shadow: inset 0 0 0 1px var(--accent); }
.pane-head { display: flex; align-items: center; gap: 6px; padding: 2px 6px; min-height: 26px; background: var(--chrome); border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; overflow: hidden; }
.pane-head select { padding: 1px 4px; font-size: 12px; }
.charts.l-1 .main-head { display: none; }
.chart-legend { flex-wrap: wrap; row-gap: 2px; max-width: calc(100% - 90px); }
.chart-legend span { white-space: nowrap; }
.charts { position: relative; }
.chart-gutter { position: absolute; z-index: 8; }
.chart-gutter.v { top: 0; bottom: 0; width: 8px; cursor: col-resize; }
.chart-gutter.h { left: 0; right: 0; height: 8px; cursor: row-resize; }
.chart-gutter:hover, .chart-gutter.dragging { background: color-mix(in srgb, var(--accent) 35%, transparent); }

/* journal pictures: thumbnails with a note, and the big viewer */
.shot { position: relative; display: flex; flex-direction: column; gap: 4px; width: 196px; }
/* pictures are 16:9 (the trade and day pictures); older or "as it is" ones keep their right end, where the trade is */
.shot img { width: 196px; height: 110px; object-fit: cover; object-position: right center; cursor: zoom-in; }
.shot-note { width: 100%; font-size: 12px; padding: 3px 6px; }
.shot-cap { font-size: 11.5px; color: var(--muted); max-width: 196px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-img { position: relative; }
.shots .shot-img .icon-btn { position: absolute; top: 2px; right: 2px; background: #000a; }
.shots.strip .shot img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 950; background: #06070af7; display: flex; flex-direction: column; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #e8ebf2; }
.lb-top .grow { flex: 1; }
.lb-count { font-variant-numeric: tabular-nums; color: var(--muted); }
.lb-tf { background: #2d3444; border-radius: 4px; padding: 2px 7px; font-size: 12px; }
.lb-title { font-size: 13px; }
.lb-close { font-size: 16px; }
.lb-main { flex: 1; min-height: 0; display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.lb-stage { flex: 1; height: 100%; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; border-radius: 4px; box-shadow: 0 10px 40px #000; }
.lb-stage.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lb-stage.zoomed .lb-img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-nav { width: 44px; height: 64px; border: 0; border-radius: 8px; background: #ffffff14; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; flex: none; }
.lb-nav:hover { background: #ffffff2a; }
.lb-bottom { justify-content: space-between; }
.lb-note { flex: 1; max-width: 640px; }
.lb-note-text { font-size: 14px; }
.chip-toggle.good.on { background: var(--up-soft); border-color: var(--green, #26a69a); color: var(--up-text); }
.notes-label { display: flex; align-items: center; gap: 8px; }
.notes-tpl { margin-left: auto; padding: 1px 8px; font-size: 11.5px; }
.note-tpl { display: flex; flex-direction: column; gap: 6px; }
.note-tpl .rte { width: 100%; }
/* notes box with formatting (public/js/richtext.js) */
.rte { background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.rte:focus-within { border-color: var(--accent); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.rte-btn { min-width: 24px; height: 24px; padding: 0 5px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; }
.rte-btn:hover { background: var(--hover); color: var(--text); }
.rte-btn.on { background: var(--accent-soft); color: var(--text-hi); }
.rte-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.rte-a { font-weight: 700; text-decoration: underline 2px var(--red); text-underline-offset: 2px; }
.rte-mark { font-weight: 700; padding: 0 2px; border-radius: 2px; background: rgba(255, 235, 59, 0.35); color: var(--text); }
.rte-area {
  position: relative; min-height: calc(var(--rows, 6) * 1.45em + 12px); max-height: 60vh; overflow: auto; resize: vertical;
  padding: 6px 8px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text;
}
.rte-area.is-empty::before { content: attr(data-placeholder); position: absolute; left: 8px; top: 6px; right: 8px; color: var(--muted); pointer-events: none; }
.rte-area p, .rte-view p { margin: 0; }
.rte-area ul, .rte-area ol, .rte-view ul, .rte-view ol { margin: 0; padding-left: 22px; }
.rte-pop { padding: 6px; }
.rte-colors { display: grid; grid-template-columns: repeat(6, 26px); gap: 4px; }
.rte-color { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 5px; background: var(--sunken); cursor: pointer; font-weight: 700; font-size: 14px; }
.rte-color:hover { border-color: var(--accent); }
.rte-color.none { color: var(--muted); font-size: 12px; }
.note-tpls .row.small { font-size: 12.5px; flex-wrap: wrap; gap: 10px; }
.draw-bar .mid-btn { font-weight: 700; font-size: 13px; }
.draw-bar .mid-btn.on { background: var(--accent-soft); color: var(--text-hi); }
.pick-banner { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--float); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 6px 20px #0008; }
.chart.pick-bar, .chart.pick-bar * { cursor: pointer !important; }
.draw-bar .alert-btn { filter: grayscale(1); opacity: .6; }
.draw-bar .alert-btn.armed { filter: none; opacity: 1; background: var(--warn-soft); }
.draw-bar .alert-btn.fired { filter: none; opacity: .8; }

/* playbook */
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.pb-card { border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 8px; }
.pb-head { display: flex; align-items: center; gap: 6px; }
.pb-head h3 { margin: 0; }
.pb-desc { margin: 0; white-space: pre-wrap; }
.pb-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.pb-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; background: var(--panel2); border-radius: 8px; padding: 8px; }
.pb-stat { display: flex; flex-direction: column; gap: 2px; }
.pb-compare { margin: 0; line-height: 1.6; }
.card.empty { text-align: center; padding: 30px; }
.rules-check { display: flex; flex-direction: column; gap: 3px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.rules-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.rules-check .check { display: flex; gap: 6px; align-items: flex-start; }
.rules-check .check input { margin-top: 2px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; padding: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; }
.filter-bar select, .filter-bar input[type=date] { font-size: 12.5px; padding: 4px 6px; }
.af-dates { display: inline-flex; gap: 4px; align-items: center; }
.af-count { margin-left: auto; }
/* small screens: the favourite tools scroll (mouse wheel) so the buttons at the bottom always stay visible */
.toolbox { min-height: 0; overflow: hidden; }
.toolbox > * { flex-shrink: 0; }
.toolbox > .tool-list { flex-shrink: 1; min-height: 40px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.toolbox > .tool-list::-webkit-scrollbar { display: none; }
.fib-levels { display: flex; flex-direction: column; gap: 4px; }
.fib-row { display: grid; grid-template-columns: 22px 78px 56px 90px 28px 28px; align-items: center; gap: 6px; }
.fib-row .fib-val { width: 72px; padding: 3px 5px; }
.fib-row.head span { font-size: 11px; }
.fib-none { text-align: center; }
/* news check */
.news-verdict { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); padding: 10px 12px; background: var(--panel2); }
.news-verdict p { margin: 4px 0 0; }
.news-verdict ul { margin: 6px 0 0; padding-left: 18px; max-height: 120px; overflow: auto; }
.news-verdict .row { margin-top: 8px; align-items: center; }
.news-verdict.ok { border-left-color: var(--green); }
.news-verdict.warn { border-left-color: var(--orange); }
.news-verdict.fix { border-left-color: var(--accent); }
.news-verdict.info { border-left-color: var(--muted); }
.news-check .table td, .news-check .table th { white-space: nowrap; padding: 5px 6px; }
.news-check .table td:first-child, .news-check .table td:last-child { white-space: normal; }
.news-check { max-height: 70vh; overflow: auto; }
.news-wrong { flex-shrink: 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.news-wrong thead th { position: sticky; top: 0; background: var(--panel); }

/* ---- account: sign-in, account button, locked banner, Pro tags ---- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
/* the welcome screen (welcome.js): three doors for a copy nobody has signed in to */
.welcome { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.wel-inner { flex: 1; width: min(1040px, 100%); margin: 0 auto; padding: 64px 20px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-sizing: border-box; }
.wel-logo { width: 56px; height: 56px; }
.welcome h1 { margin: 10px 0 0; font-family: var(--font-display); font-size: 34px; letter-spacing: -0.02em; color: var(--text-hi); text-align: center; }
.wel-lede { margin: 0; max-width: 560px; text-align: center; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.wel-doors { width: 100%; margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .wel-doors { grid-template-columns: 1fr; } }
.wel-door { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.wel-door h2 { margin: 4px 0 0; font-size: 18px; color: var(--text-hi); }
.wel-door p { margin: 0; line-height: 1.5; font-size: 13.5px; }
.wel-door-top { display: flex; align-items: center; justify-content: space-between; }
.wel-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.wel-ico svg { width: 20px; height: 20px; }
.wel-badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 10px; color: var(--up-text); background: color-mix(in srgb, var(--green) 16%, transparent); }
.wel-grow { flex: 1; }
.wel-btn { width: 100%; justify-content: center; text-align: center; }
.wel-field { display: flex; flex-direction: column; gap: 4px; }
.wel-field select { width: 100%; }
.wel-door .signin-form .key-row { flex-direction: column; }
.wel-foot { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.wel-foot a { color: var(--accent-text); font-weight: 600; }
.wel-corner { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; }
.wel-help { font-size: 12px; color: var(--muted); }
.signin-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.signin-card .brand { font-size: 17px; }
.signin-card h1 { font-size: 20px; }
.signin-card .btn.ghost { align-self: flex-start; }
.key-form { display: flex; flex-direction: column; gap: 6px; }
.key-row { display: flex; gap: 8px; }
.key-input { flex: 1; font-family: ui-monospace, var(--font-mono), Consolas, monospace; letter-spacing: .02em; padding: 8px 10px; }
.key-error { margin: 0; color: var(--red); min-height: 1em; font-size: 12.5px; }
.key-error:empty { display: none; }
.signin-links { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.signin-form { display: flex; flex-direction: column; gap: 8px; }
.signin-form .key-form > p { margin: 0 0 4px; }
.signin-alt { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.code-input { max-width: 150px; font-size: 18px; letter-spacing: .25em; text-align: center; }
.key-error.note { color: var(--muted); }
.pc-pick > p { margin: 0; }
.pc-list { display: flex; flex-direction: column; gap: 6px; }
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.account-chip { margin-left: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip:hover { border-color: var(--accent); }
.account-chip.locked { border-color: var(--warn-line); background: var(--warn-soft); }
.lock-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); padding: 10px 24px; font-size: 13px; }
.account-rows { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.account-rows dt { color: var(--muted); }
.account-rows dd { margin: 0; overflow-wrap: anywhere; }
.pro-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .04em; vertical-align: 1px; }
.pro-only { max-width: 560px; margin: 24px auto; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.account-box > .btn.danger { align-self: flex-start; }
/* Sync in the Account window (0.21.0) */
.sync-box { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.sync-box h4 { margin: 0; }
.sync-box .row { align-items: center; gap: 12px; }
.sync-line { margin: 0; }
.sync-line[data-tone="ok"] { color: var(--up-text); }
.sync-line[data-tone="warn"] { color: var(--warn-text); }
/* "Your Replaybook so far" (0.23.1, account.js): the Account window's box, the line in the cancel window and the ended banner,
   and the note in the last days of a free trial. Quiet on purpose: plain numbers, no colour of their own. */
.work-box { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.work-box[hidden], .trial-banner[hidden], .work-line[hidden] { display: none; }
.work-box h4 { margin: 0; }
.work-box p, .work-line { margin: 0; }
.work-nums, .work-line { font-variant-numeric: tabular-nums; }
.lock-banner .lock-words, .trial-banner .trial-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trial-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); padding: 10px 24px; font-size: 13px; }
.trial-banner .row { align-items: center; gap: 8px; }
.trial-banner .trial-keep { font-size: 12.5px; }
.trial-banner .trial-x { background: none; border: 0; color: var(--text); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.trial-banner .trial-x:hover { color: var(--text); background: var(--hover); }
.sync-line[data-tone="busy"], .sync-line[data-tone="off"] { color: var(--muted); }

/* desktop app: "Replaybook x.y.z is ready · Restart to update" */
.update-pill { position: fixed; left: 16px; bottom: 16px; z-index: 1000; display: flex; align-items: center; gap: 12px; background: var(--panel2); border: 1px solid var(--accent); border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }

/* 0.5.0 */
.journal-export { align-self: flex-start; }
.r-note { margin: -6px 0 10px; }
.modal-wrap.sticky { background: #000c; z-index: 950; }
.ws-title .ws-name { cursor: pointer; border-radius: 4px; padding: 0 2px; }
.ws-title .ws-name:hover { background: var(--panel2); outline: 1px dashed var(--line); }
.sc-more { padding: 2px 8px; font-weight: 700; letter-spacing: 1px; }
.be-row { flex-wrap: wrap; row-gap: 4px; }
.trow.be-row > label { width: auto; color: var(--text); font-size: 12px; }
.be-plus { display: inline-flex; align-items: center; gap: 4px; }
.be-units { width: 52px; }
.btn.auto-be.on { background: var(--accent, #2962ff); border-color: transparent; color: var(--accent-ink); }
.blind-badge { font: inherit; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; }
.blind-badge:hover { color: var(--text, var(--text)); border-color: var(--accent); }
.weekday-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* "New backtest" window (home.js newSessionDialog) */
.nb { display: flex; flex-direction: column; gap: 14px; min-height: 330px; }
.nb-head .progress { height: 4px; }
.nb-steps { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.nb-steps .on { color: var(--text); font-weight: 600; }
.nb-steps .done { color: var(--accent); }
.nb-page { flex: 1; }
.nb-foot { display: flex; justify-content: space-between; align-items: center; }
.nb-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font: inherit; }
.nb-type:hover { border-color: var(--line2); }
.nb-type.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.nb-type .nb-icon { font-size: 20px; }
:root:not([data-style="classic"]) .nb-type .nb-icon { display: inline-flex; color: var(--accent-text); }
.nb-group { display: flex; flex-direction: column; gap: 4px; }
.nb-glabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 2px; }
.nb-market { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nb-market:hover { border-color: var(--line2); }
.nb-market:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.nb-costs summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.nb-review { margin-bottom: 4px; }
.badge.mode { background: var(--mode-soft); color: var(--mode-text); }
.mode-badge { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--mode-line); color: var(--mode-text); }
.sc-head .badge { white-space: nowrap; flex-shrink: 0; }

/* Daily challenge (home card + result window) */
.daily-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; border-color: var(--warn-line); background: linear-gradient(180deg, var(--warn-soft), var(--panel, #12151c)); }
.dc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-streak { font-size: 12.5px; padding: 1px 8px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); }
.dc-dots { display: flex; gap: 4px; margin-left: auto; }
.dc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.dc-dot.win { background: var(--green); } .dc-dot.loss { background: var(--red); } .dc-dot.flat { background: var(--muted); }
.dc-go, .dc-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-go select { max-width: 240px; }
.dc-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.dc-stat { display: flex; flex-direction: column; gap: 2px; background: var(--hover); border-radius: 6px; padding: 8px 10px; }
.dc-stat b { font-size: 16px; }

/* Help (? buttons), shortcuts, guide */
.home-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.home-right .account-chip { margin-left: 0; }
.help-btn { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); font-weight: 700; cursor: pointer; }
.help-btn:hover { color: var(--text); border-color: var(--accent); }
.ws-top .help-btn { margin-left: 8px; }
/* the backtest's name keeps room on laptops: Equity (= Balance + Open) steps aside first */
.ws-top .ws-title { flex: 0 1 auto; min-width: 130px; }
@media (max-width: 1440px) {
  .ws-top { gap: 10px; }
  .ws-top .chip-equity { display: none; }
  .ws-top .ws-title .muted { display: none; }
}
/* a narrow window (the app opens down to 960 px): the time zone moves to ⚙ Settings and "← Backtests" keeps only its
   arrow, so Balance, Open and Today stay in the bar instead of running off its right edge */
@media (max-width: 1180px) {
  .ws-top .tz-sel, .ws-top .ws-back-word { display: none; }
  .ws-top .ws-title { min-width: 90px; }
}
.help-list { display: flex; flex-direction: column; gap: 4px; }
.help-item { display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text); font: inherit; }
.help-item:hover, .help-item:focus-visible { background: var(--panel2); border-color: var(--line); }
.help-item > span:last-child { display: flex; flex-direction: column; }
.help-icon { width: 28px; text-align: center; font-size: 18px; }
.help-contact { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.contact-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-line a.btn { text-decoration: none; color: var(--text); }
.keys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.keys-group h4 { margin: 8px 0 4px; }
.keys td { padding: 3px 8px 3px 0; vertical-align: top; }
.keys td:first-child { white-space: nowrap; }
kbd { display: inline-block; min-width: 18px; text-align: center; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--panel2); font: 11.5px ui-monospace, Consolas, monospace; color: var(--text); }
.guide { display: flex; flex-direction: column; gap: 10px; }
.guide-item p { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 700px) { .keys-grid { grid-template-columns: 1fr; } }

/* The tour */
.tour-wrap { position: fixed; inset: 0; z-index: 8000; }
.tour-hole { position: fixed; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(4, 6, 10, .66); outline: 2px solid var(--accent); transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; background: var(--menu); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; box-shadow: 0 12px 40px #000a; display: flex; flex-direction: column; gap: 4px; }
.tour-card p { margin: 2px 0 6px; line-height: 1.5; }
.tour-title { font-size: 14px; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

/* Getting started */
.checklist { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; border-color: var(--accent-line); }
.cl-head { display: flex; align-items: center; gap: 10px; }
.cl-bar { flex: 1; max-width: 220px; }
.cl-head .link-btn { margin-left: auto; }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-list li { display: flex; align-items: center; gap: 10px; }
.cl-tick { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cl-list li.ok .cl-tick { background: var(--green, #26a69a); border-color: var(--green, #26a69a); color: var(--buy-ink); }
.cl-list li.ok .cl-text b { color: var(--muted); text-decoration: line-through; }
.cl-text { display: flex; flex-direction: column; flex: 1; }

/* Feedback, survey, review */
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--text); font: inherit; font-size: 12.5px; }
.pick-chip:hover { border-color: var(--line2); }
.pick-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.fb-q { display: flex; flex-direction: column; gap: 6px; }
.fb-label { font-weight: 600; }
.fb textarea, .survey textarea, .review textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.fb-alt summary { cursor: pointer; color: var(--muted); }
.survey { display: flex; flex-direction: column; gap: 12px; }
.survey .stack { gap: 14px; }
.review { align-items: stretch; }
.review-q { font-size: 16px; font-weight: 600; margin: 0; text-align: center; }
.review-yn { justify-content: center; }
.review > .link-btn { align-self: center; }
.review-stars { display: flex; justify-content: center; }

/* 0.6.0: prop-firm challenge (⚑ bar under the top bar, details, result card, sessions list line) */
.ch-bar { display: flex; align-items: center; gap: 6px; padding: 3px 12px; min-height: 30px; background: var(--chrome); border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; overflow: hidden; flex: 0 0 auto; }
.ch-name { background: none; border: 0; padding: 0 6px 0 0; color: var(--muted); cursor: pointer; max-width: 260px; min-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; font-size: 12px; }
.ch-name:hover { color: var(--text); }
.ch-meter { position: relative; flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); color: var(--muted); cursor: pointer; font-size: 12px; }
.ch-meter:hover { border-color: var(--line2); }
.ch-meter b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ch-track { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; border-radius: 1px; background: var(--sunken); overflow: hidden; }
.ch-fill { display: block; height: 100%; background: var(--green); }
.ch-meter.ok b { color: var(--green); }
.ch-meter.warn b { color: var(--orange); }
.ch-meter.warn .ch-fill { background: var(--orange); }
.ch-meter.bad b { color: var(--red); }
.ch-meter.bad .ch-fill { background: var(--red); }
.ch-status { margin-left: auto; flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--accent-text); cursor: pointer; font-weight: 600; font-size: 12px; }
.ch-status.passed { background: var(--up-soft); border-color: var(--green); color: var(--up-text); }
.ch-status.failed { background: var(--down-soft); border-color: var(--down-line); color: var(--down-text); }
.ch-status.paused { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.ch-pop { max-width: 420px; padding: 10px 12px; }
.ch-pop .account-rows { font-size: 12.5px; }
.ch-pop-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.ch-card p { margin: 0; }
.ch-card .tiles.small { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
.sc-chal { font-size: 12px; color: var(--accent-text); }
.sc-chal.running { color: var(--accent-text); }
.sc-chal.passed { color: var(--green); }
.sc-chal.failed { color: var(--red); }
/* New session window: the prop-firm challenge (switch, basic rules with their %, firms' accounts, more rules) */
.ch-switch-row { display: flex; align-items: center; gap: 14px; }
.ch-switch-row .hint { margin: 0; }
.ch-switch { flex: 0 0 220px; }
.row.ns-top { align-items: flex-start; } /* New session: timezone and day start side by side */
.ch-panel { border-left: 2px solid var(--line); padding-left: 12px; gap: 10px; }
.ch-money { position: relative; display: flex; }
.ch-money input { width: 100%; padding-right: 46px; }
.ch-pct { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; pointer-events: none; font-variant-numeric: tabular-nums; }
.ch-sect { border: 1px solid var(--line); border-radius: var(--radius); background: var(--chrome); }
.ch-sect > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; user-select: none; }
.ch-sect > summary::-webkit-details-marker { display: none; }
.ch-sect > summary::before { content: '▸'; color: var(--muted); display: inline-block; transition: transform .15s; }
.ch-sect[open] > summary::before { transform: rotate(90deg); }
.ch-sect > summary:hover::before { color: var(--text); }
.ch-sect-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ch-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.ch-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); padding: 5px 10px; cursor: pointer; }
.ch-tab:hover { color: var(--text); }
.ch-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.ch-firms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.ch-firm { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 8px 9px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ch-firm.on { border-color: var(--accent); }
.ch-firm-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-prog { font-size: 12px; }
select.ch-prog { width: 100%; padding: 3px 6px; }
div.ch-prog { padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sum { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.ch-sizes { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 2px; }
.ch-size { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.ch-size:hover { border-color: var(--accent); }
.ch-size.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ch-size.from { border-color: var(--orange); border-style: dashed; }
.ch-src { font-size: 12px; margin: 0; }
.ch-src.custom b { color: var(--orange); }
.ch-inline { display: flex; align-items: center; gap: 6px; }
.ch-inline input[type=number] { width: 72px; flex: 0 0 auto; }
.ch-inline select, .ch-inline input[type=time] { flex: 1; min-width: 0; }

/* 0.6.1: in a prop-firm challenge (without practice mode) the going-back controls are greyed out */
.ctl:disabled, .ctl:disabled:hover { opacity: .4; cursor: not-allowed; border-color: var(--line); }
.ch-practice { border-top: 1px solid var(--line); padding-top: 8px; }
.ch-practice .hint { margin: 2px 0 0 22px; }
/* 0.6.1: the pass card says what Continue does */
.ch-card .ch-next { border-left: 3px solid var(--green); padding: 6px 10px; background: color-mix(in srgb, var(--green) 10%, transparent); border-radius: 4px; }
@media (max-width: 560px) { .ch-card .tiles.small { grid-template-columns: repeat(2, minmax(90px, 1fr)); } }


/* ---------- each style's own touches (fonts for headings and numbers, Quest's pressable "lip") ---------- */
h1, h2, h3, .brand b, .modal-head h2, .dc-title { font-family: var(--font-display); letter-spacing: -0.01em; }
:root[data-style="classic"] h1, :root[data-style="classic"] h2, :root[data-style="classic"] h3 { letter-spacing: normal; }
.replay-time .clock, .ticket-summary, .tp-chip, .table td.num, .ch-meter, code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.btn.primary { font-weight: 700; }
:root:is([data-style="studio"], [data-style="nebula"], [data-style="clarity"], [data-style="dojo"]) .btn.primary, :root:not([data-style]) .btn.primary { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
:root[data-style="quest"] .btn, :root[data-style="quest"] .side-btn, :root[data-style="quest"] .place { box-shadow: var(--lip); transition: transform .08s, box-shadow .08s; }
:root[data-style="quest"] .btn.primary { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 55%, #000); }
:root[data-style="quest"] .btn:active:not(:disabled), :root[data-style="quest"] .side-btn:active, :root[data-style="quest"] .place:active { transform: translateY(2px); box-shadow: 0 1px 0 #07081a; }
:root[data-style="quest"] .card, :root[data-style="quest"] .session-card { box-shadow: 0 3px 0 #07081a; }
:root[data-style="quest"] h1 { font-weight: 800; }

/* ---------- Appearance window ---------- */
.look-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.look-card { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; text-align: left; }
.look-card:hover { border-color: var(--line2); }
.look-card.on { border-color: var(--accent); }
.look-card .look-name { font-weight: 700; padding: 0 4px; }
.look-card .look-sub { color: var(--muted); font-size: 12px; padding: 0 4px; }
.look-mini { position: relative; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid #0006; }
.look-mini i { position: absolute; display: block; border-radius: 4px; }
.accent-row { display: flex; gap: 14px; flex-wrap: wrap; }
.accent-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.accent-dot span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.accent-dot.on span { outline: 2px solid var(--text); outline-offset: 3px; }
.accent-dot.on { color: var(--text); }
.look-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; }
.look-btn:hover { color: var(--text); border-color: var(--line2); }

/* ---------- reward moments (the daily-challenge result and the prop-firm pass/fail card) ---------- */
.moment-head { display: flex; align-items: center; gap: 18px; padding: 6px 0 4px; }
.mo-mark { width: 92px; height: 92px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 38px; overflow: hidden;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent); }
.moment-head.calm .mo-mark { background: var(--panel2); color: var(--muted); box-shadow: 0 0 0 8px color-mix(in srgb, var(--muted) 10%, transparent); }
.mo-label { font-size: 12.5px; font-weight: 700; color: var(--accent-text); }
.moment-head.calm .mo-label { color: var(--muted); }
.mo-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.mo-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mo-roll { position: relative; display: inline-block; height: 1.1em; line-height: 1.1em; min-width: 1ch; text-align: center; }
.mo-roll > span { display: block; }
.mo-old { position: absolute; inset: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .mo-old { animation: mo-out .5s .35s ease-in both; opacity: 1; }
  .mo-new { animation: mo-in .5s .35s cubic-bezier(.2, 1.4, .4, 1) both; }
  .moment-head.good .mo-mark { animation: mo-pop .6s ease-out both; }
}
@keyframes mo-out { to { transform: translateY(-110%); opacity: 0; } }
@keyframes mo-in { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mo-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.08); } 100% { transform: none; } }
/* Quest: a seal with a lip instead of a ring */
:root[data-style="quest"] .mo-mark { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); box-shadow: none; }
:root[data-style="quest"] .mo-label { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
/* Classic: a smaller, plain badge */
:root[data-style="classic"] .mo-mark { width: 56px; height: 56px; font-size: 24px; box-shadow: none; }

/* ---------- "Plan followed" message, the end-of-day card, the checklist bar ---------- */
.toast.plan { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--menu)); }
.plan-toast b { color: var(--accent-text); }
.day-summary { position: fixed; left: 18px; bottom: 18px; z-index: 950; width: 330px; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  background: var(--menu); border: 1px solid var(--line2); border-radius: var(--radius-lg); box-shadow: 0 16px 48px #000a; }
:root:not([data-style="classic"]) .day-summary { left: 72px; bottom: 76px; } /* the styled looks: above the player bar, beside the tools */
@media (prefers-reduced-motion: no-preference) { .day-summary { animation: ds-in .35s ease-out both; } }
@keyframes ds-in { from { transform: translateY(16px); opacity: 0; } }
.ds-head { display: flex; align-items: center; gap: 4px; }
.ds-head .icon-btn { margin-left: auto; }
.ds-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.ds-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
:root[data-style="quest"] .day-summary { box-shadow: 0 3px 0 #07081a, 0 16px 48px #000a; }
.rules-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin: 2px 0 4px; }
.rules-bar span { height: 5px; border-radius: 3px; background: var(--line); transition: background .15s; }
.rules-bar span.on { background: var(--accent); }
.rules-check.complete .rules-bar span { background: var(--green); }

/* ---------- journal calendar coloured by rules followed ---------- */
.cal-cell.rules-all { background: color-mix(in srgb, var(--accent) 24%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 55%, var(--panel)); color: var(--text); }
.cal-cell.rules-some { background: color-mix(in srgb, var(--accent) 11%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 30%, var(--panel)); color: var(--text); }
.cal-cell.rules-none { background: var(--warn-soft); border-color: var(--warn-line); color: var(--text); }
.cal-cell.rules-off { opacity: .75; }
.cal-mode { flex: none; margin-left: 8px; }
.cal-mode .seg { padding: 3px 9px; font-size: 12px; }

/* the +XP chip on the "Plan followed" message (Quest) */
.xp-chip { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 11px; }

/* star ratings (ui.js starRating) */
.rate { display: inline-flex; align-items: center; gap: calc(var(--star) * .18); }
.rate-star { position: relative; width: calc(var(--star) + 6px); height: calc(var(--star) + 6px); padding: 3px; border: 0; background: none; cursor: pointer; color: var(--seg-off, var(--line2)); border-radius: 50%;
  transition: transform .16s cubic-bezier(.2, 1.4, .4, 1), color .16s; }
.rate-star svg { width: 100%; height: 100%; display: block; fill: currentColor; stroke: color-mix(in srgb, var(--text) 18%, transparent); stroke-width: 1; stroke-linejoin: round; overflow: visible; }
.rate-star:hover { transform: scale(1.18); }
.rate-star.on { color: var(--gold); }
.rate-star.on svg { stroke: color-mix(in srgb, var(--gold) 70%, var(--bg)); filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--gold) 35%, transparent)); }
.rate-star.ghost { color: color-mix(in srgb, var(--gold) 45%, var(--seg-off, var(--line2))); }
.rate-star.ghost svg { filter: none; }
.rate-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rate-star.pop { animation: star-pop .5s cubic-bezier(.2, 1.6, .4, 1) var(--d, 0ms) both; }
@keyframes star-pop { 0% { transform: scale(.6) rotate(-18deg); } 55% { transform: scale(1.3) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
.rate-spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--gold); pointer-events: none; opacity: 0;
  animation: spark .65s ease-out var(--dl, 0ms) forwards; }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--star) * -1.05)) scale(.3); } }
@media (prefers-reduced-motion: reduce) { .rate-star, .rate-star.pop { transition: none; animation: none; } }

/* the rules checklist: Classic keeps the plain checkbox; Studio and Quest draw their own tick (looks.css) */
.rule-row .tick { display: none; }

/* ---------- optional confluences (playbook.js confluencePicker): chips under the rules. Never the plan: no finished
   state, no plan colours; A / A+ only get the accent on their small grade. ---------- */
.conf-check { display: flex; flex-direction: column; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.conf-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.conf-title { color: var(--muted); }
.conf-score { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: help; }
.conf-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line2); font-size: 11px; font-weight: 700; color: var(--soft); white-space: nowrap; }
.conf-grade:is([data-g="A+"], [data-g="A"]) { border-color: var(--accent); color: var(--accent-text); }
.conf-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.conf-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px 3px 7px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--soft); font-size: 12px; cursor: pointer; user-select: none; }
.conf-chip:hover { border-color: var(--line2); color: var(--text); }
.conf-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
.conf-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.conf-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.conf-mark { display: inline-flex; width: 12px; height: 12px; flex-shrink: 0; }
.conf-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.conf-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the journal's trade window, the trade tables and the last trade card */
.chip-toggle.conf.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.conf-edit { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.conf-edit .field-label { display: flex; align-items: center; gap: 8px; }
.conv-badge { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); font-size: 10.5px; font-weight: 600; line-height: 16px; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.conv-badge:is([data-g="A+"], [data-g="A"]) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-text); }
.lt-conf { font-size: 12.5px; color: var(--muted); }
/* the playbook card: the confluences under the rules, and the conviction numbers */
.pb-confs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pb-conf { padding: 1px 8px; border-radius: 12px; border: 1px dashed var(--line2); font-size: 12px; color: var(--soft); }
.pb-conv { display: flex; flex-direction: column; gap: 3px; background: var(--panel2); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.pb-conv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.pb-conv-head.sub { margin-top: 6px; }
.pb-conv-row { display: grid; grid-template-columns: 88px 1fr 1fr 70px; gap: 6px; font-variant-numeric: tabular-nums; }
.pb-conv-pair, .pb-conv-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 1fr; gap: 3px 6px; font-variant-numeric: tabular-nums; }
.pb-conv-row > :not(.pb-conv-k), .pb-conv-pair > :not(.pb-conv-k), .pb-conv-grid > :not(.pb-conv-k) { text-align: right; }
.pb-conv-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-conv .few { opacity: .5; }
.pb-conv-note { margin: 4px 0 0; }
/* analytics bars that also show the average R ("12 · 58% · +0.40R") */

/* analytics: equity curve and daily net P&L (SVG, like the other cards) */
.an-chart { position: relative; height: 210px; margin-top: 4px; }
.an-svg svg { display: block; overflow: visible; }
.an-chart .grid { stroke: var(--line); stroke-width: 1; }
.an-chart .ax { fill: var(--muted); font: 11px var(--font-mono); }
.an-eq .base { stroke: var(--line2); stroke-dasharray: 4 4; }
.an-eq .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: an-draw 1.1s ease-out .1s forwards; }
.an-eq .g0 { stop-color: var(--accent); stop-opacity: .32; } .an-eq .g1 { stop-color: var(--accent); stop-opacity: 0; }
.an-eq .area { opacity: 0; animation: an-fade .6s ease-out .5s forwards; }
.an-eq .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.an-day rect.pos { fill: var(--green); } .an-day rect.neg { fill: var(--red); }
.an-day rect { transform-box: fill-box; transform-origin: 50% 100%; animation: an-grow .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 12ms); }
.an-day rect.neg { transform-origin: 50% 0; }
.an-day .zero { stroke: var(--line2); stroke-width: 1; }
@keyframes an-draw { to { stroke-dashoffset: 0; } }
@keyframes an-fade { to { opacity: 1; } }
@keyframes an-grow { from { transform: scaleY(0); } }
.an-tip { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; padding: 4px 9px; border-radius: 8px; background: var(--menu); border: 1px solid var(--line2); font: 600 12px var(--font-mono); color: var(--text); box-shadow: 0 6px 18px color-mix(in srgb, var(--bg) 60%, transparent); }
.an-guide { position: absolute; top: 14px; bottom: 22px; width: 1px; background: var(--line2); pointer-events: none; opacity: 0; transition: opacity .12s; }
@media (prefers-reduced-motion: reduce) { .an-eq .line, .an-eq .area, .an-day rect { animation: none; stroke-dashoffset: 0; opacity: 1; } }
/* the position tool's own size on its bar (drawui.js sizeControl) */
.draw-bar .pos-size { display: inline-flex; align-items: center; gap: 3px; padding: 0 4px 0 2px; }
.draw-bar .pos-size-in { width: 62px; padding: 3px 5px; font-size: 12px; font-family: var(--font-mono); }
.draw-bar .pos-size-u { font-size: 12px; color: var(--muted); }
/* close / cancel from the chart: a chip on each open position and pending order (chart.js setLines, act) */
.line-acts { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 4; }
.line-act { position: absolute; left: 10px; top: 0; display: flex; align-items: center; height: 22px; border-radius: 6px; background: var(--float); border: 1px solid var(--line2);
  font: 600 11.5px var(--font-body); color: var(--text); white-space: nowrap; box-shadow: 0 2px 8px color-mix(in srgb, var(--bg) 60%, transparent); overflow: hidden; }
.line-act .la-t { padding: 0 8px; font-variant-numeric: tabular-nums; }
.line-act.buy { border-color: color-mix(in srgb, var(--green) 55%, var(--line2)); }
.line-act.sell { border-color: color-mix(in srgb, var(--red) 55%, var(--line2)); }
.line-act.order { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 55%, var(--line2)); }
.line-act.up .la-t { color: var(--up-text); } .line-act.down .la-t { color: var(--down-text); }
.line-act .la-x { align-self: stretch; width: 24px; border: 0; border-left: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0; }
.line-act .la-x:hover { background: var(--down-soft); color: var(--down-text); }
.line-act .la-b { align-self: stretch; padding: 0 7px; border: 0; border-left: 1px solid var(--line2); background: transparent; color: var(--text); cursor: pointer; font-size: 11px; font-weight: 600; }
.line-act .la-b:hover { background: var(--panel2); color: var(--text-hi); }
.line-act .la-b.off { opacity: 0.45; }
/* + Add's small box (0.23.7) */
.add-pop { padding: 10px 12px; min-width: 230px; }
.add-box { display: flex; flex-direction: column; gap: 8px; }
.add-box .add-head { font-weight: 600; color: var(--text-hi); }
.add-box .add-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.add-box .add-row input { width: 110px; }
.add-box .add-row input:disabled { opacity: 0.45; }
.add-box .add-info { min-height: 1.2em; }
.add-box .add-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
:root:not([data-style="classic"]) .line-act { border-radius: 999px; height: 24px; }
:root:not([data-style="classic"]) .line-act .la-t { padding: 0 8px 0 10px; }
/* calendar squares never grow wider than their column (a long amount used to push Sat and Sun out of the card) */
.cal-cell { min-width: 0; overflow: hidden; }
.cal-cell .cal-pnl, .cal-cell .cal-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell { container-type: inline-size; }
.cal-cell .cal-pnl { font-size: clamp(8px, 17cqw, 10.5px); }
/* the favourite tools floating on the chart (Workspace.renderFavBar), dragged by its grip */
.fav-bar { position: absolute; z-index: 7; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--float); border: 1px solid var(--line2);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--bg) 70%, transparent); user-select: none; }
.fav-bar .fb-grip { display: flex; align-items: center; justify-content: center; width: 16px; align-self: stretch; color: var(--dim); cursor: grab; touch-action: none; }
.fav-bar.dragging, .fav-bar.dragging .fb-grip { cursor: grabbing; box-shadow: 0 10px 30px color-mix(in srgb, var(--bg) 80%, transparent); }
.fav-bar button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.fav-bar button:hover { background: var(--panel2); color: var(--text); }
.fav-bar .fb-tool.active { background: var(--accent); color: var(--accent-ink); }
.fav-bar .fb-x { width: 22px; font-size: 11px; color: var(--dim); }
.fav-bar .ticon, .fav-bar .fb-tool svg { width: 18px; height: 18px; }
.tool.fav-toggle.on { color: var(--accent-text); }
:root:not([data-style="classic"]) .fav-bar { border-radius: 999px; padding: 4px 6px 4px 4px; }
:root:not([data-style="classic"]) .fav-bar button { border-radius: 50%; }
:root[data-style="quest"] .fav-bar { border-radius: 14px; border-width: 2px; box-shadow: 0 4px 0 var(--lipc); }
:root[data-style="quest"] .fav-bar button { border-radius: 10px; }
.ind-sub { padding-left: 26px; }
.ind-tick { display: inline-flex; align-items: center; gap: 6px; }
.day-words { display: flex; flex-direction: column; gap: 12px; }

/* the day review in three seats, the no-trade box and missed entries (0.23.0, js/daylogui.js) */
.dayrev { display: flex; flex-direction: column; gap: 8px; container: dayrev / inline-size; }
.dr-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dr-head h4 { margin: 0; }
.dr-seats { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container dayrev (min-width: 760px) { .dr-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dr-seat { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel2); }
.dr-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.dr-q { font-size: 12px; color: var(--muted); line-height: 1.35; }
.dr-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; font: inherit; font-size: 13px; line-height: 1.45; }
.dr-chips { gap: 4px; }
.dr-own { width: 130px; padding: 2px 8px; font-size: 12px; border-radius: 14px; }
.dr-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.dr-exec { margin: 0; line-height: 1.4; }
.dr-lesson { display: flex; align-items: center; gap: 10px; }
.dr-lesson > span { font-size: 12px; font-weight: 600; white-space: nowrap; }
.dr-lesson input { flex: 1; min-width: 0; }
.dayrev.compact .dr-lesson { flex-direction: column; align-items: stretch; gap: 4px; }
.ntd { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--line2, var(--line)); border-radius: var(--radius); }
.ntd.kept { border-style: solid; border-color: var(--up-line); background: var(--up-soft); }
.ntd-head { font-size: 13px; line-height: 1.4; }
.ntd-group { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; }
.ntd-l { font-size: 11.5px; color: var(--muted); padding-top: 4px; }
.ntd-note { margin: 0; }
.ntd.stale { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; }
.day-tab .ntd-group, .mx-editor .ntd-group { grid-template-columns: 1fr; gap: 2px; }
.mx { display: flex; flex-direction: column; gap: 6px; }
.mx-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mx-head h4 { margin: 0; }
.mx-list { display: flex; flex-direction: column; }
.mx-row { display: grid; grid-template-columns: 46px minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 8px; align-items: baseline; width: 100%; padding: 6px 4px; background: none; border: none;
  border-bottom: 1px solid var(--rowline); color: var(--text); font-size: 12.5px; text-align: left; cursor: pointer; }
.mx-row:hover { background: var(--hover); }
.mx-t { font-variant-numeric: tabular-nums; color: var(--muted); }
.mx-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-facts { min-width: 0; }
.mx-why { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.mx-why.kept { background: var(--up-soft); color: var(--up-text); }
.mx-why.open { background: color-mix(in srgb, var(--warn) 16%, var(--panel)); color: var(--warn-text); }
.mx-why.none { color: var(--dim); }
.mx-add { align-self: flex-start; }
.day-tab .mx-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.day-tab .mx-facts { grid-column: 2 / -1; grid-row: 2; white-space: normal; }
.mx-manual { display: flex; flex-direction: column; gap: 8px; }
.mx-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mx-in { display: flex; flex-direction: column; gap: 2px; }
.mx-in input { width: 100%; box-sizing: border-box; }
.mx-why-edit { display: flex; flex-direction: column; gap: 4px; }
/* (:root .cal: stronger than every look's own .cal-cell rules, which load later) */
:root .cal .cal-cell.notrade { color: var(--text); }
:root .cal .cal-cell.notrade.kept { background: var(--up-soft); border-color: var(--up-line); }
:root .cal-cell .cal-nt { font-family: inherit; font-weight: 600; color: var(--muted); }
:root .cal-cell.notrade.kept .cal-nt { color: var(--up-text); }
/* "Stood aside" / "2 missed" wrap onto two lines in a narrow square instead of being cut */
:root .cal-cell :is(.cal-nt, .cal-nm) { white-space: normal; overflow-wrap: normal; line-height: 1.15; }

/* candles coming over from Replaybook's server: one small note at the bottom of the window (api.js), over every screen and dialog */
.load-note { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 1100; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px);
  padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--menu); border: 1px solid var(--line2); color: var(--text); font-size: 12.5px; line-height: 1.3;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--bg) 70%, transparent); pointer-events: none; }
.load-note > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
:root[data-style="classic"] .load-note { border-radius: var(--radius-btn); }
:root[data-style="quest"] .load-note { border-width: 2px; }
/* the light looks (Clarity, Dojo; also in their dark modes): their own shadow, since a tint of the background is invisible on paper */
:root[data-style="clarity"] .load-note { border-width: .5px; background: var(--float); backdrop-filter: blur(24px) saturate(1.6); box-shadow: var(--shadow); }
:root[data-style="dojo"] .load-note { border-radius: var(--radius-btn); box-shadow: var(--shadow); }
/* a chart that couldn't load its candles: the message sits on the chart, the buttons around it keep working (Workspace.loadChart, Pane.load) */
.chart-err { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); text-align: center; }
.chart-err-box { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; }
.chart-err-box b { font-size: 14px; color: var(--text-hi, var(--text)); }
.chart-err-box p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.chart-err-box .btn { margin-top: 4px; }
/* the chart is loading candles (after a quarter of a second): a thin accent line along its top edge */
.chart.loading::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 9; background: var(--accent); opacity: .75; pointer-events: none; }
