/* FALCON PRO theme (design hand-off "FALCON-dashboard-redesign", DESIGN-SPEC.md of 15 Oct 2026): the dashboard
   in the colours, type and shapes of falconpro-th.com. FALCON only: WING keeps its own look. Loaded after every
   other stylesheet; it restyles only. Every rule sits under :root[data-theme] so it outranks the shared sheets
   (wing.css, wing-pages.css, wing-admin.css, wing-dark.css) without touching them, and the shared code merges
   from WING stay clean. Ids, classes and data-* used by scripts and tests are never renamed or removed.
   Sections follow the spec's order: 1 tokens, 2 shared components, 3 page frame, 4 pages, 5 overlays. */

/* ===================================================================== 1. tokens (spec 2.1, 2.2) */
:root{
  --btn-r:10px;--btn-r-sm:8px;--card-r:18px;--well-r:12px;--side-w:256px;--top-h:72px;
  --ember:#48F790;--ember-hover:#2BEE7B;--on-ember:#06140B;--line-green:#00FF1D;--on-line:#03240F;
  --s-run:#48F790;--s-run-ink:#06140B;--s-warn:#F5B544;--s-warn-ink:#2B1D00;--s-orange:#F97316;--s-orange-ink:#1F0A00;
  --s-neg:#DC2626;--s-neg-ink:#FFFFFF;--s-info:#2563EB;--s-info-ink:#FFFFFF;--s-stop-ink:#FFFFFF;
  --overlay:rgba(6,10,12,.6);
}
:root[data-theme="dark"]{color-scheme:dark;
  --bg:#10181B;--side:#172125;--top:#172125;--surface:#1D2A2F;--surface-2:#25343A;--well:#172125;
  --line:rgba(255,255,255,.08);--line-strong:rgba(255,255,255,.16);--text:#EEF3F4;--muted:#A3B3B8;--faint:#7D8F95;
  --accent-text:#48F790;--accent-soft:rgba(72,247,144,.12);--accent-line:rgba(72,247,144,.35);
  --pos:#48F790;--neg:#FF7A7A;--neg-soft:rgba(255,122,122,.12);--neg-line:rgba(255,122,122,.38);
  --warn:#F5B544;--warn-soft:rgba(245,181,68,.12);--warn-line:rgba(245,181,68,.38);--info:#7CC4FF;
  --shadow:0 1px 2px rgba(0,0,0,.20),0 10px 28px rgba(0,0,0,.22);--grid:rgba(255,255,255,.06);
  --candle-up:#48F790;--candle-down:#FF7A7A;--gold:#E8B84A;--btc:#F7931A;--s-stop:#4B5B61}
:root[data-theme="light"]{color-scheme:light;
  --bg:#F4F6F8;--side:#FFFFFF;--top:#FFFFFF;--surface:#FFFFFF;--surface-2:#F4F6F8;--well:#F7F9FA;
  --line:rgba(20,24,30,.09);--line-strong:rgba(20,24,30,.18);--text:#0F1216;--muted:#4B535C;--faint:#636C76;
  --accent-text:#0E803D;--accent-soft:rgba(72,247,144,.10);--accent-line:rgba(72,247,144,.40);
  --pos:#0E803D;--neg:#D64545;--neg-soft:rgba(214,69,69,.08);--neg-line:rgba(214,69,69,.40);
  --warn:#B26C09;--warn-soft:rgba(178,108,9,.08);--warn-line:rgba(178,108,9,.35);--info:#1D6FB8;
  --shadow:0 1px 2px rgba(15,18,22,.04),0 8px 24px rgba(15,18,22,.06);--grid:rgba(15,18,22,.06);
  --candle-up:#48F790;--candle-down:#D64545;--gold:#C9961E;--btc:#E2820E;--s-stop:#66727A}

/* Noto Sans Thai's own Latin and Latin Extended letters (Google Fonts, variable, 15 Oct 2026; licence in
   noto-sans-thai-LICENSE.txt), so English words and digits are Noto too. Defined after fonts.css, so these are
   tried first for the characters they cover; Thai still comes from the ttf files there. */
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/noto-sans-thai-latin-ext.woff2) format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Noto Sans Thai';font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/noto-sans-thai-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* The shared sheets read --w-*: tie each to its token, in both modes, so every colour already written with a
   variable takes the new palette. Flat colours only: the header and glass gradients become plain fills. */
:root[data-theme]{
  --w-font:'Noto Sans Thai','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --w-r:var(--card-r);--w-r-sm:var(--btn-r);--w-r-lg:var(--card-r);--w-h:42px;
  --w-bg:var(--bg);--w-bg2:var(--bg);--w-surface:var(--surface);--w-surface2:var(--surface-2);--w-surface3:var(--well);
  --w-border:var(--line);--w-border2:var(--line-strong);--w-text:var(--text);--w-text2:var(--muted);--w-text3:var(--faint);
  --w-primary:var(--ember);--w-primary-h:var(--ember-hover);--w-primary-soft:var(--accent-soft);--w-primary-text:var(--accent-text);
  --w-green:var(--pos);--w-green-soft:var(--accent-soft);--w-red:var(--neg);--w-red-soft:var(--neg-soft);--w-red-border:var(--neg-line);
  --w-amber:var(--warn);--w-amber-soft:var(--warn-soft);--w-amber-border:var(--warn-line);
  --w-shadow:var(--shadow);--w-overlay:var(--overlay);--w-disabled:var(--surface-2);--w-track:var(--surface-2);--w-chart:var(--ember);
  --w-header:var(--top);--w-glass:var(--surface);--w-cyan:var(--accent-text);--w-champagne:var(--gold);
  --w-gold:var(--gold);--w-line-green:var(--line-green)}

/* ===================================================================== base */
:root[data-theme]{background:var(--bg)}
:root[data-theme] body{background:var(--bg);color:var(--text);font-family:var(--w-font);font-size:15px;line-height:1.55;
  font-variant-numeric:tabular-nums}
:root[data-theme] a{color:var(--accent-text)}
/* No pictures, glows or decorative rules behind or beside titles (spec 1.7, 1.8). */
:root[data-theme] .workspace-main:before,:root[data-theme] .auth-layout:before{content:none;display:none}
:root[data-theme] .page-heading h1:before,:root[data-theme] .w-hello h1:after,
:root[data-theme] .panel>h2:after,:root[data-theme] .w-card>h2:after,:root[data-theme] .w-more-title:after{content:none;display:none}
:root[data-theme] .page-heading h1,:root[data-theme] .page-heading p.muted,:root[data-theme] .w-auth-split>h2,
:root[data-theme] .w-auth-split>h2+p{text-shadow:none}

/* Colours the shared sheets write as literals, not variables: each takes its token. Shapes and fills that are
   components (badges, the bottom bar's centre button) are restyled in sections 2 and 3. */
:root[data-theme] .w-candles .w-up{stroke:var(--candle-up);fill:var(--candle-up)}
:root[data-theme] .w-candles .w-down{stroke:var(--candle-down);fill:var(--candle-down)}
:root[data-theme] .w-candles .w-last-tag.w-up{fill:var(--candle-up)}
:root[data-theme] .w-candles .w-last-tag.w-down{fill:var(--candle-down)}
:root[data-theme] .w-candles .w-last-tag.w-up+.w-last-text{fill:var(--on-ember)}
:root[data-theme] .w-candles .w-last-line.w-up{stroke:var(--candle-up)}:root[data-theme] .w-candles .w-last-line.w-down{stroke:var(--candle-down)}
/* History's chart (6.05): Equity the green line over its soft area, Balance a quiet dashed line; the legend reads
   Equity first. */
:root[data-theme] .hx-legend .e{order:1}:root[data-theme] .hx-legend .b{order:2}
:root[data-theme] .hx-legend .e:before{background:var(--ember)}
:root[data-theme] .hx-legend .b:before{background:var(--muted)}
:root[data-theme] .hx-svg .line.b{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:4 4}
:root[data-theme] .hx-svg .line.e{stroke:var(--ember)}
:root[data-theme] .w-bell-count{background:var(--s-neg);color:var(--s-neg-ink);box-shadow:0 0 0 2px var(--top)}
:root[data-theme] .hx-svg .area.b{fill:none}
:root[data-theme] .hx-svg .area.e{fill:var(--accent-soft)}
/* LINE keeps LINE's green, and only on what leads to LINE (spec 1.4). */
:root[data-theme] .w-more-mark.line,:root[data-theme] .help-ic{background:var(--line-green)}
:root[data-theme] .w-more-mark.line:before{background:transparent;color:var(--on-line)}
:root[data-theme] .help-ic:before{background:var(--on-line)}
:root[data-theme] .help-group .help-ic,:root[data-theme] .help-mail .help-ic{background:var(--surface-2)}
:root[data-theme] .help-group .help-ic:before,:root[data-theme] .help-mail .help-ic:before{background:var(--muted)}
/* ===================================================================== 2. shared components (spec 4) */
/* Buttons: 42 px, corner 10, never a capsule, no gradient or glow. Small ones 36 px, corner 8. */
:root[data-theme] .primary,:root[data-theme] .secondary,:root[data-theme] .danger{min-height:42px;padding:0 18px;border-radius:var(--btn-r);
  font-size:.92rem;font-weight:600;box-shadow:none;background-image:none;text-shadow:none}
:root[data-theme] .primary{background:var(--ember);color:var(--on-ember);border-color:transparent}
:root[data-theme] .primary:hover:not(:disabled){background:var(--ember-hover);color:var(--on-ember)}
:root[data-theme] .primary .wi,:root[data-theme] .primary:before{color:var(--on-ember)}
:root[data-theme] .secondary{background:transparent;color:var(--text);border:1px solid var(--line-strong)}
:root[data-theme] .secondary:hover:not(:disabled){background:var(--surface-2);border-color:var(--line-strong);color:var(--text)}
/* Danger: stopping an EA, stopping every order, signing out, deleting (spec 4). */
:root[data-theme] .danger,:root[data-theme] .secondary.w-stop,:root[data-theme] .w-stop{background:var(--neg-soft);color:var(--neg);border:1px solid var(--neg-line)}
:root[data-theme] .danger:hover:not(:disabled),:root[data-theme] .secondary.w-stop:hover:not(:disabled){background:var(--neg-soft);border-color:var(--neg);color:var(--neg)}
:root[data-theme] .primary:disabled,:root[data-theme] .secondary:disabled,:root[data-theme] .danger:disabled{background:var(--surface-2);border-color:transparent;
  color:var(--text);box-shadow:none;opacity:.5}
:root[data-theme] .icon-button,:root[data-theme] .w-icon-btn{border-radius:var(--btn-r);background:transparent;border:1px solid var(--line-strong);color:var(--muted);box-shadow:none}
:root[data-theme] .icon-button:hover,:root[data-theme] .w-icon-btn:hover{background:var(--surface-2);color:var(--text)}

/* Inputs: 42 px, corner 10, a stronger line; focus is the logo green, no glow. */
:root[data-theme] input:not([type=checkbox]):not([type=radio]):not([type=range]),:root[data-theme] select,:root[data-theme] textarea{
  min-height:42px;border-radius:var(--btn-r);border:1px solid var(--line-strong);background-color:var(--surface);color:var(--text);box-shadow:none}
:root[data-theme] textarea{min-height:96px}
:root[data-theme] input::placeholder,:root[data-theme] textarea::placeholder{color:var(--faint)}
:root[data-theme] input:focus,:root[data-theme] select:focus,:root[data-theme] textarea:focus{border-color:var(--ember);box-shadow:none;outline:none}
:root[data-theme] input:disabled,:root[data-theme] select:disabled{background-color:var(--surface-2);color:var(--faint)}
:root[data-theme] select option{background:var(--surface);color:var(--text)}
:root[data-theme] input[type=checkbox],:root[data-theme] input[type=radio]{accent-color:var(--ember)}
:root[data-theme] input[aria-invalid=true],:root[data-theme] .field-error input,:root[data-theme] input.invalid{border-color:var(--neg)}

/* Tabs: a surface-2 frame, 36 px tabs, the chosen one lifted on the card colour (not green). */
:root[data-theme] .tabs,:root[data-theme] .ops-tabs,:root[data-theme] .set-langs,:root[data-theme] .w-seg{background:var(--surface-2);padding:4px;border-radius:12px;gap:4px}
:root[data-theme] .tabs>button,:root[data-theme] .ops-tabs>button,:root[data-theme] .set-langs>button,:root[data-theme] .w-seg>button{min-height:36px;padding:0 16px;
  border-radius:var(--btn-r-sm);background:transparent;color:var(--muted);box-shadow:none;border:0;font-weight:600}
:root[data-theme] .tabs>button.selected,:root[data-theme] .ops-tabs>button.selected,:root[data-theme] .ops-tabs>button[aria-selected=true],
:root[data-theme] .ops-tabs>button[aria-pressed=true],:root[data-theme] .set-langs>button.primary,:root[data-theme] .w-seg>button[aria-pressed=true]{
  background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
/* The admin's tabs (wing-admin.css styles them by id): the same frame and the same chosen tab. */
:root[data-theme] #page-operations .ops-tabs,:root[data-theme] .slot-tabs{background:var(--surface-2);padding:4px;border-radius:12px;gap:4px;border:0}
:root[data-theme] #page-operations .ops-tabs>button,:root[data-theme] .slot-tabs>button{min-height:36px;padding:0 16px;border-radius:var(--btn-r-sm);background:transparent;
  color:var(--muted);box-shadow:none;border:0;font-weight:600}
:root[data-theme] #page-operations .ops-tabs>button[aria-selected=true],:root[data-theme] .slot-tabs>button.selected{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
/* Filter chips: corner 8; the chosen one is the logo green with dark words. */
:root[data-theme] .w-chip{border-radius:var(--btn-r-sm);min-height:36px;background:var(--surface-2);color:var(--muted)}
:root[data-theme] .w-chip b{border-radius:6px;background:var(--surface);color:var(--text)}
:root[data-theme] .w-chip[aria-pressed=true]{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-chip[aria-pressed=true] b{background:var(--on-ember);color:var(--ember)}

/* Status chips: 26 px, corner 6, 0.78 rem bold, always solid (spec 2.3). */
:root[data-theme] .pill{min-height:26px;padding:0 10px;border-radius:6px;font-size:.78rem;font-weight:700;border:0;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .pill.good{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .pill.warn{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .pill.error{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .pill.neutral{background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-badge{border-radius:6px;background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-acct2 .w-acct-state{min-height:26px;padding:0 10px;border-radius:6px;font-size:.78rem;font-weight:700;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-acct2 .w-acct-state strong{font-weight:700;color:inherit}
:root[data-theme] .w-acct2 .w-acct-state .w-dot{width:7px;height:7px;background:currentColor}
:root[data-theme] .w-acct2.tone-running .w-acct-state{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-acct2.tone-error .w-acct-state{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .w-acct2.tone-pending .w-acct-state,:root[data-theme] .w-acct2.tone-unknown .w-acct-state{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .w-ea-badge{border-radius:6px;background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-ea-hidden{border-radius:6px;background:var(--s-stop);color:var(--s-stop-ink)}
/* Risk levels: low green, medium yellow, high orange, very high red; solid. */
:root[data-theme] .w-ea-risk{border:0;border-radius:6px;padding:0 10px;min-height:24px;font-size:.78rem}
:root[data-theme] .w-ea-risk.low{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-ea-risk.medium{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .w-ea-risk.high{background:var(--s-orange);color:var(--s-orange-ink)}
:root[data-theme] .w-ea-risk.very-high{background:var(--s-neg);color:var(--s-neg-ink)}
/* BUY / SELL: 24 px, corner 6, bold; BUY logo green, SELL red. */
:root[data-theme] .fxc-side{min-height:24px;display:inline-grid;place-items:center;padding:0 8px;border-radius:6px;font-weight:700}
:root[data-theme] .fxc-side.buy{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .fxc-side.sell{background:var(--s-neg);color:var(--s-neg-ink)}
/* "Updated a moment ago": plain words with a dot, not a capsule; the dot does not glow. */
:root[data-theme] .fx-live{border-radius:var(--btn-r-sm);box-shadow:none;background:transparent;border-color:var(--line)}
:root[data-theme] .fx-live-dot{box-shadow:none;animation:none;background:var(--pos)}
:root[data-theme] .fx-live[data-tone=slow] .fx-live-dot{background:var(--s-warn)}
:root[data-theme] .fx-live[data-tone=down] .fx-live-dot{background:var(--s-neg)}
:root[data-theme] .fx-live[data-tone=update]{background:var(--ember);color:var(--on-ember);border-color:var(--ember)}
:root[data-theme] .fx-live[data-tone=update] .fx-live-dot{background:var(--on-ember)}

/* Cards: surface, a fine line, corner 18, the soft grey shadow. Wells inside: corner 12. */
:root[data-theme] .panel,:root[data-theme] .w-card,:root[data-theme] .w-mini{background:var(--surface);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow);background-image:none}
:root[data-theme] .panel,:root[data-theme] .w-card{padding:20px 22px}
:root[data-theme] .panel>h2,:root[data-theme] .w-card>h2{font-size:1.02rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-sym{border-radius:var(--well-r);background:var(--well);border:1px solid var(--line);box-shadow:none}
:root[data-theme] .w-sym[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent-line);box-shadow:none}
/* Banners in a page (spec 5.3): a light fill of their colour, a solid icon circle, buttons at the right. */
:root[data-theme] .notice,:root[data-theme] .setup-notice{border-radius:var(--well-r);background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--text)}
:root[data-theme] .notice.error,:root[data-theme] .notice.warn{background:var(--warn-soft);border-color:var(--warn-line)}

/* Icon circles: solid, the icon always in the middle (spec 1.10, 2.3). */
:root[data-theme] .w-mini .w-mini-ic{width:40px;height:40px;display:grid;place-items:center;background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .w-mini .w-mini-ic .wi{width:20px;height:20px;color:inherit}
:root[data-theme] .w-mini .w-mini-dot{width:40px;height:40px;display:grid;place-items:center;background:var(--s-run)}
:root[data-theme] .w-mini .w-mini-dot:after{position:static;inset:auto;width:12px;height:12px;background:var(--on-ember)}
:root[data-theme] .w-mini-sys[data-tone=warn] .w-mini-dot{background:var(--s-warn)}:root[data-theme] .w-mini-sys[data-tone=warn] .w-mini-dot:after{background:var(--s-warn-ink)}
:root[data-theme] .w-mini-sys[data-tone=idle] .w-mini-dot{background:var(--s-stop)}:root[data-theme] .w-mini-sys[data-tone=idle] .w-mini-dot:after{background:var(--s-stop-ink)}
:root[data-theme] .w-mt5-ic{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-guard-ic,:root[data-theme] .w-guard.ea .w-guard-ic{background:var(--s-warn);color:var(--s-warn-ink);background-image:none}
:root[data-theme] .w-more-mark.z{background:var(--surface-2);background-image:none}

:root[data-theme] .avatar{background:var(--ember);color:var(--on-ember)}
/* The portfolio card is a card like the others: surface, the big number in the text colour (spec 6.01). */
:root[data-theme] .w-port{background:var(--surface);background-image:none;color:var(--text);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow)}
:root[data-theme] .w-port:after{content:none;display:none}
:root[data-theme] .w-port-change,:root[data-theme] .w-port-cent{color:var(--muted)}
:root[data-theme] .w-port-periods{border-top-color:var(--line)}
:root[data-theme] .w-port .wi,:root[data-theme] .w-port-head button{color:var(--muted)}
/* Coins: solid gold "Au" and orange "B" circles. */
:root[data-theme] .w-coin{width:24px;height:24px;border-radius:50%;clip-path:none;background:var(--gold);box-shadow:none;display:grid;place-items:center;
  color:#2B1D00;font-size:10px;font-weight:700;line-height:1}
:root[data-theme] .w-coin:not(.w-coin-btc):before{content:'Au'}
:root[data-theme] .w-coin.w-coin-btc{background:var(--btc);color:#1F0A00}
:root[data-theme] .w-coin.w-coin-sm{width:16px;height:16px;font-size:7px}
:root[data-theme] .w-sym-top .w-coin{width:18px;height:18px;font-size:8px}
/* Chart frames: flat, grid lines drawn by the chart itself in --grid. */
:root[data-theme] .w-plot{background:var(--well);background-image:none;border-color:var(--line)}
:root[data-theme] .w-candles line.w-grid,:root[data-theme] .w-candles .w-grid line{stroke:var(--grid)}
:root[data-theme] .fx-install-go{background:var(--ember);color:var(--on-ember);box-shadow:none;background-image:none;border-radius:var(--btn-r)}
:root[data-theme] .w-ea-card{box-shadow:var(--shadow)}
:root[data-theme] .w-ea-cta{background:var(--bg);background-image:none}
/* The EA card's own button: the EA's colour, flat, no glow. */
:root[data-theme] .w-ea-go{border-radius:var(--btn-r);background:var(--ea,var(--ember));background-image:none;box-shadow:none}

/* Empty state: a 56 px neutral circle, a 1 rem title, muted words. */
:root[data-theme] .w-empty{color:var(--muted)}
:root[data-theme] .w-empty strong{font-size:1rem;color:var(--text)}
:root[data-theme] .w-empty small{color:var(--faint)}

/* Tables: small faint heads, rows split by the fine line, numbers to the right. */
:root[data-theme] thead th{background:transparent;color:var(--faint);font-size:.78rem;font-weight:600;border-bottom:1px solid var(--line)}
:root[data-theme] tbody td{border-bottom:1px solid var(--line)}
:root[data-theme] td.num,:root[data-theme] th.num,:root[data-theme] td[data-num]{text-align:right}

/* Switches: on = logo green with a white knob, off = surface-2. */
:root[data-theme] .fx-toggle{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-strong)}
:root[data-theme] .fx-toggle[aria-checked=true]{background:var(--ember);box-shadow:none}
:root[data-theme] .fx-toggle[aria-checked=mixed]{background:var(--s-warn)}
:root[data-theme] .fx-toggle i{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25)}

/* ===================================================================== 3. page frame (spec 5) */
/* The shared sheets switch to the desktop frame at 801 px; FALCON keeps that switch so no script that reads it
   changes, and below 1024 px the grids step down instead (section 4). */
:root[data-theme] .topbar{background:var(--top);color:var(--text);border-bottom:1px solid var(--line);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
:root[data-theme] .topbar:after{content:none;display:none}
:root[data-theme] .topbar .w-crumb,:root[data-theme] .topbar .w-crumb b{color:var(--text)}
:root[data-theme] .topbar .account-context{color:var(--text)}
:root[data-theme] .topbar .account-context label{color:var(--faint)}
:root[data-theme] .topbar .account-context select{color:var(--text);background-color:var(--surface-2);border:1px solid var(--line-strong)}
:root[data-theme] .topbar .account-context select option{color:var(--text);background:var(--surface)}
:root[data-theme] .topbar #node-status{background:var(--surface-2);color:var(--muted);border-radius:var(--btn-r-sm)}
/* Icon buttons in the bar: 40 x 40, corner 10. The theme button shows its icon only; its words stay for readers. */
:root[data-theme] .topbar .w-bell,:root[data-theme] .topbar .w-gear,:root[data-theme] .topbar #theme-toggle,:root[data-theme] .topbar .language-menu>summary{
  width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;border-radius:var(--btn-r);border:1px solid var(--line-strong);
  background:transparent;color:var(--text)}
:root[data-theme] .topbar #theme-toggle{font-size:0;gap:0}
:root[data-theme] .topbar #theme-toggle:before{width:20px;height:20px}
/* The theme button shows where it leads, as in the design: a sun in the dark, a moon in the light. */
:root[data-theme="dark"] #theme-toggle:before{-webkit-mask-image:var(--i-sun);mask-image:var(--i-sun)}
:root[data-theme="light"] #theme-toggle:before{-webkit-mask-image:var(--i-moon);mask-image:var(--i-moon)}
:root[data-theme] .topbar .w-bell:before,:root[data-theme] .topbar .w-gear:before{width:20px;height:20px}
:root[data-theme] .topbar .w-bell:hover,:root[data-theme] .topbar .w-gear:hover,:root[data-theme] .topbar #theme-toggle:hover{background:var(--surface-2)}
:root[data-theme] .w-brand .fx-word>span{color:var(--text)}

@media (min-width:801px){
 :root[data-theme] .workspace{grid-template-columns:var(--side-w) minmax(0,1fr)}
 :root[data-theme] .sidebar{background:var(--side);border-right:1px solid var(--line);padding:18px 14px 14px}
 :root[data-theme] .sidebar .brand{padding:2px 8px 18px;min-height:46px}
 :root[data-theme] .nav-heading{display:none}
 :root[data-theme] .sidebar nav{gap:2px}
 :root[data-theme] .nav-item{position:relative;min-height:38px;padding:0 12px;border-radius:var(--btn-r);color:var(--muted);font-size:.93rem;font-weight:500}
 :root[data-theme] .nav-item>span:first-child{width:20px;height:20px;color:var(--faint)}
 :root[data-theme] .nav-item:hover{background:var(--surface-2);color:var(--text)}
 :root[data-theme] .nav-item.selected{background:var(--accent-soft);color:var(--text);font-weight:600}
 :root[data-theme] .nav-item.selected>span:first-child{color:var(--accent-text)}
 :root[data-theme] .nav-item.selected:before{content:'';position:absolute;left:-14px;top:7px;bottom:7px;width:3px;border-radius:0 3px 3px 0;background:var(--ember)}
 :root[data-theme] .nav-item .pill{background:var(--surface-2);color:var(--muted);min-height:22px;border-radius:6px}
 /* Three groups and the admin's, split by a line (spec 5.1). The markup keeps its order; the menu reorders. */
 :root[data-theme] .nav-item[data-page=overview]{order:1}:root[data-theme] .nav-item[data-page=connect]{order:2}
 :root[data-theme] .nav-item[data-page=positions]{order:3}:root[data-theme] .nav-item[data-page=backtest]{order:4}
 :root[data-theme] .nav-item[data-page=history]{order:5}:root[data-theme] .nav-item[data-page=news]{order:6}
 :root[data-theme] .nav-item[data-page=catalog]{order:7}
 :root[data-theme] .nav-item[data-page=risk]{order:10}:root[data-theme] .nav-item[data-page=analytics]{order:11}
 :root[data-theme] .nav-item[data-page=trade]{order:12}:root[data-theme] .nav-item[data-page=activity]{order:13}
 :root[data-theme] .nav-item[data-page=notifications]{order:20}:root[data-theme] .nav-item[data-page=settings]{order:21}
 :root[data-theme] .nav-item[data-page=help]{order:22}
 :root[data-theme] .nav-item[data-page=slots]{order:30}:root[data-theme] .nav-item[data-page=operations]{order:31}
 :root[data-theme] .nav-item:is([data-page=risk],[data-page=notifications],[data-page=slots]){margin-top:17px}
 :root[data-theme] .nav-item:is([data-page=risk],[data-page=notifications],[data-page=slots]):after{content:'';position:absolute;left:8px;right:8px;top:-9px;height:1px;background:var(--line)}
 :root[data-theme] .nav-item[data-page=slots][hidden]+.nav-item[data-page=operations]{margin-top:17px}
 /* The small cards and the member row at the foot of the menu. */
 :root[data-theme] .fx-menu-link,:root[data-theme] .sidebar .fx-install{background:var(--well);border:1px solid var(--line);border-radius:var(--well-r);color:var(--text)}
 :root[data-theme] .fx-menu-link small,:root[data-theme] .sidebar .fx-install small{color:var(--faint)}
 :root[data-theme] .fx-menu-ic{width:34px;height:34px;border-radius:50%;background:var(--ember)}
 :root[data-theme] .fx-menu-ic:before{inset:8px;background:var(--on-ember)}
 :root[data-theme] .profile{border-top-color:var(--line)}
 :root[data-theme] .profile small{color:var(--faint)}
 :root[data-theme] #logout{color:var(--muted);border-radius:var(--btn-r)}
 :root[data-theme] #logout:hover{color:var(--neg);background:var(--neg-soft)}
 /* The top bar: 72 px, the page title, the account picker, then the icon buttons at the right. */
 :root[data-theme] .topbar{min-height:var(--top-h);padding:0 28px 0 32px;gap:12px}
 :root[data-theme] .topbar .w-crumb{font-size:1.2rem;font-weight:700}
 :root[data-theme] .topbar .account-context select{height:42px;min-height:42px;border-radius:var(--btn-r)}
 :root[data-theme] .content{padding:24px 32px 40px;max-width:1280px;gap:20px}
 :root[data-theme] .content>.page:not([hidden]){gap:20px}
}

@media (max-width:800px){
 /* Phone bar, 60 px: the round app icon, the page title, the account picker, the theme button, the bell. */
 :root[data-theme] .topbar{min-height:calc(60px + env(safe-area-inset-top));gap:8px;padding:env(safe-area-inset-top) 12px 0 14px}
 :root[data-theme] .topbar .fx-mobile-brand{width:36px;height:36px;flex:none;border-radius:50%;background:#0B1214;display:grid;place-items:center;overflow:hidden}
 :root[data-theme] .topbar .fx-mobile-brand img{width:26px;height:auto}
 :root[data-theme] .topbar .fx-mobile-brand .fx-word{display:none}
 :root[data-theme] .topbar .w-crumb{display:block;flex:1 1 auto;min-width:0;font-size:1.05rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 :root[data-theme] .topbar .account-context{margin-left:0;flex:0 1 128px}
 :root[data-theme] .topbar .account-context select{height:38px;min-height:38px;border-radius:var(--btn-r)}
 :root[data-theme] .topbar .theme-switch{margin-left:0}
 :root[data-theme] .topbar .w-gear{display:none}
 :root[data-theme] .content{padding:16px 16px calc(112px + env(safe-area-inset-bottom));gap:16px}
 :root[data-theme] .content>.page:not([hidden]){gap:16px}
 /* The floating bottom bar: 12 px off the bottom, corner 18; the middle "Choose EA" a green 50 x 34 button. */
 :root[data-theme] .mobile-nav{left:10px;right:10px;bottom:calc(12px + env(safe-area-inset-bottom));padding:8px 4px;border-radius:18px;
   background:var(--side);border:1px solid var(--line);box-shadow:var(--shadow)}
 :root[data-theme] .mobile-nav button{color:var(--faint);font-size:.72rem;font-weight:600;gap:4px;padding:4px 0 2px}
 :root[data-theme] .mobile-nav .wi{position:relative;z-index:1;width:22px;height:22px}
 :root[data-theme] .mobile-nav button[aria-current=page]{color:var(--accent-text)}
 :root[data-theme] .mobile-nav button[aria-current=page]:after{content:none;display:none}
 :root[data-theme] .mobile-nav button[aria-current=page]:not(.mobile-nav-main):before{content:'';position:absolute;top:0;left:50%;width:46px;height:32px;margin-left:-23px;
   border-radius:var(--btn-r);background:var(--accent-soft)}
 :root[data-theme] .mobile-nav-ring,:root[data-theme] .mobile-nav .mobile-nav-main[aria-current=page] .mobile-nav-ring{width:50px;height:34px;margin-top:-2px;
   border-radius:var(--btn-r);background:var(--ember);background-image:none;color:var(--on-ember);box-shadow:none}
 :root[data-theme] .mobile-nav-ring .wi{width:22px;height:22px}
 :root[data-theme] .mobile-nav .mobile-nav-main{color:var(--text)}
 /* "More": the menu's own list and groups (spec 5.2, 5.3), rows of 48 px. */
 :root[data-theme] .w-more-grid{display:flex;flex-direction:column;gap:2px;background:var(--side);border:1px solid var(--line);border-radius:var(--card-r);padding:6px}
 :root[data-theme] .w-more-tile{min-height:48px;border-radius:var(--btn-r);background:transparent;border:0;box-shadow:none;color:var(--text)}
 :root[data-theme] .w-more-tile:hover{background:var(--surface-2)}
 :root[data-theme] .w-more-tile>.wi:first-child{color:var(--faint);background-color:currentColor}
 :root[data-theme] .w-more-sub{color:var(--faint)}
 :root[data-theme] .w-more-count{background:var(--s-neg);color:var(--s-neg-ink);border-radius:6px}
 :root[data-theme] .w-more-title{color:var(--muted);font-size:.82rem;font-weight:600}
 :root[data-theme] .w-more-profile{background:var(--surface);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow)}
 :root[data-theme] .w-more-avatar{background:var(--ember);background-image:none}
 :root[data-theme] .w-more-avatar:before{background:var(--on-ember)}
 :root[data-theme] .w-more-action{border-radius:var(--btn-r);background:transparent;border:1px solid var(--line-strong);color:var(--text)}
 :root[data-theme] .w-more-logout{background:var(--neg-soft);border-color:var(--neg-line);color:var(--neg)}
}

/* ===================================================================== 4. pages (spec 6) */
/* Every page head: the title alone, its line under it, "updated" and refresh at the right (spec 4). No eyebrow. */
:root[data-theme] .page-heading{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 16px;padding:0;min-height:0;margin:0}
:root[data-theme] .page-heading>div{max-width:none;flex:1 1 320px;min-width:0}
:root[data-theme] .page-heading h1{font-size:1.6rem;font-weight:700;line-height:1.3;color:var(--text);max-width:none;margin:0;padding:0;border:0;letter-spacing:0}
:root[data-theme] .page-heading p.muted{font-size:.95rem;color:var(--muted);margin:4px 0 0}
:root[data-theme] .page-heading .eyebrow:not(#hero-hello){display:none}
:root[data-theme] .w-hello>div{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:6px}
:root[data-theme] .w-hello h1{flex-basis:100%;order:0}
:root[data-theme] .w-hello #hero-hello{order:1;display:inline;margin-top:4px;font-size:.95rem;font-weight:400;color:var(--muted);letter-spacing:0;text-transform:none;
  flex:0 0 auto;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root[data-theme] .w-hello #hero-hello b{display:inline;margin-left:.3em;font:inherit;color:inherit}
:root[data-theme] .w-hello #hero-hello:after{content:' ·'}
:root[data-theme] .w-hello>div>p.muted{order:2}
/* "Updated ..." and its refresh: words in faint, the refresh a 34 px icon button. */
:root[data-theme] .page-heading>.fx-live{height:auto;padding:0;border:0;background:transparent;color:var(--faint);gap:10px;font-weight:500}
:root[data-theme] .page-heading>.fx-live .fx-live-icon{width:34px;height:34px;border:1px solid var(--line-strong);border-radius:var(--btn-r);background-color:transparent;
  display:grid;place-items:center;color:var(--muted)}
@media (max-width:800px){:root[data-theme] .page-heading h1{font-size:1.35rem}
 /* On a phone the page's refresh button joins the "updated" line instead of standing on a row of its own. */
 :root[data-theme] .page-heading:has(>.fx-live)>.w-icon-btn{order:4;margin-left:auto}
 :root[data-theme] .page-heading:has(>.fx-live)>.fx-live{margin-top:0;align-self:center}}

/* ---------- 01 overview */
/* Five summary cards: an icon circle, a small label, a large number (spec 6.01). */
:root[data-theme] .w-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding:0;background:transparent;border:0;box-shadow:none;overflow:visible}
:root[data-theme] .w-counts-top,:root[data-theme] .w-counts-low{display:contents}
:root[data-theme] .w-count,:root[data-theme] .w-count-row{display:grid;grid-template-columns:40px auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;row-gap:0;
  align-items:center;text-align:left;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow)}
:root[data-theme] .w-count+.w-count,:root[data-theme] .w-count-row+.w-count-row{border-left:1px solid var(--line)}
:root[data-theme] .w-count:before{content:'';grid-row:1/3;grid-column:1;width:40px;height:40px;border-radius:50%;background:var(--surface-2);
  -webkit-mask:none;mask:none;box-shadow:inset 0 0 0 20px var(--surface-2)}
:root[data-theme] .w-count:after{content:'';grid-row:1/3;grid-column:1;justify-self:center;width:20px;height:20px;background:var(--muted);
  -webkit-mask:var(--i-wallet) center/contain no-repeat;mask:var(--i-wallet) center/contain no-repeat}
:root[data-theme] .w-count-running:before{background:var(--s-run);box-shadow:none}
:root[data-theme] .w-count-running:after{background:var(--s-run-ink);-webkit-mask-image:var(--i-play);mask-image:var(--i-play)}
:root[data-theme] .w-count-stopped:before{background:var(--s-neg);box-shadow:none}
:root[data-theme] .w-count-stopped:after{background:var(--s-neg-ink);-webkit-mask-image:var(--i-pause);mask-image:var(--i-pause)}
:root[data-theme] .w-count span,:root[data-theme] .w-count-row span{grid-column:2/4;font-size:.8rem;font-weight:500;color:var(--muted)}
:root[data-theme] .w-count strong{grid-column:2;grid-row:2;font-size:1.45rem;font-weight:700;line-height:1.2;color:var(--text)}
:root[data-theme] .w-count small{grid-column:3;grid-row:2;justify-self:start;align-self:end;margin-left:-6px;padding-bottom:4px;font-size:.78rem;color:var(--faint)}
:root[data-theme] .w-count-running strong,:root[data-theme] .w-count-stopped strong{color:var(--text)}
:root[data-theme] .w-count-row>div{grid-column:2/4;grid-row:1/3}
:root[data-theme] .w-count-row strong{font-size:1.45rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-count-row>span.w-count-ic{grid-row:1/3;grid-column:1;width:40px;height:40px;background:var(--surface-2);color:var(--muted)}
:root[data-theme] .w-count-review>span.w-count-ic{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .w-count-row span.w-count-ic>.wi{grid-column:auto;grid-row:auto;display:block;width:20px;height:20px;color:inherit;font-size:0}
/* The portfolio card: the label, the largest number on the page, today's change as a solid chip, three wells. */
:root[data-theme] .w-port{padding:22px 24px}
:root[data-theme] .w-port-head{font-size:.86rem;font-weight:600;color:var(--muted)}
:root[data-theme] .w-port-value{font-size:2.6rem;font-weight:700;letter-spacing:0;color:var(--text);margin:8px 0 6px}
:root[data-theme] .w-port-change{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:6px;font-size:.78rem;font-weight:700;
  background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-port-change:empty{display:none}
:root[data-theme] .w-port-change[data-tone=up]{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-port-change[data-tone=down]{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .w-port-periods{gap:12px;border-top:0;padding-top:0;margin-top:16px}
:root[data-theme] .w-period{flex-direction:column;align-items:flex-start;padding:12px 14px;background:var(--well);border:1px solid var(--line);border-radius:var(--well-r)}
:root[data-theme] .w-period+.w-period{border-left:1px solid var(--line)}
:root[data-theme] .w-period span{color:var(--faint);font-size:.78rem}
:root[data-theme] .w-period strong{color:var(--text);font-size:1.15rem;font-weight:700}
/* Max Drawdown and system status: two cards that share the portfolio card's height. */
:root[data-theme] .w-home-duo .w-mini{padding:20px 22px;gap:14px}
:root[data-theme] .w-home-duo .w-mini>div>span{font-size:.8rem;color:var(--muted)}
:root[data-theme] .w-home-duo .w-mini strong{font-size:1.2rem}
/* The chart card and the next-news card. */
:root[data-theme] .w-chart{padding:20px 22px}
:root[data-theme] .w-syms{gap:12px}
:root[data-theme] .w-chart-title{font-size:1.02rem;font-weight:700}
:root[data-theme] .w-next{padding:20px 22px;text-align:left;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:14px}
:root[data-theme] .w-next-head{margin:0}
:root[data-theme] .w-next-body{flex-direction:column;align-items:stretch;gap:14px}
:root[data-theme] .w-next-what{gap:8px}
:root[data-theme] .w-clock{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:6px}
:root[data-theme] .w-clock-cell{display:flex;flex-direction:column;align-items:center;padding:12px 6px}
:root[data-theme] .w-clock-cell strong{font-size:1.45rem;font-weight:700}
:root[data-theme] .w-next-head{font-size:1.02rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-next-ic{color:var(--muted)}
:root[data-theme] .w-next-what strong{font-size:1.05rem}
:root[data-theme] .w-clock-cell{background:var(--well);border:1px solid var(--line);border-radius:var(--well-r)}
:root[data-theme] .w-clock-cell strong{color:var(--text)}
:root[data-theme] .w-clock-cell small{color:var(--faint)}
:root[data-theme] .w-clock-sep{color:var(--faint)}
/* "Your MT5 accounts": cards side by side; their buttons and foot on one line (spec 1.13). */
:root[data-theme] .w-acct-block{padding:20px 22px;gap:16px}
:root[data-theme] .w-block-head h2{font-size:1.02rem;font-weight:700}
:root[data-theme] .w-mt5-ic{display:grid;place-items:center;font-size:.6rem;font-weight:700;color:var(--on-ember)}
:root[data-theme] .w-mt5-ic:before{content:'MT5'}
:root[data-theme] .w-mt5-ic:after{content:none;display:none}
:root[data-theme] .w-acct-list .w-acct,:root[data-theme] .w-acct2{background:var(--well);border:1px solid var(--line);border-radius:16px;box-shadow:none;padding:18px}
:root[data-theme] .w-acct2{display:flex;flex-direction:column}
:root[data-theme] .w-acct2 .w-acct-actions{margin-top:auto}
:root[data-theme] .w-acct2 .w-acct-why{color:var(--muted)}
:root[data-theme] .w-acct2 .w-acct-head h3{font-size:1.1rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-acct2 .w-acct-head small{color:var(--faint)}
:root[data-theme] .w-type{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:6px;font-size:.78rem;font-weight:700;
  background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-type-real{background:var(--s-info);color:var(--s-info-ink)}
:root[data-theme] .w-acct2 .w-acct-ea{background:var(--surface);border:1px solid var(--line);border-radius:var(--well-r);padding:10px 12px}
:root[data-theme] .w-acct2 .w-acct-eadot{width:30px;height:30px;border-radius:50%;flex:none;background:var(--ember);display:grid;place-items:center}
:root[data-theme] .w-acct2 .w-acct-eadot:after{content:'';width:16px;height:16px;background:var(--on-ember);-webkit-mask:var(--i-cpu) center/contain no-repeat;mask:var(--i-cpu) center/contain no-repeat}
:root[data-theme] .w-acct2 .w-acct-ea small{color:var(--faint)}
:root[data-theme] .w-acct2 .w-acct-eq strong{font-size:1.45rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-acct2 .w-acct-facts span,:root[data-theme] .w-acct2 .w-acct-facts small{color:var(--faint)}
:root[data-theme] .w-acct2 .w-acct-sub button,:root[data-theme] .w-acct2 .w-acct-actions .secondary:not(.w-stop){min-height:36px;border-radius:var(--btn-r-sm);font-size:.86rem;
  background:var(--surface-2);border-color:transparent;color:var(--text)}
:root[data-theme] .w-acct2 details.w-acct-info{border-top:1px solid var(--line)}
:root[data-theme] .w-acct2 details.w-acct-info>summary{color:var(--muted)}
:root[data-theme] .w-acct2 .w-acct-more{border-radius:var(--btn-r-sm);color:var(--faint)}
/* Add an account: a dashed tile; stop every order: the danger button; the removed accounts: a link at the right. */
:root[data-theme] .w-block-actions{display:grid;grid-template-columns:1fr;gap:16px}
:root[data-theme] #hub-add.w-add{min-height:120px;border:1.5px dashed var(--line-strong);border-radius:16px;background:transparent;color:var(--text);
  flex-direction:column;gap:10px;font-size:.95rem}
:root[data-theme] #hub-add.w-add:before{content:'';width:46px;height:46px;border-radius:50%;background:var(--ember);flex:none;
  -webkit-mask:none;mask:none}
:root[data-theme] #hub-add.w-add:hover{border-color:var(--accent-line);background:var(--accent-soft)}
:root[data-theme] #hub-killall{justify-self:start;min-height:36px;border-radius:var(--btn-r-sm);font-size:.86rem}
:root[data-theme] #hub-archived{justify-self:end;color:var(--accent-text);font-size:.9rem}
@media (min-width:801px){
 :root[data-theme] .w-home{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:20px;align-items:stretch}
 :root[data-theme] .w-home-duo{grid-template-columns:1fr;grid-auto-rows:1fr;gap:20px}
 :root[data-theme] .w-chart{grid-row:3}
 :root[data-theme] .w-next{align-self:stretch}
 :root[data-theme] .w-acct-list{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
 :root[data-theme] #hub-archived{grid-column:1/3}
}
@media (min-width:801px) and (max-width:1199px){:root[data-theme] .w-counts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:800px){
 :root[data-theme] .w-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 :root[data-theme] .w-count-all{grid-column:1/-1}
 :root[data-theme] .w-count,:root[data-theme] .w-count-row{padding:14px}
 :root[data-theme] .w-port-value{font-size:2.1rem}
 :root[data-theme] .w-home-duo{gap:12px}
 :root[data-theme] .w-home-duo .w-mini{flex-direction:column;align-items:flex-start;padding:16px}
}

/* On a phone the price chart comes before the next-news card, as in the hand-off's 01-overview (mobile). */
@media (max-width:800px){
 :root[data-theme] .w-home-top>.w-chart{order:1}
 :root[data-theme] .w-home-top>.w-next{order:2}
}

/* ---------- numbers that gain or lose, everywhere */
:root[data-theme] .gain{color:var(--pos)}
:root[data-theme] .loss{color:var(--neg)}

/* ---------- 05 history: the monthly table, green and red cells; on a phone a card per year of month cells */
:root[data-theme] .hx-monthly .cell.gain{background:var(--accent-soft);color:var(--pos)}
:root[data-theme] .hx-monthly .cell.loss{background:var(--neg-soft);color:var(--neg)}
:root[data-theme] .hx-monthly .cell.total{font-weight:700}
@media (max-width:800px){
 :root[data-theme] .hx-monthly .hx-table{overflow:visible}
 :root[data-theme] .hx-monthly table,:root[data-theme] .hx-monthly tbody{display:block}
 :root[data-theme] .hx-monthly thead{display:none}
 :root[data-theme] .hx-monthly tbody tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 10px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--well)}
 :root[data-theme] .hx-monthly tbody th{grid-column:1/-1;text-align:left;padding:0 0 4px;border:0;background:transparent;color:var(--text);font-weight:700}
 :root[data-theme] .hx-monthly tbody td{display:block;padding:6px 4px;border:0;border-radius:8px;text-align:center;font-size:.82rem;white-space:nowrap}
 :root[data-theme] .hx-monthly tbody td:before{content:attr(data-mobile-label);display:block;font-size:.7rem;color:var(--faint)}
 :root[data-theme] .hx-monthly tbody td.total{grid-column:1/-1}
}

:root[data-theme] .deal-calendar{grid-template-columns:repeat(7,minmax(0,1fr))}
:root[data-theme] .deal-calendar>button{min-width:0;min-height:44px;padding:2px;border-radius:var(--btn-r-sm);font-size:.75rem}
:root[data-theme] .deal-calendar>button small{color:var(--faint)}

/* ---------- 03 orders */
:root[data-theme] .ord-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
/* Label, number, then the small line, each on its own line at every width: WING stacks them only on a computer
   (it hides the tiles on a phone), so on FALCON's phone tiles the three ran together (owner, 16 Oct 2026). */
:root[data-theme] .ord-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:18px 20px;border-radius:var(--card-r);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
:root[data-theme] .ord-tile span,:root[data-theme] .ord-tile strong,:root[data-theme] .ord-tile small{display:block;max-width:100%}
:root[data-theme] .ord-tile span{font-size:.8rem;font-weight:500;color:var(--muted)}
:root[data-theme] .ord-tile strong{margin-top:2px;font-size:1.45rem;font-weight:700;line-height:1.25;color:var(--text);font-variant-numeric:tabular-nums}
:root[data-theme] .ord-tile.buy strong{color:var(--pos)}
:root[data-theme] .ord-tile.sell strong{color:var(--neg)}
:root[data-theme] .ord-tile small{font-size:.78rem;color:var(--faint)}
:root[data-theme] .w-orders-panel .panel-heading h2{font-size:1.02rem;font-weight:700}
:root[data-theme] .w-orders-table tbody tr.chosen td{background:var(--accent-soft)}
:root[data-theme] .w-orders-table td strong{display:block;font-weight:600;color:var(--text)}
:root[data-theme] .w-orders-table td small{color:var(--faint)}
:root[data-theme] .w-orders-table td:nth-child(n+4){text-align:right}
:root[data-theme] .w-orders-table th:nth-child(n+4){text-align:right}
:root[data-theme] .w-orders-table td:nth-child(9){font-weight:700}
@media (max-width:800px){
 /* A card per order: the side, symbol and P/L on top, then three columns of label and value (spec 4). */
 :root[data-theme] .ord-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 :root[data-theme] .ord-tile{padding:14px 16px}
 :root[data-theme] .ord-tile strong{font-size:1.3rem}
 /* The panel's title and the data time share its head (6.03); the time drops under the title only when it cannot fit. */
 :root[data-theme] .w-orders-panel .panel-heading{flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 10px}
 :root[data-theme] .w-orders-panel .panel-heading h2{white-space:nowrap}
 :root[data-theme] .w-orders-panel .panel-heading .hint{font-size:.76rem}
 :root[data-theme] .w-orders-table tbody tr{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:"side sym sym sym pl pl" "lot lot open open cur cur" "sl sl swap swap tk tk" "time time time time time time";
   gap:10px 12px;padding:14px;margin:0 0 10px;border:1px solid var(--line);border-radius:14px;background:var(--well)}
 :root[data-theme] .w-orders-table tbody td{display:block;padding:0;border:0;text-align:left;font-size:.9rem;color:var(--text)}
 :root[data-theme] .w-orders-table tbody td:nth-child(n){display:block;grid-row:auto;grid-column:auto;font-size:.9rem;font-weight:500;color:var(--text);text-align:left}
 :root[data-theme] .w-orders-table tbody td:nth-child(3){grid-area:side;align-self:center}
 :root[data-theme] .w-orders-table tbody td:nth-child(2){grid-area:sym;align-self:center;font-weight:700}
 :root[data-theme] .w-orders-table tbody td:nth-child(9){grid-area:pl;text-align:right;font-size:1.05rem;font-weight:700}
 :root[data-theme] .w-orders-table tbody td:nth-child(9).gain{color:var(--pos)}:root[data-theme] .w-orders-table tbody td:nth-child(9).loss{color:var(--neg)}
 :root[data-theme] .w-orders-table tbody td:nth-child(4){grid-area:lot}
 :root[data-theme] .w-orders-table tbody td:nth-child(5){grid-area:open}
 :root[data-theme] .w-orders-table tbody td:nth-child(6){grid-area:cur}
 :root[data-theme] .w-orders-table tbody td:nth-child(7){grid-area:sl}
 :root[data-theme] .w-orders-table tbody td:nth-child(8){grid-area:tp}
 :root[data-theme] .w-orders-table tbody td:nth-child(10){grid-area:swap}
 :root[data-theme] .w-orders-table tbody td:nth-child(10).loss{color:var(--neg)}
 /* The ticket is the third row's last figure and the open time the card's foot (6.03): the first cell's two parts
    are laid out as the card's own cells. */
 :root[data-theme] .w-orders-table tbody td:nth-child(1):not([colspan]){display:contents}
 :root[data-theme] .w-orders-table tbody td:nth-child(1)>strong{grid-area:tk;display:block;font-size:.9rem;font-weight:600;color:var(--text)}
 :root[data-theme] .w-orders-table tbody td:nth-child(1)>strong:before{content:'Ticket';display:block;margin-bottom:2px;font-size:.76rem;font-weight:500;color:var(--faint)}
 :root[data-theme] .w-orders-table tbody td:nth-child(1)>small{grid-area:time;font-size:.82rem;color:var(--faint)}
 :root[data-theme] .w-orders-table tbody td:nth-child(1)>small:before{content:'เปิด '}
 :root[lang=en][data-theme] .w-orders-table tbody td:nth-child(1)>small:before{content:'Opened '}
 /* SL and TP as one figure: falcon-spec.js writes it; the TP cell then steps aside. */
 :root[data-theme] .w-orders-table tbody td:nth-child(7)[data-fx-sltp]{font-size:0}
 :root[data-theme] .w-orders-table tbody td:nth-child(7)[data-fx-sltp]:before{content:'SL / TP'}
 :root[data-theme] .w-orders-table tbody td:nth-child(7)[data-fx-sltp]:after{content:attr(data-fx-sltp);font-size:.9rem}
 :root[data-theme] .w-orders-table tbody td:nth-child(7)[data-fx-none]:after{color:var(--muted)}
 :root[data-theme] .w-orders-table tbody tr:has(>td:nth-child(7)[data-fx-sltp])>td:nth-child(8){display:none}
 :root[data-theme] .w-orders-table tbody td:is(:nth-child(4),:nth-child(5),:nth-child(6),:nth-child(7),:nth-child(8),:nth-child(10)):before{
   content:attr(data-mobile-label);display:block;margin-bottom:2px;font-size:.76rem;font-weight:500;color:var(--faint)}
 :root[data-theme] .w-orders-table tbody td[colspan]{grid-column:1/-1}
}

/* ---------- 07 choose an EA */
/* A family is one card: its head, then its sets (the head and the row are siblings drawn as one card). */
:root[data-theme] #page-catalog .w-catalog{background:transparent;border:0;box-shadow:none;padding:0}
:root[data-theme] .w-ea-system{display:flex;align-items:flex-start;gap:14px;margin:0;padding:20px 22px 14px;background:var(--surface);
  border:1px solid var(--line);border-bottom:0;border-radius:var(--card-r) var(--card-r) 0 0;box-shadow:var(--shadow)}
:root[data-theme] .w-ea-system{position:relative;padding-left:76px}
:root[data-theme] .w-ea-system:before{content:'';position:absolute;left:22px;top:20px;width:40px;height:40px;border-radius:50%;background:var(--ember);-webkit-mask:none;mask:none}
:root[data-theme] .w-ea-system:after{content:'';position:absolute;left:32px;top:30px;width:20px;height:20px;background:var(--on-ember);
  -webkit-mask:var(--i-cpu) center/contain no-repeat;mask:var(--i-cpu) center/contain no-repeat}
:root[data-theme] .w-ea-system>div{flex:1;min-width:0}
:root[data-theme] .w-ea-system strong{font-size:1.02rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-ea-system small{color:var(--muted)}
:root[data-theme] .w-ea-system .w-ea-methods{color:var(--accent-text);font-weight:600}
:root[data-theme] .w-ea-system>span:last-child{flex:none;min-height:24px;padding:0 10px;display:inline-grid;place-items:center;border-radius:6px;
  background:var(--surface-2);color:var(--muted);font-size:.78rem;font-weight:700}
:root[data-theme] .w-ea-system+.w-ea-row{padding:6px 22px 22px;margin:0 0 20px;background:var(--surface);border:1px solid var(--line);border-top:0;
  border-radius:0 0 var(--card-r) var(--card-r);box-shadow:var(--shadow)}
/* An EA card: the cover picture alone at the top, then the name with its risk at the right, the tagline, three
   wells of highlights, who it suits, the symbol line and the button, all feet on one line (spec 6.07). */
:root[data-theme] .w-ea2{display:flex;flex-direction:column;background:var(--well);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:none}
:root[data-theme] .w-ea2.on,:root[data-theme] .w-ea2[aria-checked=true]{border:2px solid var(--ember)}
:root[data-theme] .w-ea2 .w-ea-art{height:auto;min-height:0;padding:0;background:transparent}
:root[data-theme] .w-ea2 .w-ea-art:after{content:none;display:none}
:root[data-theme] .w-ea2 .w-ea-art img{position:static;display:block;width:100%;height:150px;object-fit:cover}
:root[data-theme] .w-ea2 .w-ea-head{position:static;max-width:none;padding:14px 16px 0;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:start}
:root[data-theme] .w-ea2 .w-ea-chip{display:none}
:root[data-theme] .w-ea2 .w-ea-name{grid-column:1;margin:0;display:flex;flex-wrap:wrap;gap:0 6px}
:root[data-theme] .w-ea2 .w-ea-name1,:root[data-theme] .w-ea2 .w-ea-name2{font-size:1.02rem;font-weight:700;line-height:1.35;color:var(--text);text-shadow:none}
:root[data-theme] .w-ea2 .w-ea-riskart{grid-column:2;grid-row:1;margin:0;box-shadow:none}
:root[data-theme] .w-ea2 .w-ea-line{grid-column:1/-1;margin-top:4px;font-size:.86rem;font-weight:400;color:var(--muted);text-shadow:none}
:root[data-theme] .w-ea2 .w-ea-badge{top:10px;right:10px;left:auto}
:root[data-theme] .w-ea2 .w-ea-body{flex:1;display:flex;flex-direction:column;gap:12px;padding:12px 16px 16px}
:root[data-theme] .w-ea2 .w-ea-hl li{flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:6px;padding:10px 6px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--well-r);color:var(--muted);font-size:.76rem}
:root[data-theme] .w-ea2 .w-ea-hl .wi{color:var(--accent-text)}
:root[data-theme] .w-ea-fit h4{color:var(--faint);font-size:.78rem;font-weight:600}
:root[data-theme] .w-ea-fit h4:after{background:var(--line)}
:root[data-theme] .w-ea-fit li{color:var(--text)}
:root[data-theme] .w-ea-fit li:before{background-color:var(--ember);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306140b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
:root[data-theme] .w-ea2 .w-ea-meta{margin-top:auto;color:var(--faint);font-size:.8rem}
:root[data-theme] .w-ea2 .w-ea-state{background:transparent;color:var(--faint);padding:0}
:root[data-theme] .w-ea2 .w-ea-state.ready{color:var(--accent-text)}
:root[data-theme] .w-ea2 .w-ea-go{min-height:42px;border-radius:var(--btn-r);background:transparent;color:var(--text);border:1px solid var(--line-strong);font-size:.92rem;font-weight:600}
:root[data-theme] .w-ea2.on .w-ea-go,:root[data-theme] .w-ea2[aria-checked=true] .w-ea-go{background:var(--ember);border-color:var(--ember);color:var(--on-ember)}
/* The steps at the right of the head: numbered circles, the current one green. */
:root[data-theme] .w-ea-steps li{background:transparent;color:var(--muted);font-size:.86rem}
:root[data-theme] .w-ea-steps li:before{background:var(--surface-2);color:var(--muted);border-radius:50%}
:root[data-theme] .w-ea-steps li:first-child:before{background:var(--ember);color:var(--on-ember)}
/* The perks strip and the set's detail and setup. */
:root[data-theme] .w-ea-perks{background:var(--surface);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow);padding:16px 20px}
:root[data-theme] .w-ea-perks>span{color:var(--text)}
:root[data-theme] .w-ea-perks>span:before{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-ea-perks em{color:var(--accent-text)}
:root[data-theme] .w-mode{border-radius:var(--well-r);border:1px solid var(--line-strong);background:transparent}
:root[data-theme] .w-mode:has(input:checked){border-color:var(--accent-line);background:var(--accent-soft)}
:root[data-theme] .w-summary{background:var(--well);border:1px solid var(--line);border-radius:var(--well-r)}
@media (min-width:801px){
 :root[data-theme] .w-ea-system+.w-ea-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;overflow:visible}
 :root[data-theme] .w-ea-system+.w-ea-row>.w-ea2{width:auto;min-width:0}
}
@media (min-width:801px) and (max-width:1199px){:root[data-theme] .w-ea-system+.w-ea-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:800px){
 /* One column on a phone (spec 6.07): no swiping, so the dots go; each card's own button chooses it. */
 :root[data-theme] .w-ea-row,:root[data-theme] .w-ea-row:has(.w-ea2){display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:1fr;gap:12px;overflow:visible;scroll-snap-type:none;padding-bottom:0}
 :root[data-theme] .w-ea-system+.w-ea-row{padding:6px 14px 14px}
 :root[data-theme] .w-ea-system{padding:16px 14px 12px 68px}
 :root[data-theme] .w-ea-system:before{left:14px;top:16px}:root[data-theme] .w-ea-system:after{left:24px;top:26px}
 :root[data-theme] .w-ea-row>.w-ea2{width:auto;min-width:0;max-width:none;flex:none;scroll-snap-align:none}
 :root[data-theme] #ea-dots{display:none}
 /* The shared phone sheet hid each card's button and the filter chips (one swiped card at a time); here the cards stack. */
 :root[data-theme] #page-catalog .w-ea-card .w-ea-go{display:flex!important}
 :root[data-theme] #page-catalog .w-ea-filters{display:flex!important;flex-wrap:wrap}
}

/* ---------- 15-17 sign in, sign up and their sub-pages */
/* The brand side is #172125 in both modes, its right edge cut on the slant; the form sits in a card at the right. */
:root[data-theme] .auth-layout{background:var(--bg)}
:root[data-theme] .auth-bar{background:transparent;border:0;box-shadow:none}
:root[data-theme] .auth-story{background:#172125;color:#EEF3F4}
:root[data-theme] .auth-story h1{color:#EEF3F4;font-weight:700;line-height:1.25}
:root[data-theme] .auth-story p{color:#A3B3B8}
:root[data-theme] .auth-story .fx-word>span{color:#EEF3F4}
:root[data-theme] .auth-story .managed-note,:root[data-theme] .auth-story .auth-foot{background:#1D2A2F;border:1px solid rgba(255,255,255,.08);border-radius:var(--card-r);color:#EEF3F4;box-shadow:none}
:root[data-theme] .auth-story .managed-note p,:root[data-theme] .auth-story .auth-foot{color:#A3B3B8}
:root[data-theme] .auth-story .managed-note>span{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--ember);color:var(--on-ember)}
:root[data-theme] .auth-story .w-risk-line{color:#7D8F95}
:root[data-theme] .w-auth-split{background:var(--surface);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow);padding:28px 26px;max-width:460px}
:root[data-theme] .w-auth-split>h2{font-size:1.35rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-auth-split>h2+p{color:var(--muted)}
:root[data-theme] .w-auth-body input:not([type=checkbox]):not([type=radio]){min-height:48px}
:root[data-theme] .w-soft-button{min-height:44px;border-radius:var(--btn-r);background:transparent;border:1px solid var(--line);color:var(--text);box-shadow:none}
:root[data-theme] .w-soft-button:hover{background:var(--surface-2)}
:root[data-theme] .fx-google-wrap .secondary,:root[data-theme] .fx-google-btn{border-radius:var(--btn-r)}
:root[data-theme] .w-auth-body .text-button{color:var(--accent-text)}
:root[data-theme] .w-otp-row span{border-radius:var(--btn-r);border:1px solid var(--line-strong);background:var(--surface)}
:root[data-theme] .w-otp-row span.on{border-color:var(--ember)}
@media (min-width:801px){
 :root[data-theme] .auth-story{clip-path:polygon(0 0,100% 0,92% 100%,0 100%);padding-right:8%}
 :root[data-theme] .auth-story h1{font-size:2.2rem}
}
@media (min-width:1100px){:root[data-theme] .auth-story h1{white-space:nowrap}}
@media (max-width:800px){
 /* The brand side above the form, cut on the slant at its foot; the bar above it on the same colour. */
 :root[data-theme] .auth-bar{background:#172125}
 :root[data-theme] .auth-bar .fx-word>span{color:#EEF3F4}
 :root[data-theme] .auth-story{display:block;clip-path:polygon(0 0,100% 0,100% 88%,0 100%);padding:8px 18px 44px}
 :root[data-theme] .auth-story>.w-brand,:root[data-theme] .auth-story .fx-cards{display:none}
 :root[data-theme] .auth-story h1{font-size:1.45rem;margin:0 0 6px}
 :root[data-theme] .auth-story p{font-size:.9rem;margin:0}
 :root[data-theme] .auth-story .w-risk-line{display:block;margin-top:10px;font-size:.76rem}
 :root[data-theme] .auth-main{margin-top:-18px;position:relative}
 :root[data-theme] .w-auth-split{max-width:none;padding:22px 18px}
}

:root[data-theme] .w-appbar:after{content:none;display:none}

/* ===================================================================== 5. overlays and the parts not drawn (spec 5.3) */
/* Visit mode: a light yellow box, a solid yellow eye circle, sign up (primary) and sign in (secondary) at the right. */
:root[data-theme] .w-visit-bar{position:relative;padding:16px 18px 16px 74px;border-radius:var(--well-r);background:var(--warn-soft);border:1px solid var(--warn-line);box-shadow:none;color:var(--text)}
:root[data-theme] .w-visit-bar:before{content:'';position:absolute;left:18px;top:50%;width:40px;height:40px;margin-top:-20px;border-radius:50%;background:var(--s-warn)}
:root[data-theme] .w-visit-bar:after{content:'';position:absolute;left:28px;top:50%;width:20px;height:20px;margin-top:-10px;background:var(--s-warn-ink);
  -webkit-mask:var(--i-eye) center/contain no-repeat;mask:var(--i-eye) center/contain no-repeat}
:root[data-theme] .w-visit-bar strong{color:var(--text)}
:root[data-theme] .w-visit-actions .secondary{background:transparent}
@media (max-width:800px){
 :root[data-theme] .w-visit-bar{padding:70px 16px 16px}
 :root[data-theme] .w-visit-bar:before{left:16px;top:16px;margin-top:0}:root[data-theme] .w-visit-bar:after{left:26px;top:26px;margin-top:0}
 :root[data-theme] .w-visit-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
}
/* Pop-ups and confirmations: surface, corner 18, the grey shadow, 24 px inside; the page under a dark veil. */
:root[data-theme] dialog:not(.w-popup){background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--card-r);box-shadow:var(--shadow);padding:24px;max-width:min(480px,calc(100vw - 24px))}
:root[data-theme] dialog:not(.w-popup):has(form),:root[data-theme] dialog.w-ea-sheet{max-width:min(640px,calc(100vw - 24px))}
:root[data-theme] dialog::backdrop{background:var(--overlay);-webkit-backdrop-filter:none;backdrop-filter:none}
:root[data-theme] dialog h2{font-size:1.1rem;font-weight:700;color:var(--text)}
:root[data-theme] dialog .icon-button,:root[data-theme] .w-ea-sheet-x,:root[data-theme] .w-popup-x{border-radius:var(--btn-r);border:1px solid var(--line-strong);background:var(--surface);color:var(--text)}
@media (max-width:800px){
 /* On a phone a pop-up rises from the bottom, full width, its buttons one under another. */
 :root[data-theme] dialog:not(.w-popup){margin:auto 0 0;width:100%;max-width:100%;border-radius:var(--card-r) var(--card-r) 0 0;border-bottom:0;max-height:calc(100dvh - 40px)}
 :root[data-theme] dialog:not(.w-popup) .primary,:root[data-theme] dialog:not(.w-popup) .secondary,:root[data-theme] dialog:not(.w-popup) .danger{width:100%}
}
/* Toasts: a small card, the grey shadow; on a phone above the bottom bar. */
:root[data-theme] #toast{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--well-r);box-shadow:var(--shadow);max-width:min(380px,calc(100vw - 32px))}
:root[data-theme] #toast.error{background:var(--surface);color:var(--neg);border-color:var(--neg-line)}
@media (min-width:801px){:root[data-theme] #toast{left:auto;right:24px;bottom:24px;transform:none}}
@media (max-width:800px){:root[data-theme] #toast{bottom:calc(96px + env(safe-area-inset-bottom))}}
/* Menus that drop down (the language menu and the like): surface, corner 12, rows of 40 px. */
:root[data-theme] .language-options,:root[data-theme] [role=menu],:root[data-theme] [role=listbox]{background:var(--surface);border:1px solid var(--line);border-radius:var(--well-r);box-shadow:var(--shadow);padding:6px}
:root[data-theme] .language-options>*,:root[data-theme] [role=menu]>*,:root[data-theme] [role=option]{min-height:40px;border-radius:var(--btn-r-sm);color:var(--text)}
:root[data-theme] .language-options>*:hover,:root[data-theme] [role=menu]>*:hover,:root[data-theme] [role=option]:hover{background:var(--surface-2)}
:root[data-theme] .language-options [aria-pressed=true],:root[data-theme] [role=option][aria-selected=true]{background:var(--accent-soft)}
/* Hints on hover: the dark chip in both modes. */
:root[data-theme] [role=tooltip],:root[data-theme] .w-tip{background:#10181B;color:#EEF3F4;font-size:.8rem;border-radius:var(--btn-r-sm);padding:6px 10px}
/* Loading: grey blocks rather than a spinner; a spinner is a grey ring with a green turn, no glow. */
:root[data-theme] .w-skeleton,:root[data-theme] .skeleton{background:var(--surface-2);border-radius:var(--well-r)}
:root[data-theme] .w-spinner,:root[data-theme] .spinner{border-color:var(--line-strong);border-top-color:var(--ember);box-shadow:none}
/* Form warnings: a red line and a small red line of words. */
:root[data-theme] .field-error,:root[data-theme] .w-field-error,:root[data-theme] .error-text{color:var(--neg);font-size:.8rem}
/* The full-screen chart, the EA sheet and the account sheets keep their layout in the theme's colours. */
:root[data-theme] .w-chart-full{background:var(--bg)}
:root[data-theme] .w-ea-sheet{background:var(--surface)}

/* ---------- placed as drawn (owner, 18 Oct 2026: "back to the design that was sent, its colours and places";
   falcon-spec.js does the few moves CSS cannot) */
/* Top bar (5.1): the solid green "EA ทำงาน N บัญชี" chip, the globe for the language, the member's initial in a
   green circle for the settings button. */
:root[data-theme] .topbar>.fx-running{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 12px;border-radius:8px;
  background:var(--s-run);color:var(--s-run-ink);font-size:.8rem;font-weight:700;white-space:nowrap;margin-left:auto}
:root[data-theme] .topbar>.fx-running:before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
:root[data-theme] .topbar>.fx-running[hidden]{display:none}
:root[data-theme] .language-menu>summary .language-flag{display:none}
:root[data-theme] .language-menu>summary{display:grid;place-items:center}
:root[data-theme] .language-menu>summary:before{content:'';width:20px;height:20px;background:currentColor;color:var(--muted);
  -webkit-mask:var(--i-globe) center/contain no-repeat;mask:var(--i-globe) center/contain no-repeat}
:root[data-theme] #topbar-settings[data-initial]:not([data-initial='']){border-radius:50%;border-color:transparent;background:var(--ember);color:var(--on-ember)}
:root[data-theme] #topbar-settings[data-initial]:not([data-initial='']):before{content:none;display:none}
:root[data-theme] #topbar-settings[data-initial]:not([data-initial='']):after{content:attr(data-initial);font-size:.95rem;font-weight:700;line-height:1}
/* Page head (4): "อัปเดตแล้วเมื่อ…" and the refresh button sit right of the title on a computer, under it on a phone;
   where the page has its own refresh button the update line drops its own icon, so one refresh shows. */
:root[data-theme] .page-heading>.fx-live{order:3}
:root[data-theme] .page-heading>.w-icon-btn{order:4}
:root[data-theme] .page-heading:has(>.w-icon-btn:is(.w-refresh,.i-refresh))>.fx-live .fx-live-icon{display:none}
/* The update line's own refresh: a 34 px framed button with the icon drawn inside (the icon's mask had hidden the frame). */
:root[data-theme] .page-heading>.fx-live .fx-live-icon{-webkit-mask:none;mask:none;background:transparent;color:var(--muted)}
:root[data-theme] .page-heading>.fx-live .fx-live-icon:before{content:'';width:18px;height:18px;background:currentColor;
  -webkit-mask:var(--i-refresh) center/contain no-repeat;mask:var(--i-refresh) center/contain no-repeat}
@media (min-width:801px){
 /* One row while there is room; at a middle width the buttons wrap under the title rather than squeeze it. */
 :root[data-theme] .page-heading:has(>.fx-live){flex-wrap:wrap;align-items:center}
 :root[data-theme] .page-heading:has(>.fx-live)>div:first-child{min-width:min(100%,360px)}
 :root[data-theme] .page-heading:has(>.fx-live):after{content:none;display:none}
 :root[data-theme] .page-heading>.fx-live{margin-left:auto}
 :root[data-theme] .page-heading>.fx-live+.w-icon-btn,:root[data-theme] .page-heading>.w-icon-btn{margin-left:0}
}
@media (max-width:800px){
 :root[data-theme] .topbar>.fx-running{display:none}
 :root[data-theme] .page-heading:has(>.fx-live)>.w-icon-btn{margin-left:0}
 /* The phone's header holds the app icon, the title, the theme button and the bell (5.2); the account picker
    is the content's first row. */
 :root[data-theme] .content>.account-context{display:flex;align-items:center;gap:10px;margin:0 0 14px}
 :root[data-theme] .content>.account-context label{flex:none;font-size:.8rem;font-weight:600;color:var(--muted)}
 :root[data-theme] .content>.account-context select{flex:1;min-width:0;min-height:42px}
}
/* Desktop top bar: the account picker's label inside its box, as drawn. */
@media (min-width:801px){
 :root[data-theme] .topbar>.account-context{position:relative}
 :root[data-theme] .topbar>.account-context label{position:absolute;left:14px;top:50%;transform:translateY(-50%);z-index:1;pointer-events:none;
   font-size:.76rem;font-weight:500;color:var(--faint)}
 :root[data-theme] .topbar>.account-context select{padding-left:84px;min-width:250px}
}
/* 01 overview: the unit small on every summary card; "USD" after the total; the day's change alone in its chip;
   the wells' figures in the gain or loss colour. */
:root[data-theme] .w-count-row strong .fx-unit{margin-left:4px;font-size:.78rem;font-weight:500;color:var(--faint)}
:root[data-theme] .w-port-value:after{content:'USD';margin-left:8px;font-size:.95rem;font-weight:600;color:var(--faint)}
:root[data-theme] .w-port-change:has(.fx-chg){gap:8px;padding:0;background:transparent;color:var(--text);font-size:.9rem;font-weight:500}
:root[data-theme] .w-port-change .fx-chg{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:6px;font-size:.78rem;font-weight:700;
  background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-port-change[data-tone=up] .fx-chg{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-port-change[data-tone=down] .fx-chg{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .w-period strong.gain{color:var(--pos)}
:root[data-theme] .w-period strong.loss{color:var(--neg)}
/* The two price tiles: name and price at the left, the day's % at the right. */
:root[data-theme] .w-sym{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;text-align:left}
:root[data-theme] .w-sym>.w-sym-top,:root[data-theme] .w-sym>.w-sym-price{grid-column:1}
:root[data-theme] .w-sym>.w-sym-chg{grid-column:2;grid-row:1/3;align-self:center;font-weight:700}
/* The chart's head: the pair and its name in words at the left, the time frames as tabs at the right. */
:root[data-theme] .w-chart-title{display:flex;align-items:center;gap:8px;min-width:0}
:root[data-theme] .w-chart-title .fx-pair{font-size:.86rem;font-weight:400;color:var(--muted);white-space:nowrap}
:root[data-theme] .w-chart-head{display:flex;align-items:center;gap:10px}
:root[data-theme] .w-chart-head>.w-chart-title{margin-right:auto}
:root[data-theme] .w-chart-head select.w-frame{display:none}
:root[data-theme] .fx-frames{display:inline-flex;gap:2px;padding:3px;border-radius:10px;background:var(--surface-2)}
:root[data-theme] .fx-frame{min-height:30px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:.82rem;font-weight:600;box-shadow:none}
:root[data-theme] .fx-frame[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
/* The next-news card's head carries the way to the calendar at its right. */
:root[data-theme] .w-next-head{display:flex;align-items:center;gap:10px;--fx-news:'ปฏิทินข่าว ›'}
:root[lang=en][data-theme] .w-next-head{--fx-news:'News calendar ›'}
:root[data-theme] .w-next-head:after{content:var(--fx-news);margin-left:auto;font-size:.86rem;font-weight:600;color:var(--accent-text)}
/* MT5 accounts: the add tile is the grid's last card; the foot holds "หยุดทุกคำสั่ง" left and the removed accounts right. */
:root[data-theme] #hub-rows>#hub-add.w-add{min-height:260px;height:100%;margin:0;border-radius:16px;--fx-add:'เชื่อมบัญชีเงินจริงของโบรกเกอร์ที่รองรับ'}
:root[lang=en][data-theme] #hub-rows>#hub-add.w-add{--fx-add:'Connect a real account at a supported broker'}
:root[data-theme] #hub-add.w-add{font-weight:700}
:root[data-theme] #hub-add.w-add:before{content:'+';display:grid;place-items:center;font-size:1.7rem;font-weight:500;line-height:1;color:var(--on-ember);width:56px;height:56px}
:root[data-theme] #hub-add.w-add:after{content:var(--fx-add);font-size:.84rem;font-weight:400;color:var(--muted)}
:root[data-theme] #hub-add.w-add .fx-add-plus{display:none}
:root[data-theme] .w-acct-block>.w-block-head>h2{display:flex;align-items:center;gap:10px}
:root[data-theme] .w-acct-block>.w-block-head>h2 .fx-count{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:6px;
  background:var(--surface-2);color:var(--muted);font-size:.76rem;font-weight:700}
:root[data-theme] .w-acct-block>.w-block-head>h2 .fx-count[hidden]{display:none}
:root[data-theme] .w-acct-block>.w-block-head>.text-button{color:var(--accent-text);font-weight:600}
:root[data-theme] .w-acct-block>.w-block-head>.text-button:after{content:' ›'}
:root[data-theme] .w-acct-block>.w-block-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:16px;border-top:1px solid var(--line)}
:root[data-theme] .w-acct-block>.w-block-actions>#hub-archived{width:auto;margin:0;padding:0 4px;color:var(--muted);font-weight:600}
:root[data-theme] .w-acct-block>.w-block-actions>#hub-archived:after{content:' ›';color:var(--muted)}
@media (max-width:800px){
 :root[data-theme] #hub-rows>#hub-add.w-add{min-height:170px}
 :root[data-theme] .w-acct-block>.w-block-actions{flex-direction:column;align-items:stretch}
 :root[data-theme] .w-acct-block>.w-block-actions>#hub-archived{align-self:flex-start}
}
/* The top bar (5.1): page name · account picker · (space) · EA chip · theme · language · bell · profile, whatever
   order the scripts that re-home these controls leave them in. */
@media (min-width:801px){
 :root[data-theme] .topbar>.account-context{order:1;margin-left:16px}
 :root[data-theme] .topbar>.fx-running{order:2}
 :root[data-theme] .topbar>.theme-switch{order:3}
 :root[data-theme] .topbar>.language-switch{order:4}
 :root[data-theme] .topbar>#topbar-bell{order:5}
 :root[data-theme] .topbar>#topbar-settings{order:6}
}
/* "วันนี้" beside the day's chip is a quiet word. */
:root[data-theme] .w-port-change .fx-chg-day{color:var(--muted)}
/* System status: a tick in the green circle while every EA runs, the warning sign when one needs a look. */
:root[data-theme] .w-mini-sys .w-mini-dot:after{width:20px;height:20px;border-radius:0;
  -webkit-mask:var(--i-checkcircle) center/contain no-repeat;mask:var(--i-checkcircle) center/contain no-repeat}
:root[data-theme] .w-mini-sys[data-tone=warn] .w-mini-dot:after{-webkit-mask-image:var(--i-alert);mask-image:var(--i-alert)}
:root[data-theme] .w-mini-sys[data-tone=idle] .w-mini-dot:after{-webkit-mask-image:var(--i-pause);mask-image:var(--i-pause)}
/* The chart's title is the pair alone (no coin before it); on a phone the time frames are a full-width row under it. */
:root[data-theme] .w-chart-title>.w-coin{display:none}
@media (max-width:800px){
 :root[data-theme] .w-chart-head{flex-wrap:wrap;row-gap:12px}
 :root[data-theme] .w-chart-head>.w-chart-title{order:1}
 :root[data-theme] .w-chart-head>.w-full{order:2}
 :root[data-theme] .w-chart-head>.fx-frames{order:3;flex:1 0 100%;display:flex}
 :root[data-theme] .w-chart-head>.fx-frames>.fx-frame{flex:1;padding:0 4px}
 :root[data-theme] .w-sym-top>.w-coin{display:none}
 /* A narrow tile: the % beside the pair's name, so a long price never runs into it. */
 :root[data-theme] .w-sym>.w-sym-chg{grid-row:1}
 :root[data-theme] .w-sym>.w-sym-price{grid-column:1/3}
 :root[data-theme] .w-home-duo .w-mini{padding:16px}
 :root[data-theme] .w-home-duo .w-mini strong{font-size:1.05rem}
}
/* Account card (6.01): the four figures on the card itself under a line, not in a box of their own; the three small
   buttons equally wide; the EA box's lot mode at its right (on a phone under the name). */
:root[data-theme] .w-acct2 .w-acct-facts{background:transparent;border-radius:0;padding:14px 0 0;border-top:1px solid var(--line)}
:root[data-theme] .w-acct2 .w-acct-facts b{color:var(--text)}
:root[data-theme] .w-acct2 .w-acct-sub{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:root[data-theme] .w-acct2 .w-acct-sub>button{min-width:0;padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root[data-theme] .w-acct2 .w-acct-ea>small{margin-left:auto}
@media (max-width:800px){
 :root[data-theme] .w-acct2 .w-acct-ea>small{flex-basis:100%;margin-left:0;padding-left:39px}
}
/* Menu icons as drawn: MT5 accounts a link, orders a page of lines, Choose EA a chip, prices candles, activity a
   pulse, notifications a bell (it had the chart's icon). */
:root[data-theme] .nav-item:is([data-page=connect],[data-page=positions],[data-page=catalog],[data-page=trade],[data-page=activity],[data-page=notifications])>span:first-child{
  background:currentColor;-webkit-mask:var(--fx-nav) center/20px 20px no-repeat;mask:var(--fx-nav) center/20px 20px no-repeat}
:root[data-theme] .nav-item:is([data-page=connect],[data-page=positions],[data-page=catalog],[data-page=trade],[data-page=activity],[data-page=notifications])>span:first-child>svg{display:none}
:root[data-theme] .nav-item[data-page=connect]{--fx-nav:var(--i-link)}
:root[data-theme] .nav-item[data-page=positions]{--fx-nav:var(--i-file)}
:root[data-theme] .nav-item[data-page=catalog]{--fx-nav:var(--i-cpu)}
:root[data-theme] .nav-item[data-page=trade]{--fx-nav:var(--i-candle)}
:root[data-theme] .nav-item[data-page=activity]{--fx-nav:var(--i-activity)}
:root[data-theme] .nav-item[data-page=notifications]{--fx-nav:var(--i-bell)}
/* 02 MT5 accounts: the head's right side reads update line · refresh · help · add (falcon-spec.js takes the help
   button out of the title); the tabs as the tab frame with count chips, the search beside them on a computer;
   the open-orders bar red while those orders are at a loss. */
:root[data-theme] .page-heading>.w-help-dot{order:5;width:42px;height:42px;margin:0;flex:none;display:grid;place-items:center;
  border-radius:var(--btn-r);border:1px solid var(--line-strong);background:transparent;color:var(--muted)}
:root[data-theme] .page-heading>.w-help-dot:before{width:20px;height:20px}
:root[data-theme] .page-heading>.w-help-dot:hover{background:var(--surface-2);color:var(--text)}
:root[data-theme] .page-heading>.w-head-add{order:6}
:root[data-theme] #accounts-chips{display:inline-flex;flex-wrap:nowrap;gap:4px;padding:4px;margin:0;border-radius:12px;background:var(--surface-2);max-width:100%;overflow-x:auto}
:root[data-theme] #accounts-chips>.w-chip{min-height:36px;padding:0 16px;border:0;border-radius:var(--btn-r-sm);background:transparent;color:var(--muted);box-shadow:none;font-weight:600;white-space:nowrap}
:root[data-theme] #accounts-chips>.w-chip[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
:root[data-theme] #accounts-chips>.w-chip b{background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] #accounts-chips>.w-chip[aria-pressed=true] b{background:var(--ember);color:var(--on-ember)}
@media (min-width:801px){
 :root[data-theme] #page-connect:not([hidden]){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-content:start}
 :root[data-theme] #page-connect>*{grid-column:1/-1}
 :root[data-theme] #page-connect>#accounts-chips{grid-column:1;align-self:center}
 :root[data-theme] #page-connect>.w-search-row{grid-column:2;align-self:center;margin:0}
}
@media (max-width:800px){
 :root[data-theme] #page-connect>#accounts-chips{display:flex;width:max-content;margin-bottom:12px}
 /* Under the title on a phone: the update line with its buttons right beside it, the add button at the row's end. */
 :root[data-theme] .page-heading:has(>.fx-live){justify-content:flex-start;column-gap:10px}
 :root[data-theme] .page-heading>.w-head-add{margin-left:auto}
}
:root[data-theme] .w-acct-orders>summary>strong{display:inline-flex;align-items:center;gap:8px}
:root[data-theme] .w-acct-orders>summary>strong:before{content:'';width:16px;height:16px;flex:none;background:currentColor;color:var(--muted);
  -webkit-mask:var(--i-file) center/contain no-repeat;mask:var(--i-file) center/contain no-repeat}
:root[data-theme] .w-acct-orders:has(>summary .fxc-sum.loss){border:1px solid var(--neg-line);background:var(--neg-soft)}
/* 03 orders: the two tabs as wide as their words, each count in a small chip (green on the chosen tab); the page's
   words stay in the buttons for screen readers and the language switch, the drawn label is the same words. */
:root[data-theme] #orders-tabs{display:inline-flex;width:max-content;max-width:100%}
:root[data-theme] #orders-tabs>button{flex:none;display:inline-flex;align-items:center;gap:8px;font-size:0}
:root[data-theme] #orders-tabs>button:before{content:var(--fx-tab);font-size:.9rem}
:root[data-theme] #orders-tabs>button[data-tab=open]{--fx-tab:'ออเดอร์ที่เปิด'}
:root[data-theme] #orders-tabs>button[data-tab=pending]{--fx-tab:'รอดำเนินการ'}
:root[lang=en][data-theme] #orders-tabs>button[data-tab=open]{--fx-tab:'Open orders'}
:root[lang=en][data-theme] #orders-tabs>button[data-tab=pending]{--fx-tab:'Pending'}
:root[data-theme] #orders-tabs>button>span{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:6px;
  font-size:.74rem;font-weight:700;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] #orders-tabs>button[aria-pressed=true]>span{background:var(--ember);color:var(--on-ember)}
:root[data-theme] #orders-stats .ord-tile strong .fx-unit{display:inline;margin-left:4px;font-size:.8rem;font-weight:600;color:var(--faint)}
/* SL and TP read at the left in the quiet colour when they are not set. */
:root[data-theme] .w-orders-table :is(td,th):is(:nth-child(7),:nth-child(8)){text-align:left}
:root[data-theme] .w-orders-table td[data-fx-unset]{color:var(--muted)}
/* The notes: a help sign before the panel's note, a lock before the page's. */
:root[data-theme] .w-orders-panel>p.hint,:root[data-theme] #page-positions>p.hint.w-center{display:flex;align-items:flex-start;gap:8px}
:root[data-theme] #page-positions>p.hint.w-center{justify-content:center}
:root[data-theme] .w-orders-panel>p.hint:before,:root[data-theme] #page-positions>p.hint.w-center:before{content:'';flex:none;width:16px;height:16px;margin-top:2px;
  background:currentColor;-webkit-mask:var(--i-help) center/contain no-repeat;mask:var(--i-help) center/contain no-repeat}
:root[data-theme] #page-positions>p.hint.w-center:before{-webkit-mask-image:var(--i-lock);mask-image:var(--i-lock)}
/* 04 backtest: the systems as cards (icon circle, name, way of trading, a round mark at the right; the chosen one
   with the green edge on the soft green), the set tabs as wide as their names with the downloads at their right,
   the test's facts in one strip, the six figures with a small icon beside their label, a bar per month. */
:root[data-theme] #backtest-systems{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;padding:0;margin:0 0 16px;background:transparent;border-radius:0}
:root[data-theme] #backtest-systems>button{display:grid;grid-template-columns:40px minmax(0,1fr) 20px;column-gap:14px;row-gap:2px;align-items:center;
  min-height:72px;padding:14px 18px;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);
  font-size:1rem;font-weight:700;box-shadow:none;white-space:normal}
/* The circle and the round mark are the card's background layers; the chip icon is drawn over the circle. */
:root[data-theme] #backtest-systems>button{--fx-ic:var(--muted);--fx-ring:var(--surface-2);
  background-image:radial-gradient(circle at center,transparent 0 7px,var(--line-strong) 7.5px 9px,transparent 9.5px),
    radial-gradient(circle at center,var(--fx-ring) 0 19.5px,transparent 20px);
  background-repeat:no-repeat;background-size:20px 20px,40px 40px;background-position:right 18px center,left 18px center}
:root[data-theme] #backtest-systems>button[aria-pressed=true]{--fx-ic:var(--on-ember);--fx-ring:var(--ember);border-color:var(--accent-line);background-color:var(--accent-soft);
  background-image:radial-gradient(circle at center,var(--ember) 0 4.5px,transparent 5px 6.5px,var(--ember) 7px 9px,transparent 9.5px),
    radial-gradient(circle at center,var(--fx-ring) 0 19.5px,transparent 20px)}
:root[data-theme] #backtest-systems>button:hover{border-color:var(--line-strong)}
:root[data-theme] #backtest-systems>button:before{content:'';grid-column:1;grid-row:1/3;width:40px;height:40px;background:var(--fx-ic);
  -webkit-mask:var(--i-cpu) center/20px 20px no-repeat;mask:var(--i-cpu) center/20px 20px no-repeat}
:root[data-theme] #backtest-systems>button:after{content:attr(data-fx-desc);grid-column:2;grid-row:2;font-size:.82rem;font-weight:400;color:var(--muted)}
:root[data-theme] #backtest-tabs{display:inline-flex;width:max-content;max-width:100%;overflow-x:auto}
:root[data-theme] #backtest-tabs>button{flex:none}
@media (min-width:801px){
 :root[data-theme] #page-backtest:not([hidden]){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-content:start}
 :root[data-theme] #page-backtest>*{grid-column:1/-1}
 :root[data-theme] #page-backtest>#backtest-tabs{grid-column:1;align-self:center}
 :root[data-theme] #page-backtest>.w-bt-dls{grid-column:2;justify-self:end;align-self:center}
}
:root[data-theme] #page-backtest>.w-bt-dls{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 4px}
:root[data-theme] #page-backtest>.w-bt-dls>.w-bt-dl{min-height:40px;padding:0 14px;gap:10px;border:1px solid var(--line-strong);border-radius:var(--btn-r);
  background:transparent;color:var(--text)}
:root[data-theme] #page-backtest>.w-bt-dls>.w-bt-dl:hover{background:var(--surface-2)}
:root[data-theme] #page-backtest>.w-bt-dls>.w-bt-dl strong{font-size:.86rem;font-weight:600}
:root[data-theme] #page-backtest>.w-bt-dls>.w-bt-dl strong:before{width:16px;height:16px;color:var(--muted)}
:root[data-theme] #page-backtest>.w-bt-dls>.w-bt-dl small{color:var(--faint);font-size:.76rem}
@media (max-width:800px){:root[data-theme] #page-backtest>#backtest-tabs{margin-bottom:12px}}
:root[data-theme] .w-bt-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0;margin-top:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}
:root[data-theme] .w-bt-facts>.w-bt-fact{padding:12px 16px;border:0;border-radius:0;background:transparent;box-shadow:inset 1px 0 0 var(--line)}
:root[data-theme] .w-bt-facts>.w-bt-fact:first-child{box-shadow:none}
:root[data-theme] .w-bt-facts>.w-bt-fact span{font-size:.74rem;color:var(--faint)}
:root[data-theme] .w-bt-facts>.w-bt-fact strong{font-size:.95rem;font-weight:700;color:var(--text)}
@media (max-width:800px){
 :root[data-theme] .w-bt-facts{grid-template-columns:1fr}
 :root[data-theme] .w-bt-facts>.w-bt-fact{box-shadow:inset 0 1px 0 var(--line)}
}
:root[data-theme] .w-bt-report>h3{display:flex;align-items:center;gap:12px}
:root[data-theme] .w-bt-report>h3:after{content:'Balance';margin-left:auto;padding-left:22px;font-size:.8rem;font-weight:500;color:var(--muted);
  background:linear-gradient(var(--ember),var(--ember)) left center/14px 3px no-repeat}
:root[data-theme] .w-bt-report>p.hint{display:flex;align-items:flex-start;gap:8px}
:root[data-theme] .w-bt-report>p.hint:before{content:'';flex:none;width:16px;height:16px;margin-top:2px;background:var(--warn);
  -webkit-mask:var(--i-alert) center/contain no-repeat;mask:var(--i-alert) center/contain no-repeat}
/* As many figures a row as fit whole (at 1024 px six in a row cut "+124,656" to "+124..."). */
:root[data-theme] .w-bt-grid{gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
:root[data-theme] .w-bt-tile{grid-template-columns:auto minmax(0,1fr);column-gap:8px;row-gap:6px;padding:14px 16px;background:var(--well);border:1px solid var(--line);border-radius:var(--well-r)}
:root[data-theme] .w-bt-tile .w-bt-ic,:root[data-theme] .w-bt-tile:nth-child(n) .w-bt-ic{width:16px;height:16px;border-radius:0;background:transparent;color:var(--muted)}
:root[data-theme] .w-bt-tile .w-bt-ic:before{width:16px;height:16px}
:root[data-theme] .w-bt-tile>span:not(.w-bt-ic){font-size:.82rem;color:var(--muted)}
:root[data-theme] .w-bt-tile strong{padding:0;font-size:1.2rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-bt-tile strong.up{color:var(--pos)}
:root[data-theme] .w-bt-tile strong.down,:root[data-theme] .w-bt-tile:nth-child(4) strong{color:var(--neg)}
@media (max-width:800px){:root[data-theme] .w-bt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
:root[data-theme] .w-bt-mrow{grid-template-columns:110px minmax(0,1fr) 130px 64px;gap:16px;padding:11px 0}
:root[data-theme] .w-bt-mrow+.w-bt-mrow{border-top:1px solid var(--line)}
:root[data-theme] .w-bt-mrow>span{color:var(--text)}
:root[data-theme] .w-bt-mrow strong{text-align:right;font-weight:700}
:root[data-theme] .w-bt-mrow strong.up{color:var(--pos)}
:root[data-theme] .w-bt-mrow strong.down{color:var(--neg)}
:root[data-theme] .w-bt-mrow small{color:var(--muted)}
:root[data-theme] .w-bt-mrow>.fx-bar{display:block;height:8px;border-radius:4px;background:var(--surface-2);overflow:hidden}
:root[data-theme] .w-bt-mrow>.fx-bar>b{display:block;height:100%;border-radius:4px;background:var(--ember)}
:root[data-theme] .w-bt-mrow>.fx-bar.loss>b{background:var(--neg)}
@media (max-width:800px){
 :root[data-theme] .w-bt-mrow{grid-template-columns:84px minmax(0,1fr) auto;gap:12px}
 :root[data-theme] .w-bt-mrow small{display:none}
}
/* The warning under the results: the warning box, its sign at the left and "อ่านเงื่อนไขทั้งหมด" at the right. */
:root[data-theme] .w-bt-warn{padding:14px 18px;border:1px solid var(--warn-line);border-radius:12px;background:var(--warn-soft);color:var(--text)}
:root[data-theme] .w-bt-warn>summary{display:flex;align-items:center;gap:12px;font-weight:700;cursor:pointer;list-style:none;--fx-more:'อ่านเงื่อนไขทั้งหมด'}
:root[lang=en][data-theme] .w-bt-warn>summary{--fx-more:'Read all the terms'}
:root[data-theme] .w-bt-warn>summary::-webkit-details-marker{display:none}
:root[data-theme] .w-bt-warn>summary:before{content:'';flex:none;width:20px;height:20px;background:var(--warn);
  -webkit-mask:var(--i-alert) center/contain no-repeat;mask:var(--i-alert) center/contain no-repeat}
:root[data-theme] .w-bt-warn>summary:after{content:var(--fx-more) ' ⌄';margin-left:auto;flex:none;font-size:.86rem;font-weight:600;color:var(--accent-text)}
:root[data-theme] .w-bt-warn[open]>summary:after{content:var(--fx-more) ' ⌃'}
:root[data-theme] .w-bt-warn ul{color:var(--muted)}
/* 05 history: the head's "ผล Backtest" after the update line with a chart sign; the filters in one row with the
   search button at its end (a phone: two columns); the details' head with a calendar sign at the left and the
   chevron at the right; "ความหมายของตัวเลข" a green link with the help sign; the pager's buttons at the two ends. */
:root[data-theme] .page-heading>.fx-backtest-link{order:5;display:inline-flex;align-items:center;gap:8px;min-height:40px}
:root[data-theme] .page-heading>.fx-backtest-link:before{content:'';width:16px;height:16px;background:currentColor;color:var(--muted);
  -webkit-mask:var(--i-chart) center/contain no-repeat;mask:var(--i-chart) center/contain no-repeat}
@media (min-width:801px){
 :root[data-theme] #deals-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:end}
 :root[data-theme] #deals-filter .settings-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 :root[data-theme] #deals-filter .w-search-btn{width:auto;margin:0;padding:0 26px}
}
:root[data-theme] #deals-filter .w-search-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px}
:root[data-theme] .hx-details>summary{color:var(--text)}
:root[data-theme] .hx-details>summary:before{-webkit-mask-image:var(--i-calendar);mask-image:var(--i-calendar);color:var(--muted);background:var(--muted);transform:none}
:root[data-theme] .hx-details[open]>summary:before{transform:none}
:root[data-theme] .hx-details>summary:after{content:'';margin-left:auto;width:16px;height:16px;background:var(--muted);transition:transform .15s;
  -webkit-mask:var(--i-chevrondown) center/contain no-repeat;mask:var(--i-chevrondown) center/contain no-repeat}
:root[data-theme] .hx-details[open]>summary:after{transform:rotate(180deg)}
:root[data-theme] .w-ledger-help>summary{display:flex;align-items:center;gap:6px;width:max-content;margin-left:auto;list-style:none;color:var(--accent-text);cursor:pointer}
:root[data-theme] .w-ledger-help>summary::-webkit-details-marker{display:none}
:root[data-theme] .w-ledger-help>summary:before{content:'';width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--i-help) center/contain no-repeat;mask:var(--i-help) center/contain no-repeat}
:root[data-theme] .w-ledger-help[open]{padding:10px 14px;border-radius:var(--well-r);background:var(--well)}
:root[data-theme] .w-ledger .w-pager{justify-content:flex-start;align-items:center;gap:12px;margin-top:12px}
:root[data-theme] .w-ledger .w-pager>button{flex:none;width:auto;min-height:36px;padding:0 14px}
:root[data-theme] .w-ledger .w-pager>#deals-page{color:var(--muted);font-size:.86rem}
:root[data-theme] .w-ledger .w-pager>#deals-next{margin-left:auto}
/* The four figures as four cards (label, then the figure large at the left; its unit small), not one strip. */
:root[data-theme] .hx-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
:root[data-theme] .hx-kpis>.hx-tile{align-items:flex-start;text-align:left;gap:6px;padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
:root[data-theme] .hx-kpis>.hx-tile+.hx-tile{border-left:1px solid var(--line)}
:root[data-theme] .hx-kpis>.hx-tile>span{font-size:.8rem;color:var(--muted)}
:root[data-theme] .hx-kpis>.hx-tile>strong{font-size:1.5rem;font-weight:700;color:var(--text)}
:root[data-theme] .hx-kpis>.hx-tile>strong.gain{color:var(--pos)}
:root[data-theme] .hx-kpis>.hx-tile>strong.loss{color:var(--neg)}
:root[data-theme] .hx-kpis>.hx-tile>strong .fx-unit{margin-left:4px;font-size:.8rem;font-weight:600;color:var(--faint)}
@media (max-width:800px){:root[data-theme] .hx-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
/* Average holding time: its figure at the head's right, the two bars spread down the card. */
:root[data-theme] .hx-hold{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:space-between;column-gap:12px;row-gap:14px}
:root[data-theme] .hx-hold>h3{grid-column:1;margin:0;align-self:center}
:root[data-theme] .hx-hold>.hx-big{grid-column:2;grid-row:1;align-self:center;font-size:1.3rem}
:root[data-theme] .hx-hold>:not(h3):not(.hx-big){grid-column:1/-1}
/* The monthly table's months as small boxes, the year's total at the right. */
@media (min-width:801px){
 :root[data-theme] .hx-monthly table{border-collapse:separate;border-spacing:6px}
 :root[data-theme] .hx-monthly td{padding:10px 4px;border:0;border-radius:8px;background:var(--well);text-align:center;color:var(--faint)}
 :root[data-theme] .hx-monthly td.cell{color:var(--text)}
 :root[data-theme] .hx-monthly td.total{background:transparent}
 :root[data-theme] .hx-monthly th{border:0;font-size:.76rem;font-weight:500;color:var(--faint)}
 :root[data-theme] .hx-monthly tbody th{color:var(--text);font-weight:700}
}
/* 06 news: the day, the currency and the impact in one row above the cards (the choices as tabs, falcon-spec.js);
   the guard window in the soft green box with the shield in a green circle; the day's news and the per-account
   guard as cards of their own; each news row: time, currency chip, the event, the EA's pause window, a solid chip. */
:root[data-theme] #news-panel{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:12px;text-align:left;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
:root[data-theme] #news-panel>*{flex:1 1 100%;margin:0}
:root[data-theme] #news-panel>.fxn-daynav,:root[data-theme] #news-panel>.fxn-selects{flex:0 1 auto}
:root[data-theme] #news-panel>.fxn-daynav{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 4px;border:1px solid var(--line-strong);border-radius:var(--btn-r);background:var(--surface)}
:root[data-theme] #news-panel .fxn-daynav strong{flex-direction:row;align-items:baseline;gap:8px;padding:0 6px;font-size:.95rem}
:root[data-theme] #news-panel .fxn-daynav strong:before{content:'';align-self:center;width:16px;height:16px;background:var(--muted);
  -webkit-mask:var(--i-calendar) center/contain no-repeat;mask:var(--i-calendar) center/contain no-repeat}
:root[data-theme] #news-panel .fxn-daynav small{color:var(--muted);font-weight:500}
:root[data-theme] #news-panel .fxn-step{width:32px;height:32px;border:0;border-radius:var(--btn-r-sm);background:transparent;color:var(--muted)}
:root[data-theme] #news-panel .fxn-step:hover:not(:disabled){background:var(--surface-2);color:var(--text)}
:root[data-theme] #news-panel>.fxn-selects{display:flex;flex-wrap:wrap;gap:12px}
:root[data-theme] #news-panel .fxn-selects label{display:block}
:root[data-theme] #news-panel .fxn-selects label:has(>.fxn-tabs)>span,:root[data-theme] #news-panel .fxn-selects label:has(>.fxn-tabs)>select{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:root[data-theme] .fxn-tabs{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:var(--surface-2)}
:root[data-theme] .fxn-tabs>button{min-height:36px;padding:0 16px;border:0;border-radius:var(--btn-r-sm);background:transparent;color:var(--muted);box-shadow:none;font-weight:600;white-space:nowrap}
:root[data-theme] .fxn-tabs>button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
/* The green circle is the box's own background layer; the shield is drawn over it. */
:root[data-theme] #news-panel>.fxn-warn{display:flex;align-items:center;gap:14px;padding:16px 18px;border:1px solid var(--accent-line);border-radius:14px;
  background:radial-gradient(circle,var(--ember) 0 19.5px,transparent 20px) left 18px center/40px 40px no-repeat,var(--accent-soft)}
:root[data-theme] #news-panel>.fxn-warn:before{width:40px;height:40px;margin:0;background:var(--on-ember);
  -webkit-mask:var(--i-shieldcheck) center/20px 20px no-repeat;mask:var(--i-shieldcheck) center/20px 20px no-repeat}
:root[data-theme] #news-panel>.fxn-warn strong{color:var(--text)}
:root[data-theme] #news-panel>.fxn-warn small{color:var(--muted)}
:root[data-theme] #news-panel>.fxn-table,:root[data-theme] #news-panel>.fxn-guard{padding:20px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);overflow:visible}
:root[data-theme] #news-panel>.fxn-table:before{content:attr(data-fx-title);display:block;margin-bottom:6px;font-size:1.02rem;font-weight:700;color:var(--text)}
:root[data-theme] #news-panel .fxn-headrow{position:absolute;right:22px;top:22px;display:block;padding:0;border:0;background:transparent}
:root[data-theme] #news-panel>.fxn-table{position:relative}
:root[data-theme] #news-panel .fxn-headrow>span{display:none}
:root[data-theme] #news-panel .fxn-headrow>span:first-child{display:inline;font-size:.78rem;font-weight:500;color:var(--faint)}
:root[data-theme] #news-panel .fxn-event{grid-template-columns:64px 64px minmax(0,1fr) auto auto;grid-template-rows:auto auto;column-gap:16px;row-gap:2px;padding:14px 4px;border-top:1px solid var(--line)}
:root[data-theme] #news-panel .fxn-event:nth-child(2){border-top:0}
:root[data-theme] #news-panel .fxn-time{grid-column:1;grid-row:1/3;font-size:1rem;color:var(--text)}
:root[data-theme] #news-panel .fxn-cur{grid-column:2;grid-row:1/3}
:root[data-theme] #news-panel .fxn-cur .fx-flag{display:none}
:root[data-theme] #news-panel .fxn-cur b{display:inline-grid;place-items:center;min-width:54px;height:26px;padding:0 8px;border-radius:6px;background:var(--surface-2);color:var(--text);font-size:.76rem;font-weight:700}
:root[data-theme] #news-panel .fxn-what{display:contents}
:root[data-theme] #news-panel .fxn-what>strong{grid-column:3;grid-row:1;font-size:.95rem;font-weight:700;color:var(--text)}
:root[data-theme] #news-panel .fxn-what>small{grid-column:3;grid-row:2;font-size:.8rem;color:var(--muted)}
:root[data-theme] #news-panel .fxn-guard-tag{grid-column:4;grid-row:1/3;align-self:center;padding:0;border-radius:0;background:transparent;color:var(--muted);font-size:.8rem;font-weight:500}
:root[data-theme] #news-panel .fxn-imp{grid-column:5;grid-row:1/3;justify-self:end}
:root[data-theme] #news-panel .fxn-imp .fxn-dot{display:none}
:root[data-theme] #news-panel .fxn-imp>span{display:inline-grid;place-items:center;min-height:24px;padding:0 10px;border-radius:6px;font-size:.76rem;font-weight:700;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] #news-panel .fxn-event[data-impact=high] .fxn-imp>span{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] #news-panel .fxn-event[data-impact=medium] .fxn-imp>span{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] #news-panel .fxn-guard h3{margin:0 0 6px;font-size:1.02rem;font-weight:700}
:root[data-theme] #news-panel .fxn-accounts{gap:0}
:root[data-theme] #news-panel .fxn-account{gap:14px;padding:14px 4px;border-radius:0;background:transparent;border-top:1px solid var(--line)}
:root[data-theme] #news-panel .fxn-account:first-child{border-top:0}
/* Each account's circle (the row's background layer): green with a play sign while its EA runs, grey with a pause
   sign while it is stopped. */
:root[data-theme] #news-panel .fxn-account{--fx-ring:var(--surface-2);--fx-ic:var(--muted);--fx-sign:var(--i-pause);
  background:radial-gradient(circle,var(--fx-ring) 0 17.5px,transparent 18px) left 4px center/36px 36px no-repeat}
:root[data-theme] #news-panel .fxn-account[data-fx-run='1']{--fx-ring:var(--ember);--fx-ic:var(--on-ember);--fx-sign:var(--i-play)}
:root[data-theme] #news-panel .fxn-account:before{content:'';flex:none;width:36px;height:36px;background:var(--fx-ic);
  -webkit-mask:var(--fx-sign) center/16px 16px no-repeat;mask:var(--fx-sign) center/16px 16px no-repeat}
:root[data-theme] #news-panel .fxn-foot{display:flex;align-items:flex-start;gap:10px;font-size:.8rem;color:var(--muted)}
:root[data-theme] #news-panel .fxn-foot:before{content:'';flex:none;width:16px;height:16px;margin-top:2px;background:currentColor;
  -webkit-mask:var(--i-globe) center/contain no-repeat;mask:var(--i-globe) center/contain no-repeat}
@media (max-width:800px){
 :root[data-theme] #news-panel .fxn-event{grid-template-columns:56px minmax(0,1fr) auto;column-gap:12px}
 :root[data-theme] #news-panel .fxn-cur,:root[data-theme] #news-panel .fxn-guard-tag{display:none}
 :root[data-theme] #news-panel .fxn-what>strong,:root[data-theme] #news-panel .fxn-what>small{grid-column:2}
 :root[data-theme] #news-panel .fxn-imp{grid-column:3}
}
/* 07 choose an EA: the three steps at the head's right (falcon-spec.js), the step on now in the green circle; the
   trading settings as boxes (lot mode two across, risk three across; the chosen one with the green edge on the soft
   green), and the summary as a box holding its rows, the "ใช้งาน EA นี้" button and the note under it. */
:root[data-theme] .page-heading>.fx-steps{order:6;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0;padding:0;list-style:none}
:root[data-theme] .fx-steps>li{display:flex;align-items:center;gap:8px;font-size:.86rem;font-weight:600;color:var(--muted);white-space:nowrap}
:root[data-theme] .fx-steps>li:before{content:attr(data-n);display:grid;place-items:center;width:24px;height:24px;border-radius:50%;
  background:var(--surface-2);color:var(--muted);font-size:.76rem;font-weight:700}
:root[data-theme] .fx-steps>li[aria-current]{color:var(--text)}
:root[data-theme] .fx-steps>li[aria-current]:before{background:var(--ember);color:var(--on-ember)}
/* The line between two steps is the later step's background. */
:root[data-theme] .fx-steps>li+li{padding-left:44px;background:linear-gradient(var(--line-strong),var(--line-strong)) left 6px center/30px 1px no-repeat}
@media (max-width:800px){:root[data-theme] .page-heading>.fx-steps{flex:1 1 100%;flex-wrap:wrap;gap:6px}:root[data-theme] .fx-steps>li+li{padding-left:34px;background-size:22px 1px}}
:root[data-theme] .w-ea-setup{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr;column-gap:24px;align-items:start}
:root[data-theme] .w-ea-setup>h2{grid-column:1/-1;grid-row:1}
:root[data-theme] .w-ea-setup>.w-ea-setup-grid{display:contents}
:root[data-theme] .w-ea-setup-grid>div:first-child{grid-column:1;grid-row:2/6;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
:root[data-theme] .w-ea-setup-grid>div:first-child>h3{grid-column:1/-1;margin:0;font-size:.86rem;font-weight:700;color:var(--muted)}
:root[data-theme] .w-ea-setup-grid>div:first-child>fieldset{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-width:0;margin:10px 0 0;padding:0;border:0}
:root[data-theme] .w-ea-setup-grid>div:first-child>fieldset>legend{margin:0 0 12px;padding:0;font-size:.86rem;font-weight:700;color:var(--muted)}
:root[data-theme] .w-ea-setup .w-mode{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;row-gap:4px;align-items:center;align-content:start;margin:0;
  padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer}
:root[data-theme] .w-ea-setup .w-mode>input{margin:0}
:root[data-theme] .w-ea-setup .w-mode>span{font-weight:700;color:var(--text)}
:root[data-theme] .w-ea-setup .w-mode>small{grid-column:2;font-size:.78rem;color:var(--muted)}
:root[data-theme] .w-ea-setup .w-mode:has(>input:checked){border-color:var(--accent-line);background:var(--accent-soft)}
:root[data-theme] .w-ea-setup-grid>div:last-child{grid-column:2;grid-row:2;z-index:1;padding:18px 18px 0}
:root[data-theme] .w-ea-setup-grid>div:last-child>h3{margin:0 0 8px;font-size:.95rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-ea-setup .w-summary{display:grid;grid-template-columns:auto minmax(0,1fr);margin:0}
:root[data-theme] .w-ea-setup .w-summary>dt,:root[data-theme] .w-ea-setup .w-summary>dd{margin:0;padding:11px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
:root[data-theme] .w-ea-setup .w-summary>dt{color:var(--muted);font-weight:500}
:root[data-theme] .w-ea-setup .w-summary>dd{text-align:right;font-weight:700;color:var(--text)}
:root[data-theme] .w-ea-setup>#catalog-use{grid-column:2;grid-row:3;z-index:1;width:auto;margin:14px 18px 0}
:root[data-theme] .w-ea-setup>#catalog-note{grid-column:2;grid-row:4;z-index:1;margin:8px 18px 18px;text-align:center}
:root[data-theme] .w-ea-setup:after{content:'';grid-column:2;grid-row:2/5;align-self:stretch;border:1px solid var(--line);border-radius:14px;background:var(--well)}
@media (max-width:800px){
 :root[data-theme] .w-ea-setup{grid-template-columns:minmax(0,1fr);grid-template-rows:none}
 :root[data-theme] .w-ea-setup-grid>div:first-child{grid-column:1;grid-row:2;grid-template-columns:minmax(0,1fr)}
 :root[data-theme] .w-ea-setup-grid>div:first-child>fieldset{grid-template-columns:minmax(0,1fr)}
 :root[data-theme] .w-ea-setup-grid>div:last-child{grid-column:1;grid-row:3;margin-top:16px}
 :root[data-theme] .w-ea-setup>#catalog-use{grid-column:1;grid-row:4}
 :root[data-theme] .w-ea-setup>#catalog-note{grid-column:1;grid-row:5}
 :root[data-theme] .w-ea-setup:after{grid-column:1;grid-row:3/6;margin-top:16px}
}
/* 08 risk: each protection card with its icon in a solid circle (Guardian yellow, the EA's cap green), its state
   chip at the head's right (falcon-spec.js moves it there), the DD box with a bar against the cap; "เมื่อระบบป้องกัน
   หยุดการเทรด" across the page as four boxes in a row; "ตั้งค่าและควบคุม" across the page in two columns. */
:root[data-theme] .w-guard-ic{border-radius:50%;width:40px;height:40px}
:root[data-theme] .w-guard-ic:before{width:20px;height:20px;background:currentColor}
:root[data-theme] .w-guard.ea .w-guard-ic{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-guard-head>h2{flex:1;min-width:0}
:root[data-theme] .w-guard-head>.w-state{margin-left:auto}
:root[data-theme] .w-state{min-height:26px;padding:0 10px;border-radius:6px;font-size:.76rem;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .w-state[data-tone=ok]{background:var(--s-run);color:var(--s-run-ink)}
:root[data-theme] .w-state[data-tone=warn]{background:var(--s-warn);color:var(--s-warn-ink)}
:root[data-theme] .w-state[data-tone=bad]{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .w-guard-now{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:baseline;gap:10px;padding:16px;border:1px solid var(--line);border-radius:var(--well-r);background:var(--well)}
:root[data-theme] .w-guard-now>strong{font-size:1.3rem;font-weight:700;color:var(--text)}
:root[data-theme] .w-guard-now>.fx-capnote{grid-column:3;font-size:.78rem;color:var(--muted)}
:root[data-theme] .w-guard-now>.fx-ddbar{grid-column:1/-1;height:6px;border-radius:3px;background:var(--surface-2);overflow:hidden}
:root[data-theme] .w-guard-now>.fx-ddbar>b{display:block;height:100%;min-width:6px;border-radius:3px;background:var(--ember)}
:root[data-theme] .w-guard-now>.fx-ddbar.warn>b{background:var(--warn)}
:root[data-theme] .w-guard-now>.fx-ddbar.bad>b{background:var(--neg)}
@media (min-width:801px){
 :root[data-theme] .w-risk-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:16px}
 :root[data-theme] .w-risk-grid>.w-whenstop,:root[data-theme] .w-risk-grid>.w-risk-actions{grid-column:1/-1}
 :root[data-theme] .w-whenstop{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 :root[data-theme] .w-whenstop>h2{grid-column:1/-1}
 :root[data-theme] .w-whenstop>.w-stop-list{display:contents}
 :root[data-theme] .w-risk-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:8px;align-items:start}
 :root[data-theme] .w-risk-actions>h2{grid-column:1/-1}
 :root[data-theme] .w-risk-actions>#risk-edit{grid-column:1;grid-row:2}
 :root[data-theme] .w-risk-actions>#risk-edit+.hint{grid-column:1;grid-row:3;margin:0}
 :root[data-theme] .w-risk-actions>#risk-stop{grid-column:2;grid-row:2}
 :root[data-theme] .w-risk-actions>#risk-stop+.hint{grid-column:2;grid-row:3;margin:0}
}
:root[data-theme] .w-stop-list>li{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;min-height:120px;padding:16px;
  border:1px solid var(--line);border-radius:var(--well-r);background:var(--well);font-weight:600;color:var(--text)}
:root[data-theme] .w-stop-list>li>.wi{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);-webkit-mask:none;mask:none}
:root[data-theme] .w-stop-list>li>.wi:before{content:'';width:16px;height:16px;background:currentColor;-webkit-mask:var(--wi) center/contain no-repeat;mask:var(--wi) center/contain no-repeat}
:root[data-theme] .w-stop-list>li>.wi.i-stop{background:var(--s-neg);color:var(--s-neg-ink)}
:root[data-theme] .w-owner-box{justify-content:center;gap:10px;padding:16px;border:1px dashed var(--line-strong);border-radius:var(--well-r);background:transparent}
:root[data-theme] .w-risk-actions>:is(#risk-edit,#risk-stop){display:inline-flex;align-items:center;justify-content:center;gap:8px}
:root[data-theme] .w-risk-actions>:is(#risk-edit,#risk-stop):before{content:'';width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--i-gear) center/contain no-repeat;mask:var(--i-gear) center/contain no-repeat}
:root[data-theme] .w-risk-actions>#risk-stop:before{-webkit-mask-image:var(--i-pause);mask-image:var(--i-pause)}
@media (max-width:800px){:root[data-theme] .w-stop-list{gap:10px}:root[data-theme] .w-stop-list>li{min-height:0;flex-direction:row;align-items:center}}
/* 09 analytics: the period tabs as wide as their words with the account and symbol pickers at the row's right, each
   picker's label inside its box; the six figures at the left of their boxes, Max DD in red. */
:root[data-theme] #an-period{display:inline-flex;width:max-content;max-width:100%}
:root[data-theme] #an-period>button{flex:none}
:root[data-theme] #page-analytics>.w-filters{display:grid;grid-template-columns:repeat(2,minmax(0,200px));gap:10px;align-items:center;margin:0}
:root[data-theme] #page-analytics>.w-filters>label{grid-row:1;z-index:1;margin:0 0 0 14px;pointer-events:none;font-size:.76rem;font-weight:500;color:var(--faint)}
:root[data-theme] #page-analytics>.w-filters>select{grid-row:1;width:100%;min-height:42px;padding-left:76px}
:root[data-theme] #page-analytics>.w-filters>label:nth-of-type(1),:root[data-theme] #page-analytics>.w-filters>#an-account{grid-column:1}
:root[data-theme] #page-analytics>.w-filters>label:nth-of-type(2),:root[data-theme] #page-analytics>.w-filters>#an-symbol{grid-column:2}
@media (min-width:801px){
 :root[data-theme] #page-analytics:not([hidden]){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-content:start}
 :root[data-theme] #page-analytics>*{grid-column:1/-1}
 :root[data-theme] #page-analytics>#an-period{grid-column:1;align-self:center}
 :root[data-theme] #page-analytics>.w-filters{grid-column:2;justify-self:end;align-self:center}
}
@media (max-width:800px){:root[data-theme] #page-analytics>.w-filters{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}}
:root[data-theme] #an-stats>.w-stat{align-items:flex-start;text-align:left;padding:14px 16px}
:root[data-theme] #an-stats>.w-stat>span{font-size:.8rem;color:var(--muted)}
:root[data-theme] #an-stats>.w-stat>strong{font-size:1.3rem;font-weight:700}
:root[data-theme] #an-stats>.w-stat:nth-child(3)>strong{color:var(--neg)}
/* 10 trade: the chart card carries its own time-frame tabs, so the page's second row of them steps aside; the
   "not open for manual orders" note is a card with the lock in a yellow circle and its button at the right
   (under the words on a phone). */
:root[data-theme] #page-trade:has(#trade-chart-slot .fx-frames)>#trade-frames{display:none}
:root[data-theme] #page-trade>.w-trade-note{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px 22px;border:1px solid var(--line);border-radius:18px;
  background:radial-gradient(circle,var(--s-warn) 0 19.5px,transparent 20px) left 22px top 50%/40px 40px no-repeat,var(--surface);color:var(--text)}
:root[data-theme] #page-trade>.w-trade-note:before{width:40px;height:40px;margin:0;background:var(--s-warn-ink);
  -webkit-mask:var(--i-lock) center/18px 18px no-repeat;mask:var(--i-lock) center/18px 18px no-repeat}
:root[data-theme] #page-trade>.w-trade-note>div{flex:1 1 280px;min-width:0}
:root[data-theme] #page-trade>.w-trade-note strong{color:var(--text);font-size:1rem}
:root[data-theme] #page-trade>.w-trade-note span{display:block;color:var(--muted);font-size:.86rem}
:root[data-theme] #page-trade>.w-trade-note>button{flex:none;width:auto;margin:0 0 0 auto;display:inline-flex;align-items:center;gap:8px}
:root[data-theme] #page-trade>.w-trade-note>button:before{content:'';width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--i-file) center/contain no-repeat;mask:var(--i-file) center/contain no-repeat}
@media (max-width:800px){
 :root[data-theme] #page-trade>.w-trade-note{background-position:left 22px top 20px,0 0}
 :root[data-theme] #page-trade>.w-trade-note>button{flex:1 1 100%;margin:0;justify-content:center}
}
/* Selects drawn as tabs (falcon-spec.js): the select and its label stay for screen readers, out of view. */
:root[data-theme] .fx-seltabs{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:var(--surface-2)}
:root[data-theme] .fx-seltabs>button{min-height:36px;padding:0 16px;border:0;border-radius:var(--btn-r-sm);background:transparent;color:var(--muted);box-shadow:none;font-weight:600;white-space:nowrap}
:root[data-theme] .fx-seltabs>button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
:root[data-theme] .w-filters:has(>.fx-seltabs)>:is(label,select){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 11 activity: the kind tabs at the left and the level tabs at the right of one row; the note with a bell sign. */
:root[data-theme] #event-kind{display:inline-flex;width:max-content;max-width:100%;overflow-x:auto}
:root[data-theme] #event-kind>button{flex:none}
@media (min-width:801px){
 :root[data-theme] #page-activity:not([hidden]){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;align-content:start}
 :root[data-theme] #page-activity>*{grid-column:1/-1}
 :root[data-theme] #page-activity>#event-kind{grid-column:1;align-self:center}
 :root[data-theme] #page-activity>.w-filters{grid-column:2;justify-self:end;align-self:center;margin:0}
}
@media (max-width:800px){:root[data-theme] #page-activity>.w-filters{margin-top:12px;overflow-x:auto}}
:root[data-theme] #page-activity>p.hint{display:flex;align-items:center;gap:8px}
:root[data-theme] #page-activity>p.hint:before{content:'';flex:none;width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--i-bell) center/contain no-repeat;mask:var(--i-bell) center/contain no-repeat}
/* 12 notifications: the last-checked time after the subtitle; "ต้องตรวจสอบ" with its count chip and "ประวัติ" as tabs
   at the left, the level as tabs at the right; the list as a card; the preferences as two cards side by side. */
:root[data-theme] #page-notifications>.page-heading>div:first-child>p.muted{display:inline}
:root[data-theme] #page-notifications>.page-heading>div:first-child>#alerts-status{display:inline;margin:0;font-size:inherit;color:var(--muted)}
:root[data-theme] #page-notifications>.page-heading>div:first-child>#alerts-status:not(:empty):before{content:' · '}
:root[data-theme] .ntf-list{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;row-gap:16px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
:root[data-theme] .ntf-list>*{grid-column:1/-1}
:root[data-theme] .ntf-list>.w-seg{grid-column:1;display:inline-flex;width:max-content}
:root[data-theme] .ntf-list>.w-seg>button{flex:none;display:inline-flex;align-items:center;gap:8px;font-size:0}
:root[data-theme] .ntf-list>.w-seg>button:before{content:var(--fx-tab);font-size:.9rem}
:root[data-theme] .ntf-list>.w-seg>button[data-alert-tab=active]{--fx-tab:'ต้องตรวจสอบ'}
:root[data-theme] .ntf-list>.w-seg>button[data-alert-tab=resolved]{--fx-tab:'ประวัติ'}
:root[lang=en][data-theme] .ntf-list>.w-seg>button[data-alert-tab=active]{--fx-tab:'Needs a look'}
:root[lang=en][data-theme] .ntf-list>.w-seg>button[data-alert-tab=resolved]{--fx-tab:'History'}
:root[data-theme] .ntf-list>.w-seg>button>span{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:6px;
  font-size:.74rem;font-weight:700;background:var(--s-stop);color:var(--s-stop-ink)}
:root[data-theme] .ntf-list>.w-seg>button[aria-pressed=true]>span{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .ntf-list>#alerts-chips{grid-column:2;justify-self:end;align-self:center;display:inline-flex;gap:4px;padding:4px;margin:0;border-radius:12px;background:var(--surface-2)}
:root[data-theme] #alerts-chips>.w-chip{min-height:36px;padding:0 16px;border:0;border-radius:var(--btn-r-sm);background:transparent;color:var(--muted);box-shadow:none;font-weight:600}
:root[data-theme] #alerts-chips>.w-chip:before{display:none}
:root[data-theme] #alerts-chips>.w-chip[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.18)}
:root[data-theme] .ntf-list>#alerts-list{display:flex;flex-direction:column;gap:12px;padding:20px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
:root[data-theme] .ntf-list>p.hint{display:flex;align-items:center;gap:8px;margin:0}
:root[data-theme] .ntf-list>p.hint:before{content:'';flex:none;width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--i-help) center/contain no-repeat;mask:var(--i-help) center/contain no-repeat}
@media (max-width:800px){
 :root[data-theme] .ntf-list>#alerts-chips{grid-column:1/-1;justify-self:start}
}
:root[data-theme] .ntf-prefs:has(.fx-ntf-col){padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
:root[data-theme] #alerts-fields:has(>.fx-ntf-col){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;margin:0;padding:0;border:0;min-width:0}
:root[data-theme] .fx-ntf-col{display:flex;flex-direction:column;gap:12px;padding:20px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);min-width:0}
:root[data-theme] .fx-ntf-col>h2,:root[data-theme] .fx-ntf-col>h3{margin:0 0 4px;font-size:1.02rem;font-weight:700;color:var(--text)}
:root[data-theme] .fx-ntf-channels>.w-chan{padding:12px 0;border-bottom:1px solid var(--line)}
:root[data-theme] .fx-ntf-channels>.w-chan .w-chan-ic:not(.w-chan-line){width:40px;height:40px;border-radius:50%;background:var(--ember)}
:root[data-theme] .fx-ntf-channels>.w-chan .w-chan-ic:not(.w-chan-line):before{inset:10px;background:var(--on-ember)}
/* The lowest level as tabs across the card; "แจ้งเมื่อกลับมาปกติ" a framed row. */
:root[data-theme] .fx-ntf-kinds label:has(>.fx-seltabs)>select{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:root[data-theme] .fx-ntf-kinds .fx-seltabs{display:flex;width:100%;margin-top:6px}
:root[data-theme] .fx-ntf-kinds .fx-seltabs>button{flex:1}
:root[data-theme] .fx-ntf-kinds label.switch:has(#alerts-resolved){padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--well)}
:root[data-theme] .fx-ntf-kinds>button.primary{margin-top:4px}
@media (max-width:800px){:root[data-theme] #alerts-fields:has(>.fx-ntf-col){grid-template-columns:minmax(0,1fr)}}
/* 13 settings: the profile and the account's settings at the left, the shortcuts as one card at the right with its
   two group names; a phone reads profile → settings → shortcuts → sign out. */
:root[data-theme] .fx-set-main,:root[data-theme] .fx-set-menu{display:flex;flex-direction:column;gap:16px;min-width:0}
:root[data-theme] .fx-set-main>*,:root[data-theme] .fx-set-menu>*{margin:0}
:root[data-theme] .fx-set-menu{gap:4px;padding:18px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);align-self:start}
:root[data-theme] .fx-set-menu>.w-list{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
:root[data-theme] .fx-set-menu>.w-list:before{display:block;padding:4px 0 6px;font-size:.78rem;font-weight:500;color:var(--faint);content:'การใช้งาน'}
:root[data-theme] .fx-set-menu>.w-list+.w-list{margin-top:12px}
:root[data-theme] .fx-set-menu>.w-list+.w-list:before{content:'ช่วยเหลือและเอกสาร'}
:root[lang=en][data-theme] .fx-set-menu>.w-list:before{content:'Using the app'}
:root[lang=en][data-theme] .fx-set-menu>.w-list+.w-list:before{content:'Help and documents'}
:root[data-theme] .fx-set-menu .w-row>.wi{color:var(--accent-text)}
:root[data-theme] .fx-set-menu .w-row:not(.w-row-danger){color:var(--text)}
:root[data-theme] .fx-set-main>.w-set-foot{justify-content:center;gap:0;text-align:center}
:root[data-theme] .fx-set-main>.w-set-foot>span+span:before{content:' · '}
@media (min-width:801px){
 :root[data-theme] #page-settings:has(>.fx-set-main):not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;align-items:start}
 :root[data-theme] #page-settings:has(>.fx-set-main)>*{grid-column:1/-1}
 :root[data-theme] #page-settings>.fx-set-main{grid-column:1}
 :root[data-theme] #page-settings>.fx-set-menu{grid-column:2}
}
@media (max-width:800px){
 :root[data-theme] #page-settings:has(>.fx-set-main):not([hidden]){display:flex;flex-direction:column;gap:16px}
 :root[data-theme] #page-settings>.fx-set-main{display:contents}
 :root[data-theme] .fx-set-main>.w-profile{order:1}
 :root[data-theme] .fx-set-main>.w-list:first-of-type{order:2}
 :root[data-theme] #page-settings>.fx-set-menu{order:3}
 :root[data-theme] .fx-set-main>.w-list:last-of-type{order:4}
 :root[data-theme] .fx-set-main>.w-set-foot{order:5}
 :root[data-theme] #page-settings>.page-heading{order:0}
}
/* 14 help: the page as wide as the others; the five starting steps as five boxes in a row (two on a phone) with the
   number in a green circle; the questions in two columns of boxes; the contacts as three cards, each with its
   button (LINE's own green only on the LINE card); the system's state as boxes in a row. */
@media (min-width:801px){:root[data-theme] #page-help{max-width:none}}
:root[data-theme] .w-help-block{padding:20px 22px}
:root[data-theme] .w-help-block>h2{font-size:1.02rem;font-weight:700;margin:0 0 14px}
:root[data-theme] .w-help-block .w-help-ic{border-radius:50%}
:root[data-theme] .w-help-list{display:grid;gap:12px}
:root[data-theme] .w-help-block:first-of-type .w-help-list{grid-template-columns:repeat(5,minmax(0,1fr))}
:root[data-theme] .w-help-block:not(:first-of-type) .w-help-list{grid-template-columns:repeat(2,minmax(0,1fr))}
:root[data-theme] .w-help-item,:root[data-theme] .w-help-item+.w-help-item{border:1px solid var(--line);border-radius:var(--well-r);background:var(--well);min-width:0}
:root[data-theme] .w-help-item>summary{padding:12px 16px;font-weight:600}
:root[data-theme] .w-help-item>summary>.w-num{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:transparent;color:var(--accent-text);font-weight:700}
:root[data-theme] .w-help-block:first-of-type .w-help-item>summary{flex-direction:column;align-items:flex-start;gap:10px;padding:14px 16px}
:root[data-theme] .w-help-block:first-of-type .w-help-item>summary>.w-num{background:var(--ember);color:var(--on-ember)}
:root[data-theme] .w-help-block:first-of-type .w-help-item>summary:after{display:none}
:root[data-theme] .w-help-item>summary:after{-webkit-mask-image:var(--i-chevrondown);mask-image:var(--i-chevrondown)}
:root[data-theme] .w-help-item[open]>summary:after{transform:rotate(180deg)}
:root[data-theme] .w-help-body{padding:0 16px 14px}
@media (max-width:800px){
 :root[data-theme] .w-help-block:first-of-type .w-help-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 :root[data-theme] .w-help-block:not(:first-of-type) .w-help-list{grid-template-columns:minmax(0,1fr)}
}
:root[data-theme] .help-contact{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
:root[data-theme] .help-card{display:grid;grid-template-columns:minmax(0,1fr);justify-items:start;gap:10px;padding:16px;border:1px solid var(--line);border-radius:var(--well-r);background:var(--well);--fx-act:'ทัก LINE'}
:root[data-theme] .help-card.help-group{--fx-act:'เข้ากลุ่ม OpenChat'}
:root[data-theme] .help-card.help-mail{--fx-act:'ส่งอีเมล'}
:root[lang=en][data-theme] .help-card{--fx-act:'Chat on LINE'}
:root[lang=en][data-theme] .help-card.help-group{--fx-act:'Join the OpenChat'}
:root[lang=en][data-theme] .help-card.help-mail{--fx-act:'Send an email'}
:root[data-theme] .help-card .help-ic{border-radius:50%}
:root[data-theme] .help-card .help-txt strong{color:var(--text)}
:root[data-theme] .help-card:after{content:var(--fx-act);justify-self:stretch;display:grid;place-items:center;min-height:36px;border:1px solid var(--line-strong);
  border-radius:var(--btn-r-sm);color:var(--text);font-size:.86rem;font-weight:700}
:root[data-theme] .help-card.help-line:after{border-color:transparent;background:var(--line-green);color:var(--on-line)}
:root[data-theme] .help-status{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:10px;align-items:center}
:root[data-theme] .help-status>*{grid-column:1/-1}
:root[data-theme] .help-status>h2{grid-column:1;margin:0}
:root[data-theme] .help-status>.w-block-actions{grid-column:2;grid-row:1;display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;border:0;justify-content:flex-end}
:root[data-theme] #diagnostic-status:not(:empty){grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
:root[data-theme] #diagnostic-status .health-row{flex-direction:column;align-items:flex-start;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--well-r);background:var(--well)}
:root[data-theme] #diagnostic-status .health-row>span{font-size:.78rem;color:var(--muted)}
:root[data-theme] #diagnostic-status .health-row>strong{text-align:left;color:var(--text)}
@media (max-width:800px){:root[data-theme] .help-status>.w-block-actions{grid-column:1/-1;grid-row:auto;justify-content:flex-start}}
/* 15-17 sign in (6.15): on a computer the brand side runs to the top with its logo at the top-left (the bar above
   is laid over it, keeping only the language button), "ในที่เดียว" in the logo green on its own line, the two
   cards one above the other with their icons in solid green circles, the feature chips and the risk line at its
   foot (falcon-spec.js moves the chips there); the form card's links as a list with signs and chevrons. */
@media (min-width:801px){
 :root[data-theme] #auth-view.auth-layout{position:relative}
 :root[data-theme] #auth-view>.auth-bar{position:absolute;top:0;left:0;right:0;z-index:2;pointer-events:none;background:transparent}
 :root[data-theme] #auth-view>.auth-bar>*{pointer-events:auto}
 :root[data-theme] #auth-view>.auth-bar>.w-brand{visibility:hidden}
 :root[data-theme] #auth-view>.auth-story{grid-row:1/3;justify-content:flex-start;gap:22px;padding-top:40px;padding-bottom:40px}
 :root[data-theme] #auth-view>.auth-main{grid-row:1/3;align-self:center}
 :root[data-theme] .auth-story>.w-brand{margin-bottom:auto}
 :root[data-theme] .auth-story>.w-brand img{width:64px;height:auto}
 :root[data-theme] .auth-story>.w-brand .fx-word>span{font-size:22px}
 :root[data-theme] .auth-story .fx-cards{grid-template-columns:minmax(0,1fr);max-width:520px;margin-bottom:auto}
 :root[data-theme] .auth-story>.w-auth-feats{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;border:0;max-width:520px}
 :root[data-theme] .auth-story>.w-auth-feats>.w-auth-feat{display:inline-flex;flex-direction:row;align-items:center;gap:6px;min-height:34px;padding:0 12px;
   border-radius:8px;background:#1D2A2F;border:1px solid rgba(255,255,255,.08);color:#EEF3F4;font-size:.8rem;font-weight:700;text-align:left}
 :root[data-theme] .auth-story>.w-auth-feats>.w-auth-feat+.w-auth-feat{border-left:1px solid rgba(255,255,255,.08)}
 :root[data-theme] .auth-story>.w-auth-feats>.w-auth-feat:before{content:'';width:15px;height:15px;background:var(--ember);-webkit-mask:var(--wi) center/contain no-repeat;mask:var(--wi) center/contain no-repeat}
 :root[data-theme] .auth-story>.w-auth-feats>.w-auth-feat>span{display:inline}
}
@media (min-width:1100px){:root[data-theme] .auth-story h1{white-space:normal}}
:root[data-theme] .auth-story h1 .fx-accent{display:block;color:var(--ember);white-space:nowrap}
:root[data-theme] .auth-story .managed-note>span:before{background:var(--on-ember)}
:root[data-theme] .auth-story .auth-foot:after{border-radius:50%;width:40px;height:40px;background:var(--ember)}
:root[data-theme] .auth-story .auth-foot:before{left:26px;top:26px;background:var(--on-ember)}
:root[data-theme] .w-auth-body>:is(#to-register,#to-visit,#forgot-password){display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:40px;
  margin:0;padding:0 2px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--text);font-size:.9rem;font-weight:600;text-align:left}
:root[data-theme] .w-auth-body>#to-register{margin-top:8px;padding-top:12px;border-top:1px solid var(--line);min-height:52px}
:root[data-theme] .w-auth-body>:is(#to-register,#to-visit,#forgot-password):before{content:'';flex:none;width:16px;height:16px;background:var(--accent-text);
  -webkit-mask:var(--i-plus) center/contain no-repeat;mask:var(--i-plus) center/contain no-repeat}
:root[data-theme] .w-auth-body>#to-visit:before{-webkit-mask-image:var(--i-eye);mask-image:var(--i-eye)}
:root[data-theme] .w-auth-body>#forgot-password:before{-webkit-mask-image:var(--i-key);mask-image:var(--i-key)}
:root[data-theme] .w-auth-body>:is(#to-register,#to-visit,#forgot-password):after{content:'';flex:none;margin-left:auto;width:16px;height:16px;background:var(--muted);
  -webkit-mask:var(--i-chevron) center/contain no-repeat;mask:var(--i-chevron) center/contain no-repeat}
:root[data-theme] .w-auth-body>:is(#to-register,#to-visit,#forgot-password):hover{background:transparent;color:var(--accent-text)}
/* The phone's bottom bar: accounts a link, "เพิ่มเติม" the three lines (5.2). */
:root[data-theme] .mobile-nav>button[data-target=connect] .wi{--wi:var(--i-link)!important}
:root[data-theme] .mobile-nav>button[data-target=more] .wi{--wi:var(--i-menu)!important}
/* ---------- admin EA tools taken from FENIX (22 Oct 2026: 79f51ce, 1dbb2c6, bf2acbb, 0242091, c6ab25e, 1cde7ac),
   FENIX's fenix-v2.css rules in this theme's colours. */
/* The picture picker: the pictures already on the server, an upload, the chosen one looked at. */
:root[data-theme] .eaa-sheet label.eaa-pick-upload{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:48px;margin:4px 0 2px;cursor:pointer;font-size:14px;font-weight:600}
:root[data-theme] .eaa-pick-file{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
:root[data-theme] .eaa-gallery-title{margin:14px 0 6px;font-size:14px;font-weight:700;color:var(--w-text)}
:root[data-theme] .eaa-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:max-content;gap:8px;max-height:40vh;overflow-y:auto;padding:2px;margin-bottom:10px}
:root[data-theme] .eaa-tile{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:6px;min-width:0;min-height:0;height:auto;border-radius:12px;background:var(--w-surface2);border:1px solid var(--w-border);color:var(--w-text);cursor:pointer;text-align:left}
:root[data-theme] .eaa-tile img{display:block;width:100%;height:78px;flex:none;object-fit:cover;border-radius:8px}
:root[data-theme] .eaa-tile small{font-size:11px;line-height:1.3;color:var(--w-text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root[data-theme] .eaa-tile:is(.current,.fresh) small{color:var(--w-primary)}
:root[data-theme] .eaa-tile.chosen{border-color:var(--w-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--w-primary) 45%,transparent)}
:root[data-theme] :is(.eaa-gallery,.eaa-pick-upload)~.eaa-look{max-height:26vh;margin-top:10px}
:root[data-theme] .eaa-pick-about{margin:6px 0 0;text-align:center}
:root[data-theme] .eaa-pick-about:empty{display:none}
:root[data-theme] .eaa-pick-about.bad{color:var(--w-red)}
/* Deleting an EA or a set. */
:root[data-theme] .eaa-del{min-height:0;height:auto;padding:6px 12px;border-radius:999px;font-size:12.5px;font-weight:600;background:none;border:1px solid color-mix(in srgb,var(--w-red) 45%,transparent);color:var(--w-red);cursor:pointer}
:root[data-theme] .eaa-del:hover{background:color-mix(in srgb,var(--w-red) 12%,transparent)}
:root[data-theme] .eaa-del-system{align-self:start}
/* Who runs which EA and version: a tile per EA filters the list, which goes by EA or by member. */
:root[data-theme] .eaa-usage{display:grid;gap:12px;margin-top:12px}
:root[data-theme] .eaa-usage-head{display:grid;gap:6px}
:root[data-theme] .eaa-usage-title{margin:0;font-size:17px}
:root[data-theme] .eaa-usage-filter{display:flex;align-items:center;gap:8px;font-size:13px}
:root[data-theme] .eaa-usage-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-top:6px}
:root[data-theme] .eaa-usage-tile{display:grid;gap:2px;justify-items:start;text-align:left;min-height:0;height:auto;padding:10px 12px;border-radius:14px;background:var(--w-surface2);border:1px solid var(--w-border);color:var(--w-text);cursor:pointer}
:root[data-theme] .eaa-usage-tile.on{border-color:var(--w-primary);box-shadow:0 0 0 1px var(--w-primary) inset}
:root[data-theme] .eaa-usage-tname{font-size:12.5px;font-weight:700;color:var(--w-text2)}
:root[data-theme] .eaa-usage-tile strong{font-size:20px;line-height:1.2}
:root[data-theme] .eaa-usage-tile small{font-size:11.5px;color:var(--w-text2)}
:root[data-theme] .eaa-usage-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:8px}
:root[data-theme] .eaa-usage-tools input[type=search]{flex:1 1 240px;min-width:0}
:root[data-theme] .eaa-usage-by{display:inline-flex;gap:4px;padding:3px;border-radius:999px;border:1px solid var(--w-border)}
:root[data-theme] .eaa-usage-by-btn{min-height:0;height:auto;padding:5px 12px;border-radius:999px;font-size:12.5px;font-weight:600;background:none;border:0;color:var(--w-text2);cursor:pointer}
:root[data-theme] .eaa-usage-by-btn.on{background:var(--w-primary);color:var(--on-ember)}
:root[data-theme] .eaa-usage-group{display:grid;gap:6px;padding:12px;border-radius:16px;background:var(--w-surface2);border:1px solid var(--w-border)}
:root[data-theme] .eaa-usage-gtitle{margin:0 0 4px;font-size:14px;color:var(--w-text)}
:root[data-theme] .eaa-usage-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1.2fr) minmax(0,1fr);gap:10px;align-items:start;padding:10px 0;border-top:1px solid var(--w-border)}
:root[data-theme] .eaa-usage-row>div{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
:root[data-theme] .eaa-usage-row small{color:var(--w-text2);font-size:12px}
:root[data-theme] .eaa-usage-row.old{background:color-mix(in srgb,var(--w-amber) 8%,transparent);border-radius:10px;padding:10px 8px}
:root[data-theme] .eaa-usage-badge{justify-self:start;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:700}
:root[data-theme] .eaa-usage-badge.ok{color:var(--w-green);background:color-mix(in srgb,var(--w-green) 14%,transparent)}
:root[data-theme] .eaa-usage-badge.old{color:var(--w-amber);background:color-mix(in srgb,var(--w-amber) 16%,transparent)}
@media (max-width:760px){:root[data-theme] .eaa-usage-row{grid-template-columns:minmax(0,1fr)}}
/* The start sheet's balance note is a warning, never a stop (owner, 28 Oct 2026): amber, not red. */
:root[data-theme] .w-sub-note.warn{color:var(--w-amber);background:var(--w-amber-soft);border-color:var(--w-amber-border)}
/* A Backtest page's attached files (FENIX 91b090d): a picture as it is, an HTML page framed white as MT5 draws it, opened
   full screen from the link; on the admin page a row per file, its title editable. */
:root[data-theme] .w-bt-file img{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:10px}
:root[data-theme] .w-bt-frame{display:block;width:100%;height:75vh;min-height:420px;border:0;border-radius:10px;background:#fff}
:root[data-theme] .w-bt-open{display:inline-block;margin-top:10px;font-size:13px;font-weight:600;color:var(--w-primary);text-decoration:none}
:root[data-theme] .eaa-btfiles .hint{margin:8px 0}
:root[data-theme] .eaa-bt-list{display:grid;gap:8px;margin:8px 0}
:root[data-theme] .eaa-bt-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px;border-radius:12px;border:1px solid var(--w-border)}
:root[data-theme] .eaa-bt-thumb{width:64px;height:48px;border-radius:8px;object-fit:cover;flex:none;background:#fff}
:root[data-theme] .eaa-bt-html{display:grid;place-items:center;font-size:12px;font-weight:700;color:#333}
:root[data-theme] .eaa-bt-words{flex:1 1 200px;display:grid;gap:3px;min-width:0}
:root[data-theme] .eaa-bt-words input{width:100%}
/* ==== FALCON PRO brand block (falcon_brand.py) ==== */
.w-brand .fx-word em,.fx-brand .fx-word em{color:var(--ember);font-style:italic}
.w-brand .fx-word>span{font-style:italic;letter-spacing:.01em}
.w-ea-art img{object-position:50% 28%}
.w-ea-art{background:#0b1512}
.w-auth-feats{display:none}
@media (max-width:800px){.topbar .w-brand{gap:5px}.topbar .w-brand img{width:40px;height:24px}.topbar .fx-word>span{font-size:15px;letter-spacing:0}}
/* ==== end of FALCON PRO brand block ==== */
