/* ============================================================
   "Command" — the desktop presentation (>=700px).
   Marc's pick from the 2026-08-08 three-direction round, dark
   ink rail confirmed. One-screen ops console: ink nav rail,
   masthead with the big date + machined stat cluster, the board
   in a center pane and the selected load's detail always open
   on the right — same screens, same taps as the phone column.

   Bands (main.js mirrors the 700/1024 lines with matchMedia):
     <700px       the approved phone column (app.css) — untouched
     700–1023px   icon rail · single board pane · detail slides over
     1024–1279px  icon rail · board pane · persistent detail pane
     >=1280px     full rail (labels) · board pane · detail pane
   Heights <=540px (phone landscape) compact the masthead so the
   board keeps the room.
   ============================================================ */

/* phones: desktop chrome does not exist */
.railA{ display:none; }

@media (min-width:700px){

  /* ---------- scale + ground ---------- */
  :root{
    /* components render near canvas scale inside the panes */
    --appw:600px;
    --u:calc(var(--appw) / 640);
    --rail-ink-1:#1A1E23;
    --rail-ink-2:#14171B;
    --rail-red:#CF4B3D;      /* brand red, lifted for the dark ground */
    --desk-bg:#EDF0F3;
  }
  body{ background:var(--desk-bg); overflow:hidden; }
  .app{
    width:100%; max-width:none; height:100dvh; margin:0;
    background:transparent;
    flex-direction:row;      /* rail beside workspace (incl. static boot) */
  }

  /* ---------- frame ---------- */
  .shellA{ display:flex; height:100dvh; width:100%; }

  /* ---------- ink rail ---------- */
  .railA{
    width:230px; flex:none;
    background:linear-gradient(180deg, var(--rail-ink-1) 0%, var(--rail-ink-2) 100%);
    display:flex; flex-direction:column;
    padding:24px 16px 18px;
  }
  .railA-brand{
    display:flex; flex-direction:column; gap:9px;
    padding:0 10px 26px;
  }
  .railA-brand img{
    height:23px; width:auto; align-self:flex-start;
    filter:brightness(1.32) saturate(1.04);
  }
  .railA-mark{                       /* monogram tile (icon rail only) */
    display:none;
    width:34px; height:34px; flex:none;
    align-items:center; justify-content:center;
    border-radius:9px;
    background:var(--rail-red); color:#fff;
    font-size:17px; font-weight:740;
  }
  .railA-app{
    font-size:10.5px; font-weight:640; letter-spacing:.22em; text-transform:uppercase;
    color:#8D97A1;
  }
  .railA-nav{ display:flex; flex-direction:column; gap:4px; }
  .rtab{
    position:relative;
    display:flex; align-items:center; gap:12px;
    padding:11px 12px;
    border:none; border-radius:10px; background:none;
    color:#98A2AB; font-family:inherit;
    font-size:13.5px; font-weight:600; letter-spacing:.01em;
    text-align:left; cursor:pointer;
    transition:background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  }
  .rtab .svgi{ width:20px; height:20px; flex:none; }
  .rtab:hover{ background:rgba(255,255,255,.05); color:#E7EBEF; }
  .rtab.on{
    background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.055));
    color:#fff; font-weight:660;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.28);
  }
  .rtab.on::before{
    content:""; position:absolute; left:-16px; top:9px; bottom:9px; width:3px;
    border-radius:0 2px 2px 0;
    background:var(--rail-red);
  }
  .rtab:focus-visible{ outline:2.5px solid var(--rail-red); outline-offset:2px; }
  /* active tab pops on a real tab switch (main.js adds a-pop) */
  .railA-nav.a-pop .rtab.on{ animation:railpop 220ms var(--ease-out) both; }
  @keyframes railpop{ from{ transform:scale(.94); opacity:.5; } }

  .railA-foot{
    margin-top:auto; padding:14px 10px 2px;
    border-top:1px solid rgba(255,255,255,.08);
    display:flex; flex-direction:column; gap:4px;
    font-size:11px; line-height:1.45; color:#6E7882;
  }
  .railA-cap{
    font-size:10px; font-weight:640; letter-spacing:.14em; text-transform:uppercase;
    color:#98A2AB;
  }
  .railA-lock{ display:none; color:#6E7882; }   /* icon rail only */
  .railA-lock .svgi{ width:19px; height:19px; }

  /* ---------- workspace ---------- */
  .mainA{
    flex:1; min-width:0;
    display:flex; flex-direction:column;
    background:var(--desk-bg);
  }

  /* ---------- masthead ---------- */
  .mastA{
    display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px 24px;
    padding:22px 32px 18px;
    border-bottom:1px solid rgba(27,31,36,.09);
    background:linear-gradient(180deg, #F5F7F9, #EEF1F4);
  }
  .mastA-l{ min-width:0; margin-right:auto; }
  .mastA-eye{
    display:flex; align-items:center; gap:8px;
    font-size:10.5px; font-weight:640; letter-spacing:.16em; text-transform:uppercase;
    color:var(--brand-red); margin-bottom:8px;
  }
  .mastA-eye::before{
    content:""; width:18px; height:2px; border-radius:1px; background:var(--brand-red);
  }
  .mastA-h1{
    margin:0; font-size:30px; font-weight:720; line-height:1.05;
    letter-spacing:-.02em; color:var(--ink); white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }
  .mastA-date{ color:var(--muted); font-weight:560; }
  .mastA-sub{ margin-top:6px; font-size:13.5px; color:var(--muted); }
  .mastA-find{ flex:1 1 300px; max-width:520px; min-width:240px; }
  .mastA-find .search{
    margin-bottom:0; height:48px; font-size:15px;
    border-radius:14px;
  }

  /* machined stat cluster — THE focal instrument of the day (Marc
     08/09: Jackie and the dock read "where we are" from it) */
  .statrow{
    display:flex; gap:0;
    background:var(--surface);
    border:1px solid rgba(27,31,36,.14);
    border-radius:16px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9),
               0 2px 4px rgba(27,31,36,.05),
               0 10px 24px -8px rgba(27,31,36,.12);
    overflow:hidden;
  }
  .stat{
    min-width:122px; padding:12px 18px 11px;
    border-left:1px solid rgba(27,31,36,.08);
    display:flex; flex-direction:column; gap:3px;
  }
  .stat:first-child{ border-left:none; }
  .stat-n{
    font-size:30px; font-weight:740; line-height:1;
    letter-spacing:-.015em; color:var(--ink);
    font-variant-numeric:tabular-nums;
  }
  .stat-t{ width:26px; height:3.5px; border-radius:2px; background:var(--line); margin:3px 0 2px; }
  .stat-k{
    font-size:10px; font-weight:640; letter-spacing:.09em; text-transform:uppercase;
    color:var(--muted); white-space:nowrap;
  }
  .stat.s-warn .stat-n{ color:var(--warn); }
  .stat.s-warn .stat-t{ background:var(--brand-gold); }
  .stat.s-good .stat-n{ color:var(--good); }
  .stat.s-good .stat-t{ background:var(--good); }
  .stat.s-info .stat-n{ color:var(--info); }
  .stat.s-info .stat-t{ background:var(--info); }
  .stat.s-zero{ opacity:.5; }
  .stat.s-zero .stat-n{ color:var(--muted); }
  .stat.s-zero .stat-t{ background:var(--line); }

  /* circle steppers */
  .chevpair{ display:flex; gap:10px; }
  .chevD{
    width:42px; height:42px; flex:none;
    border:none; border-radius:50%;
    background:var(--red-soft); color:var(--brand-red);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; padding:0;
    box-shadow:var(--shadow-ctl);
    transition:transform var(--t-fast) var(--ease),
               background-color var(--t-fast) var(--ease),
               box-shadow var(--t-fast) var(--ease);
  }
  .chevD .svgi{ width:20px; height:20px; }
  .chevD:hover{ background:#eed7d7; transform:scale(1.06); box-shadow:var(--shadow-card); }
  .chevD:active{ background:#e8cccc; transform:scale(.92); }
  .chevD:focus-visible{ outline:2.5px solid var(--brand-red); outline-offset:2px; }

  /* ---------- panes ---------- */
  .panesA{
    flex:1; min-height:0;
    display:flex; justify-content:center;   /* solo band: one board */
    padding:18px 28px 0;
  }
  .paneList{
    width:100%; max-width:768px;
    min-height:0; overflow-y:auto; overflow-x:hidden;
    padding:6px 6px 44px 2px;
    scrollbar-width:thin; scrollbar-color:#C2C9D0 transparent;
  }
  .paneList::-webkit-scrollbar{ width:8px; }
  .paneList::-webkit-scrollbar-thumb{ background:#C2C9D0; border-radius:4px; }

  /* selected card: red "you are here" ring (status edge stays) */
  .card.sel .face{
    border-color:var(--brand-red);
    box-shadow:inset 0 0 0 1px var(--brand-red);
  }

  /* empty/hint marks sit on the desk ground, not a white column —
     the circle needs a step of its own to stay visible */
  .paneList .state-icon{ background:#E2E7EB; color:#8E99A3; }

  /* ---------- detail pane (persistent; lives from 1024px up) ---------- */
  .paneD{
    display:none;
    min-height:0;
    background:var(--surface);
    border:1px solid rgba(27,31,36,.08);
    border-radius:16px;
    box-shadow:var(--shadow-card);
    flex-direction:column;
    overflow:hidden;
  }
  .paneD-cap{
    font-size:10.5px; font-weight:640; letter-spacing:.14em; text-transform:uppercase;
    color:var(--muted);
  }
  .paneD-head{
    padding:20px 24px 16px;
    border-bottom:var(--hairline);
    background:linear-gradient(180deg, #FFFFFF, #FCFCFD);
  }
  .paneD-titlerow{
    display:flex; align-items:center; gap:12px; margin-top:7px;
  }
  .paneD-title{
    margin:0; font-size:24px; font-weight:720; letter-spacing:-.015em;
    color:var(--ink); font-variant-numeric:tabular-nums;
  }
  .paneD-titlerow .pill{ margin-left:auto; }
  .paneD-sub{ margin-top:5px; font-size:13.5px; color:var(--muted); }
  /* pinned load living on another day than the board (Marc 08/09:
     the vanish needed a cue) — quiet info line + follow action */
  .paneD-moved{
    display:flex; align-items:center; gap:10px;
    margin-top:9px; padding:7px 11px;
    background:var(--info-bg); color:var(--info);
    border-radius:9px; font-size:12px; font-weight:600;
  }
  .paneD-moved-go{
    margin-left:auto; border:none; padding:4px 9px;
    border-radius:7px; background:#FFFFFF; color:var(--info);
    font-family:inherit; font-size:11.5px; font-weight:640;
    cursor:pointer; box-shadow:0 1px 2px rgba(27,31,36,.10);
  }
  .paneD-moved-go:hover{ background:#F3F7FA; }
  .paneD-moved-go:focus-visible{ outline:2.5px solid var(--info); outline-offset:2px; }
  .paneD-body{
    flex:1; min-height:0; overflow-y:auto;
    padding:20px 24px 26px;
    scrollbar-width:thin; scrollbar-color:#C2C9D0 transparent;
  }
  .paneD-body::-webkit-scrollbar{ width:8px; }
  .paneD-body::-webkit-scrollbar-thumb{ background:#C2C9D0; border-radius:4px; }

  /* pane fill: the detail settles in; the board never moves */
  .paneD.a-pane .paneD-head, .paneD.a-pane .paneD-body{
    animation:paneIn 180ms var(--ease-out) both;
  }
  @keyframes paneIn{ from{ opacity:0; transform:translateY(6px); } }

  /* empty slot: dashed frame, quiet mark, honest copy */
  .paneD-idle{
    background:rgba(255,255,255,.55);
    border:1.5px dashed rgba(27,31,36,.18);
    box-shadow:none;
  }
  .paneD-empty{
    position:relative; flex:1;
    display:flex; align-items:center; justify-content:center;
    padding:32px 28px;
  }
  .paneD-empty > .paneD-cap{ position:absolute; top:18px; left:22px; }
  .paneD-empty .empty{ padding:0; }
  .paneD-empty .state-icon{ background:#E9EDF0; color:#8C97A1; }
  .paneD-empty .state-sub{ max-width:300px; margin:0 auto; }

  /* detail facts go flat inside Command surfaces: sections divided
     by hairlines, not cards-inside-cards. P2: fact rows run three
     across — console density, and the working form fits its pane. */
  .paneD-body .factbox, .sheetD-body .factbox{
    border:none; box-shadow:none; border-radius:0;
    padding:0; margin:0 0 22px; background:none;
  }
  .paneD-body .factbox + .factbox, .sheetD-body .factbox + .factbox{
    border-top:var(--hairline); padding-top:20px;
  }
  .paneD-body .factgrid, .sheetD-body .factgrid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  /* ---------- the booking form in the pane's language (P2) ----------
     Same markup as the phone (views.js bookingFormHtml) recomposed to
     console scale: three field columns (the add-carrier cell re-areas
     to stay DIRECTLY UNDER the carrier dropdown), the early-arrival
     fields ride beside their toggle, the weight joins the action row —
     so the working console fits its pane whole, no scrolling. */
  .paneD-body .bkgrid, .sheetD-body .bkgrid{ gap:8px 12px; margin-bottom:11px; }
  .paneD-body .bkgrid.bk-main, .sheetD-body .bkgrid.bk-main{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "date slot carrier"
      "so pallets add";
  }
  .paneD-body .bkf, .sheetD-body .bkf{ gap:4px; }
  .paneD-body .bk-k, .sheetD-body .bk-k{ font-size:10.5px; }
  .paneD-body .bk-in, .paneD-body .bk-sel, .paneD-body .bk-datebtn,
  .sheetD-body .bk-in, .sheetD-body .bk-sel, .sheetD-body .bk-datebtn{
    height:38px; border-radius:10px; border-width:1.5px;
    font-size:13.5px; padding-left:11px; box-shadow:none;
  }
  .paneD-body .bk-in, .sheetD-body .bk-in{ padding-right:11px; }
  .paneD-body .bk-sel, .sheetD-body .bk-sel{ padding-right:38px; }
  .paneD-body .bk-selwrap::after, .sheetD-body .bk-selwrap::after{
    top:5px; right:5px; bottom:5px; width:28px; border-radius:7px;
    background-size:14px;
  }
  .paneD-body .bk-ta, .sheetD-body .bk-ta{ min-height:46px; padding:7px 11px; }
  .paneD-body .bk-notes, .sheetD-body .bk-notes{ margin-bottom:11px; }
  /* toggle + its two fields share ONE row (canvas gave approved/fee
     hint text, no captions); the reserved inputs keep the row's shape
     when the toggle is off — calm gap, no jump */
  .paneD-body .bk-early, .sheetD-body .bk-early{
    display:flex; align-items:center; gap:12px; margin-bottom:11px;
  }
  .paneD-body .bk-early .bk-earlyfields, .sheetD-body .bk-early .bk-earlyfields{
    display:contents;
  }
  .paneD-body .bk-earlyfields .bkf, .sheetD-body .bk-earlyfields .bkf{
    flex:1 1 0; min-width:0;
  }
  .paneD-body .bk-earlyrow, .sheetD-body .bk-earlyrow{
    gap:9px; margin:0; flex:none;
  }
  .paneD-body .tglx, .sheetD-body .tglx{ width:52px; height:29px; border-radius:15px; }
  .paneD-body .tglx-knob, .sheetD-body .tglx-knob{ top:3px; left:3px; width:23px; height:23px; }
  .paneD-body .tglx.on .tglx-knob, .sheetD-body .tglx.on .tglx-knob{ transform:translateX(23px); }
  .paneD-body .tglx-state, .sheetD-body .tglx-state{ font-size:11.5px; min-width:20px; }
  .paneD-body .tglx-cap, .sheetD-body .tglx-cap{ font-size:13px; }
  .paneD-body .bk-cap, .paneD-body .bk-err, .sheetD-body .bk-cap, .sheetD-body .bk-err{
    border-radius:10px; padding:8px 11px; font-size:12.5px; line-height:1.4;
    margin-bottom:11px; box-shadow:none;
  }
  .paneD-body .bk-done, .sheetD-body .bk-done{ font-size:13px; padding:4px 0 0; }
  /* the unload cluster: weight capture beside the actions */
  .paneD-body .bk-tail, .sheetD-body .bk-tail{ gap:10px; }
  .paneD-body .bk-tail.has-weight, .sheetD-body .bk-tail.has-weight{
    display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.7fr);
    align-items:end;
  }
  .paneD-body .bk-actions, .sheetD-body .bk-actions{ gap:10px; }
  .paneD-body .bk-btn, .sheetD-body .bk-btn{
    height:42px; border-radius:11px; font-size:15px;
    box-shadow:0 1px 2px rgba(27,31,36,.10);
  }
  .paneD-body .bk-ghost, .sheetD-body .bk-ghost{ box-shadow:none; font-size:13.5px; }

  /* Marc's rule (08/08): the load detail is ONE card that never scrolls.
     Real windows are shorter than spec monitors (browser chrome, zoom),
     so the card compacts in height tiers; the scrollbar below stays only
     as a data-safety net for absurdly short windows and must never appear
     at any realistic size (rig-enforced 1024x768 through 1440x900). */
  @media (max-height:869.98px){
    /* the focal cluster yields a little on short windows so the pane
       keeps its never-scroll guarantee (full size lives at >=870) */
    .mastA{ padding:16px 32px 13px; }
    .stat{ min-width:112px; padding:9px 16px 8px; }
    .stat-n{ font-size:25px; }
    .paneD-head{ padding:13px 24px 10px; }
    .paneD-titlerow{ margin-top:4px; }
    .paneD-title{ font-size:21px; }
    .paneD-sub{ margin-top:2px; font-size:13px; }
    .paneD-body{ padding:13px 24px 15px; }
    .paneD-body .factbox, .sheetD-body .factbox{ margin-bottom:13px; }
    .paneD-body .factbox + .factbox, .sheetD-body .factbox + .factbox{ padding-top:12px; }
    .paneD-body h4, .sheetD-body h4{ margin-bottom:7px; }
    .paneD-body .factgrid, .sheetD-body .factgrid{ row-gap:8px; }
    .paneD-body .fact .v, .sheetD-body .fact .v{ font-size:13.5px; }
    /* booking form follows the tier */
    .paneD-body .bkgrid, .sheetD-body .bkgrid{ gap:7px 12px; margin-bottom:10px; }
    .paneD-body .bk-in, .paneD-body .bk-sel, .paneD-body .bk-datebtn,
    .sheetD-body .bk-in, .sheetD-body .bk-sel, .sheetD-body .bk-datebtn{ height:35px; }
    .paneD-body .bk-selwrap::after, .sheetD-body .bk-selwrap::after{ top:5px; right:5px; bottom:5px; }
    .paneD-body .bk-ta, .sheetD-body .bk-ta{ min-height:42px; padding:6px 11px; }
    .paneD-body .bk-notes, .sheetD-body .bk-notes{ margin-bottom:10px; }
    .paneD-body .bk-early, .sheetD-body .bk-early{ margin-bottom:10px; }
    .paneD-body .bk-cap, .paneD-body .bk-err, .sheetD-body .bk-cap, .sheetD-body .bk-err{
      padding:7px 11px; font-size:12px; margin-bottom:10px;
    }
    .paneD-body .bk-btn, .sheetD-body .bk-btn{ height:40px; font-size:14.5px; }
    /* the arrival-gate reason line slims with the rest, and the grid
       gives back a few more px so a gated Booked card fits whole */
    .paneD-body .bk-gate, .sheetD-body .bk-gate{
      margin-top:4px; font-size:10.5px; line-height:1.35;
    }
    .paneD-body .bkgrid, .sheetD-body .bkgrid{ gap:6px 12px; margin-bottom:8px; }
    .paneD-body .bk-early, .sheetD-body .bk-early{ margin-bottom:8px; }
    .paneD-body .bk-notes, .sheetD-body .bk-notes{ margin-bottom:8px; }
  }
  @media (max-height:759.98px){
    .paneD-head{ padding:10px 22px 8px; }
    .paneD-title{ font-size:19px; }
    .paneD-body{ padding:10px 22px 12px; }
    .paneD-body .factbox, .sheetD-body .factbox{ margin-bottom:9px; }
    .paneD-body .factbox + .factbox, .sheetD-body .factbox + .factbox{ padding-top:8px; }
    .paneD-body h4, .sheetD-body h4{ margin-bottom:5px; font-size:10.5px; }
    .paneD-body .factgrid, .sheetD-body .factgrid{ row-gap:5px; }
    .paneD-body .fact .k, .sheetD-body .fact .k{ margin-bottom:1px; }
    .paneD-body .fact .v, .sheetD-body .fact .v{ font-size:13px; }
    /* booking form at the tightest tier — still no scrolling */
    .paneD-body .bkgrid, .sheetD-body .bkgrid{ gap:6px 11px; margin-bottom:8px; }
    .paneD-body .bkf, .sheetD-body .bkf{ gap:3px; }
    .paneD-body .bk-k, .sheetD-body .bk-k{ font-size:10px; }
    .paneD-body .bk-in, .paneD-body .bk-sel, .paneD-body .bk-datebtn,
    .sheetD-body .bk-in, .sheetD-body .bk-sel, .sheetD-body .bk-datebtn{
      height:31px; font-size:13px; border-radius:9px;
    }
    .paneD-body .bk-selwrap::after, .sheetD-body .bk-selwrap::after{
      top:4px; right:4px; bottom:4px; width:25px; background-size:13px;
    }
    .paneD-body .bk-ta, .sheetD-body .bk-ta{ min-height:36px; padding:5px 11px; }
    .paneD-body .bk-notes, .sheetD-body .bk-notes{ margin-bottom:8px; }
    .paneD-body .bk-early, .sheetD-body .bk-early{ margin-bottom:8px; gap:10px; }
    .paneD-body .tglx, .sheetD-body .tglx{ width:46px; height:25px; }
    .paneD-body .tglx-knob, .sheetD-body .tglx-knob{ width:19px; height:19px; }
    .paneD-body .tglx.on .tglx-knob, .sheetD-body .tglx.on .tglx-knob{ transform:translateX(21px); }
    .paneD-body .bk-cap, .paneD-body .bk-err, .sheetD-body .bk-cap, .sheetD-body .bk-err{
      padding:6px 10px; font-size:11.5px; margin-bottom:8px; line-height:1.35;
    }
    .paneD-body .bk-btn, .sheetD-body .bk-btn{ height:36px; font-size:14px; }
    .paneD-body .bk-gate, .sheetD-body .bk-gate{ margin-top:2px; }
    .paneD-body .bk-done, .sheetD-body .bk-done{ font-size:12.5px; }
    .paneD-body .bk-tail, .sheetD-body .bk-tail{ gap:8px; }
    .paneD-body .bk-btn, .sheetD-body .bk-btn{ height:36px; font-size:14px; border-radius:10px; }
  }

  /* ---------- detail slide-over (solo band) ---------- */
  .ovD{ position:fixed; inset:0; z-index:40; display:flex; justify-content:flex-end; }
  .scrimD{
    position:absolute; inset:0;
    border:none; padding:0; cursor:pointer;
    background:rgba(20,23,27,.44);
    animation:scrimIn var(--t-med) var(--ease-out) both;
  }
  @keyframes scrimIn{ from{ opacity:0; } }
  .sheetD{
    position:relative;
    width:min(520px, 94vw); height:100%;
    background:var(--surface);
    border-left:1px solid rgba(27,31,36,.10);
    box-shadow:-28px 0 70px -28px rgba(20,23,27,.5);
    display:flex; flex-direction:column;
    animation:sheetIn var(--t-slow) var(--ease-out) both;
  }
  @keyframes sheetIn{ from{ transform:translateX(48px); opacity:0; } }
  .sheetD-head{
    display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
    padding:24px 28px 16px;
    border-bottom:var(--hairline);
    background:linear-gradient(180deg, #FFFFFF, #FCFCFD);
  }
  .sheetD-id{ min-width:0; }
  .sheetD-id .paneD-title{ margin-top:7px; }
  .sheetD-tools{ display:flex; align-items:center; gap:12px; flex:none; padding-top:2px; }
  .sheetD-x{
    width:38px; height:38px; flex:none;
    border:none; border-radius:50%;
    background:#F1F3F5; color:var(--muted);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; padding:0;
    transition:background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
               transform var(--t-fast) var(--ease);
  }
  .sheetD-x .svgi{ width:18px; height:18px; }
  .sheetD-x:hover{ background:#E7EAED; color:var(--ink); }
  .sheetD-x:active{ transform:scale(.92); }
  .sheetD-x:focus-visible{ outline:2.5px solid var(--brand-red); outline-offset:2px; }
  .sheetD-body{
    flex:1; min-height:0; overflow-y:auto;
    padding:20px 28px 32px;
    scrollbar-width:thin; scrollbar-color:#C2C9D0 transparent;
  }
  .sheetD-body::-webkit-scrollbar{ width:8px; }
  .sheetD-body::-webkit-scrollbar-thumb{ background:#C2C9D0; border-radius:4px; }

  /* ---------- gate states, composed for Command ---------- */
  .gateA{
    flex:1; min-height:0;
    display:flex; align-items:center; justify-content:center;
    padding:32px; overflow-y:auto;
  }
  .gateA .gate-card{ width:100%; max-width:460px; }

  .mastA-skel .gb-eye{ width:132px; height:10px; border-radius:5px; margin-bottom:13px; }
  .mastA-skel .gb-h1{ width:320px; height:28px; }
  .gb-stats{ width:472px; height:62px; border-radius:14px; }
  .gb-chev{ width:42px; height:42px; border-radius:50%; }
  .skelList{ display:flex; flex-direction:column; gap:calc(13 * var(--u)); }
  .skelList .skel-card{ flex:none; }
  .paneD-skel .gb-cap{ width:90px; height:9px; border-radius:4px; }
  .paneD-skel .gb-t{ width:190px; height:24px; margin:12px 0 9px; }
  .paneD-skel .gb-sub{ width:250px; height:12px; }
  .gb-grid{ display:grid; grid-template-columns:1fr 1fr; gap:22px 16px; }
  .gb-grid .gb-k{ width:76px; height:9px; border-radius:4px; margin-bottom:8px; }
  .gb-grid .gb-v{ width:130px; height:14px; }
}

/* ---------- icon rail (below the full-rail line) ---------- */
@media (min-width:700px) and (max-width:1279.98px){
  .railA{ width:68px; padding:18px 10px 14px; align-items:center; }
  .railA-brand{ padding:0 0 18px; align-items:center; gap:0; }
  .railA-brand img, .railA-app{ display:none; }
  .railA-mark{ display:flex; }
  .railA-nav{ align-self:stretch; align-items:center; }
  .rtab{ width:48px; justify-content:center; padding:12px 0; gap:0; }
  .rtab .rl{ display:none; }
  .rtab.on::before{ left:-10px; }
  .railA-foot{ align-self:stretch; padding:14px 0 2px; align-items:center; }
  .railA-cap, .railA-note{ display:none; }
  .railA-lock{ display:flex; }
}

/* ---------- solo band: masthead decks, stats take their own row ---------- */
@media (min-width:700px) and (max-width:1023.98px){
  .mastA{ padding:18px 24px 14px; }
  .statrow{ order:5; flex-basis:100%; }
  .stat{ flex:1 1 0; min-width:0; }
}

/* ---------- pane band: board + persistent detail ---------- */
@media (min-width:1024px){
  :root{ --appw:540px; }
  .panesA{
    display:grid; grid-template-columns:minmax(440px, 590px) minmax(400px, 1fr);
    justify-content:stretch;
    gap:20px; padding:18px 26px 22px;
  }
  .paneList{ width:auto; max-width:none; padding:4px 6px 36px 2px; }
  .paneList .legend{ text-align:left; padding:0 2px; }
  .paneD{ display:flex; }
  .mastA{ padding:20px 26px 16px; }
}

/* ---------- full rail + roomier panes ---------- */
@media (min-width:1280px){
  .panesA{
    grid-template-columns:minmax(470px, 590px) minmax(420px, 1fr);
    gap:22px; padding:20px 32px 24px;
  }
  .mastA{ padding:22px 32px 18px; }
}

/* narrow pane band: five chips must share ONE masthead row with the
   title — the instrument firms down, never wraps (a wrapped masthead
   steals ~55px the detail pane's never-scroll guarantee needs) */
@media (min-width:1024px) and (max-width:1279.98px){
  .stat{ min-width:92px; padding:9px 13px 8px; }
  .stat-n{ font-size:22px; }
}

/* ---------- short windows (phone landscape): the masthead yields ---------- */
@media (min-width:700px) and (max-height:540px){
  .railA{ padding-top:14px; }
  .railA-brand{ padding-bottom:12px; }
  .mastA{ padding:10px 24px 9px; gap:10px 18px; }
  .mastA-eye{ margin-bottom:4px; }
  .mastA-h1{ font-size:22px; }
  .mastA-sub{ margin-top:3px; font-size:12.5px; }
  .mastA-find .search{ height:40px; font-size:14px; }
  .statrow{ order:0; flex-basis:auto; }
  .stat{ flex:none; min-width:86px; padding:7px 12px 6px; }
  .stat-n{ font-size:17px; }
  .stat-t{ margin:2px 0 1px; }
  .chevD{ width:36px; height:36px; }
  .chevD .svgi{ width:18px; height:18px; }
  .panesA{ padding-top:10px; }
}
