/* Today's hero, alive: day color, rollover, heartbeat count, movement note, floating specks (see today-alive.js). */

/* Day color: today-alive.js sets --day-c1..4 from the "N days" in Crouton's age. Fallbacks are the original wine. */
/* "today." in the heading and the story's drop cap follow the panel (--day-ink, set by today-alive.js); the
   fallback, used only until the script runs, is the heading's original color. They fade only during the rollover's color wash (--day-ink-fade). */
#today-dashboard #hero-title em{color:var(--day-ink,#b68170);transition:color var(--day-ink-fade,0s) ease}
#visual-panel{background:radial-gradient(ellipse at 47% 40%,var(--day-c1,#a55c63) 0%,var(--day-c2,#883b49) 38%,var(--day-c3,#6d2635) 76%,var(--day-c4,#5b1e2b) 100%);isolation:isolate}
/* The new day's color spreads out from Crouton (centered where the panel's gradient is) with a soft light edge, so
   the change shows even between two close shades (John, Oct 28, 2026). --wash-r is the circle's radius, as a share
   of the distance from that center to the panel's nearest side; it starts at about the disc's edge so the whole
   spread is visible. Without @property it can't animate, so those browsers get a plain fade. It inherits so the
   light rim (::after) follows the moving edge; with inherits:false the rim stayed at 0% and never showed (Codex review, Oct 28). */
@property --wash-r{syntax:'<percentage>';inherits:true;initial-value:0%}
.lbk-day-wash{position:absolute;inset:0;z-index:-1;opacity:0;pointer-events:none;--wash-r:80%;
 transition:opacity .4s ease,--wash-r 2.4s cubic-bezier(.3,.15,.5,1);
 -webkit-mask-image:radial-gradient(circle closest-side at 47% 40%,#000 calc(var(--wash-r) - 30%),transparent var(--wash-r));
 mask-image:radial-gradient(circle closest-side at 47% 40%,#000 calc(var(--wash-r) - 30%),transparent var(--wash-r))}
.lbk-day-wash::after{content:"";position:absolute;inset:0;background:radial-gradient(circle closest-side at 47% 40%,#fff0 calc(var(--wash-r) - 40%),#ffe9d647 calc(var(--wash-r) - 15%),#fff0 var(--wash-r))}
.lbk-day-wash.on{opacity:1;--wash-r:290%}

/* Rollover: only the numbers that changed roll. overflow:clip keeps the number on the text baseline. Old and new
   share one grid cell, so the roll is as wide as the longer one ("1 day" to "2 days" isn't cut off mid-roll). */
.lbk-roll{display:inline-grid;justify-items:end;vertical-align:bottom;overflow:hidden;overflow:clip}
.lbk-roll>span{grid-area:1/1;transition:transform 1.4s cubic-bezier(.5,0,.15,1)}
.lbk-roll>.to{transform:translateY(100%)}
.lbk-roll.go>span{transform:translateY(-100%)}
.lbk-roll.go>.to{transform:none}
.lbk-roll.lbk-word{justify-items:start}
#dayline{transition:opacity .6s ease}
#dayline.lbk-fade{opacity:0}
#anatomy-legend .development-tag.lbk-glow{animation:lbk-tag-glow 2.4s ease-out}
@keyframes lbk-tag-glow{0%{box-shadow:0 0 0 0 #f3c08a00;background:#ffffff08}30%{box-shadow:0 0 0 3px #f3c08a70;background:#ffffff22}100%{box-shadow:0 0 0 9px #f3c08a00;background:#ffffff08}}

/* Heartbeat count, under the drawing */
.heart-count{position:relative;z-index:2;margin:10px 0 16px;font:500 12px/1.45 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f1dcc9;text-align:center;font-variant-numeric:tabular-nums}
.heart-count[hidden]{display:none}
.heart-count b{font-weight:800;color:#fff4e6}
.heart-count-heart{display:inline-block;color:#f2785e;margin-right:3px}
.heart-count-heart.beat{animation:lbk-beat-pop .3s ease-out}
/* Hear Crouton's heart: "Listen" at the end of the count line (a 44px-tall tap area without changing the line's
   height), and the rate under it while it plays. */
.heart-listen{border:0;background:none;padding:14px 6px;margin:-14px -6px;color:#fff4e6;font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.heart-listen:focus-visible{outline:2px solid #fff4e6;outline-offset:-4px;border-radius:8px}
.heart-count.is-still .heart-count-tally,.heart-count.is-still .heart-listen-sep{display:none}
.heart-listen-note{position:relative;z-index:2;margin:-10px 0 16px;font:500 12px/1.4 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f1dcc9;opacity:.85;text-align:center;text-wrap:balance}
.heart-listen-note[hidden]{display:none}
@keyframes lbk-beat-pop{0%{transform:scale(1)}35%{transform:scale(1.35)}100%{transform:scale(1)}}

/* "Also this week" after the story; its own block so the story keeps its ending. */
.movement-note{margin:22px 0 4px;padding-top:16px;border-top:1px solid #e8dccd;display:grid;gap:4px;max-width:480px}
.movement-note[hidden]{display:none}
.movement-kicker{font:700 9px/1.4 ui-sans-serif,-apple-system,sans-serif;letter-spacing:1.4px;text-transform:uppercase;color:#a0705a}
.movement-note p{margin:0;font-size:15px;line-height:1.75;color:#776568}
@media(max-width:620px){.movement-note p{font-size:14px}}

/* Floating specks inside the disc (site.js fluidMarkup) */
.lo-specks circle{transform-box:fill-box;animation:lbk-speck var(--d) linear infinite;animation-delay:var(--o)}
@keyframes lbk-speck{0%{transform:translate(0,0);opacity:0}15%{opacity:var(--a)}50%{transform:translate(var(--x),-24px)}85%{opacity:var(--a)}100%{transform:translate(0,-48px);opacity:0}}

@media(prefers-reduced-motion:reduce){
 .lbk-roll>span,#dayline{transition:none}
 #anatomy-legend .development-tag.lbk-glow,.heart-count-heart.beat{animation:none}
 .lbk-day-wash{transition:opacity .3s ease;--wash-r:290%}
 .lbk-day-wash::after{display:none}
}

/* Drop cap on today's story (John, Oct 24, 2026): the first letter sinks into the first three lines, in the
   heading's serif and today's color. Sized from the story's 15px text on 1.75 line height and Georgia's cap
   height: cap top on line 1's capitals, baseline on line 3's (measured within a pixel); line height .68 keeps the
   float out of line 4. Margins are in the letter's own ems. A float, not initial-letter, so it renders
   the same in every browser. Everyday words only: days with written stories split into .story-paragraph spans;
   other days are one plain text block (needs :has, so older browsers just skip the drop cap). */
/* Chromium doesn't run transitions on ::first-letter, so the drop cap's color fades through --drop-ink, a registered color
   on the story that the letter inherits every frame (Codex review, Oct 25, 2026). Browsers without @property
   switch it instantly. */
@property --drop-ink{syntax:'<color>';inherits:true;initial-value:#b68170}
#stage-description{--drop-ink:var(--day-ink,#b68170);transition:--drop-ink var(--day-ink-fade,0s) ease}
#stage-description .story-paragraph:first-child::first-letter,
#today-dashboard:has(#explain-plain[aria-pressed="true"]) #stage-description:not(:has(*))::first-letter{float:left;font:400 6.06em/.68 Georgia,"Times New Roman",serif;color:var(--drop-ink,#b68170);margin:.164em .1em 0 0}
