:root {
    color-scheme: light;
    /* T709 Q350-B: the two grounds every page starts from, named once. Each mode's block points at them, and so do the
       sidebar mixes and the theme panels' defaults (a picked page or sidebar background must not move the other). */
    --fc-light-bg: #f4f7f8;
    --fc-light-surface: #ffffff;
    --fc-light-ink: #122632;
    --fc-dark-bg: #091519;
    --fc-dark-surface: #102126;
    --fc-dark-ink: #edf6f4;
    --fc-bg: var(--fc-light-bg);
    --fc-surface: var(--fc-light-surface);
    --fc-surface-soft: #eaf1f1;
    --fc-ink: var(--fc-light-ink);
    --fc-muted: #59707a;
    --fc-line: #d7e2e3;
    --fc-accent: #08747D;
    --fc-accent-strong: #08747D;
    --fc-accent-hover: #065B63;
    --fc-accent-ink: #ffffff;
    --fc-highlight: #c9f2e7;
    --fc-highlight-ink: #12584e;
    /* T709: FinCopy's success (a success alert, an "available" hint, a finished step), named apart from the brand so a
       member's picked Primary never moves it; success, error, warning and info stay FinCopy's. It is FinCopy's teal: the
       fill and its words, the strong text on a surface, and the tint with its ink. */
    --fc-success: #08747D;
    --fc-success-ink: #ffffff;
    --fc-success-strong: #08747D;
    --fc-success-tint: #c9f2e7;
    --fc-success-tint-ink: #12584e;
    --fc-warm: #edbb78;
    --fc-danger: #b6464d;
    --fc-num-plus: #2563eb;
    --fc-num-minus: #b91c1c;
    --fc-num-neutral: var(--fc-accent-strong);
    --fc-buy: #0b8a5c;
    --fc-sell: #c23e48;
    --fc-side-ink: #ffffff;
    /* T709: MetaTrader-style side headers; separate from trade/status fills. */
    --fc-side-buy-ink: #1d4ed8;
    --fc-side-buy-bg: #eef4ff;
    --fc-side-buy-bd: #c7d8fb;
    --fc-side-sell-ink: #be123c;
    --fc-side-sell-bg: #fff1f2;
    --fc-side-sell-bd: #fbcdd4;
    --fc-scrim: rgba(9, 21, 25, .48);
    --fc-shadow: 0 24px 70px color-mix(in srgb, var(--fc-ink) 12%, transparent);
    --fc-radius: 1.25rem;
    /* TP434 — FinQuest's filled call to action: the brand gradient and its soft glow (mem-tokens --grad, --btn-pri-glow). */
    --fc-grad: linear-gradient(135deg, var(--fc-accent), var(--fc-accent-hover));
    --fc-btn-glow: 0 6px 18px color-mix(in srgb, var(--fc-accent) 32%, transparent);
    /* TP434 Q286-A — FinGraph's signal pill, one fill per code in both themes (FinQuest mem-tokens --sig-*). The light fills
       (VSB, SB, N) carry dark ink, the rest white. */
    --fc-sig-vsb: #84cc16;
    --fc-sig-sb: #22c55e;
    --fc-sig-b: #15803d;
    --fc-sig-nb: #14532d;
    --fc-sig-n: #94a3b8;
    --fc-sig-ns: #7f1d1d;
    --fc-sig-s: #b91c1c;
    --fc-sig-ss: #dc2626;
    --fc-sig-vss: #ef4444;
    --fc-sig-ink: #ffffff;
    --fc-sig-ink-light: #0f172a;
    /* The member rail follows the theme: light here, dark under [data-theme="dark"] (operator, 2026-10-26; replaces
       T636 §6.1's rail that stayed dark in both themes). T709: each sidebar's background in this mode, by name, so the
       sidebar switch (fc-mem.css) and the theme panel read one value. */
    --fc-sidebar-light-bg: var(--fc-light-surface);
    --fc-sidebar-dark-bg: var(--fc-light-ink);
    --fc-rail: var(--fc-sidebar-light-bg);
    --fc-rail-edge: #d7e2e3;
    --fc-rail-raised: #eaf1f1;
    --fc-rail-ink: #2d4650;
    --fc-rail-strong: #122632;
    --fc-rail-grp: #5c757c;
    --fc-rail-mute: #59707a;
    --fc-rail-active: #08747D;
    --fc-rail-active-bg: linear-gradient(90deg, color-mix(in srgb, var(--fc-accent) 18%, transparent), color-mix(in srgb, var(--fc-accent) 4%, transparent));
    /* Real / Demo: the bright hue marks the rail's dots; a fill carries white ink, an ink sits on its own tint (4.5:1+). */
    --fc-real: #10a36f;
    --fc-demo: #e2862c;
    --fc-real-fill: #0b7a52;
    --fc-demo-fill: #a35a12;
    --fc-real-ink: #0b6b48;
    --fc-demo-ink: #8a4a0c;
    --fc-scope-ink: #ffffff;
    --fc-shadow-card: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
    --fc-line-soft: #e8eff0;
    --fc-mono: "SF Mono", ui-monospace, Consolas, monospace;
    --fc-progress: #9a6413;
    --fc-paused: #5f6f74;
    --fc-closed: #45585f;
    /* Status chips: a dark fill with light ink in both themes, one hue per value. */
    --fc-chip-active: #0b7a52;
    --fc-chip-problem: #a63a42;
    --fc-faint: #94a3b8;
    --fc-warn: #f59e0b;
    --fc-warn-ink: #92400e;
    /* one copy; values = FINQ xexitpaint.ts:34-53 */
    --fc-exit-off-fill: #ffffff;
    --fc-exit-off-edge: #cbd5e1;
    --fc-exit-tp-v-fill: rgba(59,130,246,.30);
    --fc-exit-tp-v-edge: #3b82f6;
    --fc-exit-tp-h-fill: #1d4ed8;
    --fc-exit-sl-v-fill: rgba(239,68,68,.30);
    --fc-exit-sl-v-edge: #ef4444;
    --fc-exit-sl-h-fill: #b91c1c;
    --fc-exit-ts-v-fill: rgba(16,185,129,.30);
    --fc-exit-ts-v-edge: #10b981;
    --fc-exit-ts-h-fill: #047857;
}

/* Dark mode, part 1: the sidebars. They follow the app mode and the sidebar switch only, never a picked page background. */
[data-theme="dark"], html[data-fc-theme="standard-dark"] {
    --fc-sidebar-light-bg: color-mix(in srgb, var(--fc-dark-ink) 94%, var(--fc-dark-surface));
    --fc-sidebar-dark-bg: #050e11;
    --fc-rail: var(--fc-sidebar-dark-bg);
    --fc-rail-edge: transparent;
    --fc-rail-raised: #0e1f24;
    --fc-rail-ink: #c4d5d7;
    --fc-rail-strong: #ffffff;
    --fc-rail-grp: #5e767b;
    --fc-rail-mute: #7c9396;
    --fc-rail-active: #3cc7d1;
    --fc-rail-active-bg: linear-gradient(90deg, color-mix(in srgb, var(--fc-accent) 58%, transparent), color-mix(in srgb, var(--fc-accent) 10%, transparent));
}

/* Dark mode, part 2: the page's surfaces and every ink on them. T709 Q350-B: the ink follows the page's ground, so this set
   holds on a dark ground: dark mode unless its picked page background is light, and light mode when its picked page
   background is dark (the theme panel sets data-fc-page-light / data-fc-page-dark to the pick's tone, by luminance). */
[data-theme="dark"]:not([data-fc-page-dark="light"]), html[data-fc-theme="standard-dark"]:not([data-fc-page-dark="light"]),
:root[data-theme="light"][data-fc-page-light="dark"], html[data-fc-theme="standard"][data-fc-page-light="dark"] {
    color-scheme: dark;
    --fc-bg: var(--fc-dark-bg);
    --fc-surface: var(--fc-dark-surface);
    --fc-surface-soft: #172d32;
    --fc-ink: var(--fc-dark-ink);
    --fc-muted: #a3b7b9;
    --fc-line: #294147;
    --fc-accent: #08747D;
    --fc-accent-strong: #7BE6EC;
    --fc-accent-hover: #065B63;
    --fc-accent-ink: #ffffff;
    --fc-highlight: #1c433d;
    --fc-highlight-ink: #c2f4e4;
    --fc-success-strong: #7BE6EC;
    --fc-success-tint: #1c433d;
    --fc-success-tint-ink: #c2f4e4;
    --fc-warm: #e8bd82;
    --fc-danger: #f28b8f;
    --fc-num-plus: #60a5fa;
    --fc-num-minus: #f87171;
    --fc-num-neutral: #7BE6EC;
    --fc-buy: #3fd29a;
    --fc-sell: #f2777f;
    --fc-side-ink: #08151a;
    --fc-side-buy-ink: #93c5fd;
    --fc-side-buy-bg: #0f1f3a;
    --fc-side-buy-bd: #1e3a66;
    --fc-side-sell-ink: #fda4af;
    --fc-side-sell-bg: #2a1118;
    --fc-side-sell-bd: #5f1d2b;
    --fc-scrim: rgba(0, 0, 0, .62);
    --fc-shadow: 0 24px 70px color-mix(in srgb, #000000 38%, transparent);
    --fc-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .34);
    --fc-line-soft: #1d3338;
    --fc-real-ink: #4fd6a0;
    --fc-demo-ink: #f5b067;
    --fc-progress: #946010;
    --fc-paused: #5f6f74;
    --fc-closed: #3e5158;
    --fc-faint: #7c8aa5;
    --fc-warn: #f59e0b;
    --fc-warn-ink: #fbbf24;
    --fc-exit-off-fill: #e2e8f0;
    --fc-exit-off-edge: #94a3b8;
    --fc-exit-tp-v-fill: rgba(96,165,250,.30);
    --fc-exit-tp-v-edge: #60a5fa;
    --fc-exit-tp-h-fill: #2563eb;
    --fc-exit-sl-v-fill: rgba(248,113,113,.30);
    --fc-exit-sl-v-edge: #f87171;
    --fc-exit-sl-h-fill: #dc2626;
    --fc-exit-ts-v-fill: rgba(52,211,153,.30);
    --fc-exit-ts-v-edge: #34d399;
    --fc-exit-ts-h-fill: #059669;
}

/* T709 Q350-B / Q351-A: a page background picked in the member's theme panel or the admin's Theme Config (kept in the
   browser). The page sets it on <html> as --fc-pick-page-light / --fc-pick-page-dark with data-fc-page-light /
   data-fc-page-dark naming its tone; nothing is set until someone picks, so these rules never touch the defaults above.
   The pick for the mode on screen is the page; cards, raised surfaces and lines are mixed from it, and the ink set above
   follows its tone. */
:root:is([data-theme="light"], [data-fc-theme="standard"])[data-fc-page-light] { --fc-page-pick: var(--fc-pick-page-light); }
:root:is([data-theme="dark"], [data-fc-theme="standard-dark"])[data-fc-page-dark] { --fc-page-pick: var(--fc-pick-page-dark); }
/* A light pick: cards lift toward white, raised surfaces and lines lean toward the ink. */
:root:is([data-theme="light"][data-fc-page-light="light"], [data-fc-theme="standard"][data-fc-page-light="light"],
         [data-theme="dark"][data-fc-page-dark="light"], [data-fc-theme="standard-dark"][data-fc-page-dark="light"]) {
    --fc-bg: var(--fc-page-pick);
    --fc-surface: color-mix(in srgb, var(--fc-light-surface) 72%, var(--fc-page-pick));
    --fc-surface-soft: color-mix(in srgb, var(--fc-ink) 6%, var(--fc-page-pick));
    --fc-line: color-mix(in srgb, var(--fc-ink) 15%, var(--fc-page-pick));
    --fc-line-soft: color-mix(in srgb, var(--fc-ink) 8%, var(--fc-page-pick));
}
/* A dark pick: every surface lifts toward the ink. */
:root:is([data-theme="light"][data-fc-page-light="dark"], [data-fc-theme="standard"][data-fc-page-light="dark"],
         [data-theme="dark"][data-fc-page-dark="dark"], [data-fc-theme="standard-dark"][data-fc-page-dark="dark"]) {
    --fc-bg: var(--fc-page-pick);
    --fc-surface: color-mix(in srgb, var(--fc-ink) 5%, var(--fc-page-pick));
    --fc-surface-soft: color-mix(in srgb, var(--fc-ink) 9%, var(--fc-page-pick));
    --fc-line: color-mix(in srgb, var(--fc-ink) 17%, var(--fc-page-pick));
    --fc-line-soft: color-mix(in srgb, var(--fc-ink) 11%, var(--fc-page-pick));
}

.fc-brand { display:flex; align-items:center; gap:.7rem; font-weight:800; letter-spacing:.01em; white-space:nowrap; }
.fc-mark { display:block; flex:0 0 auto; width:2rem; height:2rem; }
/* T678 §A.8: an icon is a block inside its button, and icon-only buttons centre it on both axes (FC.App and Blazor). */
.fc-icon,:is(button,.mem-ico,.fc-sheet-tile,.mem-aibot-modal-icon)>svg{display:block;flex:none}
:is(.fc-icon-btn,.mem-aibot-modal-close,.mem-aibot-modal-icon,.fc-sheet-tile,.mem-pager button,.fc-llm-picker__more,.mem-drawer-close,.mem-ract,.fc-ticon,.mem-viewtog button,.mem-shelfico,.mem-shelf-icon,.fc-app-drawer-close,.mem-ico,.mem-overview-empty-icon){display:inline-grid;place-items:center;padding:0;line-height:1}


.fc-error-page, .fc-error-boundary { box-sizing:border-box; width:min(100% - 2rem, 64rem); margin:2rem auto; padding:clamp(1.25rem, 4vw, 2.5rem); color:var(--fc-ink); background:var(--fc-surface); border:1px solid var(--fc-line); border-radius:var(--fc-radius); box-shadow:var(--fc-shadow); overflow-wrap:anywhere; }
.fc-error-empty-layout { min-height:100vh; padding:1px 0; color:var(--fc-ink); background:var(--fc-bg); }
.fc-error-eyebrow { color:var(--fc-accent-strong); font-size:.75rem; font-weight:800; letter-spacing:.14em; }
.fc-error-page h1, .fc-error-boundary h2 { margin:.5rem 0 1rem; color:var(--fc-ink); }
.fc-error-page h2 { margin-top:1.5rem; color:var(--fc-ink); }
.fc-error-lead, .fc-error-trace { color:var(--fc-muted); }
.fc-error-details { display:grid; grid-template-columns:minmax(7rem,auto) minmax(0,1fr); gap:.45rem 1rem; }
.fc-error-details dt { color:var(--fc-muted); font-weight:700; }
.fc-error-details dd { min-width:0; margin:0; }
.fc-error-page pre, .fc-error-boundary pre { max-height:50vh; overflow:auto; padding:1rem; color:var(--fc-ink); background:var(--fc-bg); border:1px solid var(--fc-line); border-radius:.75rem; white-space:pre-wrap; overflow-wrap:anywhere; }
.fc-error-link { display:inline-flex; margin-top:1rem; color:var(--fc-accent-strong); font-weight:700; }
.fc-error-boundary { margin:1rem 0; }
#blazor-error-ui { display:none; position:fixed; z-index:10000; right:1rem; bottom:1rem; left:1rem; padding:1rem 3.5rem 1rem 1rem; color:var(--fc-ink); background:var(--fc-surface); border:1px solid var(--fc-danger); border-radius:.75rem; box-shadow:var(--fc-shadow); }
#blazor-error-ui .reload { margin-left:.75rem; color:var(--fc-accent-strong); font-weight:700; }
#blazor-error-ui .dismiss { position:absolute; top:.7rem; right:1rem; color:var(--fc-muted); cursor:pointer; }

/* Status pills - one tinted family per meaning, the same in every FinCopy table and modal (BizSSO's coloured chips).
   The ink is the token itself; the fill and edge are tints of it, so each pill reads in light and dark. */
.fc-pill { --pill: var(--fc-muted); display:inline-flex; align-items:center; gap:.3rem; padding:.08rem .5rem; border:1px solid color-mix(in srgb, var(--pill) 38%, transparent); border-radius:999px; background:color-mix(in srgb, var(--pill) 13%, transparent); color:var(--pill); font-size:.72rem; font-weight:700; line-height:1.5; white-space:nowrap; }
.fc-pill--info { --pill: var(--fc-accent-strong); }
.fc-pill--ok { --pill: var(--fc-buy); }
.fc-pill--warn { --pill: var(--fc-progress); }
.fc-pill--bad { --pill: var(--fc-danger); }
.fc-pill--demo { --pill: var(--fc-demo); }
.fc-pill--muted { --pill: var(--fc-muted); }
.fc-pill--buy { --pill: var(--fc-buy); }
.fc-pill--sell { --pill: var(--fc-sell); }
.fc-exit-notch{position:relative;display:inline-block;flex:0 0 auto;box-sizing:border-box;width:80px;height:28px;border:1px solid var(--fc-line);border-radius:13px;background:var(--fc-surface-soft);vertical-align:middle}
.fc-exit-notch.is-disabled{opacity:.45}
.fc-exit-notch__mark{position:absolute;top:10px;width:6px;height:6px;box-sizing:border-box;pointer-events:none}
.fc-exit-notch__mark--0{left:12px;border:1.5px solid var(--fc-faint);border-radius:50%}
.fc-exit-notch__mark--1{left:36px;border-radius:50%;background:var(--fc-faint)}
.fc-exit-notch__mark--2{left:60px;border-radius:2px;background:var(--fc-faint)}
.fc-exit-notch__mark.is-blocked{opacity:.35}
.fc-exit-notch__knob{position:absolute;left:0;top:4px;width:18px;height:18px;box-sizing:border-box;border-radius:50%;pointer-events:none;transition:transform .14s ease-out;box-shadow:0 1px 2px color-mix(in srgb,var(--fc-ink) 22%,transparent)}
.fc-exit-notch__knob--0{transform:translateX(6px);background:var(--fc-exit-off-fill);border:1px solid var(--fc-exit-off-edge)}
.fc-exit-notch__knob--1{transform:translateX(30px);background:var(--fc-exit-tp-v-fill);border:1.5px solid var(--fc-exit-tp-v-edge)}
.fc-exit-notch__knob--2{top:6.5px;width:13px;height:13px;border-radius:3px;transform:translateX(56.5px);background:var(--fc-exit-tp-h-fill)}
.fc-exit-notch[data-exit="SL"] .fc-exit-notch__knob--1{background:var(--fc-exit-sl-v-fill);border-color:var(--fc-exit-sl-v-edge)}
.fc-exit-notch[data-exit="SL"] .fc-exit-notch__knob--2{background:var(--fc-exit-sl-h-fill)}
.fc-exit-notch[data-exit="TS"] .fc-exit-notch__knob--1{background:var(--fc-exit-ts-v-fill);border-color:var(--fc-exit-ts-v-edge)}
.fc-exit-notch[data-exit="TS"] .fc-exit-notch__knob--2{background:var(--fc-exit-ts-h-fill)}
.fc-exit-notch__pick{position:absolute;top:0;display:block;width:24px;height:100%;min-width:0;margin:0;padding:0;border:0;border-radius:13px;background:transparent;cursor:pointer}
.fc-exit-notch__pick--0{left:3px}.fc-exit-notch__pick--1{left:27px}.fc-exit-notch__pick--2{left:51px}
.fc-exit-notch__pick[aria-disabled="true"]{cursor:help}.fc-exit-notch.is-disabled .fc-exit-notch__pick{cursor:not-allowed}
.fc-exit-notch__pick:focus-visible{outline:2px solid var(--fc-accent);outline-offset:1px}
/* A notch in a read-out: its knob in small (the exit's colour, the notch's shape) beside its name; "not reported" has none. */
.fc-exit-tag{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}
.fc-exit-tag.is-unknown{color:var(--fc-muted);font-weight:400}
.fc-exit-tag__knob{flex:0 0 auto;box-sizing:border-box;width:9px;height:9px;border:1px solid var(--fc-exit-off-edge);border-radius:50%;background:var(--fc-exit-off-fill)}
.fc-exit-tag[data-notch="1"] .fc-exit-tag__knob{border:1.5px solid var(--fc-exit-tp-v-edge);background:var(--fc-exit-tp-v-fill)}
.fc-exit-tag[data-notch="2"] .fc-exit-tag__knob{width:7px;height:7px;border:0;border-radius:2px;background:var(--fc-exit-tp-h-fill)}
.fc-exit-tag[data-exit="SL"][data-notch="1"] .fc-exit-tag__knob{border-color:var(--fc-exit-sl-v-edge);background:var(--fc-exit-sl-v-fill)}
.fc-exit-tag[data-exit="SL"][data-notch="2"] .fc-exit-tag__knob{background:var(--fc-exit-sl-h-fill)}
.fc-exit-tag[data-exit="TS"][data-notch="1"] .fc-exit-tag__knob{border-color:var(--fc-exit-ts-v-edge);background:var(--fc-exit-ts-v-fill)}
.fc-exit-tag[data-exit="TS"][data-notch="2"] .fc-exit-tag__knob{background:var(--fc-exit-ts-h-fill)}
:is([data-theme="dark"]:not([data-fc-page-dark="light"]), html[data-fc-theme="standard-dark"]:not([data-fc-page-dark="light"]),
    :root[data-theme="light"][data-fc-page-light="dark"], html[data-fc-theme="standard"][data-fc-page-light="dark"]) .fc-pill--warn { --pill: var(--fc-warm); }
.fc-pills { display:inline-flex; flex-wrap:wrap; gap:.25rem; }
.fc-row-detail { min-width:0; max-width:100%; }
.fc-row-detail > summary { cursor:pointer; color:var(--fc-accent-strong); white-space:nowrap; }
.fc-row-detail > div, .fc-row-detail pre { max-width:min(72ch, 100%); overflow-wrap:anywhere; white-space:pre-wrap; }
/* A drag-to-scroll container (fc-drag-scroll.js) scrolls its own content and never widens the box it sits in. */
[data-drag-scroll] { min-width:0; max-width:100%; }

/* Telegram copy wizard */
.fc-tg-page { min-width: 0; }
.fc-tg-card { margin-bottom: 1rem; min-width: 0; }
.fc-tg-card h3 { margin: 0 0 .45rem; }
.fc-tg-card > p { color: var(--fc-muted); }
.fc-tg-alert { border: 1px solid var(--fc-line); border-radius: 12px; padding: .75rem .9rem; margin: .7rem 0; background: var(--fc-surface-soft); }
.fc-tg-alert.error { color: var(--fc-danger); border-color: color-mix(in srgb, var(--fc-danger) 35%, var(--fc-line)); }
.fc-tg-alert.success { color: var(--fc-success-strong); border-color: color-mix(in srgb, var(--fc-success-strong) 35%, var(--fc-line)); }
.fc-tg-alert.warn { color: var(--fc-warn-ink); border-color: color-mix(in srgb, var(--fc-warn) 45%, var(--fc-line)); }
.fc-tg-alert.info { color: var(--fc-ink); border-color: color-mix(in srgb, var(--fc-accent) 35%, var(--fc-line)); }
.fc-tg-alert label { color: var(--fc-ink); }
.fc-tg-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; margin: 0 0 1rem; }
.fc-tg-steps button { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .65rem .7rem; border: 1px solid var(--fc-line); border-radius: 10px; color: var(--fc-muted); background: var(--fc-surface); text-align: left; }
.fc-tg-steps button:disabled { opacity: .6; }
.fc-tg-steps button.active { color: var(--fc-ink); border-color: var(--fc-accent); }
.fc-tg-steps button.done { color: var(--fc-success-strong); }
.fc-tg-steps button b { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--fc-surface-soft); flex: 0 0 auto; }
.fc-tg-steps button span { overflow: hidden; text-overflow: ellipsis; }
.fc-tg-row, .fc-tg-actions, .fc-tg-list-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.fc-tg-actions { margin-top: 1rem; }
.fc-tg-actions.inline { margin: 0; justify-content: flex-end; flex-wrap: wrap; }
.fc-tg-search { flex: 1 1 auto; min-width: 0; }
.fc-tg-channel-list, .fc-tg-account-list { display: grid; gap: .5rem; margin-top: .75rem; max-height: 28rem; overflow: auto; }
.fc-tg-channel, .fc-tg-account { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-width: 0; padding: .8rem .9rem; border: 1px solid var(--fc-line); border-radius: 12px; color: var(--fc-ink); background: var(--fc-surface); text-align: left; }
.fc-tg-channel.selected, .fc-tg-account.selected { border-color: var(--fc-accent); background: color-mix(in srgb, var(--fc-accent) 10%, var(--fc-surface)); }
.fc-tg-channel span:first-child, .fc-tg-account span { display: grid; min-width: 0; gap: .2rem; }
.fc-tg-channel b, .fc-tg-account b { overflow-wrap: anywhere; }
.fc-tg-channel small, .fc-tg-account small { color: var(--fc-muted); overflow-wrap: anywhere; }
.fc-tg-qr { display: flex; align-items: center; gap: 1rem; margin: .9rem 0; }
.fc-tg-qr img { width: min(15rem, 55vw); height: auto; background: white; padding: .5rem; border-radius: 10px; }
.fc-tg-phone { margin-top: 1rem; }
.fc-tg-phone label, .fc-tg-form-grid label { display: grid; gap: .35rem; font-weight: 600; }
.fc-tg-phone input, .fc-tg-form-grid input, .fc-tg-form-grid select, .fc-tg-search { min-width: 0; padding: .6rem .7rem; border: 1px solid var(--fc-line); border-radius: 9px; color: var(--fc-ink); background: var(--fc-surface); }
.fc-tg-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.fc-tg-form-grid .wide { grid-column: 1 / -1; }
.fc-tg-checks { display: grid; gap: .65rem; margin: 1rem 0; }
.fc-tg-checks label, .fc-tg-confirm { display: flex !important; align-items: flex-start; gap: .5rem; }
.fc-tg-checks input, .fc-tg-confirm input { margin-top: .25rem; }
.fc-tg-preview { border-top: 1px solid var(--fc-line); padding: .8rem 0; min-width: 0; }
.fc-tg-preview header { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .45rem; }
.fc-tg-preview time, .fc-tg-preview small { color: var(--fc-muted); }
.fc-tg-fields { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .3rem 0; }
.fc-tg-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; padding: .6rem; border-radius: 8px; background: var(--fc-surface-soft); }
.fc-tg-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.fc-tg-review div { display: grid; gap: .25rem; padding: .7rem; border: 1px solid var(--fc-line); border-radius: 10px; min-width: 0; }
.fc-tg-review small, .fc-tg-route small { color: var(--fc-muted); }
.fc-tg-review b, .fc-tg-route span { overflow-wrap: anywhere; }
.fc-tg-route { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 1rem; align-items: center; border-top: 1px solid var(--fc-line); padding: .85rem 0; }
.fc-tg-route > div { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.fc-tg-route-last { font-size: .9rem; }
.fc-tg-route > div > .fc-pill { justify-self: start; }
.fc-tg-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--fc-accent-strong); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.fc-tg-route-events { grid-column: 1 / -1; display: grid; gap: .2rem; padding: .2rem 0 0 .9rem; border-left: 2px solid var(--fc-line); min-width: 0; }
.fc-tg-route-events > .fc-tg-preview:first-of-type { border-top: 0; }
@media (max-width: 760px) {
  .fc-tg-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fc-tg-route { grid-template-columns: 1fr; gap: .6rem; }
  .fc-tg-actions.inline { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .fc-tg-form-grid, .fc-tg-review { grid-template-columns: 1fr; }
  .fc-tg-form-grid .wide { grid-column: auto; }
  .fc-tg-list-head { align-items: flex-start; }
  .fc-tg-steps button { padding: .5rem; }
  .fc-tg-steps button span { font-size: .8rem; }
}
