/* The Day and Week timeline (JS/alt/alt-calendar-timeline.js). Positions come from custom properties only (--s start min, --d drawn min,
   --cd min to the next block in the column, --c/--n/--sp column, count, span), so a resize or a zoom needs no script. Load it after
   alt-calendar-grid.css and alt-calendar-free.css: it reuses their rows, slots and holds and only places them. Tokens only, no hex. */

.a-tl{
  --tl-hour:56px; --tl-gut:76px; --tl-words:0px;
  position:relative; min-width:0; border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm); background:var(--a-panel);
}
.a-tl.week{ --tl-gut:52px; }
@media (min-width:1024px){ .a-tl.day{ --tl-words:190px; } }
@media (max-width:480px){ .a-tl.day{ --tl-gut:62px; } .a-tl.week{ --tl-gut:42px; } }

/* ---------- the scroller and its grid: the gutter, then one column per day ---------- */
.a-tl-scroll{ max-height:min(560px, 70vh); overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; border-radius:var(--a-r-sm); }
.a-cal-region.full .a-tl.day .a-tl-scroll{ max-height:max(560px, calc(100dvh - 240px)); }
/* Week fills the card instead of a cap: the sticky header block (days, all-day, tasks) is inside the scroller, so the hours get what the window
   leaves. The card keeps 600px so a short window scrolls the page, not a sliver of hours under the header. Full screen is already a fixed column. */
.a-cal-region:not(.full) .a-cal-host:has(.a-tl.week){ display:flex; flex-direction:column; min-height:600px; }
.a-cal-host:has(.a-tl.week) > .a-cg{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.a-cg > .a-tl.week{ flex:1 1 0; min-height:0; display:flex; flex-direction:column; }
.a-tl.week .a-tl-scroll{ flex:1 1 0; min-height:0; max-height:none; }
/* The Week day header in four rows, not six: the day line, the counts, the meter, then the free-time chip and the conflict count side by side
   (they wrap onto a second line only when the column cannot hold both). The heads are one grid row, so a column that wraps raises them all and
   an empty slot takes no room. List keeps the stacked header, whose per-column height has to match. */
.a-tl.week .a-cg-h{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 6px; padding:5px 8px 3px; }
.a-tl.week .a-cg-h > .a-cg-hgo, .a-tl.week .a-cg-h > .a-cg-h1, .a-tl.week .a-cg-h > .a-cg-n, .a-tl.week .a-cg-h > .a-cg-meter{ flex:0 0 100%; min-width:0; }
.a-tl.week .a-cg-free-slot, .a-tl.week .a-cg-cf-slot{ height:auto; min-height:0; flex:0 1 auto; max-width:100%; }
.a-tl.week .a-cg-cf-sum{ min-height:16px; padding:0 2px; }
.a-tl.week .a-cg-free-day{ height:20px; }
.a-tl.week .a-cg-meter{ margin-top:3px; }
.a-tl.week .a-cg-free-slot:empty, .a-tl.week .a-cg-cf-slot:empty{ display:none; }
.a-tl.week .a-cg-free-day{ margin-top:0; }
.a-tl.week .a-cg-free-day, .a-tl.week .a-cg-cf-sum{ position:relative; }
.a-tl.week .a-cg-h.fit1, .a-tl.week .a-cg-h.fit2, .a-tl.week .a-cg-h.fit3{ column-gap:4px; }
/* The shortened forms: the dropped word stays in the text for assistive technology and is only clipped from the eye. */
.a-tl.week .a-cg-h.fit1 .a-cg-free-day .x, .a-tl.week .a-cg-h.fit2 .a-cg-cf-sum .x, .a-tl.week .a-cg-h.fit3 .a-cg-free-day .x{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
/* Day beside the tasks: the card (.a-cal-host) is as tall as the task column next to it, so the timeline takes what the all-day row, the heading and
   "+ Meeting" leave instead of a cap. Every box from the host down is a flex column with min-height:0, as the task column's own chain is; the
   scroller keeps 240px so a short window scrolls the card (the host's own overflow) rather than crushing the hours. Below and Week keep the caps. */
.a-cal-split .a-cal-host:has(.a-tl.day){ display:flex; flex-direction:column; }
.a-cal-split .a-cal-host:has(.a-tl.day) > .a-cg{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.a-cal-split .a-cg--day > .a-cg-day{ flex:1 1 auto; min-height:0; grid-template-rows:minmax(0,1fr); align-items:stretch; }
.a-cal-split .a-cg-day-main:has(.a-tl.day){ min-height:0; }
.a-cal-split .a-cg-day-main:has(.a-tl.day) > .a-cg-b{ min-height:0; }
.a-cal-split .a-cg-b > .a-tl.day{ flex:1 1 0; min-height:240px; display:flex; flex-direction:column; }
.a-cal-split .a-tl.day .a-tl-scroll{ flex:1 1 0; min-height:0; max-height:none; }
.a-tl-body{ display:grid; grid-template-columns:var(--tl-gut) minmax(0, 1fr); min-width:0; }
.a-tl.week .a-tl-body{ grid-template-columns:var(--tl-gut) repeat(var(--cg-cols, 7), minmax(0, 1fr)); }
.a-tl-gut{ position:relative; height:calc(24 * var(--tl-hour)); border-right:1px solid var(--a-line-soft); }
.a-tl-hr{
  position:absolute; top:calc(var(--s, 0) * var(--tl-hour) / 60); right:6px; transform:translateY(calc(-50% * min(1, var(--s, 0))));
  font: var(--a-fs-11)/var(--a-lh-ctl) var(--a-body); color:var(--a-faint); font-variant-numeric:tabular-nums; white-space:nowrap; pointer-events:none;
}
.a-tl.day .a-tl-hr{ right:auto; left:6px; }
@media (max-width:480px){ .a-tl-hr{ font-size:var(--a-fs-11); right:4px; } .a-tl.day .a-tl-hr{ left:4px; } }

/* One column: the hour and half-hour lines are its background, so there is no element per hour. */
.a-tl-col{
  position:relative; min-width:0; height:calc(24 * var(--tl-hour)); border-right:1px solid var(--a-line-soft); contain:layout paint;
  --tl-lines:linear-gradient(to bottom, var(--a-line-soft) 1px, transparent 1px), linear-gradient(to bottom, transparent, transparent);   /* a browser without color-mix keeps the hour lines */
  background-image:var(--tl-lines);
  background-size:100% var(--tl-hour, 56px), 100% var(--tl-hour, 56px);
}
@supports (color: color-mix(in srgb, red, red)){
  .a-tl-col{
    --tl-lines:linear-gradient(to bottom, var(--a-line-soft) 1px, transparent 1px), linear-gradient(to bottom, transparent, transparent);
    --tl-lines:
      linear-gradient(to bottom, var(--a-line-soft) 1px, transparent 1px),
      linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in srgb, var(--a-line-soft) 55%, transparent) calc(50% - .5px), color-mix(in srgb, var(--a-line-soft) 55%, transparent) calc(50% + .5px), transparent calc(50% + .5px));
  }
}
.a-tl-col:last-child{ border-right:0; }
.a-tl-col.today{ background-color:transparent; background-color:color-mix(in srgb, var(--a-blue-soft) 40%, transparent); }
/* Outside the working day (before 8am, after 6pm). */
.a-tl-off{
  position:absolute; left:0; right:0; top:calc(var(--s, 0) * var(--tl-hour) / 60); height:calc(var(--d, 0) * var(--tl-hour) / 60);
  background:var(--a-raised); background:color-mix(in srgb, var(--a-raised) 55%, transparent); pointer-events:none;
}

/* ---------- the overlap cues (behind the blocks; every one is a decoration) ---------- */
.a-tl-wash{
  position:absolute; left:0; right:0; top:calc(var(--s, 0) * var(--tl-hour) / 60); height:calc(var(--d, 0) * var(--tl-hour) / 60);
  background:var(--a-amber-soft); border-top:1px dashed var(--a-amber); border-bottom:1px dashed var(--a-amber); z-index:1; pointer-events:none;
}
.a-tl-wash.x3{ background:var(--a-amber-soft); background:color-mix(in srgb, var(--a-amber) 28%, transparent); border-top-style:solid; border-bottom-style:solid; }
.a-tl-wash.past, .a-tl-wash.ended, .a-tl-col.past .a-tl-wash{ background:var(--a-line-soft); border-color:var(--a-faint); }
.a-tl-strip{
  position:absolute; left:0; width:3px; top:calc(var(--s, 0) * var(--tl-hour) / 60); height:calc(var(--d, 0) * var(--tl-hour) / 60);
  background:var(--a-amber); border-radius:0 var(--a-r-sm) var(--a-r-sm) 0; z-index:3; pointer-events:none;
}
.a-tl-strip.past, .a-tl-strip.ended, .a-tl-col.past .a-tl-strip{ background:var(--a-faint); }
/* Day's gutter bracket, with the shared badge at its top. */
.a-tl-br{
  position:absolute; right:-1px; width:6px; min-height:16px; top:calc(var(--s, 0) * var(--tl-hour) / 60); height:calc(var(--d, 0) * var(--tl-hour) / 60);
  border:2px solid var(--a-amber); border-right:0; border-radius:var(--a-r-sm) 0 0 var(--a-r-sm); z-index:3; pointer-events:none;
}
.a-tl-br .a-cg-cf-b{ position:absolute; right:7px; top:-2px; }
@media (max-width:480px){ .a-tl-br .a-cg-cf-b{ right:5px; padding:0 3px; } }   /* clear of the hour label in the 62px gutter */
.a-tl-br.past, .a-tl-br.ended{ border-color:var(--a-faint); }
/* Day's words margin: where each window's time is spelled out (1024px and wider only; the badge and descriptions carry it below). */
.a-tl-win{
  position:absolute; right:4px; width:calc(var(--tl-words) - 10px); top:calc(var(--s, 0) * var(--tl-hour) / 60); z-index:2;
  display:none; flex-direction:column; gap:1px; padding:2px 5px; border-radius:var(--a-r-sm); background:var(--a-panel);   /* the panel backs the words so the wash and the x3 rule never run behind them */
  font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-amber);
  font-variant-numeric:tabular-nums; pointer-events:none;
}
@media (min-width:1024px){ .a-tl.day .a-tl-win{ display:flex; } }
.a-tl-win .w.pk{ font-weight:700; }
.a-tl-win .m{ font-weight:400; color:var(--a-text); }
.a-tl-win.past, .a-tl-win.ended, .a-tl-col.past .a-tl-win{ color:var(--a-dim); }

/* ---------- the event layer: the words margin on the right, a 6px margin so empty time is always clickable ---------- */
.a-tl-lay{ position:absolute; top:0; bottom:0; left:4px; right:calc(var(--tl-words) + 6px); }
.a-tl-lay > .a-cg-ev, .a-tl-lay > .a-cfree-sl, .a-tl-lay > .a-cg-hold, .a-tl-lay > .a-tl-more{
  position:absolute; box-sizing:border-box; margin:0; min-height:0; min-width:0;
  top:calc(var(--s, 0) * var(--tl-hour) / 60);
  height:min(max(16px, calc(var(--d, 30) * var(--tl-hour) / 60 - 2px)), calc(var(--cd, var(--d, 30)) * var(--tl-hour) / 60 - 2px));
  left:calc(var(--c, 0) / var(--n, 1) * 100%); width:calc(var(--sp, 1) / var(--n, 1) * 100% - 2px);
}
.a-tl-lay > .a-cfree-sl{ z-index:1; overflow:hidden; border-top:0; }
.a-tl-lay > .a-cg-hold{ z-index:2; overflow:hidden; flex-wrap:wrap; align-content:flex-start; padding:1px 5px; }

/* A meeting block: the list row, placed. Line 1 time and Tentative/Pending, line 2 the title, then detail by zoom. */
.a-tl .a-tl-lay > .a-cg-ev{
  z-index:2; overflow:hidden; display:flex; flex-direction:row; flex-wrap:wrap; align-content:flex-start; align-items:center; column-gap:5px; row-gap:0;
  padding:1px 5px; font-size:var(--z-p, 13px); line-height:var(--a-lh-tight); container-type:size;   /* the one size scale (alt-size-scale.css), as List rows */
}
.a-tl-lay > .a-cg-ev > .h{ display:flex; align-items:center; gap:5px; min-width:0; }
.a-tl-lay > .a-cg-ev .t{ font-size:var(--z-s, 12px); }
.a-tl-lay > .a-cg-ev > .pn, .a-tl-lay > .a-cg-ev > .tw{ order:1; }
/* A timed block wraps its title inside the block (the block's overflow clips it); List's line clamp would leave two or three letters. */
.a-tl .a-tl-lay > .a-cg-ev > .s{ display:block; -webkit-line-clamp:none; overflow-wrap:break-word; hyphens:auto; }
.a-tl-lay > .a-cg-ev > .s{ order:2; flex:1 0 100%; min-width:0; }
.a-tl-lay > .a-cg-ev > .x, .a-tl-lay > .a-cg-ev > .w, .a-tl-lay > .a-cg-ev > .n{ order:3; flex:1 0 100%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-tl-lay > .a-cg-ev > .a-cg-cf-b{ order:4; position:absolute; right:3px; bottom:2px; }
.a-tl-lay > .a-cg-ev .tw{ font:600 var(--a-fs-11)/var(--a-lh-tight) var(--a-body); color:var(--a-dim); text-transform:uppercase; letter-spacing:.04em; }
.a-tl-lay > .a-cg-ev:focus-visible, .a-tl-lay > .a-tl-more:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; z-index:4; }
.a-tl-lay > .a-cg-ev.free{ background:var(--a-panel); }
/* Under 30px a block is one line; in a column under 150px a one-line block keeps its title and drops the clock and glyph (the time
   stays in its name and tooltip); a focus or lunch block keeps its chip. The block is the container, so a query styles its children only (the block's own wrap
   is why the one-line title takes flex-basis 0 and fits beside the clock); no script measures anything. */
@container (max-height:29px){
  .a-tl-lay > .a-cg-ev > .s{ order:1; flex:1 1 0; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .a-tl-lay > .a-cg-ev > .pn, .a-tl-lay > .a-cg-ev > .tw{ order:2; flex:none; }
  .a-tl-lay > .a-cg-ev > .x, .a-tl-lay > .a-cg-ev > .w, .a-tl-lay > .a-cg-ev > .n, .a-tl-lay > .a-cg-ev .tw{ display:none; }   /* .tw sits inside .h, so it is a descendant selector; Tentative stays in the hatch and the tooltip */
}
/* Narrow multi-line block: the clock and the focus/lunch chip stay (spec §3.4, §4.3: they go only in a one-line block); the
   Tentative word gives its room to the title (the hatched edge, name and tooltip still say it). */
@container (min-height:30px) and (max-width:149px){
  .a-tl-lay > .a-cg-ev > .h > .tw{ display:none; }
}
/* 11px only in a SPLIT block (two clashing meetings, ~45px). At 99px it caught every Week block at 1280 beside the Utilities
   rail (94px of content), so Calendar size did nothing there (journey.tasks.size-scale A2, 2026-11-15). */
@container (max-width:79px){
  .a-tl-lay > .a-cg-ev > .s{ font-size:var(--a-fs-11); line-height:var(--a-lh-tight); }
}
/* A block shorter than 9px (a 10-minute meeting at the smallest zoom) is a colour sliver: no half-cut text. */
@container (max-height:5px){
  .a-tl .a-tl-lay > .a-cg-ev > :is(.h, .s, .pn, .tw, .x, .w, .n, .a-cg-cf-b){ display:none; }
}
/* A 15-minute block (9-21px tall): one line of title only, sized to fit, so it never shows half-cut text; the time stays in
   its name and tooltip. Owner report 2026-11-09: "the 15min blocks do not display properly". */
@container (max-height:21px){
  .a-tl .a-tl-lay > .a-cg-ev > :is(.h, .k, .pn, .tw, .x, .w, .n, .a-cg-cf-b){ display:none; }   /* .k: a 16px chip does not fit a 12px block (Task size 1 holds it as a direct child) */
  .a-tl .a-tl-lay > .a-cg-ev > .s{ margin-block:-1px; }   /* the block's 1px padding is given back, so the line fits the box */
  .a-tl .a-tl-lay > .a-cg-ev > .s{ order:1; flex:1 1 0; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--a-fs-11); line-height:var(--a-lh-tight); }
}
@container (max-height:9px){   /* container heights are the box's content (block height less its 1px border and padding) */
  .a-tl .a-tl-lay > .a-cg-ev > .s{ line-height:var(--a-lh-ctl); }
}
@container (max-height:5px){
  .a-tl .a-tl-lay > .a-cg-ev > .s{ display:none; }   /* a sliver stays a sliver (rule order: after the one-line rules above) */
}
/* The focus/lunch chip (.k) stays visible when the calendar glyph (.g) hides (sys_design-system, "Focus time and lunch are STYLE B rows");
   at Task size 2+ it lives inside .h, so .h hides only when it holds no chip. 2026-11-12: the old rule hid .k and .h, and a 30-minute
   focus block lost its chip once the scrollbar gutter took the column under 150px. */
@container (max-height:29px) and (max-width:149px){
  .a-tl-lay > .a-cg-ev .t, .a-tl-lay > .a-cg-ev .g, .a-tl-lay > .a-cg-ev > .h:not(:has(> .k)){ display:none; }
}

/* Tentative in the grid: a 6px hatched left edge on the plain ground (the list keeps its full hatch). Focus, lunch and flights keep their own edge. */
.a-tl .a-tl-lay > .a-cg-ev.tentative:not(.k-focus):not(.k-lunch):not(.k-flight):not(.past):not(.ended){
  background-color:var(--a-raised); background-image:repeating-linear-gradient(135deg, var(--a-line-strong) 0 3px, transparent 3px 6px);
  background-size:6px 100%; background-repeat:no-repeat; background-position:left top; background-origin:border-box;
  border-left:6px solid transparent;
}
.a-tl .a-tl-lay > .a-cg-ev.tentative.live:not(.k-focus):not(.k-lunch):not(.k-flight):not(.past):not(.ended){   /* same :not chain as the non-live rule above, or that rule (8 classes against 7) wins and the block loses its rule and fill */
  background-image:var(--tl-rule), linear-gradient(to bottom, var(--a-blue-soft) calc(var(--now-p, 0) * 100%), transparent 0), repeating-linear-gradient(135deg, var(--a-line-strong) 0 3px, transparent 3px 6px);
  background-size:100% 100%, 100% 100%, 6px 100%; background-repeat:no-repeat;
}
/* The meeting under way HOSTS the now line (the List's idiom, in the timeline): it rises above the line (z5 over z4, inside the column only, so the
   sticky header and popovers are unaffected) and paints the same 3px rule with its 1px panel casing itself, in its own background, so the glyphs sit
   ABOVE the rule on a halo (below) and never read struck through (a strikethrough means cancelled). Its position is the
   line's own: the column's --now-s minus the block's --s, so the rule meets the line's stubs at the block's edges. */
.a-tl .a-tl-lay > .a-cg-ev.live{
  z-index:5;
  --tl-ny:calc((var(--now-s, 0) - var(--s, 0)) * var(--tl-hour, 56px) / 60);
  --tl-rule:linear-gradient(to bottom, transparent calc(var(--tl-ny) - 2.5px), var(--a-panel) calc(var(--tl-ny) - 2.5px) calc(var(--tl-ny) - 1.5px), var(--a-now) calc(var(--tl-ny) - 1.5px) calc(var(--tl-ny) + 1.5px), var(--a-panel) calc(var(--tl-ny) + 1.5px) calc(var(--tl-ny) + 2.5px), transparent calc(var(--tl-ny) + 2.5px));
  background-image:var(--tl-rule), linear-gradient(to bottom, var(--a-blue-soft) calc(var(--now-p, 0) * 100%), transparent 0);
  background-size:100% 100%; background-repeat:no-repeat; background-origin:border-box;
}
/* The halo: the row's own --a-raised, laid on the glyphs so the rule breaks around them. The List's blur (2px, 2px, 1px) is too soft for a 3px rule
   with a casing: measured from rendered pixels the rule still touched the glyph edges and read as a strikethrough, worst on a one-line block. So the
   timeline lays a hard 1px ring, a hard 2px cross and a 1px blur: a clean moat, crisp on a short block as on a tall one. */
.a-tl .a-tl-lay > .a-cg-ev.live > :not(.a-cg-cf-b){
  text-shadow:1px 0 0 var(--a-raised), -1px 0 0 var(--a-raised), 0 1px 0 var(--a-raised), 0 -1px 0 var(--a-raised), 1px 1px 0 var(--a-raised), -1px -1px 0 var(--a-raised),
    1px -1px 0 var(--a-raised), -1px 1px 0 var(--a-raised), 2px 0 0 var(--a-raised), -2px 0 0 var(--a-raised), 0 2px 0 var(--a-raised), 0 -2px 0 var(--a-raised), 0 0 1px var(--a-raised);
}
/* The text rows clip with overflow:hidden (ellipsis), and a clip cuts the halo at the row's own edge, which left a glyph's outer side bare against the rule.
   3px sideways and 2px up and down of padding, cancelled by the same negative margin, give the halo room without moving a glyph or changing a size. */
.a-tl .a-tl-lay > .a-cg-ev.live > :is(.s, .x, .w, .n){ box-sizing:border-box; padding:2px 3px; margin:-2px -3px; }
@container (min-height:30px){
  .a-tl .a-tl-lay > .a-cg-ev.live > :is(.s, .x, .w, .n){ flex-basis:calc(100% + 6px); }
}

/* The clash dot: a corner on a clashing block, never an edge, so the focus/lunch edge, the tentative hatch and the live gauge keep theirs. */
.a-tl .a-tl-lay > .a-cg-ev.cfd{ padding-right:15px; }
.a-tl .a-tl-lay > .a-cg-ev.cfd::after{
  content:""; position:absolute; top:3px; right:3px; width:7px; height:7px; border-radius:50%; background:var(--a-amber); box-shadow:0 0 0 1.5px var(--a-panel); pointer-events:none;
}
/* Week's columns are narrow: slimmer margins and a smaller dot give the title the room. */
.a-tl.week .a-tl-lay > .a-cg-ev{ padding-left:3px; padding-right:3px; }
/* The dot sits in the corner, and a float on the title pushes only its first line clear of it, so every later line keeps the full width. */
.a-tl.week .a-tl-lay > .a-cg-ev.cfd > .s::before{ content:""; float:right; width:9px; height:13px; }
.a-tl.week .a-tl-lay > .a-cg-ev.cfd::after{ width:6px; height:6px; right:2px; }
.a-tl .a-tl-lay > .a-cg-ev.cfd.past::after, .a-tl .a-tl-lay > .a-cg-ev.cfd.ended::after{ background:var(--a-faint); }
/* A clash partner of the focused or hovered block. */
.a-tl .a-tl-lay > .a-cg-ev.sib{ box-shadow:0 0 0 2px var(--a-amber); z-index:3; }
/* A live clash partner keeps its lift: .sib alone would drop it under the line and strike its title through. */
.a-tl .a-tl-lay > .a-cg-ev.live.sib{ z-index:5; }

/* "+N" when a group is wider than the column budget: opens the day popover. */
.a-tl-lay > .a-tl-more{
  z-index:2; display:flex; align-items:center; justify-content:center; padding:0 2px; overflow:hidden; cursor:pointer;
  background:var(--a-panel); color:var(--a-blue-text); border:1px dashed var(--a-line-strong); border-radius:var(--a-r-sm); font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-body);
}
.a-tl-lay > .a-tl-more:hover{ border-style:solid; border-color:var(--a-blue); }

/* A gap label between meetings (while free time is off). */
.a-tl-gap{
  position:absolute; left:8px; top:calc(var(--s, 0) * var(--tl-hour) / 60); z-index:1; font: var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-faint);
  font-variant-numeric:tabular-nums; pointer-events:none;
}

/* The now line: today's column, with its time as a flag in the gutter (Day and Week). The clock's own colour (--a-now), 3px with a 1px
   panel casing so it holds 3:1 on every ground it crosses; the meeting gauge and fill stay the accent blue. */
.a-tl-now{
  position:absolute; left:0; right:0; top:calc(var(--s, 0) * var(--tl-hour) / 60 - 1.5px); height:3px; background:var(--a-now);
  box-shadow:0 0 0 1px var(--a-panel); z-index:4; pointer-events:none;
}
/* The dot is the gutter's, not the line's: the line sits under a meeting under way (z4 under z5), so a dot on it would be cut at column 0, and its first-paint ring
   would be clipped by the column. Centred on the column's left edge (the gutter's 1px border, then 6px), above the column like the flag. */
.a-tl-nowd{
  position:absolute; right:-7px; top:calc(var(--s, 0) * var(--tl-hour) / 60 - 6px); z-index:5; width:12px; height:12px; border-radius:50%;
  background:var(--a-now); box-shadow:0 0 0 2px var(--a-panel); pointer-events:none;
}
/* Week: the dot lives in the body and sits on the left edge of today's column (--di, 0 to 6): the gutter plus that many seventh-parts of the rest. */
.a-tl.week .a-tl-body{ position:relative; }
.a-tl.week .a-tl-nowd{ right:auto; left:calc(var(--tl-gut) + (100% - var(--tl-gut)) * var(--di, 0) / var(--cg-cols, 7) - 6px); }
.a-tl-nowt{
  position:absolute; right:0; top:calc(var(--s, 0) * var(--tl-hour) / 60); transform:translateY(-50%); z-index:5; padding:2px 12px 2px 6px;
  font:700 var(--a-fs-12)/var(--a-lh-tight) var(--a-body); color:var(--a-on-now); background:var(--a-now); font-variant-numeric:tabular-nums; white-space:nowrap; pointer-events:none;
  border-radius:var(--a-r-sm) 0 0 var(--a-r-sm); clip-path:polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
}
.a-tl:not(.day) .a-tl-nowt{ font-size:var(--a-fs-11); padding:2px 10px 2px 4px; }
/* The Day flag's am/pm is its own span: it is dropped at phone width so "12:59" fits the 62px gutter with room to spare. */
@media (max-width:480px){ .a-tl-nowm{ display:none; } }
/* The elapsed band: today's column from midnight to now, painted behind the blocks; --now-s (minutes) is set on the column each tick. The
   hour lines are painted above it. A plain veil, so faint gap text on it keeps its contrast. */
.a-tl-col.today{
  background-image:var(--tl-lines), linear-gradient(to bottom, var(--a-now-past) calc(var(--now-s, 0) * var(--tl-hour) / 60), transparent 0);
  background-size:100% var(--tl-hour, 56px), 100% var(--tl-hour, 56px), 100% 100%;
  background-repeat:repeat, repeat, no-repeat;
}
@media (forced-colors:active){
  .a-tl-now, .a-tl-nowd, .a-tl-nowt{ forced-color-adjust:none; background:Highlight; }
  .a-tl-now, .a-tl-nowd{ box-shadow:0 0 0 1px Canvas; }
  .a-tl .a-tl-lay > .a-cg-ev.live{ forced-color-adjust:none; --tl-rule:linear-gradient(to bottom, transparent calc(var(--tl-ny) - 2.5px), Canvas calc(var(--tl-ny) - 2.5px) calc(var(--tl-ny) - 1.5px), Highlight calc(var(--tl-ny) - 1.5px) calc(var(--tl-ny) + 1.5px), Canvas calc(var(--tl-ny) + 1.5px) calc(var(--tl-ny) + 2.5px), transparent calc(var(--tl-ny) + 2.5px)); }
  .a-tl-nowt{ color:HighlightText; }
}

/* ---------- Week's header block: day heads, all-day row, task band, one grid with the columns beneath ---------- */
.a-tl-top{
  position:relative; border-bottom:1px solid var(--a-line-soft); background:var(--a-panel); border-radius:var(--a-r-sm) var(--a-r-sm) 0 0;
  overflow:hidden;   /* no gutter of its own: the scroller around it already reserves one, and a second made every head 11px narrower than its hour column under a classic scrollbar */
}
.a-tl-top.sticky{ position:sticky; top:env(safe-area-inset-top, 0px); z-index:6; }
.a-tl-row{ display:grid; grid-template-columns:var(--tl-gut) repeat(var(--cg-cols, 7), minmax(0, 1fr)); min-width:0; }
.a-tl-row + .a-tl-row{ border-top:1px solid var(--a-line-soft); }
.a-tl-corner{
  min-width:0; padding:6px 4px 0; border-right:1px solid var(--a-line-soft);
  font:700 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); letter-spacing:.06em; text-transform:uppercase; color:var(--a-dim);
}
.a-tl-cell{ min-width:0; padding:4px; border-right:1px solid var(--a-line-soft); }
.a-tl-cell:last-child{ border-right:0; }
.a-tl-row.heads .a-tl-cell{ padding:0; }
.a-tl-row.ad .a-tl-cell, .a-tl-row.tasks .a-tl-cell{ display:flex; flex-direction:column; gap:3px; }
.a-tl-row.tasks{ background:var(--a-raised); }
/* The TASKS row's three states (cfg.weekTasks; alt-calendar-timeline.js). Collapsed is a one-line strip of per-day counts; Compact is the capped cell;
   Expanded draws every task and stops at 36% of the window, scrolling inside itself so the hours below keep their room. */
.a-tl-corner.tasks{ padding:0; }
.a-tl-corner-in{ display:flex; flex-direction:column; align-items:stretch; gap:2px; padding:1px 2px; }
.a-tl-row.tasks.expanded .a-tl-corner-in{ position:sticky; top:0; padding-bottom:4px; }
.a-tl-fold{
  display:flex; align-items:center; gap:1px; width:100%; min-height:24px; margin:0; padding:0; border:0; border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-dim); cursor:pointer; text-align:left;
  font:700 var(--a-fs-11)/var(--a-lh-ctl) var(--a-body); letter-spacing:.01em; text-transform:uppercase;
}
.a-tl-fold:hover{ background:var(--a-panel); color:var(--a-text); }
.a-tl-fold:focus-visible, .a-tl-showall:focus-visible, .a-tl-tcount:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; }
.a-tl-fold .a-cg-ad-chev{ width:8px; }
.a-tl-fold-l{ flex:none; white-space:nowrap; }
.a-tl-showall{ width:100%; height:auto; min-height:var(--a-ctl-sm); padding:1px 2px; white-space:normal; text-align:center; }   /* the sm button's own type and line-height (DS-02); only the box may wrap in the narrow corner */
.a-tl-showall:disabled{ cursor:default; opacity:.55; }
.a-tl-row.tasks.expanded{ max-height:36vh; overflow-y:auto; overscroll-behavior:contain; }
/* The Expanded row's own scrollbar takes width from its seven columns, so the day heads, the all-day row and the hours reserve the same gutter (stable, hidden): every column
   stays one grid under a classic scrollbar. An overlay scrollbar has no width and nothing moves. */
.a-tl-row.tasks.expanded{ scrollbar-gutter:stable; }
.a-tl.week:has(.a-tl-row.tasks.expanded) .a-tl-row:not(.tasks), .a-tl.week:has(.a-tl-row.tasks.expanded) .a-tl-body{ overflow:hidden; scrollbar-gutter:stable; }
.a-tl-row.tasks.collapsed .a-tl-cell{ flex-direction:row; align-items:center; padding:1px 4px; }
.a-tl-tcount{
  display:flex; align-items:center; gap:3px; width:100%; min-height:24px; margin:0; padding:0 4px; border:0; border-radius:var(--a-r-sm);
  background:transparent; color:var(--a-text); cursor:pointer; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font:600 var(--a-fs-11)/var(--a-lh-tight) var(--a-body);
}
.a-tl-tcount:hover{ background:var(--a-panel); }
.a-tl-tcount.loading{ cursor:default; color:var(--a-faint); }
.a-tl-tn{ font-weight:700; font-variant-numeric:tabular-nums; }
.a-tl-tw{ color:var(--a-dim); }
.a-tl-tl{ color:var(--a-red); }
.a-tl-row.tasks .a-tl-cell.dragover{ background:var(--a-blue-soft); background:color-mix(in srgb, var(--a-blue) 14%, transparent); outline:1px dashed var(--a-blue); outline-offset:-2px; }
/* A cell under 1280px keeps the bare number: the words and the late split read only where the column can hold them (both stay in the button's name). */
@media (max-width:1279px){ .a-tl-tw, .a-tl-tl{ display:none; } }
@media (pointer:coarse){ .a-tl-fold, .a-tl-showall, .a-tl-tcount{ min-height:44px; } }
/* A narrow column stacks its two doors, full width, so neither is clipped. */
@media (max-width:1439px){
  .a-tl-row.tasks .a-cg-addrow{ flex-direction:column; gap:3px; }
  .a-tl-row.tasks .a-cg-addrow .a-cg-add{ flex:none; width:100%; }
}
.a-tl-row .a-cg-ev, .a-tl-row .a-tcard{ min-width:0; }
.a-tl-cell.today{ background:transparent; background:color-mix(in srgb, var(--a-blue-soft) 40%, transparent); }

@media (prefers-reduced-motion: reduce){ .a-tl, .a-tl *{ transition:none !important; animation:none !important; } }

/* A task dragged over a Week hour column (calGridDropTarget): the drop wash on the column, and its label floating inside the column just
   above the pointer (.a-tl-droplab, placed by the grid), since the head row can scroll out of sight. Absolute and never hit: nothing grows
   or moves under the pointer mid-drag. A free slot in the column takes the drop itself (alt-calendar-free.css). */
.a-tl-col.dragover{ background-color:var(--a-blue-soft); background-color:color-mix(in srgb, var(--a-blue) 10%, transparent); }
.a-tl-droplab{
  position:absolute; left:4px; right:4px; z-index:5; padding:3px 6px; text-align:center; white-space:pre-line; pointer-events:none;
  border:1px dashed var(--a-blue); border-radius:var(--a-r-sm); background:var(--a-raised); box-shadow:var(--a-shadow);
  font-size:var(--a-fs-11); color:var(--a-blue-text);
}
