/* Lolex UI, the Desk theme (web/themes.py): three calm zones on one sheet of paper. On the left the navigation of where
   we are, in the middle the page, on the right what a page needs beside it. Loaded after app.css, whose components
   (buttons, pills, fields, dialogs, menus) it keeps and re-tunes; a page Desk has not redrawn yet is the classic
   page's content in the middle zone. Order: tokens → shell → the middle zone → sheets → pages → signed out → phone. */

/* ------------------------------------------------------------------------------------------ tokens */
:root {
  --paper: #F6F6F4; --surface-2: #FAFAF9;
  --line: #ECEDEF; --line-strong: #DFE1E6;
  --text-2: #4A5160; --muted: #6B7280; --faint: #9AA1AD;
  --ok-bg: #E6F4EC; --run-bg: #EEF2FC; --warn-bg: #FFF3D1; --warn-text: #8A5B00; --bad-bg: #FBE9E7;
  --neutral-bg: #F1F2F4; --neutral-text: #4A5160;
  --ring: #CDD0D7; --ring-ink: #4A5160;            /* a round button: its ring, and the picture in it, a little darker */
  --radius: 9px; --radius-lg: 14px;
  --bubble: #F1F2F4; --row: #F8F8F9; --hover: rgba(21, 24, 31, .06); --link-bg: #EEF2FC; --link-soft: #E1E8FA; --link-soft-2: #CFDAF7; --avatar: #E4E9F5; --warn-dot: #D99100;
  --sheet-radius: 16px; --sheet-shadow: 0 1px 3px rgba(21, 24, 31, .04);
  --lift: 0 1px 2px rgba(21, 24, 31, .06), 0 0 0 1px var(--line);
  --left-w: 252px; --rail-w: 44px;
  --dk-dur: .4s; --dk-ease: cubic-bezier(.22, .8, .2, 1);
}
@media (prefers-reduced-motion: reduce) { :root { --dk-dur: 0s; } }

/* ------------------------------------------------------------------------------------------ shell */
body.desk { font-size: 14.5px; }
.dk-frame { display: flex; min-width: 0; }
/* Every icon at the end of a line of the left zone stands on one axis, --dk-end from the zone's right edge to the
   icon's centre (the owner, 2026-11-23): the fold and close buttons, the case's pencil, the plus of a new chat, a
   chat's dots and the buttons of a name written in its row, the marks at a row's end (a question runs, it stopped
   short, a section needs a look), the account's dots. Each one's margin is the axis less half its width. A
   scrollbar that takes room (a desk's mouse; a phone's and a Mac's lie over the lines) stands beside the lines, not
   in them: desk.js measures it into --dk-sb. It stands in the zone's own margin, which has 10px for it: a wider one
   (a browser that knows no thin scrollbar) is not cut, and the list's lines end that much short of the axis.
   tests/ui: test_the_icons_at_the_ends_of_the_left_zone_s_lines_stand_on_one_axis. */
.dk-left { display: flex; flex-direction: column; min-height: 0; --dk-end: 15px; }
.dk-brand { display: flex; align-items: center; gap: 6px; height: 40px; flex: none; }
.dk-brand .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--ink); font: 600 18px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.dk-fold, .dk-close { color: var(--muted); flex: none; }
.dk-fold { margin-right: calc(var(--dk-end) - 18px); }   /* 36px */
.dk-fold .ico, .dk-close .ico { width: 18px; height: 18px; }
.dk-close { display: none; }
.dk-scroll { flex: 1; min-height: 0; overflow: hidden auto; margin: 0 calc(-2px - min(var(--dk-sb, 0px), 10px)) 0 -2px; padding: 0 2px 8px; scrollbar-gutter: stable;
             scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
/* A name cut by its row's width ends in a fade over its last four characters, not in three dots (the owner,
   2026-11-23: beside a row's menu the three dots of a cut name read as a second menu). desk.js marks the names that
   are in fact cut (.dk-cut): a name that fits is left whole, and without the script a cut name keeps its dots. Names
   of one line: what is cut after two lines keeps its dots. The class is written three times so that this rule
   stands over every name's own "ellipsis", wherever in the sheets that one is (the strongest: ".doc .name
   button.link" of app.css). */
.desk .dk-cut.dk-cut.dk-cut { text-overflow: clip; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 4ch), transparent);
                              mask-image: linear-gradient(to right, #000 calc(100% - 4ch), transparent); }
.dk-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.dk-nav-i { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; flex: none; overflow: hidden; white-space: nowrap;
            font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: background var(--dur), color var(--dur); }
.dk-nav-i .ico { width: 18px; height: 18px; stroke-width: 1.7; }
.dk-nav-i .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dk-nav-i:hover { background: var(--hover); color: var(--ink); }
.dk-nav-i[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.dk-nav-i[aria-current="page"] .ico { color: var(--link); }
.dk-nav-i:focus-visible, .dk-attn-btn:focus-visible, .dk-me > summary:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.dk-sec { position: relative; display: flex; align-items: center; height: 18px; margin: 18px 4px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.dk-sec::before { content: ""; position: absolute; left: 6px; top: 50%; width: 20px; height: 1px; background: var(--line-strong); opacity: 0; transition: opacity var(--dk-dur) var(--dk-ease); }
.dk-sec + .dk-nav, .dk-sec ~ .dk-nav-i { margin-top: 0; }
.dk-nav .dk-sec { margin-bottom: 2px; }
.dk-recent .dk-nav-i { height: 36px; font-weight: 400; gap: 8px; padding-right: calc(var(--dk-end) - 7.5px); }   /* the spinner, 15px */
.dk-recent .dk-nav-i .ico { width: 15px; height: 15px; }
.dk-recent .dk-nav-i .lbl { flex: 1; }
.dk-recent .dk-nav-i .ico.spin { color: var(--link); }
.dk-left .lbl { transition: opacity calc(var(--dk-dur) / 2) var(--dk-ease); }

.dk-foot { flex: none; display: flex; flex-direction: column; padding-bottom: 2px; }
.dk-attn { display: block; margin-bottom: 6px; }
.dk-attn-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; overflow: hidden; white-space: nowrap;
               font-size: 13.5px; font-weight: 600; color: var(--warn-text); background: var(--warn-bg); }
.dk-attn-btn .ico { color: var(--warn-dot); width: 15px; height: 15px; }
.dk-attn-btn .cnt { margin-left: auto; min-width: 20px; text-align: center; font-size: 12px; font-weight: 650; color: var(--warn-text); background: #fff; border-radius: 999px; padding: 1px 7px; }
.dk-attn.bad .dk-attn-btn { color: var(--bad-text); background: var(--bad-bg); } .dk-attn.bad .dk-attn-btn .ico { color: var(--bad); } .dk-attn.bad .cnt { color: var(--bad-text); }
.menu-list.dk-attn-list { width: 340px; max-width: calc(100vw - 24px); padding: 6px; gap: 2px; white-space: normal; }
.dk-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink); flex-wrap: wrap; }
.dk-note > .ico { color: var(--warn-dot); margin-top: 2px; } .dk-note .txt { flex: 1; min-width: 0; }
.dk-note .btn { margin-left: 26px; }
.desk .sys-alerts { position: static; }
.desk .sys-alert { flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.desk .sys-alert + .sys-alert, .dk-note + .sys-alerts:not([hidden]) { border-top: 1px solid var(--line); border-radius: 0; }
.desk .sys-alert > .ico { color: var(--warn-dot); margin-top: 2px; } .desk .sys-alert.bad > .ico { color: var(--bad); }
.desk .sys-alert .txt { flex: 1; }
.desk .sys-alert .snooze { flex-basis: 100%; margin-left: 20px; color: var(--muted); font-size: 12.5px; }
.desk .sys-alert .snooze .btn { color: var(--text-2); } .desk .sys-alert .snooze .btn.danger-solid { color: #fff; }

.dk-me { display: block; border-top: 1px solid var(--line-strong); }
.dk-me > summary { display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; white-space: nowrap; border-radius: 8px; }
.dk-me > summary .avatar { background: var(--avatar); }
.dk-me > summary .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dk-me > summary > .ico { color: var(--muted); width: 18px; height: 18px; margin-right: calc(var(--dk-end) - 9px); }
.menu-list.dk-me-list { min-width: 248px; }
.dk-pick { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 6px 0 10px; font-size: 14px; font-weight: 500; color: var(--ink); }
.dk-pick > span { flex: 1; }
.dk-pick select.chip { height: 30px; font-size: 13px; font-weight: 500; }
.dk-me-list form { margin: 0; display: flex; }

.dk-mid { min-width: 0; }
.dk-bar { display: none; }
.dk-bar .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 600 18px/1 var(--serif); letter-spacing: -.01em; }
/* the menu button of a phone (templates/desk/_menu_btn.html) and on it the count of what needs attention (desk.js) */
.menu-btn { position: relative; }
.menu-btn > .cnt { position: absolute; right: 1px; top: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--warn-dot); color: #fff;
                   font: 700 10.5px/17px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--surface); }

@media (min-width: 900px) {
  body.desk { height: 100dvh; overflow: hidden; }
  .desk .impersonation-bar { position: static; flex: none; }
  .dk-frame { flex: 1; min-height: 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
  .dk-left { flex: none; width: var(--left-w); padding: 4px 12px 0 2px; margin-left: -2px; overflow: hidden;
             transition: width var(--dk-dur) var(--dk-ease), padding var(--dk-dur) var(--dk-ease); }
  .dk-mid { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; --imp-h: 0px; --topbar-h: 0px; }
  .dk-mid > main { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .desk .backdrop { display: none; }
  /* folded to a rail of icons: the same items, their words out of sight */
  .dk-left.rail { width: var(--rail-w); padding-right: 2px; }
  .dk-left.rail .lbl { opacity: 0; }
  .dk-left.rail .dk-brand .brand { display: none; }
  .dk-left.rail .dk-fold { margin-left: 1px; }        /* every icon of the rail on one axis, 19px from the zone's edge */
  .dk-left.rail .dk-sec::before { opacity: 1; }
  .dk-left.rail .dk-recent { visibility: hidden; }
  .dk-left.rail .dk-scroll { overflow: hidden; }
  .dk-left.rail .dk-attn-btn { padding: 0 12px; } .dk-left.rail .dk-attn-btn .cnt { display: none; }
  .dk-left.rail .dk-me > summary { padding-left: 4px; }
}

/* while the window is resized (desk.js) nothing slides: a zone that changes its kind at a breakpoint (a column, a
   drawer, a sheet) is in its new place at once */
.dk-resizing .dk-left, .dk-resizing .dk-left .lbl, .dk-resizing .dk-right, .dk-resizing .dk-rcard, .dk-resizing .backdrop,
.dk-resizing .dk-sec::before { transition: none !important; }
/* while the right zone's edge is dragged (desk-case.js): the pointer keeps its shape and no text is selected */
.dk-dragging, .dk-dragging * { cursor: col-resize !important; user-select: none !important; }

/* ------------------------------------------------------------------------------------------ the middle zone */
/* a classic page (not redrawn yet): its content on the paper, under no top bar */
.desk .container { padding: 6px 8px 36px 12px; max-width: 1180px; margin: 0; }
.desk .container.narrow { max-width: 780px; }
.desk .page-head { min-height: 40px; align-items: center; margin-bottom: 14px; }
.desk .page-head h1 { font-size: 24px; }
.desk .card { border-radius: var(--radius-lg); box-shadow: var(--sheet-shadow); }
.desk .btn { border-radius: 9px; } .desk .btn.sm { border-radius: 8px; } .desk .btn.xs { border-radius: 7px; }
.desk .mark { background: var(--primary); }

/* ------------------------------------------------------------------------------------------ sheets: a redrawn page */
/* the page is one sheet: a head of 54px with its name, what it holds in a word and its main action; tools; the body,
   which scrolls inside the sheet while the head stays */
.dk-sheet { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--sheet-radius); box-shadow: var(--sheet-shadow); overflow: hidden; }
.dk-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px 8px 22px; border-bottom: 1px solid var(--line); }
.dk-head > .menu-btn { display: none; }                /* a phone's (below): on a wide screen the left zone stands open */
.dk-ttl { display: contents; }                         /* the page's name and its line: side by side here, one under the other on a phone */
.dk-head h1 { font: 650 16px/1.2 var(--sans); letter-spacing: 0; white-space: nowrap; }
.dk-head .sum { min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A page's head is its name and no more (the owner, 2026-11-23: «должно быть наверху написано просто … cases, без
   каких-либо примечаний»): the line under a page's name (how many and how much, a description, a section's state, when
   the page was read) is out of sight on every page. The lines stay in the pages: their scripts write them, and the
   settings' search reads a section's. One line is an answer and not a note, and stays: what a search of the settings
   found. */
.dk-head .dk-ttl > .sum:not(#dk-found-n) { display: none; }
.dk-head .btn { height: 34px; }
.dk-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 22px 8px; }
/* A search field is white in a grey frame, as every other field is (the owner, 2026-11-23: «поле поиска почему-то залито
   серым. Хотя по идее оно должно быть белым и серого должна быть только рамка»): on a sheet and in the left zone alike. */
.dk-search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); }
.dk-search:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--focus); }
.dk-search > .ico { color: var(--muted); }
.dk-search > input, .dk-search > input:not([type=checkbox]):not([type=radio]):not([type=file]) { flex: 1; min-width: 0; height: 100%; border: 0; background: none; box-shadow: none; padding: 0; font-size: 14.5px; outline: none; }
.dk-search > input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
.dk-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.desk .dk-tabs .chip { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font-size: 14.5px; font-weight: 600; color: var(--muted); gap: 7px; }
.desk .dk-tabs .chip:hover { background: var(--hover); color: var(--ink); }
.desk .dk-tabs .chip.on { background: var(--bubble); color: var(--ink); }
.dk-tabs .chip > span { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--bubble); border-radius: 999px; padding: 1px 7px; min-width: 22px; text-align: center; }
.dk-tabs .chip.on > span { background: #fff; }
.dk-tabs .chip > span:empty { display: none; }
.dk-body { flex: 1; min-height: 0; }
@media (min-width: 900px) {            /* the sheet fills the zone and scrolls inside, its head and tools in place */
  .dk-mid > main > .dk-sheet { height: 100%; }
  .dk-body { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .dk-body > .tw { overflow: visible; }     /* the table's head sticks to the body's top, not to a wrapper that never scrolls */
}
.dk-sheet .empty { margin: 24px 22px; }

table.dk-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.dk-t th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
           padding: 10px 14px; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; }   /* a line that stays with the stuck head */
.dk-t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.dk-t th:first-child, .dk-t td:first-child { padding-left: 22px; } .dk-t th:last-child, .dk-t td:last-child { padding-right: 22px; }
.dk-t th.r, .dk-t td.r { text-align: right; }
.dk-t tbody tr:last-child td { border-bottom: 0; }
.dk-t tbody tr:hover td { background: var(--row); }
.dk-tag { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--bubble); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.dk-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--bubble); color: var(--text-2); }
.dk-pill .ico { width: 13px; height: 13px; stroke-width: 2; }
.dk-pill.ok { background: var(--ok-bg); color: var(--ok); } .dk-pill.run { background: var(--link-bg); color: var(--link); }
.dk-pill.warn { background: var(--warn-bg); color: var(--warn-text); } .dk-pill.bad { background: var(--bad-bg); color: var(--bad); }

/* ------------------------------------------------------------------------------------------ the list of cases */
.dk-cases .dk-t td a.go { display: block; color: inherit; }
.dk-cases .ttl { font: 600 15.5px/1.3 var(--serif); color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dk-cases .sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.dk-cases tr.dim .ttl { color: var(--text-2); }
.dk-cases .now { display: flex; flex-wrap: wrap; gap: 4px; }
.dk-cases td.when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dk-cases td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-cards { display: none; }
.dk-card { display: block; padding: 13px 16px; border-bottom: 1px solid var(--line); color: inherit; }
.dk-card:last-child { border-bottom: 0; }
.dk-card .m { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.dk-card .m .when { margin-left: auto; }

/* ------------------------------------------------------------------------------------------ a firm's pages */
/* templates/desk/billing.html, users.html, account.html (ADR 0044, stage 3): the classic pages' own elements, which
   the page scripts draw, laid on one sheet. The pieces here serve the later pages too: figures in a row of tiles, a
   box inside the sheet, a group of rows with one setting a row. */
.dk-pad { padding: 18px 22px 0; }
.dk-page { max-width: 860px; margin: 0 auto; padding: 20px 24px 28px; }
.dk-box { position: relative; margin-top: 16px; padding: 16px 18px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dk-box.flush { padding: 0; overflow: hidden; }
.dk-box h2, .dk-grp-h h2 { font: 650 15px/1.3 var(--sans); letter-spacing: 0; margin: 0; }
.desk dialog.dlg .dlg-body h2 { font: 600 19px/1.3 var(--serif); letter-spacing: -.005em; }
.dk-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dk-st .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dk-st.ok { color: var(--ok); } .dk-st.ok .dot { background: var(--ok); } .dk-st.warn { color: var(--warn-text); } .dk-st.warn .dot { background: var(--warn-dot); }
.dk-st.bad { color: var(--bad); } .dk-st.bad .dot { background: var(--bad); }
.dk-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--bubble); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
/* a list drawn by a classic page's script on a Desk sheet: the row's first line in ink, its second line small */
.desk table.dk-t.list td .t { font-weight: 600; color: var(--ink); } .desk table.dk-t.list td .c { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.desk table.dk-t.list tr.muted td, .desk table.dk-t.list tr.muted td .t { color: var(--muted); }
.desk table.dk-t.list td .btn.icon { color: var(--muted); }

/* figures in a row: a tile a figure, the first one larger */
.desk .dk-tiles { display: flex; gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sheet-shadow); }
.desk .dk-tiles .k { flex: 1; min-width: 0; padding: 14px 20px 15px; background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.desk .dk-tiles .k:first-child { border-left: 0; }
.desk .dk-tiles .k span { display: block; font-size: 12.5px; color: var(--muted); }
.desk .dk-tiles .k b { display: block; margin-top: 3px; font: 600 22px/1.25 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk .dk-tiles .k.main b { font-size: 26px; } .desk .dk-tiles .k.low b { color: var(--bad); }

/* ---- billing */
.desk .dk-bill .subs-card { margin: 0 0 16px; border-radius: 14px; box-shadow: none; }
.desk .dk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; padding: 0; }
.dk-filters .field { gap: 0; } .dk-filters .dk-dash { color: var(--muted); margin: 0 -4px; }
.desk .dk-filters input[type=date], .desk .dk-filters select { height: 36px; border-radius: 9px; }
.desk .dk-filters .dk-date input { width: 148px; }
.dk-filters .bill-case { flex: 1 1 240px; }
.desk .dk-filters .bill-case-box.dk-search { max-width: none; height: 36px; flex: none; }
.desk .dk-filters .bill-case-box.dk-search input { padding-right: 28px; }
.desk .dk-bill .bill-chart-card { box-shadow: none; }
.desk .dk-bill .bill-chart-head { margin-bottom: 8px; } .desk .dk-bill .bill-chart-head .small { font-size: 13px; }
.desk .dk-bill .bill-chart .bar { fill: var(--link); opacity: .9; }
.desk .dk-bill .bill-journal-head { padding: 14px 18px 8px; }
.dk-bill .bill-journal { margin-top: 16px; border-top: 1px solid var(--line); }
.dk-bill .dk-t td.when { white-space: nowrap; } .dk-bill .dk-t td.subject .s { font-weight: 600; color: var(--ink); }
.dk-bill .dk-t td.case a { color: var(--link); } .dk-bill .dk-t td.amount { font-weight: 600; } .dk-bill .dk-t td.amount.plus { color: var(--ok); }
.dk-bill .dk-t tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.desk .dk-bill .bill-pager { padding: 12px; font-size: 13px; }
.desk .dk-bill #bill-empty { margin: 24px 22px; }
.dk-amounts { display: flex; gap: 8px; margin-bottom: 14px; }
.desk .dk-amounts .chip { flex: 1; height: 44px; justify-content: center; border-radius: 10px; font-size: 14.5px; font-weight: 600; background: var(--surface); }
.desk .dk-amounts .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- users */
.dk-users .dk-role { color: var(--ink); } .dk-users tr.muted .dk-role { color: inherit; }
.dk-users .dk-t td:last-child { width: 1%; }

/* ---- the account, and any page of settings: groups of rows, one setting a row */
.dk-prof { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.dk-prof .avatar.lg { background: var(--avatar); }
.dk-prof .who { flex: 1; min-width: 0; } .dk-prof .nm { font: 600 21px/1.3 var(--serif); overflow-wrap: anywhere; } .dk-prof .m { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.dk-prof form { margin: 0; flex: none; }
.dk-grp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; } .dk-grp + .dk-grp { margin-top: 14px; }
.dk-grp-h { display: flex; align-items: center; gap: 10px; padding: 13px 18px 11px; }
.dk-srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.dk-srow .l { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.dk-srow .d { display: block; margin: 2px 0 0; font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--muted); max-width: 64ch; }
.dk-srow .ctl { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
label.dk-srow { cursor: pointer; }
.desk .dk-srow .seg { display: inline-flex; background: var(--bubble); } .desk .dk-srow .seg > .seg-item { flex: none; height: 28px; padding: 0 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.desk .dk-srow .seg > .seg-item.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 24, 31, .10); }
/* a row that opens: its button shows the form under it */
details.dk-more { display: block; padding: 0; }
details.dk-more > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: center; padding: 12px 18px; list-style: none; cursor: pointer; }
details.dk-more > summary::-webkit-details-marker { display: none; }
details.dk-more > summary:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 6px; }
details.dk-more[open] > summary .btn { background: var(--bubble); }
.dk-more-b { padding: 4px 18px 16px; }
.dk-more-b .form-grid .wide .small { display: none; }              /* the hint stands in the row above already */
.dk-under { padding: 0 18px; } .dk-under > :first-child { margin-top: 0; } .dk-under > *:not([hidden]):last-child { margin-bottom: 16px; }
.dk-spend { padding: 0; }
.desk .dk-spend .ctx-row { grid-template-columns: minmax(0, 1fr) minmax(0, 180px) auto; gap: 14px; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.desk .dk-spend .ctx-name { font-weight: 600; color: var(--ink); white-space: normal; } .desk .dk-spend .ctx-num { color: var(--ink); font-weight: 600; }
.desk .dk-spend .ctx-row > .small { grid-column: 1 / -1; font-weight: 400; }
.desk .dk-spend .ctx-row:has(> .small) { border-top: 0; padding-top: 0; margin-top: -6px; }          /* a note of the row above */
.dk-fine { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }

@media (max-width: 899.98px) {
  .dk-pad { padding: 14px 16px 0; } .dk-page { padding: 14px 16px 24px; }
  .desk .dk-tiles { flex-wrap: wrap; } .desk .dk-tiles .k { flex: 1 1 50%; padding: 12px 16px; }
  .desk .dk-tiles .k:nth-child(odd) { border-left: 0; } .desk .dk-tiles .k:nth-child(n+3) { border-top: 1px solid var(--line); }
  .desk .dk-tiles .k b, .desk .dk-tiles .k.main b { font-size: 20px; }
  .desk .dk-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .desk .dk-filters .dk-date input { width: 100%; }
  .desk .dk-filters input, .desk .dk-filters select { font-size: 16px; height: 42px; }
  .desk .dk-filters > .field:not(.dk-date), .desk .dk-filters > .btn { grid-column: 1 / -1; }
  .desk .dk-filters select { width: 100%; } .desk .dk-filters > .btn { justify-self: start; order: 9; }
  .desk .dk-filters .bill-case-box.dk-search { height: 42px; }
  /* the lists of a phone: the classic pages' cards as rows of the sheet */
  .desk .dk-sheet .case-cards { padding: 0; }
  .desk .dk-sheet .case-card { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 16px; background: none; }
  .desk .dk-sheet .case-cards .case-card:first-child { border-top: 0; }
  .dk-bill .bill-journal { margin-top: 14px; }
  .dk-prof { gap: 12px; flex-wrap: wrap; } .dk-prof .avatar.lg { width: 44px; height: 44px; font-size: 15px; } .dk-prof .nm { font-size: 18px; }
  .dk-srow, details.dk-more > summary { padding: 12px 14px; gap: 8px 14px; } .dk-grp-h { padding: 12px 14px 10px; }
  .dk-srow:has(.ctl > :nth-child(2)), details.dk-more > summary { grid-template-columns: minmax(0, 1fr); } .dk-srow:has(.ctl > :nth-child(2)) .ctl { justify-content: flex-start; }
  details.dk-more > summary .btn { justify-self: start; }
  .dk-more-b { padding: 4px 14px 14px; } .dk-under { padding: 0 14px; }
  .desk .dk-spend .ctx-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .desk .dk-spend .ctx-bar, .desk .dk-spend .ctx-row > span:empty { display: none; }
}

/* ------------------------------------------------------------------------------------------ signed out */
body.dk-out { min-height: 100dvh; }
.dk-auth { position: relative; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.dk-auth-lang { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: 18px; display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bubble); }
.dk-auth-lang a { height: 28px; min-width: 40px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.dk-auth-lang a[aria-current="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 24, 31, .10); }
.dk-auth-box { width: 400px; max-width: 100%; }
.dk-auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.dk-auth-brand .mark { width: 44px; height: 44px; border-radius: 12px; font-size: 24px; }
.dk-auth-brand h1 { font: 600 26px/1.1 var(--serif); letter-spacing: -.01em; }
.dk-auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 3px rgba(21, 24, 31, .04), 0 12px 40px rgba(21, 24, 31, .06); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dk-auth-card h2 { font: 600 21px/1.3 var(--serif); }
.dk-auth-card .lead { margin: -8px 0 0; font-size: 14px; color: var(--text-2); }
.dk-auth-card form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.dk-auth-card .field input, .dk-auth-card .field select { height: 42px; font-size: 16px; border-radius: 10px; }
.dk-auth-card .btn.primary { height: 42px; font-size: 15px; width: 100%; border-radius: 10px; }
/* The sign-in code as the redesign drew it (the gallery of 2026-11-21): six boxes, a digit in each. ONE real field lies
   under the boxes: a pitch wider than they are and cut at their edge, so that its text never scrolls. Its digits are
   spaced by the boxes' pitch less a digit's width and start half a box less half a digit in, so each stands in the
   middle of its box (1ch is a digit's width: this face's digits are all one width, and the faces named after it are
   fixed-width ones). The box the next digit goes to is ringed by static/common.js; without the script the field's own
   caret shows the place. */
.dk-code { position: relative; height: 54px; container-type: inline-size; --gap: 8px; --pitch: calc((100cqw + var(--gap)) / 6); }
/* "clip", not "hidden": a hidden box may still be scrolled, and a browser scrolls it to show the caret after the sixth
   digit, which moves every digit out of its box */
.dk-code-clip { position: absolute; inset: 0; overflow: hidden; overflow: clip; border-radius: 10px; }
.dk-code input.code-input:not([type=checkbox]):not([type=radio]):not([type=file]) { position: absolute; left: 0; top: 0; width: calc(100% + var(--pitch)); height: 100%; flex: none;
  margin: 0; padding: 0 0 0 calc((var(--pitch) - var(--gap) - 1ch) / 2); border: 0; border-radius: 0; background: var(--surface); box-shadow: none; outline: none;
  font: 600 24px/1 "Source Serif 4", ui-monospace, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums lining-nums; letter-spacing: calc(var(--pitch) - 1ch);
  text-align: left; color: var(--ink); caret-color: var(--link); transition: none; }
.dk-code input.code-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important; box-shadow: 0 0 0 1000px var(--surface) inset !important; }
.dk-code input.code-input::selection { background: var(--link-soft); }
.dk-code-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); pointer-events: none; }
.dk-code-cells i { border: 1px solid var(--line-strong); border-radius: 10px; }      /* the ring moves with the digit, at once: no transition */
.dk-code-cells i.at { border-color: var(--link); box-shadow: 0 0 0 3px var(--focus); }
.dk-code.bad .dk-code-cells i { border-color: #C5352C; } .dk-code.bad .dk-code-cells i.at { box-shadow: 0 0 0 3px rgba(197, 53, 44, .14); }
/* the switch under the code is a line of the form, not a row of a list: no rule under it. The button is pale until six
   digits stand in the boxes; it still answers a press, and the browser then says what is missing */
.dk-auth-card .tog { padding: 0; border-bottom: 0; align-items: center; gap: 10px; } .dk-auth-card .tog .t { font-weight: 400; font-size: 14px; color: var(--text-2); }
.dk-auth-card .tog input.switch { margin-top: 0; }
.dk-code-form:invalid .btn.primary { opacity: .45; }
.dk-auth-alt { margin-top: 16px; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.dk-auth-alt a { font-weight: 600; }

/* ------------------------------------------------------------------------------------------ a phone */
@media (max-width: 899.98px) {
  .dk-frame { display: block; }
  .dk-left { position: fixed; top: var(--imp-h); bottom: 0; left: 0; z-index: 50; width: 304px; max-width: 86vw; background: var(--paper);
             padding: 10px 12px max(10px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
             transform: translateX(-100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
  .dk-left.open { transform: none; visibility: visible; box-shadow: 12px 0 40px rgba(21, 24, 31, .18); transition: transform var(--dur) var(--ease); }
  .dk-fold { display: none; } .dk-brand .btn.dk-close { display: inline-flex; width: 44px; height: 44px; margin-right: calc(var(--dk-end) - 22px); }
  .dk-nav-i { height: 46px; font-size: 15px; } .dk-recent .dk-nav-i { height: 44px; }
  .dk-me > summary { padding: 10px 0 6px; }
  /* The top bar is the page's own head: the menu button, the way back where the page has one, the page's name with
     its line under it, the page's buttons. It stays in place while the page is scrolled. The shell's bar lies under
     it and takes no room: it is the bar of a page without a head, and is seen where a head has gone up with its sheet
     (what stands under a sheet on a phone: an import's runs, the collector of the server's browser). */
  .dk-bar { position: sticky; top: var(--imp-h); z-index: 29; display: flex; align-items: center; gap: 4px; height: 54px; padding: 0 6px 0 4px; background: var(--paper); }
  .dk-bar .menu-btn { width: 44px; height: 44px; } .dk-bar .menu-btn > .cnt { box-shadow: 0 0 0 2px var(--paper); }
  .dk-frame:has(.dk-head) .dk-bar { margin-bottom: -54px; }
  .desk .container { padding: 4px 16px 40px; }
  .dk-sheet { border-width: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .dk-head { position: sticky; top: var(--imp-h); z-index: 30; flex-wrap: wrap; gap: 2px 6px; padding: 4px 8px 4px 4px; background: var(--surface); }
  .dk-head > .menu-btn { display: inline-flex; flex: none; width: 44px; height: 44px; }
  .dk-head > .spacer { display: none; }
  /* the name and its line take two lines each when they need them, and are never cut by the buttons beside: where
     less than 96px would be left for them, the buttons go to a row of their own */
  .dk-ttl { display: flex; flex-direction: column; flex: 1 1 96px; min-width: 0; gap: 1px; margin: 0 2px; }
  .dk-ttl h1 { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .dk-head .dk-ttl .sum { font-size: 12px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .dk-head .dk-ttl .sum:empty { display: none; }
  .dk-tools { padding: 12px 16px 8px; }
  .dk-search { max-width: none; flex-basis: 100%; height: 42px; }
  .dk-search > input { font-size: 16px; }
  .dk-tabs { margin: 0 -6px; }
  .dk-cases .tw { display: none; } .dk-cards { display: block; }
  .dk-auth { padding-top: 64px; justify-content: flex-start; }
  .dk-auth-box { margin-top: 4vh; }
}

/* ------------------------------------------------------------------------------------------ the page of a case */
/* templates/desk/case.html, static/desk-case.js: the left zone names the case and lists its chats, the middle sheet is
   the open chat, the right zone holds the prepared documents, the materials and the cited sources in tabs, and in
   their place the file or the source being read. The inner parts (rows of documents, messages, the composer, the
   viewer's pages) are the classic ones. */
/* The right zone stands beside the chat at every wide width and squeezes it; under 900px it is a sheet over the chat.
   Its width follows the window (desk-case.js sets --right-w, and folds the left zone when the chat would be left too
   little room); these are the same figures for the moment before the script has run. */
:root { --right-w: clamp(340px, 36vw, 468px); }
.dk-case { display: flex; min-width: 0; min-height: 0; }
.dk-chat { flex: 1 1 0; min-width: 0; }
.desk .dk-chat.pane-chat { background: var(--surface); }
.desk .dk-chat .chat-head { flex-wrap: wrap; gap: 6px; padding: 8px 10px 8px 22px; background: none; }
/* a platform administrator's meters stand on a row of their own, under the chat's name */
.dk-admin-row { order: 10; flex: 1 1 100%; display: flex; align-items: center; gap: 12px; min-width: 0; padding-bottom: 2px; }
.dk-admin-row .meters { flex: 1 1 auto; min-width: 0; }
.dk-chat-ttl { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; margin-right: 2px; }
.dk-chat-ttl h2 { font: 650 16px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk .dk-chat #chat-select { display: none; }          /* the page script's own choice of a chat: the list on the left shows it */
.desk .dk-chat .chat-head .meters { gap: 12px; }
.dk-open-right { flex: none; }
.dk-open-right .cnt { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--bubble); border-radius: 999px; padding: 1px 7px; }
.dk-case.has-right .dk-open-right { display: none; }
/* The round button of the question box (Send, and Stop while a question runs) is a grey ring with a picture a little
   darker than the ring, not a disc of the theme's dark blue (the owner, 2026-11-23: «Мне нравится вариант с серым
   кольцом, но при этом непосредственно картинка внутри серого кольца должна быть чуть темнее, чем само кольцо»). The
   round button of the documents' processing is the same ring. */
.desk .send-btn, .desk .docs-budget .dp-btn { border: 1.5px solid var(--ring); background: var(--surface); color: var(--ring-ink); }
.desk .send-btn:hover, .desk .docs-budget .dp-btn:hover { background: var(--neutral-bg); color: var(--ring-ink); }
.desk .send-btn:disabled { opacity: .45; }
/* How the arrow becomes the square and back: its tip opens into the square's side, as it did, a little slower (the
   owner, 2026-11-23, of four motions shown to him: «Вариант А»). */
.desk .send-btn .shape { transition-duration: .34s; }
.desk .dk-chat .chat-log { padding: 22px 24px 40px; }
.desk .dk-chat .composer-wrap { background: var(--surface); padding: 6px 24px 14px; }
.desk .dk-chat .composer-wrap::before { background: linear-gradient(to top, var(--surface), rgba(255, 255, 255, 0)); }
.desk .msg.user .bubble { background: var(--bubble); }

/* the 10px between the chat and the zone are the zone's own: the handle its width is dragged by stands there */
.dk-right { position: relative; flex: none; width: calc(var(--right-w) + 10px); padding-left: 10px; min-height: 0; overflow: hidden;
            transition: width var(--dk-dur) var(--dk-ease), padding var(--dk-dur) var(--dk-ease); }
.dk-resizer { position: absolute; z-index: 3; left: 0; top: 16px; bottom: 20px; width: 10px; cursor: col-resize; touch-action: none; }
.dk-resizer::after { content: ""; position: absolute; left: 3px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 4px; background: var(--faint); opacity: 0; transition: opacity .15s; }
.dk-resizer:hover::after, .dk-resizer:focus-visible::after, .dk-dragging .dk-resizer::after { opacity: 1; }
.dk-resizer:focus-visible { outline: none; }
.dk-rcard { display: flex; flex-direction: column; width: var(--right-w); height: 100%; min-height: 0; background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--sheet-radius); box-shadow: var(--sheet-shadow); overflow: hidden; transition: width var(--dk-dur) var(--dk-ease); }
.dk-rhead { flex: none; display: flex; align-items: center; gap: 6px; min-height: 54px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); }
.dk-rhead .dk-tabs { flex-wrap: nowrap; min-width: 0; overflow: auto hidden; scrollbar-width: none; }
.dk-rhead .dk-tabs .chip { flex: none; }
.dk-rhead .dk-tabs .chip > span .ico { width: 11px; height: 11px; vertical-align: -1px; }
.desk .dk-tab-chat { display: none; }                    /* the chat is the middle sheet here, not a tab */
.dk-rhead > .btn { color: var(--muted); flex: none; } .dk-rhead > .btn .ico { width: 18px; height: 18px; }
.dk-stage { position: relative; flex: 1; min-height: 0; }
.dk-stage > .dk-pane { position: absolute; inset: 0; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); visibility: hidden; opacity: 0; }
.dk-stage > .dk-pane.on { visibility: visible; opacity: 1; }
.dk-stage > .dk-pane.leaving { pointer-events: none; }
.desk .dk-stage > .pane-docs { width: auto; border: 0; }
.desk .dk-stage .pane-head { padding: 12px 14px 10px; border-bottom-color: var(--line); }
.desk .dk-stage .sub-head { padding: 14px 14px 6px; }
/* the materials' heading row: the heading, then the list-or-tree choice and Upload at its end; it stays in sight
   above the list. The head over it holds the search and what the processing says, and is not there with nothing in it. */
.desk .dk-stage #docs-head { position: sticky; top: 0; z-index: 2; flex-wrap: nowrap; padding-bottom: 8px; background: var(--surface); }
.desk .dk-stage #docs-head > #upload-btn { order: 3; flex: none; }
.desk .dk-stage .pane-head:not(:has(> :not([hidden]))) { display: none; }
.desk .dk-stage .sub-head h2 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dk-none { margin: 20px 16px; }
/* the viewer is a pane of the zone, not a panel over the page */
/* What is read beside the chat stands on white, as the answer it is cited in does (the owner, 2026-11-23: «фон стал
   белым»); a file's pages keep the paper's grey around them. */
.desk .dk-stage > #viewer.slideover { position: absolute; inset: 0; top: 0; width: auto; transform: none; transition: none; box-shadow: none; z-index: auto; background: var(--surface); }
.desk .dk-stage > #viewer .so-body.fv-fill { background: var(--paper); }
.desk .dk-stage > #viewer .so-head { padding: 12px 14px 0 8px; }
.desk .dk-stage > #viewer .so-title { gap: 8px; align-items: center; }
.desk .dk-stage > #viewer .so-title > .ico { margin-top: 0; }
.desk .dk-stage > #viewer .so-tabs { margin-left: 8px; }
.desk .dk-stage > #viewer .so-head:not(:has(.so-tabs:not([hidden]))) { padding-bottom: 12px; }
.desk .dk-stage > #viewer .so-body:not(.fv-fill) { padding: 14px 16px; }
.dk-back-list { color: var(--muted); }

/* ---- the sources of a final answer (static/case.js: md, citedRowHtml). A cited ruling or article keeps its words, the
   text's own, and its source's number stands after them; a reference to a case document is its number alone; under
   the answer the sources in a row by those numbers. The one being read beside the chat is lit in all of them and in
   the zone's list. (A progress note's citations stay links, as in the classic theme.) */
/* Every link of an answer is the links' blue with a dotted line under it from the start, and the line is a whole one
   under a pointer (the owner, 2026-11-23: «все ссылки в чате сразу же синие и с пунктирным подчёркиванием»); the row
   of sources under the answer is buttons and stays as it is. A source's number is a small raised figure after the
   words it belongs to, blue and with no line under it; a case document's number stands alone. The citations of the
   source being read beside the chat stand on a light blue ground as well. */
.desk #chat-inner .msg .body a:not(.dk-srcp) { color: var(--link); text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.desk #chat-inner .msg .body a:not(.dk-srcp):hover { text-decoration-style: solid; }
.desk a.cite.num .nb { white-space: nowrap; }
/* The number never begins a line. After a citation's words it is a box of its own, which is what takes the dotted
   line off it, inside one unbroken piece with the last word (.nb). A case document's number stands alone after a
   space that does not break, and there it must stay a piece of the line's own text: a browser breaks the line before
   a box whatever stands before it. Such a citation has no words to underline, so the line is taken off it whole. */
.desk a.cite.num .n { margin-left: 1px; padding: 0 1px; font: 600 .72em/1 var(--sans); vertical-align: super; color: var(--link); white-space: nowrap; }
.desk a.cite.num .nb > .n { display: inline-block; text-decoration: none; }
.desk a.cite.num > .n { margin-left: -.22em; padding: 0 2px; }      /* a document's number alone: close to the word before it (a space stands between them) */
.desk #chat-inner .msg .body a.cite.num:not([data-cite]), .desk #chat-inner .msg .body a.cite.num:not([data-cite]):hover { text-decoration: none; }
.desk a.cite.num.on { background: var(--link-bg); border-radius: 4px; box-shadow: 0 0 0 2px var(--link-bg); }
.desk a.cite.on:not(.num):not(.dk-srcp) { background: var(--link-soft); border-radius: 3px; }
.dk-srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.desk a.cite.dk-srcp { display: inline-flex; align-items: center; gap: 6px; max-width: min(100%, 340px); height: 28px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line-strong);
                       background: var(--surface); color: var(--text-2); font-size: 13px; line-height: 1; white-space: nowrap; text-decoration: none; transition: border-color .18s, color .18s, background-color .18s; }
.dk-srcp > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.dk-srcp > b { flex: none; margin-left: -6px; font-weight: inherit; line-height: 1.4; }          /* a document's page: never cut with its name */
.dk-srcp > i { flex: none; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--link-bg); color: var(--link);
               font-size: 11.5px; font-weight: 650; font-style: normal; transition: background-color .18s, color .18s; }
.desk a.cite.dk-srcp:hover { border-color: var(--faint); text-decoration: none; }
.desk a.cite.dk-srcp.on { border-color: var(--link); color: var(--link); background: var(--link-bg); }
.dk-srcp.on > i { background: var(--link); color: #fff; }
/* what a cited source is, over its citation before it is opened (desk-case.js; a mouse only) */
.dk-peek { position: fixed; z-index: 60; left: 0; top: 0; width: 300px; max-width: calc(100vw - 16px); padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong);
           box-shadow: 0 10px 30px rgba(21, 24, 31, .14); pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(4px) scale(.98); transform-origin: 50% 100%;
           transition: opacity .14s, transform .2s var(--dk-ease), visibility 0s linear .2s; }
.dk-peek.on { visibility: visible; opacity: 1; transform: none; transition: opacity .14s, transform .2s var(--dk-ease); }
.dk-peek .k { display: flex; align-items: center; gap: 6px; font: 700 11.5px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dk-peek .k .ico { width: 14px; height: 14px; flex: none; }
.dk-peek .nb { white-space: nowrap; }
.dk-peek .t { margin-top: 5px; font: 600 14.5px/1.35 var(--serif); color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dk-peek .a { margin-top: 6px; font: 600 13px/1.4 var(--sans); color: var(--text-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dk-peek .q { margin-top: 5px; font: 13.5px/1.5 var(--serif); color: var(--text-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dk-peek .h { margin-top: 8px; font: 600 12px/1.3 var(--sans); color: var(--link); }

.dk-sources { display: flex; flex-direction: column; padding: 8px; }
.dk-src { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink); }
.dk-src:hover { background: var(--row); color: var(--ink); }
.dk-src.on { background: var(--link-bg); } .dk-src.on > .ico:first-child { color: var(--link); }
.dk-src > .ico { color: var(--muted); width: 18px; height: 18px; } .dk-src > .ico:last-child { color: var(--faint); width: 15px; height: 15px; }
.dk-src .b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dk-src .n { font-weight: 600; overflow-wrap: anywhere; } .dk-src .t { font-size: 12.5px; color: var(--muted); }

/* ---- left: the case and its chats */
.dk-back { margin-top: 10px; height: 32px; font-size: 13.5px; color: var(--muted); }
.dk-back .ico { width: 16px; height: 16px; }
.dk-ctx { padding: 8px 0 0 6px; min-width: 0; }
.dk-ctx-top { display: flex; align-items: flex-start; gap: 4px; }
.dk-ctx h1 { flex: 1; min-width: 0; padding-top: 3px; font: 600 19px/1.25 var(--serif); letter-spacing: -.01em; white-space: normal; overflow-wrap: anywhere; }
.dk-ctx-top .btn { flex: none; color: var(--muted); margin-right: calc(var(--dk-end) - 15px); }   /* the pencil, 30px, on the axis */
.dk-ctx .meta { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--muted); white-space: normal; }
.dk-ctx .client { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; padding-right: 6px; }
.dk-ctx .client > span:first-child { min-width: 0; }
.dk-ctx .facts { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding-right: 6px; font-size: 13px; }
.dk-ctx .spend { font-weight: 600; color: var(--ink); white-space: nowrap; cursor: help; }
.dk-sec-act { justify-content: space-between; margin-top: 20px; height: 26px; }
.dk-sec-act .btn { color: var(--muted); margin-right: calc(var(--dk-end) - 17px); } .dk-sec-act .btn .ico { width: 16px; height: 16px; }   /* 26px, in the heading's 4px */
.dk-chats { margin-top: 2px; }
.desk .dk-left button.dk-nav-i { width: 100%; height: 38px; padding: 0 10px; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; }
.desk .dk-left button.dk-nav-i:hover { background: var(--hover); color: var(--ink); }
.desk .dk-left button.dk-chat-i { height: auto; min-height: 44px; padding: 6px 10px; font-weight: 500; color: var(--text-2); }
.dk-chat-i .lbl { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dk-chat-i .n { overflow: hidden; text-overflow: ellipsis; } .dk-chat-i .t { font-size: 12px; font-weight: 400; color: var(--muted); }
.dk-chat-i > .ico:first-child { width: 16px; height: 16px; color: var(--faint); }
.dk-chat-i > .ico.spin { color: var(--link); width: 15px; height: 15px; } .dk-chat-i > .ico.warn { color: var(--warn-dot); width: 15px; height: 15px; }
.desk .dk-left button.dk-chat-i[aria-current="true"] { color: var(--ink); font-weight: 600; }
.dk-chat-i[aria-current="true"] > .ico:first-child { color: var(--link); }
/* A chat is a row: its name opens it, the menu at the row's end renames and deletes it (static/desk-case.js). The row
   is what is lit under the pointer and lifted when its chat is open, so the menu's dots stand inside the box, on the
   zone's axis. The dots show on the open chat and on the row the pointer or the keyboard is on. A screen with no
   pointer to hold over a row (a phone, a tablet) and a phone's drawer show the open chat's alone (the owner,
   2026-11-23: «только у текущего чата»): another chat is opened first. */
.dk-chat-row { position: relative; display: flex; align-items: center; min-width: 0; border-radius: 10px; }
.dk-chat-row:not(.on):not(.editing):has(.dk-chat-menu[open]) { background: var(--hover); }
@media (hover: hover) { .dk-chat-row:not(.on):not(.editing):hover { background: var(--hover); } }
.dk-chat-row.on, .dk-chat-row.editing { background: var(--surface); box-shadow: var(--lift); }
.desk .dk-left .dk-chat-row > button.dk-chat-i { flex: 1 1 0; width: auto; min-width: 0; }
.desk .dk-left .dk-chat-row > button.dk-chat-i:hover { background: none; }
.dk-chat-menu { flex: none; margin-right: calc(var(--dk-end) - 15px); }          /* the dots, 30px */
.dk-chat-menu > summary { color: var(--muted); opacity: 0; transition: opacity var(--dur) ease, color var(--dur); }
/* under a pointer a row's dots come in from the row's edge, and leave the same way (the owner, 2026-11-23, of four
   motions shown to him: «вариант В»); the open chat's stand still. The picture moves, the button keeps its place. */
.dk-chat-menu > summary > .ico { transform: translateX(8px); transition: transform var(--dur) var(--ease); }
.dk-chat-row:hover .dk-chat-menu > summary > .ico, .dk-chat-row:focus-within .dk-chat-menu > summary > .ico, .dk-chat-row.on .dk-chat-menu > summary > .ico,
.dk-chat-menu[open] > summary > .ico { transform: none; }
.desk .dk-chat-menu > summary.btn.icon { width: 30px; height: 30px; }
.dk-chat-row:hover .dk-chat-menu > summary, .dk-chat-row:focus-within .dk-chat-menu > summary, .dk-chat-row.on .dk-chat-menu > summary, .dk-chat-menu[open] > summary { opacity: 1; }
/* under a pointer and while their menu is open the dots turn dark, and no ground is laid under them: at the row's end a
   ground touched the edge of the open chat's box (the owner, 2026-11-23: «точки просто чернеют при наведении») */
.desk .dk-chat-menu > summary.btn.icon:hover, .desk .dk-chat-menu[open] > summary.btn.icon { background: none; color: var(--ink); }
@media (hover: none), (max-width: 899.98px) {
  .dk-chat-row:not(.on) > .dk-chat-menu { display: none; }
  .desk .dk-left .dk-chat-row:not(.on) > button.dk-chat-i { padding-right: calc(var(--dk-end) - 7.5px); }   /* its mark, 15px, on the axis */
  /* the dots and the buttons of a name being written: drawn 30px wide on the axis, a finger's 40px to touch (the
     room is counted from inside the button's 1px border) */
  .desk .dk-chat-menu > summary.btn.icon, .desk .dk-chat-edit > .btn.icon { position: relative; }
  .desk .dk-chat-menu > summary.btn.icon::after, .desk .dk-chat-edit > .btn.icon::after { content: ""; position: absolute; inset: -6px; }
  .desk .dk-chat-edit > .btn.icon + .btn.icon { margin-left: 4px; }              /* their 40px side by side, not over each other */
}
.dk-chat-menu > .menu-list { min-width: 168px; }
/* a chat's name being written, in its row */
.dk-chat-edit { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 6px calc(var(--dk-end) - 15px) 6px 10px; }
.dk-chat-edit > .ico { flex: none; width: 16px; height: 16px; color: var(--link); }
.desk .dk-chat-edit > input:not([type=checkbox]):not([type=radio]):not([type=file]) { flex: 1 1 0; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--link); border-radius: 8px;
  background: var(--surface); box-shadow: 0 0 0 3px var(--focus); font: 500 14.5px/1 var(--sans); color: var(--ink); outline: none; }
.desk .dk-chat-edit > .btn.icon { flex: none; width: 30px; height: 30px; color: var(--muted); } .desk .dk-chat-edit > .btn.icon.ok { color: var(--ok); }
/* the rail has no room for the chats: their icon opens the list beside it */
.desk .dk-left .dk-rail-only { display: none; }
.dk-rail-only > summary.dk-nav-i { width: 100%; color: var(--text-2); }
.dk-rail-only[open] > summary.dk-nav-i { background: var(--hover); color: var(--ink); }
.dk-rail-only.busy > summary .ico { color: var(--link); }
.menu-list.dk-pop { width: 280px; max-height: min(70vh, 520px); padding: 8px; border-radius: 14px; border-color: var(--line-strong); box-shadow: 0 12px 34px rgba(21, 24, 31, .14); }
.dk-pop-cap { padding: 6px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dk-left .dk-pop .lbl { opacity: 1; }
.desk .dk-left .dk-pop .dk-chat-row.on, .desk .dk-left .dk-pop .dk-chat-row.editing { background: var(--bubble); box-shadow: none; }

@media (min-width: 900px) {
  .dk-mid > main > .dk-case { height: 100%; }
  .dk-chat { height: 100%; }
  .dk-right.closed { width: 0; padding-left: 0; visibility: hidden;
                     transition: width var(--dk-dur) var(--dk-ease), padding var(--dk-dur) var(--dk-ease), visibility 0s linear var(--dk-dur); }
  .dk-left.rail .dk-ctx, .dk-left.rail .dk-chats { display: none; }
  .desk .dk-left.rail .dk-rail-only { display: block; }
  .dk-left.rail .dk-sec-act { margin: 8px 0 2px 1px; height: 38px; justify-content: flex-start; }
  .dk-left.rail .dk-back .ico { width: 18px; height: 18px; }
  .dk-left.rail .dk-sec-act .lbl { display: none; } .dk-left.rail .dk-sec-act::before { display: none; }
  .dk-left.rail .dk-sec-act .btn { width: 36px; height: 36px; margin: 0; }
}
@media (max-width: 899.98px) {
  .dk-case { display: block; height: calc(100dvh - var(--main-top, 0px)); }
  .dk-chat { height: 100%; }
  /* The top bar of a case, laid as any page's head: the menu button, the chat's name, the documents' button, and a
     platform administrator's meters a row under. It is a grid, because what the chat is doing (a question runs, or
     has stopped short) stands under the name: beside the button it took the room of the name, and the longer it ran
     the less was left. */
  .desk .dk-chat .chat-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 0 6px;
                              padding: 4px 8px 4px 4px; background: var(--surface); }
  .desk .chat-head > .menu-btn { grid-area: 1 / 1 / 3 / 2; }
  .desk .dk-chat .chat-head > .dk-chat-ttl { grid-area: 1 / 2 / 3 / 3; margin: 0 2px; }
  .desk .chat-head > .dk-open-right { grid-area: 1 / 3 / 3 / 4; }
  .desk .chat-head > .dk-admin-row { grid-area: 3 / 1 / 4 / -1; padding: 2px 0 4px 12px; }
  .desk .chat-head > .chat-status { grid-area: 2 / 2 / 3 / 3; align-self: start; min-width: 0; margin: 1px 2px 0; }
  .desk .chat-head:has(> .chat-status:not(:empty)) > .dk-chat-ttl { grid-area: 1 / 2 / 2 / 3; align-self: end; }
  .desk .chat-head > .chat-status .pill { height: auto; min-width: 0; max-width: 100%; padding: 0; background: none; font-size: 12px; line-height: 1.25; overflow: hidden; }
  .desk .chat-head > .chat-status .full { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; } .desk .chat-head > .chat-status .short { display: none; }
  .desk .dk-chat-ttl h2 { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .desk .dk-chat .chat-log { padding: 16px 16px 32px; }
  .desk .dk-chat .composer-wrap { padding: 6px 12px max(10px, env(safe-area-inset-bottom, 0px)); }
  .dk-open-right .btn-text { display: none; }
  .dk-right { position: fixed; top: var(--imp-h); right: 0; bottom: 0; left: 0; z-index: 45; width: auto; padding: 0; background: var(--surface);
              transform: translateX(100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
  .dk-right.open { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
  .dk-rcard { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .dk-resizer { display: none; }
  .dk-rhead { padding-left: 8px; }
  .dk-rhead > .btn { width: 44px; height: 44px; }
  .dk-ctx { padding-top: 4px; }
  .dk-ctx-top .btn { margin-right: calc(var(--dk-end) - 17px); }                 /* the pencil: 34px on a phone */
  /* the field a chat's name is written in, a finger tall (its buttons: above) */
  .desk .dk-chat-edit > input:not([type=checkbox]):not([type=radio]):not([type=file]) { height: 40px; font-size: 16px; }
}

/* ------------------------------------------------------------------------------------------ the settings */
/* templates/desk/settings.html and browser.html, static/desk-settings.js (ADR 0044, stage 4): the left zone lists the
   sections, the sheet shows one of them as groups of rows (the same groups and rows as the account's), a bar under it
   holds what is not saved yet, and what a check answered stands beside the sheet as the right zone of a case does. */
.dk-set { display: flex; min-width: 0; min-height: 0; }
.dk-set > form { display: none; }                     /* the forms the fields belong to by their ``form`` attribute */
.dk-set-sheet { flex: 1 1 0; min-width: 0; }
.dk-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dk-view .dk-head .spacer { flex: 1; }
.dk-head .sum.warn, .dk-map .s.warn { color: var(--warn-text); font-weight: 600; }
.dk-set-up { display: none; margin-left: -10px; color: var(--muted); }
.dk-page.wide { max-width: 1180px; }
.dk-page > .dk-info { margin-top: 14px; } .dk-page > .dk-info:first-child { margin: 0 0 14px; }
.dk-grp-h .txt { flex: 1; min-width: 0; } .dk-grp-h p { margin: 1px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.dk-grp.dk-flush > div:first-child .dk-t th { box-shadow: inset 0 -1px 0 var(--line); }
.dk-grp .tw { border-top: 1px solid var(--line); } .dk-grp.dk-flush .tw { border-top: 0; }
.dk-grp .dk-t th { position: static; } .dk-grp .dk-t th:first-child, .dk-grp .dk-t td:first-child { padding-left: 18px; }
.dk-grp .dk-t th:last-child, .dk-grp .dk-t td:last-child { padding-right: 18px; }
.dk-grp .dk-t td code { font-size: 12.5px; color: var(--text-2); }
.dk-grp > .muted, #registry > .muted { display: block; padding: 14px 18px; }
.dk-info { display: flex; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--link-bg); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.dk-info > .ico { flex: none; color: var(--link); margin-top: 2px; }
/* a row: its field, its choice or its switch on the right; a row under a switch it depends on stands in */
.dk-srow.sub { padding-left: 42px; background: var(--row); }
.dk-srow.changed .l::after, .dk-fgrid .field.changed > span::after, .dk-two-ta .field.changed > span::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--warn-dot); vertical-align: 2px; }
.dk-srow.flash, .dk-fgrid .field.flash { animation: dk-flash 1.8s ease-out; }
@keyframes dk-flash { 0%, 35% { background: var(--link-bg); } 100% { background: transparent; } }
.dk-in { display: inline-flex; align-items: center; width: 150px; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); overflow: hidden; }
.dk-in:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--focus); }
.dk-in > input, .dk-in > input:not([type=checkbox]):not([type=radio]):not([type=file]) { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0 11px; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; font-size: 14px; }
.dk-in .pre { padding-left: 11px; margin-right: -5px; color: var(--muted); } .dk-in .suf { padding: 0 11px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dk-in.n { width: 116px; } .dk-in.w { width: 300px; } .dk-in.xw { width: 400px; } .dk-in.n > input:not([type=checkbox]):not([type=radio]):not([type=file]) { text-align: right; }
.dk-in.mono > input:not([type=checkbox]):not([type=radio]):not([type=file]) { font: 13px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-2); }
.dk-in:has(.suf) { width: auto; min-width: 150px; } .dk-in:has(.suf) > input:not([type=checkbox]):not([type=radio]):not([type=file]) { width: 96px; flex: none; text-align: right; }
.desk .dk-srow select { height: 36px; min-width: 200px; max-width: 400px; border-radius: 9px; font-size: 14px; }
.dk-srow.two { grid-template-columns: minmax(0, 1fr) 150px 150px; gap: 2px 14px; }
.dk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px; gap: 0 14px; padding: 8px 18px; border-top: 1px solid var(--line);
           font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* a choice of a few: radio buttons drawn as the segments of one control */
.desk .dk-seg { display: inline-flex; background: var(--bubble); }
.desk .dk-seg > .seg-item { position: relative; flex: none; height: 28px; padding: 0 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.dk-seg input { position: absolute; opacity: 0; pointer-events: none; }
.desk .dk-seg > .seg-item:has(input:checked) { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 24, 31, .10); }
.desk .dk-seg > .seg-item:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 1px; }
/* a stored secret: its last characters and "Change"; the field comes under them */
.desk .dk-secret { flex-wrap: wrap; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; max-width: 420px; }
.dk-secret > .ico { color: var(--faint); } .dk-secret .cur { font: 13px/1.3 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-2); overflow-wrap: anywhere; }
.dk-secret .cur.none { font: 13px/1.3 var(--sans); color: var(--muted); } .dk-secret:has(.cur.none) > .ico { display: none; }
.desk .dk-secret input:not([type=checkbox]):not([type=radio]):not([type=file]), .desk .dk-secret textarea { flex: 1 1 100%; width: 320px; max-width: 100%; } .desk .dk-secret textarea { font: 12px/1.4 ui-monospace, Menlo, monospace; }
/* fields in two columns, each under its name (the Video Indexer's identifiers; the filter's rules) */
.dk-fgrid, .dk-two-ta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.desk .dk-fgrid input:not([type=checkbox]):not([type=radio]):not([type=file]) { height: 36px; border-radius: 9px; font: 13px/1 ui-monospace, "SF Mono", Menlo, monospace; }
.desk .dk-two-ta textarea { min-height: 92px; border-radius: 9px; font-size: 14px; }
.dk-grp-h select.chip { height: 30px; font-size: 13px; max-width: 260px; }
.dk-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.dk-set-tabs { margin: 16px 0 14px; }
.dk-set-tabs .chip > span:not(:empty) { margin-left: 2px; }
.dk-try { padding-top: 14px; border-top: 1px solid var(--line); } .dk-try .row { display: flex; gap: 8px; } .dk-try input:not([type=checkbox]):not([type=radio]):not([type=file]) { flex: 1; min-width: 0; height: 36px; border-radius: 9px; }
.dk-try #gt-result:not(:empty) { margin-top: 10px; }
/* the reference documents and the rulebook (settings.js draws them) */
.dk-files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dk-files li { display: flex; align-items: center; gap: 8px; margin: 0 !important; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.dk-files li .muted { font-weight: 400; } .dk-files li .btn { margin-left: auto; } .dk-files li.muted { font-weight: 400; }
.dk-files + .dk-srow { border-top: 0; }
.desk #style-file { max-width: 240px; font-size: 13px; }
.dk-rulebook { padding-top: 14px; border-top: 1px solid var(--line); }
.dk-rulebook > .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.dk-rulebook label.wide { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.desk .dk-rulebook textarea { border-radius: 9px; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace; }
.dk-rulebook #style-save { display: none; }                     /* the bar under the sheet saves the rulebook's text */
/* the providers' accounts: a card each, the figure large */
.dk-provs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.dk-provs > .dk-grp + .dk-grp { margin-top: 0; }
.dk-prov-b { padding: 14px 18px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.dk-prov .dk-grp-h h2 { flex: 1; }
.dk-prov-b b.num { display: block; font: 600 26px/1.2 var(--serif); color: var(--ink); } .dk-prov-b .m { margin-top: 4px; }
.dk-prov-b .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .dk-prov-b .acts > span { margin: 0 !important; }
.desk .dk-prov-b .acts input:not([type=checkbox]):not([type=radio]):not([type=file]) { height: 32px; border-radius: 8px; } .dk-prov-b .acts .btn { height: 32px; }
.dk-prov-b #credits-topups { margin-top: 10px !important; }
.dk-prov-at { grid-column: 1 / -1; margin-top: -6px; font-size: 12.5px; color: var(--muted); }
/* the overview: every section a card with its state */
.dk-set-big { flex: none; max-width: none; height: 44px; padding: 0 14px; border-radius: 12px; }
.dk-set-big > input { font-size: 15px; }
.dk-map-h { margin: 20px 2px 8px; font: 700 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dk-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dk-map a { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; transition: border-color var(--dur), box-shadow var(--dur); }
.dk-map a:hover { border-color: var(--line-strong); box-shadow: var(--sheet-shadow); }
.dk-map a:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.dk-map .mi { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--bubble); color: var(--text-2); }
.dk-map .tx { flex: 1; min-width: 0; } .dk-map b { display: block; font-size: 14.5px; font-weight: 650; color: var(--ink); } .dk-map .go { display: none; color: var(--faint); flex: none; }
.dk-map .s { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.dk-found { max-width: 860px; margin-top: 16px; padding: 0; } .dk-found > :first-child { border-top: 0; }
a.dk-hit { color: inherit; } a.dk-hit:hover { background: var(--row); }
/* what is not saved yet */
.dk-savebar { flex: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px 10px 22px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--muted); }
.dk-savebar .spacer { flex: 1; } .dk-savebar .ico.ok { color: var(--muted); }
.dk-savebar .dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); flex: none; }
.dk-savebar.dirty .dot { display: block; } .dk-savebar.dirty .ico.ok, .dk-savebar.busy .ico.ok { display: none; }
.dk-savebar.dirty .what { color: var(--ink); font-weight: 600; }
.dk-savebar .btn { height: 36px; }
/* the left zone: the sections by their groups */
.dk-ctx h1 a { color: inherit; }
.desk .dk-set-find { height: 34px; max-width: none; margin: 12px 0 0; padding: 0 10px; border-radius: 9px; }
.dk-set-find > input { font-size: 13.5px; }
.dk-set-nav { margin-top: 0; gap: 0; } .dk-set-nav .dk-sec { margin-top: 12px; }
.dk-set-i { height: 30px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.dk-set-i[aria-current="page"] { font-weight: 650; }
.dk-set-i .lbl { flex: 1; }
.dk-set-i .mark { flex: none; width: 7px; height: 7px; margin-right: calc(var(--dk-end) - 13.5px); border-radius: 50%; background: var(--warn-dot); }   /* on the axis */
.dk-set-i .mark.cnt { width: auto; height: auto; min-width: 20px; margin-right: 0; padding: 1px 7px; border-radius: 999px; background: var(--bubble); color: var(--muted); font-size: 12px; font-weight: 650; text-align: center; }
.dk-set-i[aria-current="page"] .mark.cnt { background: var(--paper); }
#dk-set-rail .menu-item[aria-current="page"] { background: var(--bubble); font-weight: 600; }
/* what a check answered, beside the sheet */
.dk-set-right .dk-rhead { gap: 8px; padding-left: 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); } .dk-set-right .dk-rhead .spacer { flex: 1; }
.dk-res { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px 20px; scrollbar-width: thin; }
.dk-res-t { font: 600 18px/1.3 var(--serif); color: var(--ink); overflow-wrap: anywhere; } .dk-res-t.bad { color: var(--bad); }
.dk-res-m { margin-top: 3px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
#dk-res-body { margin-top: 16px; } #dk-res-body:empty { display: none; }
.dk-res-s { margin-top: 18px; } .dk-res-s h3 { margin: 0 0 8px; font: 700 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dk-res-s h4 { margin: 10px 0 6px; font: 600 13px/1.4 ui-monospace, Menlo, monospace; color: var(--text-2); }
.dk-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; }
.dk-kv dt { color: var(--muted); } .dk-kv dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.dk-steps, .dk-res-line { font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-2); overflow-wrap: anywhere; }
.dk-steps .okc { color: var(--ok); } .dk-steps .bc { color: var(--bad); font-weight: 700; }
.dk-raw { margin-top: 18px; } .dk-raw summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.desk .dk-raw pre.log { margin-top: 8px; max-height: none; padding: 10px 12px; background: var(--row); color: var(--text-2); border-radius: 9px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* the server's browser: the screen is the sheet, the collector beside it */
.dk-br-side { flex: none; width: clamp(400px, 34vw, 500px); padding-left: 10px; min-height: 0; }
.dk-br-side .dk-rcard { width: auto; }
.dk-res-h { flex: none; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.dk-res-h .top { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.dk-br-side .m { font-size: 13px; line-height: 1.45; color: var(--muted); } .dk-res-h .m { margin-top: 4px; }
.dk-br-b { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.dk-br-b .dk-t th:first-child, .dk-br-b .dk-t td:first-child { padding-left: 18px; } .dk-br-b .dk-t th:last-child, .dk-br-b .dk-t td:last-child { padding-right: 18px; }
.dk-br-b .dk-t th, .dk-br-b .dk-t td { padding-left: 7px; padding-right: 7px; font-size: 13.5px; }
.dk-br-b .dk-t th { white-space: normal; font-size: 11px; vertical-align: bottom; } .dk-br-b .dk-t td:first-child { white-space: nowrap; }
.dk-br-b .pill { height: auto; min-height: 22px; padding: 2px 8px; border-radius: 11px; white-space: normal; text-align: left; }
.dk-br-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 18px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.dk-br-none { padding: 4px 18px 14px; }
.dk-br-f { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 18px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.dk-br-f .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .dk-br-f .spacer { flex: 1; }
.desk .dk-br .br-screen { margin: 0 18px 18px; border-radius: 10px; }

@media (min-width: 900px) {
  .dk-mid > main > .dk-set { height: 100%; }
  .dk-left.rail .dk-set-find, .dk-left.rail .dk-set-nav { display: none; }
  .dk-br-side .dk-rcard { height: 100%; }
}
@media (max-width: 1239.98px) { .dk-map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899.98px) {
  .dk-set { display: block; }
  .dk-set-up { display: inline-flex; margin-left: -6px; }
  /* the overview is the list of sections: a group a box of rows */
  .dk-set-big { height: 42px; }
  .dk-map { display: block; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
  .dk-map a { align-items: center; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .dk-map a:first-child { border-top: 0; } .dk-map .go { display: block; }
  .dk-srow.sub { padding-left: 28px; }
  .dk-srow:has(.dk-in.w), .dk-srow:has(.dk-in.xw), .dk-srow:has(.dk-secret), .dk-srow:has(select), .dk-srow:has(.dk-seg) { grid-template-columns: minmax(0, 1fr); }
  .dk-srow:has(.dk-in.w) .ctl, .dk-srow:has(.dk-in.xw) .ctl, .dk-srow:has(.dk-secret) .ctl, .dk-srow:has(select) .ctl, .dk-srow:has(.dk-seg) .ctl { justify-content: flex-start; }
  .dk-in.w, .dk-in.xw { width: 100%; } .desk .dk-srow select { width: 100%; max-width: none; } .desk .dk-secret { max-width: none; }
  .desk .dk-in > input:not([type=checkbox]):not([type=radio]):not([type=file]), .desk .dk-srow select, .desk .dk-fgrid input:not([type=checkbox]):not([type=radio]):not([type=file]), .desk .dk-two-ta textarea, .desk .dk-try input:not([type=checkbox]):not([type=radio]):not([type=file]) { font-size: 16px; }
  .dk-in { height: 42px; } .dk-in.n { width: 104px; } .desk .dk-srow select { height: 42px; }
  .desk .dk-seg { max-width: 100%; overflow: auto hidden; scrollbar-width: none; } .desk .dk-seg > .seg-item { height: 36px; }
  .dk-srow.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dk-srow.two > div:first-child { grid-column: 1 / -1; } .dk-srow.two .dk-in { width: 100%; }
  .dk-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px 14px; } .dk-cols > span:first-child { display: none; }
  .dk-fgrid, .dk-two-ta, .dk-provs { grid-template-columns: minmax(0, 1fr); } .dk-fgrid, .dk-two-ta { padding: 12px 14px 14px; }
  .dk-files li { padding: 10px 14px; } .dk-prov-b { padding: 12px 14px 14px; }
  .dk-savebar { position: sticky; bottom: 0; z-index: 20; padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px)) 16px; box-shadow: 0 -6px 18px rgba(21, 24, 31, .06); }
  .dk-savebar .btn { height: 42px; }
  .dk-savebar:not(.dirty):not(.busy) { display: none; }          /* a phone has no room for a bar that says all is saved */
  .dk-br-side { width: auto; padding: 0; } .dk-br-side .dk-rcard { border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
  .desk .dk-br .br-screen { margin: 0 14px 14px; }
  .dk-res { padding: 14px 16px 20px; }
}

/* ------------------------------------------------------------------------------------------ the platform's pages */
/* templates/desk/firms.html, dashboard.html, group.html, data.html, problems.html, uploads.html (ADR 0044, stage 5):
   what a platform administrator sees beside a firm's pages. The classic pages' own elements, which their scripts
   draw, laid on sheets; the pieces are those of the firm's pages and of the settings. */
.dk-firms .dk-t td:last-child { width: 1%; }
.dk-tabs .chip > b { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--bubble); border-radius: 999px; padding: 1px 7px; min-width: 22px; text-align: center; }
.dk-tabs .chip.on > b { background: #fff; }

/* ---- the state of the data: four figures that lead to the tabs under them */
.desk .dk-st-tiles .k { display: block; color: inherit; text-align: left; cursor: pointer; transition: background var(--dur); }
.desk .dk-st-tiles .k:hover { background: var(--row); } .desk .dk-st-tiles .k:first-child { border-radius: 15px 0 0 15px; } .desk .dk-st-tiles .k:last-child { border-radius: 0 15px 15px 0; }
.desk .dk-st-tiles .k:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.dk-st-tiles .k span .ico { vertical-align: -2px; margin-right: 6px; color: var(--muted); }
.dk-st-tiles .k i { display: block; margin-top: 2px; font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk .dk-st-tiles .k[data-kind="bad"] b { color: var(--bad); } .desk .dk-st-tiles .k[data-kind="warn"] b { color: var(--warn-text); }
.dk-st-tabs { margin: 16px 0 10px; }
.dk-st-box { padding: 6px 22px 22px; overflow-x: auto; } .dk-st-box td, .dk-st-box p { overflow-wrap: anywhere; }
.dk-status [data-stpane] > .tw { border-top: 1px solid var(--line); }
.desk .dk-status table.groups td, .desk .dk-status table.jobs td { font-size: 13.5px; vertical-align: top; }
.desk .dk-status table.groups td:first-child a { color: var(--ink); }

/* ---- one import: its state and log on the sheet, its runs beside, the other imports in the left zone */
.dk-imp-sum #group-summary { padding: 14px 18px; } .dk-imp-sum #group-summary > p { margin: 0; }
.dk-imp .dk-head .actions { display: flex; gap: 8px; }
.desk .dk-imp-log pre.log { margin: 0 18px 18px; height: min(56vh, 620px); max-height: none; border-radius: 10px; }
.dk-imports { margin-top: 0; }
.dk-imports .dk-nav-i { height: 36px; font-weight: 500; gap: 8px; } .dk-imports .dk-nav-i .lbl { flex: 1; }
.dk-imports .dk-nav-i > .ico:first-child { width: 15px; height: 15px; color: var(--faint); } .dk-imports .dk-nav-i .ico.spin { color: var(--link); width: 15px; height: 15px; }
.dk-imports .dk-nav-i[aria-current="page"] { font-weight: 650; }
.dk-imports .mark.bad { flex: none; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--bad); }
.dk-imp-runs .dk-t td { padding: 9px 7px; font-size: 13px; vertical-align: top; } .dk-imp-runs .dk-t td:first-child { padding-left: 18px; }

/* ---- the data: the two searches on the sheet, what is opened read beside the list */
.dk-data-pad { padding-bottom: 20px; }
.dk-data .dk-head .sum { flex: 0 1 auto; } .dk-data .dk-head .dk-tabs { flex: none; flex-wrap: nowrap; }
.desk .dk-data .dt-results.card { border-radius: 14px; box-shadow: none; }
.desk .dk-data .dt-bar .input.dt-q { height: 40px; border-radius: 10px; }

/* ---- the files a reading stumbled on: a file a row of the sheet */
.dk-problems .pb-list { gap: 0; }
.desk .dk-problems .pb-item.card { padding: 14px 22px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.desk .dk-problems .pb-name a { font-size: 14.5px; color: var(--ink); }
.dk-problems .dk-tools { padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---- uploads */
.dk-up-page { max-width: 980px; }
.desk .dk-uploads .dropzone { padding: 26px; border-width: 1.5px; border-radius: 14px; }
.dk-uploads .dropzone ~ .dk-grp, .dk-uploads #up-status:not([hidden]) { margin-top: 14px; }
.dk-up-note { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.desk .dk-uploads .dk-srow select.chip { min-width: 0; height: 30px; font-size: 13px; } .dk-uploads .dk-srow .d { margin: 0; font-size: 14px; }
.dk-uploads .dk-grp > .empty { margin: 16px 18px; }

@media (min-width: 900px) {
  /* what is opened is read beside the list: the right zone, not a panel over the page */
  .desk .dk-data > #reader.slideover { position: relative; inset: auto; z-index: auto; flex: none; width: 0; margin-left: 0; min-height: 0; transform: none; visibility: hidden;
    background: var(--surface); border: 0 solid var(--line); border-radius: var(--sheet-radius); box-shadow: none; overflow: hidden;
    transition: width var(--dk-dur) var(--dk-ease), margin var(--dk-dur) var(--dk-ease), visibility 0s linear var(--dk-dur); }
  .desk .dk-data > #reader.slideover.open { width: clamp(420px, 40vw, 620px); margin-left: 10px; visibility: visible; border-width: 1px; box-shadow: var(--sheet-shadow);
    transition: width var(--dk-dur) var(--dk-ease), margin var(--dk-dur) var(--dk-ease); }
}
@media (max-width: 899.98px) {
  .dk-st-box { padding: 6px 16px 18px; }
  .dk-data .dk-head .sum { display: none; }           /* a description, not a figure: the top bar's room goes to the tabs */
  .desk .dk-st-tiles .k, .desk .dk-st-tiles .k:first-child, .desk .dk-st-tiles .k:last-child { border-radius: 0; }
  .desk .dk-problems .pb-item.card { padding: 14px 16px; }
  .desk .dk-imp-log pre.log { margin: 0 14px 14px; height: 50vh; }
}
