/* The Console skin (CONSOLE_HOME=on, body.cx-prem): a night watch post over Chernarus. A dark room of warm graphite and hairlines,
   one flat brass gold for actions and the selection, cyan only for the live signal. No glass, no glow, no washes.
   Everything is scoped to body.cx-prem, so with the switch off the Console looks exactly as before. */
body.cx-prem{background:var(--c-bg);scrollbar-color:var(--c-line-3) var(--c-bg-2)}
body.cx-prem ::selection{background:rgba(231,201,139,.3)}

/* the left menu: docked to the edge, one surface step and a hairline */
@media(min-width:921px){
  body.cx-prem .cx-shell{grid-template-columns:276px minmax(0,1fr)}
}
body.cx-prem .cx-side{scrollbar-width:thin;scrollbar-color:var(--c-line-3) transparent}
body.cx-prem .cx-nav{gap:2px;padding:0 12px}
body.cx-prem .cx-nav a{position:relative;padding:8px 12px;border-radius:8px;transition:background .15s,color .15s}
body.cx-prem .cx-nav a:not(.cx-founder-btn):hover{background:rgba(255,255,255,.04)}
body.cx-prem .cx-nav-h{font:400 12px var(--f-b);color:var(--c-ink-3);padding:24px 12px 8px}
body.cx-prem .cx-nav-h.grp{align-items:center;gap:8px;color:var(--c-ink-3)}
@media(min-width:921px){body.cx-prem .cx-nav-h.grp{display:flex}}
body.cx-prem .cx-nav-h.grp i{font-size:14px;color:var(--c-ink-4)}
body.cx-prem .cx-nav a.cx-nav-home{margin:2px 0 4px}
body.cx-prem.cx-simple .cx-nav [data-adv]{display:none}
body.cx-prem.cx-simple .cx-nav a[data-adv][aria-current="page"]{display:flex}
.cx-simple-toggle{display:flex;align-items:center;gap:8px;margin:8px 12px 4px;padding:8px 12px;border-radius:8px;border:1px dashed var(--c-line-2);background:transparent;color:var(--c-ink-3);font:400 12px var(--f-b);cursor:pointer;transition:color .15s,border-color .15s}
.cx-simple-toggle:hover{color:var(--c-ink);border-color:var(--c-line-3)}
.cx-simple-toggle i{font-size:16px}

/* top bar, cards, buttons, tables: solid surfaces, no shadows */
body.cx-prem .cx-topbar{background:var(--c-bg)}
body.cx-prem .cx-card{transition:border-color .2s}
/* the plan the Plans page marks keeps its gold frame */
body.cx-prem .cx-plan.hot,body.cx-prem .cx-plan.hot:hover{border-color:var(--c-gold-line);box-shadow:inset 0 0 0 1px var(--c-gold-line)}
body.cx-prem .cx-btn{transition:border-color .15s,background .15s,filter .15s}
body.cx-prem .cx-table tbody tr:hover td{background:rgba(255,255,255,.02)}

/* the public demo: the docked menu sticks under the banner (public/css/console-demo.css) */
/* ── Phones and narrow windows (920 px and less): the menu is a drawer behind the menu button, the top bar is one compact row ──
   public/js/console-shell.js opens and closes the drawer (body.cx-menu-open). On a wide screen none of this shows. */
.cx-burger,.cx-side-x,.cx-side-veil,.cx-help-top,.cx-foot-site{display:none}
@media(max-width:920px){
  body.cx-prem .cx-side{position:fixed;top:var(--cx-demo-h,0px);left:0;bottom:0;z-index:96;width:min(88vw,340px);height:auto;margin:0;border:0;border-right:1px solid var(--c-line-2);border-radius:0;background:var(--c-bg-2);box-shadow:24px 0 48px -24px #000;transform:translateX(-104%);visibility:hidden;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear .28s;overscroll-behavior:contain;padding-bottom:env(safe-area-inset-bottom)}
  body.cx-prem.cx-menu-open .cx-side{transform:none;visibility:visible;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s}
  body.cx-prem .cx-side-veil{display:block;position:fixed;inset:0;z-index:95;background:rgba(0,0,0,.66);opacity:0;pointer-events:none;transition:opacity .25s}
  body.cx-prem.cx-menu-open .cx-side-veil{opacity:1;pointer-events:auto}
  body.cx-prem.cx-menu-open{overflow:hidden}
  body.cx-prem .cx-side-x{display:grid;place-items:center;position:sticky;top:12px;z-index:3;align-self:flex-end;flex:none;width:40px;height:40px;margin:12px 12px -52px 0;padding:0;border-radius:12px;border:1px solid var(--c-line-2);background:rgba(20,22,26,.92);color:var(--c-ink-2);font-size:20px;cursor:pointer}
  body.cx-prem .cx-side-x:hover{color:var(--c-ink);border-color:var(--c-line-3)}
  body.cx-prem .cx-brand{padding-right:64px}
  /* inside the drawer the menu is the same list as on a wide screen: groups, account, the Simple menu switch, the foot */
  body.cx-prem .cx-nav{flex-direction:column;overflow:visible;padding:0 12px}
  body.cx-prem .cx-nav-h{display:block}
  body.cx-prem .cx-nav-h.grp{display:flex}
  body.cx-prem .cx-nav a{flex-shrink:1}
  body.cx-prem .cx-nav a.cx-nav-feedback{display:none}
  body.cx-prem .cx-side-foot{display:flex;gap:8px 4px}
  body.cx-prem .cx-foot-site{display:grid}
  body.cx-prem .cx-side-foot .cx-icon-btn{width:40px;height:40px}
  body.cx-prem .cx-side-foot .cx-menu.up{max-height:min(60vh,420px)}

  /* the top bar: menu button, where you are (server above, page below), the state, the bell, Help */
  body.cx-prem .cx-topbar{position:sticky;top:var(--cx-demo-h,0px);z-index:40;height:auto;min-height:56px;flex-wrap:nowrap;row-gap:0;gap:8px;padding:8px 12px}
  body.cx-prem .cx-burger{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border-radius:8px;border:1px solid var(--c-line-2);background:var(--c-surface);color:var(--c-ink);font-size:24px;cursor:pointer}
  body.cx-prem .cx-crumbs{flex:1 1 0;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;min-width:0}
  body.cx-prem .cx-crumbs > *{flex-shrink:1;max-width:100%}
  body.cx-prem .cx-crumbs > i{display:none}
  body.cx-prem .cx-crumbs > a:first-child:nth-last-child(5){display:none}
  body.cx-prem .cx-crumbs > a{display:block;min-height:0;font:400 12px/1.3 var(--f-b);color:var(--c-ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.cx-prem .cx-crumbs > b{display:block;font:600 16px/1.25 var(--f-d);}
  body.cx-prem .cx-topbar .sp,body.cx-prem .cx-lang-top,body.cx-prem .cx-top-site{display:none}
  body.cx-prem .cx-topbar .cx-conn{flex:none}
  body.cx-prem .cx-topbar .cx-bell-btn,body.cx-prem .cx-help-top{flex:none;width:40px;min-width:40px;height:40px;padding:0;justify-content:center;border-radius:12px;border:1px solid var(--c-line-2);background:rgba(255,255,255,.03);color:var(--c-ink-2);font-size:20px}
  body.cx-prem .cx-help-top{display:grid;place-items:center;color:var(--c-ink-2)}
  /* the bell's list hangs from the top bar, as wide as the screen allows */
  body.cx-prem .cx-bell{position:static;margin-left:0}
  body.cx-prem .cx-menu.cx-bell-menu{position:absolute;left:12px;right:12px;top:calc(100% + 4px);width:auto;min-width:0;max-width:420px;margin-left:auto}
  body.cx-prem .cx-page{padding-top:12px}
}
/* A phone: the two connection texts stay on Home and in the menu. While the server is online (the usual state) the state is its
   coloured dot alone, so the server's name and the page title are not cut in any language; offline, starting or not connected
   keep their word. */
@media(max-width:480px){
  body.cx-prem .cx-topbar .cx-conn .cx-conn-detail{display:none}
  body.cx-prem .cx-topbar .cx-conn.on [data-cx-status-text]{display:none}
}
@media(prefers-reduced-motion:reduce){body.cx-prem .cx-side,body.cx-prem .cx-side-veil{transition:none}}

/* ── Phones and tablets (920 px and less): a text is never cut where it can go on the next line ── */
@media(max-width:920px){
  /* a table that scrolls sideways: a cell that wraps keeps whole words and a readable width */
  body.cx-prem .cx-table:not(.cx-fp-wrapcols) td,body.cx-prem .cx-table:not(.cx-fp-wrapcols) th{overflow-wrap:break-word}
  body.cx-prem .cx-table:not(.cx-fp-wrapcols):not(.cx-nc-matrix) td[style*="white-space:normal"]:not([style*="width:1%"]){min-width:150px}
  /* a card's heading: its text keeps a readable width, its buttons go under it when both do not fit side by side */
  body.cx-prem .cx-card-h{flex-wrap:wrap}
  body.cx-prem .cx-card-h > .t{flex:1 1 200px;min-width:0}
  /* list rows: the text keeps the width, marks and buttons go under it when they do not fit beside it */
  body.cx-prem .cx-row{flex-wrap:wrap;row-gap:8px}
  body.cx-prem .cx-row .main{flex:1 1 150px !important}
  body.cx-prem .cx-row .main > b,body.cx-prem .cx-row .main > span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
  body.cx-prem .cx-row .side,body.cx-prem .cx-row .cx-setup-act{flex-wrap:wrap;justify-content:flex-end;gap:8px 8px;margin-left:auto;flex-shrink:1;min-width:0}
  body.cx-prem .cx-ev .tx > span,body.cx-prem .cx-perf-m .l,body.cx-prem .cx-perf-legend small,body.cx-prem .cx-perf-legend em.cx-perf-avg,body.cx-prem .cx-lbd .t,body.cx-prem .cx-lbd .s,body.cx-prem .cx-lbd-card .t,body.cx-prem .cx-lbd-card .s,body.cx-prem .cx-wnow dt,body.cx-prem .cx-bar .k,body.cx-prem .ws-kpis .cx-stat .s,body.cx-prem .ws-name,body.cx-prem .ws-best .who b,body.cx-prem #ihTable .ih-place{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
}

/* ── A wide table scrolls sideways: a slim gold line above it shows where you are, the open side fades out ──
   public/js/console-shell.js marks the scrollers (cx-xs, can, more-l, more-r) and sets --xs-w / --xs-x. */
body.cx-prem .cx-xs.can::before{content:"";display:block;position:sticky;left:0;height:3px;margin:8px 12px 4px;border-radius:3px;background:linear-gradient(var(--c-ink-3),var(--c-ink-3)) no-repeat,rgba(255,255,255,.10);background-size:var(--xs-w,30%) 100%,100% 100%;background-position:var(--xs-x,0%) 0,0 0}
body.cx-prem .cx-xs.more-l,body.cx-prem .cx-xs.more-r{-webkit-mask-size:100% 15px,100% 100%;mask-size:100% 15px,100% 100%;-webkit-mask-position:top,top;mask-position:top,top;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
body.cx-prem .cx-xs.more-r{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 46px),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 46px),transparent)}
body.cx-prem .cx-xs.more-l{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(270deg,#000 calc(100% - 46px),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(270deg,#000 calc(100% - 46px),transparent)}
body.cx-prem .cx-xs.more-l.more-r{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(90deg,transparent,#000 46px,#000 calc(100% - 46px),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(90deg,transparent,#000 46px,#000 calc(100% - 46px),transparent)}
