/* ── iTrack 7 — the app's own stylesheet ────────────────────────────────────────────────────────
   Linked once, from `Main.agentPageContentModifier`, after the compat chain.

   This file is deliberately SMALL. The design system (`elementum-eca-ui/stylesheets/
   ui-system.css`) owns density, the 4 px grid, the type ramp, tables, cards, the page skeleton, the
   nav, the stats strip, the form row and the empty state — all of it fleet-wide and none of it
   repeated here. What lives below is only the delta that is true of *iTrack* and of no other app:

     1. the single-field edit sheet (11 of the app's 63 pages are this one shape);
    2. the environment chip in the page footer;
     3. one measured gap in the shared sheet (a row action inside a table cell), reported and kept
        here until the shared rule names `.eca-btn`.
     4. the sign-in surface (`itrack-login-*`): the one screen in the app that is a full-bleed
        landing, and the one screen the whole fleet meets first.
   Two rules for this file: a class name here is `itrack-*` (never a new `eca-*` — the component
   guard judges `eca-*` against the compat sheet only, and a name styled here would be reported as a
   component that does not exist); and every size/colour reads a shared token, so a change to the
   design system reaches this page too.
   ───────────────────────────────────────────────────────────────────────────────────────────── */

/* ═══ The single-field edit sheet ═══════════════════════════════════════════════════════════════
   `EcaIssueEditPage.render` is the one implementation behind eleven pages: priority, severity,
   category, resolution, git commit, notification, project, system environment, estimated effort,
   tags and recipient. They used to render the full admin page furniture — a page header, a bordered
   "Update" card, an action row — around a single `<select>`, so each read as a settings page rather
   than "answer this and go back to the ticket".

   The shape, in order and nothing else:
     eyebrow (where you are — the ticket, as a link) → the question (`<h1>`) → the control → actions

   No sidebar, no tabs, no card inside a card: the sheet IS the page. The column is 32rem so the eye
   does not travel, and the actions are anchored under a rule so "Submit" cannot be mistaken for
   part of the field. */
.itrack-sheet{
  max-width: 32rem;
  padding-top: var(--space-4);
}
.itrack-sheet__eyebrow{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
}
.itrack-sheet__eyebrow a{
  color: var(--color-link);
  text-decoration: none;
  /* A back trail is a control, not a word in a sentence: 44 px so a thumb can hit it. */
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-touch);
}
.itrack-sheet__eyebrow a:hover{ text-decoration: underline; }
/* The question IS the page title. One `<h1>`, asked the way a person would ask it. */
.itrack-sheet__question{
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
}
/* The answer: one control, sized like the question deserves. */
.itrack-sheet__control{
  margin: 0 0 var(--space-5);
}
.itrack-sheet__control > .eca-field:last-child,
.itrack-sheet__control > .eca-field-row:last-child{
  margin-bottom: 0;
}
.itrack-sheet__actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: var(--border) solid var(--color-border);
}
/* Primary first in the DOM (it is the action), pushed apart visually so the pair reads as
   "do this" / "get out" rather than two equal choices. */
.itrack-sheet__actions .itrack-sheet__cancel{
  margin-inline-start: auto;
}
@media (max-width: 640px) {
  .itrack-sheet{ max-width: none; }
  .itrack-sheet__actions .eca-btn{
    flex: 1 1 auto;
    min-height: var(--control-h-touch);
  }
  .itrack-sheet__actions .itrack-sheet__cancel{ margin-inline-start: 0; }
}

/* ═══ A row action is a dense control (shared-layer gap, still open at RC15) ═══════════════════
   `ui-system.css` states the policy in its table section — "row actions are 32 px controls in one
   cell" — and defines `--control-h-sm: 32px` for exactly that, but the only rule that applies it
   names `.table td > .button`, not `.eca-btn`, which is what every migrated page emits. So a table
   whose rows carry an action ("Change project", "Change priority") measured **60 px** a row on
   `/issue/1` while the design system's own dense target is 40 px, and the 38 px `.eca-btn` inside
   the cell was what set the height. This is the delta between the two names, not a new design; it
   belongs in the shared sheet and is kept here until that rule names `.eca-btn` too. */
@media (min-width: 641px) {
  .eca-table td .eca-btn{
    height: auto;
    min-height: var(--control-h-sm);
    padding-block: 0;
    padding-inline: var(--space-2);
    font-size: var(--text-xs);
  }
}

/* ═══ Issue read: main column + right rail, and the persisted Expand/Wrap controls ══════════════
   The page is one column below 992 and a 3fr/1fr main + rail above it (the reference's 12/4).
   There is no 32 px gutter: the two columns are separated by 1 rem of padding on each side of the
   seam, and the rail is static — only the shell header stays sticky. `.eca-prose` keeps the design
   system's 68ch reading measure by default; Expand to full width removes the rail entirely, while
   Wrap content reflows the description. Expand is hidden below 992 because there is no second
   column to widen into. */
.itrack-detail-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
  row-gap: var(--space-6);
  align-items: start;
}
/* A superseded/subsumed ticket is struck through in the page title only: the badge and the rest of
   the page still have to be readable. */
.itrack-issue-read--superseded .eca-page-title{ text-decoration: line-through; }
.itrack-detail-main,
.itrack-detail-aside{ min-width: 0; }
.itrack-detail-main > * + *,
.itrack-detail-aside > * + *{ margin-block-start: var(--gap-section); }
.itrack-detail-main > .eca-section,
.itrack-detail-aside > .eca-section{ margin-block-end: 0; }
.itrack-detail-aside{
  display: flex;
  flex-direction: column;
  position: static;
  max-height: none;
  overflow: visible;
}
.itrack-detail-layout__toggle{ display: none; }
.itrack-detail-layout__more{ position: relative; }
.itrack-detail-layout__more > summary{
  list-style: none;
  cursor: pointer;
}
.itrack-detail-layout__more > summary::-webkit-details-marker{ display: none; }
.itrack-detail-layout__more-panel{
  position: absolute;
  /* Open under the trigger, not leftward over the neighbouring actions. The phone uses the
     floater instead of this panel; the max-width keeps a narrow viewport safe even if it appears. */
  inset-inline-start: 0;
  inset-inline-end: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-block-start: var(--space-2);
  padding: var(--space-3);
  min-width: 16rem;
  max-width: calc(100vw - (var(--space-4) + var(--space-4)));
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.itrack-detail-layout__more-panel .eca-btn{
  display: flex;
  inline-size: 100%;
  justify-content: flex-start;
}
.itrack-detail-layout__more-panel .eca-btn + .eca-btn{ margin-inline-start: 0; }
.itrack-detail-layout__more-panel form{ display: block; margin: 0; }
/* The description is the page's main reading matter: use the whole main column rather than the
   design system's 68ch measure. The dialog body is the same prose and gets the same width. */
.itrack-detail-main .eca-prose{ max-width: none; }
.itrack-description-dialog__body.eca-prose{ max-width: none; }
/* The design system caps every paragraph (and list item) at `--measure` (68ch) even when the prose
   container is full width. The two description surfaces own the full column, so their text does too;
   this stays scoped and never widens a paragraph anywhere else. */
.itrack-detail-main .eca-prose p,
.itrack-detail-main .eca-prose li,
.itrack-description-dialog__body.eca-prose p,
.itrack-description-dialog__body.eca-prose li{
  max-width: none;
}
.itrack-detail-main .eca-prose img,
.itrack-description-dialog__body.eca-prose img{ max-width: 100%; height: auto; }
/* Legacy GDoc pastes wrap images in a fixed-pixel inline-block frame; constrain the frame, not just
   the img, or the frame keeps the page wider than the phone. */
.itrack-detail-main .eca-prose span[style*="inline-block"],
.itrack-description-dialog__body.eca-prose span[style*="inline-block"]{
  max-width: 100% !important;
  height: auto !important;
}
.itrack-detail-main .eca-prose span[style*="inline-block"] > img,
.itrack-description-dialog__body.eca-prose span[style*="inline-block"] > img{
  max-width: 100% !important;
  height: auto !important;
}
/* Sanitized legacy descriptions carry their own list reset and a preserved newline inside each
   `li` (`white-space: pre`). Restore real markers and let the text flow after them. `start` on a
   nested `ol` and an inline `list-style-type` on an `li` still win, so their numbering survives. */
.itrack-detail-main .eca-prose ol,
.itrack-description-dialog__body.eca-prose ol{ list-style: decimal; padding-inline-start: 1.6em; }
.itrack-detail-main .eca-prose ul,
.itrack-description-dialog__body.eca-prose ul{ list-style: disc; padding-inline-start: 1.6em; }
.itrack-detail-main .eca-prose li[style*="white-space"],
.itrack-description-dialog__body.eca-prose li[style*="white-space"]{ white-space: normal !important; }
.itrack-detail-main .eca-prose li > p:first-child,
.itrack-description-dialog__body.eca-prose li > p:first-child{ margin-block-start: 0; }
.itrack-detail-main .eca-prose li::marker,
.itrack-description-dialog__body.eca-prose li::marker{ color: var(--color-muted); }
/* Wrap content reflows a long unbroken description line instead of letting it widen the page. */
.itrack-detail-layout--wrap .itrack-detail-main .eca-prose li{ white-space: pre-wrap !important; }
.itrack-detail-layout--wrap #issue-description{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (min-width: 992px){
  .itrack-detail-layout{
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    column-gap: 0;
  }
  .itrack-detail-main{ padding-inline-end: 1rem; }
  .itrack-detail-aside{ padding-inline-start: 1rem; }
  .itrack-detail-layout__toggle{ display: inline-flex; }
  /* Expand to full width is a LAYOUT change, not a prose cap: the rail is removed and the main
     column owns the grid. Below 992 the page is already one column, so the rule is desktop-only —
     a persisted class must not hide a rail the phone has no control to restore. */
  .itrack-detail-layout--wide{ grid-template-columns: minmax(0, 1fr); }
  .itrack-detail-layout--wide .itrack-detail-main{ padding-inline-end: 0; }
  .itrack-detail-layout--wide .itrack-detail-aside{ display: none; }
}

/* The phone shortcut jumps to the rail; the sticky shell header must not cover its first card. */
.itrack-detail-aside{ scroll-margin-top: calc(var(--control-h-touch) * 2); }
/* "Ticket info" is a phone-only shortcut shown beside the metadata strip. */
.itrack-ticket-info-link{ display: none; }
@media (max-width: 639.98px){
  .itrack-ticket-info-link{
    display: inline-flex;
    align-items: center;
    min-height: var(--control-h-touch);
    margin-block-start: var(--space-2);
    color: var(--color-link);
    font-size: var(--text-xs);
    font-weight: 650;
  }
  /* The shell's generic "Recent Tickets › This ticket" where-line duplicates the page's
     "TICKETS › #18909" breadcrumb on a phone; keep the specific one. */
  .eaw-shell:has(.itrack-issue-read) .eca-header__where{ display: none; }
}

/* ═══ Global navigation: notifications and roles ═══════════════════════════════════════════════
   Two additions to the shared header. They are iTrack's own because they express product data
   (the reader's notifications and their roles), not a new component shape: every control still
   reads `.eca-menu__group`, `.eca-menu__panel` or `.eca-badge` for its vocabulary. The Create
   project pickers are NOT here any more — they are nested `.eca-menu__group` disclosures, styled
   by the shared sheet (a page-local sheet for a shared component was the defect, GF-113). */

/* The notification slot is the same popover as the account, opened from a bell + count.
 *
 * DESKTOP ONLY, and that scoping is load-bearing. The bar is a row, so the account cluster must be
 * an inline row of chips there. Below 900 px the shared menu becomes a COLUMN drawer whose every
 * `details.eca-menu__group > summary` is a full-width 44 px row; `display: inline-flex` on the
 * cluster kept its two groups (bell, avatar) as content-width chips inside that column, and the
 * shared shell audit measured exactly that: `summary … x=16 contentX=16 w=59/343` and
 * `w=205/343` at 390 and 768 — two rows out of nine that were 59 px and 205 px wide where every
 * other group was 343. The rule is this app's (the shared sheet has no `display` for
 * `.eca-menu__account`), so the fix is here and not in `compat`. */
@media (min-width: 900px){
  .eca-menu__account{
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
  }
}
.itrack-notifications__summary-content{
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.itrack-notifications__badge{
  color: var(--color-primary-content);
  background: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}
/* The Create pickers are in-flow nested disclosures on the phone/tablet drawer. 94 project rows
   made the open menu 4528 px tall; bound the panel and let it scroll on its own. The shared rows
   keep their 44 px height, and the desktop (>=900) fixed panel is untouched. */
@media (max-width: 899px){
  .eca-menu__panel .eca-menu__group > .eca-menu__panel{
    max-height: min(60vh, 30rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
.itrack-notifications__section + .itrack-notifications__section{
  margin-block-start: var(--space-2);
  padding-block-start: var(--space-2);
  border-top: var(--border) solid var(--color-border);
}
.itrack-notifications__section-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.itrack-notifications__section-count{ white-space: nowrap; }
.itrack-notifications__items{ display: flex; flex-direction: column; gap: 2px; }
.itrack-notification-form{ display: block; gap: 0; margin: 0; }
.itrack-notification{
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-field);
  background: none;
  color: var(--color-ink);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.itrack-notification:hover{ background: var(--color-surface-sunken); }
.itrack-notification.unseen{ background: color-mix(in oklab, var(--color-primary) 7%, var(--color-surface)); }
.itrack-notification__line{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}
.itrack-notification__tag,
.itrack-notification__unread{ white-space: nowrap; }
.itrack-notification__unread{
  color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-primary) 30%, var(--color-border));
}
.itrack-notification__meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-muted);
  font-size: var(--text-xs);
}
.itrack-notifications__panel .eca-empty{ margin: var(--space-1); padding: var(--space-4) var(--space-3); }
.itrack-notifications__footer{
  margin-block-start: var(--space-2);
  padding-block-start: var(--space-2);
  border-block-start: var(--border) solid var(--color-border);
}
.itrack-notifications__footer .itrack-notification-form{ margin: 0; }


/* The reader's roles, in the account panel. A role is an identity chip, not an action: it is a
   badge beside the account header, never a control. */
.itrack-roles{ padding: var(--space-1) var(--space-3) var(--space-2); }
.itrack-roles__header{
  margin-block-end: var(--space-1);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.itrack-roles__list{ display: flex; flex-wrap: wrap; gap: var(--space-1); }
.itrack-roles__badge{ font-size: var(--text-xs); }

/* ═══ Issue read: semantic badges ══════════════════════════════════════════════════════════════
   `.eca-badge` is the design system's shape. These app-scoped modifiers add the DIMENSION a badge
   belongs to (visibility, state, project, milestone, tag, comment type, role) using the same
   semantic tokens and the same `color-mix` soft-ground recipe as the shared sheet. The word is
   always in the badge; colour is reinforcement. */
.itrack-badge--visibility,
.itrack-badge--comment-internal,
.itrack-badge--role-developer{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 45%, var(--color-border));
}
.itrack-badge--project,
.itrack-badge--comment-deployment{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.itrack-badge--milestone,
.itrack-badge--comment-scheduled,
.itrack-badge--role-qa{
  color: var(--color-success-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.itrack-badge--tag{
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--tint-ink-3);
  background: color-mix(in oklab, var(--tint-3) 16%, var(--color-surface));
  border-color: color-mix(in oklab, var(--tint-3) 42%, var(--color-border));
}
/* The three header dimensions carry the page's orientation; a slightly stronger ground makes them
   easier to separate without changing their ink or leaving the shared tokens. */
.itrack-badge--visibility{
  background: color-mix(in oklab, var(--color-info) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 50%, var(--color-border));
}
/* The visibility value is a DIMENSION, not a synonym: a public row is open, a private row is
   restricted, a draft is unsubmitted work. The word is still printed; these grounds add the
   second, non-textual signal. Text stays `--color-ink`, so the pair adapts to a dark surface
   without a second set of hex values. Private's warning ground is stronger than Public's success
   ground so the two also separate in greyscale (measured contrast in the verification report). */
.itrack-badge--visibility-public{
  color: var(--color-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.itrack-badge--visibility-private{
  color: var(--color-ink);
  background: color-mix(in oklab, var(--color-warning) 50%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 55%, var(--color-border));
}
.itrack-badge--visibility-draft{
  color: var(--color-ink);
  background: color-mix(in oklab, var(--tint-6) 18%, var(--color-surface-sunken));
  border-color: color-mix(in oklab, var(--tint-6) 45%, var(--color-border));
}
.itrack-badge--project{
  background: color-mix(in oklab, var(--color-warning) 22%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 55%, var(--color-border));
}
.itrack-badge--milestone{
  background: color-mix(in oklab, var(--color-success) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 50%, var(--color-border));
}
.itrack-badge--comment-internal-staff{
  color: var(--tint-ink-4);
  background: color-mix(in oklab, var(--tint-4) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--tint-4) 45%, var(--color-border));
}
.itrack-badge--comment-external{
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border-color: color-mix(in oklab, var(--color-muted) 30%, var(--color-border));
}
.itrack-badge--comment-draft{
  color: var(--tint-ink-6);
  background: color-mix(in oklab, var(--tint-6) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--tint-6) 45%, var(--color-border));
}
/* A small tonal dot gives the dimension a second, non-textual cue. It is decorative: the word is
   still the badge, so colour is never the only signal. */
.itrack-badge--state,
.itrack-badge--visibility,
.itrack-badge--milestone,
.itrack-badge--comment-internal,
.itrack-badge--comment-internal-staff,
.itrack-badge--comment-external,
.itrack-badge--comment-draft,
.itrack-badge--comment-deployment,
.itrack-badge--comment-scheduled{
  font-weight: 700;
}
.itrack-badge--state::before,
.itrack-badge--visibility::before,
.itrack-badge--milestone::before,
.itrack-badge--comment-internal::before,
.itrack-badge--comment-internal-staff::before,
.itrack-badge--comment-external::before,
.itrack-badge--comment-draft::before,
.itrack-badge--comment-deployment::before,
.itrack-badge--comment-scheduled::before{
  content: "";
  flex: 0 0 auto;
  inline-size: .45em;
  block-size: .45em;
  border-radius: 50%;
  background: currentColor;
}
/* The state's tone is the design system's own `is-*` language, repeated under the app class so the
   page owns the mapping. `is-released` is included rather than inherited-only. */
.itrack-badge--state.is-open,
.itrack-badge--state.is-new,
.itrack-badge--state.is-assigned,
.itrack-badge--state.is-testing,
.itrack-badge--state.is-work-in-progress{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 45%, var(--color-border));
}
.itrack-badge--state.is-pending,
.itrack-badge--state.is-pending-approval,
.itrack-badge--state.is-pending-amendment,
.itrack-badge--state.is-waiting,
.itrack-badge--state.is-kiv{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.itrack-badge--state.is-approved,
.itrack-badge--state.is-taken,
.itrack-badge--state.is-closed,
.itrack-badge--state.is-resolved,
.itrack-badge--state.is-done,
.itrack-badge--state.is-released{
  color: var(--color-success-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.itrack-badge--state.is-rejected,
.itrack-badge--state.is-void,
.itrack-badge--state.is-cancelled,
.itrack-badge--state.is-overdue{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-border));
}
.itrack-badge--state.is-draft{ color: var(--color-muted); }

/* Status badges rendered through `IssueStateBadge` carry only the design system's `is-*` class (the
   shared table wraps them with `itrack-badge--state`; the project tables do not). The same stronger
   tint and dot are therefore applied app-wide, inside the shell only. */
.eaw-page .eca-badge.is-open,
.eaw-page .eca-badge.is-new{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 45%, var(--color-border));
}
.eaw-page .eca-badge.is-pending,
.eaw-page .eca-badge.is-pending-approval,
.eaw-page .eca-badge.is-pending-amendment,
.eaw-page .eca-badge.is-waiting,
.eaw-page .eca-badge.is-kiv{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.eaw-page .eca-badge.is-approved,
.eaw-page .eca-badge.is-taken,
.eaw-page .eca-badge.is-closed,
.eaw-page .eca-badge.is-resolved,
.eaw-page .eca-badge.is-done,
.eaw-page .eca-badge.is-released{
  color: var(--color-success-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.eaw-page .eca-badge.is-rejected,
.eaw-page .eca-badge.is-void,
.eaw-page .eca-badge.is-cancelled,
.eaw-page .eca-badge.is-overdue{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-border));
}
.eaw-page .eca-badge.is-open::before,
.eaw-page .eca-badge.is-new::before,
.eaw-page .eca-badge.is-pending::before,
.eaw-page .eca-badge.is-pending-approval::before,
.eaw-page .eca-badge.is-pending-amendment::before,
.eaw-page .eca-badge.is-waiting::before,
.eaw-page .eca-badge.is-kiv::before,
.eaw-page .eca-badge.is-approved::before,
.eaw-page .eca-badge.is-taken::before,
.eaw-page .eca-badge.is-closed::before,
.eaw-page .eca-badge.is-resolved::before,
.eaw-page .eca-badge.is-done::before,
.eaw-page .eca-badge.is-released::before,
.eaw-page .eca-badge.is-rejected::before,
.eaw-page .eca-badge.is-void::before,
.eaw-page .eca-badge.is-cancelled::before,
.eaw-page .eca-badge.is-overdue::before{
  content: "";
  flex: 0 0 auto;
  inline-size: .45em;
  block-size: .45em;
  border-radius: 50%;
  background: currentColor;
}

/* ═══ Category meaning in the shared ticket table ══════════════════════════════════════════════
   The category is an app-owned pill, not a `.ui` label. The word is always printed; the colour
   restores iTrack 6's vocabulary: Bug red, Enquiry green, Change/Enhancement/Service blue,
   User Story orange, Requirements neutral, everything else neutral. */
.itrack-category-priority{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}
.itrack-category{
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: var(--leading-tight);
  white-space: nowrap;
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.itrack-category--bug{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-border));
}
.itrack-category--enquiry{
  color: var(--color-success-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.itrack-category--request{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 45%, var(--color-border));
}
.itrack-category--story{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.itrack-category--requirement,
.itrack-category--neutral{
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
}
.itrack-category-priority__value{
  color: var(--color-ink);
  font-weight: 600;
  white-space: nowrap;
}

/* ═══ Compact dashboard masthead ═══════════════════════════════════════════════════════════════
   A shallow teal band, not the old Fomantic blue banner and not a gradient. It is one `<h1>` with
   a muted subtitle and an optional action slot; the shared shell still owns the gutter. */
.itrack-page-hero{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin: 0 0 var(--gap-block);
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: color-mix(in oklab, var(--color-primary) 7%, var(--color-surface));
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
}
.itrack-page-hero__body{ min-width: 0; }
.itrack-page-hero__title{
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 750;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.itrack-page-hero__subtitle{
  margin: var(--space-1) 0 0;
  max-width: var(--measure);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
}
.itrack-page-hero__actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-actions);
}
@media (max-width: 639.98px){
  .itrack-page-hero{
    padding: var(--space-3);
  }
  .itrack-page-hero__actions,
  .itrack-page-hero__actions .eca-btn{
    inline-size: 100%;
    justify-content: center;
  }
}

/* ═══ Issue read: the metadata strip under the title ═══════════════════════════════════════════
   Created / Organisation / Developers plus the deployment-notes shortcut. It is a line, not a
   card: small labels, strong values, and one yellow link that reads as a shortcut rather than a
   state. Optional items are simply absent. */
.itrack-issue-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-3) 0 0;
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.itrack-issue-meta__item{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1);
  min-width: 0;
}
.itrack-issue-meta__label{ font-weight: 650; color: var(--color-muted); }
.itrack-issue-meta__value{
  color: var(--color-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.itrack-issue-meta__deployment{
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-touch);
  padding: 0 var(--space-3);
  color: var(--color-warning-ink);
  background: var(--color-warning-soft);
  border: var(--border) solid color-mix(in oklab, var(--color-warning) 40%, var(--color-border));
  border-radius: var(--radius-pill);
  font-weight: 650;
  text-decoration: none;
}
.itrack-issue-meta__deployment:hover{ text-decoration: underline; }
@media (min-width: 640px){
  .itrack-issue-meta__deployment{ min-height: var(--control-h-sm); }
}

/* The tags are a second group under the status badges. A flex span starts its own visual row even
   though the header's meta slot is a paragraph: no block element is nested inside the `<p>`. */
.itrack-issue-tags{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  margin-block-start: var(--space-2);
}
.itrack-issue-tags__label{
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 650;
}
/* The header's status and tag rows are the full width of the heading column, not the 68ch reading
   measure the shared hint paragraph defaults to. Scoped to the issue page: the design system's
   `.eca-page-hint` is also used for ordinary prose hints elsewhere. */
.itrack-issue-read .eca-page-hint{ max-width: none; }
/* The response event header carries the ticket subject, which can be a long unbroken URL. */
.itrack-event-form .eca-page-hint{ overflow-wrap: anywhere; }
/* The state trigger carries the 44 px touch floor, but the visible badge stays 22 px. The
   milestone badge follows the same shape: a transparent 44 px button wraps the compact badge,
   so it does not read as a larger pill than the visibility/project badges beside it. */
.itrack-milestone-badge-trigger{
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-touch);
  min-width: var(--control-h-touch);
  appearance: none;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  cursor: pointer;
}
.itrack-milestone-badge-trigger:hover .eca-badge,
.itrack-milestone-badge-trigger:focus-visible .eca-badge{
  border-color: var(--color-border);
}
.itrack-milestone-badge-trigger:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.itrack-issue-read .eca-page-hint .itrack-milestone-badge-trigger{ vertical-align: top; }
.itrack-issue-read .eca-page-hint .itrack-state-help{ vertical-align: top; }
/* A long milestone name must wrap on a phone instead of forcing its inline-flex line - and the
   heading block with it - 23 px wider than the container. */
@media (max-width: 639.98px){
  .itrack-issue-read .eca-page-hint .itrack-badge--milestone{
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ═══ Issue read: section accents ══════════════════════════════════════════════════════════════
   One small wrapper class per region. The card remains the shared `.eca-section`; the title ink
   is the only app addition, so the page does not grow a second card language. The accent is text
   and icon colour only — no coloured border or rail. */
.itrack-accent{ min-width: 0; }
.itrack-accent > .eca-section{
  margin-block-end: 0;
}
.itrack-accent--blue{
  --itrack-accent: var(--color-info);
  --itrack-accent-ink: var(--color-info-ink);
}
.itrack-accent--related,
.itrack-accent--discussions{
  --itrack-accent: var(--color-success);
  --itrack-accent-ink: var(--color-success-ink);
}
.itrack-accent--other{
  --itrack-accent: var(--color-warning);
  --itrack-accent-ink: var(--color-warning-ink);
}
.itrack-accent--people{
  --itrack-accent: var(--tint-3);
  --itrack-accent-ink: var(--tint-ink-3);
}
.itrack-accent--dates{
  --itrack-accent: var(--color-primary);
  --itrack-accent-ink: var(--color-primary);
}
/* The title/icon colours belong to the collapsible summary only. A comment card inside the body
   also uses `.eca-section-title`, and must keep the comment's own title styling. */
.itrack-collapsible > .itrack-collapsible__summary .eca-section-title{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--itrack-accent-ink, var(--color-ink));
}
.itrack-collapsible > .itrack-collapsible__summary .eca-section-title .eca-icon{
  color: var(--itrack-accent, var(--color-muted));
  flex: 0 0 auto;
}

/* A collapsible accent card: the shared `.eca-section` frame and padding stay, only the summary
   loses the browser marker and gains a chevron that turns when the section is open. Every section
   is open on first paint; the state is native, so it survives without scripting. The summary carries
   `.eca-section-head` itself, so its display/gap/justify come from the design system.

   The touch floor belongs to the row at EVERY width. It used to sit in the `max-width: 639.98px`
   block, so above 640 the summary was only its own line box: measured on a fresh JVM, 685x20 at 768
   and 969x21 / 288x21 at 1440 on /issue/1, /issue/1/1, /issue/1/1/view and /issue/401/edit — eight
   `tap<24` findings. A summary is a row in a card, not a button, and the floor is a property of the
   row, not of the viewport. `align-items: center` is what keeps the chevron and the hint on the
   title's line, so the row grows downwards and nothing in it jumps. */
.itrack-collapsible > .itrack-collapsible__summary{
  min-height: var(--control-h-touch);
  list-style: none;
  cursor: pointer;
  margin: 0;
  align-items: center;
}
.itrack-collapsible > .itrack-collapsible__summary::-webkit-details-marker{ display: none; }
.itrack-collapsible > .itrack-collapsible__summary > .eca-section-hint{
  margin-inline-start: auto;
}
.itrack-collapsible__chevron{
  flex: 0 0 auto;
  color: var(--color-muted);
  line-height: 1;
  transition: transform var(--motion-fast) ease;
}
.itrack-collapsible[open] > .itrack-collapsible__summary .itrack-collapsible__chevron{
  transform: rotate(180deg);
}
.itrack-collapsible > .itrack-collapsible__body{ margin-block-start: var(--gap-block); }

/* A body whose only content is the empty state drops the card frame, matching the design system's
   own `.eca-section:has(> .eca-empty)` rule now that the empty state sits inside the body. */
.itrack-collapsible:has(> .itrack-collapsible__body > .eca-empty:only-child){
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.itrack-collapsible:has(> .itrack-collapsible__body > .eca-empty:only-child) > .itrack-collapsible__summary{
  margin-block-end: var(--space-2);
}

/* The description trigger sits with the description, not in the header action row. */
.itrack-description-tools{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-block-end: var(--space-3);
}

/* ═══ Issue read: the view-toggle group ════════════════════════════════════════════════════════
   Expand and Wrap are settings, not ticket actions: one distinct group on the right of the desktop
   header. Below 640 the whole header action row is hidden and the same controls appear in the
   floater, where the group stacks. */
.itrack-view-toggle{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-actions);
  min-width: 0;
}
@media (max-width: 639.98px){
  .itrack-floater__panel .itrack-view-toggle{
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    width: 100%;
  }
}

/* ═══ Issue read: the state-description popover ════════════════════════════════════════════════ */
.itrack-state-badge-group{
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}
.itrack-state-help{ position: relative; display: inline-flex; align-items: center; }
.itrack-state-help__badge-toggle{
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  /* The badge itself is the trigger and a badge is ~22 px tall. Its hit area must still be a touch
     target at EVERY width: the phone-only rule that used to live here said so for 390, but 768 and
     1440 measured 69×22 and failed WCAG 2.2 2.5.8 (24 px) in `ux-audit.mjs` on four routes. The
     badge stays visually compact — only the button's box grows, centred on the same glyph. */
  min-height: var(--control-h-touch);
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  cursor: pointer;
}
.itrack-state-help__badge-toggle:hover .eca-badge,
.itrack-state-help__badge-toggle:focus-visible .eca-badge{
  border-color: var(--color-border);
}
.itrack-state-help__badge-toggle:focus-visible{ outline: 2px solid var(--color-primary); outline-offset: 2px; }
.itrack-state-help__chevron{
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1;
}
.itrack-state-help__toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h-touch);
  height: var(--control-h-touch);
  padding: 0;
  color: var(--color-link);
  background: transparent;
  border: var(--border) solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
}
.itrack-state-help__toggle:hover,
.itrack-state-help__toggle:focus-visible{
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
}
.itrack-state-help__panel{
  position: absolute;
  inset-block-start: calc(100% + var(--space-1));
  inset-inline-start: 0;
  z-index: 30;
  width: min(34rem, calc(100vw - (var(--space-4) + var(--space-4))));
  max-height: min(70vh, 34rem);
  overflow: auto;
  padding: var(--space-3);
  color: var(--color-ink);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 18%, transparent);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}
.itrack-state-help__panel[hidden]{ display: none; }
.itrack-state-legend{
  display: grid;
  margin-block-start: var(--space-2);
}
.itrack-state-legend__row{
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-1);
  border-top: var(--border) solid var(--color-border);
}
.itrack-state-legend__row--head{
  color: var(--color-muted);
  font-weight: 600;
  border-top: 0;
}
.itrack-state-legend__cell{ min-width: 0; }
@media (min-width: 992px){
  .itrack-state-help__toggle{ width: 24px; height: 24px; }
  /* Below the header action row: the popover used to start at the badge and cover More actions /
     Edit. The phone anchor rules below stay unchanged. */
  .itrack-state-help__panel{ inset-block-start: calc(100% + 52px); }
}
@media (max-width: 639.98px){
  /* A 17-row legend cannot be a badge-anchored popover on a 390 px screen: the badge starts after
     the visibility chip, so a fixed-width panel overflows the viewport. Use the same bottom-sheet
     pattern as the other phone disclosures. */
  .itrack-state-help__panel{
    position: fixed;
    inset-inline: var(--space-4);
    inset-block-start: auto;
    inset-block-end: var(--space-4);
    width: auto;
    max-height: 70vh;
    z-index: 60;
  }
}

/* ═══ Issue read: the fullscreen description dialog ════════════════════════════════════════════
   A native `<dialog>`: Esc closes it, the backdrop click closes it (itrack7.js), and the browser
   owns focus trapping. The body reuses the reading pane's sanitized HTML, so the two surfaces can
   never disagree. It fills the viewport rather than sitting as a small modal on a phone. */
.itrack-description-dialog{
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: auto;
  background: var(--color-surface);
  color: var(--color-ink);
}
.itrack-description-dialog::backdrop{ background: rgb(4 10 20 / .55); }
.itrack-description-dialog__bar{
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: var(--border) solid var(--color-border);
}
.itrack-description-dialog__title{ margin: 0; font-size: var(--text-lg); }
.itrack-description-dialog__body{
  max-width: none;
  padding: var(--space-4);
  overflow-wrap: anywhere;
}
@media (max-width: 639.98px){
  .itrack-description-dialog__bar{ padding: var(--space-3); }
  .itrack-description-dialog__body{ padding: var(--space-3); }
}

/* The inline reply form is a panel under its own comment, hidden until Reply is pressed. The
   server-side `/reply` mode renders it open. */
.itrack-reply-panel{
  margin-block-start: var(--space-3);
  padding: var(--space-3);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  background: var(--color-surface-sunken);
}
.itrack-reply-panel[hidden]{ display: none; }
.itrack-reply-panel--open{ display: block; }

/* Related tickets groups are still stacked with the section rhythm now that they sit inside one
   Related tickets section rather than directly in the main column. */
.itrack-related-groups > * + *{ margin-block-start: var(--space-4); }
.itrack-related-group__head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-block-end: var(--space-2);
}
.itrack-related-group__title{
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-ink);
}
/* Below 640 the shared `.eca-table--cards` rule turns each related ticket into a labelled card.
   The table itself stays inside its scroll wrapper above that breakpoint. */
.itrack-related-table{ width: 100%; }
@media (min-width: 640px){
  /* One compact row: the subject owns the width, the facts stay on their own short columns. A fixed
     layout keeps that 64% share instead of letting a long subject or a badge widen its own cell. */
  .itrack-related-table{ table-layout: fixed; }
  .itrack-related-table th:first-child,
  .itrack-related-table td:first-child{ width: 64%; }
  .itrack-related-table th,
  .itrack-related-table td{ padding-block: 4px; }
  .itrack-related-table td{ vertical-align: top; }
}
.itrack-related-subject{
  display: inline;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.itrack-related-tags{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-block-start: 2px;
}
.itrack-related-tags .eca-badge{
  padding: 0 var(--space-1);
  font-size: 10px;
  line-height: 1.4;
}

/* The People card lives in a 288 px rail at 1440. Fixed layout plus a wrapping person name keeps
   the two-column label/value table inside the rail instead of painting past it. */
.itrack-people-table{ width: 100%; }
.itrack-people-table tbody td.collapsing{ width: 1%; white-space: nowrap !important; }
.itrack-people-table tbody td{ overflow-wrap: anywhere; }
.itrack-people-table .eca-person__name{
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* ═══ Issue read: Other Details is a compact two-column label/value list ═══════════════════════
   The old card put a third "Change …" button under every value; seven of them made the column
   wrap and the 340 px rail scroll sideways. The value itself is the editor now, so each field is
   exactly two columns and every long value can break inside its own cell. */
.itrack-detail-facts{
  margin: 0;
  min-width: 0;
}
.itrack-detail-fact{
  display: grid;
  /* ONE fixed label column. The oracle's fixed (30%) label column measures 87 px at 1440 and
     102 px at 390; 6rem (96 px) sits between the two and is exactly the width every short label
     already had here (Project/Category/Tags/Git commit all measured 96). A growing
     `minmax(6rem, auto)` let "Total man hours/days" widen the column to 123 and pushed only that
     value 27 px to the right; a fixed track keeps every value on one axis and makes the long
     labels wrap instead. The existing `overflow-wrap: anywhere` on the label makes that wrap safe. */
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  min-width: 0;
  padding-block: var(--space-2);
  border-top: var(--border) solid var(--color-border);
}
.itrack-detail-fact:first-child{ border-top: 0; padding-block-start: 0; }
.itrack-detail-fact__label{
  margin: 0;
  min-width: 0;
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}
.itrack-detail-fact__value{
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.itrack-detail-fact__edit{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: 100%;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
}
.itrack-detail-fact__edit:hover{ text-decoration: underline; }
/* Add/Edit attachments is an action, not a fact value: it advertises its link role before hover. */
.itrack-detail-fact__edit--action{
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 639.98px){
  .itrack-detail-fact__edit{
    min-height: var(--control-h-touch);
    min-width: var(--control-h-touch);
    align-items: center;
  }
}
.itrack-detail-attachments{
  margin-block-start: var(--space-4);
  padding-block-start: var(--space-4);
  border-top: var(--border) solid var(--color-border);
  min-width: 0;
}
.itrack-detail-attachments__head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
.itrack-detail-attachments__head .eca-label{ margin: 0; }
.itrack-detail-attachments ul{
  margin: 0;
  padding-inline-start: 1.25rem;
}
.itrack-detail-attachments li + li{ margin-block-start: var(--space-1); }

/* The five-column history is too wide for the rail. The card keeps only the trigger; the table
   opens in a native dialog that can be 720 px wide and scrolls its own body on a phone. */
.itrack-detail-milestones__trigger{
  margin-block-start: var(--space-3);
  width: 100%;
  justify-content: center;
}
.itrack-milestone-dialog{
  width: min(720px, 94vw);
  max-width: min(720px, 94vw);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  background: var(--color-surface);
  color: var(--color-ink);
  overflow: auto;
}
.itrack-milestone-dialog::backdrop{ background: rgb(4 10 20 / .55); }
.itrack-milestone-dialog__bar{
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: var(--border) solid var(--color-border);
}
.itrack-milestone-dialog__title{ margin: 0; font-size: var(--text-lg); }
.itrack-milestone-dialog__body{ padding: var(--space-4); min-width: 0; }
.itrack-milestone-dialog__legend{
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.itrack-milestone-noscript{ margin-block-start: var(--space-3); }
.itrack-milestone-noscript > summary{
  display: flex;
  align-items: center;
  min-height: var(--control-h-touch);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-link);
}
.itrack-milestone-date{
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border: var(--border) solid color-mix(in oklab, var(--color-success) 32%, var(--color-border));
  border-radius: var(--radius-pill);
  background: var(--color-success-soft);
  color: var(--color-success-ink);
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
}
.itrack-milestone-date--empty{
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
  color: var(--color-muted);
}
.itrack-milestone-status{
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}
.itrack-milestone-status--incomplete{ color: var(--color-muted); }
.itrack-milestone-status__glyph--completed{ color: var(--color-success-ink); font-weight: 700; }
.itrack-milestone-status__glyph--incomplete{ color: var(--color-muted); }
@media (max-width: 639.98px){
  .itrack-milestone-dialog__bar{ padding: var(--space-3); }
  .itrack-milestone-dialog__body{ padding: var(--space-3); }
}

/* ═══ Issue read: header actions and the rich-text toolbar must wrap, not widen the page ══════
   The action row carried nine controls on 18909 and the Trumbowyg toolbar carries ~30 buttons;
   both are flex rows whose intrinsic width used to exceed a 390/768 viewport. Wrapping is the
   fix the page needs, and it is app-level because the same row/toolbar appears on every ticket
   that can be edited or commented on. No new component name is introduced. */
.eca-page-header{
  flex-wrap: wrap;
  row-gap: var(--space-3);
}
.eca-page-actions{
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  row-gap: var(--space-2);
  justify-content: flex-end;
}
/* Every header action lives in one flex row, so adjacent controls all share the 12px action gap.
   The wrapper is a div; the ticket table's disclosure is `details.itrack-ticket-actions`, so the
   `:not(details)` keeps this layout away from the row menu. */
.itrack-ticket-actions:not(details){
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-actions);
  min-width: 0;
}
/* `ui-alias.css` gives every adjacent `.eca-btn` an 8px inline margin on top of the flex gap. The
   header row owns one uniform 12px gap, so the alias margin is cleared wherever both controls are
   in the same group: direct header siblings, the view-toggle pair, and the phone floater. */
.itrack-ticket-actions > .eca-btn + .eca-btn,
.itrack-ticket-actions .itrack-view-toggle > .eca-btn + .eca-btn,
.itrack-floater__panel .eca-btn + .eca-btn{ margin-inline-start: 0; }
/* The saved/starred toggle is a form. The shared sheet turns a one-control action form into
   `display: contents`, which removes it from the gap rhythm; on this page it is one normal flex
   item like every other control. Its hidden CSRF input must not become a second flex item. */
.itrack-save-form{
  display: flex;
  gap: 0;
}
.itrack-save-form input[type="hidden"]{ display: none; }
.itrack-issue-read .eca-page-header .itrack-save-form{
  display: flex;
  flex-direction: row;
  gap: 0;
  margin: 0;
}
/* An icon-only control is square, with the glyph centred and no text padding. `Icons.only` keeps
   the accessible name as visually hidden text. */
.itrack-icon-btn{
  inline-size: var(--control-h);
  min-inline-size: var(--control-h);
  padding-inline: 0;
  justify-content: center;
}
/* A plain text link in a card/table still needs a 44px hit area. Used by the milestone and file
   links, which are not `.eca-btn` controls. */
.itrack-touch-link{
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-touch);
  min-width: var(--control-h-touch);
}
.trumbowyg-button-pane{
  flex-wrap: wrap;
  max-width: 100%;
}

/* ═══ Issue read: the phone action menu ═══════════════════════════════════════════════════════
   Below 640 the header action row is removed from the flow (it was nine controls wide and wrapped
   into the page title) and the same gated controls move into one fixed `<details>` disclosure.
   The summary and every panel control keep the 44px touch minimum; the panel is bounded by the
   viewport, so a long label wraps instead of producing a horizontal scrollbar. */
.itrack-floater{ display: none; }
@media (max-width: 639.98px){
  .itrack-issue-read .eca-page-header .eca-page-actions{ display: none; }
  /* The multi-select tag control inherits the shared 38 px `.eca-select` height; give it the
     touch floor wherever the comment forms become a phone layout. */
  .itrack-issue-read select.eca-select[multiple]{ min-height: var(--control-h-touch); }
  .itrack-floater{
    display: block;
    position: fixed;
    inset-inline-end: var(--space-4);
    inset-block-end: var(--space-4);
    z-index: 40;
  }
  .itrack-floater__toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-h-touch);
    padding: 0 var(--space-4);
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--color-primary-content);
    background: var(--color-primary);
    border: var(--border) solid var(--color-primary);
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 22%, transparent);
  }
  .itrack-floater__toggle::-webkit-details-marker{ display: none; }
  /* A bottom sheet, not a popover anchored to the right edge: full width inside the page gutters,
     sitting just above the 44 px summary, and scrollable when the action list is tall. */
  .itrack-floater__panel{
    position: fixed;
    inset-inline: var(--space-4);
    inset-block-end: calc(var(--space-4) + var(--control-h-touch) + var(--space-2));
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border) solid var(--color-border);
    border-radius: var(--radius-box);
    box-shadow: 0 8px 24px color-mix(in oklab, var(--color-ink) 16%, transparent);
  }
  /* A closed <details> does not paint its descendants, but the flex layout still gives them boxes.
     Hide the panel structurally so accessibility/visibility audits and assistive tech agree. */
  .itrack-floater:not([open]) .itrack-floater__panel{ display: none; }
  /* The flat sheet stacks every control in one column. The same 4px gap is used inside the group
     and between the header controls and the Actions-menu entries, so nothing drifts. */
  .itrack-floater__panel .itrack-ticket-actions{
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    width: 100%;
  }
  .itrack-floater__panel .eca-btn,
  .itrack-floater__panel form{ width: 100%; margin: 0; }
  .itrack-floater__panel .eca-btn{
    justify-content: flex-start;
    min-height: var(--control-h-touch);
    white-space: normal;
  }
}
/* Comment bodies are arbitrary HTML from the database. SQL blocks and unbroken strings used to
   widen the whole page at 390; wrap the words and scroll any embedded table inside the comment. */
.itrack-detail-main article[id^="comment-"]{
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  /* A deep link must land below the sticky shell header, not underneath it. */
  scroll-margin-top: calc(var(--control-h-touch) * 2);
}
.itrack-detail-main article[id^="comment-"] pre,
.itrack-detail-main article[id^="comment-"] code{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.itrack-detail-main article[id^="comment-"] table{
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* ═══ Issue read: the phone comment filter ═════════════════════════════════════════════════════
   The type tabs stay on desktop. Below 640 they are hidden and one 44 px select carries the same
   filters (label + count, current selected), so the strip cannot squeeze the count badges. */
.itrack-comment-filter-select{ display: none; }
@media (max-width: 639.98px){
  .itrack-comment-filter-select{
    display: block;
    width: 100%;
    min-height: var(--control-h-touch);
    padding: 0 var(--space-3);
    color: var(--color-ink);
    background: var(--color-surface);
    border: var(--border) solid var(--color-border);
    border-radius: var(--radius-box);
    font: inherit;
  }
  .itrack-comment-filters{ display: none; }
}

/* ═══ Issue read: comment threads ═════════════════════════════════════════════════════════════
   The All/Draft/Scheduled tabs nest a reply under its root. Replies are hidden behind a native
   `<details>` whose summary is a full-height touch target; the two labels swap when it opens.
   The child container is a tinted, inset well with a left rail, not another card stacked on a
   card. No overflow is introduced: long comment bodies already wrap in the rule above. */
.itrack-comment-replies{
  min-width: 0;
  margin-block-start: var(--space-3);
}
.itrack-comment-replies__toggle{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h-touch);
  cursor: pointer;
  list-style: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-link);
}
.itrack-comment-replies__toggle::-webkit-details-marker{ display: none; }
.itrack-comment-replies__toggle::before{
  content: "▸";
  flex: 0 0 auto;
  line-height: 1;
}
.itrack-comment-replies[open] > .itrack-comment-replies__toggle::before{
  content: "▾";
}
.itrack-comment-replies__hide{ display: none; }
.itrack-comment-replies[open] > .itrack-comment-replies__toggle > .itrack-comment-replies__show{
  display: none;
}
.itrack-comment-replies[open] > .itrack-comment-replies__toggle > .itrack-comment-replies__hide{
  display: inline;
}
.itrack-comment-children{
  min-width: 0;
  margin-block-start: var(--space-2);
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border-inline-start: 3px solid color-mix(in oklab, var(--color-primary) 32%, var(--color-border));
  border-radius: var(--radius-box);
  background: var(--color-surface-sunken);
}
.itrack-comment-children > * + *{
  margin-block-start: var(--space-3);
}
/* The child is still a comment card: keep its own surface on the tinted well so its text and
   actions do not inherit the sunken background. */
.itrack-comment-children .eca-section{
  background: var(--color-surface);
}
@media (max-width: 639.98px) {
  .itrack-comment-children{ padding-inline: var(--space-2); }
}

/* ═══ Issue read: long comment bodies ═══════════════════════════════════════════════════════════
   Long SQL/deployment notes were rendering in full (one card measured 7,252 px). The server keeps
   the complete sanitized HTML and marks long bodies with `data-itrack-clamp`; JS adds `is-clamped`
   and reveals the Show more control. Expanding removes the class and reveals the same content —
   nothing is truncated in the markup, and with scripting off the body is never hidden. */
.itrack-comment-body.is-clamped{
  position: relative;
  max-height: 14rem;
  overflow: hidden;
}
.itrack-comment-body.is-clamped::after{
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 3rem;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--color-surface));
}
.itrack-comment-more{
  margin-block-start: var(--space-1);
}
@media (max-width: 639.98px){
  .itrack-comment-more{
    width: 100%;
    justify-content: flex-start;
    min-height: var(--control-h-touch);
  }
}

/* ═══ Issue read: comment density ═══════════════════════════════════════════════════════════════
   A comment is a card in the design system, but 76 of them stack into a page twice the reference's
   height. The title/meta row keeps its hierarchy; the padding, the head gap and the action row are
   tightened. Actions are right-aligned on a pointer and wrap full-width under 640, where every
   control keeps the 44 px touch minimum. Nothing is hidden. */
.itrack-comment-card{
  padding: var(--space-3);
  border-color: color-mix(in oklab, var(--color-border) 70%, var(--color-surface));
}
.itrack-comment-card .eca-section-head{
  margin-block-end: var(--space-2);
  gap: 0 var(--space-2);
}
.itrack-comment-card .itrack-comment-subtype,
.itrack-comment-card .itrack-comment-deployment{ margin-block: var(--space-1) 0; }
.itrack-comment-card .eca-actions{
  margin-block-start: var(--space-2);
  margin-block-end: 0;
  padding-block-start: var(--space-1);
  border-top: 0;
  gap: var(--space-2);
  justify-content: flex-end;
}
.itrack-comment-card .eca-actions .eca-btn{ white-space: normal; }
@media (max-width: 639.98px){
  .itrack-comment-card .eca-actions{
    justify-content: flex-start;
    align-items: stretch;
  }
  .itrack-comment-card .eca-actions .eca-btn,
  .itrack-comment-card .eca-actions form{ width: 100%; }
  .itrack-comment-card .eca-actions .eca-btn{
    justify-content: flex-start;
    min-height: var(--control-h-touch);
  }
}

/* A linked person keeps the avatar/name component but reads as navigation. */
.itrack-person-link{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: var(--control-h-touch);
  color: var(--color-link);
  text-decoration: none;
}
@media (min-width: 640px){
  .itrack-person-link{ min-height: 1.5rem; }
}
.itrack-person-link:hover .eca-person__name{ text-decoration: underline; }
.itrack-person-link .eca-person{ min-width: 0; max-width: 100%; }

/* A linked author keeps the section title's hierarchy but reads as a person, not body text. */
.itrack-comment-author{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 24px;
  color: var(--color-link);
  text-decoration: none;
}
.itrack-comment-author:hover .eca-person__name{ text-decoration: underline; }
@media (max-width: 639.98px) {
  .itrack-comment-author{ min-height: var(--control-h-touch); }
}

/* Deep-link arrival: a short, quiet wash so the reader can find the comment they followed. */
@keyframes itrack-comment-blink{
  0%{ background-color: var(--color-warning-soft); }
  65%{ background-color: var(--color-warning-soft); }
  100%{ background-color: transparent; }
}
.itrack-comment-blink{
  border-radius: var(--radius-box);
  animation: itrack-comment-blink 2s ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .itrack-comment-blink{ animation: none; }
}

/* ═══ Shared ticket table: search, sort, dense rows, card facts, an unclipped action menu ═══════ */
/* A sort swap replaces the rows under the reader. Scroll anchoring would chase the removed rows
 * and can land at the bottom of the page; the wrapper opts out so scrollY stays put. */
.itrack-ticket-table-wrap{ overflow-anchor: none; }
.itrack-table-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  margin-block-end: var(--space-3);
}
.itrack-table-toolbar__search{ flex: 1 1 20rem; min-width: 0; }
.itrack-table-toolbar__search .eca-input{ width: 100%; }
/* The module filter is one BOUNDED toolbar child. The picker's chips already wrap
 * (`.eca-choice-picker--multi .eca-choice-picker__trigger{ flex-wrap: wrap }` in the design
 * system); the defect was this wrapper sizing to its content, so the trigger's `inline-size:
 * 100%` followed a max-content track and every chip stayed on one row. Giving the flex item a
 * basis and a ceiling hands the trigger a width to wrap at, and keeps the search field and the
 * result count on the same toolbar row. At 390 it shrinks with the toolbar instead of forcing
 * a horizontal scroll. */
.itrack-module-filter{
  flex: 0 1 22rem;
  max-inline-size: 22rem;
  min-inline-size: 0;
}
.itrack-module-filter .eca-field,
.itrack-module-filter .eca-choice-picker{ min-inline-size: 0; }
/* The reverted app-local link strips share `.eca-tabs` with the component. The component sheet
 * sets `flex-direction: column` on that class; a page that loads it for one Preloaded strip must
 * not turn its other, plain link strips into a vertical list. */
.eca-tabs:not([data-eca-tabs]){ flex-direction: row; }

/* The dashboard's strip belongs to the list it switches; give it the same block rhythm the
 * other tabbed pages get from the page wrapper, scoped so no other strip moves. */
.itrack-dashboard-page > .eca-tabs{ margin-block-end: var(--gap-block); }

/* The table headers are the desktop sort control. The phone is the one place a `<thead>` is
 * hidden (cards), so it gets one menu with the same seven URLs; above 640 the menu is absent. */
.itrack-sort-mobile{ display: none; }
@media (max-width: 639.98px){
  .itrack-sort-mobile{ display: block; }
}
.itrack-sort-menu{ position: relative; }
.itrack-sort-menu > summary{ list-style: none; cursor: pointer; }
.itrack-sort-menu > summary::-webkit-details-marker{ display: none; }
.itrack-sort-menu__menu{
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  margin-block-start: var(--space-1);
  padding: var(--space-2);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.itrack-sort-menu__menu .item{
  display: flex;
  align-items: center;
  min-height: var(--control-h-touch);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-control);
  color: var(--color-ink);
  text-decoration: none;
}
.itrack-sort-menu__menu .item:hover,
.itrack-sort-menu__menu .item.active{ background: var(--color-surface-muted); }
.itrack-sort-link{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 24px;
  /* The 18 px text line gets 3 px of padding top and bottom (24 px hit area), and the matching
     negative margin keeps the link's layout box at 18 px: the header row does not grow. */
  padding-block: 3px;
  margin-block: -3px;
  color: inherit;
  text-decoration: none;
}
.itrack-sort-link:hover{ text-decoration: underline; }
.itrack-ticket-table thead th[aria-sort] .itrack-sort-link{ color: var(--color-primary); }
/* The shared upload row is already 44 px tall; the filename anchor was only its 20 px text line. */
.eca-upload__name{
  display: flex;
  align-items: center;
  align-self: stretch;
  min-height: var(--control-h-touch);
}
.itrack-sort-cue{ font-size: var(--text-xs); line-height: 1; }
.itrack-table-toolbar__count{
  color: var(--color-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.itrack-table-no-results{ margin-block-start: var(--space-2); }
.itrack-ticket-table tbody td{ vertical-align: middle; }

/* ═══ Ticket Summary: iTrack 6's fourteen columns, each with room to render ══════════════════
   Auto layout, not fixed equal shares: each column carries a real min-width and the browser
   expands a column when a nowrap value (a long state badge, a date) needs more. Short scalar
   columns stay on one line; Subject is the widest flexible column a reader scans; Milestone and
   Developer(s) wrap. The honest sum is wider than the 1440 card, so the existing `.table-scroll`
   wrapper owns horizontal scrolling there instead of squeezing columns into ellipses. Below 640
   the card layout ignores these rules and wraps the same labels into the phone card with no
   horizontal overflow. */
@media (min-width: 640px) {
  .itrack-ticket-table--summary{
    table-layout: auto;
    width: 100%;
    /* 4.5 + 8.5 + 20 + 7 + 5.5 + 7 + 7.5 + 5.5 + 12 + 8 + 10 + 8 + 10 + 5.5 = 119rem. */
    min-width: 119rem;
  }
  .itrack-ticket-table.itrack-ticket-table--summary thead th,
  .itrack-ticket-table.itrack-ticket-table--summary tbody td{
    padding-inline: var(--space-2);
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .itrack-ticket-table--summary th{ vertical-align: bottom; white-space: normal; }
  .itrack-ticket-table--summary .col-ticket{ min-width: 4.5rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-deployment{ min-width: 8.5rem; white-space: normal; }
  .itrack-ticket-table--summary .col-subject{ min-width: 20rem; white-space: normal; }
  .itrack-ticket-table--summary .col-project{ min-width: 7rem; white-space: normal; }
  .itrack-ticket-table--summary .col-visibility{ min-width: 5.5rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-state{ min-width: 7rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-category{ min-width: 7.5rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-tested{ min-width: 5.5rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-milestone{ min-width: 12rem; white-space: normal; }
  .itrack-ticket-table--summary .col-released{ min-width: 8rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-creator{ min-width: 10rem; white-space: normal; }
  .itrack-ticket-table--summary .col-created{ min-width: 8rem; white-space: nowrap; }
  .itrack-ticket-table--summary .col-developers{ min-width: 10rem; white-space: normal; }
  .itrack-ticket-table--summary .col-actions{ min-width: 5.5rem; white-space: nowrap; }
  /* `.eca-table th.collapsing` sets width:1%; min-width, not `!important`, is what gives these
     two nowrap columns their real budget. */
  .itrack-ticket-table.eca-table--cards.itrack-ticket-table--summary th.col-ticket,
  .itrack-ticket-table.eca-table--cards.itrack-ticket-table--summary td.col-ticket{ min-width: 4.5rem; }
  .itrack-ticket-table.eca-table--cards.itrack-ticket-table--summary th.col-released,
  .itrack-ticket-table.eca-table--cards.itrack-ticket-table--summary td.col-released{ min-width: 8rem; }
  .itrack-ticket-table--summary .col-deployment .eca-btn{
    white-space: nowrap;
    padding-inline: var(--space-2);
  }
}

/* ═══ Dashboard: real per-column minimums, not equal shares ═════════════════════════════════════
   The Ticket cell is the column a reader scans, so it gets a 240 px budget and wraps at word
   boundaries; scalar/date columns stay on one line. Auto layout + min-widths means the To Be
   Released table may exceed the card and scroll inside `.table-scroll`, but Ticket is never
   squeezed to a five-line 78 px column. Below 640 the card layout ignores this block. */
@media (min-width: 640px) {
  .itrack-ticket-table--dashboard{ table-layout: auto; width: 100%; }
  .itrack-ticket-table--dashboard thead th,
  .itrack-ticket-table--dashboard tbody td{ padding-inline: var(--space-2); }
  .itrack-ticket-table--dashboard th{ vertical-align: bottom; white-space: normal; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-index{ min-width: 2.5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-prod-release{ min-width: 9.5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-uat-release{ min-width: 9.5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-ticket{ width: 15rem; min-width: 15rem; max-width: 15rem; white-space: normal; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-project{ min-width: 7rem; white-space: normal; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-requester{ min-width: 7.5rem; white-space: normal; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-visibility{ min-width: 5.5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-state{ min-width: 8rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-created{ min-width: 6.5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-priority{ min-width: 5rem; white-space: nowrap; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-category{ min-width: 7.5rem; white-space: normal; }
  .itrack-ticket-table.itrack-ticket-table--dashboard .col-actions{ min-width: 5.5rem; white-space: nowrap; }
  /* The 640–899 summary clamp breaks words inside the subject; the dashboard ticket is prose. */
  .itrack-ticket-table.itrack-ticket-table--dashboard tbody td.col-ticket > a{
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
  }
}
@media (max-width: 768px) {
  /* The card's Category slot is ~140 px at 390 and a little wider at 768; "Enhancement Request" is
     a nowrap badge otherwise. The card band now runs to 768, so the wrap does too. */
  .itrack-ticket-table--dashboard td.col-category .itrack-category{
    max-width: 100%;
    white-space: normal;
  }
}
/* The Creator is not an optional value: it wraps in both the desktop cell and the 390 card. The
   shared `.eca-person__name` ellipsizes; this summary override removes that truncation. */
.itrack-ticket-table--summary .col-creator > a{
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
}
.itrack-ticket-table--summary .col-creator .eca-person{
  max-width: 100%;
  min-width: 0;
}
.itrack-ticket-table--summary .col-creator .eca-person__name{
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
/* The Developer(s) cell is a list at every width. At 390 the card column is ~155 px, so a long
   display name must wrap inside its badge instead of painting past the card border. */
.itrack-ticket-table--summary .itrack-ticket-developers{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
}
.itrack-ticket-table--summary .itrack-ticket-developers .itrack-badge{
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Between the card layout and the desktop table the shared sheet forces data cells to
   `white-space: nowrap`. The subject is the one prose column, so its longest value measured
   1776 px and stretched the table to ~3000 px; the document then reported 1904 px of overflow
   at 768 even though `.table-scroll` clipped the table. Cap that one column on the cell that
   actually carries the subject in each renderer (standard lists use the Subject cell; the
   dashboard's Ticket cell also carries it). Two lines, not one, so the term the toolbar matched
   on remains visible; the link's `title` carries the full text. The list view is prose and is
   reset below. */
@media (min-width: 640px) and (max-width: 899.98px){
  .itrack-ticket-table tbody td.itrack-ticket-subject{
    min-width: 20rem;
    max-width: 24rem;
  }
  .itrack-ticket-table tbody td.itrack-ticket-subject > a{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}
.itrack-ticket-date{ font-size: var(--text-xs); line-height: var(--leading-snug); }
@media (min-width: 640px) {
  .itrack-ticket-table tbody td{ padding-block: var(--space-3); }
}

/* ═══ Recent Tickets: the subject is the primary column ═══════════════════════════════════════
   iTrack 6 does not render this page as a table: it renders one card per row, the subject as the
   card's full-width header and the four facts as equal quarter columns (measured 2026-11-27 at
   1440: card 1129 px, header 1101, facts 281 each; at 390 the facts stack to 322). There are
   therefore no v6 column widths to copy. The rule carried over is the hierarchy: the subject is
   the one prose column and the secondary facts are compact. Fixed layout gives the subject every
   pixel the named columns do not take, so it stays the widest column at 1440 (measured after:
   470 px for pId=405, where no row has an action and the column is absent, and 382 px for pId=1,
   whose Actions column takes 88 px) and the table still fits its card with no page-level
   side-scroll. Below 640 the card layout ignores all of this. */
@media (min-width: 640px) {
  .itrack-ticket-table--recent{ table-layout: fixed; width: 100%; }
  .itrack-ticket-table--recent thead th,
  .itrack-ticket-table--recent tbody td{
    padding-inline: var(--space-2);
    overflow-wrap: anywhere;
  }
  .itrack-ticket-table--recent .col-ticket{ width: 4.5rem; }
  /* The library's `.collapsing` sets width:1%; without this the fixed layout gives the Ticket
     column 13 px and hands the rest to the subject, clipping "#16931". */
  .itrack-ticket-table--recent .col-ticket.collapsing{ width: 4.5rem; min-width: 4.5rem; }
  /* No width: in fixed layout the subject takes every pixel that these named columns leave. */
  .itrack-ticket-table--recent .col-subject{ width: auto; }
  .itrack-ticket-table--recent .col-category{ width: 8.5rem; }
  /* "WORK IN PROGRESS" is one unbreakable badge; this is its measured width plus cell padding. */
  .itrack-ticket-table--recent .col-state{ width: 10.5rem; }
  .itrack-ticket-table--recent .col-project{ width: 6.5rem; }
  .itrack-ticket-table--recent .col-creator{ width: 8rem; }
  .itrack-ticket-table--recent .col-created,
  .itrack-ticket-table--recent .col-modified{ width: 6rem; }
  .itrack-ticket-table--recent .col-actions{ width: 5.5rem; }
}
/* The tablet clamp above caps the subject at 24 rem; the recent table's subject already owns the
   remainder, so the clamp would only force the table to scroll there. */
@media (min-width: 640px) and (max-width: 899.98px){
  .itrack-ticket-table--recent tbody td.itrack-ticket-subject{
    min-width: 0;
    max-width: none;
  }
}
.itrack-ticket-actions{ position: relative; }
.itrack-ticket-actions > summary{
  list-style: none;
  cursor: pointer;
}
.itrack-ticket-actions > summary::-webkit-details-marker{ display: none; }
.itrack-ticket-actions__menu{
  position: absolute;
  inset-inline-end: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 13rem;
  margin-block-start: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.itrack-ticket-actions__menu .eca-btn,
.itrack-ticket-actions__menu form{ width: 100%; margin: 0; }
.itrack-ticket-actions__menu .eca-btn{ justify-content: flex-start; }
/* A desktop table scrolls horizontally, but an OPEN row menu must not be clipped by that box. */
.table-scroll:has(.itrack-ticket-actions[open]){ overflow: visible; }

/* The shared row actions menu is a disclosure; the server-rendered list controls are plain
 * links/buttons so they work with scripting off. */
.itrack-list-controls{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-3);
}
/* Plain prose, never a tooltip. It shares the controls row with the period selector on wide
   screens and wraps below it at 390; `min-width: 0` + `overflow-wrap` keep a long total from
   widening the document. */
.itrack-list-note{
  flex: 1 1 15rem;
  min-width: 0;
  margin: 0;
  color: var(--color-ink-muted);
  overflow-wrap: anywhere;
}
/* The dashboard's capped "View all" carries a link to the list that owns the filter. The link is
   a real button, so it keeps the 44 px touch floor at 390 instead of shrinking to text height. */
.itrack-list-notice{
  display: grid;
  gap: var(--space-1);
  margin-block-end: var(--space-2);
  color: var(--color-ink-muted);
  overflow-wrap: anywhere;
}
.itrack-list-notice p{ margin: 0; }
.itrack-period-selector{ position: relative; }
.itrack-period-selector > summary{ list-style: none; cursor: pointer; }
.itrack-period-selector > summary::-webkit-details-marker{ display: none; }
.itrack-period-selector__menu{
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  margin-block-start: var(--space-1);
  padding: var(--space-2);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: 0 12px 30px color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.itrack-period-selector__menu .item{
  /* A dropdown entry is a control, and it was 174x31 at 390 — a 23 px line plus 4/4 padding, the
     `below44` finding on all four ticket-list routes. The floor is the touch token; the line is
     centred inside it rather than padded out, so the row grows to 44 with no other change. The menu
     itself grows 323 -> 458 px tall and still ends at 725 px in a 390x900 viewport, with the
     document's width (and therefore horizontal scroll) untouched. */
  display: flex;
  align-items: center;
  min-height: var(--control-h-touch);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-control);
  color: var(--color-ink);
  text-decoration: none;
}
.itrack-period-selector__menu .item:hover,
.itrack-period-selector__menu .item.active{
  background: var(--color-surface-muted);
}
.itrack-date-filter{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.itrack-ticket-tested--passed{ color: var(--color-success, #157347); }
.itrack-ticket-tested--failed{ color: var(--color-danger, #b02a37); }
.itrack-ticket-milestones,
.itrack-ticket-released{ display: grid; gap: 2px; }
.itrack-ticket-milestone{ display: block; }

/* Draft/starred comment lists and the testing split share the server-rendered tab panes. */
.itrack-comment-list{ display: grid; gap: var(--space-3); }
.itrack-comment-card{
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
}
.itrack-comment-card__head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin-block-end: var(--space-1);
}
.itrack-comment-card__head > a{ font-weight: 600; }
.itrack-comment-card__meta{ margin: 0 0 var(--space-2); color: var(--color-ink-muted); }
.itrack-comment-card__facts{
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px var(--space-2);
  margin: 0 0 var(--space-2);
}
.itrack-comment-card__facts dt{ font-weight: 600; }
.itrack-comment-card__facts dd{ margin: 0; }
.itrack-comment-card__body{ overflow-wrap: anywhere; }
.itrack-comment-card__attachments{ margin: var(--space-2) 0; padding-inline-start: var(--space-4); }
.itrack-comment-card__attachment-date{ margin-inline-start: var(--space-1); color: var(--color-ink-muted); }
.itrack-comment-card__actions{ display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }


/* ═══ Wide card tables stack to 768, iTrack 6's responsive breakpoint ══════════════════════════
   The shared `.eca-table--cards` rendering is a `max-width: 639.98px` block in `ui-system.css`;
   from 640 to 768 the library instead keeps the table and forces `min-width: 40rem` plus
   `white-space: nowrap` on every data cell. An eight-column milestone table therefore stayed a
   table in a 619 px box: Type printed over Created/Scheduled and "Completed" printed over the
   dates (measured at 700). iTrack 6 stacks its responsive tables at 768.

   This repeats ONLY the card rendering, and only for the wide (5+ column) card tables, in the one
   missing band. It does not clash with the library's 640 rule:
     · the ranges are adjacent — the library stops at 639.98 and this starts at 640 — so the two
       blocks never both apply;
     · below 640 the library's block still owns the card, and this file loads after it, so the few
       declarations repeated here are identical rather than a competing design;
     · the overrides for the 640–768 squeeze (`min-width` and the forced `nowrap`) name the same
       `.table-scroll > table` shape the library does with one extra class, so they are the later
       winner of two `!important` declarations instead of a specificity fight.
   Key/value card tables (People/Dates, the user-story detail, the related-ticket list) have fewer
   than five columns and stay tables in this band — they are not the tables that overprint. */
@media (min-width: 640px) and (max-width: 768px) {
  .table-scroll:has(> table.eca-table--cards > thead > tr > th:nth-child(5)){ overflow-x: visible; }
  .table-scroll > table.eca-table--cards:has(> thead > tr > th:nth-child(5)){ min-width: 0 !important; width: 100% !important; }
  .table-scroll > table.eca-table--cards:has(> thead > tr > th:nth-child(5)) th,
  .table-scroll > table.eca-table--cards:has(> thead > tr > th:nth-child(5)) td,
  .table-scroll > table.eca-table--cards:has(> thead > tr > th:nth-child(5)) td:not([colspan]):not([data-wrap]){
    white-space: normal !important;
  }
  /* A card's first cell is its title, not a 1%-wide table column. Left in place, `.collapsing`
     squeezed the ticket number to 6 px and painted its 44–52 px content past the card edge. */
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td.collapsing{ width: auto !important; min-width: 0; }

  .eca-table--cards:has(> thead > tr > th:nth-child(5)){
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 0;
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > thead{ display: none; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody{ display: block; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr{
    display: block;
    margin: 0 0 var(--space-2);
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border) solid var(--color-border);
    border-radius: var(--radius-box);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr:last-child{ margin-bottom: 0; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:first-child{
    padding: 0 0 var(--space-2);
    font-size: var(--text-base);
    font-weight: 650;
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td{
    display: block;
    padding: var(--space-2) 0;
    border: 0;
    text-align: start;
    overflow-wrap: break-word;
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td + td{
    border-top: var(--border) solid var(--color-border);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:not(:first-child){
    display: grid;
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    gap: var(--space-2);
    align-items: baseline;
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td::before{
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    font-weight: 650;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:first-child::before{ display: none; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:last-child{
    display: block;
    padding-top: var(--space-2);
    border-top: var(--border) solid var(--color-border);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:last-child::before{ margin-bottom: var(--space-1); }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) > tbody > tr > td:empty{ display: none; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td > .eca-badge,
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td > .eca-person,
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td > .eca-empty__art{ justify-self: start; }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td a,
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td button{
    display: inline-flex;
    align-items: center;
    min-height: var(--control-h-touch);
    min-width: var(--control-h-touch);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td .eca-btn,
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) td .button{ min-height: var(--control-h-touch); }
}

/* The app's own card refinements for the same band. The ≤639.98 block below already owns these at
   390; repeating them here is what makes the 640–768 card the same card, not a second design. Each
   selector is limited to the 5+ column tables the block above stack, so the key/value tables keep
   their desktop table shape. */
@media (min-width: 640px) and (max-width: 768px) {
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td,
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td:nth-child(2),
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td:nth-child(3),
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td:nth-child(4){
    white-space: normal;
    max-width: none;
  }
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td.collapsing{ width: auto; }
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) .eca-actions{
    flex-wrap: wrap;
    gap: var(--gap-actions);
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td a{
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td > div{
    min-width: 0;
    max-width: 100%;
  }
  /* The 640–899 table rule clamps the Subject link to two lines (a table cell with a fixed
     column budget). In the card band the subject is the card's body again: no clamp, no
     `-webkit-box`, no 24 rem cap. */
  .itrack-ticket-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td.itrack-ticket-subject{
    min-width: 0;
    max-width: none;
  }
  .itrack-ticket-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) tbody td.itrack-ticket-subject > a{
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .itrack-milestone-table.eca-table--cards:has(> thead > tr > th:nth-child(5)) .eca-load-more__label{ display: block; }
}

@media (max-width: 639.98px) {
  /* Scalar facts become a two-up label/value grid; subject is the card title and actions the footer. */
  .itrack-ticket-table.eca-table--cards > tbody > tr{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-3);
    row-gap: 0;
    padding: var(--space-2);
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td{
    display: block;
    padding: 1px 0;
    border-top: 0;
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td::before{
    margin-bottom: 0;
    font-size: 10px;
    line-height: var(--leading-tight);
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:first-child,
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:nth-child(2),
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:last-child{
    grid-column: 1 / -1;
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:first-child{
    padding-bottom: 0;
    font-size: var(--text-base);
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:nth-child(2){
    padding-top: 0;
    padding-bottom: 1px;
  }
  /* Keep every link/action at the 44px touch target; the card height is reclaimed from the scalar
     row padding instead (2px -> 1px block padding across the card facts). */
  .itrack-ticket-table.eca-table--cards > tbody > tr > td:last-child{
    display: block;
    margin-top: 0;
    padding-top: var(--space-1);
    border-top: var(--border) solid var(--color-border);
  }
  .itrack-ticket-table .itrack-ticket-actions__menu{
    position: static;
    inset-inline-end: auto;
    min-width: 0;
    margin-block-start: var(--space-2);
  }
  /* The creator is an avatar + name inside an inline-flex anchor. The anchor must be bounded by
     the card cell, and the name must be allowed to shrink, otherwise a long display name paints
     past the card border (measured +22 px for "Lindartono, Yehezkiel" at 390). The shared
     `.eca-person__name` already ellipsizes once it can shrink. */
  .itrack-ticket-table.eca-table--cards > tbody > tr > td[data-label="Creator"] > a{
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td[data-label="Creator"] .eca-person{
    max-width: 100%;
    min-width: 0;
  }
  .itrack-ticket-table.eca-table--cards > tbody > tr > td[data-label="Creator"] .eca-person__name{
    flex: 1 1 auto;
    min-width: 0;
  }
  /* The Details card owns its rows; the scroll wrapper exists for the desktop table audit, but at
     phone width the card layout must not sit inside a locked scroll box. */
  .table-scroll:has(> .itrack-card-scroll),
  .itrack-card-scroll{ overflow-x: visible; }

  /* The milestone sheet's desktop width budget (`nowrap`, nth-child max-widths, `width:1%` on the
     action column) is for the table, not the card. Left in place it clips long project/name values
     inside a 390 px card. Every cell wraps and the card's own grid owns the width. */
  .itrack-milestone-table.eca-table--cards tbody td,
  .itrack-milestone-table.eca-table--cards tbody td:nth-child(2),
  .itrack-milestone-table.eca-table--cards tbody td:nth-child(3),
  .itrack-milestone-table.eca-table--cards tbody td:nth-child(4){
    white-space: normal;
    max-width: none;
  }
  .itrack-milestone-table.eca-table--cards tbody td.collapsing{ width: auto; }
  .itrack-milestone-table.eca-table--cards .eca-actions{
    flex-wrap: wrap;
    gap: var(--gap-actions);
  }
  /* A long ticket subject / log line is an `<a>` the design system makes `inline-flex` for the
     touch floor. Inline-flex is shrink-to-fit: without a max-width it paints past the card's value
     column (measured +90 px on `/devWorkSummary/51`). Bound it to the card and let the token break. */
  .eca-table--cards tbody td a{
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .eca-table--cards tbody td > div{
    min-width: 0;
    max-width: 100%;
  }
  .itrack-milestone-table.eca-table--cards .eca-load-more__label{ display: block; }

  /* People/Dates are key-value rows: at table widths the label column is 1% + nowrap, which a card
     cannot use (the label would clip). The card's own label/value grid owns the width. */
  .itrack-people-table.eca-table--cards tbody td.collapsing,
  .eca-table--cards tbody td.collapsing{
    width: auto;
    white-space: normal !important;
  }
}

/* ═══ Compact stats strip at phone widths ═════════════════════════════════════════════════════ */
@media (max-width: 639.98px) {
  .eaw-page .eca-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eaw-page .eca-stats__item{
    padding: var(--space-2);
    min-height: var(--control-h-touch);
    justify-content: center;
  }
  .eaw-page .eca-stats__item > a,
  .eaw-page .eca-stats__item:not(:has(> a)){
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: var(--space-2);
    min-height: var(--control-h-touch);
  }
  .eaw-page .eca-stats__value{ font-size: var(--text-lg); }
  .eaw-page .eca-stats__label{
    min-height: 0;
    line-height: var(--leading-snug);
  }
}

/* ═══ Multiselect selected chips (itrack7.js) ═══════════════════════════════════════════════ */
.eca-multiselect > summary{
  flex-wrap: wrap;
  row-gap: var(--space-1);
  height: auto;
  min-height: var(--control-h-touch);
  align-items: center;
}
.eca-multiselect__caret{ flex: 0 0 auto; }
.itrack-chips{
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
}
.itrack-chip{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 var(--space-2);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itrack-visually-hidden{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ═══ Footer: a colophon, not a second navigation ═════════════════════════════════════════════
   The footer's structure (`.eca-page-footer__row`) is the design system's. What it carries is the
   product, the deployment and the build — never a destination: every route named here was also in
   the header nav, so the footer's row competed with the build for one line and made "where am I"
   answerable in two places (X124). The environment is iTrack's own addition: the same UI is served
   from test and production, and reading the wrong one is the expensive mistake in an operations
   tool. It is a chip, not a word in a sentence, and it uses the design system's warning pair —
   `--color-warning` is a FILL that measures 3.4:1 as text, so the ink is `--color-warning-ink`
   (6.5:1). */
.itrack-footer__identity{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-4);
  min-width: 0;
}.itrack-footer__env{
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 1px var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
  color: var(--color-warning-ink);
  background: var(--color-warning-soft);
  border: var(--border) solid color-mix(in oklab, var(--color-warning) 40%, var(--color-border));
}
/* Production is not a warning: it is the normal state, and it should read as such. */
.itrack-footer__env--prod{
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
}
.itrack-footer__name{
  font-weight: 650;
  color: var(--color-ink);
  white-space: nowrap;
}
/* The build line: version · commit · attribution. It wraps as a unit rather than pushing the links
   off the row on a narrow screen. */
.itrack-footer__meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

/* ═══ The sign-in surface ═══════════════════════════════════════════════════════════════════════
   `/login` is the only full-bleed page in the app, and it is the page every user meets before they
   have any context. The shared component (`elementum-eca-ui/stylesheets/eca-login.css`)
   owns the structure — box, media layer, scrim, glass card, fields, actions, links, alerts, the
   narrow-viewport block, reduced motion, print. What is below is the delta iTrack needs on top of it,
   under app-owned names (`itrack-login-*`), so no shared selector is redefined for every future
   consumer of that component.

   Everything here is a measured fix for a defect the user reported or the audit found, in the order
   they appear on the page:

     1. the media stopped at the shell's footer edge — a white band under a dark hero at every width
        (measured 823 of 900 at 1440, 695 of 844 at 390);
     2. the wordmark, the deployment badge and the form were all the same weight, and the badge sat
        directly above the first field's label, reading as a section heading;
     3. two saturated buttons ("Sign in", Singpass red) plus two boxed links — four equal choices
        where a sign-in form has one;
     4. the card ran to 12px of the viewport edge at 390, and stacked both sign-in routes;
     5. the clip played (and downloaded) under `prefers-reduced-motion`, because `display:none` does
        not pause a video.

   The page carries the shared `eca-login*` classes as well: they are the structure, these are the
   decisions. When a shared rule lands for one of these, delete the line here — never keep both.
   ───────────────────────────────────────────────────────────────────────────────────────────── */

/* ── 1. The media IS the page ───────────────────────────────────────────────────────────────────
   `position: fixed` makes the still/clip the viewport's rather than the login box's, so the footage
   reaches the bottom edge behind the shell footer. The footer keeps its place in the flow and its
   left content edge (the shell audit measures both on /login); it stops being a strip of paper.
   `:has()` is how the surface is identified without a body class, and it is already how the shared
   sheet scopes the shell stretch for this page. */
body:has(.eca-login) .eca-login-media,
body:has(.eca-login) .eca-login::after{
  position: fixed;
}
/* The page behind the picture is dark: a browser that paints before the still arrives must not
   flash white under a dark card. */
body:has(.eca-login){
  background: #0b1220;
}
body:has(.eca-login) > .eca-page-footer{
  /* PAINT ORDER, not decoration: `.eca-login` is `position: relative`, so its (now fixed) media
     paints in the positioned layer — ABOVE a static footer that follows it in the DOM. Without
     this line the caption is behind the footage and the page looks like it has no footer at all
     (measured: text present in the DOM at x=32, 22px tall, invisible on screen). */
  position: relative;
  z-index: 4;
  /* A fade under the caption, not a paper strip: the clips are random, and a white sky frame at the
     bottom of the viewport would otherwise put 13px ink on a bright field. */
  background: linear-gradient(0deg, rgb(4 10 20 / .62) 0%, rgb(4 10 20 / .34) 65%, rgb(4 10 20 / 0) 100%);
  border-top: 1px solid rgb(255 255 255 / .14);
  color: rgb(236 242 249 / .86);
}
body:has(.eca-login) > .eca-page-footer a{ color: rgb(236 242 249 / .86); }
body:has(.eca-login) > .eca-page-footer a:hover{ color: #fff; }
body:has(.eca-login) .itrack-footer__name{ color: rgb(255 255 255 / .92); }
body:has(.eca-login) .itrack-footer__meta{ color: rgb(233 238 246 / .62); }
body:has(.eca-login) .itrack-footer__env{
  color: #fde68a;
  background: rgb(180 130 11 / .22);
  border-color: rgb(253 230 138 / .35);
}
/* On the sign-in page the three footer destinations are dead ends: every one of them is behind the
   auth check, so clicking them lands on this same page. The line that survives says which product
   and which build — which is what a reader of a sign-in page needs, and all the preview's caption
   said. */
body:has(.eca-login) > .eca-page-footer .eca-page-footer__links a{ display: none; }

/* ── 2. Wordmark + deployment badge on one baseline ──────────────────────────────────────────── */
.itrack-login-card{
  width: min(27rem, 100%);
  padding: var(--space-6) var(--space-5) var(--space-5);
  border-radius: 16px;
  /* The footage is RANDOM, so the card has to hold its ink against any frame — including a
     sunflower field at full brightness. The shared tint (`rgb(10 16 28 / .62)` + `saturate(140%)`)
     let a saturated clip turn the panel olive: measured over 10 random clips the worst label ink
     fell to 5.03:1, and the brightest clips looked muddy rather than glassy. A denser tint, a
     gentler saturation lift and a small brightness cut keep the picture visible without letting it
     colour the text. Measured worst case after: see docs/changelog.md. */
  background: rgb(8 13 22 / .72);
  backdrop-filter: blur(18px) saturate(115%) brightness(.94);
  -webkit-backdrop-filter: blur(18px) saturate(115%) brightness(.94);
}
.itrack-login-brandline{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-2);
}
.itrack-login-brandline .eca-login-brand{
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.1;
}
.itrack-login-card .eca-login-tagline{
  margin: 0 0 var(--space-5);
  font-size: .95rem;
  /* A tagline is prose: keep it off the last line's ragged edge on a narrow card. */
  text-wrap: pretty;
}
/* The deployment badge belongs to the wordmark, not to the form. Amber for a test deployment and
   quiet for production, exactly like the footer's chip — the expensive mistake in an operations tool
   is reading the test UI as production, and two chips on one page that disagree would be worse than
   none. The ink is LIGHT (#fde68a, ~11:1 on the card): the design system's `--color-warning-ink`
   (#7a5606) is the text-safe pair for a WHITE surface and measures ~1.9:1 here. */
.itrack-login-env{
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.5;
}
.itrack-login-env--prod{
  color: rgb(233 238 246 / .82);
  background: rgb(255 255 255 / .1);
  border-color: rgb(255 255 255 / .22);
}

/* ── 3. Fields, one primary, one secondary, recovery as links ───────────────────────────────── */
/* A field's label names the control: uppercase and quiet, so the card reads as three ranks
   (wordmark, what the product is for, the fields) instead of four lines of the same weight. The
   string is NOT rewritten — `text-transform` keeps the authenticator's own label in the DOM and in
   the accessible name. */
.itrack-login-card .eca-field > label{
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9fb2c6;
}
/* ONE primary. It reads the THEME rather than a hardcoded mint (the shared rule is `#34d399`, which
   is no app's accent): `--color-primary` is #0f6b5c, 6.41:1 with white ink, and a re-themed
   deployment gets a sign-in button that belongs to it. */
.itrack-login-card .eca-btn.eca-login-submit{
  flex: 1 1 8rem;
  color: var(--color-primary-content);
  background: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}
.itrack-login-card .eca-btn.eca-login-submit:hover{
  background: color-mix(in oklab, var(--color-primary) 86%, #fff);
  border-color: color-mix(in oklab, var(--color-primary) 86%, #fff);
}
/* The alternative route is a SECONDARY: the same 44px control as the primary, on the card's own ink,
   unmistakably reachable and unmistakably not the main action. Singpass red made it a second primary
   (two saturated buttons compete; the user reported the page as four equal choices). */
.itrack-login-card .eca-btn.eca-login-provider{
  color: #f1f6fb;
  background: rgb(255 255 255 / .08);
  border-color: rgb(255 255 255 / .26);
  font-weight: 600;
}
.itrack-login-card .eca-btn.eca-login-provider:hover{
  background: rgb(255 255 255 / .16);
  border-color: rgb(255 255 255 / .4);
}
/* A rule above the recovery links: they are the form's aftermath, not part of its argument. */
.itrack-login-card .eca-login-links{
  margin-top: var(--space-4);
  padding-top: var(--space-1);
  border-top: 1px solid rgb(255 255 255 / .12);
}

/* ── 4. Narrow viewports ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* A card never touches a viewport edge: 16px on every side at 390 (12px read as "content that ran
     off the page"). */
  body:has(.eca-login) .eca-login{ padding: var(--space-4); }
  .itrack-login-card{
    padding: var(--space-5) var(--space-4) var(--space-4);
    border-radius: 14px;
  }
  .itrack-login-brandline .eca-login-brand{ font-size: 1.6rem; }
  /* The two routes keep sharing one row — they are 44px and size to their labels, and stacking them
     added 52px of card height on the screen with the least of it. The shared sheet's ≤480 block
     stacks them (`flex: 1 1 100%`); they wrap only when a 320px viewport cannot hold both. */
  .itrack-login-card .eca-btn.eca-login-submit{ flex: 1 1 7rem; }
  .itrack-login-card .eca-btn.eca-login-provider{ flex: 0 1 auto; }
  /* Two recovery links, side by side, each allowed to wrap its own label: they are one rank of the
     page (things you do INSTEAD of signing in), so they share a row instead of taking two. */
  .itrack-login-card .eca-login-links{ justify-content: space-between; gap: var(--space-1) var(--space-3); }
  .itrack-login-card .eca-login-links a{ flex: 1 1 8rem; min-width: 0; }
}

/* ── Charts (shared agent-web ECharts stack) ─────────────────────────────────────────────────────
   `hx-echarts.js` measures its container at init, so the canvas target must have a real height.
   The view supplies one inline (it varies with the number of categories/developers) and these rules
   keep the block full-width and give the data table a deliberate fallback/export treatment. */
.itrack-chart{
  width: 100%;
  min-height: 320px;
  margin-block: var(--space-2) var(--space-4);
}
.itrack-chart + .itrack-chart{ margin-block-start: var(--space-5); }
.itrack-chart-fallback{
  margin-block-start: var(--space-4);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--color-line, #e1e5e0);
}
.itrack-chart-fallback__summary{
  display: flex;
  align-items: center;
  min-height: var(--control-h-touch);
  cursor: pointer;
  font-weight: 600;
}

/* ═══ Project Overview: picker, KPI strip, chart grid, progress and grouped task tables ═══════ */
.itrack-project-picker{
  max-width: 34rem;
  margin-block: var(--space-3);
}
.itrack-project-picker .eca-select{ width: 100%; }
/* A single select has no checkbox to tick. The shared sheet reserves the mark cell and draws a
   check on the selected row for every picker (`ui-system.css:2168`); here that glyph is removed
   for non-multi pickers. The cell stays reserved so labels do not shift, and the selected row
   keeps its `[aria-selected="true"]` colour/weight plus the `--active` pointer highlight. Multi
   selects keep their real checkbox mark untouched. */
.eca-choice-picker:not(.eca-choice-picker--multi) .eca-choice-picker__option .eca-choice-picker__mark::after{
  content: none;
  opacity: 0;
}
/* The summary strip has five tiles. The shared sheet's 1200 px rule is six tracks
   (`ui-system.css:1611`), which left a whole empty sixth cell beside AVG CYCLE TIME — measured
   201.8 px + 12 px gap at 1440. The override is count-aware and app-scoped: a strip with a fifth
   child gets one track per tile, so the one-tile Man Effort strip keeps its own width. Below
   640 px the shared base (and the phone rule above) still gives the 2-per-row layout. */
@media (min-width: 640px){
  .itrack-project-overview .itrack-dashboard-summary > .eca-stats:has(> :nth-child(5)){
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.itrack-dashboard-summary{ margin-block-start: var(--space-4); }
/* Four charts are a 2 × 2 at desktop. `auto-fit` with a 20 rem floor put three 413 px cards on
   the first row at 1440 and left the fourth alone (3 + 1), so the grid is stated as one column
   below the phone breakpoint and two above it. The breakpoint is the same 640 px the stats strip
   and the rest of this sheet use for "phone". */
.itrack-chart-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin-block-start: var(--space-4);
}
@media (min-width: 640px){
  .itrack-chart-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.itrack-chart-card{
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
}
.itrack-chart-card .itrack-chart{ margin-block: 0; }
.itrack-progress{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 8rem;
}
.itrack-progress__track{
  flex: 1 1 auto;
  height: 8px;
  overflow: hidden;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-pill);
}
.itrack-progress__bar{
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
}
/* iTrack 6's `ui indicating progress` bands (Fomantic's progress.variables). The palette is the
   reference's, not a new one: the same percent ranges, so a 30% bar is the same orange a 30% bar
   was on the legacy dashboard. 100% is the `success` band. */
.itrack-progress__bar--low{ background:#D95C5C; }
.itrack-progress__bar--thirty{ background:#EFBC72; }
.itrack-progress__bar--forty{ background:#E6BB48; }
.itrack-progress__bar--sixty{ background:#DDC928; }
.itrack-progress__bar--seventy{ background:#B4D95C; }
.itrack-progress__bar--ninety{ background:#66DA81; }
.itrack-progress__bar--done{ background:#21BA45; }
.itrack-progress__label{
  color: var(--color-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.itrack-dashboard-tasks,
.itrack-dashboard-requirements{ margin-block-start: var(--space-4); }
/* A module section is a grid item. With the default `min-inline-size: auto` its widest table
 * pushed the whole card past its container at 1440 (measured 1404 px vs the 1271 px toolbar),
 * which clipped the head's right edge — where the progress now sits. Zero lets the card track
 * the container and the tables wrap inside it; the document had no page-level scroll before or
 * after, so this only ends the clipping. */
.itrack-dashboard-tasks > [data-filter-section]{ min-inline-size: 0; }
/* The module's average completion sits in the module HEADING, on the title's line, right-aligned
 * — iTrack 6 floats its `progress-section` at the top-right of the segment. The bar itself is the
 * shared progress component, which owns the percent bands, so the row bars and the module bar
 * cannot drift. `margin-inline-start: auto` keeps the progress at the right edge after the head
 * wraps at 390; `align-items: baseline` on the head (the design system's own value) puts the `%`
 * on the title's baseline rather than on a separate line. */
.itrack-module-head{ align-items: baseline; }
.itrack-module-head__text{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  min-inline-size: 0;
}
.itrack-module-progress{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-block-end: 0;
  margin-inline-start: auto;
}
.itrack-module-progress .itrack-progress{ max-width: 16rem; }
/* The Tasks tab nests two of these: the outer list is the module groups, the inner list is the
   submodule tables. Neither had a vertical rhythm of its own (the group's `.eca-section` is an
   only child, so its `margin-block-end` was reset by `.eca-section:last-child`, and the inner
   `.itrack-task-group` only contributed a margin after the last table). One grid gap, read from
   the design system's section token, separates both levels with the same 24 px. */
.itrack-dashboard-tasks,
.itrack-dashboard-effort{
  display: grid;
  gap: var(--gap-section);
}
/* The stats strip's own 12 px footer margin would be added to the grid gap; the gap is the single
   source of the rhythm on the Man Effort tab. */
.itrack-dashboard-effort > .eca-stats{ margin-block-end: 0; }
.itrack-task-group{ margin-block-end: 0; }
/* Inside one submodule the categories (User Stories / Bug / Enhancement …) are separate
   `.itrack-task-table` sections. They had no space at all between them (measured 0 px at 390,
   768 and 1440); the same section token separates them as the module and submodule groups. The
   heading keeps its own tighter 8 px lead-in, so the first table is not pushed away from its
   title. */
.itrack-task-group > .itrack-task-table + .itrack-task-table{ margin-block-start: var(--gap-section); }
.itrack-task-group__title{
  margin-block: var(--space-3) var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.itrack-kpi-link{ text-decoration: none; }
.itrack-kpi-link:hover .eca-stats__value,
.itrack-kpi-link:focus-visible .eca-stats__value{ text-decoration: underline; }

/* ═══ Dashboard KPI anchors ════════════════════════════════════════════════════════════════════
   Only the two pages that use the compact masthead promote their stat strip. The shared strip
   everywhere else keeps its density; here the tiles get a consistent height and a value that holds
   its rank at 390 instead of shrinking to the generic phone size. The edge is neutral: this unit
   removed the tinted outline and the primary top rule. */
.itrack-dashboard-page .eca-stats__item,
.itrack-project-overview .eca-stats__item{
  gap: var(--space-1);
  min-height: calc(var(--space-4) * 4.5);
  padding: var(--space-4);
  background: color-mix(in oklab, var(--color-primary) 4%, var(--color-surface));
}
.itrack-dashboard-page .eca-stats__value,
.itrack-project-overview .eca-stats__value{
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.itrack-dashboard-page .eca-stats__label,
.itrack-project-overview .eca-stats__label{
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
  min-height: 2lh;
}
@media (max-width: 639.98px){
  .itrack-dashboard-page .eca-stats__item,
  .itrack-project-overview .eca-stats__item{
    min-height: calc(var(--space-4) * 3.75);
    padding: var(--space-3);
    justify-content: flex-start;
  }
  .itrack-dashboard-page .eca-stats__value,
  .itrack-project-overview .eca-stats__value{
    font-size: var(--text-2xl);
  }
}
.itrack-chart-empty{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}
.itrack-chart-empty__title{
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  text-align: center;
}
.itrack-chart-empty .eca-hint{ text-align: center; }
/* Long ticket subjects can contain an unbroken URL/token. The card table must wrap it instead of
   letting the row widen the document (measured on a 390 px viewport with a 608 px subject link). */
.itrack-ticket-table td,
.itrack-ticket-table td a{
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* ═══ Milestone type and release-approval emphasis ════════════════════════════════════════════
   The badge always carries the word; these modifiers repeat the meaning with the design system's
   semantic tokens. Production/Test/Maintenance/Hotfix are the four milestone kinds the reference
   distinguishes, and release approval reads Pending (amber), Not Approved (neutral/strong) or
   Approved (green). Applied by both `EcaMilestoneListPage` and `AbstractMilestoneSummaryPage`. */
.itrack-badge--type{ font-weight: 700; letter-spacing: .02em; }
.itrack-badge--type.is-production{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 24%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 62%, var(--color-border));
}
.itrack-badge--type.is-test{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 22%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 56%, var(--color-border));
}
.itrack-badge--type.is-maintenance{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 52%, var(--color-border));
}
.itrack-badge--type.is-hotfix{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 16%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 72%, var(--color-border));
}
.itrack-badge--type.is-other{
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border-color: var(--color-border-strong);
}
.itrack-badge--release{ font-weight: 700; white-space: nowrap; }
.itrack-badge--release.is-approved{
  color: var(--color-success-ink);
  background: color-mix(in oklab, var(--color-success) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-success) 45%, var(--color-border));
}
.itrack-badge--release.is-pending{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.itrack-badge--release.is-not-approved{
  color: var(--color-ink);
  background: var(--color-surface-sunken);
  border-color: var(--color-border-strong);
}
.itrack-badge--release.is-rejected{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-border));
}

/* The native `<select multiple>` is the scripting-off fallback of the project/category picker. A
   select with 150 options and `overflow: visible` paints (and hit-tests) its options outside its
   own 298 px box, over the table below — measured as an `<option>` intercepting a header sort link
   on `/devWorkSummary/51` with JavaScript off. Clip and scroll the control itself. */
.eca-choice-picker > select[multiple],
.eca-search-multiselect__panel > select[multiple]{
  overflow-y: auto;
  max-height: 16rem;
}

/* ═══ Milestone tables fit a 1440 desktop ══════════════════════════════════════════════════════
   The Present list measured ~1366 px inside a ~1327 px card and clipped its last action. The table
   keeps every column; compact padding/typography and wrapped headers are what buy the width back.
   Dates, the ticket count, release approval and the actions stay on one line; project, name and
   creator may wrap. The shared `.table-scroll` still owns narrow screens (horizontal scroll). */
.itrack-milestone-table{
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
}
.itrack-milestone-table thead th,
.itrack-milestone-table tbody td{
  padding: var(--space-1) var(--space-2);
  vertical-align: middle;
}
.itrack-milestone-table thead th{
  line-height: 1.15;
  letter-spacing: .02em;
  white-space: normal;
}
.itrack-milestone-table tbody td{ white-space: nowrap; }
.itrack-milestone-table tbody td:nth-child(2),
.itrack-milestone-table tbody td:nth-child(3),
.itrack-milestone-table tbody td:nth-child(4){ white-space: normal; }
.itrack-milestone-table tbody td:nth-child(2){ max-width: 8rem; }
.itrack-milestone-table tbody td:nth-child(3){ max-width: 15rem; }
.itrack-milestone-table tbody td:nth-child(4){ max-width: 8rem; }
.itrack-milestone-table tbody td.collapsing{ width: 1%; }
.itrack-milestone-table .eca-actions{
  flex-wrap: nowrap;
  /* `--gap-actions` (12), not `--space-1` (4): the dense row's buttons were 4 px apart, which the
     user named as "buttons joined together" and `action-gap.mjs` measures at a 8 px floor. The
     shared action rhythm is the only right number for an action row — density is bought from the
     cell padding above, never from the gap. */
  gap: var(--gap-actions);
  margin: 0;
  padding: 0;
  border: 0;
}
.itrack-milestone-table tbody td .eca-btn{ padding-inline: var(--space-2); }

/* ═══ Project Summary: sticky matrix on desktop, project cards on phones ══════════════════════
   The 20-column state matrix measured ~2893 px because every header was forced onto one line. The
   humanised headers now wrap; numeric cells and the two action columns stay compact and nowrap.
   All state counts, Work Summary Reports and Export Reports are still rendered. At >= 640 the
   Project column and the action columns are sticky inside `.table-scroll`, so a 1440 desktop sees
   the project name and its actions without dragging the state columns across the viewport. */
.itrack-project-summary{
  /* Measured at 12 px / 650: "Work Summary Reports" is ~142 px and "Export Reports" ~90 px.
     These are the sticky column widths. The penultimate column offsets by the last column's
     width only — that width already covers the cell's inline padding in the live table layout,
     so the two sticky edges meet exactly with no gap. */
  --itrack-project-summary-summary-w: 10.25rem;
  --itrack-project-summary-export-w: 7rem;
  width: 100%;
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
}
.itrack-project-summary thead th{
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: end;
  vertical-align: bottom;
}
.itrack-project-summary thead th:first-child{ text-align: start; }
.itrack-project-summary thead th.number{ max-width: 6.5rem; }
/* ── The `th` column budget holds at EVERY width, and this is the cut that made it so ────────
   `max-width: 6.5rem` is what keeps the twenty numeric columns compact while the header wraps —
   every label fits a box it may break inside.

   Until 0.2.27 it could not hold at <=768. The shared narrow-table block in `ui-alias.css` forced
   `white-space: nowrap !important` on any `.table-scroll > table` with 4+ columns — on `th` as well
   as `td`, and with `!important`, so no app sheet could outrank it. The label was one unbreakable
   line and a 104 px box clipped it: measured at 768 on a fresh JVM against 0.2.25 **with the budget
   restored** (the override deleted, nothing else changed), "Pending User Story Acceptance" is
   clientWidth 104 / scrollWidth 197 and five siblings clip the same way — 180, 133, 113, 132 and
   136 px of label in the same 104 px box — so with `nowrap` the labels paint over each other. That
   is the `th-clip` finding `ux-audit.mjs` reports. The escape hatch this app carried was
   `@media (max-width: 768px){ .itrack-project-summary thead th.number{ max-width: none } }`, which
   bought the label room by throwing the budget away: it measures 205/205 and `nowrap` on the same
   header, so every state column is a single 205 px line and the box grows to 2165 px.

   **0.2.27 scoped that force to `td`** — a HEADER is a label and wraps; a DATA cell is a value and
   keeps its column — so the budget now holds at every width, the header wraps inside it, and the
   override is deleted. The `!important` in the layer is still the reason an app sheet must not fight
   this: if a header clips again, the fix is the layer's `th` rule, not a third app-local override.
   This app pins `0.2.34`, the cut that carries that scoping together with 0.2.28's `fieldDomId`
   wiring and 0.2.29's exclusion of `.eca-table--cards` from the `td` force. */
.itrack-project-summary tbody td{
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  white-space: nowrap;
  text-align: end;
  vertical-align: middle;
}
.itrack-project-summary tbody td.itrack-project-summary__project{
  min-width: 10rem;
  font-weight: 600;
  text-align: start;
  white-space: normal;
}
.itrack-project-summary tbody td.collapsing{ width: 1%; }
.itrack-project-summary tbody td .eca-btn{ white-space: nowrap; }

@media (min-width: 640px) {
  /* The two sticky edges carry an opaque ground: the sticky cell paints over the state columns it
     covers. The header band keeps the shared sunken plane so it does not look cut out. */
  .itrack-project-summary thead th.itrack-project-summary__project,
  .itrack-project-summary tbody td.itrack-project-summary__project{
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--color-surface);
    box-shadow: 1px 0 0 var(--color-border),
      6px 0 8px -6px color-mix(in oklab, var(--color-ink) 22%, transparent);
  }
  .itrack-project-summary thead th.itrack-project-summary__project{
    z-index: 3;
    background: var(--color-surface-sunken);
  }
  .itrack-project-summary thead th.itrack-project-summary__action,
  .itrack-project-summary tbody td.itrack-project-summary__action{
    position: sticky;
    z-index: 2;
    background: var(--color-surface);
  }
  .itrack-project-summary thead th.itrack-project-summary__action{
    z-index: 3;
    background: var(--color-surface-sunken);
    /* The sticky action columns are measured for the full label; keeping the header on one line
       means the label cannot spill under the neighbouring sticky cell and read truncated. */
    white-space: nowrap;
  }
  .itrack-project-summary .itrack-project-summary__action--summary{
    width: var(--itrack-project-summary-summary-w);
    min-width: var(--itrack-project-summary-summary-w);
  }
  .itrack-project-summary .itrack-project-summary__action--export{
    width: var(--itrack-project-summary-export-w);
    min-width: var(--itrack-project-summary-export-w);
  }
  /* Anchor the last action column and offset the one before it by its fixed width, so the two
     never overlap however far the middle state columns are scrolled. */
  .itrack-project-summary .itrack-project-summary__action--last{
    right: 0;
    box-shadow: -1px 0 0 var(--color-border),
      -6px 0 8px -6px color-mix(in oklab, var(--color-ink) 22%, transparent);
  }
  .itrack-project-summary .itrack-project-summary__action--penultimate{
    right: var(--itrack-project-summary-export-w);
  }
  /* Keep row hover coherent across the pinned cells. */
  .itrack-project-summary tbody tr:hover td.itrack-project-summary__project,
  .itrack-project-summary tbody tr:hover td.itrack-project-summary__action{
    background: var(--color-surface-sunken);
  }
}

/* Below 640 the table is hidden outright and each project becomes a card. The state matrix is a
   native <details>, so the phone never has to scroll sideways to read a project. */
.itrack-project-cards{ display: none; }
@media (max-width: 639.98px) {
  .itrack-project-summary-table{ display: none; }
  .itrack-project-cards{
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
  .itrack-project-card{
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border) solid var(--color-border);
    border-radius: var(--radius-box);
  }
  .itrack-project-card__heading{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .itrack-project-card__name{
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: var(--text-base);
    line-height: var(--leading-snug);
  }
  .itrack-project-card__name a{
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    /* The touch floor is BOTH axes. `min-height` alone left the link as tall as the row and only as
       wide as the word: on /projects/wsreport/11 at 390 the shortest project names measured 38x44
       ("Itrack") and 42x44 ("Nexus"), the two `under44` findings the audit reported. The shared
       `.eca-table--cards td a` already sets both axes; this hand-written card markup had only the
       height. Same token as the height, so the link is one square target. */
    min-height: var(--control-h-touch);
    min-width: var(--control-h-touch);
    color: var(--color-link);
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  .itrack-project-card__name a:hover{ text-decoration: underline; }
  .itrack-project-card__total{
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    font-size: var(--text-xs);
    line-height: var(--leading-snug);
    color: var(--color-muted);
  }
  .itrack-project-card__total-value{
    font-size: var(--text-base);
    color: var(--color-ink);
    font-variant-numeric: tabular-nums;
  }
  .itrack-project-card__actions{
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-block-start: var(--space-2);
  }
  .itrack-project-card__actions .eca-btn{
    flex: 1 1 auto;
    justify-content: center;
    min-height: var(--control-h-touch);
  }
  .itrack-project-card__states{
    margin-block-start: var(--space-2);
    border-top: var(--border) solid var(--color-border);
  }
  .itrack-project-card__states-summary{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: var(--control-h-touch);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .itrack-project-card__states-summary::-webkit-details-marker{ display: none; }
  .itrack-project-card__states-summary::after{
    content: "";
    width: .5rem;
    height: .5rem;
    border-inline-end: var(--border) solid currentColor;
    border-block-end: var(--border) solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--motion-fast) ease;
  }
  .itrack-project-card__states[open] > .itrack-project-card__states-summary::after{
    transform: rotate(-135deg) translateY(-2px);
  }
  .itrack-project-card__state-list{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-1) var(--space-3);
    margin: 0;
    padding-block: 0 var(--space-2);
  }
  .itrack-project-card__state-name,
  .itrack-project-card__state-count{
    margin: 0;
    font-size: var(--text-xs);
    line-height: var(--leading-snug);
  }
  .itrack-project-card__state-name{ color: var(--color-muted); }
  .itrack-project-card__state-count{
    text-align: end;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  /* The count in the breakdown is a LINK to that state's tickets, and a one-digit number is an
     8x15 target: 204 of them on /projects at 390 — 180 at 8x15 and 24 at 16x15 — were both the
     `tap<24` and the `below44` finding. The floor belongs to the box, not the glyph, and it is BOTH
     axes: `min-width` is what makes a single digit a square target (a `min-height` alone still
     measures 8 px wide, which is the mistake `.itrack-project-card__name a` above documents). Same
     token as the shared layer's card-cell rule, and `justify-content: flex-end` keeps the number
     flush with the right edge so the column reads as it did. The closed card is not a pixel taller
     — the rows live inside the "State breakdown" disclosure, so the cost falls inside the panel a
     reader chose to open. */
  .itrack-project-card__state-count a{
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: var(--control-h-touch);
    min-width: var(--control-h-touch);
  }
}

/* iTrack 6's release-notes editor scrolls its content inside a 300 px box; the toolbar stays put
   because it is a sibling of the scrolling editor. */
.itrack-release-notes-editor .trumbowyg-editor{
  max-height: 300px;
  overflow-y: auto;
}

/* The FAQ filter is an input that filters as you type; the list starts below it, not flush. */
.itrack-faq-filter{ margin-block-end: var(--space-4); }

/* ═══ FAQ /document: the create form is a disclosure, the tree owns the first screen ═════════ */
.itrack-faq-create{
  margin-block-start: var(--space-4);
  background: var(--color-surface);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
}
.itrack-faq-create__summary{
  min-height: var(--control-h-touch);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
}
.itrack-faq-create__summary:hover{ background: var(--color-surface-sunken); }
.itrack-faq-create[open] .itrack-faq-create__summary{
  border-block-end: var(--border) solid var(--color-border);
}
.itrack-faq-create > form{ padding: var(--space-4); }
@media (max-width: 639.98px){
  .itrack-faq-create > form{ padding: var(--space-3); }
}

/* ═══ Ticket-row actions on tablet/small-laptop widths ═════════════════════════════════════════
   The shared ticket table is often wider than its scroll box from 640px up. The absolute row menu
   used to escape that box and widen the document (measured 1939px at a 700px viewport). At widths
   below 1280 the menu is fixed and placed by `itrack7.js` immediately below the clicked Actions
   button, clamped inside the viewport; the table keeps its horizontal scroll. Desktop keeps the
   original absolute menu. */
@media (max-width: 1279.98px){
  .table-scroll:has(.itrack-ticket-actions[open]){ overflow: auto; }
  .itrack-ticket-actions__menu{
    position: fixed;
    inset: auto;
    z-index: 60;
    width: min(18rem, calc(100vw - 2 * var(--space-4)));
    min-width: 0;
    max-height: min(70vh, 22rem);
    overflow: auto;
    margin-block-start: 0;
  }
}

/* A one-control dashboard filter should stay one line, not occupy a full field grid. */
.itrack-filter-inline{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}
.itrack-filter-inline .eca-field{
  flex: 0 1 24rem;
  min-width: 0;
}

/* ═══ /search: compact directory toolbar and result rows ═══════════════════════════════════════
   The directory reference is one dense row per result: search controls and their meta line sit in
   one compact card, results begin with a top pager, and each ticket is a scannable title + match
   context + one metadata row. The old 390 px "Search" section and 400–650 px entity cards put the
   first result below the fold on a 1440 screen. */
.itrack-search-toolbar{
  margin-block-start: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  background: var(--color-surface);
}
.itrack-search-toolbar .eca-form,
.itrack-search-toolbar__form{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem) auto;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}
.itrack-search-toolbar__query,
.itrack-search-toolbar__scope{ min-width: 0; }
.itrack-search-toolbar__scope{
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.itrack-search-toolbar__scope-label{
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}
.itrack-search-toolbar__scope .eca-multiselect{ flex: 1 1 auto; min-width: 0; }
.itrack-search-toolbar__input,
.itrack-search-toolbar__scope .eca-multiselect > summary{
  min-height: var(--control-h-touch);
  width: 100%;
}
.itrack-search-toolbar__scope .eca-multiselect{ min-width: 0; }
.itrack-search-toolbar__scope .eca-multiselect > summary{ justify-content: space-between; }
.itrack-search-toolbar__submit{ min-height: var(--control-h-touch); }
.itrack-search-toolbar__meta{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin-block-start: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
/* The duration is DATA, and a data value may not move the layout. Measured at 390: the chip is 93 px
   for "9 ms" and 116 px for "9999 ms", so the line's WRAP POINT moved with the number — the hint
   below the search form reflowed between two identical searches, and the page's pixel baseline flapped
   by 16–18 px (limit 12) in the one place a mask cannot help, because a mask paints over a BOX and the
   box was what moved. Reserved width for the widest plausible value: the number changes, nothing else
   does. */
.itrack-search-toolbar__time{
  min-inline-size: 7.5rem;
  white-space: nowrap;
}
.itrack-search-toolbar__scope-summary{
  color: var(--color-ink);
  font-weight: 600;
}
.itrack-search-toolbar__sep{ color: var(--color-muted); }
.itrack-search-toolbar__tip{ color: var(--color-muted); }
.itrack-search-toolbar__chips{ margin-block-start: var(--space-2); }

/* The selected filters are removable chips; "all fields" is summary text, not a fake chip. */
.itrack-filter-chips{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.itrack-filter-chip{
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2rem;
  padding: 0 var(--space-2);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
}
.itrack-filter-chip:hover{
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.itrack-filter-chip__remove{
  font-size: var(--text-base);
  line-height: 1;
}

/* Results heading is "Results" plus a small global-total hint. The active tab owns the count that
   can contradict the heading, so the old "Results (11687)" heading is gone. */
.itrack-results{ margin-block-start: var(--space-4); }
.itrack-results__head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-block-end: var(--space-2);
}
.itrack-results__title{
  margin: 0;
  font-size: var(--text-lg);
}
.itrack-results__hint{
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* One dense result row. */
.itrack-result-list{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.itrack-result{
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  background: var(--color-surface);
}
.itrack-result__head{
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.itrack-result__identity{
  flex: 1 1 auto;
  min-width: 0;
}
.itrack-result__type{
  margin: 0 0 2px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.itrack-result__title{
  margin: 0;
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.itrack-result__title a{
  color: var(--color-link);
  text-decoration: none;
}
.itrack-result__title a:hover{ text-decoration: underline; }
.itrack-result__badges{
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}
.itrack-result__match{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border-inline-start: 3px solid color-mix(in oklab, var(--color-primary) 40%, var(--color-border));
  border-radius: var(--radius-field);
  background: color-mix(in oklab, var(--color-primary) 5%, var(--color-surface));
  font-size: var(--text-sm);
}
.itrack-result__match-label{
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
}
.itrack-result__match-text{
  min-width: 0;
  color: var(--color-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.itrack-result__meta{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.itrack-result__meta-item{
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
}
.itrack-result__meta-label{ font-weight: 700; color: var(--color-muted); }
.itrack-result__meta-label::after{ content: ":"; }
/* A card's meta values are a column of DATA — dates, counts, IDs — read down the card. Tabular
   digits make them align, and they make a timestamp's width CONSTANT: with a proportional face
   "2026-11-16 11:46" and "2026-11-16 09:41" differ by 1–2 px, which is enough to move the pixel
   baseline's mask box (a mask paints over the box, not the glyphs) — measured 2026-11-16 as a
   36 px diff at 390 on the search-results capture, one day's last-login clock apart. */
.itrack-result__meta-value{
  color: var(--color-ink);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.itrack-result__tags{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.itrack-result__tag{ font-size: var(--text-xs); }
.itrack-result__note{
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.itrack-result__actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}
.itrack-result__more{ position: relative; }
.itrack-result__more-summary{
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-link);
}
.itrack-result__more-panel{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}
.itrack-result__more-link{ font-size: var(--text-xs); }
@media (max-width: 639.98px){
  .itrack-result__more-summary,
  .itrack-result__more-link{
    display: inline-flex;
    align-items: center;
    min-height: var(--control-h-touch);
  }
}

/* ═══ Logback log results ═════════════════════════════════════════════════════════════════════
   `/logs/list` used to print matched entries as a seven-column table. The oracle presents a log
   entry as a collapsible line: timestamp, level, then the message, with the rest behind Detail.
   These cards reuse the shared `.itrack-result` vocabulary above so the page reads like the rest
   of the app; only the level tone and the collapsible detail are app-local. */
.itrack-log-list{ margin-block-start: var(--space-2); }
.itrack-log-card__detail{
  margin-block-start: var(--space-1);
  padding-block-start: var(--space-2);
  border-block-start: var(--border) solid var(--color-border);
}
.itrack-log-card__summary{
  display: flex;
  align-items: center;
  min-height: var(--control-h-touch);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-link);
}
.itrack-log-card__facts{
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
}
.itrack-log-card__facts dt{ color: var(--color-muted); font-weight: 700; }
.itrack-log-card__facts dd{
  margin: 0;
  color: var(--color-ink);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.itrack-log-card__stack{
  margin-block-start: var(--space-2);
  max-height: 20rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.itrack-log-level{ text-transform: uppercase; letter-spacing: .03em; }
.itrack-log-level--error{
  color: var(--color-error-ink);
  background: color-mix(in oklab, var(--color-error) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-border));
}
.itrack-log-level--warn{
  color: var(--color-warning-ink);
  background: color-mix(in oklab, var(--color-warning) 20%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-warning) 50%, var(--color-border));
}
.itrack-log-level--info{
  color: var(--color-info-ink);
  background: color-mix(in oklab, var(--color-info) 18%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-info) 45%, var(--color-border));
}
.itrack-log-level--debug,
.itrack-log-level--trace,
.itrack-log-level--other{
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  border-color: color-mix(in oklab, var(--color-muted) 30%, var(--color-border));
}

.itrack-result--user .itrack-result__head{ align-items: center; }
.itrack-result--user .itrack-result__meta{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 var(--space-4);
}

/* The search-term mark is an app class so the sheet owns the ink, not the browser default. */
.itrack-search-hit{
  padding: 0 .12em;
  border-radius: 2px;
  background: color-mix(in oklab, var(--color-warning) 35%, var(--color-surface));
  color: inherit;
  font-weight: 700;
}

/* Comments are a table: ticket, snippet, type, author, created, action. */
.itrack-comment-results{
  overflow-x: auto;
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-box);
  background: var(--color-surface);
}
.itrack-comment-table{
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.itrack-comment-table th{
  padding: var(--space-2) var(--space-3);
  border-block-end: var(--border) solid var(--color-border);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}
.itrack-comment-table td{
  padding: var(--space-2) var(--space-3);
  border-block-end: var(--border) solid var(--color-border);
  vertical-align: top;
}
.itrack-comment-table tr:last-child td{ border-block-end: 0; }
.itrack-comment-row__ticket{
  font-weight: 650;
  white-space: nowrap;
}
.itrack-comment-row__comment{ min-width: 18rem; }
.itrack-comment-row__snippet{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.itrack-comment-row__matched,
.itrack-comment-row__note{
  display: block;
  margin-block-start: 2px;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

@media (max-width: 720px){
  .itrack-search-toolbar{ padding: var(--space-2); }
  .itrack-search-toolbar .eca-form,
  .itrack-search-toolbar__form{ grid-template-columns: minmax(0, 1fr); }
  .itrack-search-toolbar__submit{ width: 100%; min-height: var(--control-h-touch); }
  .itrack-search-toolbar__input,
  .itrack-search-toolbar__scope .eca-multiselect > summary{ min-height: var(--control-h-touch); }
  .itrack-search-toolbar__scope{ flex-wrap: wrap; }
  .itrack-filter-chip{ min-height: var(--control-h-touch); }
  .itrack-result{ padding: var(--space-3); }
  .itrack-result__head{ flex-wrap: wrap; }
  .itrack-result__badges{ justify-content: flex-start; }
  .itrack-comment-table{ min-width: 40rem; }
}

/* Dashboard-specific markers and project-list chart links. */
.itrack-ticket-tat{
  margin-inline-start: var(--space-1);
  color: #ffffff;
  background: #b02a37;
}
.itrack-project-card__chart,
.itrack-project-summary__chart{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  text-decoration: none;
}
.itrack-project-card__chart:hover,
.itrack-project-summary__chart:hover{ color: var(--color-ink); }

/* Dashboard row tints: iTrack 6's two criteria only (aged WIP, UAT_RELEASED to-be-released).
   Tokens only; the ink is the design system's text-safe warning (the fill token fails AA as text).
   Late in the sheet so the cards rule at 640 and below cannot repaint the card ground. */
.itrack-ticket-table > tbody > tr.itrack-ticket-row--aged{
  background: color-mix(in oklab, var(--color-warning) 6%, var(--color-surface));
  color: var(--color-warning-ink);
}
.itrack-ticket-table > tbody > tr.itrack-ticket-row--uat-release{
  /* The closest token mix to the oracle's pale-yellow ground; no relative-colour syntax. */
  background: color-mix(in oklab, var(--color-warning) 13%, var(--color-surface));
  color: var(--color-warning-ink);
}

/* ═══ Request System Admin Access Token ═════════════════════════════════════════════════════════
   One card: the token, its expiry, its scoped spaces and the two actions are one subject, not four
   separate cards. The token itself is a value to copy, so it is set in the sheet's monospace
   stack and gets a full-width field beside the copy control. */
.itrack-token{ display: flex; flex-direction: column; gap: var(--space-3); }
.itrack-token__row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.itrack-token__row .eca-input{ flex: 1 1 14rem; }
.itrack-token__value{
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: .08em;
  /* A readonly field is muted by the shared input rule; this value is the page's subject. */
  color: var(--color-ink);
}
.itrack-token__expiry{ margin: 0; }
.itrack-token__expiry time{ font-weight: 600; color: var(--color-ink); }
.itrack-token__scopes{ margin-block-start: var(--gap-block); }
.itrack-token__scopes .eca-section-head{ margin-block-end: var(--space-2); }
.itrack-token__spaces{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.itrack-token__spaces li{
  padding: var(--space-1) var(--space-2);
  border: var(--border) solid var(--color-border);
  border-radius: var(--radius-field);
  background: var(--color-surface-sunken);
  font-size: var(--text-sm);
}

/* ═══ Create pickers: the project filter ═══════════════════════════════════════════════════════
   The reference opened New Ticket / New User Story as a searchable project list. The filter is a
   row INSIDE the existing nested `.eca-menu__panel`; the rail's own rows, widths and 44 px targets
   are untouched. Sticky so a long project list scrolls under it rather than taking the field away. */
.itrack-picker-filter{
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  background: var(--color-surface);
  border-block-end: var(--border) solid var(--color-border);
}
.itrack-picker-filter__input{ min-height: var(--control-h-touch); }
.itrack-picker-filter__count{
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.itrack-picker-filter__empty{
  margin: 0;
  padding: var(--space-2) var(--space-3);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
/* The UA's `[hidden]` rule loses to the shared row's `display: flex`, so narrowing the list must
   restate the state on the picker's own rows. Without this the count says "8 of 97" while all 97
   rows still occupy space and the matches sit below the fold. */
[data-eca-menu-picker] > a[data-eca-menu-label][hidden]{ display: none; }
/* On a phone the Create bar's panel is the shared popover, whose base (in-flow) rule has no
   surface. The project picker is a card with rows, so it needs a ground to be read against; the
   rule is scoped to iTrack's picker and states no width, position or target size. */
@media (max-width: 899px){
  .eca-nav-rail__actions .eca-menu__panel[data-eca-menu-picker]{
    background: var(--color-surface);
    border: var(--border) solid var(--color-border);
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-3);
  }
  /* The Create panel holds two submenus and does not need to scroll itself: it is five rows tall.
     Left as a scroller, it CLIPS the project picker to its own 228 px box, so only the filter is
     reachable and the rows are painted outside the panel. A descendant menu must escape; the
     picker's own panel keeps its `max-height`/overflow. Metrics are unchanged. */
  .eca-nav-rail__actions > details > .eca-menu__panel:has([data-eca-menu-picker]){
    overflow: visible;
  }
}

/* ═══ Ticket Summary: iTrack 6's filter grouping ═════════════════════════════════════════======
   The oracle stacks Projects and State as full rows, then pairs Start/End Modified Date; at 390
   every field is one full-width row. The shared `.eca-field-row` auto-fit would put all four on
   one line at 1440, which is not the oracle's grouping. This override names only that form. */
.itrack-ticket-filter{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  align-items: end;
}
@media (min-width: 640px){
  .itrack-ticket-filter{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-1) var(--space-3);
  }
  /* Projects and State take the full row; the two dates share the next one. */
  .itrack-ticket-filter > :nth-child(-n+2){ grid-column: 1 / -1; }
}

/* ═══ Ticket Summary: the row Actions menu is a viewport popover ═══════════════════════════════
   The shared absolute panel escapes the cell at 1440 and, because opening a row menu flips the
   table's `overflow` to visible, it also moves the table under the pointer (measured 1855–2063 px
   on a 1440 px viewport). Scoped to this page: a fixed panel, placed/flipped by the page's small
   script, never widens the table or the document, keeps its own scroll, and keeps 44 px targets.
   The table's scroll box stays a scroll box so the panel cannot be clipped by it. */
.itrack-ticket-summary-page .table-scroll:has(.itrack-ticket-actions[open]){ overflow: auto; }
/* The summary table's wide sticky columns still added their scroll width to the DOCUMENT at 768
   (measured 2336 px on a 768 px viewport) while the scroll box itself was correctly 687 px.
   `position: relative` makes the wrapper the containing block for the table's absolute
   descendants, so nothing escapes it; unlike `contain: paint` it leaves the fixed menu's
   containing block as the viewport. */
.itrack-ticket-summary-page .itrack-ticket-table-wrap{ position: relative; }
/* A closed disclosure is not a laid-out panel: the shared flex rule beats the UA hidden rule, so
   every closed popover used to sit at its row position and, at 768, stretched the document to
   2336 px. The menu exists only while its own <details> is open. */
.itrack-ticket-summary-page details.itrack-ticket-actions:not([open]) > .itrack-ticket-actions__menu{
  display: none;
}
.itrack-ticket-summary-page .itrack-ticket-actions__menu{
  position: fixed;
  inset: auto;
  z-index: 60;
  width: min(18rem, calc(100vw - 2 * var(--space-4)));
  min-width: 0;
  max-height: min(70vh, 22rem);
  overflow: auto;
  margin-block-start: 0;
}
.itrack-ticket-summary-page .itrack-ticket-actions__menu .eca-btn,
.itrack-ticket-summary-page .itrack-ticket-actions__menu form .eca-btn{
  min-height: var(--control-h-touch);
  justify-content: flex-start;
}

/* ═══ Project Summary: filter as you type ═════════════════════════════════════════════════════
   iTrack 6 has no Filter button on this page; the input narrows the rendered rows and the two
   group badges as the reader types. The form remains a GET so `q` survives scripting off. */
.itrack-project-filter__form{ display: flex; flex-direction: column; }
.itrack-project-filter__form .eca-field-row{ margin: 0; }
.itrack-project-filter__status{ margin: var(--space-1) 0 0; }
.itrack-project-filter__clear{
  align-self: flex-start;
  margin-block-start: var(--space-2);
  min-height: var(--control-h-touch);
}
/* The card/table rules set `display`, so the UA's [hidden] rule loses to them. */
.itrack-project-cards [hidden],
.itrack-project-summary-table [hidden],
.itrack-project-filter__empty[hidden],
.itrack-project-filter__clear[hidden]{ display: none !important; }
.itrack-project-filter__empty{ margin-block-start: var(--space-3); }

/* The send-later date/time picker is hidden until "Others" is chosen. `.eca-field` sets a
   display, so the UA's [hidden] rule loses to it; this app rule restores it. A script-free
   browser gets its own visible datetime control in a <noscript> block instead. */
.itrack-schedule-datetime[hidden]{ display: none !important; }
