/* cd201 Glass tiles (INV-21 Acrylic Glass W1, A2757; plan docs/plans/plan_inv21_acrylic_glass.md, row 5): one frosted
   acrylic pane (the skin's .k-ag-pane, its mist first) holding the section heading, the engine's "Counting down to …"
   line in italic, then four small acrylic tiles in a row (days, hours, minutes, seconds): each tile is the skin's inner
   pane (.k-ag-pane--inner, its own mist first), a light 36u number and a small-caps label.
   The countdown markup is the engine's partial (src/partials/countdown.html) written out here with every hook kept
   (data-kjy-countdown, -label, -units, -done, data-unit d/h/m/s, role="timer"), because each tile needs its own mist
   as its first child. Still stage: the numbers show at once (the engine fills them on the server and ticks them every
   second). The dash-first state ("---" until the motion ends, owner rule) belongs to W2's motion, under .kjy-fx only.
   Nothing on a pane or above it may transform, filter or contain. */
.cd201 { position: relative; padding: var(--k-section-pad) var(--k-gutter); text-align: center; color: var(--ag-ink); }
.cd201 .cd201__pane { padding: calc(48 * var(--ag-u)) calc(14 * var(--ag-u)) calc(44 * var(--ag-u)); }

/* the engine's line ("Counting down to Ceremony"); empty or hidden parts take no space */
.cd201 .cd201__label { margin: calc(6 * var(--ag-u)) auto 0; max-width: 22em; font-style: italic; color: var(--ag-ink-2); text-wrap: balance; }
.cd201 .cd201__label:empty, .cd201 .cd201__done:empty, .cd201 .kjy-countdown [hidden] { display: none; }

/* the four tiles: one row at every size, each its own small pane of acrylic */
.cd201 .cd201__units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(7 * var(--ag-u)); width: 100%; margin: calc(26 * var(--ag-u)) auto 0; }
.cd201 .cd201__tile { border-radius: calc(12 * var(--ag-u));
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; margin: 0;
  padding: calc(18 * var(--ag-u)) calc(2 * var(--ag-u)) calc(14 * var(--ag-u)); }
/* a tile's own corner and inner hairline: smaller than a big pane's */
.cd201 .cd201__tile > .k-ag-mist { clip-path: inset(0 round calc(12 * var(--ag-u))); }
.cd201 .cd201__tile > .k-ag-mist::after { outline-offset: calc(-4 * var(--ag-u)); }
.cd201 .kjy-unit__n { display: block; letter-spacing: .02em; font-variant-numeric: lining-nums tabular-nums; }
.cd201 .kjy-unit__l { display: block; margin-top: calc(10 * var(--ag-u)); padding-left: .12em;
  font: 600 calc(9 * var(--ag-u))/1.2 var(--k-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ag-ink-2); }
.cd201 .cd201__done { margin-top: calc(20 * var(--ag-u)); font-style: italic; color: var(--ag-ink-2); }

/* tablet: bigger tiles, the caps tracked like the skin's */
@media (min-width: 700px) and (max-aspect-ratio: 999/1000) {
  .cd201 .cd201__pane { padding: calc(56 * var(--ag-u)) 8% calc(52 * var(--ag-u)); }
  .cd201 .cd201__units { width: min(100%, calc(440 * var(--ag-u))); gap: calc(10 * var(--ag-u)); }
  .cd201 .kjy-unit__l { letter-spacing: .22em; padding-left: .22em; }
}
/* laptop: the wide pane, the tiles held to a calm row in its middle (never stretched to the pane's width) */
@media (min-aspect-ratio: 1/1) {
  .cd201 .cd201__pane { padding: calc(56 * var(--ag-u)) 8% calc(52 * var(--ag-u)); }
  .cd201 .cd201__label { max-width: none; }
  .cd201 .cd201__units { width: min(100%, calc(560 * var(--ag-u))); gap: calc(14 * var(--ag-u)); }
  .cd201 .cd201__tile { padding: calc(22 * var(--ag-u)) calc(4 * var(--ag-u)) calc(18 * var(--ag-u)); }
  .cd201 .kjy-unit__l { letter-spacing: .22em; padding-left: .22em; }
}

/* W2 (A2786, D-440 item 6; D-187): the countdown starts as dashes (section.js arms it): a thin dash on each number until the
   numbers come into view, then they turn to numbers tile by tile, once. Colour only (the tiles are glass). Only under
   kjy-fx and is-armed: lite, Reduce motion and no script show the numbers. */
.cd201 .kjy-unit:nth-child(2) { --cd201-d: .16s; }
.cd201 .kjy-unit:nth-child(3) { --cd201-d: .32s; }
.cd201 .kjy-unit:nth-child(4) { --cd201-d: .48s; }
html.kjy-fx:not(.kjy-lite) .cd201.is-armed:not(.is-done) .kjy-unit__n { position: relative; }
html.kjy-fx:not(.kjy-lite) .cd201.is-armed:not(.is-done) .kjy-unit__n::after { content: "\2014"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--ag-ink); text-shadow: var(--ag-text-lift); transition: opacity .5s ease-out var(--cd201-d, 0s); }
html.kjy-fx:not(.kjy-lite) .cd201.is-armed:not(.is-in) .kjy-unit__n { color: transparent; text-shadow: none; }
html.kjy-fx:not(.kjy-lite) .cd201.is-armed.is-in:not(.is-done) .kjy-unit__n { transition: color 1.1s ease-out var(--cd201-d, 0s), text-shadow 1.1s ease-out var(--cd201-d, 0s); }
html.kjy-fx:not(.kjy-lite) .cd201.is-armed.is-in .kjy-unit__n::after { opacity: 0; }

/* W2.2 (A2802, "Seconds dissolve"): the old number, laid over the new one while it fades out (section.js) */
.cd201 .cd201__ghost { position: absolute; margin: 0; text-align: center; pointer-events: none; }

