/* ===========================================================================
   TraderLab cockpit — shell + design-system foundation
   Clean, modern, ergonomic. No external CSS framework dependency.
   =========================================================================== */

:root {
    --ck-bg: #0f1722;
    --ck-bg-soft: #16212f;
    --ck-panel: #1d2a3a;
    --ck-panel-2: #223247;
    --ck-border: #2c3e54;
    --ck-text: #e7eef6;
    --ck-text-dim: #9fb3c8;
    --ck-accent: #2f81f7;
    --ck-accent-soft: #1b3a5c;
    --ck-good: #2ea043;
    --ck-warn: #d29922;
    --ck-bad: #f85149;
    /* TL Phase 8S (UX review 1b.2): TEXT tokens - --ck-good/warn/bad as text on --ck-panel are below 4.5:1; these are
       above it. The three above stay for borders, translucent backgrounds and icons (>= 3:1). */
    --ck-good-text: #5ed77a;
    --ck-warn-text: #e3b341;
    --ck-bad-text: #ff7b72;
    /* admin-comptes-v2, UX/UI #2 recette P2-5 (AC-21): the TEXT token of a link or a link-like button - --ck-accent as text on --ck-panel is
       3.88:1; this is 6.5:1 there (the colour .ck-main a:not([class]) already uses). --ck-accent stays for fills and focus rings (>= 3:1). */
    --ck-link: #79b0ff;
    --ck-radius: 10px;
    --ck-radius-sm: 6px;
    /* TL Phase 10C: the "Lab" of the brand name - the bubbles' and the logo's "Lab" blue on a dark background
       (TraderLab/Docs/branding/README.md). Used by .ck-brand-lab only. */
    --ck-brand-lab: #58a6ff;
}

/* ── Shell layout ───────────────────────────────────────────────────────── */
.ck-shell {
    display: grid;
    grid-template-columns: 264px 1fr;
    grid-template-rows: 56px 1fr;
    grid-template-areas: "brand topbar" "sidebar main";
    height: 100vh;
    background: var(--ck-bg);
    color: var(--ck-text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.ck-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    background: var(--ck-bg-soft);
    border-right: 1px solid var(--ck-border);
}
/* TL Phase 10A: the flask is an <img> with its own #0f1722 background - no border, no shadow, never shrunk by flex. */
.ck-logo { display: block; flex: none; }
/* TL Phase 10I (E2): the logo of the side menu, /login and the passkey page - flask 36 x 48 (sizes set on the <img>), 9 px, then
   "Trader" + blue "Lab" in 34 px, dropped 3 px to centre it on the flask's body (top, never a margin: under align-items:
   center a margin moves it by half). One line, never wrapped. */
.ck-brand-name { display: block; position: relative; top: 3px; font-size: 2.125rem; font-weight: 700; letter-spacing: -0.7px; line-height: 1; white-space: nowrap; }
.ck-brand-lab { color: var(--ck-brand-lab); }
/* TL Phase 10I: the translated tagline, first element of .ck-sidebar, stays under the logo while the menu scrolls. Its right
   edge is the name's, set from the LEFT so that the vertical scrollbar cannot move it: the percentage is of the menu's content
   box, which narrows with the bar, so the text keeps its distance from the left and the background still spans the links'
   whole width. 203.6px = 14 + 36 + 9 + 152.6 (the name, measured in Segoe UI) - 8 (.ck-sidebar's left padding). z-index: a
   link's focus outline must not paint over it. */
.ck-brand-tagline {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: 0 calc(100% - 203.6px) 8px 0;
    background: var(--ck-bg-soft);
    color: var(--ck-text-dim);
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.ck-topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    background: var(--ck-bg-soft);
    border-bottom: 1px solid var(--ck-border);
}
.ck-topbar .ck-spacer { margin-left: auto; }

.ck-sidebar {
    grid-area: sidebar;
    overflow-y: auto;
    background: var(--ck-bg-soft);
    border-right: 1px solid var(--ck-border);
    /* TL Phase 10I: no top padding, the tagline sits right under the logo. scroll-padding-top: its 23.6 px + a 4 px focus outline,
       so that a link reached by Shift+Tab is never hidden under it. */
    padding: 0 8px 24px;
    scroll-padding-top: 28px;
}

.ck-main {
    grid-area: main;
    overflow-y: auto;
    padding: 22px 26px 60px;
}

/* ── Sidebar navigation ─────────────────────────────────────────────────── */
.ck-nav-group { margin-bottom: 14px; }
.ck-nav-group-title {
    text-transform: uppercase;
    font-size: .66rem;
    letter-spacing: .8px;
    color: var(--ck-text-dim);
    padding: 6px 12px 4px;
}
.ck-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: var(--ck-radius-sm);
    color: var(--ck-text);
    text-decoration: none;
    font-size: .9rem;
}
.ck-nav-link:hover { background: var(--ck-panel-2); }
.ck-nav-link.active { background: var(--ck-accent-soft); color: #fff; }
/* TL 8S1 (item 11, UX/UI): the current page is never told by colour alone - a 3 px accent bar on the left AND bold
   (aria-current="page" for assistive technology). */
.ck-nav-link.active, .ck-nav-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ck-accent); font-weight: 700; }
.ck-nav-link.locked { color: var(--ck-text-dim); cursor: default; }
.ck-nav-link .ck-ico { width: 20px; text-align: center; }
.ck-nav-link .ck-lock { margin-left: auto; font-size: .7rem; opacity: .7; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.ck-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.ck-badge.available { background: rgba(46,160,67,.16); color: #5ed77a; border-color: rgba(46,160,67,.4); }
.ck-badge.preview   { background: rgba(47,129,247,.16); color: #79b0ff; border-color: rgba(47,129,247,.4); }
.ck-badge.planned   { background: rgba(210,153,34,.16); color: #e3b341; border-color: rgba(210,153,34,.4); }
.ck-badge.adminonly { background: rgba(163,113,247,.16); color: #c4a7fb; border-color: rgba(163,113,247,.4); }
.ck-badge.disabled  { background: rgba(139,148,158,.16); color: #b1bac4; border-color: rgba(139,148,158,.4); }
.ck-badge.env       { background: var(--ck-panel-2); color: var(--ck-text-dim); border-color: var(--ck-border); }

/* ── Module tiles ───────────────────────────────────────────────────────── */
.ck-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 8px 0 26px;
}
.ck-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--ck-panel);
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    text-decoration: none;
    color: var(--ck-text);
    transition: border-color .12s, transform .12s;
}
.ck-tile:hover { border-color: var(--ck-accent); transform: translateY(-2px); }
.ck-tile.locked { opacity: .72; }
.ck-tile.locked:hover { transform: none; border-color: var(--ck-border); }
.ck-tile-head { display: flex; align-items: center; gap: 10px; }
.ck-tile-ico { font-size: 1.4rem; }
.ck-tile-title { font-weight: 650; font-size: 1.02rem; }
.ck-tile-desc { color: var(--ck-text-dim); font-size: .86rem; line-height: 1.35; }
.ck-tile-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }

/* ── Cards / sections ───────────────────────────────────────────────────── */
.ck-card {
    background: var(--ck-panel);
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    padding: 18px 20px;
    margin-bottom: 18px;
}
.ck-card h2, .ck-card h3 { margin-top: 0; }
.ck-grid-2 { display:grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap:14px; }

.ck-empty {
    border: 1px dashed var(--ck-border);
    border-radius: var(--ck-radius);
    padding: 22px;
    text-align: center;
    color: var(--ck-text-dim);
    background: var(--ck-bg-soft);
}

.ck-list { margin: 6px 0; padding-left: 18px; }
.ck-list li { margin: 3px 0; color: var(--ck-text-dim); }

.ck-status-banner {
    display:flex; align-items:center; gap:10px;
    padding: 10px 14px; border-radius: var(--ck-radius-sm);
    border:1px solid var(--ck-border); background: var(--ck-bg-soft);
    margin-bottom: 16px; font-size: .9rem;
}
.ck-status-banner.warn { border-color: rgba(210,153,34,.5); background: rgba(210,153,34,.08); }

/* ── Help affordance ────────────────────────────────────────────────────── */
.ck-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--ck-accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    padding: 0;
}
.ck-help-icon:hover { background: #4c97ff; }

.ck-help-launch {
    border: 1px solid var(--ck-border);
    background: var(--ck-panel-2);
    color: var(--ck-text);
    border-radius: var(--ck-radius-sm);
    padding: 5px 10px;
    cursor: pointer;
    font-size: .82rem;
}

/* ── Help panel (right drawer) ──────────────────────────────────────────── */
.ck-help-panel {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 92vw;
    height: 100vh;
    background: var(--ck-panel);
    border-left: 1px solid var(--ck-border);
    box-shadow: -8px 0 30px rgba(0,0,0,.4);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
.ck-help-panel-head {
    display:flex; align-items:center; gap:10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ck-border);
    background: var(--ck-bg-soft);
}
.ck-help-panel-head h3 { margin:0; font-size: 1.02rem; }
.ck-help-panel-body { padding: 16px; overflow-y: auto; }
.ck-help-panel-body h4 {
    margin: 16px 0 4px; font-size: .76rem; text-transform: uppercase;
    letter-spacing: .6px; color: var(--ck-text-dim);
}
.ck-help-panel-body p { margin: 0 0 6px; font-size: .9rem; line-height: 1.45; }
.ck-help-close {
    margin-left:auto; border:none; background:transparent; color: var(--ck-text-dim);
    font-size: 1.1rem; cursor:pointer;
}
.ck-help-close:hover { color: var(--ck-text); }
.ck-chip {
    display:inline-block; margin:2px 4px 2px 0; padding: 2px 8px;
    border-radius: 999px; font-size: .72rem;
    background: var(--ck-accent-soft); color: #cfe2ff;
}

/* ── Footer strip ───────────────────────────────────────────────────────── */
.ck-footer {
    margin-top: 24px; padding-top: 12px;
    border-top: 1px solid var(--ck-border);
    color: var(--ck-text-dim); font-size: .78rem;
    display:flex; gap:14px; flex-wrap:wrap;
}

/* Operations/coverage legacy content renders on a light surface inside the shell */
.ck-legacy-surface {
    background:#fff; color:#1a1a1a; border-radius: var(--ck-radius);
    padding: 18px 20px; border:1px solid var(--ck-border);
}
.ck-legacy-surface a { color: #1257a8; }

/* ── TL Phase 6A — CkTabs: a real, accessible tab strip (replaces button-swapped pseudo-tabs) ── */
.ck-tabs {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ck-border);
    margin-bottom: 14px;
}
.ck-tab {
    appearance: none;
    background: transparent;
    color: var(--ck-text-dim);
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 8px 15px;
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    top: 1px;
    transition: color .12s ease, background .12s ease;
}
.ck-tab:hover:not(:disabled) { color: var(--ck-text); background: var(--ck-bg-soft); }
.ck-tab:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: -2px; }
.ck-tab.active {
    color: #fff;
    background: var(--ck-bg-soft);
    border-color: var(--ck-border);
    border-bottom: 1px solid var(--ck-bg-soft);
}
.ck-tab.active::after {
    content: "";
    position: absolute; left: 0; right: 0; top: -1px; height: 2px;
    background: var(--ck-accent);
    border-top-left-radius: 8px; border-top-right-radius: 8px;
}
.ck-tab:disabled { opacity: .5; cursor: not-allowed; }

/* ── TL Phase 6A — breadcrumb "you are in <area>" affordance on deep-linked sub-pages ── */
.ck-breadcrumb {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    color: var(--ck-text-dim); font-size: .82rem; margin-bottom: 10px;
}
.ck-breadcrumb a { color: var(--ck-text-dim); text-decoration: none; }
.ck-breadcrumb a:hover { color: var(--ck-text); text-decoration: underline; }
.ck-breadcrumb .sep { opacity: .6; }
.ck-breadcrumb .current { color: var(--ck-text); font-weight: 600; }

/* ── TL Phase 6A — nested sub-nav entries under a parent module in the sidebar ── */
.ck-nav-link.sub {
    padding-left: 30px;
    font-size: .82rem;
    /* TL 8S1 (item 11): an allowed sub-item reads like an allowed item - only the indent tells it apart. Dimmed text is
       for group headings and locked entries. */
    color: var(--ck-text);
}
.ck-nav-link.sub.locked { color: var(--ck-text-dim); }
.ck-nav-link.sub.active { color: #fff; }
.ck-nav-link.sub::before {
    content: "└ ";
    opacity: .5;
}

/* ── TL Phase 6A — Configuration hub tiles ── */
.ck-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.ck-config-tile {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--ck-bg-soft);
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--ck-text);
    transition: border-color .12s ease, transform .12s ease;
}
.ck-config-tile:hover { border-color: var(--ck-accent); transform: translateY(-2px); }
.ck-config-tile .title { display:flex; align-items:center; gap:8px; font-weight: 700; }
.ck-config-tile .desc { color: var(--ck-text-dim); font-size: .82rem; line-height: 1.35; }

/* ===========================================================================
   TL Phase 8S (ADR-182) - the common lexicon, the "Cannot read" block, the sign-in card, and the phone layout.
   =========================================================================== */

/* Links in running text and the footer: readable on the dark surface (the browser's default blue was 1.9:1) */
.ck-main a:not([class]), .ck-footer a, .ck-list a { color: #79b0ff; }

/* The framework's error bar: hidden until Blazor shows it (only MainLayout's scoped CSS hid it, so in the cockpit shell it
   was always rendered at the bottom of every page) */
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 12px 16px; background: var(--ck-panel-2); color: var(--ck-text); border-top: 2px solid var(--ck-bad);
}
#blazor-error-ui .reload { color: #79b0ff; display: inline-flex; min-height: 44px; align-items: center; padding: 0 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 10px; }

/* G9: one visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }

/* The four tones (a word AND an icon; text colours are the -text tokens, >= 4.5:1 on their blended background) */
.ck-state {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px; border: 1px solid transparent;
    font-size: .8rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.ck-state.good    { color: var(--ck-good-text); background: rgba(46,160,67,.14);  border-color: rgba(46,160,67,.45); }
.ck-state.watch   { color: var(--ck-warn-text); background: rgba(210,153,34,.14); border-color: rgba(210,153,34,.45); }
.ck-state.problem { color: var(--ck-bad-text);  background: rgba(248,81,73,.14);  border-color: rgba(248,81,73,.45); }
.ck-state.neutral { color: var(--ck-text-dim);  background: var(--ck-bg-soft);    border-color: var(--ck-border); }
.ck-state-ico { font-weight: 700; }

.ck-state-banner {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px; margin-bottom: 16px;
    background: var(--ck-panel); border: 1px solid var(--ck-border); border-left-width: 4px;
    border-radius: var(--ck-radius-sm); font-size: .95rem;
}
.ck-state-banner.good    { border-left-color: var(--ck-good); }
.ck-state-banner.good    > strong, .ck-state-banner.good    > .ck-state-ico { color: var(--ck-good-text); }
.ck-state-banner.watch   { border-left-color: var(--ck-warn); }
.ck-state-banner.watch   > strong, .ck-state-banner.watch   > .ck-state-ico { color: var(--ck-warn-text); }
.ck-state-banner.problem { border-left-color: var(--ck-bad); }
.ck-state-banner.problem > strong, .ck-state-banner.problem > .ck-state-ico { color: var(--ck-bad-text); }
.ck-state-banner.neutral { border-left-color: var(--ck-border); }
.ck-state-banner.neutral > strong, .ck-state-banner.neutral > .ck-state-ico { color: var(--ck-text-dim); }
.ck-state-detail { color: var(--ck-text); }

/* R1: the classes the pages used and nobody had defined */
.ck-badge.blocked { background: rgba(248,81,73,.14); color: var(--ck-bad-text); border-color: rgba(248,81,73,.45); }
.ck-badge.ok      { background: rgba(46,160,67,.14); color: var(--ck-good-text); border-color: rgba(46,160,67,.45); }
.ck-status-banner.ok  { border-color: rgba(46,160,67,.5); background: rgba(46,160,67,.08); }
.ck-status-banner.bad { border-color: rgba(248,81,73,.5); background: rgba(248,81,73,.08); }

/* R3/W3/C2/K1: the one "Cannot read" block */
.ck-read-failure {
    background: var(--ck-panel); border: 1px solid rgba(248,81,73,.55); border-left: 4px solid var(--ck-bad);
    border-radius: var(--ck-radius-sm); padding: 14px 16px; margin-bottom: 16px;
}
.ck-read-failure-title { display: flex; align-items: center; gap: 8px; color: var(--ck-bad-text); font-size: 1.02rem; }
.ck-read-failure-what { margin: 8px 0 4px; color: var(--ck-text); }
.ck-read-failure-when { margin: 0; color: var(--ck-text-dim); font-size: .85rem; }
.ck-read-failure-detail { margin-top: 8px; color: var(--ck-text-dim); font-size: .85rem; }
.ck-no-data { color: var(--ck-text-dim); }

/* A1: the "Overall status" card */
.ck-overall { padding: 14px 16px; }
.ck-overall-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ck-overall-head h2 { margin: 0; font-size: 1.05rem; }
.ck-overall-lines { list-style: none; margin: 0; padding: 0; }
.ck-overall-lines a {
    display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap;
    min-height: 44px; padding: 6px 2px; color: var(--ck-text); text-decoration: none;
    border-top: 1px solid var(--ck-border);
}
.ck-overall-lines a:hover .ck-overall-fact { text-decoration: underline; }
/* TL 8U: German and Italian badges are long ("Verlangsamt — seit 9 min kein Tick"): the sentence keeps at least 10em and
   the badge goes under it rather than squeezing it into a column of single words. */
.ck-overall-fact { color: var(--ck-text); font-size: .9rem; flex: 1 1 10em; }

/* TL 8S1 (item 3): the one red text of the lexicon, for lists of blockers (it replaces a colour token that was never defined). */
.ck-bad-text { color: var(--ck-bad-text); }

/* TL 8S1 (item 3): a refused action - it was a light pink box under the dark theme's light text (unreadable). */
.tl-action-refusal {
    background: rgba(248,81,73,.10); border: 1px solid rgba(248,81,73,.5); color: var(--ck-bad-text);
    padding: 8px 12px; border-radius: 6px;
}

/* studio-pro AF9 (the debt named by UX/UI #2, "16 px on every page"): no browser margin around the shell on any page; with it, the document was the
   window + 16 px and the window scrolled besides .ck-main. */
body { margin: 0; }
/* AF9 pre-review NIT 5: the page with no shell (NotFound.razor, MainLayout) keeps a margin of its own, its text off the window's edge. */
.ck-not-found { padding: 16px; }
/* studio-pro AF9 (Pierre: one scrollbar only, the window's): on the studio's page, from 769 px, the window scrolls the page, never .ck-main (the area
   below the banner and right of the menu). The shell is as tall as its content, at least the window; the banner and the side menu stay in view
   (sticky), the menu scrolling in itself as before when it is longer than the window. The window's scrollbar keeps its gutter: a tab longer or
   shorter than the window never moves the page sideways (AF2's reason for its contained column). */
/* AF9 pre-review MAJOR 2 (WCAG 2.4.11): on the studio's page the window scrolls under a sticky 56 px banner, at every width (below 769 px the top
   bar is sticky too, G1); an element reached by Tab is scrolled to 60 px below the window's top (the banner + a 4 px focus outline), never under it. */
html:has(#pi2r-studio) { scroll-padding-top: 60px; }
@media (min-width: 769px) {
    html:has(#pi2r-studio) { scrollbar-gutter: stable; }
    .ck-shell:has(#pi2r-studio) { height: auto; min-height: 100vh; }
    /* min-width: 0 (Quality MINOR 1 on AF9): no longer a scroller, the area's smallest width in its 1fr column would be its content's, and a
       layout wider than the page would widen the area and the banner past the window. */
    .ck-shell:has(#pi2r-studio) > .ck-main { overflow: visible; min-width: 0; }
    .ck-shell:has(#pi2r-studio) > .ck-brand, .ck-shell:has(#pi2r-studio) > .ck-topbar { position: sticky; top: 0; z-index: 50; }
    .ck-shell:has(#pi2r-studio) > .ck-sidebar { position: sticky; top: 56px; align-self: start; box-sizing: border-box; height: calc(100vh - 56px); }
}

/* L1/L2: the sign-in page, in its own layout (no menu) */
body:has(.tl-login-page) { margin: 0; background: var(--ck-bg); }
.tl-login-page {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 24px 16px; box-sizing: border-box;
    background: var(--ck-bg); color: var(--ck-text); font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
/* TL Phase 10I: as wide as the logo, so the tagline's right edge follows the name in any font, with no pixel value. */
.tl-login-brand { display: inline-flex; flex-direction: column; align-items: flex-end; }
.tl-login-logo { display: flex; align-items: center; gap: 9px; }
.tl-login-tagline { margin: 6px 0 0; color: var(--ck-text-dim); font-size: .8125rem; line-height: 1.3; white-space: nowrap; }
.tl-login-card {
    width: 100%; max-width: 360px; box-sizing: border-box;
    background: var(--ck-panel); border: 1px solid var(--ck-border); border-radius: var(--ck-radius); padding: 22px 20px;
}
.tl-login-card h1 { margin: 0 0 14px; font-size: 1.25rem; }
.tl-login-card form { display: flex; flex-direction: column; gap: 14px; }
.tl-login-card label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--ck-text-dim); }
.tl-login-card input {
    height: 48px; font-size: 16px; padding: 0 12px; box-sizing: border-box; width: 100%;
    background: var(--ck-bg-soft); color: var(--ck-text); border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
}
.tl-login-card button {
    height: 48px; width: 100%; font-size: 16px; font-weight: 600; cursor: pointer;
    background: #1b62d6; color: #fff; border: none; border-radius: var(--ck-radius-sm);   /* white on it: 5.6:1 (on --ck-accent: 3.75) */
}
.tl-login-error { display: flex; gap: 8px; align-items: baseline; margin: 0 0 12px; color: var(--ck-bad-text); font-size: .95rem; }
/* TL 8Q (UX/UI A): every sign-in slow-down - amber with the "!" icon, never the red of a wrong password */
.tl-login-wait { display: flex; gap: 8px; align-items: baseline; margin: 0 0 12px; color: var(--ck-warn-text); font-size: .95rem; }
.tl-login-wait > span[aria-hidden] { font-weight: 700; }
/* sans-passkey-section (UX AC-2): "your session has ended" - the cockpit's information style (accent bar, normal text), never the red error */
.tl-login-info {
    margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--ck-accent); border-radius: var(--ck-radius-sm);
    background: var(--ck-accent-soft); color: var(--ck-text); font-size: .95rem; line-height: 1.4;
}

/* ── TL Phase 8S1 — the page head, "About this page", the workbench, the freshness line, the component cards ── */
.ck-page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ck-page-head h1 { margin: 0; }
.ck-about > summary { cursor: pointer; color: var(--ck-text-dim); }
.ck-about[open] > summary { margin-bottom: 8px; }

.ck-wb-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.ck-wb-instrument { display: flex; flex-direction: column; gap: 4px; color: var(--ck-text-dim); font-size: .85rem; min-width: 0; }
.ck-wb-controls select {
    padding: 4px 8px; border-radius: 6px; border: 1px solid var(--ck-border); background: var(--ck-bg-soft); color: var(--ck-text);
    max-width: 100%;
}
/* TL 10G (R-UX-3 §B, §C, §E): one line of commands. Chips and buttons >= 32 px, the keyboard's ring on each; it wraps by itself
   and assumes no number of buttons (10H adds one). */
.ck-wb-chipline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ck-wb-chips { display: inline-flex; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); overflow: hidden; }
.ck-wb-chip {
    min-width: 44px; min-height: 36px; padding: 0 8px; border: none; border-left: 1px solid var(--ck-border);
    background: var(--ck-bg-soft); color: var(--ck-text); cursor: pointer; font: inherit; white-space: nowrap;
}
.ck-wb-chip:first-child { border-left: none; }
.ck-wb-chip.active { background: var(--ck-accent-soft); font-weight: 700; box-shadow: inset 0 -3px 0 var(--ck-accent); }
.ck-wb-chip:focus-visible, .ck-wb-menubtn:focus-visible, .ck-wb-legend-x:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: -2px; }
.ck-wb-menuwrap { position: relative; }
.ck-wb-menubtn {
    min-height: 36px; min-width: 44px; padding: 0 10px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
    background: var(--ck-bg-soft); color: var(--ck-text); cursor: pointer; font: inherit; white-space: nowrap;
}
.ck-wb-backdrop { position: fixed; inset: 0; z-index: 30; }
.ck-wb-menu {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 31; display: flex; flex-direction: column; gap: 4px; width: max-content; max-width: 320px;
    padding: 10px 12px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); background: var(--ck-panel); box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.ck-wb-menu[hidden] { display: none; }
.ck-wb-menu.end { left: auto; right: 0; }
.ck-wb-menuhead { margin: 0; color: var(--ck-text-dim); font-size: .85rem; }
.ck-wb-field { display: flex; flex-direction: column; gap: 4px; color: var(--ck-text-dim); font-size: .85rem; }
.ck-wb-check { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; min-height: 36px; color: var(--ck-text); font-size: .9rem; }
/* TL 10G (R-UX-3 §C.14-16): over the chart's top left, after the price axis; a gesture passes through it, its × does not. */
/* Feature studio-pro, lot IC8 (NIT 5 of Quality #3 on IC7): the box over the chart's top left holds the list of the instances and, under it, the
   settings of one of them (no longer an item of the list). */
.ck-wb-legendbox { position: absolute; top: 4px; left: 60px; max-width: calc(100% - 110px); z-index: 2; pointer-events: none; }
.ck-wb-legend {
    list-style: none; margin: 0; padding: 0 4px; pointer-events: none;
    display: flex; flex-wrap: wrap; gap: 0 10px; border-radius: 4px; background: rgba(13,17,23,.72); font-size: .78rem;
}
.ck-wb-legend li { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
/* IC8 (Quality #3's MINOR 2): each entry's swatch, the colour of its instance (the text's, set on the entry); "Not enough candles" beside its name. */
.ck-wb-legend li[data-legend-entry]::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 2px; border-radius: 2px; background: currentColor; }
/* Feature studio-pro IC13 (UX/UI #2's IC11-17): an instance whose line is cut shows a sample of it, 16 x 10 px in its width and its pattern, in place of its square;
   a solid line keeps its square. */
.ck-wb-legend li[data-legend-entry]:has(> .ck-wb-legend-sample)::before { content: none; }
.ck-wb-legend-sample { flex: none; margin-right: 2px; }
.ck-wb-legend-note { padding: 0 2px; color: var(--ck-text-dim); white-space: normal; }
.ck-wb-legend-x { pointer-events: auto; width: 24px; height: 24px; padding: 0; border: none; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 1rem; line-height: 1; }
/* Feature studio-pro, lot IC7 (R-UX-1 §5.2): an entry's name opens its instance's settings, under the legend (a whole row of it); the menu's
   "Add another" beside each box. Targets of 44 px in the menu and the settings. */
.ck-wb-legend-name { pointer-events: auto; min-height: 24px; padding: 0 2px; border: none; background: transparent; color: inherit; cursor: pointer; font: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.ck-wb-legend-name:focus-visible, .ck-wb-addind:focus-visible, .ck-wb-indset-btn:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: -2px; }
.ck-wb-indset {
    display: block; max-width: 320px; margin: 4px 0; padding: 8px 10px; white-space: normal; pointer-events: auto; color: var(--ck-text); font-size: .85rem;
    border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); background: var(--ck-panel); box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.ck-wb-indset-title { margin: 0 0 4px; font-weight: 700; }
.ck-wb-indset-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.ck-wb-indset-field input { width: 7em; min-height: 44px; padding: 0 8px; border: 1px solid var(--ck-border); border-radius: 6px; background: var(--ck-bg-soft); color: var(--ck-text); font: inherit; }
.ck-wb-indset-field input[aria-invalid="true"] { border-color: var(--ck-warn-text); }
/* Feature studio-pro IC11: the two lists of a built-in's line, the same target as its fields (44 px at every width). */
.ck-wb-indset-field select { min-width: 7em; min-height: 44px; padding: 0 8px; border: 1px solid var(--ck-border); border-radius: 6px; background: var(--ck-bg-soft); color: var(--ck-text); font: inherit; }
.ck-wb-indset-error { display: block; margin: 0 0 4px; color: var(--ck-warn-text); }
.ck-wb-indset-error:empty { margin: 0; }   /* the live region stays in the page, empty, so that a refusal is announced */
/* Feature studio-pro IC12 (UX/UI #2's IC11-16): a MACD's two swatches under its Style list, each with its word, then the Signal's rule in one sentence. */
/* IC13 (UX/UI #2's P2-1): each of a MACD's lines a block of its own, named by its word, 10 px and a rule between the two, as a script's series. */
.ck-wb-indset-samples { display: flex; flex-direction: column; margin: 2px 0; }
.ck-wb-indset-sample { display: inline-flex; align-items: center; gap: 6px; }
.ck-wb-indset-sample + .ck-wb-indset-sample { margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--ck-border); }
.ck-wb-indset-rule { margin: 2px 0 4px; font-size: .85rem; color: var(--ck-text-dim); white-space: normal; }
.ck-wb-indset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ck-wb-indset-btn, .ck-wb-addind {
    min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
    background: var(--ck-bg-soft); color: var(--ck-text); cursor: pointer; font: inherit;
}
.ck-wb-addind:disabled { cursor: not-allowed; opacity: .5; }
.ck-wb-indrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ck-wb-indfull { margin: 0; max-width: 280px; color: var(--ck-text-dim); font-size: .82rem; }
.ck-wb-closed { color: var(--ck-text-dim); }
/* TL Phase 10J (UX/UI 1b.B): the live band. Two rows at most on a phone; every value has a fixed slot, so a change of digit moves nothing. */
.ck-wb-band { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: 6px 0 0; font-size: .88rem; color: var(--ck-text); }
.ck-wb-band-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.ck-wb-band-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ck-wb-band-label { color: var(--ck-text-dim); }
.ck-wb-band-value { display: inline-block; font-variant-numeric: tabular-nums; }
.ck-wb-band-age { color: var(--ck-text-dim); }
.ck-wb-band-help { flex-basis: 100%; margin: 2px 0 0; color: var(--ck-text-dim); font-size: .82rem; }
/* An old price never passes for a live one: amber, a failed read and a closed market dim the prices; amber says it on the age. */
.ck-wb-band-amber .ck-wb-band-value, .ck-wb-band-failed .ck-wb-band-value, .ck-wb-band-closed .ck-wb-band-value, .ck-wb-band-empty .ck-wb-band-value { color: var(--ck-text-dim); }
.ck-wb-band-amber .ck-wb-band-age { color: var(--ck-warn-text); }
/* UX/UI 1b.B.11: no render for 5 s on an open market (a lost connection, a sleeping phone): grey, in the browser. Each value is created again at each render. */
.ck-wb-band-open .ck-wb-band-value { animation: ck-wb-band-frozen 0s linear 5s forwards; }
@keyframes ck-wb-band-frozen { to { color: var(--ck-text-dim); } }
.ck-btn-secondary { background: transparent; }
.ck-wb-dataline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; color: var(--ck-text-dim); font-size: .88rem; }
/* TL Phase 9Z (UX/UI §5 A): what a new choice is loading, grey, in place of the data line - never a spinner alone. */
.ck-wb-loading { color: var(--ck-text-dim); }
/* TL Phase 9X (item 6, UX/UI 9X §6 B): a choice that could not be loaded - dim, never red or amber. */
.ck-wb-notloaded { color: var(--ck-text-dim); }
/* TL Phase 9X (item 11): the credentials' actions on one line on a desk (as before 9X); stacked cards at 768 px and below. */
.ck-cred-actions { white-space: nowrap; }
.ck-chart-card { padding: 8px; }
.ck-chart-phone { display: none; }
.ck-chart-desk { display: block; }
/* studio-v2 A16c (spec §37.2): the server's first render holds the chart's place at its height (ChartFrame.Desk 860 x 300, Phone 360 x 340): nothing jumps when the circuit draws. */
.ck-wb-opening-frame { aspect-ratio: 860 / 300; background: var(--ck-bg-soft); border-radius: 8px; }
.ck-wb-details > summary, .ck-component-more > summary { cursor: pointer; color: var(--ck-text-dim); }

/* TL 8X: the chart moves through time. A vertical drag that starts on it scrolls the page (pan-y); a horizontal drag and a
   pinch go to the chart. The page zoom of the browser is never forbidden (the viewport tag keeps it). */
.ck-chart-wrap { position: relative; }
.ck-chart { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; border-radius: 8px; }
/* Feature graphique: the panes of a script, under the candles; a gesture there moves the chart as one on the candles does. */
/* Feature page-studio PR 4b: the chip of the account's script on the chart. Written by workbench-script.js, as text. */
.ck-workbench-script { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 28px; font-size: 12px; color: var(--ck-text-dim); }
.ck-workbench-script[hidden] { display: none; }
.ck-workbench-script-name { color: var(--ck-text); overflow-wrap: anywhere; }
.ck-workbench-script a { color: inherit; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.ck-workbench-script .ck-state-warn { color: var(--ck-warn-text, #e6b35a); }
.ck-workbench-script-load { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 8px; border: 1px solid currentColor; border-radius: 4px; background: none; color: var(--ck-text); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
/* studio-v2 follow-up lot 9 (§29.1): one item per indicator shown, each its own line of the chip; "My indicators" under the built-in indicators of the menu. */
.ck-workbench-script-item { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ck-workbench-script-item[hidden] { display: none; }
.ck-wb-mine { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ck-border); }
.ck-wb-mine[hidden] { display: none; }
.ck-wb-mine-empty, .ck-wb-mine-note { margin: 0; font-size: .85rem; color: var(--ck-text-dim); overflow-wrap: anywhere; }
.ck-wb-mine-empty a { color: inherit; text-decoration: underline; }
.ck-wb-mine .ck-state-warn { color: var(--ck-warn-text, #e6b35a); }
/* studio-v2 lot 13 (§33.4): the cap's note keeps five lines of room at the menu's width (the German sentence takes four), so the longer sentence of a refused fifth tick never moves the menu. */
#ck-wb-mine-cap { line-height: 1.4; min-height: 7em; }
/* UX/UI #2 (lot 9 recette, P3): a box the cap disables looks it (its note says why, aria-describedby). */
.ck-wb-mine .ck-wb-check.is-disabled { color: var(--ck-text-dim); }
.ck-wb-mine > label:has(input[type=checkbox]:focus-visible) { outline: 2px solid var(--ck-accent); outline-offset: 2px; border-radius: 4px; }
.ck-wb-mine > label > span { overflow-wrap: anywhere; }
/* Feature studio-pro IC2b: under an indicator shown, a pastille per instance and its "+"; the open one's settings below, IC1's rows (studio-core.js settingRows). */
.ck-wb-inst-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px 22px; }
.ck-wb-inst, .ck-wb-inst-add, .ck-wb-inst-action, .ck-wb-inst-select, .ck-wb-inst-field {
    min-height: 32px; padding: 2px 8px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); background: var(--ck-bg-soft); color: var(--ck-text); font: inherit; font-size: .85rem;
}
.ck-wb-inst, .ck-wb-inst-add, .ck-wb-inst-action { cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.ck-wb-inst[aria-expanded="true"] { border-color: var(--ck-accent); }
.ck-wb-inst-add { min-width: 32px; text-align: center; }
.ck-wb-inst:focus-visible, .ck-wb-inst-add:focus-visible, .ck-wb-inst-action:focus-visible, .ck-wb-inst-select:focus-visible, .ck-wb-inst-field:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck-wb-inst-panel { display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px 22px; padding: 6px 8px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); min-width: 0; }
.ck-wb-inst-rows { font-size: .85rem; color: var(--ck-text-dim); }
.ck-wb-inst-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: .85rem; color: var(--ck-text-dim); }
/* IC13 (seen by UX/UI #2 at 375 px in de and it): a list of a line takes the room its panel has and never more, so the panel never scrolls sideways. */
/* IC14 (UX/UI #2's P3 and Quality #3's NIT-1 on IC13): a list does not wrap; the text it shows ends with an ellipsis where the browser paints one, and the Pane list
   carries its whole text in its title (workbench-script.js). */
.ck-wb-inst-line > .ck-wb-inst-select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.ck-wb-inst-line > span { overflow-wrap: anywhere; }
.ck-wb-inst-field[hidden], .ck-wb-inst-action[hidden] { display: none; }
.ck-wb-inst-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* Quality #3 on IC2b, client NIT 10: the status line and the bound's note are never display:none while empty (a live region that was not rendered is often not read
   when it fills); empty, with no margin, they take no height. */
.ck-wb-inst-status { margin: 0; font-size: .8rem; color: var(--ck-text-dim); }
.ck-wb-inst-stopped { margin: 0; font-size: .8rem; color: var(--ck-warn-text); overflow-wrap: anywhere; }
.ck-wb-inst-panel .st-trial-rows { display: flex; flex-direction: column; gap: 6px; }
.ck-wb-inst-panel .st-trial-row { display: grid; grid-template-columns: auto minmax(60px, 1fr) 4.5em; align-items: center; gap: 0 8px; min-width: 0; }
.ck-wb-inst-panel .st-trial-row:has(.st-trial-flag) { grid-template-columns: auto auto; }
.ck-wb-inst-panel .st-trial-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em; color: var(--ck-text); }
.ck-wb-inst-panel .st-trial-mark { margin-left: 4px; color: var(--ck-accent); font-weight: bold; }
.ck-wb-inst-panel .st-trial-mark[hidden] { display: none; }
.ck-wb-inst-panel .st-trial-range, .ck-wb-inst-panel .st-trial-number { width: 100%; min-width: 0; }
/* IC9 fix (train 3, pass 059f): no browser margin on the range - 44 px tall below 1280 px, its 2 px margin made the row taller than its tallest box. */
.ck-wb-inst-panel .st-trial-range { margin: 0; }
.ck-wb-inst-panel .st-trial-number { padding: 2px 4px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); background: var(--ck-bg-soft); color: var(--ck-text); font: inherit; }
.ck-wb-inst-panel .st-trial-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; }
/* IC5 (Q#3 NIT c on IC4): an empty note or W3 region, always rendered, takes no room: the row has no vertical gap and a note with text gets its 2 px; the empty region
   gives back the panel's 6 px gap. Never display:none (a live region shown again from it is often not read). */
.ck-wb-inst-panel .st-trial-note:not(:empty) { margin-top: 2px; }
.ck-wb-inst-panel > .ck-wb-inst-stop-status:empty { margin-bottom: -6px; }
/* IC4 (UX/UI #2 P3s): the box keeps 18 px, its label carries the 44 px target; the swatch of a series' color, beside its list; W3's region, always rendered. */
.ck-wb-inst-panel .st-trial-flag-hit { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ck-wb-inst-panel .st-trial-flag { width: 18px; height: 18px; margin: 0; }
/* Feature studio-pro IC12 (UX/UI #2's IC11-15): a sample of a colour, which a contrast theme must not repaint (the case CSS Color Adjust gives); its border is
   CanvasText there, so the hue, the width and the pattern are seen on any theme. */
.ck-wb-inst-swatch { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--ck-border); forced-color-adjust: none; }
@media (forced-colors: active) {
    .ck-wb-inst-swatch { border-color: CanvasText; }
}
/* Feature studio-pro IC11: the swatch shows the line applied: its height the width (thin 2 px, normal 4, thick 8), dashes or dots cut into it. IC12 (Quality #3's
   C-n1 on IC11): it keeps its border, so that a swatch with no colour known yet is still seen. */
.ck-wb-inst-swatch[data-width] { width: 18px; border-radius: 1px; }
.ck-wb-inst-swatch[data-width="0"] { height: 2px; }
.ck-wb-inst-swatch[data-width="1"] { height: 4px; }
.ck-wb-inst-swatch[data-width="2"] { height: 8px; }
.ck-wb-inst-swatch[data-style="1"] { -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 9px); mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 9px); }
.ck-wb-inst-swatch[data-style="2"] { -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px); mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px); }
/* The two lists of a series' line, each its visible word then its list, on one line that wraps at 375 px. */
.ck-wb-inst-stroke { padding-left: 4px; }
/* Feature studio-pro IC13 (UX/UI #2's P2-1, IC11-9 and IC11-10): a series' rows are one block (a group named by the series' name): its lines 4 px apart, wrapped ones
   too; 10 px between two series, a rule of 1 px in the middle (5 + 1 + 4), the theme's border, CanvasText in forced colors. */
.ck-wb-inst-series-list { display: flex; flex-direction: column; min-width: 0; }
.ck-wb-inst-series { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ck-wb-inst-series + .ck-wb-inst-series { margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--ck-border); }
.ck-wb-inst-series .ck-wb-inst-line { row-gap: 4px; }
@media (forced-colors: active) {
    .ck-wb-inst-series + .ck-wb-inst-series, .ck-wb-indset-sample + .ck-wb-indset-sample { border-top-color: CanvasText; }
}
.ck-wb-inst-pick { display: inline-flex; align-items: center; gap: 4px; }
.ck-wb-inst-stop-status { margin: 0; }
.ck-wb-inst-capped { margin: 0; font-size: .8rem; color: var(--ck-text-dim); }
@media (max-width: 1279px) {
    /* 44 px where the page is touched (IC1's rule, the same controls). */
    .ck-wb-inst, .ck-wb-inst-add, .ck-wb-inst-action, .ck-wb-inst-select, .ck-wb-inst-field, .ck-wb-inst-panel .st-trial-range, .ck-wb-inst-panel .st-trial-number { min-height: 44px; }
    .ck-wb-inst-add { min-width: 44px; }
    .ck-wb-inst-panel .st-trial-flag-hit { min-width: 44px; min-height: 44px; }
}
.ck-script-panes { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.ck-script-panes:empty { display: none; }
/* studio-v2 follow-up lot 10 (spec §30.6): "volume unavailable", grey, never red, never an alert. */
.ck-wb-volume-unknown { margin: 4px 8px 0; font-size: 12px; color: var(--ck-text-dim); }
/* The layer of a script's drawings on the candles: laid over their svg, of the same width and viewBox, and gestures go through it. */
.ck-script-panes .sp-over { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; }
.ck-script-panes .sp-pane { margin-top: 6px; }
.ck-script-panes .sp-head { display: flex; align-items: center; gap: 12px; min-height: 28px; padding: 0 8px; overflow-x: auto; white-space: nowrap; font-size: 12px; color: var(--ck-text); }
.ck-script-panes .sp-chip { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ck-script-panes .sp-swatch { flex: none; border-radius: 2px; }
/* Lot 12 WB9 (Run & Cyber CTL-2026-11-18-1): the glyph of a script's drawing, before its swatch, 10 px like it, in the header that exists. */
.ck-script-panes .sp-mine { flex: none; }
/* UX P2 (recette of page-studio's three P2): a value is never cut, even in a chip that wraps its name (a number cut in two at 375 px). */
.ck-script-panes .sp-value { color: var(--ck-text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-script-panes .sp-stop { color: var(--ck-bad-text); }
.ck-script-panes .sp-svg { display: block; width: 100%; height: auto; background: var(--ck-bg-soft); border-radius: 8px; }
.ck-script-panes .sp-refused { padding: 6px 8px; font-size: 13px; color: var(--ck-text-dim); }
/* UX P2: Remove takes the pane out of this view, a target of 44 x 44 px kept in sight at the end of its header. A header with
   buttons wraps its chips onto more lines instead of scrolling under them: a button laid over the chips hid the last one at
   375 px (recette of PR 4b), and a touch cannot scroll a header sideways (touch-action: pan-y). A chip shrinks to its line. */
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) { min-height: 44px; flex-wrap: wrap; row-gap: 4px; overflow-x: visible; white-space: normal; }
/* UX (recette of page-studio's chips): the price's header that carries a stop's sentence wraps too, instead of scrolling sideways
   with it at 375 and 320 px; the chip that says the stop takes a line, its sentence under its name, as in the studio's preview.
   studio-v2 lot 13 (§33.5 D5): the price's header always wraps, stop or not: eight lines on the price took 535 px of a 375 px
   column and scrolled sideways, which a touch cannot do (touch-action: pan-y). */
.ck-script-panes .sp-price > .sp-head, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) { flex-wrap: wrap; row-gap: 4px; overflow-x: visible; white-space: normal; }
.ck-script-panes .sp-chip > .sp-stop { display: block; }
/* In a header that wraps, a chip is a line of text: swatch, name, value. The value follows the name's last piece with no break
   between them, so a "—" is never left alone at the end of a line when a long name is cut (UX P3). */
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) .sp-chip, .ck-script-panes .sp-price > .sp-head .sp-chip, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-chip { display: block; flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) .sp-swatch, .ck-script-panes .sp-price > .sp-head .sp-swatch, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-swatch { display: inline-block; vertical-align: middle; margin-right: 4px; }
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) .sp-mine, .ck-script-panes .sp-price > .sp-head .sp-mine, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-mine { display: inline-block; vertical-align: middle; margin-right: 4px; }
/* The value is one unbreakable piece (a number has no breaking space in any of our languages), joined to the name's last piece by a
   word joiner: "—" is a dash, which a line may break before, and that is where the browser broke, leaving it alone on its line. */
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) .sp-value, .ck-script-panes .sp-price > .sp-head .sp-value, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-value { margin-left: 4px; white-space: normal; overflow-wrap: normal; }
.ck-script-panes .sp-head:has(.sp-remove, .sp-fold) .sp-value::before, .ck-script-panes .sp-price > .sp-head .sp-value::before, .ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-value::before { content: "\2060"; }
/* After the rule above, and as specific: the chip that says the stop takes the whole line. */
.ck-script-panes .sp-head:has(> .sp-chip > .sp-stop) .sp-chip:has(> .sp-stop) { flex-basis: 100%; }
.ck-script-panes .sp-remove, .ck-script-panes .sp-fold { flex: none; margin-left: auto; min-width: 44px; min-height: 44px; padding: 0 10px;
    border: 1px solid var(--ck-border); border-radius: 6px; background: var(--ck-bg-soft); color: var(--ck-text-dim); font: inherit; cursor: pointer; }
.ck-script-panes .sp-remove:hover, .ck-script-panes .sp-remove:focus-visible, .ck-script-panes .sp-fold:hover, .ck-script-panes .sp-fold:focus-visible { color: var(--ck-text); }
/* UX P2 at 375 px: a pane folds to its header, which keeps its values; two are open at most (the module chooses which).
   The button is at the start of the header, Remove at its end, the chips between them on as many lines as they need. Wider,
   every pane is drawn and the button is not shown. */
.ck-script-panes .sp-fold { display: none; }
@media (max-width: 375px) {
    .ck-script-panes .sp-fold { display: block; order: -1; margin-left: 0; }
    .ck-script-panes .sp-pane:has(> .sp-head > .sp-fold[aria-expanded="false"]) > .sp-svg { display: none; }
}
/* UX P1-8: one time axis, under the last pane, a copy of the candles' labels; while it is there, the candles' own are not shown. */
.ck-script-panes .sp-axis { display: block; width: 100%; height: auto; }
/* studio-pro IC8 (pre-review MINOR 4): the built-in panes (the oscillators', the Volume) have one time axis, the last one's; script-panes.js hides the others. */
.ck-script-panes .sp-axis[visibility="hidden"] { display: none; }
.ck-chart-wrap:has(.ck-script-panes .sp-axis) .ck-chart g.ck-xaxis text.ck-xlab { visibility: hidden; }
.ck-chart:active { cursor: grabbing; }
.ck-chart svg text { pointer-events: none; }
.ck-chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ck-chart-btn {
    min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--ck-radius-sm); box-sizing: border-box;
    border: 1px solid var(--ck-border); background: var(--ck-panel-2); color: var(--ck-text); font: inherit; font-size: 1.1rem;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ck-chart-btn[disabled] { opacity: .5; cursor: default; }
.ck-chart-now { font-size: .9rem; font-weight: 600; }
.ck-chart-new { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--ck-accent-soft); color: var(--ck-text); }
.ck-chart-legend { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--ck-text-dim); }
.ck-chart-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* TL Phase 8W - the two kinds of IG-history data in the legend: the repair ring (7 px, the marker under a candle) and the
   filled strip (the muted candle colour over the strip's hatch). */
.ck-chart-mark-repaired { display: inline-block; width: 7px; height: 7px; border: 1.6px solid #d29922; border-radius: 50%; box-sizing: border-box; }
/* TL Phase 10D: the completed candle's ring - same size, dashed, the dim text colour (shape AND colour differ). */
.ck-chart-mark-confirmed { display: inline-block; width: 7px; height: 7px; border: 1.6px dashed var(--ck-text-dim); border-radius: 50%; box-sizing: border-box; }
/* studio-v2 m6 (spec §39.3): the ring above a candle whose volume is incomplete - same size, the Volume pane's grey. */
.ck-chart-mark-volume { display: inline-block; width: 7px; height: 7px; border: 1.6px solid #8b949e; border-radius: 50%; box-sizing: border-box; }
.ck-chart-mark-filled { display: inline-block; width: 16px; height: 10px; border-radius: 2px;
    background: repeating-linear-gradient(-45deg, #8b949e 0 2px, transparent 2px 5px), #7d9f84; }
/* TL 9C (item 3): the "No data" band's own hatch (the drawing's #3b4450 lines at 45°, every 6 px) over the plot's ground. */
.ck-chart-mark-nodata { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid var(--ck-border); box-sizing: border-box;
    background: repeating-linear-gradient(45deg, #3b4450 0 2px, transparent 2px 6px), var(--ck-bg-soft); }
/* TL 9U (UX/UI §6 E): "Market closed" (the band's dark ground) and "Missing - market open" (the band's red hatch, the "No data"
   slant in the --ck-bad family). */
.ck-chart-mark-closed { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid var(--ck-border); box-sizing: border-box;
    background: #1c2128; }
.ck-chart-mark-missing { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid rgba(248,81,73,.55); box-sizing: border-box;
    background: repeating-linear-gradient(45deg, #f85149 0 2px, transparent 2px 6px), #2a1517; }
/* Feature recorder-jours-feries-watchdog, R4b (UX2 C1, C2): the bands' own patterns - "IG had no price (quiet market)": horizontal lines of
   #58a6ff at 57 % (3.03:1 on the plot's ground), a pitch of 6; "Not checked with IG yet": 1.5 px dots of #6e7b8a, a pitch of 6, no ground. */
/* Carnet F-R5UX-4 (UX2): in the legend only, the dots are 2.5 px at a pitch of 5 (3 x 2 whole dots in the mark) - at 1.5 px the mark read as
   "Market closed" at 100 %. The plot keeps its 1.5 px dots (C2). */
.ck-chart-mark-quiet { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid var(--ck-border); box-sizing: border-box;
    background: repeating-linear-gradient(0deg, rgba(88,166,255,.57) 0 2px, transparent 2px 6px), var(--ck-bg-soft); }
.ck-chart-mark-unchecked { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid var(--ck-border); box-sizing: border-box;
    background: radial-gradient(circle, #6e7b8a 0 1.25px, transparent 1.5px) 0 0 / 5px 5px, var(--ck-bg-soft); }
/* TL 9U (UX/UI §6 B, F): "Reset view" - a secondary button of the chart's group (>= 44 px, as the others; the group wraps). */
.ck-chart-reset { font-size: .9rem; background: transparent; }
/* TL Phase 9X (item 10c, UX/UI 9X §6 D.10c): the keyboard's ring on the whole label, not only on the 13 px box (Tab
   only: a mouse click shows none). --ck-accent on the card (--ck-panel): 3.9:1. */
.ck-wb-menu > label:has(input[type=checkbox]:focus-visible) { outline: 2px solid var(--ck-accent); outline-offset: 2px; border-radius: 4px; }
/* TL 9U1 (UX/UI 9U1 §6 B.3): the line under the chart while a candle goes beyond the fixed scale, with its link back to the
   automatic scale (a >= 44 px target). */
.ck-wb-cut { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 4px 0 0; color: var(--ck-text-dim); font-size: .85rem; }
.ck-wb-cut-link { min-height: 44px; padding: 0 4px; border: none; background: transparent; color: var(--ck-link, #58a6ff); font: inherit; cursor: pointer; text-decoration: underline; }
.ck-tip-band { white-space: normal; max-width: min(260px, 72vw); }
.ck-tip-ig { color: var(--ck-text); font-style: italic; white-space: normal; max-width: min(260px, 72vw); overflow-wrap: anywhere; }
.ck-chart-tip {
    position: absolute; display: none; z-index: 5; padding: 8px 10px; border-radius: var(--ck-radius-sm); white-space: nowrap;
    background: var(--ck-panel); border: 1px solid var(--ck-border); box-shadow: 0 4px 16px rgba(0,0,0,.4);
    font-size: .82rem; color: var(--ck-text); pointer-events: none;
}
.ck-chart-tip.show { display: flex; flex-direction: column; gap: 2px; }
/* TL 9C (items 1, 6; UX/UI A.1, A.6): the edge box is as tall as its text and its text WRAPS inside it (the amber "Too many
   requests…" ran past the chart's border at 375 px with nowrap): never past the chart, never over "Back to now" (below it). */
.ck-chart-edge {
    position: absolute; top: 4px; max-width: 62%; box-sizing: border-box; padding: 6px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: .8rem; text-align: center;
}
.ck-chart-edge .ck-state { white-space: normal; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
/* TL 9E (item 11, UX/UI D.11): on 2-3 lines the pill is a rounded rectangle (never an oval), the "!" stays on the first line. */
.ck-chart-edge .ck-state { border-radius: 10px; align-items: flex-start; }
.ck-chart-edge.left { left: 4px; }
.ck-chart-edge.right { right: 4px; }
.ck-chart-edge.loading, .ck-chart-edge.failed, .ck-chart-edge.throttled, .ck-chart-edge.unavailable { background: var(--ck-panel); border: 1px solid var(--ck-border); }
/* Feature candle-fluide (UX/UI, PR 2 doubts): the indicators' legend lies over the chart's top and wraps with them; the edge's word (the server's or the module's, both
   after it) goes to the bottom of the chart then, never over a chip. */
.ck-wb-legendbox ~ .ck-chart-edge { top: auto; bottom: 4px; }   /* studio-pro IC8: the legend's box (its list and the settings beside it) */
/* TL 9C (item 6): "Loading older data…" in grey with a small grey indicator - the words, never a spinner alone. */
.ck-edge-loading { display: inline-flex; align-items: center; gap: 6px; color: var(--ck-text-dim); text-align: left; overflow-wrap: anywhere; }
.ck-spinner { width: 18px; height: 18px; border: 2px solid var(--ck-border); border-top-color: var(--ck-text-dim); border-radius: 50%; animation: ck-spin .9s linear infinite; }
.ck-spinner.small { flex: 0 0 auto; width: 10px; height: 10px; }
@keyframes ck-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ck-spinner { animation: none; } }
.ck-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ck-range-live { display: none; }
.ck-wb-chartzone[data-moving] .ck-range-server { display: none; }
.ck-wb-chartzone[data-moving] .ck-range-live { display: inline; }
/* Feature studio-pro, lot IC14 (UX/UI #2's IC11-23, confirmed with a GPU): during a gesture the chart's module puts ONE class on the zone (MarketWorkbenchPage.razor.js,
   GESTURE_CLASS, gone 150 ms after the last event): every cut line of the drawing, the price's, a pane's, a script's on the price, is painted solid, as the shape
   is what a gesture reads; its pattern comes back at rest. A declaration of the stylesheet wins over the presentation attribute, which is never rewritten. The
   legend's samples, the chips and the panel's swatches are not in these drawings and keep their pattern. */
.ck-wb-gesture :is(svg.ck-candles, svg.sp-svg, svg.sp-over) [stroke-dasharray] { stroke-dasharray: none; }
/* TL 8X (item 7): "Too many requests — try again after 14:05:32." and its "Try again" (44 px). */
.ck-throttled { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.ck-throttled .ck-state-banner { margin-bottom: 0; flex: 1 1 260px; }
.ck-retry-now {
    min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--ck-radius-sm); cursor: pointer; font: inherit; box-sizing: border-box;
    border: 1px solid var(--ck-border); background: var(--ck-panel-2); color: var(--ck-text);
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.ck-retry-now[disabled] { opacity: .7; cursor: default; }
/* TL 8S2: the same block inside the Home card, under its lines. */
.ck-overall .ck-throttled { margin: 10px 0 0; }

.ck-freshness { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 12px; color: var(--ck-text-dim); font-size: .85rem; }
/* TL 9B (UX 8Y P3 6): "Refresh now" and "Pause" wrap together, never "Pause" alone on a line. */
.ck-freshness-actions { display: inline-flex; flex-wrap: nowrap; gap: 8px; }
.ck-refresh-now, .ck-refresh-pause {
    min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--ck-radius-sm); cursor: pointer; font: inherit;
    border: 1px solid var(--ck-border); background: var(--ck-panel-2); color: var(--ck-text); text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.ck-refresh-pause { background: transparent; color: var(--ck-text-dim); }
.ck-refresh-now[disabled] { opacity: .7; cursor: default; }

.ck-component-cards { display: none; }
.ck-component-card { background: var(--ck-panel); border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); padding: 16px; margin-bottom: 10px; }
.ck-component-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ck-component-name { font-weight: 700; font-size: 16px; color: var(--ck-text); }
.ck-component-id { display: block; font-size: .75rem; color: var(--ck-text-dim); font-weight: 400; }
.ck-component-note { color: var(--ck-text-dim); font-size: 14px; margin: 6px 0 0; }
.ck-component-facts { list-style: none; margin: 10px 0 0; padding: 0; }
.ck-component-facts li { display: flex; gap: 8px; padding: 3px 0; font-size: .9rem; color: var(--ck-text); }
.ck-component-facts .ck-fact-label { color: var(--ck-text-dim); }
.ck-component-facts a { color: var(--ck-text); }
.ck-fact-bad { color: var(--ck-bad-text); }
/* TL 8S2: the recorder's line when the account's bound refused its read - amber (Watch), never red. */
.ck-fact-watch, .ck-component-facts a.ck-fact-watch, .ck-component-table a.ck-fact-watch { color: var(--ck-warn-text); }

/* Feature composants-tl-cockpit (PR-2): "Composants TL" - the cards and table above, its gestures (44 px, U13), the reason of a disabled
   gesture under it (U6), the last values greyed when EPL cannot be read (U4), a visible focus (U14). Nothing scrolls sideways at 375 px. */
.ck-tlc-intro { color: var(--ck-text-dim); max-width: 820px; margin: 0 0 10px; }
.ck-tlc-gestures { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ck-component-table .ck-tlc-gestures { margin-top: 0; }
.ck-tlc-gesture { display: inline-flex; flex-direction: column; gap: 2px; max-width: 100%; }
.ck-tlc-btn { min-height: 44px; min-width: 44px; }
.ck-tlc-btn:focus-visible, .ck-tlc-journal button:focus-visible, .ck-tlc-journal select:focus-visible, .ck-tlc-links a:focus-visible,
.ck-sheet button:focus-visible, .ck-sheet a:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck-tlc-reason { font-size: .8rem; color: var(--ck-text-dim); max-width: 16em; overflow-wrap: anywhere; }
.ck-tlc-pending { font-weight: 600; margin: 6px 0 0; color: var(--ck-text); }
.ck-tlc-stale { opacity: .55; }
.ck-tlc-old, .ck-tlc-slow { color: var(--ck-warn-text); margin: 4px 0; }
.ck-tlc-unreachable { color: var(--ck-bad-text); margin: 4px 0; }
.ck-tlc-skeleton { color: var(--ck-text-dim); }
.ck-tlc-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.ck-tlc-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ck-text); }
.ck-tlc-result { margin: 10px 0; min-height: 1.4em; }
.ck-tlc-result[data-tone="good"] { color: var(--ck-good-text); }
.ck-tlc-result[data-tone="bad"] { color: var(--ck-bad-text); }
.ck-tlc-journal { margin-top: 18px; }
.ck-tlc-journal-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.ck-tlc-journal-head h2 { margin: 0; font-size: 1.1rem; }
.ck-tlc-journal select { min-height: 44px; margin-left: 6px; max-width: 100%; }
.ck-tlc-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
/* Feature composants-tl-cockpit lot 5 (U10): the remove's destructive style, the typed id. */
.ck-tlc-btn.ck-tlc-danger:not(:disabled) { border-color: var(--ck-bad); color: var(--ck-bad-text); }
.ck-sheet .ck-sheet-primary.ck-tlc-danger { background: var(--ck-bad); color: #fff; }
.ck-tlc-typed { display: block; margin: 10px 0 4px; overflow-wrap: anywhere; }
.ck-tlc-typed-input { display: block; width: 100%; min-height: 44px; box-sizing: border-box; margin-bottom: 10px; font: inherit; }
.ck-tlc-typed-input:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck-component-card, .ck-component-table td { overflow-wrap: anywhere; }

/* G1: the phone parts are hidden on a desktop (the desktop shell is unchanged) */
.ck-tabbar, .ck-drawer-open, .ck-drawer-toggle, .ck-topbar-brand { display: none; }

/* ===========================================================================
   G1/G2/G3 - below 768 px: no side menu, full-width content, a bottom tab bar, the full menu in a drawer, one card per
   table row, 44 x 44 px targets, 16 px fields.
   =========================================================================== */
@media (max-width: 768px) {
    body { margin: 0; background: var(--ck-bg); }
    .ck-shell { display: block; height: auto; min-height: 100vh; }
    /* TL Phase 10I: the logo is not in the drawer, so neither is its tagline. */
    .ck-brand, .ck-brand-tagline { display: none; }
    .ck-topbar {
        position: sticky; top: 0; z-index: 50; height: 56px; padding: 0 10px; gap: 8px;
        flex-wrap: nowrap; overflow: hidden;
    }
    .ck-topbar-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
    .ck-topbar .ck-badge.env, .ck-topbar .ck-topbar-desktop { display: none; }
    .ck-topbar a, .ck-topbar button, .ck-drawer-open {
        min-height: 44px; min-width: 44px; box-sizing: border-box;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .ck-drawer-open {
        padding: 0 10px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
        background: var(--ck-panel-2); color: var(--ck-text); cursor: pointer; font-size: .9rem;
    }

    /* TL Phase 10I: the drawer has no tagline, so it keeps its 10 px at the top and nothing to scroll clear of. */
    .ck-sidebar { display: none; padding-top: 10px; scroll-padding-top: 0; }
    .ck-drawer-toggle:checked ~ .ck-sidebar {
        display: block; position: fixed; left: 0; right: 0; top: 56px;
        bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 60; overflow-y: auto; border-right: none;
    }
    .ck-nav-link { min-height: 44px; box-sizing: border-box; }

    .ck-main { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); overflow: visible; }

    .ck-tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--ck-bg-soft); border-top: 1px solid var(--ck-border);
    }
    .ck-tabbar a {
        flex: 1 1 0; min-width: 0; min-height: 60px; box-sizing: border-box;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        color: var(--ck-text-dim); text-decoration: none; font-size: .7rem; border-top: 3px solid transparent;
    }
    .ck-tabbar a .ck-tab-ico { font-size: 1.15rem; }
    /* TL 9F (9E left (4), UX §6 B.10): a label never cut - it may take two lines, a long word breaking only at the soft
       hyphen its string table sets (de "Abde-ckung"), at 11.2 px; the bar grows, the page's bottom padding (96 px) stays
       above its height. */
    .ck-tabbar a > span:last-child { max-width: 100%; padding: 0 2px; box-sizing: border-box; text-align: center; line-height: 1.15; hyphens: manual; overflow-wrap: normal; word-break: normal; }
    .ck-tabbar a.active { color: var(--ck-text); font-weight: 700; border-top-color: var(--ck-accent); background: var(--ck-panel); }

    /* G2: targets and fields */
    .ck-main a.ck-help-launch, .ck-main button, .ck-main select,
    .ck-main input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
    .ck-main summary, .ck-footer a, .ck-list a {
        min-height: 44px; box-sizing: border-box;
    }
    .ck-main a.ck-help-launch, .ck-main button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; }
    /* A display rule beats the browser's own [hidden]: a hidden button stays hidden, it is not a target. */
    .ck-main button[hidden] { display: none; }
    .ck-list a, .ck-footer a { display: inline-flex; align-items: center; min-width: 44px; }
    .ck-main input, .ck-main select, .ck-main textarea { font-size: 16px; }
    /* A select sizes to its longest option (the workbench's instrument list): never wider than the content. */
    .ck-main select, .ck-main input:not([type=checkbox]):not([type=radio]) { max-width: calc(100vw - 28px); }
    .ck-main label { max-width: 100%; min-width: 0; }
    .ck-main label:has(input[type=checkbox]) { min-height: 44px; }
    .ck-main label:has(> input[type=checkbox]) { display: inline-flex; align-items: center; }
    .ck-help-icon {
        width: 44px; height: 44px; background: radial-gradient(circle, var(--ck-accent) 0 10px, transparent 11px);
        font-size: .8rem;
    }
    .ck-help-icon:hover { background: radial-gradient(circle, #4c97ff 0 10px, transparent 11px); }

    /* G3: one card per table row */
    table.ck-rtable, table.ck-rtable tbody, table.ck-rtable tr, table.ck-rtable td { display: block; width: 100%; box-sizing: border-box; }
    table.ck-rtable thead { display: none; }
    table.ck-rtable tr {
        background: var(--ck-panel); border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
        padding: 8px 12px; margin-bottom: 10px;
    }
    table.ck-rtable td {
        display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: none !important; text-align: right;
    }
    table.ck-rtable td::before { content: attr(data-label); color: var(--ck-text-dim); text-align: left; }
    table.ck-rtable td[data-label=""]::before { content: none; }
    /* TL Phase 9X (item 11, UX/UI 9X §6 E): the credentials' cards - the reference under its label, wrapping anywhere (never
       letter by letter in the right half), the actions a left-aligned wrapping row of 44 px targets, in their order. */
    table.ck-cred-table td.ck-cred-ref { flex-direction: column; justify-content: flex-start; gap: 2px; text-align: left; }
    table.ck-cred-table td.ck-cred-ref code { overflow-wrap: anywhere; min-width: 0; }
    table.ck-cred-table td.ck-cred-actions { flex-wrap: wrap; justify-content: flex-start; gap: 8px; white-space: normal; text-align: left; }
    table.ck-cred-table td.ck-cred-actions > button { min-height: 44px; padding: 0 10px; margin: 0; }

    /* TL 8S1 (item 0): the chart's phone drawing (taller). TL 10G (R-UX-3 §B.9): the instrument on one line, the chips on the
       next, 44 px; the menus span the width under their button, so they never widen the page. */
    .ck-chart-phone { display: block; }
    .ck-chart-desk { display: none; }
    .ck-wb-opening-frame { aspect-ratio: 360 / 340; }
    .ck-chart-card { padding: 4px; margin-left: -6px; margin-right: -6px; }
    .ck-wb-controls { gap: 8px; padding: 10px; }
    .ck-wb-instrument { flex: 1 1 100%; }
    .ck-wb-instrument select { width: 100%; }
    .ck-wb-chipline { flex: 1 1 100%; }
    .ck-wb-chips { flex: 1 1 0; min-width: 0; }
    .ck-wb-chip { flex: 1 1 auto; min-width: 44px; min-height: 44px; padding: 0 4px; }
    .ck-wb-menubtn { min-height: 44px; }
    .ck-wb-menuwrap { position: static; }
    /* studio-v2 lot 14 (UX/UI #2 P2-c): bounded at the top of the tab bar when it opens (fitMenu, MarketWorkbenchPage.razor.js), it scrolls. */
    .ck-wb-menu, .ck-wb-menu.end { left: 16px; right: 16px; top: auto; position: fixed; width: auto; max-width: none; margin-top: 4px; overflow-y: auto; overscroll-behavior: contain; }
    .ck-wb-check { min-height: 44px; }
    .ck-wb-legendbox { left: 44px; max-width: calc(100% - 60px); }
    /* TL 8S1 (item 2): one card per component on a phone, the table on a desktop - the same words, in the same order. */
    .ck-component-table { display: none; }
    .ck-component-cards { display: block; }

    .ck-tiles { grid-template-columns: 1fr; }
    .ck-grid-2 { grid-template-columns: 1fr; }
    .ck-card { padding: 14px; }
    h1 { font-size: 1.45rem; }
    pre, code { white-space: pre-wrap; word-break: break-word; }
}

/* Feature candle-ux (UX/UI A): under 480 px the first screen is the chart's. The title for a screen reader alone (the active tab says it);
   instrument, Indicators and ⋯ on a line, the instrument taking what is left; six chips of short words on the next, the price reminder on its
   own line inside the active one. Visual order only: the keyboard still goes instrument, chips, Indicators, ⋯. */
.ck-wb-short, .ck-wb-phone-only { display: none; }
@media (max-width: 480px) {
    .ck-main:has(.ck-page-head-quiet) { padding-top: 8px; }
    .ck-page-head-quiet { margin: 0; }
    .ck-page-head-quiet h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .ck-wb-controls { gap: 6px; padding: 8px; margin-bottom: 6px; }
    .ck-wb-instrument { order: 1; flex: 1 1 0; }
    .ck-wb-instrument-word { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .ck-wb-instrument select { padding-left: 6px; padding-right: 2px; }
    .ck-wb-menuwrap { order: 2; flex: 0 0 auto; }
    .ck-wb-menubtn { padding: 0 8px; white-space: nowrap; }
    .ck-wb-chipline { order: 3; }
    .ck-wb-chipline > .ck-help-icon { display: none; }
    .ck-wb-chips { display: flex; }
    .ck-wb-chip { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; min-width: 40px; padding: 0 2px; line-height: 1.15; }
    .ck-wb-chip [data-role="basis-reminder"] { font-size: 12px; font-weight: 400; white-space: nowrap; }
    .ck-wb-long { display: none; }
    .ck-wb-short { display: inline; }
    .ck-wb-phone-only { display: flex; align-items: center; gap: 4px; }
    /* The band's "?" keeps its 44 px target over the rows around it, without making its row 44 px high. "Up to date" adds nothing to the band's age. */
    .ck-wb-band { margin-top: 0; font-size: .82rem; }
    .ck-wb-band .ck-help-icon { margin-block: -13px; }
    /* A closed market has no volume: its slot would push the time of the last price onto a third row. */
    .ck-wb-band-closed .ck-wb-band-row:last-of-type .ck-wb-band-item:first-child { display: none; }
    .ck-wb-dataline { margin: 2px 0 4px; font-size: .82rem; }
    .ck-wb-dataline .ck-state[data-tone="good"] { display: none; }
}

/* ===========================================================================
   TL 8Y (ADR-188, UX/UI ux-criteria-coverage-8S1-8Y.md §2) - /coverage: the period shortcuts, the sentence, the timeline
   (one row per Paris day; every band has a pattern AND a legend word, never colour alone) and the gap cards.
   =========================================================================== */
/* TL 9B: the period buttons and, beside them, "Refreshing…" (a role="status" region, empty while idle). */
.ck-coverage-periodbar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; margin: 0 0 12px; }
.ck-coverage-refreshing { color: var(--ck-text-dim); font-size: .85rem; }
.ck-coverage-periods { display: flex; flex: 1 1 auto; border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); overflow: hidden; margin: 0; max-width: 480px; }
/* TL 9B (UX 8U P3): one line each in the five languages - short words first, the padding before the font. */
.ck-coverage-period {
    flex: 1 1 0; min-height: 44px; padding: 0 8px; border: none; border-left: 1px solid var(--ck-border);
    background: var(--ck-bg-soft); color: var(--ck-text); cursor: pointer; font: inherit; white-space: nowrap;
}
.ck-coverage-period:first-child { border-left: none; }
.ck-coverage-period.current { background: var(--ck-accent-soft); font-weight: 700; box-shadow: inset 0 -3px 0 var(--ck-accent); }
.ck-coverage-period[disabled] { opacity: .6; cursor: default; }
.ck-coverage-computing { color: var(--ck-text-dim); padding: 12px 0; }
.ck-coverage-sentence { margin-bottom: 10px; flex-wrap: nowrap; align-items: flex-start; }
.ck-coverage-sentence > span:last-child { color: var(--ck-text); }
.ck-coverage-instrument { margin-bottom: 18px; }

.ck-tl-band { position: absolute; top: 0; bottom: 0; display: block; }
.ck-tl-band.recorded { background: var(--ck-good); }
.ck-tl-band.closed { background: var(--ck-bg-soft) repeating-linear-gradient(45deg, rgba(159,179,200,.30) 0 2px, transparent 2px 6px); }
.ck-tl-band.update { background: var(--ck-warn); }
.ck-tl-band.unknown { background: rgba(210,153,34,.30) radial-gradient(circle, var(--ck-warn) 1.2px, transparent 1.6px) 0 0 / 4px 4px; }
.ck-tl-band.outage { background: var(--ck-bad); }
/* TL 9B: before the first recording - grey with a dashed outline (Market closed is hatched: more than colour apart). */
.ck-tl-band.notyet { background: rgba(159,179,200,.16); border: 1px dashed rgba(159,179,200,.75); box-sizing: border-box; }
/* TL 9B: before the period starts - the lightest fill, no hatch, no outline: not a gap, not "not recorded yet".
   TL 9F (UX 9B recette P3): it was 1.1:1 against the track on the dark theme (invisible); a flat grey at 3.2:1 against
   the track (#0f1722), below every coloured band, and the same colour on the legend swatch. */
.ck-tl-band.outside { background: #5f6876; }
/* TL 9F (UX 9B recette P2): an ongoing clean stop past the bound is red on the timeline and on its card, with the sentence. */
.ck-tl-band.update.overdue { background: var(--ck-bad); }
/* TL Phase 8W - a gap filled / repaired from IG's history: the workbench's filled pattern (muted green under a grey hatch),
   never the plain green of "Recorded". */
.ck-tl-band.igfilled { background: repeating-linear-gradient(-45deg, #8b949e 0 2px, transparent 2px 5px), #7d9f84; }

.ck-tl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; padding: 0; font-size: .78rem; color: var(--ck-text-dim); }
.ck-tl-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ck-tl-swatch { position: relative; display: inline-block; width: 14px; height: 10px; border-radius: 2px; flex: none; }
.ck-tl-swatch.unknown::after { content: "?"; position: absolute; inset: -3px 0 0; font-size: 9px; font-weight: 700; color: var(--ck-text); text-align: center; }

.ck-tl { margin: 0 0 10px; }
.ck-tl-axis, .ck-tl-day { display: grid; grid-template-columns: 58px 1fr; align-items: center; column-gap: 6px; }
/* TL 9B (UX 8Y P3 5.2): every timeline text at 12 px at least, on the page's background (>= 4.5:1). */
.ck-tl-scale { position: relative; height: 15px; font-size: .75rem; line-height: 15px; color: var(--ck-text-dim); }
.ck-tl-scale > span { position: absolute; top: 0; transform: translateX(-50%); }
.ck-tl-scale > span:first-child { transform: none; }
.ck-tl-scale > span:last-child { transform: translateX(-100%); }
/* TL 9B (UX 8Y P3 5.1): 6 px between rows, so each tap target reaches 3 px above and below its bar without touching the next. */
.ck-tl-day { margin-top: 6px; --ck-tl-h: 18px; }
.ck-tl-label { font-size: .75rem; color: var(--ck-text-dim); white-space: nowrap; }
.ck-tl-label small { display: block; font-size: .75rem; }
.ck-tl-lane { position: relative; display: block; }
.ck-tl-track { position: relative; display: block; height: var(--ck-tl-h); background: var(--ck-bg); border-radius: 3px; overflow: hidden; }
.ck-tl-gap { min-width: 3px; }
.ck-tl-gap.selected { outline: 2px solid var(--ck-text); outline-offset: -2px; }
/* The tap targets: a layer over the bar, the bar's height + 3 px each side (never the phone's 44 px button minimum: it would
   reach into the next day); 44 px wide around the mark, split at the midpoint with a neighbour (CoverageView.HitTargets). */
.ck-tl-hits { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ck-tl-h); }
.ck-tl-hits > .ck-tl-hit { position: absolute; top: -3px; bottom: -3px; height: auto; min-height: 0; min-width: 0; margin: 0; padding: 0; border: none; background: transparent; cursor: pointer; }
.ck-tl-hit:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: -2px; border-radius: 3px; }
.ck-tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ck-accent); }
/* TL 9B (UX 8U P3): "now" in its own lane ABOVE today's bar - never over the bar, whatever the word's length. */
.ck-tl-day.today .ck-tl-lane { padding-top: 16px; }
.ck-tl-nowlabel { position: absolute; top: 0; font-size: .75rem; line-height: 15px; color: var(--ck-text); white-space: nowrap; transform: translateX(-50%); }
.ck-tl-nowlabel[data-align="start"] { transform: none; }
.ck-tl-nowlabel[data-align="end"] { transform: translateX(-100%); }

.ck-gap-title { font-size: 1rem; margin: 14px 0 8px; }
.ck-gap-none { display: inline-flex; gap: 6px; }
.ck-gap-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ck-gap-card { background: var(--ck-panel); border: 1px solid var(--ck-border); border-left-width: 4px; border-radius: var(--ck-radius-sm); padding: 10px 12px; }
.ck-gap-card.outage { border-left-color: var(--ck-bad); }
.ck-gap-card.update { border-left-color: var(--ck-warn); }
.ck-gap-card.unknown { border-left-color: var(--ck-warn); border-left-style: dotted; }
.ck-gap-card.selected, .ck-gap-card:focus { outline: 2px solid var(--ck-accent); outline-offset: 1px; }
.ck-gap-kind { display: flex; align-items: center; gap: 6px; }
.ck-gap-kind .ck-tl-band { position: relative; }
.ck-gap-card.outage .ck-gap-ico { color: var(--ck-bad-text); }
.ck-gap-card.update .ck-gap-ico, .ck-gap-card.unknown .ck-gap-ico { color: var(--ck-warn-text); }
.ck-gap-card.update.overdue { border-left-color: var(--ck-bad); }
.ck-gap-card.update.overdue .ck-gap-ico { color: var(--ck-bad-text); }
.ck-gap-when { color: var(--ck-text); font-size: .9rem; margin-top: 4px; }
.ck-gap-cause { color: var(--ck-text-dim); font-size: .88rem; margin-top: 2px; }
.ck-gap-check { color: var(--ck-bad-text); font-size: .88rem; font-weight: 600; margin-top: 4px; }
/* TL Phase 8W - the card's IG-history line (what was done about the gap). */
.ck-gap-fill { color: var(--ck-text); font-size: .88rem; margin-top: 4px; overflow-wrap: anywhere; }
/* TL 9E (item 8): IG had nothing to add - final and neutral, grey (never amber, red or the filled mark). */
.ck-gap-fill.neutral { color: var(--ck-text-dim); }
.ck-gap-fill.filled::before { content: ""; display: inline-block; width: 12px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: middle;
    background: repeating-linear-gradient(-45deg, #8b949e 0 2px, transparent 2px 5px), #7d9f84; }
.ck-gap-more { margin-top: 8px; min-height: 44px; }
.ck-coverage-details-host { margin-top: 18px; }
/* UX/UI P3 (8S1): the technical view's fields follow the dark theme (they were native white fields). */
.ck-coverage-details-host input, .ck-coverage-details-host select {
    color-scheme: dark; background: var(--ck-bg-soft); color: var(--ck-text); border: 1px solid var(--ck-border);
    border-radius: 4px; min-height: 32px; padding: 2px 6px; font: inherit;
}
@media (max-width: 768px) {
    .ck-coverage-periodbar { margin-bottom: 10px; }
    .ck-coverage-periods { max-width: none; flex-basis: 100%; }
    .ck-coverage-period { padding: 0 4px; }
    .ck-coverage-refreshing:not(:empty) { margin-top: 4px; }
    /* UX/UI §2.5.1: the sentence AND the 7 days fit the first screen above the tab bar - compact blocks on a phone. */
    .ck-coverage-page .ck-state-banner { padding: 8px 10px; margin-bottom: 8px; font-size: .9rem; }
    .ck-coverage-page .ck-freshness { margin: 2px 0 8px; }
    .ck-coverage-page h2 { margin: 4px 0 6px; }
    .ck-tl-legend { margin-bottom: 4px; }
    .ck-tl-axis, .ck-tl-day { grid-template-columns: 50px 1fr; column-gap: 4px; }
    .ck-tl-day { --ck-tl-h: 16px; }
    .ck-gap-cards { grid-template-columns: 1fr; }
    .ck-coverage-details-host input, .ck-coverage-details-host select { font-size: 16px; min-height: 44px; }
}

/* ── TL Phase 8U (ADR-184) — the language selector: a flag AND a code on a 44 x 44 px button, five 44 px rows, each a flag and
   the language's own name, the current one ticked. A native details/summary: it opens without a script. ── */
.ck-lang { position: relative; display: inline-flex; margin: 0; }
.ck-lang-menu > summary { list-style: none; }
.ck-lang-menu > summary::-webkit-details-marker { display: none; }
.ck-lang-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 0 10px; cursor: pointer;
    border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm); background: var(--ck-panel-2);
    color: var(--ck-text); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.ck-lang-button:focus-visible, .ck-lang-option:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck-lang-flag { width: 21px; height: 14px; display: block; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.ck-lang-list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 200px; box-sizing: border-box;
    display: flex; flex-direction: column; padding: 4px;
    background: var(--ck-panel); border: 1px solid var(--ck-border); border-radius: var(--ck-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.ck-lang-option, .ck-topbar .ck-lang-option {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%;
    min-height: 44px; box-sizing: border-box; padding: 0 12px; cursor: pointer; text-align: left;
    background: none; border: none; border-radius: var(--ck-radius-sm); color: var(--ck-text); font: inherit; font-size: .95rem;
}
.ck-lang-option:hover, .ck-lang-option:focus { background: var(--ck-accent-soft); }
.ck-lang-option.current { font-weight: 700; }
.ck-lang-check { margin-left: auto; color: var(--ck-good-text); font-weight: 700; }
/* The sign-in page: above the card, on the right. */
.tl-login-lang { width: 100%; max-width: 360px; display: flex; justify-content: flex-end; }
@media (max-width: 768px) {
    /* The phone's top bar hides what overflows it: the list is placed against the screen, under the bar. */
    .ck-topbar .ck-lang-list { position: fixed; top: 56px; right: 8px; }
    /* One line in every language (measured: German "Nur Lesen" wrapped beside "Abmelden"): words never wrap, and the
       "TraderLab" word gives its room to the Read-only badge on an Internet session (the page title still says it). */
    .ck-topbar .ck-badge, .ck-topbar .ck-help-launch { white-space: nowrap; }
    .ck-topbar:has(.ck-badge.recovery) .ck-topbar-brand, .ck-topbar:has(.ck-badge.actions) .ck-topbar-brand { display: none; }
    /* Studio v2 lot g5 (UX/UI #2's P2-3 on 760ddfa62): at 375 px in French the bar held 466 px and cut "Se déconnecter". The forms of the bar (the language,
       the sign-out) and the menu never shrink; the badges and the brand give their room (the brand first), clipped, never the sign-out. */
    .ck-topbar > form, .ck-topbar > .ck-drawer-open { flex: none; }
    /* A span only (the pre-review of 985ab6364, NIT-b): a badge that is a link keeps the bar's 44 px target (.ck-topbar a above). */
    .ck-topbar span.ck-badge { min-width: 0; flex-shrink: 1; overflow: hidden; }
    .ck-topbar .ck-topbar-brand { min-width: 0; flex-shrink: 100; overflow: hidden; }
    /* Feature sans-passkey-section lot 4 (UX/UI #2 P2-1 on lot 3): at 375 px the recovery badge was cut mid-word in fr, de and es ("Code de secou"):
       a badge that has a short word shows it here, whole, and the long one gives way (CockpitMfaBadge.ShortWord; the title keeps AC-19's sentence).
       Lot 5 (Quality #3 M1 on lot 4): here, at 768 px and below, not only under 480 px - the bar clips a badge from 768 px (span.ck-badge above),
       and the long de and es recovery words were still cut between 481 and 768 px; "Actions on" has its short word too. The sign-out is unchanged. */
    .ck-topbar .ck-badge-long { display: none; }
    .ck-topbar .ck-badge-short { display: inline; }
}
@media (max-width: 480px) {
    /* Lot g5 (P2-3): on a phone, a session that signs out gives the "TraderLab" word and its flask to the sign-out (the page title still says it), as the
       Internet session's badge does above. */
    .ck-topbar:has(form[action="/auth/logout"]) .ck-topbar-brand { display: none; }
}
/* Studio v2 lot g5, the pre-review of 985ab6364 (MINOR-1): with the studio's reference enlarged (studio.css, fixed from 56 px down, z-index 1050), the top
   bar's buttons are in reach, but what they open dropped under it: the language list (70, inside the bar's own layer, 50) and, at 768 px and below, the ☰
   menu's drawer (60). While the reference is enlarged, the bar and the open drawer are lifted just above it (1060), under the keys' window and toast
   (1100-1102) and the sign-out question (1200). A layer, not a shrink: nothing of the studio's state changes, and no script is needed for a native
   details/summary or a checkbox. The bar needs no position for it: it is a grid item of .ck-shell from 769 px, and sticky at 768 px and below. The second
   selector outweighs the studio page's sticky bar (.ck-shell:has(#pi2r-studio) > .ck-topbar, an id inside :has). */
body:has(.st-lib-reference.st-lib-wide) .ck-topbar, .ck-shell:has(#pi2r-studio .st-lib-reference.st-lib-wide) > .ck-topbar { z-index: 1060; }
/* Lot g6 (Quality #3's NIT (b) on g5): the ☰ menu's drawer exists at 768 px and below only. Wider, the side menu is a column of the grid: a checkbox left
   checked (the window widened after it) lifted it over the enlarged reference, which is meant to be on top of the cockpit there. */
@media (max-width: 768px) {
    body:has(.st-lib-reference.st-lib-wide) .ck-drawer-toggle:checked ~ .ck-sidebar { z-index: 1060; }
}

/* ── TL Phase 8T (ADR-183, UX/UI 8T §1-§6): the second factor ─────────────────────────────────────────────────────── */
.ck-dim { color: var(--ck-text-dim); }
.ck-warn-text { color: var(--ck-warn-text); }
/* §1: "Actions on" is the ACCENT (blue), never green; a recovery code used is AMBER; the box says "Server", neutral. */
.ck-badge.actions { background: rgba(47,129,247,.16); color: #79b0ff; border-color: rgba(47,129,247,.5); text-decoration: none; font-size: .78rem; }
/* sans-passkey-section lot 3 (P2-3): a session opened with a recovery code - amber, its own word; there is no read-only badge any more. */
.ck-badge.recovery { background: rgba(210,153,34,.14); color: var(--ck-warn-text); border-color: rgba(210,153,34,.45); text-decoration: none; font-size: .78rem; }
/* Lot 4 (P2-1): the short word of a badge is drawn on a narrow screen only (at 768 px and below since lot 5: the media query above). */
.ck-badge-short { display: none; }
.ck-badge.server { background: var(--ck-panel-2); color: var(--ck-text-dim); border-color: var(--ck-border); font-size: .78rem; }
.ck-tile-actions { margin-top: 6px; font-size: .82rem; color: #79b0ff; }

/* The recorder's Internet actions (§4): 44 px targets, the key icon, never a refusal drawn as an active button. */
.ck-internet-actions .ck-ia-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ck-border); }
.ck-internet-actions .ck-ia-row:first-of-type { border-top: 0; }
.ck-ia-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-ia-btn {
    min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(47,129,247,.55);
    background: rgba(47,129,247,.12); color: var(--ck-text); font-size: 1rem; cursor: pointer;
}
.ck-ia-btn.ck-ia-locked { border-color: var(--ck-border); background: var(--ck-panel-2); color: var(--ck-text-dim); }
.ck-ia-btn:disabled { opacity: .55; cursor: default; }
.ck-ia-result { margin: 8px 0 0; font-size: .95rem; }
.ck-ia-result[data-tone="good"] { color: var(--ck-good-text); }
.ck-ia-result[data-tone="bad"] { color: var(--ck-bad-text); }

/* §3: the confirmation sheet - at the bottom of the screen up to 768 px, a centred box on a desktop. */
.ck-sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; }
.ck-sheet {
    position: fixed; z-index: 1001; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow: auto;
    background: var(--ck-panel); color: var(--ck-text); border-top: 1px solid var(--ck-border);
    border-radius: 14px 14px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 10px; box-sizing: border-box;
}
.ck-sheet h2 { margin: 0; font-size: 1.15rem; }
.ck-sheet p { margin: 0; }
.ck-sheet-primary, .ck-sheet-secondary {
    display: block; width: 100%; min-height: 48px; border-radius: 10px; font-size: 1rem; text-align: center;
    line-height: 48px; padding: 0 12px; box-sizing: border-box; cursor: pointer; text-decoration: none;
}
.ck-sheet-primary { background: var(--ck-accent); color: #fff; border: 0; }
.ck-sheet-secondary { background: transparent; color: var(--ck-text); border: 1px solid var(--ck-border); }
.ck-sheet-primary:disabled, .ck-sheet-secondary:disabled { opacity: .6; cursor: default; }
.ck-sheet-warn { color: var(--ck-warn-text); }
@media (min-width: 769px) {
    .ck-sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 420px; border-radius: 12px; border: 1px solid var(--ck-border); }
}
/* Studio v2 lot g5 (Quality #3's MINOR-1 on g4): the question asked before a sign-out (studio.js) opens above every layer of the studio, on any page of the
   cockpit: the enlarged reference (1050), the keys' window and toast (1100-1102). Under them, a sign-out by the keyboard landed on a button nobody saw. */
.ck-sheet-backdrop.st-signout-backdrop { z-index: 1200; }
/* Lot g5 (UX/UI #2's P3 on 760ddfa62): the question is put on <body>, outside .ck-shell, which sets the cockpit's font: it sets it itself. */
.ck-sheet.st-signout-ask { z-index: 1201; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
/* Lot g6 (Run & Cyber's MINOR-1 of CTL-2026-11-22-18): the line of a "Save, then sign out" that could not save everything, above the count: amber (Watch). */
.ck-sheet.st-signout-ask .st-signout-failed { margin: 0 0 8px; color: var(--ck-warn-text); font-weight: 600; }

/* §2: "Confirm it's you" - the main button full width, 48 px; the two other ways visible without scrolling. */
.tl-login-intro { margin: 0 0 12px; color: var(--ck-text-dim); font-size: .95rem; }
.tl-login-card .tl-passkey-primary { width: 100%; min-height: 48px; font-size: 16px; }
.tl-passkey-explained { margin: 8px 0 0; color: var(--ck-text-dim); font-size: .85rem; }
.tl-passkey-secondary { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.tl-passkey-secondary a { display: flex; align-items: center; min-height: 44px; color: var(--ck-text); }
.tl-passkey-secondary summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.tl-login-wait[hidden] { display: none; }
.tl-login-wait[data-passkey-status]::before { content: "!"; font-weight: 700; }

/* Feature acces-internet (UX AI-1-2, AI-2-3, AI-2-4): the code comes first, the passkey is the secondary button; the QR is black on
   WHITE with its quiet zone in every theme, at least 200 px, crisp; the key in a fixed-width font, in groups of 4, wrapping at 375 px. */
.tl-login-card .tl-passkey-secondary-button { margin-top: 14px; background: transparent; color: var(--ck-text); border: 1px solid var(--ck-border); }
.ck-totp-card { max-width: 420px; }
.ck-totp-qr { display: block; width: fit-content; max-width: 100%; margin: 10px 0; background: #ffffff; line-height: 0; }
.ck-totp-qr svg { display: block; width: 232px; height: 232px; max-width: 100%; }
.ck-totp-phone { display: inline-flex; align-items: center; min-height: 44px; color: var(--ck-text); }
.ck-totp-key-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.ck-totp-key { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 18px; letter-spacing: .06em; overflow-wrap: anywhere; margin: 6px 0; }

/* §5: the enrolment's steps, the ticket field (16 px, dictable), the codes (fixed-width, >= 18 px, no horizontal scroll). */
.ck-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0 0 12px; font-size: .9rem; color: var(--ck-text-dim); }
.ck-steps li span { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid var(--ck-border); margin-right: 4px; }
.ck-steps li.current { color: var(--ck-text); font-weight: 700; }
.ck-steps li.current span { background: var(--ck-accent); border-color: var(--ck-accent); color: #fff; }
.ck-steps li.done span { border-color: var(--ck-good); color: var(--ck-good-text); }
.ck-enrol-field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; color: var(--ck-text-dim); }
.ck-enrol-field input { min-height: 48px; font-size: 16px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ck-border); background: var(--ck-panel-2); color: var(--ck-text); }
.ck-ticket-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.ck-enrol-primary, .ck-enrol-secondary {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 10px;
    font-size: 1rem; cursor: pointer; text-decoration: none; margin-top: 8px;
}
.ck-enrol-primary { background: var(--ck-accent); color: #fff; border: 0; width: 100%; }
.ck-enrol-primary.disabled, .ck-enrol-primary:disabled { opacity: .5; pointer-events: none; }
.ck-enrol-secondary { background: transparent; color: var(--ck-text); border: 1px solid var(--ck-border); }
.ck-enrol-warn { color: var(--ck-warn-text); }
.ck-enrol-ok { color: var(--ck-good-text); font-weight: 700; }
.ck-enrol-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 10px; }
.ck-enrol-check input { width: 22px; height: 22px; }
/* Feature sans-passkey-section lot 3 (UX P3-f): the second step's links (the passkey page's fixed link, the authenticator page's way back) are 44 px targets. */
.ck-enrol-link { display: inline-flex; align-items: center; min-height: 44px; }
.ck-enrol-another { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--ck-border); color: var(--ck-text-dim); }
.ck-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5em, 1fr)); gap: 6px 14px; padding-left: 1.6em; margin: 8px 0; }
.ck-codes code { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .04em; white-space: nowrap; }

/* §6: the Security page's ticket, shown large. */
.ck-ticket { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .08em; margin: 6px 0; }
.ck-confirm { border: 1px solid var(--ck-border); border-radius: 8px; padding: 8px; background: var(--ck-panel-2); }
.ck-help-launch.danger { border-color: rgba(248,81,73,.55); color: var(--ck-bad-text); }

/* TL Phase 9H (UX/UI 9H §6): the strategy pages on a phone - the outcome right under Evaluate, targets of 44 px, fields of
   16 px (no zoom on focus), a wide table scrolls inside its card, never the page. */
.ck-strategy .ck-grid-2 > * { min-width: 0; }
.ck-strategy input, .ck-strategy select { font-size: 1rem; min-height: 44px; box-sizing: border-box; max-width: 100%; }
.ck-strategy label { max-width: 100%; }
.ck-strategy input[type="checkbox"] { min-height: 0; width: 22px; height: 22px; }
.ck-strategy button { min-height: 44px; }
.ck-strategy .ck-eval-run { font-size: 1rem; padding: 0 16px; }
.ck-eval-status, .ck-eval-refusal { margin-top: 8px; }
.ck-eval-status:empty, .ck-eval-refusal:empty { margin-top: 0; }
.ck-eval-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ck-eval-see { display: inline-flex; align-items: center; min-height: 44px; }
.ck-eval-refusal { color: var(--ck-bad-text); }
.ck-eval-footnote { font-size: .78rem; color: var(--ck-text-dim); margin: 8px 0 0; }

/* ── TL Phase 9T (UX/UI §6 D-E): the alert strip - the first element of <main>, the width of the content column, NOT
   sticky (it scrolls with the page). The red family of the shared guide: a red left border, the ✕ and the word
   "Problem", never colour alone; no animation. Text on its background: #e7eef6 ≈ 14:1, the red word #ff7b72 ≈ 6:1, the
   dimmed "(25 min ago)" ≈ 7:1, the link ≈ 7:1. 1280 px: one line; 375 px: the sentence wraps, the link and the button go
   on their own line below, each a 44 px tap target. ─────────────────────────────────────────────────────────────────── */
.ck-alert {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
    margin: 0 0 16px; padding: 10px 14px;
    background: rgba(248,81,73,.12); border: 1px solid rgba(248,81,73,.45); border-left: 4px solid var(--ck-bad);
    border-radius: var(--ck-radius-sm); color: var(--ck-text);
}
.ck-alert-text { margin: 0; flex: 1 1 24rem; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.ck-alert-text > strong, .ck-alert-ico { color: var(--ck-bad-text); }
.ck-alert-ago { color: var(--ck-text-dim); }
.ck-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; flex: 0 0 auto; }
.ck-alert-link { color: #79b0ff; font-weight: 600; }
.ck-alert-hide {
    background: transparent; color: var(--ck-text); border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius-sm); padding: 4px 10px; font: inherit; cursor: pointer;
}
.ck-alert-hide:hover { background: var(--ck-bg-soft); }
@media (max-width: 768px) {
    .ck-alert-text { flex-basis: 100%; }
    .ck-alert-actions { flex-basis: 100%; }
    .ck-alert-link, .ck-alert-hide { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Feature comptes: /admin/script-access */
.ck-sa-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.ck-sa-fields label { display: flex; flex-direction: column; gap: 4px; }
.ck-sa-select { max-width: 100%; box-sizing: border-box; }
.ck-sa-chevron, .ck-sa-link { background: none; border: 0; color: var(--ck-accent); cursor: pointer; }
.ck-sa-chevron { font-size: 1.25rem; line-height: 1; }
.ck-sa-link { text-decoration: underline; padding: 0; }
/* UX §20.6: a reason in an option must not widen the table; a closed list may cut, its open list shows everything. */
@media (min-width: 769px) {
    select.ck-sa-select { max-width: 10rem; }
}
@media (max-width: 768px) {
    .ck-sa-select { width: 100%; min-height: 44px; }
    .ck-sa-fields label { width: 100%; }
    .ck-sa-chevron, .ck-sa-link { min-width: 44px; min-height: 44px; }
}

/* Feature candle-fluide (UX/UI, PR 1 doubts): the old series stays under the new choice while it reads, muted, with the words that exist. */
.ck-chart-stale svg { opacity: .55; }

/* Feature acces-internet PR 3 (UX AI-4-1, AI-4-3, AI-4-6): the Administration page - one column, an entry = a line of 44 px at least, the
   sentence under the name, the state under them. */
.ck-admin-intro { max-width: 820px; color: var(--ck-text-dim); }
.ck-admin-group h2 { font-size: 1.05rem; margin: 0 0 8px; }
.ck-admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-admin-entry { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--ck-border); min-width: 0; }
.ck-admin-entry:first-child { border-top: 0; }
.ck-admin-link { display: flex; flex-direction: column; min-height: 44px; justify-content: center; text-decoration: none; color: var(--ck-text); overflow-wrap: anywhere; }
a.ck-admin-link:hover .ck-admin-name, a.ck-admin-link:focus-visible .ck-admin-name { text-decoration: underline; }
.ck-admin-name { font-weight: 600; color: var(--ck-accent-text, var(--ck-text)); }
.ck-admin-closed .ck-admin-name { color: var(--ck-text-dim); }
.ck-admin-sentence { color: var(--ck-text-dim); font-size: .92rem; }
.ck-admin-state { font-size: .88rem; color: var(--ck-warn-text); overflow-wrap: anywhere; }

/* Feature studio-pro AF7a: the reserved zone (CockpitLayout's aside #ck-dock, data-permanent), where a block of the studio pinned stays beside the
   pages. Empty, it takes no room. With its frame (workspace-dock.js PinZone), the shell gives it a column of its own: the pages are narrower by its
   width and it never covers them. Its width is set by the frame (480 px at most, the page keeping 640 px; a 44 px strip otherwise). Below 768 px the
   shell is one column (768 px and less): the zone comes after the page and only says that the block is hidden. */
.ck-dock { display: none; }
.ck-shell:has(> .ck-dock > .ck-dock-frame) {
    grid-template-columns: 264px minmax(0, 1fr) auto;
    grid-template-areas: "brand topbar topbar" "sidebar main dock";
}
.ck-shell > .ck-dock:has(> .ck-dock-frame) { display: block; grid-area: dock; min-width: 0; min-height: 0; overflow: hidden; }
.ck-dock-frame { box-sizing: border-box; display: flex; flex-direction: column; height: 100%; background: var(--ck-panel); border-left: 1px solid var(--ck-border); }
.ck-dock-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--ck-border); }
.ck-dock-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ck-dock-unpin { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; font: inherit; line-height: 26px; text-align: center; cursor: pointer;
                 color: var(--ck-text-dim); background: none; border: 1px solid var(--ck-border); border-radius: 4px; }
.ck-dock-unpin:hover { color: var(--ck-text); border-color: var(--ck-accent); }
.ck-dock-unpin:focus-visible, .ck-dock-body > [data-ws-block]:focus-visible { outline: 2px solid var(--ck-accent); outline-offset: 1px; }
.ck-dock-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; }
.ck-dock-note { margin: 0; padding: 8px; color: var(--ck-text-dim); }
.ck-dock-body[hidden], .ck-dock-note[hidden] { display: none; }
/* The strip: the block's title written vertically, and Unpin. */
.ck-dock-frame[data-mode="strip"] .ck-dock-head { flex-direction: column; flex: 1 1 auto; padding: 8px 6px; border-bottom: 0; }
.ck-dock-frame[data-mode="strip"] .ck-dock-title { flex: 0 1 auto; writing-mode: vertical-rl; max-height: 60vh; }
@media (max-width: 768px) {   /* the cockpit's own one-column width (pre-review MINOR 4) */
    .ck-shell > .ck-dock:has(> .ck-dock-frame) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    .ck-dock-frame { height: auto; border-left: 0; border-top: 1px solid var(--ck-border); }
}
