/* fluid.css - the panel SHRINKS instead of re-flowing (the owner's rule, 2026-10-14): a narrower window makes the boxes smaller; rows stay rows and columns stay
   columns; a bar of chips or tabs never becomes two rows; a table keeps its columns and cuts a long text with "…". Loaded last, so it wins over app.css and the tab sheets.
   A phone (a touch screen up to 760 px) has mobile.css instead: every block here is for "not a phone".
   The steps follow the width of the window: 1400, 1180, 1000, 860, 720. Under 560 px the page keeps its size and scrolls sideways (nothing is squeezed to nothing). */

@media not ((max-width: 760px) and (pointer: coarse)) {      /* (1.43.1: the rules below were meant for "not a phone" but were not fenced: on a phone the body got min-width 560 px and the page shrank) */
html body { min-width: 560px; }      /* the lock (the owner, 2026-10-14): the page shrinks while everything still fits and keeps this width when the window is narrower - it scrolls sideways instead of laying texts over each other */
html body #modal .overlay { justify-content: safe center; }
html body #modal .modal { min-width: 520px; }      /* ... and a window keeps its size under the lock too (the layer scrolls) */

/* ---- Panels: the bar on top. One row: "PANELS", the boxes of the panels (they share what is left and shrink, down to a dot and a cross), the round +, then the facts and the buttons.
   Whatever does not fit goes in this order: the traffic, the words of the buttons, the words before the numbers, the nodes (the bar is its own container, so it follows its own width) */
html body #page .pn-bar { container: pnbar / inline-size; }
html body #page .pn-bar .dns-r.pn-one { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; min-width: 0; padding-bottom: 0; border-bottom: 0; }
html body #page .pn-bar .pn-one > .dns-lab { flex: none; margin-right: 0; }
html body #page .pn-chips { display: flex; flex: 0 1 auto; gap: 6px; min-width: calc(var(--n, 1) * 38px + (var(--n, 1) - 1) * 6px); overflow: hidden; }
html body #page .pn-chips .dns-cw { flex: 0 1 auto; min-width: 38px; }
html body #page .pn-chips .dns-cw > .dns-chip { width: 100%; min-width: 0; overflow: hidden; padding: 0 24px 0 9px; gap: 7px; }
html body #page .pn-chips .dns-x { right: 4px; }
html body #page .pn-chips .dns-chip b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #page .pn-bar .pn-one > .pn-add { flex: none; }
html body #page .pn-bar .pn-one > .sp { flex: 1 1 0; min-width: 0; }
html body #page .pn-facts { display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 8px; }
html body #page .pn-facts > * { flex: none; margin: 0; }
html body #page .pn-facts .dns-stats { gap: 6px; }
html body #page .pn-facts .lab { font-style: normal; }
html body #page .pn-facts button { display: inline-flex; align-items: center; gap: 6px; }
html body #page .pn-facts button .ic { font-style: normal; }
/* the bar of Users / Configs / Admins: the panel box keeps its name (it was squeezed to "P…" by the tools beside it) and the tools take what is left, wrapping inside themselves */
html[data-fluid] body #page .pn-bar.pn-pick .pn-one > .pn-ksw { flex: 0 0 auto; max-width: 40%; }
html[data-fluid] body #page .pn-bar.pn-pick .pn-ctl { flex: 1 1 0; }
/* ---- Panels: the tabs and the tools under the bar are ONE row too (the tabs shrink and cut their words, the search takes what is left) */
html body #pn-body > .pn-bars { flex-wrap: nowrap; min-width: 0; }
html body #pn-body > .pn-bars > .toolbar.pn-tabs { flex: 0 1 auto; min-width: 0; overflow: hidden; }
html body #pn-body .pn-tabs .tabs { display: flex; flex-wrap: nowrap; min-width: 0; gap: 4px; }
html body #pn-body .pn-tabs .tabs button { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 clamp(6px, 1.1vw, 14px); }
html body #pn-body > .pn-bars > .toolbar.pn-sb { flex: 1 1 120px; min-width: 90px; width: auto; }
html body #pn-body .pn-sb input { width: 100%; min-width: 0; }
html body #pn-body > .pn-bars > .toolbar:not(.pn-tabs):not(.pn-sb) { flex: 0 1 auto; min-width: 0; }
html body #pn-body .pn-bars select { min-width: 0; max-width: 100%; }
/* seven panels or more: only the lit box keeps its name, the others are a dot (the name is in the tip), the cross shows when the pointer is on the box */
html body #page .pn-chips.many { min-width: calc(var(--n, 1) * 26px + (var(--n, 1) - 1) * 6px); }
html body #page .pn-chips.many .dns-cw { min-width: 26px; }
html body #page .pn-chips.many .dns-cw:has(> .dns-chip.on) { flex: 0 0 auto; }
html body #page .pn-chips.many .dns-cw > .dns-chip { padding: 0 4px 0 9px; }
html body #page .pn-chips.many .dns-x { display: none !important; }
html body #page .pn-chips.many .dns-cw:hover .dns-x { display: inline-grid !important; right: 2px; background: #1a2036 !important; }
@container pnbar (max-width: 1100px) { html body #page .pn-facts .st-traffic { display: none !important; } }
@container pnbar (max-width: 920px) { html body #page .pn-facts button .bt { display: none !important; } html body #page .pn-facts button { padding: 0 11px; } html body #page .pn-bar .pn-one { gap: 6px; } html body #page .pn-facts .pill .up { display: none; } }
@container pnbar (max-width: 760px) { html body #page .pn-facts .dns-stat .lab { display: none !important; } html body #page .pn-bar .pn-one > .dns-lab { display: none !important; } html body #page .pn-facts .pn-auth { max-width: 74px; overflow: hidden; text-overflow: ellipsis; } }
@container pnbar (max-width: 600px) { html body #page .pn-facts .st-nodes, html body #page .pn-facts .pn-auth { display: none !important; } }
}

/* ---- the frame: under 1180 px the side bar is a rail of icons (the labels are in the tooltips), the head and the status line get slimmer */
@media (max-width: 1180px) and (not ((max-width: 760px) and (pointer: coarse))) {
  html body .app { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 8px; }
  html body .side { flex-direction: column; overflow-x: visible; padding: 8px 4px; gap: 10px; align-items: center; border-radius: 18px; }      /* (flex-direction, overflow and the two rules below undo the old "under 820 px" bar of app.css: the menu went into a row inside the 56 px rail and its icons were 2 px wide) */
  html body nav#nav { display: grid; }
  html body .side-foot { margin: auto 0 0; display: grid; }
  html body .side .brand { justify-content: center; padding: 0; margin: 0; gap: 0; }
  html body .side .brand > div:not(.logo-orb) { display: none; }
  html body .side .brand .logo-orb { margin: 0; }
  html body .side .brand .logo-orb svg { width: 36px; height: 36px; }
  html body #nav { width: 100%; gap: 4px; }
  html body #nav a { justify-content: center; width: 100%; height: 40px; padding: 0; gap: 0; }
  html body #nav a > span, html body #nav a .cnt { display: none; }
  html body nav#nav a:not([data-page="dashboard"])::after, html body #nav a::after { content: none !important; display: none !important; }      /* (the chevron of an item that has pages under it was a 7 px box IN the row of the 46 px item: it pushed the icon off the middle and was cut by the edge of the rail - the owner, 2026-10-25, with a picture of the rail: "fix the size of these and make them responsive"; the rail has no chevrons: a click opens the page, its tabs are in the bar under the header) */
  html body #nav a .ic { flex: none; width: 24px; height: 24px; margin: 0; }      /* (every icon the same box, in the middle of its item) */
  html body #nav a:hover { transform: none; }
  html body #nav a::before { top: 12px; bottom: 12px; }
  html body .side-foot { width: 100%; align-items: center; padding: 0; gap: 6px; }
  html body .side-foot .side-ver, html body .side-foot .badge { display: none; }
  html body #logout { width: 100%; justify-content: center; padding: 0; font-size: 0; }
  html body #logout i { font-size: 16px; }
  html body .head { height: 52px; padding: 0 14px; margin-bottom: 8px; border-radius: 16px; gap: 10px; }
  html body .head h1 { font-size: 20px; }
  html body .head p#subtitle { display: none; }
  html body .main { padding: 2px 4px 14px 2px; }
}

/* ======================================================================================================================================================
   The fluid layer for EVERY page (1.44.0; the switch is early.js: html[data-fluid]; phones too - mobile2.css has their frame, forms and windows, this file the bars, tabs and tables).
   Rows stay rows; a bar and a row of tabs stay ONE row and shrink; a table keeps its columns and cuts a long text with "...". When that is not enough the words of the buttons go first (.bt),
   then the labels in front of numbers (.lab), then the extras (.opt3, .opt2, .opt1), and in a table the less important columns (fluid.js). Under 560 px a bar that still does not fit scrolls
   sideways inside itself (its buttons keep their size), and a row of tabs does the same - the page never does. */
html[data-fluid] body .fl-off { display: none !important; }

/* ---- the user window and the like: a grid track may be narrower than what its fields would like (a select with a long option made the window scroll sideways) */
html[data-fluid] body #modal :is(.ue-grid, .ue-top, .ue-form) > * { min-width: 0; }
@media (max-width: 900px) { html[data-fluid] body #modal :is(.ue-grid, .ue-grid.two, .ue-top) { grid-template-columns: minmax(0, 1fr); } }
html[data-fluid] body #modal .kv2.kf :is(input, select) { min-width: 0; max-width: 100%; }
html[data-fluid] body #modal .sbox > h5 { flex-wrap: wrap; row-gap: 6px; }
html[data-fluid] body #modal .pg-admin-seg > button { flex: none; }
html[data-fluid] body #modal .pg-admin-pwrow { flex-wrap: wrap; }
html[data-fluid] body #modal .pg-admin-pwrow input { flex: 1 1 140px; }      /* (the field and its buttons: the buttons go under the field when the window is narrow) */

/* ---- Settings: the row of a password (icon, words, three fields) may be narrower than its least widths of old */
html[data-fluid] body #page .si.pw { grid-template-columns: 38px minmax(0, 1fr); }      /* (1.57.39: the password boxes sit under the title, like the field of the row above) */
html[data-fluid] body #page .pwf-f, html[data-fluid] body #page .pwf-f .pwi { min-width: 0; max-width: 100%; }
html[data-fluid] body #page .si-r { flex-wrap: wrap; row-gap: 8px; }
html[data-fluid] body #page .si-r > .si-a { flex: 0 1 auto; min-width: 0; max-width: 100%; }

/* ---- the Doctor: a row of the attention list (state, name, what it waits for, the servers, the reason, Detail, Live) keeps its row; the reason is cut with "..." and the less important parts drop by the width of the list */
html[data-fluid] body #page :is(.ap-att, .ap-hist, .ap-bal-list, .sug-box) { container-type: inline-size; }
html[data-fluid] body #page :is(.ap-att, .ap-hist) { grid-template-columns: minmax(0, 1fr); }
html[data-fluid] body #page .ap-row { min-width: 0; }
@container (max-width: 800px) { html[data-fluid] body #page .ap-row > .ap-why { display: none; } }
@container (max-width: 700px) { html[data-fluid] body #page .ap-row > .mut:not(.work-chip):not(.ap-why) { display: none; } }
@container (max-width: 460px) { html[data-fluid] body #page .ap-row > .work-chip { display: none; } }
@media (max-width: 480px) { html[data-fluid] body #page .ap-tasks .ap-row { flex-wrap: wrap; row-gap: 6px; } }
html[data-fluid] body #page .ap-tasks .ap-row > .mut:not(.work-chip):not(.ap-why) { flex: 0 1 auto; min-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }      /* (the route of a task row - "ir-north-1 ⇄ ae-edge-1 · backhaul · tcpmux" - kept its whole width and pushed the Live button 70 px out of the row at 1024 px: it is the text that gives way) */      /* (a phone: state, name, Detail and Live are 325 px of fixed parts - Live went 43 px beyond the screen; now the row takes a second line) */
html[data-fluid] body .set-top::before { right: 0; }      /* (the strip behind the tabs of Settings reached 6 px beyond the box and made it scroll) */

/* ---- tables */
html[data-fluid] body :is(#page, #modal) :is(table.tbl, .cf-list, .srv-tbl, .tun-tbl) { table-layout: fixed; width: 100%; min-width: 0; }      /* (app.css gave a table under 760 px a width of 720 / 860 / 900 px to scroll sideways: here it fits its box) */
html[data-fluid] body :is(#page, #modal) :is(.lbox, .pa-box) { overflow-x: hidden; }
@media (max-width: 1180px) { html[data-fluid] body .usr-tbl thead th:last-child, html[data-fluid] body .usr-tbl tbody td:last-child { padding-left: 14px !important; } }
html[data-fluid] body :is(#page, #modal) table.tbl :is(th, .hide-sm):not(.fl-off) { display: table-cell; }      /* (app.css hid every header and every .hide-sm cell under 820 px: here fluid.js decides what drops) */
html[data-fluid] body :is(#page, #modal) table.tbl th, html[data-fluid] body :is(#page, #modal) table.tbl td:not(:last-child) { overflow: hidden; text-overflow: ellipsis; }
html[data-fluid] body :is(#page, #modal) table.tbl td[colspan] { white-space: normal; overflow-wrap: anywhere; }      /* (a note over all the columns - "No account yet. Add an ArvanCloud account or …" - is a sentence: on a phone it ran past the box in one line) */

/* ---- bars: ONE row (a bar that holds two rows keeps them under each other) */
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; }
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > * { flex: 0 1 auto; min-width: 0; }
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > .sp { flex: 1 1 0; }
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > i.sep { flex: none; }
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) :is(button, a.btn) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) :is(button, a.btn) > :is(.ic, .cta-ic) { flex: none; }
html[data-fluid] body #page .tb-search { flex: 1 1 100px; min-width: 64px; max-width: 240px; }
html[data-fluid] body #page .tb-search input { width: 100%; min-width: 0; }
html[data-fluid] body #page .tabs { display: flex; flex-wrap: nowrap; min-width: 0; gap: 4px; overflow: hidden; }
html[data-fluid] body #page .tabs > button { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 clamp(6px, 1.1vw, 14px); }
html[data-fluid] body #page :is(.tcount, .dns-stats) { display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
html[data-fluid] body #page :is(.tcount > .tc, .dns-stats > .dns-stat) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-fluid] body #page .dns-accbar > .dns-cw { flex: 0 1 auto; min-width: 38px; }
html[data-fluid] body #page .dns-accbar > .dns-cw > .dns-chip { width: 100%; min-width: 0; overflow: hidden; }
html[data-fluid] body #page .dns-accbar .dns-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1060px) { html[data-fluid] body #page .opt3 { display: none !important; } }
@media (max-width: 940px) { html[data-fluid] body #page .bt { display: none !important; } html[data-fluid] body #page .cta:has(> .bt) { padding: 0 12px; } }
/* a button whose words go (.bt) keeps its icon: without one it was an empty round button (Check all, Restart all of the tunnels) */
html[data-fluid] body #page .toolbar button > .tb-ic { display: inline-grid; flex: none; place-items: center; width: 15px; height: 15px; vertical-align: middle; }
html[data-fluid] body #page .toolbar button > .tb-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html[data-fluid] body #page .toolbar button > .tb-ic + .bt { margin-left: 6px; }
@media (max-width: 940px) { html[data-fluid] body #page .toolbar button:has(> .tb-ic) { padding: 0 11px; } }
/* the tunnel bar: the buttons, the counts and the tabs keep their size, the search is what gives way (all of them were shrinking alike and cut "Check all" to "Chec…") */
html[data-fluid] body #page .toolbar:has(> .tcount) > :is(button, .tcount, .tabs) { flex: none; }
html[data-fluid] body #page .toolbar:has(> .tcount) > .tb-search { flex: 0 1 184px; min-width: 120px; }
html[data-fluid] body #page .toolbar:has(> .tcount) { container: tunbar / inline-size; }
@container tunbar (max-width: 960px) { html[data-fluid] body #page .tcount .lab { display: none; } }      /* (the words "up / down / unstable" go before the search box is squeezed to nothing; the dots and the tip keep the meaning) */
@media (max-width: 780px) { html[data-fluid] body #page :is(.lab, .opt2, .dns-lab) { display: none !important; } }
@media (max-width: 560px) {
  html[data-fluid] body #page :is(.opt1) { display: none !important; }
  html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) { overflow-x: auto; scrollbar-width: none; }
  html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > :not(.sp, .tb-search, .tabs) { flex: none; }
  html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > .tb-search { flex: 0 0 110px; }
  html[data-fluid] body #page :is(.sb-r1, .sb-r2, .dns-r, .ap-thead, .toolbar:not(:has(> :is(.sb-r1, .dns-r)))) > .tabs { flex: 1 1 0; min-width: 0; }
  html[data-fluid] body #page .tabs { overflow-x: auto; scrollbar-width: none; }
  html[data-fluid] body #page .tabs > button { flex: none; }
  html[data-fluid] body #page .toolbar:has(> .tcount) > .tabs { flex: none; }      /* (the tunnel bar scrolls sideways as a whole; its All / Problems tabs were left 8 px wide, a sliver) */
}

/* the tabs under the header (Tunnel manager / Tunnel Doctor / CDN, General / Users / Configs / Admins) are in #subnav, outside #page, so none of the rules above reached them: on a phone they shrank alike and every label was cut
   ("Tunnel manag", "Tunnel Doct"). Like every other row of tabs they keep their size and the strip scrolls sideways inside itself. */
@media (max-width: 760px) {
  html[data-fluid] body #subnav .tabs.sub-tabs { overflow-x: auto; scrollbar-width: none; }
  html[data-fluid] body #subnav .tabs.sub-tabs::-webkit-scrollbar { display: none; }
  html[data-fluid] body #subnav .tabs.sub-tabs > button { flex: none; }
}

/* a hint that is wider than its box ("443, 443=2096, 10000-10009" in a 212 px field of a phone) ends with a dash, like every other cut text, instead of stopping in the middle of a number
   (the dash is the field's own text-overflow: the browser does not take it from ::placeholder) */
html[data-fluid] body input:not(:focus) { text-overflow: ellipsis; }

html[data-fluid] body .modal .sbar .sg { flex-wrap: wrap !important; max-width: 100%; }      /* (the buttons of the server window: a group that is wider than the window goes on a second line inside itself) */

/* ---- windows: the header of a window keeps its row while it fits and goes on a second row when it does not (nothing is laid over the name any more); under 1000 px the words of its
   buttons are gone (the tip stays) and so is the word beside the switch */
html[data-fluid] body #modal .modal-head { flex-wrap: wrap; row-gap: 8px; }
html[data-fluid] body #modal .modal-head > .mh-who { flex: 0 1 auto; min-width: 0; max-width: 100%; }
@media (max-width: 1000px) {
  html[data-fluid] body #modal .modal-head .bt { display: none; }
  html[data-fluid] body #modal .modal-head .sm:has(> .bt) { padding: 0 11px; gap: 0; }
  html[data-fluid] body #modal .modal-head .srv-sw > b { display: none; }
}

@media (max-width: 640px) { html[data-fluid] body #modal .pg-nl > b { display: none; } }      /* (the node line of a server window: the panel's name says it, the words "PasarGuard node" go) */
/* the number cards of a server window: the last two (traffic, connections) hold more words, so they are wider; under 860 px the range tabs are one row and the cards another
   (a card keeps at least 136 px; a narrow window puts the last cards on a second row) */
html[data-fluid] body #modal .srvwin .mon > .mtiles { grid-template-columns: repeat(3, minmax(0, 1.05fr)) minmax(0, 1.15fr) minmax(0, 1.25fr); }
@media (max-width: 860px) {
  html[data-fluid] body #modal :is(.srvwin, .tunwin) .mon { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  html[data-fluid] body #modal :is(.srvwin, .tunwin) .mon > .mhead { grid-column: 1; grid-row: 1; }
  html[data-fluid] body #modal :is(.srvwin, .tunwin) .mon > .mtiles { grid-column: 1; grid-row: 2; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); }
  html[data-fluid] body #modal :is(.srvwin, .tunwin) .mon > .mgrid { grid-row: 3; }
}

/* ---- the Add server button of the Servers page has its name while there is room; under 1000 px it is the round plus again (1.43.2) */
html body #page .sb-r1 > button.cta.ico.lbl { width: auto; min-width: 0; padding: 0 16px 0 7px; gap: 8px; justify-content: flex-start; }
html body #page .sb-r1 > button.cta.ico.lbl .bt { white-space: nowrap; }
@media (max-width: 1000px) {
  html body #page .sb-r1 > button.cta.ico.lbl { width: 38px; min-width: 38px; padding: 0; gap: 0; justify-content: center; }
  html body #page .sb-r1 > button.cta.ico.lbl .bt { display: none; }
}

/* ---- the Panels (Users) page on a phone: the boxes of the panels and the round plus on the first line, the facts in a strip under them; the tabs, the search and the tools are three strips under each other
   (each strip scrolls sideways inside itself, the page never does) */
@media (max-width: 760px) and (pointer: coarse) {
  html[data-fluid] body #page .pn-bar { container: none; }
  html[data-fluid] body #page .pn-bar .dns-r.pn-one { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; min-width: 0; padding-bottom: 0; border-bottom: 0; }
  html[data-fluid] body #page .pn-bar .pn-one > :is(.sp, .dns-lab) { display: none; }
  html[data-fluid] body #page .pn-chips { display: flex; flex: 1 1 0; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  html[data-fluid] body #page .pn-chips .dns-cw { flex: none; }
  html[data-fluid] body #page .pn-chips .dns-cw > .dns-chip { padding: 0 24px 0 9px; gap: 7px; }
  html[data-fluid] body #page .pn-bar .pn-one > .pn-add { flex: none; }
  html[data-fluid] body #page .pn-facts { flex: 1 1 100%; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  html[data-fluid] body #page .pn-facts > * { flex: none; margin: 0; }
  html[data-fluid] body #page .pn-facts button .bt { display: none; }
  html[data-fluid] body #pn-body > .pn-bars { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; min-width: 0; }
  html[data-fluid] body #pn-body > .pn-bars > .toolbar { width: 100%; max-width: 100%; min-width: 0; flex: none; margin: 0; }
  html[data-fluid] body #pn-body > .pn-bars > .toolbar.pn-sb input { width: 100%; }
}

/* ---- the CDN bar (Tunnels > CDN): the second row (Add record, domain, counts, tabs, search) had every item shrink alike, so "Add record", "Records 6", "Changes", "Failover" and the counts were all cut at 1280 px and below,
   and under 800 px the tabs and the search ran out of the box. Now the button, the counts and the tabs keep their words; the domain box and the search give way; the counts go when there is no room for them; and a narrow bar wraps into two rows
   (the bar itself is the container: a container cannot ask about its own width) */
html[data-fluid] body #page .toolbar.dns-bar { container: dnsbar / inline-size; }
html[data-fluid] body #page .dns-bar .dns-r.dns-main > :is(.cta, .tabs, .dns-stats) { flex: none; }
html[data-fluid] body #page .dns-bar .dns-r.dns-main .tabs > button { flex: none; overflow: visible; text-overflow: clip; }
html[data-fluid] body #page .dns-bar .dns-r.dns-main > .dns-dsel { flex: 0 1 230px; min-width: 120px; }
html[data-fluid] body #page .dns-bar .dns-dsel select { box-sizing: border-box; min-width: 0; }      /* (width 100% plus the padding for the icon made the box 51 px wider than its label) */
html[data-fluid] body #page .dns-bar .dns-r.dns-main > .tb-search { flex: 0 1 190px; min-width: 96px; }
html[data-fluid] body #page .dns-bar .dns-r.dns-main .dns-stats > .dns-stat { flex: none; overflow: visible; }
html[data-fluid] body #page .dns-bar .dns-accbar > .cta { flex: none; }
@container dnsbar (max-width: 1060px) { html[data-fluid] body #page .dns-bar .dns-stats:has(> .dns-stat) { display: none; } }
@container dnsbar (max-width: 840px) {
  html[data-fluid] body #page .dns-bar .dns-r.dns-main, html[data-fluid] body #page .dns-bar .dns-r.dns-accbar { flex-wrap: wrap; row-gap: 8px; }
  html[data-fluid] body #page .dns-bar .dns-r.dns-main > .sp { display: none; }
  html[data-fluid] body #page .dns-bar .dns-r.dns-main > .tb-search { flex: 1 1 140px; max-width: none; }
  html[data-fluid] body #page .dns-bar .dns-accbar > .dns-cw { max-width: 100%; }
}
@container dnsbar (max-width: 420px) { html[data-fluid] body #page .dns-bar .dns-r.dns-main .tabs > button .cnt { display: none; } html[data-fluid] body #page .dns-bar .dns-r.dns-main > .dns-dsel { flex: 1 1 100%; max-width: none; } }/* the value of a record (the address) is what the table is for: when the Value column has no room (a phone), the address is shown under the name instead of vanishing with its column */
html[data-fluid] body #page .dns-tbl td.name > .dns-sub { display: none; }
html[data-fluid] body #page .dns-tbl:has(> thead th.dns-vh.fl-off) td.name > .dns-sub { display: block; font-size: 11px; font-weight: 500; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the value of a record that is not an address (a TXT: an SPF line, a DKIM key, "v=DMARC1; p=none; rua=mailto:...") has words with no space in them: it ran past its cell and was cut in the middle of a word with no dash
   (the row has room for two lines). It breaks anywhere, shows two lines and ends with a dash; its tip (the whole value) is on the cell. */
html body #page .dns-tbl td.val > .mut { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
/* the Changes table: "who and what" ("ArvanCloud · by hand · deleted") says what was done - it wraps onto a second line instead of being cut before the verb */
html[data-fluid] body #page .dns-box table.tbl td.dns-who { white-space: normal; overflow-wrap: anywhere; }
/* the page header: the title block (title + the line under it) is a flex item that would not shrink below its text (900 px of subtitle), so on a screen of 1280 px the Persian / mode buttons ran 19 px out of the window.
   The block gives way, the subtitle is cut with "..." (its tip tells all of it) and the buttons stay */
html[data-fluid] body .head > div:first-child { flex: 1 1 0; min-width: 0; }
html[data-fluid] body .head p#subtitle { max-width: 100%; }
html[data-fluid] body .head > .head-r { flex: none; }
/* a grid with no column size makes ONE column as wide as its widest item (a text that must not wrap): the setup cards ("Getting started": the inputs of Telegram and AI ran 28 px out of their card) and the health list of the Dashboard
   (the numbers on the right of each row were cut) were such grids - the column is told it may be narrower than its content */
html[data-fluid] body #page .su-b { grid-template-columns: minmax(0, 1fr); }
html[data-fluid] body #page .su-f { grid-template-columns: minmax(0, 1fr); }
html[data-fluid] body #page .dash-cols :is(.hl-list, .pb-list) { grid-template-columns: minmax(0, 1fr); }
/* the body of a box of Settings → Api & Key (the DNS accounts, the panels, the probe ...): a grid with one unsized column, so a row that cannot shrink - "ArvanCloud · •••• 6789 · main", a pill and Test / Edit / Remove - made the column
   676 px in a box of 640 and the Remove button ran past the box and the screen (768 px) */
html[data-fluid] body #page .ab-b { grid-template-columns: minmax(0, 1fr); }
/* the hint of a setup card ("Marzban or PasarGuard: its address and a ...") is what tells a new user what to do: it wraps (the full text was only in its tip) */
html[data-fluid] body #page .su-i:not(.done) .su-b small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
/* the Shop bot head: the Services box (all the chips in ONE row, as wide as they are) took 732 px of 970 and left 230 px for four counters, which were squeezed to slivers 52 px wide with their numbers drawn outside.
   Now the two boxes share the row only when each has 430 px; the chips wrap inside their box and the counters take as many columns as fit */
html[data-fluid] body #page .sb-head { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
html[data-fluid] body #page .sb-svc, html[data-fluid] body #page .sb-svc .sb-chips { flex-wrap: wrap; }
html[data-fluid] body #page .sb-head { container: sbhead / inline-size; }
html[data-fluid] body #page .sb-stat4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }      /* (a counter - "8,650,000 T / 41 orders" - needs about 210 px: two in a row, four only on a very wide screen, one on a phone) */
@container sbhead (max-width: 440px) { html[data-fluid] body #page .sb-stat4 { grid-template-columns: minmax(0, 1fr) !important; } }      /* (the phone rules of app.css say two columns with !important) */
@container sbhead (min-width: 1750px) { html[data-fluid] body #page .sb-stat4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
html[data-fluid] body #page .sb-ch > :is(.sb-btn, .sb-link) { flex: none; white-space: nowrap; }      /* ("Manage" beside "Panels the bot sells from" was cut by 5 px on a phone: the label gives way, not the button) */
