/* agora web client: one stylesheet, light and dark by the system's choice. */
/* The terminal's font, served beside the page; the name is FONT in console/term.ts. */
@font-face {
  font-family: "JuliaMono";
  src: url("fonts/JuliaMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
:root {
  --bg: #fbfbfa; --fg: #1d1d1b; --muted: #5c5c57; --line: #e2e1dc; --accent: #1f4f86;
  --ok: #1f6f2b; --warn: #b26a00; --fail: #a11d1d; --stale: #6f6f69; --code: #f1f0ec;
  /* Status tokens with their contrast on --bg: working, background, idle, context, silent or lost. */
  --st-working: #1f6f2b; --st-background: #1d5f8a; --st-idle: #4a5568; --st-rotation: #6b3fa0; --st-lost: #a11d1d;
  --st-wait-bg: #b23c00; --st-wait-fg: #ffffff;
  /* The page's frame (the mockup's tokens): the column, a raised surface, hover and selection. */
  --side: #f0efec; --raise: #ffffff; --hover: #e7e5e0; --sel: #dfe7f1; --rotation: var(--st-rotation);
  /* Buttons (the desktop client draws them from these; the page's own buttons do not use them yet): four kinds, a colour
     for hover and for a press each, a border that can be seen, a disabled look of its own, and the veils behind dialogs. */
  --btn-primary: #1f4f86; --btn-primary-fg: #ffffff; --btn-primary-hover: #2b5f9b; --btn-primary-down: #173d69;
  --border-strong: #84837d; --btn-hover: #ecebe7; --btn-down: #dedcd6;
  --btn-danger: #a11d1d; --btn-danger-fg: #ffffff; --btn-danger-hover: #b52626; --btn-danger-down: #861616;
  --btn-off: #f0efec; --btn-off-fg: #686762; --btn-off-line: #d6d5d0;
  --scrim: rgb(0 0 0 / 0.4); --scrim-soft: rgb(0 0 0 / 0.2);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615; --fg: #e8e7e2; --muted: #a3a29c; --line: #2c2c2a; --accent: #8ab4e0;
    --ok: #6fcf7c; --warn: #ffb74d; --fail: #ff8a80; --stale: #8b8a84; --code: #21211f;
    --st-working: #6fcf7c; --st-background: #6cb6e8; --st-idle: #a8b3c4; --st-rotation: #c4a3f0; --st-lost: #ff8a80;
    --st-wait-bg: #ff9a4d; --st-wait-fg: #1a0d00;
    --side: #1e1e1c; --raise: #232321; --hover: #2a2a27; --sel: #23324a;
    --btn-primary: #8ab4e0; --btn-primary-fg: #0f1a26; --btn-primary-hover: #a2c4e8; --btn-primary-down: #739fcf;
    --border-strong: #75746e; --btn-hover: #2e2e2b; --btn-down: #3a3a36;
    --btn-danger: #ff8a80; --btn-danger-fg: #2a0000; --btn-danger-hover: #ffa39b; --btn-danger-down: #f26d62;
    --btn-off: #1e1e1c; --btn-off-fg: #8f8e88; --btn-off-line: #3a3a37;
    --scrim: rgb(0 0 0 / 0.6); --scrim-soft: rgb(0 0 0 / 0.35);
  }
}
* { box-sizing: border-box; }
/* `hidden` means hidden whatever display a rule gives the element: form#login's
   grid kept the form on the page after the login. */
[hidden] { display: none !important; }
/* The page is one column the height of the window (dvh where the browser has it, so a phone's moving address bar does
   not hide the bottom): the header takes what it needs and the rest goes down to the terminal. min-height: 0 on every
   flex child on the way, or a child would keep its content's height and push the window's edge out. */
html { height: 100%; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, sans-serif; }
.brand { font-weight: 600; }
#state { color: var(--muted); font-size: 13px; }
body.in #state { display: none; }
form#login { width: 100%; max-width: 360px; margin: 48px auto; padding: 0 16px; display: grid; gap: 12px; }
form#login label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
/* Okta on (main.ts adds .okta): the password half waits behind its link (.show-pw) */
form#login.okta:not(.show-pw) .pw { display: none; }
form#login button.link { background: none; border: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: start; font-size: 13px; }
input, button { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
button { cursor: pointer; }
/* A password field (password.ts): the Caps Lock sign left of it (its place kept, so the field does not move), the eye right. */
.pw-box { display: flex; align-items: center; gap: 4px; }
.pw-box > input { flex: 1 1 auto; min-width: 0; }
.pw-box .pw-caps { display: inline-flex; flex: none; color: var(--fail); visibility: hidden; }
.pw-box[data-caps="on"] .pw-caps { visibility: visible; }
.pw-box .pw-eye { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 4px; border: 1px solid transparent; background: none; color: var(--muted); line-height: 0; }
.pw-box .pw-eye:hover { color: var(--fg); background: var(--hover); }
.pw-box .pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 12px; }
/* The feedback window: not modal, moved by its title; the words, the kind, the attachments. */
dialog.feedback { position: fixed; margin: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; z-index: 50; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 16px 12px; box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
dialog.feedback .feedback-title { display: flex; align-items: center; justify-content: space-between; margin: 0 -16px 8px; padding: 8px 16px; cursor: move; touch-action: none; user-select: none; background: color-mix(in srgb, var(--line) 35%, transparent); }
dialog.feedback h2 { font-size: 16px; margin: 0; }
dialog.feedback .feedback-x, dialog.feedback .feedback-rm { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; }
dialog.feedback .feedback-adds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
dialog.feedback ul.feedback-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
dialog.feedback ul.feedback-files li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
dialog.feedback ul.feedback-files .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
dialog.feedback ul.feedback-files .size { font-size: 12px; color: var(--muted); }
dialog.feedback form { display: flex; flex-direction: column; gap: 8px; }
dialog.feedback label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
dialog.feedback label.inline { flex-direction: row; align-items: center; gap: 6px; color: inherit; }
dialog.feedback textarea, dialog.feedback select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
dialog.feedback img.feedback-shot { width: 56px; height: 40px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; flex: none; }
dialog.feedback ul.feedback-files li.pic { cursor: zoom-in; }
/* The picture of the draft shown large (feedback.ts, enlarge): over the whole viewport, the window's own box does not hold it. */
dialog.feedback .feedback-preview { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: rgb(0 0 0 / 0.8); cursor: zoom-out; }
dialog.feedback .feedback-preview img { min-width: min(50vmin, 400px); max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; background: var(--bg); cursor: default; }
dialog.feedback .feedback-preview .feedback-x { position: absolute; top: 12px; right: 16px; color: #fff; font-size: 22px; cursor: pointer; }
dialog.feedback .feedback-preview-name { color: #fff; font-size: 13px; }
dialog.feedback .error { color: var(--fail); font-size: 13px; margin: 0; }
dialog.feedback .hint { font-size: 12px; color: var(--muted); margin: 0; }
.feedback-bar { display: flex; gap: 8px; }
/* One line, never wrapping: a wrapped line is as tall as its tallest item, so a long correspondent list made `main`
   scroll as a whole and left the pane its own height. On a phone the column below stacks them. */
table.board { border-collapse: collapse; width: 100%; max-width: 900px; }
table.board th, table.board td { text-align: left; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.board .age { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
#signin-banner { padding: 6px 12px; border-bottom: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
#signin-banner .signin { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
table.clients .badge { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; }
table.clients .act { white-space: nowrap; }
table.clients tr.this-client { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.clients-page { flex: 1; min-width: 0; max-width: 900px; align-self: flex-start; }
.clients-said { color: var(--warn); }
table.board .note { color: var(--muted); font-size: 13px; }
/* A status is a glyph and a word; colour is only the third carrier. */
.look-working { color: var(--st-working); }
.look-background { color: var(--st-background); }
.look-idle, .look-online { color: var(--st-idle); }
.look-offline, .look-unseen { color: var(--muted); }
.look-held { color: var(--muted); font-style: italic; }
.look-rotation { color: var(--st-rotation); font-weight: 600; }
.look-disconnected, .look-stale { color: var(--st-lost); font-weight: 600; }
.look-waiting { background: var(--st-wait-bg); color: var(--st-wait-fg); font-weight: 700; border-radius: 4px; }
.look-waiting { padding: 0 6px; }
.glyph { display: inline-block; min-width: 1.1em; text-align: center; }
/* Silent: not to be believed, so the whole row is slanted and the word red. */
tr.shown-stale td { color: var(--stale); font-style: italic; }
tr.shown-stale td.word .badge { color: var(--st-lost); font-style: normal; }
tr.shown-never-heard td { color: var(--stale); }
tr.flash td { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.count { color: var(--muted); font-size: 12px; }
/* Letters and room lines live in a sandboxed frame with a style of its own. It cannot size
   itself to what it shows, having no script, so it takes the list area's height and scrolls. */
/* The feed's wrapper carries the frame's height down from the pane: without it the frame kept its min-height. */
.feed-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
iframe.foreign { display: block; width: 100%; flex: 1; min-height: 320px; border: 0; }
/* Changes held back while the reader is in the frame. */
button.feed-new { margin-bottom: 6px; border-color: var(--accent); color: var(--accent); }
.console { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; width: 100%; color: var(--fg); }
.console [hidden] { display: none !important; }
.console-head { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
/* The controls are one row wherever they sit: in the contact view's head, or in the tabs page's strip. */
.console-controls { display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: center; }
.console-controls select, .console-controls button { padding: 2px 8px; }
/* Icon-and-word pickers: the icon alone when closed, icon and word in the list. */
.pick { position: relative; display: inline-block; }
.pick-btn { min-width: 2.4em; font-size: 15px; line-height: 1.3; }
/* Fixed, placed by picker.ts from the button's box: a parent that clips (the header's #cctl) cannot cut it away. */
.pick-list { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.25); }
.pick-list[hidden] { display: none; }
.pick-list .pick-opt { display: flex; align-items: center; gap: 8px; white-space: nowrap; text-align: left; padding: 4px 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 4px; }
.pick-list .pick-opt:hover, .pick-list .pick-opt:focus-visible { background: color-mix(in srgb, var(--line) 60%, transparent); }
.pick-list .pick-opt[aria-selected="true"] { color: var(--accent); }
.pick-icon { width: 1.4em; text-align: center; }
.console-who { font-weight: 600; margin-right: auto; }
select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
button:disabled, select:disabled { opacity: 0.5; cursor: default; }
.console-people { list-style: none; margin: 0; padding: 0; display: flex; gap: 0 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.console-people li.you { color: var(--fg); }
.console-control { color: var(--warn); font-size: 13px; }
.console-lease { display: flex; gap: 4px 10px; align-items: center; flex-wrap: wrap; color: var(--warn); font-size: 13px; }
.console-lease button { padding: 2px 8px; }
.console-lease[hidden], .console-lease [hidden] { display: none !important; }
.console-banner { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.console-banner .banner-line { font-weight: 600; }
.console-banner .banner-words { color: var(--muted); overflow-wrap: anywhere; }
.console-banner.phase-lost, .console-banner.phase-restarting { border-color: var(--warn); }
.console-banner.phase-exited, .console-banner.phase-refused { border-color: var(--fail); }
.banner-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.console-code { display: flex; gap: 8px; }
.console-code input { width: 9em; font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }
/* The bridge's lines: one strip of one line, always there, empty or not, the newest line in it (the rest in its tooltip). Its height
   is fixed so that the terminal's box is the same with a line or without, and the WORK probe holds the same strip: the
   grid claimed is the grid of the box the terminal is drawn in, and the font stays whole. */
.console-said { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 16px; height: 16px; flex: none; overflow: hidden; color: var(--muted); font-family: ui-monospace, monospace; }
.console-said li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-said li:not(:last-child) { display: none; }
.term-box { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #000; border-radius: 6px; position: relative; }
.term-box.scroll { overflow-x: auto; }
/* A screen that is not live is shaded, so it never reads as current. */
.term-box.dim { opacity: 0.45; filter: grayscale(0.6); }
/* A terminal that takes no keys shows it: the cursor is an outline, as in a window that has lost the focus. */
.term-box.frozen .xterm-cursor { background: transparent !important; color: inherit !important; outline: 1px solid var(--muted); outline-offset: -1px; }
.term-host { display: inline-block; }
.term-measure { position: absolute; visibility: hidden; white-space: pre; line-height: normal; left: -9999px; top: 0; }
/* xterm.css gives the viewport overflow-y: scroll, a track that is there with nothing to scroll; it is wanted only for the
   scrollback. */
.xterm .xterm-viewport { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 transparent; }
/* One row: the tabs at the left, the controls at the right. When the controls would leave the tabs less than the
   basis below, they wrap to a row of their own (STRIP_MIN_TABS_PX in main.ts). */
.console-term { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* The on-screen keyboard: keys never take the focus, so a touch device's own keyboard stays down. */
.kb { flex: none; display: flex; flex-direction: column; gap: 4px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kb-bar { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.kb-keys { display: flex; flex-direction: column; gap: 4px; }
.kb-row { display: flex; gap: 4px; }
.kb-key { flex: 1 1 0; min-width: 0; padding: 8px 2px; text-align: center; font-size: 14px; white-space: nowrap; overflow: hidden; }
.kb-key.wide { flex-grow: 2; }
.kb-key.space { flex-grow: 6; }
.kb-key.kb-page { flex-grow: 2; color: var(--accent); border-color: var(--accent); }
.kb-key.armed { border-color: var(--accent); color: var(--accent); }
.kb-key.locked { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@media (max-width: 600px) { .kb-key { padding: 10px 0; font-size: 13px; } }
/* Buttons that show an icon alone: square-ish, the icon centred; the words are their title and aria-label. */
button.icon, header button.icon, .console-controls button.icon, .tab-right button.icon { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; }
button.icon svg { display: block; }

/* The guides view: the list on the left, the page beside it; one column on a phone. */
.guides { display: flex; gap: 0; min-height: 0; flex: 1; }
/* nowrap: the header's `nav` rule wraps, and a long list then broke into narrow columns side by side. */
.guides-list { flex: none; width: 280px; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.guides-list button { overflow-wrap: anywhere; }
/* The bar between the list and the page, dragged to resize the list (guides.ts, splitter). */
.guides-split { flex: none; width: 9px; margin: 0 4px; cursor: col-resize; touch-action: none; position: relative; }
.guides-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--line); }
.guides-split:hover::after, .guides-split:focus-visible::after, .guides-split.on::after { left: 3px; width: 3px; background: var(--accent); }
.guides-split:focus-visible { outline: none; }
/* While the bar is dragged, the guide's frame must not take the pointer, and nothing is selected. */
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe { pointer-events: none; }
.guides-list h3 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.guides-list h4 { margin: 8px 0 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.guides-list button { text-align: left; border-color: transparent; padding: 2px 8px; }
.guides-list button.on { border-color: var(--accent); color: var(--accent); }
.guides-page { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.guides-page > iframe.foreign.whole { flex-shrink: 0; }
.guides-page h2 { margin: 4px 0; font-family: ui-monospace, monospace; }
.guides-page .brief { color: var(--muted); margin-top: 0; }
.guides-page pre.synopsis { background: var(--code); padding: 8px 10px; border-radius: 6px; overflow-x: auto; }
.guides-page section.sub { border-top: 1px solid var(--line); margin-top: 12px; }
.guides-page dt { font-family: ui-monospace, monospace; margin-top: 6px; }
.guides-page dd { margin-left: 16px; }
.guides-page button.link { border: 0; padding: 0; color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) { .guides { flex-direction: column; } .guides-list { width: auto !important; max-height: 30vh; } .guides-split { display: none; } }

/* The tickets view: a board of columns (each may hold several statuses), and a panel for the card opened. */
.tickets { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tickets-bar { flex: none; display: flex; gap: 12px; align-items: center; }
.tickets-bar select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.tickets-bar .note, .tickets .error { color: var(--fail); font-size: 13px; }
/* List | Board, the Assigned to me preset, the filters (behind one Filter button on a phone). */
.tickets-bar { flex-wrap: wrap; gap: 8px 12px; }
.tickets-bar .filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tickets-bar button.preset, .tickets-bar button.waiting-preset, .tickets-bar button.filter-btn, .tickets-bar button.assign-btn, .tickets-bar button.new-btn { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; white-space: nowrap; }
.tickets-bar button.assign-btn { display: inline-flex; align-items: baseline; gap: 4px; flex: 0 1 auto; width: auto; max-width: min(24em, 100%); min-width: 0; text-align: left; }
.tickets-bar button.assign-btn > span { display: inline; white-space: nowrap; }
.tickets-bar button.assign-btn .lbl { flex: none; color: var(--muted); }
.tickets-bar button.assign-btn .val { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tickets-bar button.assign-btn .caret { flex: none; }
.tickets-bar button.assign-btn.set { border-color: var(--accent); }
.tickets-bar button.preset.on, .tickets-bar button.waiting-preset.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.tickets-bar button.filter-btn { display: none; }
.tickets-bar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: none; }
.tickets-bar .seg button { font: inherit; color: inherit; background: var(--bg); border: 0; padding: 4px 12px; }
.tickets-bar .seg button + button { border-left: 1px solid var(--line); }
.tickets-bar .seg button.on { background: var(--fg); color: var(--bg); }
.tickets-list { flex: 1; min-width: 0; overflow-y: auto; }
.tickets-list .tgroup { margin-bottom: 10px; }
.tickets-list button.ghead { display: flex; align-items: center; gap: 6px; width: 100%; font: inherit; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 4px 2px; text-align: left; }
.tickets-list button.ghead .count { font-variant-numeric: tabular-nums; }
.tickets-list .g-blocked button.ghead { color: var(--warn); }
.trow { display: grid; grid-template-columns: 3.5em 11em 1.4em minmax(0, 1fr) 7em 4em; gap: 8px; align-items: center; min-height: 34px; padding: 2px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.trow:hover { background: var(--hover); }
.trow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.trow .id, .trow .who, .trow .age { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .age { text-align: right; font-variant-numeric: tabular-nums; }
.trow .st { min-width: 0; display: flex; }
.trow .st .stchip { font-size: 12px; }
.trow .prio { text-align: center; color: var(--muted); }
.trow.prio-urgent .prio { color: var(--fail); font-weight: 700; }
.trow.prio-high .prio { color: var(--warn); font-weight: 700; }
.trow .topic { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.trow .topic .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trow .topic .blk { flex: none; font-size: 12px; color: var(--fail); }
.trow .topic .lock-mark { flex: none; color: var(--muted); }
.tickets-list .trest { padding: 8px 4px; color: var(--muted); font-size: 13px; }
.tickets-list .trest button.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; }
.tickets-list .hint { color: var(--muted); font-size: 13px; }
/* The Assigned to list: a box to type in over the names it narrows. */
.tk-combo { overflow: hidden; }
.tk-combo input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; margin: 2px 4px 4px; min-width: 0; }
.tk-combo .opts { overflow-y: auto; min-height: 0; flex: 1; }
.tk-combo .opt { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.tk-combo .opt.active { background: var(--hover); }
.tk-combo .opt.chosen .name { font-weight: 600; }
.tk-combo .opt .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-combo .opt .via { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 720px) {
  .tickets-bar button.filter-btn { display: inline-block; }
  .tickets-bar .filters { display: none; }
  .tickets-bar.filters-open .filters { display: flex; flex-basis: 100%; }
  .tickets-bar .filters select { flex: 1 1 40%; min-width: 0; max-width: 100%; }
  .tickets-bar.filters-open .filters { min-width: 0; max-width: 100%; }
  .tickets-bar .filters button.assign-btn { flex: 1 1 100%; max-width: 100%; min-width: 0; }
  /* A button's own min-content does not give way to its ellipsis in a phone's row: the name is bounded by the window. */
  .tickets-bar .filters button.assign-btn .val { max-width: calc(100vw - 150px); }
  .tickets-bar .col-chips { display: none; }
  /* A row in two lines: the number and the topic; then status, priority, assignee and age. */
  .trow { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 6px 4px; }
  .trow .id { order: 0; flex: none; }
  .trow .topic { order: 1; flex: 1 0 70%; }
  .trow .topic .tt { white-space: normal; overflow-wrap: anywhere; }
  .trow .st { order: 2; max-width: 60%; }
  .trow .prio { order: 3; }
  .trow .who { order: 4; }
  .trow .age { order: 5; margin-left: auto; }
}
.tickets-body { flex: 1; min-height: 0; display: flex; gap: 12px; }
.tickets-columns { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; }
.tickets-columns .column { flex: 1 1 0; min-width: 150px; max-height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.tickets-columns .column.over { border-color: var(--accent); }
.tickets-columns .column.waiting { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.tickets-columns .column h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.tickets-columns .column.waiting h3 { color: var(--warn); }
.tickets-columns .cards { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 24px; }
.card { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 5px 8px; cursor: pointer; background: var(--bg); }
.card:focus-visible { outline: 2px solid var(--accent); }
.card.prio-high { border-left-color: var(--warn); }
.card.prio-urgent { border-left-color: var(--fail); }
.card .top { display: flex; gap: 8px; font-size: 12px; color: var(--muted); }
.card .age { margin-left: auto; font-variant-numeric: tabular-nums; }
.card .topic { overflow-wrap: anywhere; }
.card .meta { font-size: 12px; color: var(--muted); }
.card .flag { color: var(--fail); font-weight: 600; }
.card.blocked { border-style: dashed; border-color: var(--fail); }
/* Stale must not look like fresh: the same rule as the presence board. */
.card.stale { color: var(--stale); font-style: italic; }
.card.stale .age { color: var(--fail); font-style: normal; font-weight: 600; }
.tickets-panel { padding: 0 4px; }
/* A card opens in a window over the board; the board under it is left as it was. */
dialog.tickets-popup { width: min(960px, 96vw); max-width: none; height: 90vh; max-height: none; overflow-y: auto; box-sizing: border-box; padding: 4px 16px 16px; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
dialog.tickets-popup::backdrop { background: rgb(0 0 0 / 0.4); }
.tickets-panel .panel-head .panel-btns { display: flex; gap: 6px; flex: none; }
.tickets.own-page .tickets-panel { max-width: none; overflow-y: auto; flex: 1; }
dialog.tickets-popup .panel-head { cursor: move; touch-action: none; user-select: none; }
.tickets-panel .panel-head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.tickets-panel h2 { font-size: 16px; margin: 4px 0; overflow-wrap: anywhere; }
.tickets-panel h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.tickets-panel dl.fields { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; }
.tickets-panel dl.fields dt { color: var(--muted); }
.tickets-panel dl.fields dd { margin: 0; overflow-wrap: anywhere; }
/* Fields changed in place: each value a chip with its little menu; the labels as chips with a cross. */
.tickets-panel dl.fields { align-items: center; }
.tickets-panel button.fchip { font: inherit; color: inherit; background: none; border: 1px solid transparent; border-radius: 6px; padding: 1px 6px; margin-left: -7px; cursor: pointer; text-align: left; max-width: 100%; }
.tickets-panel button.fchip:hover, .tickets-panel button.fchip:focus-visible, .tickets-panel button.fchip[aria-expanded="true"] { border-color: var(--line); background: var(--hover); }
.tickets-panel button.fchip.empty .v { color: var(--muted); }
.tickets-panel button.fchip .caret { color: var(--muted); font-size: 11px; }
.tickets-panel dd.labels-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tickets-panel dd.labels-row button.fchip { margin-left: 0; color: var(--muted); }
.tickets-panel .lchip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 0 2px 0 8px; }
.tickets-panel .lchip button.lx { border: 0; background: none; padding: 1px; border-radius: 8px; color: var(--muted); cursor: pointer; line-height: 0; }
.tickets-panel .lchip button.lx svg { width: 12px; height: 12px; }
.tickets-panel .lchip button.lx:hover { color: var(--fail); background: var(--hover); }
.tk-pick .opt .mark { width: 1em; flex: none; color: var(--accent); }
/* The topic changed where it stands. */
.tickets-panel .panel-head .topic.editable { cursor: text; border-radius: 4px; }
.tickets-panel .panel-head .topic.editable:hover, .tickets-panel .panel-head .topic.editable:focus-visible { background: var(--hover); outline: none; }
.tickets-panel .panel-head input.topic-input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; width: min(100%, 40em); }
.tickets-panel .watchers { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0; }
.tickets-panel .watchers[hidden] { display: none; }
.tickets-panel .watchers-label { color: var(--muted); }
.tickets-panel .watchers-list { display: inline-flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.tickets-panel .watcher { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; }
.tickets-panel .watcher button.icon { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; line-height: 0; }
.tickets-panel .watcher button.icon:hover { color: inherit; }
.tickets-panel .watchers button.watch-me, .tickets-panel .watchers button.watch-add { padding: 1px 4px; line-height: 0; }
.tickets-panel .watchers button.watch-me.on { color: var(--accent); }
.tickets-panel .watch-form { display: inline-flex; gap: 4px; align-items: center; }
.tickets-panel .watch-form[hidden] { display: none; }
.tickets-panel .watchers p.error { flex-basis: 100%; margin: 0; }
/* The head's moves: the status chip, the usual next step, a split Close. Buttons never break inside; the row wraps. */
.tickets-panel .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.tickets-panel .acts button { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.tickets-panel .acts button:hover { border-color: var(--accent); }
.tickets-panel .acts button.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.tickets-panel .acts button .to { opacity: .8; }
.tickets-panel .acts button kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; opacity: .8; }
.tickets-panel .acts .split { display: inline-flex; }
.tickets-panel .acts .split button:first-child { border-radius: 6px 0 0 6px; }
.tickets-panel .acts .split button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; padding: 3px 7px; }
.tickets-panel .acts .hint { font-size: 12px; color: var(--muted); }
.tickets-panel .acts .stchip { font-size: 14px; padding: 3px 10px; }
@media (max-width: 720px) {
  .tickets-panel .acts .to, .tickets-panel .acts .all-moves { display: none; }
  .tickets-panel .acts button { padding: 6px 10px; }
}
/* The phone's bar at the foot of an open ticket: the next step, Close, Comment, always at hand. */
.tickets-panel .phone-bar { display: none; }
@media (max-width: 720px) {
  .tickets-panel .phone-bar { display: flex; gap: 8px; position: sticky; bottom: 0; z-index: 5; margin: 8px 0 0; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); background: var(--raise); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgb(0 0 0 / .12); }
  .tickets-panel .phone-bar button { flex: 1; padding: 8px 6px; white-space: nowrap; }
  .tickets-panel .phone-bar button.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
}
/* The ? window: the page's keys. */
dialog.tk-keys { border: 1px solid var(--line); border-radius: 8px; background: var(--raise); color: var(--fg); padding: 12px 16px; max-width: min(420px, 92vw); }
dialog.tk-keys h3 { margin: 0 0 8px; }
dialog.tk-keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 8px; }
dialog.tk-keys dt { font: 12px ui-monospace, monospace; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; justify-self: start; }
dialog.tk-keys dd { margin: 0; }
/* A status as a chip: a glyph by category and a colour; the card's and the head's. */
/* The status colours: To Do white, in work beige, In Review yellowish green; set in the workflow later. */
:root {
  --chip-todo-bg: #ffffff; --chip-todo: #4a4a45; --chip-todo-line: #d6d5cf;
  --chip-progress-bg: #f1e5cc; --chip-progress: #6b4c17;
  --chip-review-bg: #e6efbe; --chip-review: #4b5c10;
  --chip-done-bg: #e2f1e4; --chip-done: #25682f; --chip-blocked-bg: #fbeadb; --chip-blocked: #9a4a0a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --chip-todo-bg: #262624; --chip-todo: #d2d1cb; --chip-todo-line: #4a4a46;
    --chip-progress-bg: #3b301c; --chip-progress: #e8cf9a;
    --chip-review-bg: #313a17; --chip-review: #d1e294;
    --chip-done-bg: #1e3322; --chip-done: #8fd69a; --chip-blocked-bg: #402a14; --chip-blocked: #ffb878;
  }
}
.stchip { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 10px; border: 1px solid transparent; white-space: nowrap; max-width: 100%; }
.stchip .name { overflow: hidden; text-overflow: ellipsis; }
.stchip.live { cursor: pointer; }
.stchip.live:hover, .stchip.live:focus-visible { border-color: var(--accent); outline: none; }
.stchip .caret { opacity: .7; font-size: .85em; }
.c-todo { background: var(--chip-todo-bg); color: var(--chip-todo); border-color: var(--chip-todo-line); }
.c-review { background: var(--chip-review-bg); color: var(--chip-review); }
.c-progress { background: var(--chip-progress-bg); color: var(--chip-progress); }
.c-done { background: var(--chip-done-bg); color: var(--chip-done); }
.c-blocked { background: var(--chip-blocked-bg); color: var(--chip-blocked); }
.c-none { background: transparent; color: var(--muted); border-color: var(--line); }
.card .top { flex-wrap: wrap; align-items: center; }
.card .top .stchip { min-width: 0; max-width: 100%; font-size: 12px; color: inherit; }
.card .top .stchip .name { min-width: 0; }
.card .top .stchip .caret { display: none; }
.stchip .glyph { flex: none; }
.card .top .stchip.c-todo { color: var(--chip-todo); } .card .top .stchip.c-progress { color: var(--chip-progress); }
.card .top .stchip.c-done { color: var(--chip-done); } .card .top .stchip.c-blocked { color: var(--chip-blocked); }
.card .top .stchip.c-review { color: var(--chip-review); }
/* The menu of moves and the toast float over the page (inside the open window when there is one). */
.tk-menu { position: fixed; z-index: 50; min-width: 240px; max-width: min(320px, 96vw); background: var(--raise); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgb(0 0 0 / .25); padding: 4px; display: flex; flex-direction: column; }
.tk-menu .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 8px; }
.tk-menu .none { padding: 6px 8px; color: var(--muted); }
.tk-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.tk-menu button.it { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: 6px; padding: 5px 8px; cursor: pointer; }
.tk-menu button.it:hover, .tk-menu button.it:focus-visible { background: var(--hover); outline: none; }
.tk-menu .via { color: var(--muted); font-size: 12px; }
.tk-menu kbd { margin-left: auto; font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; color: var(--muted); }
.tk-toast { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: min(560px, 94vw); display: flex; gap: 12px; align-items: center; background: var(--fg); color: var(--bg); border-radius: 8px; padding: 8px 14px; box-shadow: 0 6px 24px rgb(0 0 0 / .3); font-size: 14px; }
.tk-toast.error { background: var(--fail); color: #fff; }
.tk-toast .undo { font: inherit; font-weight: 600; color: inherit; background: none; border: 1px solid currentColor; border-radius: 6px; padding: 1px 8px; cursor: pointer; }
dialog.tk-ask { color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; max-width: 94vw; }
dialog.tk-ask::backdrop { background: rgb(0 0 0 / .4); }
dialog.tk-ask p { margin: 0 0 12px; }
dialog.tk-ask .tk-ask-row { display: flex; gap: 8px; justify-content: flex-end; }
dialog.tk-ask button { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 14px; cursor: pointer; }
dialog.tk-ask button.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
dialog.tk-defer .defer-field { display: grid; gap: 2px; margin: 0 0 10px; }
dialog.tk-defer .defer-field > span:first-child { font-size: 12px; color: var(--muted); }
dialog.tk-defer input, dialog.tk-defer select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
dialog.tk-defer .defer-clock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
dialog.tk-defer .defer-said:empty { display: none; }
dialog.tk-blocked { min-width: min(420px, 90vw); }
dialog.tk-blocked .blk-reasons { display: grid; gap: 4px; margin: 0 0 10px; }
dialog.tk-blocked .blk-reason .hint { color: var(--muted); font-size: 12px; }
dialog.tk-blocked .blk-field { display: grid; gap: 2px; margin: 0 0 10px; position: relative; }
dialog.tk-blocked .blk-field .lbl { font-size: 12px; color: var(--muted); }
dialog.tk-blocked input[type=text] { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
dialog.tk-blocked .blk-whom { display: flex; flex-wrap: wrap; gap: 4px; }
dialog.tk-blocked .blk-whom:empty { display: none; }
dialog.tk-blocked .blk-chip { border: 1px solid var(--line); border-radius: 10px; padding: 0 4px 0 8px; font-size: 13px; }
dialog.tk-blocked .blk-chip button { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
dialog.tk-blocked .blk-offers { display: grid; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); max-height: 160px; overflow: auto; }
dialog.tk-blocked .blk-offers[hidden] { display: none; }
dialog.tk-blocked .blk-offers .it { font: inherit; color: inherit; background: none; border: 0; text-align: left; padding: 3px 8px; cursor: pointer; display: flex; gap: 8px; }
dialog.tk-blocked .blk-offers .it.on { background: var(--hover, var(--line)); }
dialog.tk-blocked .blk-offers .via { color: var(--muted); font-size: 12px; }
dialog.tk-blocked .blk-said:empty { display: none; }
.why { color: var(--chip-blocked); font-size: 12px; margin-left: 6px; }
.card > .why { display: block; margin: 2px 0 0; }
.why.none { font-style: italic; opacity: .8; }
.tickets-panel .blocked-note { font-size: 13px; color: var(--chip-blocked); }
.tickets-panel .acts .blocked-note button { margin-left: 4px; padding: 1px 8px; }
.alarm { cursor: help; margin-right: 4px; }
.tickets-panel .deferred-note { font-size: 13px; color: var(--chip-blocked); }
.tickets-panel .acts .deferred-note button { margin-left: 4px; padding: 1px 8px; }
.tickets-panel .comment { border-top: 1px solid var(--line); margin-top: 6px; }
.tickets-panel .comment .who { font-size: 12px; color: var(--muted); }
.tickets-panel .comment .edited { font-style: italic; }
.tickets-panel .comment .cacts { margin-left: 8px; display: inline-flex; gap: 4px; }
.tickets-panel .comment .cacts button { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; cursor: pointer; }
.tickets-panel .comment .cacts button:hover { color: var(--fg); }
.tickets-panel .comment .deleted { margin: 4px 0; font-size: 13px; font-style: italic; color: var(--muted); }
.tickets-panel .comment .previous { margin: 4px 0; font-size: 13px; color: var(--muted); }
.tickets-panel .comment .previous summary { cursor: pointer; }
.tickets-panel .comment .previous .prev { border-left: 3px solid var(--line); padding-left: 8px; margin: 4px 0; }
.tickets-panel .comment .c-editor { margin: 4px 0; }
.tickets-panel .comment .c-editor-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.tickets-panel .comment.editing { outline: 2px solid var(--line); outline-offset: 2px; }
.tickets-panel textarea { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.tickets-panel ul.log { padding-left: 16px; font-size: 13px; color: var(--muted); }
.tickets-panel form.new-ticket { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.tickets-panel form.new-ticket label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.tickets-panel form.new-ticket input, .tickets-panel form.new-ticket select { font: inherit; color: var(--fg, inherit); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.tickets-panel form.new-ticket button[type="submit"] { align-self: flex-start; }
/* The new ticket: a row of chips under the words, Create and Create and add another. */
.tickets-panel form.new-ticket .topic-count { align-self: flex-end; }
.tickets-panel form.new-ticket .new-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tickets-panel form.new-ticket .new-chips button.fchip { margin-left: 0; border-color: var(--line); }
.tickets-panel form.new-ticket .new-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tickets-panel form.new-ticket .new-acts kbd { margin-left: 4px; font: 11px ui-monospace, monospace; opacity: .75; }
/* A frame cannot size itself to its text, so the panel gives each a fixed height; it scrolls. */
/* It cannot size itself to its text (no script in it): short by default, the reader drags it taller. */
.tickets-panel iframe.foreign { flex: none; height: 7em; min-height: 3em; resize: vertical; overflow: auto; }
/* A document read whole (sandbox.ts wholeFrame) is as tall as it is; the window or page around it scrolls. */
iframe.foreign.whole, .tickets-panel iframe.foreign.whole { flex: none; min-height: 0; resize: none; overflow: hidden; }
/* The new-ticket form's labels (tickets.ts, labelPicker): the chosen as chips, the most used offered below. */
.label-picker .chips, .label-picker .offers { display: flex; flex-wrap: wrap; gap: 4px; }
.label-picker .chips:empty { display: none; }
.label-picker button.chip, .label-picker button.offer { font-size: 12px; padding: 1px 8px; border-radius: 10px; }
.label-picker button.chip { border-color: var(--accent); color: var(--accent); }
.label-picker button.chip.new { border-style: dashed; }
.label-picker button.offer { color: var(--muted); }
.label-picker .offers { margin-top: 4px; }
.tickets-panel .link-kind { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tickets-panel .link { display: flex; gap: 4px; align-items: baseline; }
.tickets-panel .link-ticket { flex: 1; text-align: left; border: 0; background: none; color: var(--accent); cursor: pointer; padding: 1px 0; font: inherit; overflow-wrap: anywhere; }
.tickets-panel .link-remove { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; }
.tickets-panel form.link-add { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 4px; }
.tickets-panel form.link-add input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; min-width: 0; flex: 1 1 120px; }

/* The session buttons: the state beside an agent, a menu of what may be done, the manager's refusal under it. */
.session { display: inline-block; position: relative; }
.sess-state.stale { color: var(--fail); }
.sess-btn { padding: 1px 8px; font-size: 13px; }
.sess-btn.on { border-color: var(--accent); color: var(--accent); }
/* A dropdown over the page, not a pile of buttons in the row. */
.sess-menu { position: absolute; top: 100%; right: 0; z-index: 5; margin-top: 2px; display: flex; flex-direction: column; padding: 4px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px rgb(0 0 0 / 0.25); min-width: 200px; max-height: 60vh; overflow-y: auto; }
/* The console controls' Session menu: on the window, placed by main.ts from the button, as the pickers. */
.sess-menu.on-window { position: fixed; top: 0; right: auto; left: 0; margin-top: 0; z-index: 60; }
.sess-menu button { border: 0; border-radius: 0; background: none; color: inherit; font: inherit; font-size: 13px; text-align: left; padding: 4px 12px; white-space: nowrap; cursor: pointer; }
.sess-menu button:hover, .sess-menu button:focus-visible { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.sess-menu .sess-reset { color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
/* The question before a press, in a window of its own. */
dialog.sess-dialog { color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-width: min(320px, calc(100vw - 32px)); box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
dialog.sess-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
dialog.sess-dialog form { display: flex; flex-direction: column; gap: 10px; }
dialog.sess-dialog .sess-ask { margin: 0; font-size: 15px; }
.sess-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.sess-confirm { border-color: var(--fail); color: var(--fail); }
dialog.name-dialog button.name-ok { background: var(--btn-primary); color: var(--btn-primary-fg); border-color: var(--btn-primary); }
dialog.name-dialog button.name-ok:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); }
dialog.name-dialog button.name-ok:active { background: var(--btn-primary-down); border-color: var(--btn-primary-down); }
.sess-noask { font-size: 13px; color: var(--muted); }
.sess-note { color: var(--fail); font-size: 13px; }
.console-viewonly { color: var(--warn); font-size: 12px; font-weight: 600; border: 1px solid var(--warn); border-radius: 4px; padding: 0 6px; }
.console-controls [hidden] { display: none !important; }

/* A ticket's attachments: the list under the description, and a picture shown large over the panel. */
.tickets-panel ul.attachments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tickets-panel button.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: zoom-in; text-decoration: underline; }
/* The comment form takes files: a drop on it, and the list of what waits to go with the comment. */
.tickets-panel .reply.dropping { outline: 2px dashed var(--accent); outline-offset: 2px; }
.tickets-panel ul.reply-files { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tickets-panel ul.reply-files li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.tickets-panel ul.reply-files .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.tickets-panel ul.reply-files .size { font-size: 12px; color: var(--muted); }
.tickets-panel img.reply-shot { width: 56px; height: 40px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; flex: none; }
.tickets-panel .comment ul.attachments { margin: 4px 0; font-size: 13px; }
/* Attachments in the description and the correspondence: a picture as a small preview that opens large,
   a file by its name; a download icon for each. */
.tickets-panel ul.attachments li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tickets-panel button.att-thumb { flex: none; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); cursor: zoom-in; line-height: 0; }
.tickets-panel button.att-thumb img { width: 96px; height: 64px; object-fit: cover; border-radius: 3px; }
.tickets-panel .att-file { min-width: 0; overflow-wrap: anywhere; }
.tickets-panel a.att-get { flex: none; display: inline-flex; padding: 2px; color: var(--muted); border-radius: 4px; }
.tickets-panel a.att-get:hover, .tickets-panel a.att-get:focus-visible { color: var(--accent); background: var(--hover); }
/* The comment box: Write | Preview and Attach above it, the draft, "and move to" and the button below. */
.tickets-panel .reply { position: relative; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tickets-panel .reply-bar { display: flex; align-items: center; gap: 8px; }
.tickets-panel .reply-tabs { display: flex; gap: 2px; }
.tickets-panel button.reply-tab { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 2px 8px; cursor: pointer; }
.tickets-panel button.reply-tab.on { color: var(--fg); border-bottom-color: var(--accent); }
.tickets-panel button.reply-attach { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.tickets-panel .reply-preview { border: 1px solid var(--line); border-radius: 6px; padding: 6px; min-height: 64px; }
.tickets-panel .reply-preview .hint { margin: 0; }
.tickets-panel .reply .mention-list { position: absolute; left: 8px; z-index: 55; min-width: 220px; max-width: min(320px, 90%); background: var(--raise); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgb(0 0 0 / .25); padding: 4px; display: flex; flex-direction: column; }
.tickets-panel .reply .mention-list[hidden] { display: none; }
.tickets-panel .mention-list button.it { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: 6px; padding: 5px 8px; cursor: pointer; }
.tickets-panel .mention-list button.it:hover, .tickets-panel .mention-list button.it.on { background: var(--sel); }
.tickets-panel .mention-list .via { color: var(--muted); font-size: 12px; margin-left: auto; }
.tickets-panel .reply-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.tickets-panel .reply-draft { margin-right: auto; }
.tickets-panel label.reply-move { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.tickets-panel label.reply-move[hidden] { display: none; }
.tickets-panel button.reply-send kbd { margin-left: 4px; font: 11px ui-monospace, monospace; opacity: .75; }
.tickets-panel .reply.dropping::after { content: attr(data-drop); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--accent); font-weight: 600; pointer-events: none; }
.att-preview { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: rgb(0 0 0 / 0.8); cursor: zoom-out; }
.att-preview img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; background: var(--bg); cursor: default; }
.att-preview button { position: absolute; top: 12px; right: 16px; }
.att-preview .att-name { color: #fff; font-size: 13px; }

/* A collapsed column of the tickets board: a chip with its count in the bar. */
.tickets-bar .col-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tickets-bar .col-chip { padding: 2px 8px; font-size: 12px; border-radius: 12px; }
.tickets-bar .col-chip.waiting { border-color: var(--warn); color: var(--warn); }
.tickets-columns .column h3 button.fold { margin-left: 6px; padding: 0 3px; border: 0; background: none; color: var(--muted); }

/* The tooltip of a ticket number on a console's screen. */
.ticket-tip { position: absolute; z-index: 20; width: 320px; max-width: calc(100% - 8px); max-height: 40%; display: flex; flex-direction: column; color: var(--fg, inherit); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px rgb(0 0 0 / 0.5); font: 13px/1.35 system-ui, sans-serif; }
.ticket-tip-fixed { position: fixed; max-height: 50vh; }
.ticket-tip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ticket-tip-head strong { overflow-wrap: anywhere; }
.ticket-tip-head button { flex: none; padding: 1px 4px; }
/* The tip's status row: the chip with its menu and the next step; a pinned tip is outlined and has a cross. */
.ticket-tip-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ticket-tip-acts:empty { display: none; }
.ticket-tip-acts .stchip { font-size: 12px; }
.ticket-tip-acts button.next { font: inherit; font-size: 12px; padding: 1px 8px; border-radius: 6px; cursor: pointer; background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
.ticket-tip.pinned { border-color: var(--accent); }
.ticket-tip-head strong { flex: 1; min-width: 0; }
.ticket-tip-body { overflow-y: auto; padding: 4px 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* What is new in an open ticket: marked for a moment, then it settles. */
@keyframes fresh-fade { from { background: var(--fresh, rgba(250, 204, 21, 0.45)); } to { background: transparent; } }
.tickets-panel .fresh, .tickets-columns .card.fresh { animation: fresh-fade 3s ease-out; }

/* A ticket's lock: the pencil, or who is editing, under the panel's close cross. */
.tickets-panel .panel-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tickets-panel .lock { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.tickets-panel button.lock { cursor: pointer; }
.tickets-panel .lock.mine { color: var(--accent); }
.tickets-panel .lock.theirs { cursor: help; }
.tickets-panel .lock.stale { color: #c0392b; border-color: #c0392b; }
.tickets-panel .lock .bang { font-weight: 700; }
.tickets-columns .card .lock-mark { color: var(--muted); display: inline-flex; vertical-align: middle; cursor: help; }
.tickets-panel .edit-fields { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.tickets-panel .edit-fields label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.tickets-panel .edit-fields input, .tickets-panel .edit-fields select { font: inherit; color: var(--fg, inherit); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.tickets-panel .edit-fields .theirs { color: #c0392b; font-size: 12px; overflow-wrap: anywhere; }
.tickets-panel .edit-acts { display: flex; gap: 6px; }

.people-bar { position: relative; display: flex; flex-direction: column; gap: 4px; }
button.people-plus, button.teams-open { font: inherit; color: inherit; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; cursor: pointer; }
button.people-plus { padding: 0 10px; font-weight: 600; white-space: nowrap; }
form.people-find { display: flex; flex-direction: column; gap: 4px; min-width: 260px; position: absolute; z-index: 5; top: 100%; left: 0; margin-top: 4px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
p.people-title { margin: 0; font-size: 13px; font-weight: 600; }
form.people-find[hidden] { display: none; }
ul.dir-results { list-style: none; margin: 0; padding: 0; max-height: 40dvh; overflow-y: auto; }
button.dir-pick, button.team-pick { font: inherit; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: left; }
button.dir-pick:disabled { color: var(--muted); cursor: default; }
dialog.teams-dialog { color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 16px 12px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
dialog.teams-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
dialog.teams-dialog .teams-head { display: flex; align-items: center; justify-content: space-between; }
dialog.teams-dialog h2 { font-size: 16px; }
dialog.teams-dialog h3 { font-size: 15px; margin: 8px 0 4px; }
dialog.teams-dialog h4 { font-size: 13px; margin: 8px 0 2px; color: var(--muted); }
dialog.teams-dialog .teams-x, dialog.teams-dialog .team-back { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
dialog.teams-dialog ul { list-style: none; margin: 0; padding: 0; }
dialog.teams-dialog li { padding: 2px 0; }
dialog.teams-dialog form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
dialog.teams-dialog form.team-new h3 { flex-basis: 100%; margin: 0; }
dialog.teams-dialog button.team-act { font-size: 12px; margin-left: 8px; }
dialog.teams-dialog .team-acts { display: flex; gap: 8px; margin-top: 12px; }
dialog.teams-dialog .error, .people-find .hint { font-size: 13px; margin: 4px 0 0; }
dialog.teams-dialog .error { color: var(--fail); }

/* ===== The page's frame: a one-line header, the Contacts column and the page beside it ===== */
header#top { flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border-bottom: 1px solid var(--line); }
header#top .brand { margin-right: 6px; }
#nav { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
#nav[hidden] { display: none; }
#nav .sep { width: 1px; height: 22px; background: var(--line); flex: none; }
#nav .right { display: flex; gap: 2px; margin-left: auto; flex: none; }
/* An icon button of the header: no frame until it is hovered or lit; the count of those that wait is a dot on it. */
#nav button.icon, #nav .right button.icon { position: relative; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); border-radius: 4px; flex: none; }
#nav button.icon svg { width: 20px; height: 20px; }
#nav button.icon:hover { background: var(--hover); color: var(--fg); }
#nav button.icon.on { background: var(--sel); color: var(--accent); }
#nav button.icon:focus-visible, .plate:focus-visible, .row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#nav .dot { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--st-wait-bg); color: var(--st-wait-fg); font-size: 10px; line-height: 15px; font-weight: 700; text-align: center; }
/* A ticket's own browser tab: only the account, Feedback and Close (the tab, not the session). */
body.own-tab #nav [id^="go-"], body.own-tab #logout, body.own-tab .tickets.own-page .tickets-bar button, body.own-tab #nav .sep, body.own-tab #plates, body.own-tab #side { display: none; }
body:not(.own-tab) #nav #close-tab { display: none; }
/* The plates of the open consoles, and the controls of the one on screen. */
#plates { display: flex; gap: 4px; overflow-x: auto; min-width: 0; flex: 0 1 auto; scrollbar-width: none; }
.plate { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--raise); white-space: nowrap; flex: none; cursor: pointer; }
.plate { user-select: none; -webkit-user-select: none; }
.plate.drag { opacity: .5; }
.plate.on { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.plate.drop-before, .plate.on.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.plate.drop-after, .plate.on.drop-after { box-shadow: inset -3px 0 0 var(--accent); }
.plate.waiting { background: var(--st-wait-bg); color: var(--st-wait-fg); border-color: var(--st-wait-bg); }
.plate .g { min-width: 1em; text-align: center; }
.plate.waiting .g { color: var(--st-wait-fg); }
.plate button.pin { width: 22px; height: 22px; padding: 0; border: 0; background: none; color: inherit; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; opacity: .45; transform: rotate(35deg); }
.plate button.pin:hover { background: rgba(127,127,127,.25); opacity: 1; }
.plate button.pin.on { opacity: 1; transform: none; background: var(--sel); color: var(--accent); }
.plate.waiting button.pin.on { background: rgba(255,255,255,.3); color: inherit; }
.empty-hint { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cctl { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; }
/* Pushed to the right edge: the text of who typed (its width changes every second or so) grows to the left of the buttons, which stay put. */
#cctl { justify-content: flex-end; }
#cctl .console-controls { flex-wrap: nowrap; margin-left: auto; justify-content: flex-end; min-width: 0; }
#cctl .console-people { flex-wrap: nowrap; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
#cctl .console-controls > * { flex: none; }
#cctl .console-controls > .console-people { flex: 0 1 auto; }
/* Trouble with the connection: a strip under the header, there only when something is wrong. */
#strip { flex: none; padding: 4px 12px; font-size: 13px; border-bottom: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
#strip.closed { border-color: var(--fail); background: color-mix(in srgb, var(--fail) 12%, transparent); color: var(--fail); }
/* The area under the header: the column and the page, or the page alone. */
#app { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
#app[hidden] { display: none; }
#app.wide { grid-template-columns: minmax(0, 1fr); }
#app.wide #side { display: none; }
#side { background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; padding: 6px 0 16px; min-height: 0; }
#main { min-height: 0; min-width: 0; overflow: auto; position: relative; display: flex; flex-direction: column; }
/* Where a console waits when it is on no screen: out of sight, with a size so that its terminal measures. */
#parking { position: fixed; left: -10000px; top: 0; width: 900px; height: 520px; display: flex; flex-direction: column; visibility: hidden; pointer-events: none; }
.fh { display: flex; align-items: center; gap: 4px; padding: 10px 10px 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fh.sub { text-transform: none; letter-spacing: 0; font-size: 13px; padding: 6px 10px 2px 12px; color: var(--fg); }
.fh .grow { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.fh .tw { width: 16px; display: inline-block; text-align: center; }
.fh .count { font-weight: 400; }
.fh .act { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--accent); padding: 2px 6px; border: 0; background: none; border-radius: 3px; }
.fh .act:hover { background: var(--hover); }
.fh button.more { width: 24px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted); display: none; align-items: center; justify-content: center; text-transform: none; }
.fh:hover button.more, .fh:focus-within button.more, .fh button.more[aria-expanded="true"] { display: inline-flex; background: var(--side); }
@media (hover: none), (pointer: coarse), (max-width: 720px) { .fh button.more { display: inline-flex; } }
.fh.drop-on, .row.drop-on { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.fh.needs-head { color: var(--st-wait-bg); }
.row { position: relative; display: grid; grid-template-columns: 18px auto minmax(0, 1fr); column-gap: 6px; align-items: baseline; padding: 4px 28px 4px 12px; cursor: pointer; }
.row.ind { padding-left: 30px; }
.row.empty { cursor: default; color: var(--muted); font-size: 12px; display: block; }
.row:hover { background: var(--hover); }
.row.on { background: var(--sel); }
.row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm small { font-weight: 400; color: var(--muted); }
.row .st { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; min-width: 0; }
.row .l2 { grid-column: 2 / 4; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .g { text-align: center; font-weight: 700; }
.row button.more { position: absolute; right: 4px; top: 3px; width: 24px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted); display: none; align-items: center; justify-content: center; }
.row:hover button.more, .row:focus-within button.more, .row button.more[aria-expanded="true"] { display: inline-flex; background: var(--side); }
.row.on button.more { background: var(--sel); }
/* No hover on a touch screen: the row menu's button is always there. */
@media (hover: none), (pointer: coarse), (max-width: 720px) { .row button.more { display: inline-flex; } }
.row.waitrow { background: var(--st-wait-bg); color: var(--st-wait-fg); border-radius: 4px; margin: 2px 4px; padding-left: 8px; }
.row.waitrow .st, .row.waitrow .l2, .row.waitrow .g, .row.waitrow small, .row.waitrow button.more { color: var(--st-wait-fg); }
.row.waitrow.on { outline: 2px solid var(--accent); }
.row.s-working .g { color: var(--st-working); }
.row.s-background .g { color: var(--st-background); }
.row.s-rotation .g { color: var(--st-rotation); }
.row.s-disconnected .g, .row.s-stale .g { color: var(--st-lost); }
.row.s-stale .st { color: var(--st-lost); font-style: italic; }
.row.s-disconnected .st { color: var(--st-lost); font-weight: 600; }
.row.s-offline .nm, .row.s-unseen .nm { font-weight: 500; color: var(--muted); }
.row.kind-room .g, .row.kind-service .g { color: var(--muted); }
#addbox { margin: 10px 8px 0; }
#addbox .people-plus { width: 100%; padding: 6px 10px; }
#addbox .people-bar { position: static; }
#addbox form.people-find { position: static; min-width: 0; margin-top: 6px; }
#addnote { font-size: 13px; padding: 4px 2px; color: var(--muted); }
#addnote .undo-note button.undo { margin-left: 6px; padding: 1px 8px; }
form.people-find input, form.team-new input, form.team-add input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
/* A menu over the page: a line's `⋯`. */
.menu { position: fixed; z-index: 60; background: var(--raise); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); min-width: 200px; padding: 4px; }
.menu button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 3px; background: none; font-size: 13px; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); }
.menu .lbl { font-size: 11px; color: var(--muted); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .04em; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
/* A contact's page, a room's page. */
.page { padding: 16px 24px 12px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.page .back { display: none; align-self: flex-start; margin-bottom: 8px; border: 0; background: none; color: var(--accent); padding: 0; align-items: center; gap: 4px; }
.page .ph { display: flex; gap: 14px; align-items: flex-start; }
.av { width: 44px; height: 44px; border-radius: 50%; background: var(--sel); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.av.agent, .av.room, .av.service { border-radius: 8px; }
.av.room { background: var(--hover); color: var(--muted); }
.page .ph h1 { font-size: 20px; margin: 0; line-height: 1.2; }
.page .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page .appear { margin-top: 10px; font-size: 13px; background: var(--hover); padding: 8px 10px; border-radius: 4px; }
.page .tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 16px; }
.page .tabs button:not(.icon) { padding: 7px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font-weight: 500; }
.page .tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.page .tabs button.tasks-link { margin-left: auto; border: 0; color: var(--muted); }
.page .pane-body { margin-top: 12px; flex: 1; min-height: 240px; display: flex; flex-direction: column; }
.page.room .pane-body { margin-top: 8px; }
.page.welcome h1 { font-size: 18px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.load-note, .page .note { color: var(--muted); font-size: 13px; }
.session-slot { margin-left: 8px; }
.page .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.page .chips:empty { display: none; }
.page .chip { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.page .chip.team::before { content: "team "; }
.page .chip.folder::before { content: "\1F4C1  "; }
.page .bars:empty { display: none; }
.page .bars { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.page .bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 6px 10px; border-radius: 4px; border: 1px solid var(--st-lost); font-size: 13px; }
.page .bar.look-rotation { border-color: var(--st-rotation); }
.page .bar .bar-text { font-weight: 600; flex: 1; min-width: 0; }
.set .send-key { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.set .send-key-choice { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.page .compose { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.page .compose-bar { display: flex; align-items: center; gap: 8px; }
.page .compose-tabs { display: flex; gap: 2px; }
.page button.compose-tab { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 2px 8px; cursor: pointer; }
.page button.compose-tab.on { color: var(--fg); border-bottom-color: var(--accent); }
.page .compose textarea { width: 100%; box-sizing: border-box; resize: none; font: inherit; line-height: 1.4; overflow-y: auto; }
.page .compose-preview { border: 1px solid var(--line); border-radius: 6px; padding: 6px; min-height: 64px; }
.page .compose-preview .hint { margin: 0; }
.page .compose-preview iframe.foreign { flex: none; height: 7em; min-height: 3em; }
.page .compose-told, .page .compose-command { margin: 0; }
.page .compose-told { color: var(--warn); }
.page .compose-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.page .compose-draft { margin-right: auto; }
.page button.compose-send { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.page button.compose-send kbd { margin-left: 4px; font: 11px ui-monospace, monospace; opacity: .75; }
.page .compose-failed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.page .compose-failed:empty { display: none; }
.page .compose-fail { display: flex; align-items: center; gap: 8px; border: 1px solid var(--st-lost); border-radius: 4px; padding: 4px 8px; font-size: 13px; }
.page .compose-fail-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.page .compose[hidden] { display: none; }
.page .tickets-tab, .page .agents-tab { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.page .tickets-tab li, .page .agents-tab li { display: flex; gap: 10px; padding: 5px 2px; border-bottom: 1px solid var(--line); align-items: baseline; }
.page .tickets-tab .tk-state, .page .agents-tab .ag-state { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.page .tickets-tab a, .page .agents-tab button.ag-open { color: var(--accent); background: none; border: 0; padding: 0; text-decoration: none; cursor: pointer; font: inherit; }
.page .tickets-tab a:hover { text-decoration: underline; }
.row .new-badge { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 11px; }
.row.waitrow .new-badge { background: var(--st-wait-fg); color: var(--st-wait-bg); }

/* WORK: the console fills everything under the header. */
.work { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 10px 10px; }
.work .workbar { display: none; align-items: center; gap: 8px; margin-bottom: 6px; }
.work .workbar .back { border: 0; background: none; color: var(--accent); padding: 0; }
.work:fullscreen { background: var(--bg); }
.work:fullscreen .workbar { display: flex; }
.work:fullscreen .workbar .back { display: none; }
.workctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
/* The measuring box of main.ts (workProbeBox): the WORK box laid over the area, unseen. */
.work-probe { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.work-term { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Settings. */
.set { display: grid; grid-template-columns: 200px minmax(0, 1fr); flex: 1; min-height: 0; }
.set nav { background: var(--side); border-right: 1px solid var(--line); padding: 12px 8px; }
.set nav button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 4px; background: none; }
.set nav button.on { background: var(--sel); color: var(--accent); font-weight: 600; }
.set .set-body { padding: 18px 26px; overflow-y: auto; min-width: 0; }
.set .clients-page { max-width: 900px; }
/* Guides and the tickets use the whole width of the area. */
#main > .guides, #main > .tickets { flex: 1; min-width: 0; padding: 8px 12px; }
/* The board is as tall as the area, not as its cards: the bar and the column heads stay in view, the cards scroll. */
#main > .tickets { min-height: 0; }
/* Phone: the list is the screen, a page lies over it. */
@media (max-width: 720px) {
  header#top { gap: 2px; padding: 0 4px; }
  header#top .brand { display: none; }
  #cctl { display: none; }
  #plates .plate .nmx { max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
  .empty-hint { display: none; }
  #app { grid-template-columns: minmax(0, 1fr); }
  #side { border-right: 0; }
  #main { display: none; }
  #app.paged #side { display: none; }
  #app.paged #main, #app.wide #main { display: flex; }
  .page { padding: 10px 12px 14px; }
  .page .back, .work .workbar { display: flex; }
  .work { padding: 6px; }
  .set { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .set nav { display: flex; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .set nav button { width: auto; white-space: nowrap; }
  .set .set-body { padding: 14px; }
}

/* Settings: the contact card and Security. */
.set .sec { margin: 0 0 22px; max-width: 560px; }
.set .sec h3 { margin: 0 0 6px; font-size: 15px; }
.set h2 { margin: 0 0 10px; }
.set .field { display: grid; gap: 3px; margin: 0 0 10px; max-width: 420px; }
.set .field label { color: var(--muted); font-size: 12px; }
.set .field input, .set .field textarea { font: inherit; padding: 5px 8px; box-sizing: border-box; width: 100%; }
.set .card-form { max-width: 560px; }
.set .photo-row { display: flex; gap: 14px; align-items: center; }
.set .card-av { width: 64px; height: 64px; font-size: 26px; overflow: hidden; }
.av.photo { background: none; padding: 0; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set ul.access { margin: 0 0 8px; padding-left: 18px; }

/* The second factor's QR code: black on its own white square in both themes, so a phone reads it. */
.qr { display: inline-block; color: #000; background: #fff; line-height: 0; }
.qr svg { display: block; max-width: 100%; height: auto; }

/* Settings, Admin: the accounts table, the form, what is shown once, the audit trail, the confirmation dialog */
.set .admin-new { max-width: 520px; margin: 12px 0 18px; }
.set .admin-new .field { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.set .admin-table { overflow-x: auto; }
/* the unlock running out: a red bar that empties, stuck to the top of the section while it scrolls */
.set .admin-timer { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; overflow: hidden;
  margin: 0 0 8px; padding: 6px 10px; border: 1px solid var(--fail); border-radius: 6px; background: var(--bg); }
.set .admin-timer-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--fail); opacity: 0.25;
  transition: width 1s linear; pointer-events: none; }
.set .admin-timer-words { position: relative; flex: 1; font-weight: 600; color: var(--fail); font-variant-numeric: tabular-nums; }
.set .admin-timer button { position: relative; }
.set .admin-policy { display: block; margin: 0 0 12px; }
.set .admin-policy .hint { display: block; margin-left: 22px; }
.set nav .admin-lock { font-size: 0.9em; }
.set .admin-accounts tr.blocked td { opacity: 0.7; }
.set .admin-actions { white-space: nowrap; }
.set .admin-actions button.danger, dialog.admin-dialog button.danger { color: var(--warn); }
.set .admin-audit-list { padding-left: 18px; font-size: 13px; }
dialog.admin-dialog { color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 18px 14px; max-width: min(480px, calc(100vw - 32px)); }
dialog.admin-dialog input { width: 100%; box-sizing: border-box; margin: 6px 0 10px; }
dialog.admin-dialog .admin-dialog-buttons { text-align: right; }

/* The live ladder of codes beside a second-factor QR: the next ones above in a grey-blue, the current one bold, the last ones below in grey. */
.qr-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 6px 0 10px; }
.totp-ladder { display: flex; flex-direction: column; gap: 2px; font: 600 18px/1.3 ui-monospace, "JuliaMono", monospace; font-variant-numeric: tabular-nums; }
.totp-ladder .rung.future { color: #6f8fb3; font-weight: 400; font-size: 15px; }
.totp-ladder .rung.now { color: var(--fg); font-weight: 800; font-size: 24px; padding: 2px 0; }
.totp-ladder .rung.past { color: var(--stale); font-weight: 400; font-size: 15px; }
@media (prefers-color-scheme: dark) { .totp-ladder .rung.future { color: #8aaedb; } }
.set .admin-group { margin: 18px 0 4px; }
.set .admin-note { margin: 2px 0 0; font-size: 12px; white-space: normal; max-width: 36ch; }
dialog.admin-once { max-width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.admin-once .admin-secret { display: block; font-size: 16px; padding: 6px 8px; overflow-wrap: anywhere; user-select: all; }

/* Settings, Machines & agents: the codes and machines tables, the dialogs that make a code and show it once */
.set .sec.wide { max-width: none; overflow-x: auto; }
.set .enrol-codes td.act, .set .enrol-machines td.act { white-space: nowrap; }
.set .enrol-machines button.danger { color: var(--warn); }
dialog.enrol-dialog .field { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
dialog.enrol-dialog select { font: inherit; padding: 4px 6px; }
dialog.enrol-dialog code.admin-secret { display: block; font-size: 14px; padding: 6px 8px; overflow-wrap: anywhere; user-select: all; }

/* Resources: the claim board (CLAIMS-UI.md). A bar, the list, and the open resource beside it; tokens as everywhere, no new ones. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#main > .resources { flex: 1; min-width: 0; min-height: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.resources .grow { flex: 1; }
.resources button { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 9px; cursor: pointer; }
.resources button:hover:not(:disabled) { border-color: var(--accent); }
.resources button.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.resources button.danger { color: var(--warn); }
.resources button.linkish, .resources button.res-retry { border: 0; background: none; color: var(--accent); padding: 0 2px; text-decoration: underline; }
.res-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.res-bar h2 { margin: 0; font-size: 16px; }
.res-seg { display: inline-flex; }
.res-seg button { border-radius: 0; margin-left: -1px; }
.res-seg button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.res-seg button:last-child { border-radius: 0 6px 6px 0; }
.res-seg button.on { background: var(--sel); border-color: var(--accent); position: relative; }
.res-filter { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; min-width: 12em; }
.res-state { font-size: 13px; color: var(--muted); }
.res-state.not-live, .res-foot .as-of-live.not-live { color: var(--st-lost); font-style: italic; }
.res-strip { flex: none; display: flex; flex-direction: column; gap: 4px; }
.res-note { font-size: 13px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.res-note.fail { color: var(--fail); border-color: var(--fail); }
.res-note.warn { color: var(--st-lost); font-style: italic; }
.res-note.last-notice { border-color: var(--st-wait-bg); font-weight: 600; }
.res-body { flex: 1; min-height: 0; display: flex; gap: 12px; }
.res-list { flex: 1; min-width: 0; overflow-y: auto; }
.res-panel { flex: none; width: min(440px, 45%); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--raise); padding: 8px 12px; }
.res-panel[hidden] { display: none; }
/* The facts scroll; the foot (the main action or its form) keeps what it needs but never squeezes the facts to nothing (#1234). */
.res-panel .res-phead { flex: none; }
.res-panel .res-info { flex: 1 1 auto; min-height: 9em; overflow-y: auto; }
.res-panel .res-foot { flex: 0 1 auto; max-height: 60%; overflow-y: auto; }
.res-cols, .res-row .r1 { display: grid; grid-template-columns: 1.5em minmax(8em, 1.2fr) 4.5em minmax(15em, 1.6fr) minmax(10em, 2.4fr) minmax(5em, 1fr); gap: 0 10px; align-items: baseline; }
.res-cols { position: sticky; top: 0; background: var(--bg); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-bottom: 1px solid var(--line); z-index: 1; }
.res-row { padding: 4px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res-row:hover { background: var(--hover); }
.res-row.on { background: var(--sel); }
.res-row:focus-visible, .res-panel .pl:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.res-row.lit { animation: res-lit 3s ease-out; }
@keyframes res-lit { from { background: var(--sel); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .res-row.lit { animation: none; background: var(--sel); } }
.res-row .c-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row .c-use .word { font-weight: 600; }
.res-row .c-use.k-free .word, .res-word.k-free { color: var(--ok); }
.res-row .c-use.k-full .word, .res-row .c-use.k-held .word, .res-word.k-full, .res-word.k-held { font-weight: 700; }
.res-row .c-use.k-none .word, .res-word.k-none { color: var(--muted); }
.res-row .c-use.k-kept .word, .res-word.k-kept { color: var(--warn); font-weight: 600; }
.res-row .c-use.k-turn .word, .res-word.k-turn { background: var(--st-wait-bg); color: var(--st-wait-fg); padding: 0 6px; border-radius: 4px; }
.res-row meter { width: 80px; height: 10px; vertical-align: middle; }
/* The bar is a help to the eye, not a status: the text colour on the line colour, whatever the browser's meter would pick. */
.res-row meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 3px; }
.res-row meter::-webkit-meter-optimum-value, .res-row meter::-webkit-meter-suboptimum-value, .res-row meter::-webkit-meter-even-less-good-value { background: var(--fg); border-radius: 3px; }
.res-row meter::-moz-meter-bar { background: var(--fg); border-radius: 3px; }
.res-row .r1 > span { min-width: 0; overflow-wrap: anywhere; }
/* The In use cell wraps its word, meter and number inside its own column, never over the Held by cell (#1221). */
.res-row .c-use { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
/* With a resource open the list is narrow (CLAIMS-UI §3.2): the Kind column goes and the columns share what is left. */
.resources.has-panel .res-cols, .resources.has-panel .res-row .r1 { grid-template-columns: 1.5em minmax(5em, 1fr) minmax(9em, 1.4fr) minmax(7em, 1.6fr) minmax(4em, 0.8fr); }
.resources.has-panel .res-cols > :nth-child(3), .resources.has-panel .res-row .c-kind { display: none; }
.resources.no-board .res-seg, .resources.no-board .res-filter, .resources.no-board .res-new { display: none; }
.res-row .c-queue { color: var(--warn); font-weight: 700; }
.res-row .c-queue.muted { color: var(--muted); font-weight: 400; }
.res-row .c-held { min-width: 0; overflow-wrap: anywhere; }
.res-row .hold.st-unconfirmed { color: var(--warn); font-style: italic; }
.res-row .hold.st-ending { color: var(--warn); font-weight: 700; }
.res-row .hold.st-due, .res-row .as-of, .res-row .ended-lately { color: var(--st-lost); font-style: italic; }
.res-row .ended-lately { color: var(--muted); font-style: normal; }
.res-row .r2 { padding-left: calc(1.5em + 10px); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-group { margin-top: 8px; font-weight: 600; }
.res-group button { border: 0; background: none; padding: 2px 0; }
.res-empty { padding: 24px 12px; color: var(--muted); }
.res-count { padding: 6px; font-size: 13px; }
.res-phead { display: flex; align-items: center; gap: 6px; }
.res-phead h3 { margin: 0; font-size: 15px; }
.res-phead .res-back { display: none; }
.res-phead button.res-more, .res-phead button.res-close { padding: 3px 6px; line-height: 0; }
.res-phead { position: relative; }
.res-menu { position: absolute; right: 0; top: 100%; z-index: 5; display: flex; flex-direction: column; background: var(--raise); border: 1px solid var(--line); border-radius: 6px; padding: 4px; min-width: 14em; box-shadow: 0 4px 14px var(--scrim-soft); }
.res-menu button { border: 0; text-align: left; background: none; }
.res-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-top: 6px; }
.res-about, .res-rules, .res-onfree, .res-only { margin: 4px 0; font-size: 13px; }
.res-only { border-left: 3px solid var(--st-wait-bg); padding-left: 8px; }
.res-panel h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.res-holder, .res-waiter { padding: 3px 0; }
.res-panel .pl { padding: 2px 4px; border-radius: 4px; }
.res-holder .res-why { padding-left: 1.5em; font-size: 13px; }
.res-holder.st-unconfirmed .pl { color: var(--warn); font-style: italic; }
.res-holder.st-ending .pl { color: var(--warn); }
.res-holder.st-due .pl { color: var(--st-lost); font-style: italic; }
.res-waiter .turn { color: var(--warn); }
.res-panel .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 2px 0; }
.res-ended { font-size: 13px; padding: 1px 4px; }
.res-ended .g { display: inline-block; width: 1.2em; }
.res-foot { background: var(--raise); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.res-note-line { margin: 0 0 6px; font-size: 13px; }
.res-main { display: flex; align-items: center; gap: 8px; }
.res-form { display: flex; flex-direction: column; gap: 6px; }
.res-form h4 { margin: 0; }
.res-field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.res-field .lbl { width: 6.5em; flex: none; }
.res-field input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; flex: 1; min-width: 6em; }
.res-presets button { padding: 0 6px; margin-right: 3px; }
.res-err { min-height: 1.2em; font-size: 13px; }
.res-err.fail { color: var(--fail); }
.amount-bar .bar { display: flex; height: 12px; border: 1px solid var(--border-strong); border-radius: 3px; overflow: hidden; margin: 8px 0 2px; }
.amount-bar .seg.s1 { background: var(--fg); }
.amount-bar .seg.s2 { background: var(--muted); }
.amount-bar .seg.s3 { background: var(--line); }
.amount-bar .labels { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
dialog.res-dialog p { max-width: 42em; }
dialog.res-dialog .res-noask { display: block; margin: 6px 0; font-size: 13px; }
dialog.res-dialog .res-noask input { width: auto; margin: 0; }
dialog.res-keys th { text-align: left; padding-right: 14px; white-space: nowrap; font-weight: 600; vertical-align: top; }
@media (max-width: 720px) {
  .res-body { position: relative; }
  .res-cols { display: none; }
  .res-row .r1 { grid-template-columns: 1.5em minmax(0, 1fr) auto; }
  .res-row .c-kind { display: none; }
  .res-row .c-held, .res-row .c-queue { grid-column: 2 / -1; }
  .resources.has-panel .res-list { display: none; }
  .res-panel { width: 100%; border: 0; padding: 0; background: transparent; }
  .res-phead .res-back { display: inline-block; }
  .res-phead h3 { margin-left: 4px; }
  .res-phead .res-close { display: none; }
}
.confirm-row { display: block; padding: 2px 0; }
.tickets-panel dd.xrefs .xref-name { color: var(--muted); }
.tickets-panel dd.xrefs a.xref { color: var(--accent); }

/* The Restricted box of the new-ticket, edit and Feedback forms, and its word in a ticket's fields (#1295). */
label.restricted-box,
label.feedback-restricted,
.tickets-panel form.new-ticket label.restricted-box,
.tickets-panel .edit-fields label.restricted-box,
dialog.feedback label.feedback-restricted {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4em;
  text-align: left;
  color: inherit;
}
label.restricted-box input,
label.feedback-restricted input,
.tickets-panel form.new-ticket label.restricted-box input,
.tickets-panel .edit-fields label.restricted-box input,
dialog.feedback label.feedback-restricted input {
  width: auto;
  margin: 0;
  flex: none;
}
.trow .topic .restricted-mark,
.tickets-columns .card .restricted-mark { flex: none; display: inline-flex; vertical-align: middle; cursor: help; }
.tickets-panel .att-fail, .att-preview .att-fail { color: var(--fail); font-size: 12px; line-height: 1.3; padding: 4px; }
.att-preview .att-fail { background: var(--bg); border-radius: 4px; font-size: 13px; padding: 8px 12px; }
.tickets-panel button.att-thumb.failed { line-height: 1.3; max-width: 220px; text-align: left; cursor: default; }
dd.restricted {
  display: flex;
  align-items: center;
  gap: 0.3em;
}
