/* The ticket list (GitHub issue 203, part 1b; docs/adr/0069-the-ticket-list.md): seven columns that fit 1280 px,
   Comfortable and Compact rows, the filters behind one button with chips, the view builder as a side panel, and cards
   on a phone. Loaded after styles.css and components.css, so these rules win over styles.css's older ticket list
   rules (several of which are !important, hence the "html body" in front). Sizes are tokens (tokens.css). */

/* ---------- The heading: Show, Actions, Customize columns ---------- */
html body #ticketsView .ticket-page-actions .view-size-control { font-size:var(--text-sm) !important; font-weight:var(--weight-medium); letter-spacing:0; text-transform:none; color:var(--muted); }

/* ---------- Filters (n), the chips, the count ---------- */
html body #ticketsView .ticket-meta-row { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); min-height:0; margin:0 0 var(--space-150); padding:0; border:0; color:var(--muted); font-size:var(--text-md); }
#ticketsView .ticket-filters-toggle { display:inline-flex; align-items:center; gap:var(--space-75); min-height:var(--control-height-sm); padding:0 var(--space-150); font-size:var(--text-md); font-weight:var(--weight-semibold); }
#ticketsView .ticket-filters-toggle svg { width:1rem; height:1rem; flex:none; }
#ticketsView .ticket-filters-toggle[aria-expanded="true"] { border-color:var(--accent-border); background:var(--accent-hover); color:var(--spruce-dark); }
#ticketsView .ticket-filters-count:empty { display:none; }
#ticketsView .ticket-filter-chips { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); min-width:0; }
#ticketsView .ticket-filter-chips[hidden] { display:none; }
#ticketsView .ticket-chip { display:inline-flex; align-items:center; gap:var(--space-25); max-width:100%; min-height:var(--control-height-sm); padding:0 var(--space-25) 0 var(--space-150); border:1px solid var(--accent-border); border-radius:var(--radius-pill); background:var(--accent-hover); color:var(--ink); font-size:var(--text-sm); }
#ticketsView .ticket-chip > span { overflow:hidden; overflow-wrap:break-word; white-space:normal; }
#ticketsView .ticket-chip button { display:grid; place-items:center; flex:none; width:1.5rem; height:1.5rem; padding:0; border:0; border-radius:var(--radius-round); background:transparent; color:var(--muted); font-size:var(--text-lg); line-height:1; cursor:pointer; }
#ticketsView .ticket-chip button:hover, #ticketsView .ticket-chip button:focus-visible { background:var(--surface); color:var(--ink); outline:0; box-shadow:0 0 0 var(--focus-ring-width) var(--control-focus); }
#ticketsView .ticket-chips-clear { font-size:var(--text-sm); }
#ticketsView .ticket-meta-end { display:inline-flex; align-items:center; gap:var(--space-150); margin-left:auto; color:var(--muted); font-size:var(--text-sm); }
html body #ticketsView .edit-view-button { min-height:var(--control-height-sm); padding:0 var(--space-100); font-size:var(--text-sm); font-weight:var(--weight-semibold); letter-spacing:0; text-transform:none; }
#ticketsView .edit-view-button[hidden] { display:none; }
/* A workspace with no tickets at all has nothing to filter, sort or act on yet; an empty list has no column heads. */
#ticketsView.ticket-list-none .ticket-filters-toggle, #ticketsView.ticket-list-none .ticket-meta-end, #ticketsView.ticket-list-none .ticket-page-actions .action-menu-wrapper, #ticketsView.ticket-list-none .ticket-page-actions .column-toolbar, #ticketsView.ticket-list-none .ticket-page-actions .view-size-control { display:none; }
html body #ticketsView.ticket-list-empty .ticket-table-head { display:none !important; }

/* The filters themselves, when Filters is open. */
html body #ticketsView .ticket-filters[hidden] { display:none !important; }
@media (min-width:701px) { html body #ticketsView .ticket-filters { grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr)) !important; } }
html body #ticketsView .ticket-filters { gap:var(--space-150); margin:0 0 var(--space-150); }

/* ---------- The one-time tip: one line ---------- */
html body #ticketsView .column-tip { gap:var(--space-100); margin:0 0 var(--space-100); padding:var(--space-75) var(--space-75) var(--space-75) var(--space-150); font-size:var(--text-sm); }
html body #ticketsView .column-tip-close { padding:var(--space-50) var(--space-150); }

/* ---------- Rows: the grid the head and the rows share (ticket-list.js setTicketGridColumns) ---------- */
#ticketsView .ticket-card { display:none; }
@media (min-width:701px) {
  html body #ticketsView .ticket-table-head, html body #ticketsView .ticket-row {
    display:grid !important; grid-template-columns:var(--ticket-columns) !important; grid-auto-flow:row !important; align-items:center;
    column-gap:var(--space-100); width:auto !important; min-width:var(--ticket-row-min) !important; padding:var(--space-50) var(--space-150) !important;
  }
  html body #ticketsView .ticket-table-head { min-height:var(--control-height); }
  html body #ticketsView .ticket-row { min-height:var(--row-height) !important; }
  html body #ticketsView .ticket-table-head > span, html body #ticketsView .ticket-row > span { min-width:0; overflow:hidden; overflow-wrap:break-word; white-space:normal; }
  /* The title, the requester under it; each wraps onto another line when it is long (the owner, 2026-11-14: "Wrap the text"). */
  html body #ticketsView .ticket-row .ticket-title-cell { display:flex; flex-direction:column; justify-content:center; overflow:hidden; white-space:nowrap !important; }
  html body #ticketsView .ticket-row .ticket-title-cell .ticket-title, html body #ticketsView .ticket-row .ticket-title-cell .ticket-requester { display:block; overflow:hidden; overflow-wrap:break-word; white-space:normal !important; }
  html body #ticketsView .ticket-row .ticket-requester { margin-top:0; }
  html body #ticketsView .ticket-row .ticket-state-chip { min-width:0; max-width:100%; overflow:hidden; white-space:nowrap; }
  html body #ticketsView .ticket-row .ticket-state-chip > span { overflow:hidden; overflow-wrap:break-word; }
  html body #ticketsView .ticket-number { white-space:nowrap; }
  /* Compact: the requester beside the title, under it when a long title wraps. */
  html body.density-compact #ticketsView .ticket-row { min-height:var(--row-height-compact) !important; padding-top:var(--space-25) !important; padding-bottom:var(--space-25) !important; }
  html body.density-compact #ticketsView .ticket-table-head { min-height:var(--control-height-sm); padding-top:var(--space-25) !important; padding-bottom:var(--space-25) !important; }
  html body.density-compact #ticketsView .ticket-row .ticket-title-cell { flex-direction:row; flex-wrap:wrap; justify-content:flex-start; align-items:baseline; column-gap:var(--space-100); row-gap:0; }
  /* The title first: the requester goes under it when there is no room beside it. */
  html body.density-compact #ticketsView .ticket-row .ticket-title-cell .ticket-title { flex:0 1 auto; min-width:0; }
  html body.density-compact #ticketsView .ticket-row .ticket-title-cell .ticket-requester { flex:0 1 auto; min-width:0; }
  html body.density-compact #ticketsView .ticket-row .pill { padding-top:var(--space-25) !important; padding-bottom:var(--space-25) !important; }
}

/* ---------- Rows height switch, at the top of Customize columns ---------- */
#ticketsView .ticket-density { display:grid; gap:var(--space-75); margin:0 0 var(--space-150); padding:0 0 var(--space-150); border-bottom:1px solid var(--line); }
#ticketsView .ticket-density-options { display:grid; grid-template-columns:1fr 1fr; padding:var(--space-25); border:1px solid var(--control-border); border-radius:var(--radius-lg); background:var(--surface-2); }
#ticketsView .ticket-density-options button { min-height:var(--control-height-sm); padding:0 var(--space-150); border:0; border-radius:var(--radius-md); background:transparent; color:var(--muted); font-size:var(--text-sm); font-weight:var(--weight-semibold); cursor:pointer; }
#ticketsView .ticket-density-options button[aria-checked="true"] { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(20,23,21,.12); }
#ticketsView .ticket-density-options button:focus-visible { outline:0; box-shadow:0 0 0 var(--focus-ring-width) var(--control-focus); }

/* ---------- The views menu ---------- */
#ticketsView .saved-view-heading:first-child { margin-top:0; }

/* ---------- The view builder: a side panel (the owner's AF4) ---------- */
html body .view-editor-backdrop { position:fixed; inset:0; z-index:var(--z-drawer); background:rgba(20,23,21,.38); }
html body .view-editor-backdrop[hidden] { display:none; }
html body .view-editor {
  position:fixed; top:0; right:0; bottom:0; left:auto; z-index:calc(var(--z-drawer) + 1); display:none; flex-direction:column;
  width:min(var(--dialog-width), 100vw); max-width:100vw; height:100%; margin:0; padding:0; border:0; border-left:1px solid var(--line);
  border-radius:0; background:var(--surface); box-shadow:-18px 0 50px rgba(20,23,21,.16); color:var(--ink);
}
html body .view-editor.open { display:flex; }
[data-theme="dark"] .view-editor-backdrop { background:rgba(0,0,0,.55); }
.view-editor-header { flex:none; padding:var(--space-250) var(--space-300) var(--space-200); }
.view-editor-header h2 { margin:var(--space-25) 0 0; font-size:var(--text-2xl); }
.view-editor-body { flex:1; min-height:0; overflow-y:auto; padding:var(--space-200) var(--space-300); }
html body .view-editor .view-editor-name { display:block; margin:0 0 var(--space-250); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
html body .view-editor .view-editor-name input { display:block; width:100%; min-height:var(--control-height); margin-top:var(--space-75); }
.view-editor-section { margin:0 0 var(--space-100); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.view-editor .view-condition-list { display:grid; gap:var(--space-100); }
/* A condition on one full-width row: field, "is", value, remove. */
html body .view-editor .view-condition-row { display:grid; grid-template-columns:minmax(0, 10rem) auto minmax(0, 1fr) auto; align-items:center; gap:var(--space-100); }
.view-editor .view-condition-row .condition-is { color:var(--muted); font-size:var(--text-sm); }
.view-editor .condition-value-cell { min-width:0; }
.view-editor .condition-value-cell .custom-select-wrapper[hidden], .view-editor .condition-value-cell .state-multi-select[hidden], .view-editor .condition-value-cell select[hidden] { display:none; }
.view-editor .condition-value-cell .state-multi-select { position:relative; width:100%; }
.view-editor .condition-value-cell .state-multi-trigger { display:flex; align-items:center; width:100%; min-height:var(--control-height); padding:0 var(--space-150); overflow:hidden; border:1px solid var(--control-border); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font-size:var(--text-md); text-align:left; overflow-wrap:break-word; white-space:normal; }
html body .view-editor .remove-view-condition { display:grid; place-items:center; width:var(--control-height-sm); height:var(--control-height-sm); border-radius:var(--radius-md); }
.view-editor .add-view-condition { margin-top:var(--space-100); padding:var(--space-50) 0; font-size:var(--text-sm); }
.view-editor-hint { margin:var(--space-75) 0 0; }
.view-editor .view-share { margin-top:var(--space-250); }
html body .view-editor-footer { flex:none; margin:0; padding:var(--space-200) var(--space-300); border-top:1px solid var(--line); }
.view-editor-footer .delete-view-button[hidden] { display:none; }

/* ---------- Phones: cards built from the row's data (the owner's AF5) ---------- */
@media (max-width:700px) {
  html body #ticketsView .ticket-table-head { display:none !important; }
  html body #ticketsView .ticket-row { display:grid !important; grid-template-columns:auto minmax(0, 1fr) !important; align-items:start; gap:var(--space-150) !important; width:auto !important; min-width:0 !important; min-height:0 !important; padding:var(--space-150) !important; }
  html body #ticketsView .ticket-row > :not(.ticket-select-cell):not(.ticket-card) { display:none !important; }
  html body #ticketsView .ticket-row > .ticket-select-cell { padding-top:var(--space-25); }
  html body #ticketsView .ticket-card { display:grid; gap:var(--space-50); min-width:0; }
  #ticketsView .ticket-card-top { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-150); }
  html body #ticketsView .ticket-card-top > * { flex:0 0 auto; width:auto !important; min-width:0; }
  #ticketsView .ticket-card-top .ticket-number { font-weight:var(--weight-semibold); }
  #ticketsView .ticket-card-top > span:last-child { margin-left:auto; }
  /* The list's card sits inside the page's gutter, and the cards fill it. */
  html body #ticketsView .ticket-panel { width:auto !important; min-width:0 !important; margin-left:0 !important; margin-right:0 !important; padding:0 !important; }
  /* The views menu spans the page's width rather than running past its edge (it ran 13 px past a 375 px screen). */
  html body #ticketsView .view-manager { left:0; right:0; width:auto; max-width:100%; }
  /* Columns are a wider screen's: a phone shows cards. */
  html body #ticketsView .ticket-page-actions .column-toolbar { display:none; }
  #ticketsView .ticket-card-title { overflow-wrap:anywhere; color:var(--spruce); font-size:var(--text-md); line-height:var(--leading-tight); }
  #ticketsView .ticket-card-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:var(--space-50) var(--space-150); color:var(--muted); font-size:var(--text-sm); }
  #ticketsView .ticket-card-meta .is-unassigned { font-style:italic; }
  #ticketsView .ticket-card-label { color:var(--muted); }
  html body #ticketsView .ticket-panel { overflow-x:hidden !important; }
  html body #ticketsView .column-tip { display:none; }
  /* The builder's condition rows stack on a phone: field and remove on top, the value under them. */
  html body .view-editor .view-condition-row { grid-template-columns:minmax(0, 1fr) auto; }
  .view-editor .view-condition-row .condition-is { display:none; }
  .view-editor .view-condition-row .condition-value-cell { grid-column:1 / -1; grid-row:2; }
  .view-editor .view-editor-header, .view-editor .view-editor-body, html body .view-editor .view-editor-footer { padding-left:var(--space-200); padding-right:var(--space-200); }
  #ticketsView .ticket-meta-end { margin-left:0; width:100%; justify-content:space-between; }
  /* The list's own search box takes a line of its own above Show and Actions. */
  html body #ticketsView .ticket-page-actions { flex-wrap:wrap; }
  html body #ticketsView .ticket-search { position:static; flex:1 1 100%; width:auto; }
  /* A tick box's cell is a 44 px target (the cell is its label), and a chip's × has a 44 px target round it. */
  html body #ticketsView .ticket-row > .ticket-select-cell { min-width:44px; min-height:44px; padding-top:0; align-items:flex-start; }
  #ticketsView .ticket-select-cell input { width:20px; height:20px; }
  #ticketsView .ticket-chip button { position:relative; }
  #ticketsView .ticket-chip button::before { content:''; position:absolute; inset:-10px; }
  /* Sort by and Select all on this page, above the cards: the column heads are a wider screen's. */
  #ticketsView .ticket-phone-bar:not([hidden]) { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-200); padding:var(--space-100) var(--space-150); border-bottom:1px solid var(--line); }
  #ticketsView .ticket-phone-select-all { display:inline-flex; align-items:center; gap:var(--space-100); min-height:44px; color:var(--ink); font-size:var(--text-sm); cursor:pointer; }
  #ticketsView .ticket-phone-select-all input { width:20px; height:20px; margin:0; accent-color:var(--spruce); }
  #ticketsView .ticket-phone-sort { display:inline-flex; align-items:center; gap:var(--space-100); min-width:0; color:var(--muted); font-size:var(--text-sm); }
  #ticketsView .ticket-phone-sort select { min-height:44px; max-width:14rem; padding:0 var(--space-100); border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font:inherit; }
}
/* The phone's bar above the cards is a phone's: a wider screen sorts and ticks in the column heads. */
#ticketsView .ticket-phone-bar { display:none; }
/* A due time at the SLA warning level (core.js ticketRowBreachHtml): the warning's color, its words for a screen reader. */
#ticketsView .next-breach.is-at-risk { color:var(--warn-ink, #8a5a00); font-weight:var(--weight-semibold); }

/* Changing a ticket from the Tickets list (GitHub issue 378; docs/adr/0168; public/js/app/ticket-list-edit.js): the
   Assigned to, State, Priority, Impact and Urgency cells are buttons that open a list of choices under the cell. They look like
   the cell until hovered or focused, then show a caret and a frame, so the list reads as before. */
#ticketsView .tle-cell { min-width:0; }
#ticketsView .tle-trigger { display:inline-flex; align-items:center; gap:var(--space-50); max-width:100%; min-width:0; min-height:28px; margin:calc(-1 * var(--space-25)) calc(-1 * var(--space-50)); padding:var(--space-25) var(--space-50); border:1px solid transparent; border-radius:var(--radius-md); background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
#ticketsView .tle-trigger[hidden] { display:none; }
#ticketsView .tle-trigger > :not(.tle-caret) { min-width:0; overflow:hidden; overflow-wrap:break-word; white-space:normal; }
#ticketsView .tle-caret { flex:none; color:var(--muted); font-size:var(--text-2xs); font-style:normal; opacity:0; }
#ticketsView .tle-trigger:hover, #ticketsView .tle-trigger:focus-visible { border-color:var(--line-strong); background:var(--surface); }
#ticketsView .tle-trigger:hover .tle-caret, #ticketsView .tle-trigger:focus-visible .tle-caret { opacity:1; }
#ticketsView .tle-trigger:focus-visible { outline:var(--focus-ring-width, 3px) solid var(--spruce); outline-offset:1px; }
#ticketsView .tle-trigger[aria-busy="true"] { cursor:progress; opacity:.6; }
#ticketsView .tle-saved .tle-trigger { border-color:var(--good, var(--spruce)); background:var(--good-soft, var(--spruce-pale)); }
#ticketsView .tle-saving .tle-trigger { border-style:dashed; border-color:var(--line-strong); }
/* The list of choices: under the cell, above the rows; the highlighted choice framed, the ticket's own one ticked. */
.tle-menu { position:fixed; z-index:var(--z-menu); display:grid; max-height:min(18rem, 60vh); overflow-y:auto; overscroll-behavior:contain; padding:var(--space-50); border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); box-shadow:var(--shadow-pop, var(--shadow)); font-size:var(--text-sm); }
.tle-menu:focus { outline:none; }
.tle-menu:focus-visible { outline:var(--focus-ring-width, 3px) solid var(--spruce); outline-offset:1px; }
.tle-option { display:flex; align-items:center; gap:var(--space-50); min-height:32px; padding:var(--space-50) var(--space-100); border:1px solid transparent; border-radius:var(--radius-md); cursor:pointer; overflow-wrap:anywhere; }
.tle-option::before { content:""; flex:none; width:1em; text-align:center; }
.tle-option[aria-selected="true"]::before { content:"✓"; color:var(--spruce); }
.tle-option:hover { background:var(--hover-bg); }
.tle-option.is-active { border-color:var(--spruce); background:var(--hover-bg); }
.tle-option[aria-disabled="true"] { color:var(--muted); cursor:not-allowed; }
/* What a cell says: under it, above the rows. */
.tle-pop { position:fixed; z-index:var(--z-menu); display:grid; gap:var(--space-100); padding:var(--space-150); border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); box-shadow:var(--shadow-pop, var(--shadow)); font-size:var(--text-sm); line-height:1.4; }
.tle-pop p { margin:0; overflow-wrap:anywhere; }
.tle-pop-error { border-left:4px solid var(--bad); }
.tle-pop-info { border-left:4px solid var(--spruce); }
.tle-pop-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.tle-pop-actions .outline-button { min-height:32px; padding:0 var(--space-150); font-size:var(--text-xs); }
/* A phone's card: the impact and urgency under the assignee, each a button like the others. */
#ticketsView .ticket-card-levels { display:none; }
@media (max-width:700px) {
  #ticketsView .ticket-card-levels { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-200); color:var(--muted); font-size:var(--text-sm); }
  /* Targets of 44 px on a phone, as the staff phone screens have (the 2026-11-24 Tickets list comparison): the card's
     buttons and each choice in a cell's list. */
  #ticketsView .ticket-card .tle-trigger { min-height:44px; }
  .tle-option { min-height:44px; }
  #ticketsView .ticket-card .tle-caret { opacity:1; }
  /* A card has room for the whole word: nothing is cut short there. */
  #ticketsView .ticket-card .tle-trigger, #ticketsView .ticket-card .tle-trigger > :not(.tle-caret) { flex:none; max-width:none; overflow:visible; text-overflow:clip; white-space:nowrap; }
  #ticketsView .ticket-card .tle-cell { max-width:100%; }
}
/* The requester's name under the title is left out when the Requester column already shows it (the owner, 2026-11-11). */
html body #ticketsView .ticket-panel.shows-requester-column .ticket-row .ticket-title-cell .ticket-requester { display:none; }

/* Previous and Next under the list (GitHub issue 542; public/js/app/ticket-list.js renderTicketPager): the range between
   the two buttons, centered; on a phone the buttons share the row and the range wraps above them when it must. */
#ticketsView .ticket-pager { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:var(--space-100) var(--space-200); margin:var(--space-200) 0 0; color:var(--muted); font-size:var(--text-sm); }
#ticketsView .ticket-pager[hidden] { display:none; }
#ticketsView .ticket-pager-range { min-width:0; text-align:center; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#ticketsView .ticket-pager button { min-height:var(--control-height); }
#ticketsView .ticket-pager button:disabled { opacity:.5; cursor:not-allowed; }
@media (max-width:700px) {
  #ticketsView .ticket-pager { justify-content:space-between; }
  #ticketsView .ticket-pager-range { order:-1; flex:1 1 100%; }
  #ticketsView .ticket-pager button { flex:1 1 0; }
}
/* Snoozed tickets (GitHub issue 514): the line under a row's title (who snoozed it and until when, or back from snooze),
   wrapping like the title, and the line above the list that says how many of the person's own are hidden. */
html body #ticketsView .ticket-row .ticket-snooze-chip { display:flex; width:fit-content; align-self:flex-start; align-items:baseline; gap:var(--space-50); max-width:100%; margin-top:var(--space-50); padding:0 var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--paper); color:var(--muted); font-size:var(--text-xs); font-weight:var(--weight-medium); line-height:1.6; white-space:normal; overflow-wrap:anywhere; }
html body #ticketsView .ticket-row .ticket-snooze-chip::before { content:"\23F8"; font-size:var(--text-xs); }
html body #ticketsView .ticket-row .ticket-snooze-chip.is-back { border-color:var(--accent-border); color:var(--ink); }
html body #ticketsView .ticket-row .ticket-snooze-chip.is-back::before { content:"\21A9"; }
html body #ticketsView .ticket-card .ticket-snooze-chip { align-self:flex-start; }
/* A read of the server's list that failed, above the tickets shown before (GitHub issue 633): in words, with Try again. */
#ticketsView .ticket-list-problem { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-50) var(--space-100); margin:var(--space-100) var(--space-150); padding:var(--space-100) var(--space-150); border-radius:var(--radius-md); background:var(--bad-soft); color:var(--bad); font-size:var(--text-sm); overflow-wrap:anywhere; }
#ticketsView .ticket-list-problem .text-button { padding:0; min-height:0; font-size:inherit; }
/* The tickets a bulk change didn't change, above the list until dismissed (GitHub issue 636): each reason once, with the
   numbers of the tickets it held, each a button that opens the ticket. Long reasons and long lists wrap. */
#ticketsView .ticket-bulk-result { margin:var(--space-100) 0; padding:var(--space-100) var(--space-150); border:1px solid var(--saffron); border-radius:var(--radius-md); background:var(--saffron-pale); color:var(--warn-ink); font-size:var(--text-sm); overflow-wrap:anywhere; }
#ticketsView .ticket-bulk-result[hidden] { display:none; }
#ticketsView .ticket-bulk-result-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:var(--space-50) var(--space-150); }
#ticketsView .ticket-bulk-result h2 { margin:0; font-size:var(--text-sm); font-weight:var(--weight-semibold); color:inherit; }
#ticketsView .ticket-bulk-result ul { margin:var(--space-75) 0 0; padding-left:var(--space-250); }
#ticketsView .ticket-bulk-result li + li { margin-top:var(--space-50); }
#ticketsView .ticket-bulk-result .text-button { padding:0; min-height:0; font-size:inherit; }
#ticketsView .ticket-bulk-result-ids { font-weight:var(--weight-semibold); }
/* The export's choice (GitHub issue 636): the ticked tickets or the whole view, each a button saying how many. */
.ticket-export-choices { display:grid; gap:var(--space-100); margin:var(--space-150) 0; }
.ticket-export-choice { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-25); width:100%; height:auto; padding:var(--space-150); text-align:left; white-space:normal; overflow-wrap:anywhere; }
.ticket-export-choice small { color:var(--muted); font-size:var(--text-xs); font-weight:var(--weight-regular); }
.ticket-export-choice[aria-disabled="true"] { opacity:0.6; cursor:not-allowed; }
/* The line of tickets the person snoozed, and of a list another page opened on more than 500 tickets (issue 633). */
.ticket-snooze-note, .ticket-named-note { align-self:center; margin:0; color:var(--muted); font-size:var(--text-sm); overflow-wrap:anywhere; }
.ticket-snooze-note[hidden], .ticket-named-note[hidden] { display:none; }
.ticket-snooze-note .text-button { padding:0; font-size:inherit; }

/* ---------- A drill-down from a card (GitHub issue 585): what the card counted, on its own line ---------- */
#ticketsView .ticket-drill { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); flex-basis:100%; min-width:0; padding:var(--space-100) var(--space-150); border:1px dashed var(--accent-border); border-radius:var(--radius-lg); background:var(--surface); }
#ticketsView .ticket-drill[hidden] { display:none; }
#ticketsView .ticket-drill-title { color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); overflow-wrap:anywhere; }
#ticketsView .ticket-chip-drill.is-not-applied { border-style:dashed; background:transparent; color:var(--muted); }
#ticketsView .ticket-drill-save { margin-left:auto; min-height:var(--control-height-sm); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
#viewEditorNote:not([hidden]) { margin:0 0 var(--space-150); }
/* What a drill-down lists beside its filters, and an average's or a percentage's value column (GitHub issue 590). */
#ticketsView .ticket-drill-behind { flex-basis:100%; color:var(--muted); font-size:var(--text-sm); }
#ticketsView .ticket-drill-value { font-variant-numeric:tabular-nums; }
#ticketsView .ticket-drill-value.is-missed { color:var(--bad); font-weight:var(--weight-semibold); }
/* Kept current in place on the live stream (GitHub issue 614): "N updated – Show" and the ticked rows' bar stay at the
   top of the list as it scrolls, one under the other. */
#ticketsView .ticket-list-bars { position:sticky; top:72px; z-index:5; display:flex; flex-direction:column; align-items:stretch; }
#ticketsView .ticket-list-bars .selection-bar { position:static; }
#ticketsView .ticket-live-updates { display:flex; justify-content:center; }
#ticketsView .ticket-live-show { margin:0 0 var(--space-150); padding:var(--space-100) var(--space-200); border-color:var(--spruce); border-radius:var(--radius-pill); background:var(--surface); color:var(--spruce-dark); font-weight:var(--weight-semibold); box-shadow:var(--shadow-pop); white-space:normal; overflow-wrap:anywhere; }
#ticketsView .ticket-live-show[hidden] { display:none; }
/* On a wide screen .main-content's overflow-x:hidden made it a scroll box that never scrolls, so nothing in the list
   stuck (record-pages.css and ticket-page.css do the same for their pages). */
.main-content:has(#ticketsView.active-view) { overflow-x:clip; overflow-y:visible; }
/* A ticket held back because everyone in its group is at their ticket limit: how long it has waited (GitHub issue 658). */
html body #ticketsView .ticket-row .ticket-wait-chip, html body #ticketsView .ticket-card .ticket-wait-chip { display:flex; width:fit-content; align-self:flex-start; align-items:baseline; gap:var(--space-50); max-width:100%; margin-top:var(--space-50); padding:0 var(--space-100); border:1px solid var(--saffron); border-radius:var(--radius-pill); background:var(--saffron-pale); color:var(--warn-ink); font-size:var(--text-xs); font-weight:var(--weight-medium); line-height:1.6; white-space:normal; overflow-wrap:anywhere; }
html body #ticketsView .ticket-row .ticket-wait-chip::before, html body #ticketsView .ticket-card .ticket-wait-chip::before { content:"\23F3"; font-size:var(--text-xs); }

/* ---------- The column heads (the owner, 2026-11-21: "standardize this top bar and make them stand out more? The
   alignment is off on some of them and I don't think its easily identifilable that you can click and drag them around") ---------- */
/* Each head reads as a heading: the ink color, sentence case, semibold, on one line where its column has the room
   (a head longer than its column wraps, as all text here does, and stays centered on the row like the others). Its grip always
   shows, quiet, so a column can be seen to move, and turns green under the pointer; the whole head is the handle
   (grab) and lights up under the pointer. The row has a firmer line under it, setting it apart from the tickets. */
@media (min-width:701px) {
  html body #ticketsView .ticket-table-head { border-bottom:1px solid var(--control-border) !important; color:var(--ink-2) !important; font-size:var(--text-sm) !important; font-weight:var(--weight-semibold) !important; letter-spacing:0 !important; text-transform:none !important; }
  html body #ticketsView .ticket-table-head > [data-column-key] { display:flex; align-items:center; gap:var(--space-50); min-width:0; min-height:var(--control-height-sm); margin:0 calc(-1 * var(--space-50)); padding:0 var(--space-50); border-radius:var(--radius-md); color:var(--ink-2) !important; white-space:normal; text-transform:none; letter-spacing:0; cursor:grab; }
  html body #ticketsView .ticket-table-head > [data-column-key]:hover { background:var(--surface) !important; box-shadow:inset 0 0 0 1px var(--control-border); color:var(--ink) !important; }
  html body #ticketsView .ticket-table-head > [data-column-key].is-sorted { color:var(--ink) !important; }
  html body #ticketsView .ticket-table-head .column-drag-handle { flex:none; margin:0; padding:0; border:0; background:none; color:var(--muted); font-size:var(--text-sm); line-height:1; opacity:.55; cursor:grab; }
  html body #ticketsView .ticket-table-head:hover .column-drag-handle, html body #ticketsView .ticket-table-head .column-drag-handle:focus-visible { opacity:1; }
  html body #ticketsView .ticket-table-head > [data-column-key]:hover .column-drag-handle { color:var(--spruce); }
  html body #ticketsView .ticket-table-head .column-sort-button { display:block; min-width:0; overflow-wrap:anywhere; white-space:normal; line-height:1.25; text-align:left; color:inherit; font:inherit; letter-spacing:0; text-transform:none; cursor:pointer; }
  html body #ticketsView .ticket-table-head .column-sort-button:hover { text-decoration:underline; text-underline-offset:3px; }
  html body #ticketsView .ticket-table-head .column-sort-button i { margin-left:var(--space-25); font-size:var(--text-2xs); }
  /* While a column moves: it fades with a dashed edge, and a green bar marks where it lands. */
  html body #ticketsView .ticket-table-head.is-dragging-column, html body #ticketsView .ticket-table-head.is-dragging-column > [data-column-key] { cursor:grabbing; }
  html body #ticketsView .ticket-table-head .dragging-column { opacity:.5; outline:1px dashed var(--spruce); outline-offset:-1px; }
  html body #ticketsView .ticket-table-head > [data-column-key] { position:relative; }
  html body #ticketsView .ticket-table-head .drop-before, html body #ticketsView .ticket-table-head .drop-after { box-shadow:none !important; }
  html body #ticketsView .ticket-table-head .drop-before::before, html body #ticketsView .ticket-table-head .drop-after::after { content:""; position:absolute; top:var(--space-25); bottom:var(--space-25); width:3px; border-radius:var(--radius-sm); background:var(--spruce); }
  html body #ticketsView .ticket-table-head .drop-before::before { left:0; }
  html body #ticketsView .ticket-table-head .drop-after::after { right:0; }
}
