/* The calendar grid (JS/alt/alt-calendar-grid.js): Month, Week and Day around the shared task card
   (CSS/alt/alt-task-card.css). Host-agnostic: nothing here names a page. Tokens only. */

/* isolation: the grid's own z-indexes (sticky day header 1, empty-week card 2) order only its own layers and never leak into the page's. */
.a-cg{ position:relative; isolation:isolate; min-width:0; min-height:100%; color:var(--a-text); }
.a-cg.busy{ opacity:.7; }
.a-cg-none{ margin:0; padding:6px 2px; font-size:var(--a-fs-11); color:var(--a-faint); text-align:center; }

/* ---------- counts and meter: shared by every day header ---------- */
.a-cg-n{ display:flex; flex-wrap:wrap; gap:0 6px; font-size:var(--a-fs-11); color:var(--a-dim); font-variant-numeric:tabular-nums; white-space:nowrap; }
.a-cg-n .l{ color:var(--a-red); font-weight:600; }
.a-cg-meter{ display:flex; height:3px; margin-top:4px; border-radius:var(--a-r-sm); background:var(--a-line-soft); overflow:hidden; }
.a-cg-meter.thin{ height:2px; margin:0 6px; }
.a-cg-meter.thick{ height:5px; margin:2px 0 8px; border-radius:var(--a-r-sm); }
.a-cg-meter .d{ background:var(--a-green); }
.a-cg-meter .l{ background:var(--a-red); }
.a-cg-today{
  display:inline-flex; align-items:center; height:16px; padding:0 6px; border-radius:var(--a-r-pill);
  background:var(--a-blue-soft); border:1px solid var(--a-blue); color:var(--a-blue-text);
  font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-body); text-transform:uppercase; letter-spacing:.04em;
}

/* ---------- week ---------- */
.a-cg-week{ position:relative; display:grid; grid-template-columns:repeat(var(--cg-cols,7), minmax(0,1fr)); min-height:100%; }
.a-cg-col{
  display:flex; flex-direction:column; min-width:0; border-right:1px solid var(--a-line-soft);
  outline:1px solid transparent; outline-offset:-1px;
}
.a-cg-col:last-child{ border-right:none; }
.a-cg-col.today{ background:var(--a-blue-soft); }
.a-cg-col.empty .a-cg-b{ min-height:var(--cz-empty,120px); }
.a-cg-h{
  position:sticky; top:0; z-index:1; padding:8px 10px 6px;
  background:var(--a-float); border-bottom:1px solid var(--a-line-soft);
}
.a-cg-h1{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 6px; min-width:0; }
.a-cg-h1 .dn{ font-size:var(--a-fs-11); letter-spacing:.08em; text-transform:uppercase; color:var(--a-dim); }
.a-cg-h1 .dd{ font-size:var(--a-fs-13); font-weight:700; }
/* A day's header is a button over the Day switch: quiet at rest, the date underlines on hover, the ring is the shared one. */
.a-cg-hgo, .a-cg-dgo{ display:block; width:100%; margin:0; padding:0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; min-width:0; }
.a-cg-dgo{ width:auto; }
.a-cg-hgo:hover .dd, .a-cg-ch .a-cg-dgo:hover{ text-decoration:underline; color:var(--a-blue-text); }   /* scoped: .a-cg-ch .dd would win the color */
.a-cg-hgo:focus-visible, .a-cg-dgo:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; border-radius:var(--a-r-sm); }
.a-cg-b{ display:flex; flex-direction:column; gap:6px; padding:8px; min-width:0; flex:1 1 auto; }
.a-cg-col--one{ border-right:none; }

/* Where a dragged card will land: the target says so, the source dims (alt-task-card.css). */
.a-cg-col.dragover, .a-cg-cell.dragover, .a-cg-day-main.dragover{
  background:var(--a-blue-soft); background:color-mix(in srgb, var(--a-blue) 14%, transparent); outline-color:var(--a-blue);
}
.a-cg-col.dragover::after, .a-cg-cell.dragover::after, .a-cg-day-main.dragover::after{
  content:attr(data-drop); display:block; margin:6px 8px; padding:6px 8px; text-align:center; white-space:pre-line;   /* a second line: the Free time hint */
  border:1px dashed var(--a-blue); border-radius:var(--a-r-sm); font-size:var(--a-fs-11); color:var(--a-blue-text);
}

/* A column is narrow: the card's chips wrap onto a second row instead of clipping the lane name to a letter. */
.alt-app .a-cg .a-tcard-m{ flex-wrap:wrap; row-gap:3px; overflow:visible; }
.alt-app .a-cg .a-tcard-lane{ min-width:min-content; }

.a-cg-more:focus-visible,
.a-cg-brow:focus-visible, .a-cg-chip:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
.a-cg-addrow{ display:flex; gap:6px; min-width:0; }
.alt-app .a-cg-add{ margin-bottom:0; justify-content:center; padding:0 var(--a-sp-4); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }   /* the day column spaces its own rows; the shared add row is `.a-add-row` (DS-50), centred and one line in a narrow column */
.a-cg-addrow .a-cg-add{ flex:1 1 0; min-width:0; }

/* ---------- empty week, over the grid ---------- */
.a-cg-empty{
  position:absolute; z-index:2; inset:0; margin:auto; width:min(320px, calc(100% - 32px)); height:max-content;
  display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  padding:16px; border:1px dashed var(--a-line-strong); border-radius:var(--a-r-lg);
  background:var(--a-panel); font-size:var(--a-fs-12); color:var(--a-dim);
}
.a-cg-empty b{ font:600 var(--a-fs-13)/var(--a-lh-tight) var(--a-display); color:var(--a-text); }
.a-cg-empty-a{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:4px; }

/* ---------- skeleton: same size as the real card, so nothing jumps ---------- */
.a-cg-skel{ border-radius:var(--a-r-sm); background:var(--a-raised); border:1px solid var(--a-line-soft); border-left:3px solid var(--a-line-strong); }
.a-cg-skel--card{ height:var(--cz-skel-card,62px); }
.a-cg-skel--detail{ height:var(--cz-skel-detail,92px); }
.a-cg-skel--line{ height:var(--cz-skel-line,24px); }
@media (prefers-reduced-motion:no-preference){
  .a-cg-skel{ animation:a-cg-pulse 1.4s ease-in-out infinite; }
  @keyframes a-cg-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.55; } }
}

/* ---------- month ---------- */
.a-cg-month{ display:grid; grid-template-columns:repeat(var(--cg-cols,7), minmax(0,1fr)); grid-template-rows:auto; grid-auto-rows:minmax(calc(var(--cz-cell,112px) + var(--cg-ad-mx)),auto); }
.a-cg-dow{
  font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-display); letter-spacing:.06em; text-transform:uppercase;
  color:var(--a-faint); padding:6px 4px; text-align:center;
}
.a-cg-cell{
  display:flex; flex-direction:column; gap:3px; min-width:0; padding:4px 0;
  border-right:1px solid var(--a-line-soft); border-bottom:1px solid var(--a-line-soft);
  outline:1px solid transparent; outline-offset:-1px;
}
.a-cg-cell.out{ background:var(--a-panel); background:color-mix(in srgb, var(--a-bg) 60%, transparent); }
.a-cg-cell.today{ background:var(--a-blue-soft); }
.a-cg-ch{ display:flex; align-items:baseline; justify-content:space-between; gap:6px; padding:0 6px; min-width:0; }
.a-cg-ch .dd{ font:600 var(--a-fs-12)/var(--a-lh-ctl) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-dim); }
.a-cg-cell.today .a-cg-ch .dd{ color:var(--a-blue-text); }
.a-cg-ch .a-cg-n{ justify-content:flex-end; }
.a-cg-cb{ display:flex; flex-direction:column; gap:2px; padding:0 4px; min-width:0; overflow:hidden; }
.a-cg-more{
  border:0; background:transparent; color:var(--a-blue-text); font-size:var(--a-fs-11); cursor:pointer; text-align:left; padding:1px 4px; min-height:20px;
}
.a-cg-dots{ display:flex; flex-wrap:wrap; gap:3px; padding:2px 4px; }
.a-cg-dots i{ width:7px; height:7px; border-radius:50%; background:var(--a-blue); }
.a-cg-dots i.lead{ display:none; }
.a-cg-dots i.k-todo{ background:var(--a-line-strong); }
.a-cg-dots i.k-hold{ background:var(--a-amber); }
.a-cg-dots i.k-blocked{ background:var(--a-red); }
.a-cg-dots i.k-monitor{ background:var(--a-purple); }
.a-cg-dots i.k-complete{ background:var(--a-green); }

/* ---------- the popover: .a-cg-pop and its head, body and foot are the meeting card's, in CSS/alt/alt-event-card.css ---------- */

/* ---------- day ---------- */
.a-cg-day{ display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:12px; padding:12px; align-items:start; }
.a-cg-day-main{ min-width:0; display:flex; flex-direction:column; border-radius:var(--a-r-lg); outline:1px solid transparent; outline-offset:-1px; }
.a-cg-dayh{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.a-cg-dayh1{ display:flex; align-items:center; gap:8px; flex:1 1 auto; min-width:0; }
.a-cg-dayh1 b{ font:600 var(--a-fs-14)/var(--a-lh-tight) var(--a-display); }
.a-cg-day .a-cg-b{ padding:0; gap:8px; }
.a-cg-sec{
  display:flex; align-items:center; gap:6px; margin:6px 0 0; font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-display);
  letter-spacing:.06em; text-transform:uppercase; color:var(--a-dim);
}
.a-cg-sec-n{ font-variant-numeric:tabular-nums; color:var(--a-faint); }
.a-cg-side{ display:flex; flex-direction:column; gap:12px; min-width:0; }
.a-cg-side-s{ display:flex; flex-direction:column; gap:2px; padding:8px; border:1px solid var(--a-line-soft); border-radius:var(--a-r-lg); background:var(--a-raised); }
.a-cg-side-h{ margin:0 0 4px; font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-display); letter-spacing:.06em; text-transform:uppercase; color:var(--a-dim); }
.a-cg-side-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; }
.a-cg-side-top .a-cg-side-h{ margin:0; }
/* The two icons are the card's glyph span (the grid assigns no innerHTML), so the buttons' own `> svg` sizing needs restating one level down. */
.alt-app .a-cg-side-x .a-tcard-ic, .alt-app .a-cg-side-tab .a-tcard-ic{ color:inherit; }
.alt-app .a-cg-side-x .a-tcard-ic > svg, .alt-app .a-cg-side-tab .a-tcard-ic > svg{ width:15px; height:15px; flex:0 0 auto; }
.a-cg-day.split{ grid-template-columns:minmax(0,1fr); }
/* A shut panel: one 34px track above 1023px holding the rail's own 26x44 tab; a ghost button in the panel's place at and below it. */
.a-cg-side-shut{ display:flex; justify-content:center; align-items:flex-start; min-width:0; }
.a-cg-side-shut .a-pane-tab{ display:flex; }
.a-cg-side-shut .a-cg-side-show{ display:none; }
.a-cg-day.side-shut{ grid-template-columns:minmax(0,1fr) 34px; }
.a-cg-brow{
  display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:28px; padding:0 6px;
  border:1px solid transparent; border-radius:var(--a-r-sm); background:transparent; color:var(--a-text);
  font: var(--a-fs-12)/var(--a-lh-tight) var(--a-body); cursor:pointer; text-align:left;
}
.a-cg-brow:hover{ background:var(--a-panel); }
.a-cg-brow.on{ background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text); }
.a-cg-brow .k{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-cg-brow .n{ font-variant-numeric:tabular-nums; color:var(--a-dim); }

.a-cg-datepick{ position:absolute; right:0; top:100%; width:1px; height:1px; opacity:0; }

/* The class is only ever set at phone width (JS/alt/alt-calendar-grid.js), so these need no query of their own. */
.a-cg-month.dots-only .a-cg-cb > .a-tcard, .a-cg-month.dots-only .a-cg-more{ display:none; }
.a-cg-month.dots-only .a-cg-dots i.lead{ display:inline-block; }

/* ---------- narrow: a strip of day chips and one day's list; month becomes dots and counts ---------- */
.a-cg-week.strip{ display:flex; flex-direction:column; }
.a-cg-chips{ display:grid; grid-template-columns:repeat(var(--cg-cols,7), minmax(0,1fr)); gap:4px; padding:8px; border-bottom:1px solid var(--a-line-soft); }
.a-cg-chip{
  display:flex; flex-direction:column; align-items:center; gap:2px; min-height:56px; padding:4px 2px;
  border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm); background:var(--a-raised);
  color:var(--a-text); cursor:pointer; font:inherit;
}
.a-cg-chip .dn{ font-size:var(--a-fs-11); text-transform:uppercase; color:var(--a-dim); }
.a-cg-chip .n{ font-size:var(--a-fs-11); color:var(--a-faint); font-variant-numeric:tabular-nums; }
.a-cg-chip.today{ border-color:var(--a-blue); }
.a-cg-chip.on{ background:var(--a-blue-soft); border-color:var(--a-blue); }
.a-cg-chip .a-cg-meter{ width:80%; margin-top:0; }

@media (max-width:1023px){
  .a-cg-day, .a-cg-day.side-shut{ grid-template-columns:minmax(0,1fr); }
  .a-cg-side-shut{ justify-content:flex-start; }
  .a-cg-side-shut .a-pane-tab{ display:none; }
  .a-cg-side-shut .a-cg-side-show{ display:inline-flex; }
  /* Stacked: the panel is always in view, so its hide control stands down (the stored choice is kept). */
  .a-cg-side-x{ display:none; }
}
@media (max-width:900px){
  .a-cg-month{ grid-auto-rows:minmax(calc(var(--cz-cell,112px) - 16px + var(--cg-ad-mx)),auto); }
  .a-cg-ch .a-cg-n .d{ display:none; }
}
@media (max-width:640px){
  .a-cg-month{ grid-auto-rows:minmax(64px,auto); }          /* dots only: zoom does not grow it */
  .a-cg-month .a-cg-ch{ flex-direction:column; align-items:flex-start; gap:2px; }
  .a-cg-month .a-cg-n .o, .a-cg-month .a-cg-n .l{ font-size:var(--a-fs-11); }
  .a-cg-cell{ cursor:pointer; min-height:44px; }
}

/* ---------- Outlook events: a read-only band, apart from the tasks ----------
   Neutral, with a dashed left edge where a task card has a solid status one, a calendar mark and no checkbox (spec D5). */
.a-cg-ev-band{ display:flex; flex-direction:column; gap:3px; min-width:0; padding-bottom:6px; border-bottom:1px dashed var(--a-line-soft); }
.a-cg-day .a-cg-ev-band, .a-cg-pop-b .a-cg-ev-band{ padding-bottom:0; border-bottom:0; }
/* A gap between meetings: plain faint text in the band, no box and no pointer (display-only; the meeting rows are the controls). */
.a-cg-break{ padding:1px 6px; font: var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-faint); font-variant-numeric:tabular-nums; }

.a-cg-ev{
  display:flex; align-items:baseline; gap:6px; min-width:0; width:100%; padding:var(--cz-pad,2px) 6px; text-align:left; cursor:pointer;
  background:var(--a-raised); color:var(--a-text); font:var(--cz-fs,13px)/var(--a-lh-ui) var(--a-body);
  border:1px solid var(--a-line-soft); border-left:3px dashed var(--a-line-strong); border-radius:var(--a-r-sm);
}
.a-cg-ev:hover{ border-color:var(--a-line-strong); }
.a-cg-ev:focus-visible, .a-cg-ev-more:focus-visible, .a-cg-ev-sum:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
.a-cg-ev .t{ flex:none; font:var(--cz-fs-s,12px)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-dim); }
.a-cg-ev .s{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-cg-ev .g{ position:relative; top:1px; flex:none; width:11px; height:11px; border:1.5px solid var(--a-faint); border-radius:0; }   /* the calendar mark is SQUARE: --a-r-sm (6px) on an 11px box draws the past row's round clock (DS-05 radii are for controls; 0 is allowed) */
.a-cg-ev .g::before{ content:""; position:absolute; left:0; right:0; top:2px; border-top:1.5px solid var(--a-faint); }
.a-cg-ev.allday{ border-left-style:solid; background:var(--a-panel); font-weight:600; }
/* "All day" sits where a timed row's time does; in a Week column it wraps above the title rather than squeezing it. */
.a-cg-ev.allday .t{ font-weight:400; }
.a-cg-week .a-cg-ev.allday{ flex-wrap:wrap; row-gap:0; }
.a-cg-ev.tentative{ background:repeating-linear-gradient(135deg, var(--a-raised) 0 5px, var(--a-panel) 5px 10px); }
.a-cg-ev.free{ background:transparent; }
.a-cg-ev.oof{ background:var(--a-panel); color:var(--a-dim); }
.a-cg-ev.pending{ background:repeating-linear-gradient(45deg, var(--a-blue-soft) 0 6px, var(--a-panel) 6px 12px); border-left-style:solid; border-left-color:var(--a-blue); }
/* F2: an all-day row has ONE ground whatever its showAs. Three classes beat .free / .oof / .tentative (two) by specificity, not by file order. */
.a-cg-ev.allday.free, .a-cg-ev.allday.oof, .a-cg-ev.allday.tentative{ background:var(--a-panel); }
.a-cg-ev.allday.oof:not(.past):not(.ended){ color:var(--a-text); }
.a-cg-ev.allday.past, .a-cg-ev.allday.ended{ color:var(--a-faint); }
.a-cg-ev .pn{ flex:none; font:700 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-blue-text); text-transform:uppercase; letter-spacing:.04em; }
.a-cg-ev.cancel .s{ text-decoration:line-through; color:var(--a-faint); }
/* The now line: the accent on today's meetings band, aria-hidden, with a static screen-reader node (.a-sr). A past meeting steps
   to the faint text colour (never opacity, never a strikethrough: that means cancelled); the one under way keeps an accent edge. */
.a-cg-now{ position:relative; flex:none; height:14px; margin:1px 0; container-type:inline-size; pointer-events:none; }
.a-cg-now-v{ position:absolute; inset:0; display:flex; align-items:center; gap:4px; }
.a-cg-now-d{ flex:none; width:10px; height:10px; border-radius:50%; background:var(--a-now); box-shadow:0 0 0 1px var(--a-panel); }
.a-cg-now-r{ flex:1; min-width:0; height:3px; border-radius:var(--a-r-pill); background:var(--a-now); box-shadow:0 0 0 1px var(--a-panel); }
.a-cg-now-t{ flex:none; padding:1px 6px; border-radius:var(--a-r-pill); background:var(--a-now); color:var(--a-on-now); font:700 var(--a-fs-12)/var(--a-lh-ctl) var(--a-body); font-variant-numeric:tabular-nums; }
@container (max-width:96px){ .a-cg-now-t{ display:none; } }
.a-cg-ev.ended{ color:var(--a-faint); }
.a-cg-ev.ended .t, .a-cg-ev.ended .s, .a-cg-ev.ended .l, .a-cg-ev.ended .w, .a-cg-ev.ended .n{ color:var(--a-faint); }
/* PAST: an earlier day's row (.past, set at build) and today's ended row (.ended, flipped in place by the minute tick) look the same, and the
   look is all CSS so a flip changes no node. The receded row: the done card's ground (--a-panel), faint ink (4.5:1 or better on it), a thin
   dotted edge in place of the 3px dashed one, a clock for the calendar mark, and the detail lines gone. NEVER opacity (it lowers contrast
   unpredictably over a wash) and NEVER a strikethrough (that means cancelled, and a past cancelled row keeps its own). A pending row keeps
   its Pending word and solid stripe, but the hatch goes and the stripe fades from blue to the strong line: either one bright says "still in play". The 2px of edge width given up is paid back in padding. */
.a-cg-ev.past:not(.pending), .a-cg-ev.ended:not(.pending){
  background:var(--a-panel); font-weight:400; border:1px dotted var(--a-line-soft); padding-left:8px;
}
.a-cg-ev.past.pending, .a-cg-ev.ended.pending{ background:var(--a-panel); font-weight:400; border-left-color:var(--a-line-strong); }
.a-cg-ev.past, .a-cg-ev.past .t, .a-cg-ev.past .s{ color:var(--a-faint); }
.a-cg-ev.past .x, .a-cg-ev.past .w, .a-cg-ev.past .n, .a-cg-ev.ended .x, .a-cg-ev.ended .w, .a-cg-ev.ended .n{ display:none; }
.a-cg-ev.past .g, .a-cg-ev.ended .g{ border-radius:50%; }
.a-cg-ev.past .g::before, .a-cg-ev.ended .g::before{ left:50%; right:auto; top:1px; height:3px; border-top:0; border-left:1.5px solid var(--a-faint); }
.a-cg-ev.past .g::after, .a-cg-ev.ended .g::after{ content:""; position:absolute; left:50%; top:3.5px; width:2.5px; border-top:1.5px solid var(--a-faint); }
.a-cg-ev-sum.past{ color:var(--a-faint); border-left:1px dotted var(--a-line-soft); padding-left:6px; }
.a-cg-col.past .a-cg-h1 .dd{ color:var(--a-dim); }
/* A meeting under way (--now-p, 0..1, is the share elapsed, set inline by the tick): its own stacking context (rule 0, text 1, chip 2),
   a left-edge gauge filled to the share, and the Today wash down to it. The host row also carries the rule and the chip. No transition. */
.a-cg-ev.live{
  position:relative; isolation:isolate; container-type:inline-size; border-left-color:transparent; border-left-style:solid;
  background-image:linear-gradient(to bottom, var(--a-blue-soft) calc(var(--now-p, 0) * 100%), transparent 0);
}
.a-cg-ev.live.tentative{
  background-image:linear-gradient(to bottom, var(--a-blue-soft) calc(var(--now-p, 0) * 100%), transparent 0), repeating-linear-gradient(135deg, var(--a-raised) 0 5px, var(--a-panel) 5px 10px);
}
.a-cg-ev.live::before{
  content:""; position:absolute; left:-3px; top:-1px; bottom:-1px; width:3px; border-radius:var(--a-r-sm) 0 0 var(--a-r-sm);
  background:linear-gradient(to bottom, var(--a-blue) calc(var(--now-p, 0) * 100%), var(--a-line-strong) 0);
}
/* Focus time, lunch and flights (Day and Week rows only; Month never draws them). Style B, set apart from a free slot (flat strip, 3px inset bar, no
   chip) by four cues: a 1px box edge all round, a real 4px accent left border, a filled chip, and a lighter opaque wash. Past wins: panel
   ground, faint ink, dotted edge and an unfilled chip, no colour; a past kind row shows no clock (its cues are the edge, the ink, the chip and ", ended" in the name), and 9px of padding pays back the 3px of edge so content does not move. Live keeps its blue gauge (the left border goes transparent under it). */
.a-cg-ev .k{
  position:relative; flex:none; align-self:center; display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px;
  box-sizing:border-box; border-radius:var(--a-r-sm); color:var(--a-raised);
}
.alt-app .a-cg-ev .k .a-tcard-ic{ color:inherit; }
.a-cg-ev .k svg{ display:block; width:12px; height:12px; }
.a-cg-ev.k-focus{ border:1px solid var(--a-green); border-left:4px solid var(--a-green); background-color:var(--a-focus-wash); }
.a-cg-ev.k-lunch{ border:1px solid var(--a-orange); border-left:4px solid var(--a-orange); background-color:var(--a-lunch-wash); }
.a-cg-ev.k-flight{ border:1px solid var(--a-purple); border-left:4px solid var(--a-purple); background-color:var(--a-flight-wash); }
.a-cg-ev.k-focus:not(.live):not(.past):not(.ended):hover{ border-color:var(--a-green); }
.a-cg-ev.k-lunch:not(.live):not(.past):not(.ended):hover{ border-color:var(--a-orange); }
.a-cg-ev.k-flight:not(.live):not(.past):not(.ended):hover{ border-color:var(--a-purple); }
.a-cg-ev.k-focus .k{ background:var(--a-green); }
.a-cg-ev.k-lunch .k{ background:var(--a-orange); }
.a-cg-ev.k-flight .k{ background:var(--a-purple); }
.a-cg-ev.k-focus .s, .a-cg-ev.k-lunch .s, .a-cg-ev.k-flight .s{ font-weight:600; color:var(--a-text); }
/* The wash replaces the tentative hatch; a live tentative row keeps only the gauge. */
.a-cg-ev.k-focus.tentative:not(.live), .a-cg-ev.k-lunch.tentative:not(.live), .a-cg-ev.k-flight.tentative:not(.live){ background-image:none; }
.a-cg-ev.k-focus.live.tentative, .a-cg-ev.k-lunch.live.tentative, .a-cg-ev.k-flight.live.tentative{ background-image:linear-gradient(to bottom, var(--a-blue-soft) calc(var(--now-p, 0) * 100%), transparent 0); }
.a-cg-ev.k-focus.live, .a-cg-ev.k-lunch.live, .a-cg-ev.k-flight.live{ border-left-color:transparent; }
.a-cg-ev.k-focus.live::before, .a-cg-ev.k-lunch.live::before, .a-cg-ev.k-flight.live::before{ left:-4px; width:4px; }
.a-cg-ev.k-focus.live .a-cg-now-in, .a-cg-ev.k-lunch.live .a-cg-now-in, .a-cg-ev.k-flight.live .a-cg-now-in{ left:-4px; }
.a-cg-ev.k-focus.live .a-cg-now-in .a-cg-now-d, .a-cg-ev.k-lunch.live .a-cg-now-in .a-cg-now-d, .a-cg-ev.k-flight.live .a-cg-now-in .a-cg-now-d{ left:-2.5px; }
.a-cg-ev.k-focus.live .a-cg-now-in .a-cg-now-r, .a-cg-ev.k-lunch.live .a-cg-now-in .a-cg-now-r, .a-cg-ev.k-flight.live .a-cg-now-in .a-cg-now-r{ left:4px; }
.a-cg-ev.k-focus.past, .a-cg-ev.k-focus.ended, .a-cg-ev.k-lunch.past, .a-cg-ev.k-flight.past, .a-cg-ev.k-lunch.ended, .a-cg-ev.k-flight.ended{ border:1px dotted var(--a-line-soft); background-color:var(--a-panel); padding-left:9px; }
.a-cg-ev.k-focus.past .s, .a-cg-ev.k-focus.ended .s, .a-cg-ev.k-lunch.past .s, .a-cg-ev.k-flight.past .s, .a-cg-ev.k-lunch.ended .s, .a-cg-ev.k-flight.ended .s{ font-weight:400; color:var(--a-faint); }
.a-cg-ev.k-focus.past .k, .a-cg-ev.k-focus.ended .k, .a-cg-ev.k-lunch.past .k, .a-cg-ev.k-flight.past .k, .a-cg-ev.k-lunch.ended .k, .a-cg-ev.k-flight.ended .k{
  background:transparent; color:var(--a-faint); box-shadow:inset 0 0 0 1px var(--a-line-soft);
}
.a-cg-now-in{ position:absolute; left:-3px; right:0; top:-1px; bottom:-1px; pointer-events:none; }
.a-cg-now-in .a-cg-now-d, .a-cg-now-in .a-cg-now-r{ position:absolute; z-index:0; top:calc(var(--now-p, 0) * 100%); }
.a-cg-now-in .a-cg-now-d{ left:-3.5px; margin-top:-5px; }
.a-cg-now-in .a-cg-now-r{ left:3px; right:0; width:auto; margin-top:-1.5px; }
.a-cg-now-c{
  position:absolute; z-index:2; right:3px; top:clamp(0px, calc(var(--now-p, 0) * 100% - 8px), calc(100% - 16px)); box-sizing:border-box; height:16px;
  display:flex; align-items:center; gap:3px; padding:0 5px; border:1px solid var(--a-now); border-radius:var(--a-r-pill);
  background:var(--a-now); font:700 var(--a-fs-11)/var(--a-lh-ctl) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-on-now); white-space:nowrap;
}
.a-cg-now-ct{ flex:none; }
.a-cg-now-lf{ display:none; }
@container (min-width:220px){ .a-cg-now-lf{ display:inline; } }
@container (max-width:96px){ .a-cg-now-c{ display:none; } }
.a-cg-ev.rich .a-cg-now-c{ display:none; }
@container (min-width:97px){ .a-cg-day .a-cg-ev.rich .a-cg-now-c{ display:flex; } }
.a-cg-now-cap{ order:9; font:var(--cz-fs-s, 12px)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-blue-text); }
/* The text stays above the rule; a halo in the row colour breaks the rule around glyphs so it never reads as a strikethrough (that means cancelled). */
.a-cg-host > *:not(.a-cg-now-in){ position:relative; z-index:1; text-shadow:0 0 2px var(--a-raised), 0 0 2px var(--a-raised), 0 0 1px var(--a-raised); }
.a-cg-ev-more{ border:0; background:transparent; color:var(--a-blue-text); font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); cursor:pointer; text-align:left; padding:1px 2px; min-height:20px; }
.a-cg-ev-sum{
  display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-height:20px;
  border:0; border-left:3px dashed var(--a-line-strong); background:transparent; color:var(--a-dim);
  font: var(--a-fs-11)/var(--a-lh-ui) var(--a-body); text-align:left; cursor:pointer; padding:0 2px 0 5px;
}
.a-cg-chip .ev{ font-size:var(--a-fs-11); color:var(--a-dim); font-variant-numeric:tabular-nums; }
@media (max-width:1280px){
  .a-cg-week .a-cg-ev:not(.allday) .g{ display:none; }
  .a-cg-week .a-cg-ev:not(.allday) .k{ display:inline-flex; }   /* the chip is the kind's cue: it stays at every width */
  /* The clock is the narrow monitor's main past cue, so a row that is over keeps it at every width. */
  .a-cg-week .a-cg-ev.past:not(.allday) .g, .a-cg-week .a-cg-ev.ended:not(.allday) .g{ display:block; }
}
.a-cg-cell .a-cg-ev .g{ display:none; }

/* ---------- the All-day section (spec allday-separation-2026-11-02, contracts C3/C4/C8) ----------
   A folding header over a darker ground (--a-bg under the --a-panel pane) with a rule, then the all-day rows. Week columns pull it to the
   column edges, Month cells keep it compact. --cg-ad-rows (set by the grid on .a-cg-week / .a-cg-month, 0 when folded) gives every
   section the same height, and the .empty spacer takes that height and draws nothing. A reason is an amber chip; where the row is too
   narrow for it (Week columns, Month cells) the .g mark is filled amber instead, so the cue is shape AND colour. */
.a-cg-ad{
  --cg-ad-hh:26px; --cg-ad-rh:calc(var(--cz-fs,13px) * var(--a-lh-ui) + var(--cz-pad,2px) * 2 + 2px);   /* the row's own line-height token (.a-cg-ev, DS-47), never a copy of it */
  --cg-ad-bh:calc(var(--cg-ad-rows, 0) * (var(--cg-ad-rh) + 3px));
  box-sizing:border-box; display:flex; flex-direction:column; min-width:0; background:var(--a-bg);
  border-bottom:1px solid var(--a-line-strong); border-radius:var(--a-r-sm) var(--a-r-sm) 0 0;
}
.a-cg-week:not(.strip) .a-cg-ad{ margin:-8px -8px 0; border-radius:0; }
.a-cg-cell .a-cg-ad{ --cg-ad-hh:var(--cg-ad-mhh); --cg-ad-rh:var(--cg-ad-mrh); }
/* Month: every row is as tall as the tallest section adds (WP1 sets --cg-ad-mhas and --cg-ad-mrows on .a-cg-month), so a week row holding the
   section and one without come out equal. Added height = header + 1px rule + the 2px .a-cg-cb gap, plus the aligned rows at (row + 3px). */
.a-cg-month{
  --cg-ad-mhh:22px; --cg-ad-mrh:22px;
  --cg-ad-mx:calc(var(--cg-ad-mhas, 0) * (var(--cg-ad-mhh) + 3px) + var(--cg-ad-mrows, 0) * (var(--cg-ad-mrh) + 3px));
}
.a-cg-ad.empty{
  visibility:hidden; background:transparent; border-bottom-color:transparent; pointer-events:none;
  min-height:calc(var(--cg-ad-hh) + 1px + var(--cg-ad-bh));
}
.a-cg-ad-h{
  display:flex; align-items:center; gap:6px; width:100%; min-height:var(--cg-ad-hh); margin:0; padding:0 6px; border:0; border-radius:inherit;
  background:transparent; color:var(--a-dim); cursor:pointer; text-align:left;
  font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-display); letter-spacing:.06em; text-transform:uppercase;
}
.a-cg-week:not(.strip) .a-cg-ad-h{ padding:0 8px; }
.a-cg-ad-h:not(.static):hover{ background:var(--a-panel); color:var(--a-text); }
.a-cg-ad-h:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
.a-cg-ad-h.static{ cursor:default; }
.a-cg-ad-chev{ display:inline-block; flex:none; width:10px; text-align:center; transition:transform 140ms linear; }
/* One chevron for both Week folds: the all-day header and the TASKS corner (alt-calendar-timeline.css) share this glyph, angle and timing. */
.a-cg-ad[data-open="false"] .a-cg-ad-chev, .a-tl-fold[aria-expanded="false"] .a-cg-ad-chev{ transform:rotate(-90deg); }
.a-cg-ad-l{ flex:none; white-space:nowrap; }
.a-cg-ad-n{ flex:none; font-variant-numeric:tabular-nums; }
.a-cg-ad-sum{
  display:none; flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  text-transform:none; letter-spacing:0; font:600 var(--a-fs-11)/var(--a-lh-ctl) var(--a-body); color:var(--a-amber);
}
.a-cg-ad[data-open="false"] .a-cg-ad-sum{ display:block; }
.a-cg-ad[data-open="false"] .a-cg-ad-b{ display:none; }
.a-cg-ad-b{
  box-sizing:border-box; display:flex; flex-direction:column; gap:3px; min-width:0; padding:0 6px 3px; min-height:var(--cg-ad-bh);
}
.a-cg-ad .a-cg-ev.allday{ flex-wrap:nowrap; align-items:center; min-height:var(--cg-ad-rh); }
.a-cg-cell .a-cg-ad .a-cg-ev.allday{ padding:1px 4px; font-size:var(--a-fs-11); }
.a-cg-ad .a-cg-ev .s{ flex:1 1 auto; }
.a-cg-ad-why{
  flex:none; padding:0 6px; color:var(--a-amber); background:var(--a-amber-soft); border:1px solid var(--a-amber);
  border-radius:var(--a-r-pill); font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); white-space:nowrap;
}
.a-cg-ev.past .a-cg-ad-why, .a-cg-ev.ended .a-cg-ad-why{ color:var(--a-faint); background:transparent; border-color:var(--a-line-soft); }
.a-cg-week:not(.strip) .a-cg-ad-why, .a-cg-month .a-cg-ad-why{ display:none; }
.a-cg-ad .a-cg-ev.blocks:not(.past):not(.ended) .g{ background:var(--a-amber); border-color:var(--a-amber); }
.a-cg-ad .a-cg-ev.blocks:not(.past):not(.ended) .g::before{ border-top-color:var(--a-panel); }
.a-cg-week:not(.strip) .a-cg-ad .a-cg-ev.allday .g, .a-cg-cell .a-cg-ad .a-cg-ev.allday .g{ display:block; }
.a-cg-ad-more{
  border:0; background:transparent; color:var(--a-blue-text); font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); cursor:pointer; text-align:left;
  padding:1px 2px; min-height:var(--cg-ad-rh);
}
.a-cg-ad-more:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
/* The Month cell rule above is more specific than .a-cg-ad, so the coarse override names it too; the row height follows the 44px control so the aligned maths holds. */
@media (pointer:coarse){ .a-cg-ad{ --cg-ad-hh:44px; } .a-cg-month{ --cg-ad-mhh:44px; --cg-ad-mrh:44px; } }
/* A day before today recedes like every other past row: faint summary, never amber. */
.a-cg-ad.past .a-cg-ad-sum{ color:var(--a-faint); }
@media (prefers-reduced-motion:reduce){ .a-cg-ad-chev{ transition:none; } }
@media (max-width:640px){
  .a-cg-month .a-cg-ev-sum .w{ display:none; }
}

/* The event card: the day popover's frame, with label and value rows. */
/* The meeting card itself (.a-cg-evpop*) is styled by CSS/alt/alt-event-card.css. */

/* ---------- the Outlook chip and the bar note (drawn by altTasksCalRenderBar() in JS/alt/alt-tasks.js) ---------- */
.a-ocal{ display:inline-flex; align-items:center; gap:2px; }
.a-ocal-dot{ flex:none; width:8px; height:8px; border-radius:50%; background:var(--a-faint); }
.a-ocal-dot.ok{ background:var(--a-green); }
.a-ocal-dot.warn{ background:var(--a-amber); }
.a-ocal-dot.err{ background:var(--a-red); }
/* On the pressed chip (white text on --a-blue-fill) --a-green is ~1.5:1 and the dot vanishes. A ring in the chip's own text
   colour outlines the dot (white on the fill 4.5:1+), and the connected fill steps to the deeper --green so it also reads inside the ring. */
.a-btn.a-focus-btn[aria-pressed="true"] .a-ocal-dot{ width:var(--a-dot); height:var(--a-dot); margin:0 2px; box-shadow:0 0 0 2px currentColor; }
.a-btn.a-focus-btn[aria-pressed="true"] .a-ocal-dot.ok{ background:var(--green); }
@media (prefers-reduced-motion:no-preference){ .a-ocal-dot.spin{ animation:a-cg-pulse 1s ease-in-out infinite; } }
.a-ocal-note{
  flex:1 1 100%; display:flex; align-items:center; gap:8px; min-width:0; padding:6px 10px;
  border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm); background:var(--a-panel); color:var(--a-dim); font-size:var(--a-fs-12);
}
.a-ocal-note-t{ flex:1 1 auto; min-width:0; }
/* The search line carries a long jump label ("2 more matches outside this week · Next: Mon, Nov 9 →"): on a narrow window the button drops under the
   sentence and its label wraps, rather than squeezing the sentence to nothing or running past the edge (measured at 390px). */
.a-ocal-note.a-ocal-search{ flex-wrap:wrap; }
.a-ocal-note.a-ocal-search .a-ocal-note-t{ flex:1 1 12em; }
.a-ocal-note.a-ocal-search .a-btn{ flex:0 1 auto; max-width:100%; height:auto; min-height:var(--a-ctl-sm); padding:4px 9px; white-space:normal; text-align:left; }
.a-ocal-note.warn{ background:var(--a-amber-soft); border-color:var(--a-amber); color:var(--a-text); }
.a-ocal-note.err{ background:var(--a-red-soft); border-color:var(--a-red); color:var(--a-text); }
/* Not connected (D1): the same chip, quieter. A dashed edge says "not set up yet"; hover is the focus-btn wash. */
.a-btn.a-focus-btn.a-ocal-connect:not([aria-pressed="true"]){ border-style:dashed; border-color:var(--a-blue); color:var(--a-blue-text); }
.a-btn.a-focus-btn.a-ocal-connect:not([aria-pressed="true"]):hover{ color:var(--a-text); }
/* Day, not connected: one faint line under the bar saying where free time comes from (spec §1). */
.a-ocal-offer{ flex:1 1 100%; margin:0; }

/* Motion: colour only; layout never eases. */
.a-cg-add, .a-cg-more, .a-cg-brow, .a-cg-chip, .a-cg-ev{
  transition:background-color var(--dur-micro, 140ms) linear, border-color var(--dur-micro, 140ms) linear, color var(--dur-micro, 140ms) linear;
}
.a-cg-col, .a-cg-cell, .a-cg-day-main{
  transition:background-color var(--a-quick) var(--a-ease), outline-color var(--a-quick) var(--a-ease);
}

/* The grid's type is the shared size scale (CSS/alt/alt-size-scale.css): title --z-p, secondary --z-s, title lines --z-ctl. Level blocks below keep layout only. */
.a-cg, .a-cfree{ --cz-fs:var(--z-p, 13px); --cz-fs-s:var(--z-s, 12px); --cz-title:var(--z-ctl, 1); }
/* ---------- calendar zoom: five levels (spec section 1) ----------
   A level sets row padding, type size, cell and skeleton heights through the --cz-* variables below, and the grid draws more detail
   per meeting (JS). Level 1 is the defaults written into each rule, so it needs no block. The variables are set twice: on the grid's own
   data-zoom (what was last drawn) and on the host region's data-cal-zoom (set the instant the control moves, so heights follow before
   the one rebuild); the live selector carries [data-view] so it outranks the drawn level and a drag DOWN previews too. Type steps stay at 11px or more; there is no transform: scale(). */
.a-cg[data-zoom="2"], [data-cal-zoom="2"] .a-cg[data-view]{ --cz-pad:4px; --cz-line-h:24px; --cz-cell:140px; --cz-empty:150px; --cz-skel-card:70px; --cz-skel-detail:100px; --cz-skel-line:26px; }
.a-cg[data-zoom="3"], [data-cal-zoom="3"] .a-cg[data-view]{ --cz-pad:5px; --cz-line-h:28px; --cz-cell:170px; --cz-empty:180px; --cz-skel-card:80px; --cz-skel-detail:110px; --cz-skel-line:28px; }
.a-cg[data-zoom="4"], [data-cal-zoom="4"] .a-cg[data-view]{ --cz-pad:6px; --cz-line-h:32px; --cz-cell:210px; --cz-empty:220px; --cz-skel-card:90px; --cz-skel-detail:120px; --cz-skel-line:30px; }
.a-cg[data-zoom="5"], [data-cal-zoom="5"] .a-cg[data-view]{ --cz-pad:8px; --cz-line-h:36px; --cz-cell:260px; --cz-empty:260px; --cz-skel-card:100px; --cz-skel-detail:130px; --cz-skel-line:32px; }
[data-cal-zoom="1"] .a-cg[data-view]{ --cz-pad:2px; --cz-line-h:0px; --cz-cell:112px; --cz-empty:120px; --cz-skel-card:62px; --cz-skel-detail:92px; --cz-skel-line:24px; }
/* The stacked meeting row (level 2 and up, Cards): time range, title, then the details the feed has. */
.a-cg-ev.rich{ flex-direction:column; align-items:stretch; gap:2px; }
.a-cg-ev .h{ display:flex; align-items:baseline; gap:6px; min-width:0; }
.a-cg-ev.rich .s{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:var(--cz-title,2); overflow:hidden; white-space:normal; overflow-wrap:anywhere;
}
.a-cg-ev .x{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 6px; min-width:0; }
.a-cg-ev .l{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--a-dim); font-size:var(--cz-fs-s,12px); }
.a-cg-ev .l::before{
  content:""; display:inline-block; width:7px; height:7px; margin-right:5px; border:1.5px solid var(--a-faint); border-radius:50% 50% 50% 0; transform:rotate(-45deg);
}
.a-cg-ev .j{
  flex:none; padding:0 7px; border-radius:var(--a-r-pill); background:var(--a-blue-soft); color:var(--a-blue-text); font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body);
}
.a-cg-ev .w{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--a-dim); font-size:var(--cz-fs-s,12px); }
.a-cg-ev .n{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--a-dim); font-size:var(--cz-fs-s,12px); }
/* Lines: one line per row at every level; only the height and type grow. */
.a-cg-ev-band.lines .a-cg-ev{ align-items:center; min-height:var(--cz-line-h,0); }
/* The task cards grow with the meetings (the grid's own level, so these follow the rebuild): Lines get the row height and type, the
   Cards and Detail titles the larger type. */
.alt-app .a-cg .a-tcard--line{ font-size:var(--z-s, 12px); min-height:var(--cz-line-h, 0); }
.alt-app .a-cg .a-tcard--line .a-tcard-t{ font-size:var(--z-p, 13px); }
.alt-app .a-cg .a-tcard--card .a-tcard-t, .alt-app .a-cg .a-tcard--detail .a-tcard-t{ font-size:var(--z-p, 13px); }
/* Day and Week cards carry the Task size as data-z (Month's do not), so their type comes from the task level above and a line's
   height follows it too, not the Calendar size. Heights mirror the zoom table's --cz-line-h. */
.alt-app .a-cg .a-tcard[data-z="1"]{ --cz-line-h:0px; }
.alt-app .a-cg .a-tcard[data-z="2"]{ --cz-line-h:24px; }
.alt-app .a-cg .a-tcard[data-z="3"]{ --cz-line-h:28px; }
.alt-app .a-cg .a-tcard[data-z="4"]{ --cz-line-h:32px; }
.alt-app .a-cg .a-tcard[data-z="5"]{ --cz-line-h:36px; }

/* ---------- Day, Tasks beside: the two panes are a pair ----------
   The day sits in .a-cal-host (panel ground, soft border, large radius, 12px inside); the task column takes the same frame and inset, so the
   top edges meet and the first header rows (the date row, the Tasks row) share a 32px line and so a baseline. The Move button never shrinks or
   clips: the row wraps instead. */
.a-cal-split > .a-task-col{
  box-sizing:border-box; padding:12px; background:var(--a-panel); border:1px solid var(--a-line-soft); border-radius:var(--a-r-lg);
}
.a-cal-split .a-cg-dayh, .a-cal-split .a-tpane-h{ min-height:32px; }
.a-cg-dayh > .a-btn{ flex:none; }
.a-cg-dayh > .a-cg-n{ flex:0 1 auto; min-width:0; }

/* ---------- free time: an overlay in the band (JS calGridFreeSync; spec free-time-inline-2026-10-31 §3.1) ----------
   The blocks are alt-calendar-free.css's .a-cfree-sl.free / .sel / .c, class for class: no colour of theirs is restated here. A run is a
   container with a hairline and a head; nothing here sets a width, so the columns and the Day pane keep theirs. */
.a-cg-ev-band:empty{ display:none; }   /* the band exists for the overlay; with nothing in it, it takes no room */
.a-cg-free{ display:flex; flex-direction:column; gap:3px; min-width:0; padding:2px 0 2px 6px; border-left:1px dashed var(--a-green); }
.a-cg-free-h{ font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-dim); font-variant-numeric:tabular-nums; }
.a-cg-free-row{ display:flex; flex-wrap:wrap; gap:3px; min-width:0; }
.a-cg-free-row > .a-cfree-sl{ border-top:0; border-radius:var(--a-r-sm); min-height:26px; padding:2px 8px; cursor:pointer; }
.a-cg-free-row > .a-cfree-sl.c{ flex:1 1 calc(50% - 3px); padding:2px 6px; }
.a-cg-free-none{ padding:3px 6px; font: var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-dim); border:1px dashed var(--a-amber); border-radius:var(--a-r-sm); background:var(--a-amber-soft); }
/* Week header: "Free 6 h" selects the day; "No free time" is plain text. The slot is there (26px) whenever free time can be offered (the host passes cfg.free only then): on or off, the header is the same height. Unavailable: nothing is reserved (the count row cannot hold the door beside the counts at 127px). */
.a-cg-free-slot{ box-sizing:border-box; height:26px; overflow:hidden; }
.a-cg-free-day{
  display:inline-flex; align-items:center; margin-top:4px; height:22px; max-width:100%; box-sizing:border-box; padding:0 6px; border:1px solid var(--a-green); border-radius:var(--a-r-sm);
  background:var(--a-green-soft); color:var(--a-text); font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; cursor:pointer;
}
.a-cg-free-day:hover{ box-shadow:inset 0 0 0 1px var(--a-green); }
.a-cg-free-day:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
/* The door's words are flex items: a space at the edge of one collapses unless it is kept. */
.a-cg-free-day .x{ white-space:pre; }
.a-cg-free-day.none{ border-color:var(--a-line-soft); background:transparent; color:var(--a-faint); font-weight:400; cursor:default; }
/* The feed cannot vouch: the reason once, at the top, in the bar note's amber. */
.a-cg-free-note{ margin:8px; padding:6px 10px; border:1px solid var(--a-amber); border-radius:var(--a-r-sm); background:var(--a-amber-soft); color:var(--a-text); font-size:var(--a-fs-12); }
/* The selection bar's host: sticky to the bottom of the grid's scroller (alt-calendar-free.js draws the bar into it). */
.a-cg-freebar{ height:0; overflow:visible; }   /* the bar floats over the content; calFreeBarPad() gives this host the bar's height so the last row scrolls clear of it */
.a-cg-freebar:empty{ display:none; }
/* A filled reveal (components.css .reveal-in, fill both) leaves .a-page with an identity transform for good, and that makes it the containing block of every
   fixed descendant: the bar would be placed against the whole page, not the window. Backwards fill is the same entrance with no leftover transform. */
.a-page.reveal-in{ animation-fill-mode:backwards; }
/* A fixed bar still ranks inside its nearest stacking context, the isolated grid, so the Day side task list (a later sibling) painted over it.
   While a bar is drawn the whole grid ranks 1, above that pane and still below the task drawer (#altLeft, z 5). Never un-isolate: the grid's own
   z-indexes (1-6) then competed with the drawer and painted over it (owner 2026-11-09, "The task drawer is being hidden behind the calendar"). */
.a-cg:has(> .a-cg-freebar > .a-cfree-bar){ z-index:1; }
/* Floating like the calendar's other fixed layers: against the viewport, clear of the safe area, centred (the host's own box may sit anywhere in a tall page). */
.a-cg-freebar > .a-cfree-bar{
  position:fixed; z-index:var(--z-float, 200); left:50%; transform:translateX(-50%); bottom:max(8px, env(safe-area-inset-bottom, 0px));
  width:min(640px, calc(100vw - 16px)); margin:0; box-sizing:border-box;
}
/* Narrow Week strip: a weekday chip with open time carries a small green mark (its label says how many). */
.a-cg-chip-f{ display:block; width:6px; height:6px; border-radius:50%; background:var(--a-green); }
/* A pending hold: the pending meeting's hatch, one line, read-only (Undo is the toast's). */
.a-cg-hold{
  display:flex; align-items:baseline; flex-wrap:wrap; gap:0 6px; min-width:0; padding:var(--cz-pad,2px) 6px; font:var(--cz-fs,13px)/var(--a-lh-ui) var(--a-body); color:var(--a-text);
  background:repeating-linear-gradient(45deg, var(--a-blue-soft) 0 6px, var(--a-panel) 6px 12px);
  border:1px dashed var(--a-blue); border-left:3px solid var(--a-blue); border-radius:var(--a-r-sm);
}
.a-cg-hold .g{ flex:none; color:var(--a-blue-text); }
.a-cg-hold .t{ flex:none; font:var(--cz-fs-s,12px)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-dim); }
.a-cg-hold .s{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-cg-hold .pn{ flex:none; font:700 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); color:var(--a-blue-text); text-transform:uppercase; letter-spacing:.04em; }
/* Whatever element hosts the grid reserves its scrollbar's gutter, so a band that grows tall enough to scroll never narrows a column. */
:where(*):has(> .a-cg){ scrollbar-gutter:stable; }

/* ---------- double bookings: the List badge, the heading summary, the Week header's reserved row and the chip count (WP4; the Timeline's own cues are alt-calendar-timeline.css) ---------- */
.a-cg-cf-b{
  flex:none; margin-left:auto; padding:0 5px; border:1.5px solid var(--a-amber); border-radius:var(--a-r-sm);
  font:700 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-amber); background:transparent;
}
.a-cg-cf-b.x3{ background:var(--a-amber); color:var(--a-panel); }
/* Quiet and pressable, like "+N more meetings": text first, a focus ring, a 20px minimum target. */
.a-cg-cf-sum{
  margin-left:auto; border:0; background:transparent; padding:1px 4px; min-height:20px; border-radius:var(--a-r-sm); cursor:pointer;
  font:600 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); text-transform:none; letter-spacing:0; font-variant-numeric:tabular-nums; color:var(--a-amber); text-align:left;
}
.a-cg-cf-sum:hover{ text-decoration:underline; }
.a-cg-cf-sum:focus-visible{ outline:2px solid var(--a-ring); outline-offset:1px; }
/* One reserved row in every Week header when double bookings are on, so a day with none never changes a header's height. */
.a-cg-cf-slot{ box-sizing:border-box; height:22px; overflow:hidden; display:flex; align-items:center; min-width:0; }
.a-cg-cf-slot .a-cg-cf-sum{ margin-left:0; max-width:100%; overflow:hidden; white-space:normal; line-height:var(--a-lh-tight); }
/* Under 1280px the count wraps onto a second line, so every header reserves two lines (the slot, not the text, sets the height). */
@media (max-width:1279px){ .a-cg-cf-slot{ height:34px; } }
.a-cg-chip .cf{ font:700 var(--a-fs-11)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-amber); }
.a-cg-ev.rich > .a-cg-cf-b{ align-self:flex-end; margin-left:0; }
@media (forced-colors:active){
  .a-cg-now-d, .a-cg-now-r, .a-cg-now-t, .a-cg-now-c{ forced-color-adjust:none; background:Highlight; }
  .a-cg-now-t, .a-cg-now-c{ color:HighlightText; }
  .a-cg-now-c{ border-color:Highlight; }
  .a-cg-now-d, .a-cg-now-r{ box-shadow:0 0 0 1px Canvas; }
}

/* ---------- the calendar's TITLE: the date, larger, and a button that opens the jump picker ----------
   Scoped by id: the plain .a-tcal-range rule (alt-tasks.css) is another stylesheet's and still sets the box. */
#altCalRange.a-tcal-range{
  display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; padding:2px 8px; margin:0;
  border:1px solid transparent; border-radius:var(--a-r-sm); background:none; cursor:pointer;
  font:600 var(--a-fs-18)/var(--a-lh-ui) var(--a-display); color:var(--a-text); text-align:left;
}
#altCalRange.a-tcal-range:hover{ background:var(--a-raised); }
#altCalRange.a-tcal-range[aria-expanded="true"]{ background:var(--a-raised); border-color:var(--a-line); }
#altCalRange.a-tcal-range:focus-visible{ outline:2px solid var(--a-blue); outline-offset:1px; }
#altCalRange #altCalRangeText{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#altCalRange .a-ico, #altCalRange svg{ flex:none; width:14px; height:14px; color:var(--a-dim); }
@media (max-width:639px){ #altCalRange.a-tcal-range{ font-size:var(--a-fs-16); flex:1 1 100%; } }
@media (pointer:coarse){ #altCalRange.a-tcal-range{ min-height:44px; } }
/* The picker: a popover holding one month, in the rail mini calendar's own cells. */
#altCalPickPop.a-tcal-pick{ width:min(272px, 92vw); padding:var(--a-sp-12); }
#altCalPickPop .a-cal-h{ margin-bottom:6px; }

/* ---------- Hide weekends (the bar's briefcase toggle and its hint) ----------
   The toggle is `.a-btn.icon.sm.a-focus-btn` like the two quick toggles (pressed = the blue fill, set in alt-components.css): 26px, 44px on a coarse pointer.
   The hint is a quiet small button; below 640px the long sentence gives way to the short one, so the bar still wraps by whole controls. */
@media (pointer:coarse){ .a-btn.icon.sm.a-cal-weekends{ height:var(--a-touch); width:var(--a-touch); } }
.a-cal-weekend-hint{ flex:0 1 auto; min-width:0; }
.a-cal-weekend-hint .wk-long{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-cal-weekend-hint .wk-short{ display:none; }
@media (max-width:640px){
  .a-cal-weekend-hint .wk-long{ display:none; }
  .a-cal-weekend-hint .wk-short{ display:inline; }
}
