/* ================= USER TRAFFIC: shell, range picker, filter row =================
   `ut-` is the pane chrome (picker, notes, tables, states, layer hosts); `utc-` is alt-user-traffic-charts.css.
   Extends the explorer vocabulary (`.sx`, alt-storage.css); alt-storage-panels.css positions `.sx-drawer`.
   Container queries target the pane (`sxpane`); no sideways scroll; selection is never colour alone (§20). */

/* ---------- the pane ---------- */

/* Positioning context for the range popover. `.sx` already establishes one via
   `container-type:inline-size`; this states it rather than relying on the side effect. */
.alt-app .sx.ut{ position:relative; }

/* ---------- the date range control ----------
   The preset's name and the dates it resolves to, on ONE line of an md `.a-btn` (32px, on the ladder): "Last 30 days" alone can't be
   checked against a figure a week later. Tabular figures stop the dates jittering between ranges. */
.alt-app .ut-range-btn{
  display:inline-flex; flex-direction:row; align-items:center; justify-content:flex-start;
  gap:var(--a-2); min-width:0; max-width:100%; text-align:left;
}
.alt-app .ut-range-lbl{ white-space:nowrap; }
.alt-app .ut-range-dates{
  font-size:var(--a-fs-11); color:var(--a-dim); font-variant-numeric:tabular-nums; white-space:nowrap;
}
.alt-app .ut-range-dates:empty{ display:none; }
.alt-app .ut-range-btn[aria-expanded="true"]{
  border-color:var(--a-blue); background:var(--a-blue-soft);
}
.alt-app .ut-range-btn[aria-expanded="true"] .ut-range-lbl{ color:var(--a-blue-text); }

/* ---------- the two-month picker ----------
   DS-43 popover surface (radius 9, float ground, strong edge, --a-shadow, padding 12 for content). Non-modal so dates can be compared against the figure behind it; dismisses on Escape or outside press.
   Anchored right and clamped, full-width below the tablet step (two months plus presets don't fit 320px). */
.alt-app .ut-range-pop{
  /* The z-index is a token and never a number (design-system §11b) — `--z-float` is the floor
     for something that floats over the page without owning the screen, the same rung the
     mention picker and the chart tooltip sit on. */
  position:absolute; z-index:var(--z-float); top:calc(var(--a-ctl) + var(--a-5)); right:0;
  width:min(560px, 100%); max-width:100%; min-width:0;
  max-height:min(70vh, 560px); overflow-y:auto; overscroll-behavior:contain;
  padding:var(--a-3);
  border:1px solid var(--a-line-strong); border-radius:var(--a-r);
  background:var(--a-float); box-shadow:var(--a-shadow);
}
.alt-app .ut-range-pop[hidden]{ display:none; }
.alt-app .ut-range-body{
  display:flex; flex-direction:column; gap:var(--a-3); min-width:0; margin-top:var(--a-2);
}

/* The seven presets, as a wrapped group — six offered, since `custom` is the state the calendar
   leaves behind rather than a button (there would be nothing for it to apply). */
.alt-app .ut-presets{
  display:flex; flex-wrap:wrap; gap:var(--a-1) var(--a-2); min-width:0;
}
/* The preset is an `.a-btn.tog` (md ladder step; the lit state is `.a-btn.tog.on`, kept in step with
   `aria-pressed` by the shell), so only a floor on shrinking stays here. */
.alt-app .ut-preset{ min-width:0; }

.alt-app .ut-cal{ display:flex; flex-direction:column; gap:var(--a-2); min-width:0; }
.alt-app .ut-cal-nav{
  display:flex; align-items:center; justify-content:space-between; gap:var(--a-2); min-width:0;
}
.alt-app .ut-cal-nav-lbl{
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  line-height:var(--a-lh-tight); color:var(--a-dim);
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* The month steppers are `.a-btn.icon.sm`; only the text glyph's size is this sheet's. */
.alt-app .ut-cal-step{ flex:0 0 auto; font-size:var(--a-fs-16); }

/* Two months side by side where there's room, stacked where there's not. `minmax(0,1fr)`, not
   `1fr` — a seven-column grid inside a bare `1fr` track refuses to go narrower than its widest
   cell. */
.alt-app .ut-cal-months{
  display:grid; gap:var(--a-3); grid-template-columns:minmax(0, 1fr); min-width:0;
}
.alt-app .ut-cal-month{ min-width:0; }
.alt-app .ut-cal-head{
  margin-bottom:var(--a-1); font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-tight); color:var(--a-text);
}
.alt-app .ut-cal-grid{
  display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:2px; min-width:0;
}
.alt-app .ut-cal-dow{
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  line-height:var(--a-lh-tight); color:var(--a-dim); text-align:center; padding-bottom:2px;
}
/* A day is a real button, a 32px cell (DS-32), and the grid sits inside a layer that can scroll, so the
   cell is never shrunk to fit a narrow pane. */
.alt-app .ut-day{
  display:flex; align-items:center; justify-content:center;
  min-width:0; min-height:var(--a-ctl); padding:0;
  border:1px solid transparent; border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-text);
  font-family:var(--a-body); font-size:var(--a-fs-ctl); line-height:var(--a-lh-ctl); font-variant-numeric:tabular-nums;
  cursor:pointer;
}
.alt-app .ut-day.is-pad{ cursor:default; }
.alt-app .ut-day:hover:not(:disabled){ background:var(--a-raised); border-color:var(--a-line-strong); }
.alt-app .ut-day:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
/* After today, nothing is recorded — disabled rather than absent, so a calendar missing its
   last third reads as a bounded grid rather than a broken one. */
.alt-app .ut-day:disabled{ color:var(--a-faint); cursor:not-allowed; opacity:.55; }
/* Inside the selection: a wash, and the two ends additionally carry a border and a weight, so
   the range and its endpoints are three states rather than two shades of one. */
.alt-app .ut-day.is-in{ background:var(--a-blue-soft); color:var(--a-blue-text); }
.alt-app .ut-day.is-end{
  background:var(--a-blue-fill); border-color:var(--a-blue); color:var(--a-blue-text);
  font-weight:700;
}
/* Today is marked whether or not it is selected, by an underline rather than a colour, so it
   survives sitting inside the selection wash. */
.alt-app .ut-day.is-today{ text-decoration:underline; text-underline-offset:2px; }

/* The footer — Apply and Cancel exist only for the custom path (a preset applies on its own
   press), and Apply disables while the draft is half finished, with a sentence beside it saying
   which half is missing rather than leaving a dead button to be guessed at. */
.alt-app .ut-range-actions{
  display:flex; align-items:center; gap:var(--a-2); flex-wrap:wrap; min-width:0;
  padding-top:var(--a-2); border-top:1px solid var(--a-line-soft);
}
.alt-app .ut-range-state{
  margin:0; flex:1 1 200px; min-width:0;
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); overflow-wrap:anywhere;
}
.alt-app .ut-range-apply:disabled{ opacity:.55; cursor:not-allowed; }
.alt-app .ut-range-note{ margin-top:0; }

@container sxpane (min-width: 520px){
  .alt-app .ut-cal-months{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* ---------- the notes under the filter bar ----------
   Two separate facts (what the range reaches, what the record can't say) as two paragraphs; the
   host disappears entirely when there's nothing to say — a permanent paragraph gets skipped. */
.alt-app .ut-notes{
  display:flex; flex-direction:column; gap:4px; min-width:0;
}
.alt-app .ut-notes[hidden]{ display:none; }

/* Notices (the horizon, the unhonoured filters, a failed read) are `.a-notice` (DS-A05, alt-admin-components.css §4); nothing is restated here. */

/* ---------- the four states every surface needs ----------
   Loading, empty, filtered-empty and error are distinct; none may show a false zero mid-read. The kind is
   carried as data; `.is-err` is accepted too. `filtered` has a Clear-filters button. */
.alt-app .ut-states{ display:flex; flex-direction:column; gap:var(--a-2); min-width:0; }
.alt-app .ut-state{
  padding:var(--a-4); min-width:0;
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); text-align:center;
  overflow-wrap:anywhere;
}
.alt-app .ut-state[data-state="error"],
.alt-app .ut-state.is-err{ color:var(--a-red); font-weight:600; }
.alt-app .ut-state[data-state="filtered"]{ color:var(--a-text); }
.alt-app .ut-state[data-state="loading"]{ color:var(--a-faint); }
/* The two paragraphs panelRenderStateBlock() (JS/core/panel-controls.js) puts in the block: the
   sentence, and an empty read's quieter note under it. Both are <p>, which would otherwise carry
   the browser's own 1em margins and push the centred block open; the note steps down a tone. */
.alt-app .ut-state-text,
.alt-app .ut-state-note{ margin:0; }
.alt-app .ut-state-note{ margin-top:var(--a-1); color:var(--a-faint); }

/* ---------- the log and roster tables ----------
   The table itself is the shared `.a-table` (DS-A01: eyebrow header, 13px body, 7px 12px cells, soft dividers) — nothing below
   redeclares it; these are the modifiers the views add on top. */

.alt-app .ut-log-toolbar,
.alt-app .ut-log-pager,
.alt-app .ut-pager{
  display:flex; align-items:center; gap:var(--a-2); flex-wrap:wrap; min-width:0;
}
.alt-app .ut-pager{ margin-top:var(--a-3); }
.alt-app .ut-pagestat,
.alt-app .ut-pager-count{
  font-size:var(--a-fs-11); line-height:var(--a-lh-tight); color:var(--a-dim); font-variant-numeric:tabular-nums; min-width:0;
}

/* A sortable header — the button inherits the th's own type so the heading doesn't resize when
   it becomes sortable; sorted state keys off `[aria-sort]` on the th itself, so appearance and
   what a screen reader hears cannot drift apart. */
.alt-app .ut-sortbtn{
  padding:0; border:none; background:transparent; color:inherit;
  font:inherit; letter-spacing:inherit; text-transform:inherit; text-align:inherit;
  cursor:pointer; min-width:0;
}
.alt-app .ut-sortbtn:hover{ color:var(--a-text); text-decoration:underline; }
.alt-app .ut-sortbtn:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; }
.alt-app .a-table th[aria-sort="ascending"] .ut-sortbtn,
.alt-app .a-table th[aria-sort="descending"] .ut-sortbtn{
  color:var(--a-text); font-weight:700;
}
.alt-app .a-table th[aria-sort="ascending"],
.alt-app .a-table th[aria-sort="descending"]{
  box-shadow:inset 0 -2px 0 0 var(--a-blue);
}

/* The organization header row in "Teams, compared" is a group header (DS-12, DS-49: 13px/600 sentence case, a count chip at the end) that lives in
   a table, so it is a <tr><th colspan> and resets `.a-table th`'s header look (sticky, eyebrow). Team rows hide individually (`tr.hidden`)
   since a <tbody> has no wrapper to hide. */
.alt-app .ut-team-org-head{ cursor:pointer; }
.alt-app .ut-team-org-head th{
  position:static; text-align:left; font-family:var(--a-body); font-size:var(--a-fs-13); font-weight:600;
  line-height:var(--a-lh-ui); letter-spacing:0; text-transform:none; white-space:normal;
  color:var(--a-text); padding:var(--a-2) var(--a-3) var(--a-1);
}
.alt-app .ut-team-org-head th .a-count-chip{ margin-inline-start:var(--a-2); }
.alt-app .ut-team-org-head:hover th{ background:var(--a-raised); }
.alt-app .ut-team-org-head:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; }
.alt-app .ut-team-org-head .chev{
  display:inline-block; margin-right:6px; transition:transform var(--a-quick) var(--a-ease);
}
.alt-app .ut-team-org-head.collapsed .chev{ transform:rotate(-90deg); }
/* No actor, and it's a fact rather than a gap — `tasks.user_id` is the OWNER, not who acted, so
   a reconstructed row deliberately shows nobody (italic/faint, not a name that failed to load). */
.alt-app .ut-noactor{ font-style:italic; color:var(--a-faint); }

/* Where a row came from: recorded, sign-in, account, reconstructed. Four values, each
   distinguishable by edge and fill rather than hue alone. Geometry is `.a-chip` (DS-26/DS-28); this sheet keeps only
   the colour roles and the edge style. */
.alt-app .ut-src{ text-transform:none; letter-spacing:0; }
.alt-app .ut-src[data-src="event"]{ border-color:var(--a-blue); background:var(--a-blue-soft); color:var(--a-blue-text); }
.alt-app .ut-src[data-src="session"]{ border-color:var(--a-purple); background:var(--a-purple-soft); color:var(--a-text); }
.alt-app .ut-src[data-src="account"]{ border-color:var(--a-green); background:var(--a-green-soft); color:var(--a-text); }
/* Reconstructed is the one the reader must not mistake for a measurement, so it's the one with
   a dashed edge — a figure recovered from the data rather than an event that was captured. */
.alt-app .ut-src[data-src="derived"]{ border-style:dashed; border-color:var(--a-line-strong); }

/* A badge whose meaning is never the colour — each modifier changes the border as well, and the
   text inside says what it is. Geometry is `.a-chip`; `max-width` is lifted because a flag is a sentence. */
.alt-app .ut-pill,
.alt-app .ut-flag{ max-width:none; }
.alt-app .ut-pill.is-active{ border-color:var(--a-green); background:var(--a-green-soft); color:var(--a-text); }
.alt-app .ut-pill.is-idle{ border-color:var(--a-gold); background:var(--a-gold-soft); color:var(--a-text); }
.alt-app .ut-pill.is-inactive{ border-style:dashed; }
.alt-app .ut-pill.is-disabled{ border-color:var(--a-red); background:var(--a-red-soft); color:var(--a-text); }
.alt-app .ut-flag{ border-color:var(--a-amber); background:var(--a-amber-soft); color:var(--a-text); }

/* A name that opens something — a button reset rather than a link, because it navigates nowhere. */
.alt-app .ut-name-btn{
  padding:0; border:none; background:transparent; color:var(--a-text);
  font:inherit; text-align:left; cursor:pointer; min-width:0;
  overflow-wrap:anywhere;
}
.alt-app .ut-name-btn:hover{ text-decoration:underline; font-weight:600; }
.alt-app .ut-name-btn:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; }

/* The short-id fallback, when an event names an account that no longer exists — `.a-code` (DS-A06) so it
   reads as an identifier rather than as a name this code failed to resolve. */
.alt-app .ut-id{ color:var(--a-faint); }

/* ---------- the trend strip ----------
   Two forms, one class, separated by a modifier: the default is bars sized from an inline
   `--ut-v` (same technique as storage-charts.js's `--sxc-v`); `.is-line` is inline SVG, whose
   stroke is `currentColor` so it needs no rule here. */
.alt-app .ut-spark{
  display:flex; align-items:flex-end; gap:2px;
  height:44px; max-width:140px; min-width:0;
}
.alt-app .ut-spark-bar{
  flex:1 1 0; min-width:2px; height:var(--ut-v, 0%);
  background:var(--a-chart-1); border-radius:var(--a-r-sm) var(--a-r-sm) 0 0;
}
.alt-app .ut-spark > svg{ width:100%; height:100%; display:block; }
.alt-app .ut-spark.is-line{ display:block; height:24px; max-width:120px; }

/* ---------- the drawer's own content ----------
   Geometry is `.sx-drawer`'s (alt-storage-panels.css) — nothing here positions or sizes the
   drawer; these are only the blocks the Users view builds inside it. */
.alt-app .ut-drawer[hidden]{ display:none; }
.alt-app .ut-export[hidden]{ display:none; }
.alt-app .ut-log-detail[hidden]{ display:none; }
/* The dialog is as tall as its form, up to the screen: `.a-modal` is a fixed 920x760 card, which leaves a short form floating in a tall one, and a
   body that does not scroll pushes the footer band out of the card (the shell clips it). */
.alt-app .a-modal.ut-export{ width:min(640px, 94vw); height:auto; max-height:min(760px, 88vh); }
.alt-app .a-modal.ut-log-detail{ width:min(560px, 94vw); height:auto; max-height:min(760px, 88vh); }
.alt-app .ut-export > .a-drawer-b,
.alt-app .ut-log-detail > .a-drawer-b{ flex:1 1 auto; min-height:0; overflow:auto; }
/* The header band's flex row (title, then the close button at the end) is alt-tasks.css's `.a-drawer-h`, which the console does not load. */
.alt-app .ut-export > .a-drawer-h,
.alt-app .ut-log-detail > .a-drawer-h{ display:flex; align-items:center; justify-content:space-between; gap:var(--a-2); }
.alt-app .ut-drawer-body,
.alt-app .ut-export-body{
  display:flex; flex-direction:column; gap:var(--a-4); min-width:0;
}
/* The export's radios are the shared `.a-radio` (DS-A09), one to a line inside their fieldset. */
.alt-app .ut-export-group > .a-radio{ display:flex; margin:0 0 var(--a-2); }

.alt-app .ut-facts{
  display:grid; gap:var(--a-3);
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin:0; min-width:0;
}
/* A fact is the figure tile (`.a-stat`) and not a control: no pointer, no hover edge. */
.alt-app .ut-facts > .a-stat{ cursor:default; }
.alt-app .ut-facts > .a-stat:hover{ border-color:var(--a-line-soft); }

/* The key/value definition row (DS-A03): 13px on 1.45, 6px above and below, a soft divider under each pair. */
.alt-app .ut-detail{
  display:grid; gap:0 var(--a-3);
  grid-template-columns:minmax(0, auto) minmax(0, 1fr);
  margin:0; min-width:0;
}
.alt-app .ut-detail-k,
.alt-app .ut-sess-k{
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  line-height:var(--a-lh-tight); color:var(--a-dim); min-width:0;
}
.alt-app .ut-detail-k,
.alt-app .ut-detail-v{ padding:var(--a-sp-6) 0; border-bottom:1px solid var(--a-line-soft); }
/* The key is 11px beside a 13px value in a stretched row: two pixels of top padding put their first lines on one baseline. */
.alt-app .ut-detail-k{ padding-top:calc(var(--a-sp-6) + var(--a-sp-2)); }
/* A full address and a raw user agent both live here, and neither may widen the layer. */
.alt-app .ut-detail-v,
.alt-app .ut-sess-v{
  font-size:var(--a-fs-13); line-height:var(--a-lh-ui); color:var(--a-text); min-width:0; overflow-wrap:anywhere;
}
.alt-app .ut-detail-note{
  grid-column:1 / -1; margin:var(--a-2) 0 0;
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); max-width:78ch;
}

/* A session's key/value pair is the definition row (DS-A03): a fixed key track so the values line up, a soft divider under each. */
.alt-app .ut-sess-kv{
  display:grid; grid-template-columns:minmax(0, 8.5em) minmax(0, 1fr); gap:0 var(--a-3); align-items:baseline;
  padding:var(--a-sp-6) 0; border-bottom:1px solid var(--a-line-soft); min-width:0;
}
.alt-app .ut-sess,
.alt-app .ut-rel{ display:flex; flex-direction:column; gap:var(--a-3); min-width:0; }
.alt-app .ut-sess-row,
.alt-app .ut-rel-row{
  display:grid; gap:2px var(--a-3); grid-template-columns:minmax(0, 1fr); min-width:0;
  padding-bottom:var(--a-2); border-bottom:1px solid var(--a-line-soft);
}
.alt-app .ut-sess-row:last-child,
.alt-app .ut-rel-row:last-child{ border-bottom:none; padding-bottom:0; }

/* The drawer's own text blocks. A session heading and a team name are item titles (DS-09: 13px/600); a raw user agent is a machine string, drawn as
   hint text that may break anywhere; the trend's per-bucket list and a quiet cell ("Not measured") are the hint and dim roles. */
.alt-app .ut-sess-head,
.alt-app .ut-rel-name{ margin:0; font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-ui); color:var(--a-text); }
.alt-app .ut-sess-ua{ margin:0; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); overflow-wrap:anywhere; }
.alt-app .ut-trend-list{ margin:0; padding-inline-start:var(--a-4); font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim); }
.alt-app .ut-dim{ color:var(--a-faint); }

/* Parsed from a user agent, which is a guess and is labelled as one — a reader acting on it
   needs to know it's a client-side interpretation, never a fact the database recorded. */
.alt-app .ut-derived{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); font-style:italic; color:var(--a-faint); }

/* ---------- the journey timeline ----------
   The left rule is what reads as a timeline — a border on the item list, not a pseudo-element,
   so it can't come apart from the items it belongs to. */
.alt-app .ut-tl{ display:flex; flex-direction:column; gap:var(--a-3); min-width:0; }
.alt-app .ut-tl-day{
  position:sticky; top:0; z-index:var(--z-sticky);
  padding:2px 0; background:var(--a-panel);
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  line-height:var(--a-lh-tight); color:var(--a-dim); border-bottom:1px solid var(--a-line-soft);
}
.alt-app .ut-tl-items{
  border-left:1px solid var(--a-line-soft);
  margin-left:8px; padding-left:var(--a-4); min-width:0;
}
/* Every child is placed by name, not DOM order — auto-placement would make this layout depend
   on the order the view happens to append its four parts in, so a later reorder would silently
   move the time under the icon instead. */
.alt-app .ut-tl-item{
  display:grid; gap:2px var(--a-3); min-width:0;
  grid-template-columns:56px 20px minmax(0, 1fr);
  align-items:start; padding:var(--a-2) 0;
}
.alt-app .ut-tl-time{
  grid-column:1; grid-row:1;
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim); font-variant-numeric:tabular-nums; min-width:0;
}
.alt-app .ut-tl-ico{
  grid-column:2; grid-row:1;
  display:flex; align-items:center; justify-content:center;
  width:20px; height:20px; flex:0 0 20px;
  border:1px solid var(--a-line); border-radius:var(--a-r-pill);
  background:var(--a-panel); color:var(--a-dim);
}
.alt-app .ut-tl-ico svg{ width:14px; height:14px; }
.alt-app .ut-tl-act,
.alt-app .ut-tl-meta,
.alt-app .ut-tl-ctx,
.alt-app .ut-tl-session{ grid-column:3; min-width:0; overflow-wrap:anywhere; }
.alt-app .ut-tl-act{ font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-ui); color:var(--a-text); }
.alt-app .ut-tl-meta{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); }
.alt-app .ut-tl-ctx{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim); }
.alt-app .ut-tl-session{ justify-self:start; margin-top:2px; }

/* A note belonging to the Teams view, kept at the type floor beside the panel it explains. */
.alt-app .ut-teams-note{
  margin:var(--a-2) 0 0; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); max-width:78ch;
}

/* ---------- the narrow steps ----------
   The PANE's width, not the window's — at 320px the console has already stacked, so these are
   what the pane itself still needs: the popover fills it, the timeline's time column moves
   above the item instead of squeezing to nothing, and the facts grid collapses to one column. */
@container sxpane (max-width: 559px){
  .alt-app .ut-range-pop{
    position:static; width:auto; max-height:none; box-shadow:var(--a-shadow-sm);
    margin-top:var(--a-2);
  }
  .alt-app .ut-range-btn{ flex:1 1 100%; }
  .alt-app .ut-spark{ max-width:none; }
  /* The time moves above the item rather than squeezing to nothing — a 56px column holding
     "11:47 PM" is the first thing to break at 320px; the icon stays in its own column so the
     item still reads as one entry, not three stacked lines. */
  .alt-app .ut-tl-item{ grid-template-columns:20px minmax(0, 1fr); }
  .alt-app .ut-tl-ico{ grid-column:1; grid-row:1; }
  .alt-app .ut-tl-time{ grid-column:2; grid-row:1; }
  .alt-app .ut-tl-act,
  .alt-app .ut-tl-meta,
  .alt-app .ut-tl-ctx,
  .alt-app .ut-tl-session{ grid-column:2; }
  .alt-app .ut-facts{ grid-template-columns:minmax(0, 1fr); }
  .alt-app .ut-detail{ grid-template-columns:minmax(0, 1fr); }
  .alt-app .ut-detail-k{ border-bottom:0; padding-bottom:0; }
}
