/* ---- lot SRV1: the trader's own guard rails (guard.js): their state beside the chart, their settings in the rules tab ---- */

/* the state with the account's figures: the R1 row's look (r1.css .g-rows .g-r1), red while a rail refuses openings */
.g-rows .g-sg dd[data-tone="down"] { color: var(--down); }

/* the settings: beside the challenge's rules on a computer (the rules keep their two columns), under them on a phone */
.term[data-form="desk"] .bot-pad:has(> .sg) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 360px); column-gap: 24px; align-items: start; }
.term[data-form="desk"] .bot-pad > .sg { padding-left: 18px; border-left: 1px solid var(--hair); }
.term[data-form="phone"] .bot-pad > .sg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.sg { display: grid; gap: 5px; min-width: 0; }
.sg-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sg-head h3 { margin: 0; font-size: var(--fs-s); font-weight: 600; color: var(--text); white-space: nowrap; }
.sg-lead { margin: 0; min-width: 0; font-size: var(--fs-xs); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-grid { display: grid; gap: 5px; }
.sg-rail { display: grid; grid-template-columns: minmax(88px, 112px) auto minmax(0, 1fr); align-items: center; column-gap: 8px; margin: 0; min-width: 0; }
.sg-rail > label, .sg-label { min-width: 0; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-line { display: flex; align-items: center; gap: 5px; }
.sg-in { width: 64px; height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: var(--bg); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair-2); font: inherit; font-size: 12.5px; text-align: end; }
.sg-in::placeholder { color: var(--dim); }
.sg-in:focus { outline: none; box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 3px var(--acc-soft); }
.sg-in:disabled { opacity: 0.5; cursor: not-allowed; }
.sg .key-sm { min-height: 26px; padding: 0 8px; }
.sg .key[data-armed="1"] { box-shadow: inset 0 0 0 1px var(--down), 0 1px 0 var(--key-edge); color: var(--down); }   /* irreversible: asked twice */
.sg-note { min-width: 0; font-size: var(--fs-xs); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-note[data-tone="down"] { color: var(--down); }

/* a phone: each rail on two lines (its name, then its field and key), keys a whole finger wide */
.term[data-form="phone"] .sg-rail { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 4px 0; }
.term[data-form="phone"] .sg-rail > label, .term[data-form="phone"] .sg-label { grid-column: 1 / -1; }
.term[data-form="phone"] .sg-note { grid-column: 1 / -1; white-space: normal; }
.term[data-form="phone"] .sg .key-sm, .term[data-form="phone"] .sg-in { min-height: 44px; }
.term[data-form="phone"] .sg-in { width: 96px; }
.term[data-form="phone"] .sg-lead { white-space: normal; }
.sg-label[data-tone="down"] { color: var(--down); }
