/* The desk with nothing to scroll for (from the mock-up v5), then the funding panel. */
/* ---- computer: nothing to scroll for ----
   A compact ticket: the whole order, its check and its key stay in view in the column. */
.term[data-form="desk"] .ticketp { padding: 10px 12px 12px; gap: 8px; }
/* Q1: the order key right under the inputs (no empty block between them); the body scrolls only when the column is
   too short for it, the leverage, exposure, check and key staying in view */
.term[data-form="desk"] .tk-body { flex: 0 1 auto; gap: 8px; }
.term[data-form="desk"] .tk-go { margin-top: 0; }
.term[data-form="desk"] .ticketp .seg-b { min-height: 24px; }
.term[data-form="desk"] .tk-lev { min-height: 28px; }
.term[data-form="desk"] .tk-sides .key { min-height: 32px; }
.term[data-form="desk"] .ticketp .field { min-height: 32px; }
.term[data-form="desk"] .ticketp .field input { height: 30px; }
.term[data-form="desk"] .tk-group { gap: 5px; }
.term[data-form="desk"] .tk-two > div { gap: 4px; }
.term[data-form="desk"] .tk-two .tk-row { min-height: 18px; }
.term[data-form="desk"] .chip.tk-tog { min-height: 18px; }
.term[data-form="desk"] .chips .chip { min-height: 24px; }
.term[data-form="desk"] .tk-hint { min-height: 1.3em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term[data-form="desk"] .tk-check { gap: 4px; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
.term[data-form="desk"] .tk-what { gap: 2px; font-size: 11px; }
.term[data-form="desk"] .tk-go { min-height: 40px; }

/* The account's line as a band over the chart and the book when the top bar cannot hold it (panes.js: a phone on its
   side, a bar too short for its words); the ticket keeps the whole column. Beside the chart, never on it. */
.term[data-form="desk"] .side > .gaugep { container-type: inline-size; flex-direction: row; align-items: center; gap: 16px; padding: 6px 12px; }
.term[data-form="desk"] .side .g-head { display: none; }
.term[data-form="desk"] .side .g-eq { order: 1; flex: none; display: grid; gap: 1px; }
.term[data-form="desk"] .side .g-eqv { font-size: 17px; line-height: 1.15; }
.term[data-form="desk"] .side .g-day { font-size: var(--fs-xs); }
.term[data-form="desk"] .side .g-scale { display: contents; }
.term[data-form="desk"] .side .g-scale span { position: static; order: 2; flex: none; transform: none; text-align: left; }
.term[data-form="desk"] .side .g-scale .s-m { display: none; }
.term[data-form="desk"] .side .g-scale .s-r { order: 4; }
.term[data-form="desk"] .side .g-track { order: 3; flex: 1 1 96px; min-width: 96px; height: 22px; }
.term[data-form="desk"] .side :is(.g-rail, .g-fill) { top: 10px; }
.term[data-form="desk"] .side :is(.g-limit, .g-goalline) { top: 1px; height: 20px; }
.term[data-form="desk"] .side .g-start { top: 5px; }
.term[data-form="desk"] .side .g-mark { top: 4px; }
.term[data-form="desk"] .side .g-rows { order: 5; flex: none; display: flex; gap: 16px; padding: 0 0 0 16px; border-top: 0; border-left: 1px solid var(--hair); }
.term[data-form="desk"] .side .g-rows div { grid-template-columns: minmax(84px, auto); gap: 2px; align-content: start; }
.term[data-form="desk"] .side .g-rows dt { font-size: var(--fs-xs); color: var(--dim); white-space: nowrap; }
.term[data-form="desk"] .side .g-rows dd { font-size: 12.5px; white-space: nowrap; }
.term[data-form="desk"] .side .g-rows .g-bar { grid-column: auto; }
/* A narrow band keeps what cannot be read elsewhere: the exposure is in the ticket, the two ends are on the track. */
@container (max-width: 820px) { .term[data-form="desk"] .side .g-rows div:last-child { display: none; } }
@container (max-width: 640px) { .term[data-form="desk"] .side .g-scale span { display: none; } }
@container (max-width: 470px) { .term[data-form="desk"] .side .g-track { display: none; } }
/* A laptop screen inside a browser: every gap of the ticket gives a little. */
@media (max-height: 740px) {
  .term[data-form="desk"] .side > .gaugep { padding-block: 4px; }
  .term[data-form="desk"] .ticketp { padding: 8px 10px 10px; gap: 6px; }
  .term[data-form="desk"] .tk-body { gap: 6px; }
  .term[data-form="desk"] .tk-check { gap: 3px; padding: 6px 10px; }
  .term[data-form="desk"] .tk-go { min-height: 36px; }
}
@media (max-height: 680px) {
  .term[data-form="desk"] .ticketp { gap: 4px; }   /* lot SRV2: the most loaded ticket (a stop-limit, its legs, a position's note, the news) stands whole at 1280 x 650 */
  .term[data-form="desk"] .ticketp .seg-b { min-height: 22px; }
  .term[data-form="desk"] .tk-lev { min-height: 26px; }
  .term[data-form="desk"] .tk-sides .key { min-height: 28px; }
  .term[data-form="desk"] .ticketp .field { min-height: 30px; }
  .term[data-form="desk"] .ticketp .field input { height: 28px; }
  .term[data-form="desk"] .chips .chip { min-height: 22px; }
}
/* Lot SRV2, measured at 1366 x 657, 1280 x 650 and in the chart focus at 1440 x 900 (a 272 px column): the news under the key
   on one line where the column is short (its whole sentence in its title: tk-form.js, the toast and the activity tab say
   it too), the label of a leg on one line beside its key (« Stop loss » and « Suiveur »). */
@media (max-height: 740px) { .term[data-form="desk"] .tk-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.term[data-form="desk"][data-focus="1"][data-ftk="1"] .tk-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term[data-form="desk"] .tk-two .tk-row { gap: 4px; }
/* Shorter still: the tables give height back to the chart (a size the trader dragged comes first: panes.js). */
@media (max-height: 800px) { .term[data-form="desk"] .tgrid { --bot-def: 164px; } }
@media (max-height: 680px) { .term[data-form="desk"] .tgrid { --bot-def: 140px; } }
@media (max-height: 620px) { .term[data-form="desk"] .tgrid { --bot-def: 120px; } }

/* ---- funding panel: the rate now (the server gives no history and no other venue: not drawn) ---- */
.fd { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 10px 14px; color: var(--mute); font-size: 12px; line-height: 1.4; }
.fd p { margin: 0; }
.fd-empty { max-width: 52ch; padding-block: 14px; }
.fd-empty p { margin: 0; }
.fd-now { flex: 1 1 210px; min-width: 0; display: grid; align-content: start; gap: 4px; max-width: 64ch; }
.fd-cap { color: var(--dim); font-size: 11px; }
.fd-rate { display: flex; align-items: baseline; gap: 8px; color: var(--dim); font-size: 11px; }
.fd-rate .num { color: var(--text); font-size: 22px; font-weight: 600; line-height: 1.15; }
.fd-cap .num { color: var(--text); }
.fd-note { color: var(--dim); font-size: 11px; }
/* A phone on its side (under 500 px of height) keeps the computer form, but laid out as on a 720 px tall screen and
   scrolled: squeezed into the window the chart was about 60 px tall (founder 2026-11-17, Android). The chart focus
   still takes the window whole. */
@media (max-height: 499px) {
  body:has(> .app .term[data-form="desk"]:not([data-focus="1"])) { overflow-y: auto; }
  .app:has(.term[data-form="desk"]:not([data-focus="1"])) { height: auto; }
  .term[data-form="desk"]:not([data-focus="1"]) { height: 720px; }
  /* a trader: the chart over the whole left column, the book under it, the ticket down the right column */
  body:not([data-visitor="true"]) .term[data-form="desk"]:not([data-focus="1"]) { height: 1000px; }
  body:not([data-visitor="true"]) .term[data-form="desk"]:not([data-focus="1"]) .tgrid { grid-template-columns: minmax(0, 1fr) var(--tk-w);
    grid-template-rows: auto minmax(0, 1fr) 300px var(--bot, 236px); grid-template-areas: "acct ticket" "chart ticket" "book ticket" "bottom ticket"; }
}
/* the same phone on its side: the top bar keeps its keys whole in the window's width (the computer's bar stands whole
   from 1280 px): the logo without its name, the search key as an icon, no shortcuts key (no keyboard on a phone) */
@media (max-height: 499px) and (max-width: 1279px) {
  .term[data-form="desk"]:not([data-focus="1"]) .brand-name { display: none; }
  .term[data-form="desk"]:not([data-focus="1"]) .pal-btn > :not(svg) { display: none; }
  .term[data-form="desk"]:not([data-focus="1"]) #keysBtn { display: none; }
  .term[data-form="desk"]:not([data-focus="1"]) :is(.menu-name, .menu-acct) { display: none; }   /* the account: its avatar */
  .term[data-form="desk"]:not([data-focus="1"]) :is(.quote-ch, .stats) { display: none; }   /* the price stays; its change and the market's figures are in the terminal's panels */
}
