/* Where the days go (Prompt 22; where-the-days-go.html, js/days.js, js/days-motion.js). Act 1 ink with the glow and the
   grain (the opener and the hero figure, one question over ten days, the five places time disappears), Act 2 light (the
   role chips and the cards), Act 3 ink (the AI Brain across every handoff, the aging board), Act 4 the final call, then
   the sources. The site's tokens, spacing scale, easing and number rules. */

/* ---------- ACT 1 ---------- */
.dg-act1 { margin-top: calc(-1 * var(--nav-h) - 1px); padding: calc(var(--nav-h) + 1px) 0 var(--pad-sec); overflow: hidden; }
.dg-open { min-height: calc(100vh - var(--nav-h) - 1px); min-height: calc(100svh - var(--nav-h) - 1px); display: flex; flex-direction: column; justify-content: center; padding-block: 48px; }
.dg-k { color: var(--muted); }
.dg-h { margin-top: 16px; font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; max-width: 13em; text-wrap: balance; }   /* 13em: Geist and its fallback wrap alike (11em sat on a wrap edge: a font-swap shift) */
.dg-sub { margin-top: 24px; font-size: var(--fs-sub); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); text-wrap: pretty; }
.dg-hero { margin-top: 48px; max-width: 34em; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.dg-hero .fact-fig {
  display: block; position: relative; isolation: isolate; width: max-content; margin-bottom: 16px;
  font-size: clamp(88px, 11vw, 160px); font-weight: 600; letter-spacing: -0.045em; line-height: .95; color: #8A97B5;
}
.dg-hero .fact-fig::before {
  content: attr(data-n) / ""; position: absolute; left: 0; top: 0; z-index: -1; white-space: nowrap; pointer-events: none;
  color: transparent; -webkit-text-fill-color: transparent; opacity: .85;
  text-shadow: 0 0 12px rgba(138, 151, 181, .5), 0 0 36px rgba(138, 151, 181, .3), 0 0 90px rgba(138, 151, 181, .18);
}
.dg-h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }

/* one question, ten days: the ruler, the blue ticks of work, the amber band of waiting */
.dg-ruler { padding-top: 64px; border-top: 1px solid var(--line); }
.dg-days { --a1: .64; --a2: .97; --p: 0; position: relative; height: 56px; margin-top: 48px; }
.dg-days-axis { position: absolute; left: 0; right: 0; top: 28px; height: 1px; background: rgba(255, 255, 255, .18); }
.dg-days-axis i { position: absolute; left: calc(var(--d) * 100%); top: -4px; width: 1px; height: 9px; background: rgba(255, 255, 255, .28); }
.dg-days-axis i.is-major { top: -7px; height: 15px; background: rgba(255, 255, 255, .45); }
.dg-band { position: absolute; left: 0; right: 0; top: 22px; height: 13px; }
.dg-band-a { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--a2) * 100%); transform-origin: 0 50%; transform: scaleX(1); border-radius: 2px;
  background: linear-gradient(90deg, rgba(138, 151, 181, .18), rgba(138, 151, 181, .5)); box-shadow: 0 0 18px rgba(138, 151, 181, .22); }
.dg-work i { position: absolute; left: calc(var(--d) * 100%); top: 10px; width: 1.5px; height: 37px; margin-left: -.75px; background: #6CC4FE; box-shadow: 0 0 8px rgba(108, 196, 254, .7); }
.dg-days-l { position: relative; height: 72px; margin-top: 8px; }
.dg-dl { position: absolute; top: 0; right: calc(100% - var(--d) * 100%); max-width: 40%; text-align: right; font-size: 15px; line-height: 1.45; color: #C4CDE3; }
.dg-dl:nth-child(2) { top: 36px; }
.dg-rlines { margin-top: 24px; }
.dg-rl { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 40em; }
.dg-rl, .dg-dl { text-wrap: pretty; }

/* five places time disappears */
.dg-tiles-w { margin-top: 96px; }
.dg-tiles { margin-top: 32px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.dg-tile {
  position: relative; padding: 24px 22px; border-radius: var(--r-card);
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .6s var(--ease), background-color .6s var(--ease), box-shadow .6s var(--ease);
}
.dg-ic { width: 32px; height: 32px; fill: none; stroke: #E2EAF8; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-ic .ic-a { stroke: #8A97B5; }
.dg-tile-h { margin-top: 20px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.dg-tile-l { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.dg-tile-f { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; line-height: 1.45; color: #C4CDE3; }
/* lit: one after another, once in view (the default is lit) */
.dg-tile { border-color: rgba(138, 151, 181, .28); background: rgba(138, 151, 181, .04); box-shadow: 0 0 0 1px rgba(138, 151, 181, .04), 0 18px 40px -24px rgba(138, 151, 181, .28); }
html.dg-anim .dg-tiles:not(.is-play) .dg-tile { border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); box-shadow: none; }
html.dg-anim .dg-tiles:not(.is-play) .dg-ic .ic-a { stroke: #E2EAF8; }
html.dg-anim .dg-tiles .dg-tile, html.dg-anim .dg-tiles .ic-a { transition-delay: calc(var(--i) * 220ms); }
html.dg-anim .dg-tiles .ic-a { transition: stroke .6s var(--ease); }

/* the ruler plays once in view: the band grows to the first reply, then on to the answer (about 2.5s); labels follow */
html.dg-anim .dg-ruler:not(.is-play) .dg-band-a { transform: scaleX(0); }
html.dg-anim .dg-ruler:not(.is-play) .dg-work i, html.dg-anim .dg-ruler:not(.is-play) .dg-dl, html.dg-anim .dg-ruler:not(.is-play) .dg-rl { opacity: 0; }
html.dg-anim .dg-ruler:not(.is-play) .dg-days-axis { transform: scaleX(0); }
html.dg-anim .dg-ruler .dg-days-axis { transform-origin: 0 50%; transition: transform .6s var(--ease); }
html.dg-anim .dg-ruler.is-play .dg-band-a { animation: dg-band 1.9s cubic-bezier(.45, 0, .25, 1) .4s both; }
@keyframes dg-band { 0% { transform: scaleX(0); } 52% { transform: scaleX(calc(var(--a1) / var(--a2))); } 64% { transform: scaleX(calc(var(--a1) / var(--a2))); } 100% { transform: scaleX(1); } }
html.dg-anim .dg-ruler .dg-work i { transition: opacity .3s ease; }
html.dg-anim .dg-ruler.is-play .dg-work i:nth-child(1) { transition-delay: .35s; }
html.dg-anim .dg-ruler.is-play .dg-work i:nth-child(2) { transition-delay: 1.4s; }
html.dg-anim .dg-ruler.is-play .dg-work i:nth-child(3) { transition-delay: 2.3s; }
html.dg-anim .dg-ruler .dg-dl, html.dg-anim .dg-ruler .dg-rl { transition: opacity .5s var(--ease); }
html.dg-anim .dg-ruler.is-play .dg-dl:nth-child(1) { transition-delay: 1.45s; }
html.dg-anim .dg-ruler.is-play .dg-dl:nth-child(2) { transition-delay: 2.35s; }
html.dg-anim .dg-ruler.is-play .dg-rl { transition-delay: 2.6s; }

/* ---------- ACT 2: the role chips and the cards ---------- */
.dg-chips-w { margin-top: var(--g-content); }
.dg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.dg-chip:hover { color: var(--ink); border-color: var(--ink-2); }
.dg-chip:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.dg-chip.is-on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); box-shadow: 0 8px 20px -12px rgba(7, 27, 83, .5); }
.dg-panels { margin-top: 48px; }
.dg-panel { opacity: 0; transform: translateY(12px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.dg-panel.is-in { opacity: 1; transform: none; }
.dg-panel:not(.is-in) { transition-duration: .15s; }
.dg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dg-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 32px; border-radius: var(--r-card);
  background: #FFFFFF; border: 1px solid var(--line);
  box-shadow: 0 1px 1px rgba(7, 27, 83, .03), 0 4px 10px -4px rgba(7, 27, 83, .06), 0 20px 40px -26px rgba(7, 27, 83, .18);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .45s var(--ease), box-shadow .35s ease;
}
[data-theme="dark"] .dg-card { background: var(--surface); }
.dg-sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%); mix-blend-mode: soft-light; }
@media (hover: hover) and (pointer: fine) {
  .dg-card:hover { box-shadow: 0 1px 1px rgba(7, 27, 83, .03), 0 8px 18px -8px rgba(7, 27, 83, .1), 0 28px 50px -26px rgba(7, 27, 83, .28); }
  .dg-card:hover .dg-sheen { opacity: 1; }
}
.dg-dept { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.dg-today { margin-top: 16px; font-size: 18px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.dg-num { margin-top: 20px; font-size: 16px; line-height: 1.45; color: #5E6A85; text-wrap: pretty; }
.dg-num .fact-fig { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; color: #8A93A6; }
.dg-num .is-fallback { color: var(--muted); }
[data-theme="dark"] .dg-num { color: #C4CDE3; }
[data-theme="dark"] .dg-num .fact-fig { color: #8A97B5; }
.dg-kinds, .dg-tools { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.dg-kinds li, .dg-tools li { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.dg-kinds li { border: 1px solid rgba(138, 147, 166, .55); color: #5E6A85; }
[data-theme="dark"] .dg-kinds li { border-color: rgba(138, 151, 181, .5); color: #C4CDE3; }
.dg-with { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.dg-with-k, .dg-change-k { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dg-with-k::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.dg-with-t { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.dg-tools li { border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface-2); }
.dg-change { margin-top: auto; padding-top: 24px; }
.dg-change-t { margin-top: 6px; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); }
.dg-panel-foot { margin-top: 32px; display: flex; justify-content: flex-start; }
.dg-print-head, .dg-print-src { display: none; }

/* ---------- ACT 3: the AI Brain across every handoff, and the aging board ---------- */
.dg-brain { position: relative; margin: 48px auto 0; max-width: 960px; }
.dg-brain svg { display: block; width: 100%; height: auto; overflow: visible; }
.dg-ring { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1.5; stroke-dasharray: 5 5; }
.dg-thread { fill: none; stroke: #6CC4FE; stroke-width: 1.5; stroke-opacity: .7; stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 3px rgba(108, 196, 254, .6)); }
.dg-core ellipse { fill: none; stroke: #6CC4FE; stroke-width: 1.5; stroke-opacity: .5; }
.dg-core-o { fill: rgba(7, 27, 83, .6); stroke: #6CC4FE; stroke-width: 1.5; }
.dg-node { fill: #071B53; stroke: #FFFFFF; stroke-width: 1.5; filter: drop-shadow(0 0 5px rgba(108, 196, 254, .6)); }
.dg-halo { opacity: .9; }
@media (prefers-reduced-motion: no-preference) { .dg-halo { animation: none; transform-origin: center; transform-box: fill-box; } }
@keyframes dg-breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
html.dg-anim .dg-brain:not(.is-play) .dg-thread { stroke-dashoffset: 1; }
html.dg-anim .dg-brain .dg-thread { transition: stroke-dashoffset 1.1s var(--ease) calc(.2s + var(--k) * 90ms); }
html.dg-anim .dg-brain:not(.is-play) .dg-node, html.dg-anim .dg-brain:not(.is-play) .dg-brain-l li { opacity: 0; }
html.dg-anim .dg-brain .dg-node, html.dg-anim .dg-brain .dg-brain-l li { transition: opacity .5s var(--ease) calc(var(--k) * 90ms); }
.dg-brain-l li { position: absolute; transform: translate(-50%, 12px); transform: translate(round(-50%, 1px), 12px); padding: 3px 9px; border-radius: 999px; background: rgba(4, 15, 51, .88); border: 1px solid rgba(108, 196, 254, .22); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .86); white-space: nowrap; }
.dg-brain-l li.is-up { transform: translate(-50%, calc(-100% - 12px)); transform: translate(round(-50%, 1px), round(calc(-100% - 12px), 1px)); }
.dg-brain-core { position: absolute; transform: translate(-50%, -50%); transform: translate(round(-50%, 1px), round(-50%, 1px)); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6CC4FE; }
.dg-board { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dg-q { padding: 20px; border-radius: var(--r-card); background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
.dg-q-h { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dg-q ul { margin-top: 12px; display: grid; gap: 8px; }
.dg-qi { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 14px; line-height: 1.35; color: var(--ink-2); }
/* the aging board (Prompt 24): one per site, driven by the chosen role. Rows slide in (60ms apart, a 400ms fade and an
   8px rise), a thin azure scan line sweeps the board (900ms, top to bottom when the queues stack), each chip goes from
   waiting (grey, dashed) to nudged (azure) as it passes, then one or two per queue resolve (lime tick, the queue's word).
   Each chip stacks its three states in one cell, so its width never changes. */
.dg-board-for { margin-top: 64px; color: rgba(255, 255, 255, .78); }
.dg-board-w { position: relative; margin-top: 16px; transition: opacity .15s var(--ease); }
.dg-board-w.is-out { opacity: 0; }
.dg-board-w .dg-board { margin-top: 0; }
.dg-scan { position: absolute; inset: -8px 0; pointer-events: none; overflow: hidden; border-radius: var(--r-card); opacity: 0; }
.dg-scan::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #6CC4FE; box-shadow: 0 0 12px 2px rgba(108, 196, 254, .45); border-radius: 2px; transform: translateX(var(--sx, 0px)); }
.dg-board-w.is-v .dg-scan::before { top: 0; bottom: auto; left: 0; right: 0; width: auto; height: 2px; margin: -1px 0 0; transform: translateY(var(--sy, 0px)); }
.dg-board-w.is-scan .dg-scan { animation: dg-scan-o .9s linear both; }
.dg-board-w.is-scan .dg-scan::before { animation: dg-scan-x .9s cubic-bezier(.45, .05, .55, .95) both; }
.dg-board-w.is-scan.is-v .dg-scan::before { animation-name: dg-scan-y; }
@keyframes dg-scan-o { 0% { opacity: 0; } 8%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dg-scan-x { from { transform: translateX(0); } to { transform: translateX(var(--bw, 0px)); } }
@keyframes dg-scan-y { from { transform: translateY(0); } to { transform: translateY(var(--bh, 0px)); } }
html.dg-anim .dg-board .dg-q-h, html.dg-anim .dg-board .dg-qi { opacity: 0; transform: translateY(8px); }
html.dg-anim .dg-board.is-in .dg-q-h, html.dg-anim .dg-board.is-in .dg-qi { opacity: 1; transform: none; transition: opacity .4s var(--ease) calc(var(--n) * 60ms), transform .4s var(--ease) calc(var(--n) * 60ms); }
.dg-age { flex: none; display: inline-grid; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .02em; font-variant-numeric: tabular-nums; border: 1px dashed rgba(138, 151, 181, .75); color: #E2EAF8; background: transparent; transition: color .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease); }
.dg-st { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; opacity: 0; transition: opacity .3s var(--ease); }
.dg-st b { font-weight: 500; }
.dg-st-w { opacity: 1; }
.dg-qi.is-nudged .dg-age { border-style: solid; border-color: rgba(108, 196, 254, .6); color: #6CC4FE; background: rgba(108, 196, 254, .1); }
.dg-qi.is-nudged .dg-st-w { opacity: 0; }
.dg-qi.is-nudged .dg-st-n { opacity: 1; }
.dg-qi.is-resolved .dg-age { border-style: solid; border-color: rgba(227, 251, 153, .75); color: #FFFFFF; background: transparent; }
.dg-qi.is-resolved .dg-st-w, .dg-qi.is-resolved .dg-st-n { opacity: 0; }
.dg-qi.is-resolved .dg-st-r { opacity: 1; }
.dg-tick { width: 13px; height: 13px; flex: none; transform: scale(.4); transition: transform .45s cubic-bezier(.34, 1.4, .64, 1); }
.dg-tick circle { fill: #E3FB99; }
.dg-tick path { fill: none; stroke: #071B53; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-qi.is-resolved .dg-tick { transform: none; }
.dg-final-copy { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }

/* ---------- phones and narrow screens ---------- */
@media (max-width: 1099.98px) { .dg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899.98px) {
  .dg-cards { grid-template-columns: minmax(0, 1fr); }
  .dg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dg-board { grid-template-columns: minmax(0, 1fr); }
  .dg-chips-w { margin-inline: -20px; overflow-x: auto; scrollbar-width: none; }
  .dg-chips-w::-webkit-scrollbar { display: none; }
  .dg-chips { flex-wrap: nowrap; padding: 0 20px; width: max-content; }
  .dg-brain-l li { font-size: 8.5px; padding: 2px 6px; white-space: normal; width: max-content; max-width: 84px; text-align: center; line-height: 1.25; }
  .dg-dl { max-width: 62%; font-size: 13.5px; }
  .dg-days-l { height: 96px; }
  .dg-dl:nth-child(2) { top: 48px; }
}
@media (max-width: 599.98px) {
  .dg-tiles { grid-template-columns: minmax(0, 1fr); }
  .dg-card { padding: 24px; }
  .dg-tiles-w { margin-top: 64px; }
  .dg-hero { margin-top: 32px; }
}

/* ==========================================================================================================
   Prompt 23: Where the days go in the colour law. The hero figure white with an azure glow; waiting (the ruler's band,
   the time-kind tiles and chips, the board's ages) grey and dashed; AI (the work ticks, With Katalyst, nudged ages)
   azure; card figures navy on white.
   ========================================================================================================== */
.dg-hero .fact-fig { color: #FFFFFF; }
.dg-hero .fact-fig::before { text-shadow: 0 0 14px rgba(108, 196, 254, .45), 0 0 40px rgba(108, 196, 254, .25), 0 0 96px rgba(108, 196, 254, .12); opacity: .9; }
.dg-band-a { background: rgba(138, 151, 181, .16); border: 1px dashed rgba(138, 151, 181, .7); box-shadow: none; }
.dg-work i { background: #6CC4FE; box-shadow: 0 0 8px rgba(108, 196, 254, .6); }
.dg-dl, .dg-tile-f { color: #EAF2FF; }
.dg-ic .ic-a { stroke: #E2EAF8; }
.dg-tile { border: 1px dashed rgba(138, 151, 181, .55); background: rgba(255, 255, 255, .03); box-shadow: none; }
html.dg-anim .dg-tiles:not(.is-play) .dg-tile { border-color: rgba(255, 255, 255, .06); border-style: solid; }
.dg-num { color: #42506E; }
.dg-num .fact-fig { color: #071B53; }
[data-theme="dark"] .dg-num { color: #E2EAF8; }
[data-theme="dark"] .dg-num .fact-fig { color: #FFFFFF; }
.dg-kinds li { border: 1px dashed #8A93A6; color: #42506E; }
[data-theme="dark"] .dg-kinds li { border-color: rgba(138, 151, 181, .7); color: #E2EAF8; }
.dg-with-k::before { background: #6CC4FE; box-shadow: 0 0 0 3px rgba(108, 196, 254, .18); }
.dg-chip.is-on { background: #071B53; color: #FFFFFF; border-color: #071B53; box-shadow: 0 8px 20px -12px rgba(7, 27, 83, .5); }
[data-theme="dark"] .dg-chip.is-on { background: #FFFFFF; color: #071B53; border-color: #FFFFFF; }
.dg-thread { stroke: #6CC4FE; filter: drop-shadow(0 0 3px rgba(108, 196, 254, .5)); }
.dg-core ellipse, .dg-core-o { stroke: #6CC4FE; }
.dg-node { fill: #071B53; stroke: #FFFFFF; }
.dg-brain-core { color: #6CC4FE; }

/* ---------- print one role (js/days-motion.js sets html[data-print]) ---------- */
@media print {
  @page { margin: 12mm; }
  html[data-print] body > *:not(main), html[data-print] main > section:not(.dg-act2), html[data-print] .sec-head,
  html[data-print] .dg-chips-w, html[data-print] .dg-panel-foot, html[data-print] .src-m, html[data-print] .rv-fact, html[data-print] .dg-sheen { display: none !important; }
  html[data-print] .dg-panel { display: none !important; }
  html[data-print="owner"] #role-owner, html[data-print="design"] #role-design, html[data-print="gc"] #role-gc, html[data-print="mep"] #role-mep, html[data-print="fab"] #role-fab,
  html[data-print="field"] #role-field, html[data-print="quality"] #role-quality, html[data-print="cx"] #role-cx, html[data-print="fm"] #role-fm { display: block !important; opacity: 1 !important; transform: none !important; }
  html[data-print] body, html[data-print] .dg-act2 { background: #FFFFFF !important; color: #071B53; }
  html[data-print] .dg-act2 { padding: 0 !important; }
  html[data-print] .wrap { max-width: none; padding: 0; }
  html[data-print] .dg-panels { margin: 0; }
  html[data-print] .dg-print-head { display: block; margin-bottom: 10px; }
  html[data-print] .dg-print-head .lbl { font-size: 8pt; color: #42506E; }
  html[data-print] .dg-print-role { margin-top: 2px; font-size: 18pt; font-weight: 600; letter-spacing: -0.02em; }
  html[data-print] .dg-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  html[data-print] .dg-card { padding: 10px 12px; border-radius: 6px; box-shadow: none; border: .6pt solid #CBD5E3; transform: none; break-inside: avoid; }
  html[data-print] .dg-dept { font-size: 6.5pt; }
  html[data-print] .dg-today, html[data-print] .dg-with-t { margin-top: 4px; font-size: 7.5pt; line-height: 1.35; }
  html[data-print] .dg-num { margin-top: 5px; font-size: 7.5pt; line-height: 1.3; }
  html[data-print] .dg-num .fact-fig { font-size: 12pt; }
  html[data-print] .dg-kinds, html[data-print] .dg-tools { margin-top: 5px; gap: 3px; }
  html[data-print] .dg-kinds li, html[data-print] .dg-tools li { height: 13px; padding: 0 5px; font-size: 5.5pt; }
  html[data-print] .dg-with { margin-top: 6px; padding-top: 5px; }
  html[data-print] .dg-with-k, html[data-print] .dg-change-k { font-size: 6pt; }
  html[data-print] .dg-change { padding-top: 6px; }
  html[data-print] .dg-change-t { margin-top: 2px; font-size: 8pt; }
  html[data-print] .dg-print-src { display: block; margin-top: 10px; padding-top: 6px; border-top: .6pt solid #CBD5E3; font-size: 6.5pt; line-height: 1.4; color: #42506E; }
  html[data-print] .dg-print-src .lbl { font-size: 6.5pt; }
  html[data-print] .dg-print-src ol { margin: 3px 0 0; }
  html[data-print] .dg-print-contact { margin-top: 5px; color: #071B53; }
  html[data-print] * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Prompt 28: a resolved chip is a small lime fill with navy text and a navy tick (the colour law lets lime fill small
   resolved chips, ticks and stamps) */
.dg-qi.is-resolved .dg-age { border-color: #E3FB99; background: #E3FB99; color: #071B53; }
.dg-qi.is-resolved .dg-tick circle { fill: #071B53; }
.dg-qi.is-resolved .dg-tick path { stroke: #E3FB99; }

/* Prompt 28: the phone pass (under 600px): role chips 44px tall, chips and board labels at 12px, the AI Brain labels at 12px */
@media (max-width: 599.98px) {
  .dg-chip { min-height: 44px; }
  .dg-kinds li, .dg-tools li { font-size: 12px; height: 28px; }
  .dg-age, .dg-st, .dg-st b { font-size: 12px; }
  .dg-brain-l li { font-size: 12px; max-width: 96px; }
  .dg-brain-core { font-size: 12px; }
}

/* ==========================================================================================================
   Prompt 28C: compact problem cards with a fill reveal. Three columns at 1440, two from 1199px down, one on phones.
   The front (department and task, Today, the number, the time kinds, "How Katalyst fixes it →") and the back (With
   Katalyst, the tools, What changes with a lime tick) share one grid cell, so the card never changes size. Hover (fine
   pointers), keyboard focus or a tap fill it with navy from the bottom edge (350ms, the site easing) and fade the back in
   over it. Reduced motion: an instant swap.
   ========================================================================================================== */
.dg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1199.98px) { .dg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899.98px) { .dg-cards { grid-template-columns: minmax(0, 1fr); } }
.dg-card { display: grid; padding: 24px; overflow: hidden; isolation: isolate; cursor: pointer; transform: none !important; outline: none; }
.dg-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #071B53; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .35s var(--ease); pointer-events: none; }
.dg-front, .dg-back { grid-area: 1 / 1; min-width: 0; }
.dg-front { position: relative; z-index: 0; display: flex; flex-direction: column; transition: opacity .25s ease; }
.dg-back { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .3s ease .1s, visibility 0s linear .4s; color: #FFFFFF; }
.dg-today { margin-top: 12px; font-size: 16px; }
.dg-num { margin-top: 14px; font-size: 15px; }
.dg-num .fact-fig { font-size: clamp(26px, 2.4vw, 34px); }
.dg-kinds { margin-top: 14px; }
.dg-fix { margin-top: auto; padding-top: 16px; font-size: 15px; font-weight: 600; color: var(--ink); }
.dg-back .dg-with { margin-top: 0; padding-top: 0; border-top: 0; }
.dg-back .dg-with-k, .dg-back .dg-change-k { color: #C4CDE3; }
.dg-back .dg-with-t, .dg-back .dg-change-t { color: #FFFFFF; font-size: 15px; line-height: 1.5; }
.dg-back .dg-tools { margin-top: 14px; }
.dg-back .dg-tools li { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #FFFFFF; }
.dg-back .dg-change { margin-top: 16px; }
.dg-change-t { display: flex; gap: 8px; align-items: flex-start; }
.dg-ctick { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.dg-ctick circle { fill: #E3FB99; }
.dg-ctick path { fill: none; stroke: #071B53; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* open: hover (fine pointers), keyboard focus, a tap */
@media (hover: hover) and (pointer: fine) { .dg-card:hover:not(.is-shut)::before { transform: scaleY(1); } .dg-card:hover:not(.is-shut) .dg-back { opacity: 1; visibility: visible; transition: opacity .3s ease .12s, visibility 0s; } .dg-card:hover:not(.is-shut) .dg-front { opacity: 0; } }
.dg-card:focus-visible:not(.is-shut)::before, .dg-card.is-open::before { transform: scaleY(1); }
.dg-card:focus-visible:not(.is-shut) .dg-back, .dg-card.is-open .dg-back { opacity: 1; visibility: visible; transition: opacity .3s ease .12s, visibility 0s; }
.dg-card:focus-visible:not(.is-shut) .dg-front, .dg-card.is-open .dg-front { opacity: 0; }
.dg-card:focus-visible { box-shadow: 0 0 0 2px #6CC4FE; }
@media (prefers-reduced-motion: reduce) { .dg-card::before, .dg-front, .dg-back { transition: none !important; } }
/* print: the whole card, front and back, one after the other */
@media print { html[data-print] .dg-card { display: block; } html[data-print] .dg-card::before { display: none; } html[data-print] .dg-back { opacity: 1; visibility: visible; color: inherit; margin-top: 6px; } html[data-print] .dg-back .dg-with-t, html[data-print] .dg-back .dg-change-t, html[data-print] .dg-back .dg-tools li, html[data-print] .dg-back .dg-with-k, html[data-print] .dg-back .dg-change-k { color: #071B53; } html[data-print] .dg-fix { display: none; } }

/* ==========================================================================================================
   Prompt 28E: no blank starts. The ruler: the track, the ticks and the day labels (0, 5, 10), the azure markers and their
   labels show from the first paint; only the waiting band moves: a neutral grey hatched bar (40% fill, the hatch at 80%)
   that grows from 0 to 6.4 days and on to 9.7 in 1.2s, the moment 15% of the ruler is in view.
   ========================================================================================================== */
.dg-day-n { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; color: #C4CDE3; white-space: nowrap; }
.dg-days-axis i:last-child .dg-day-n { left: auto; right: 0; transform: none; }
.dg-days-axis i:first-child .dg-day-n { left: 0; transform: none; }
.dg-days-l { margin-top: 24px; }
.dg-band-a { background-color: rgba(138, 151, 181, .4); background-image: repeating-linear-gradient(135deg, rgba(196, 205, 227, .8) 0 1.5px, transparent 1.5px 6px); border: 1px solid rgba(138, 151, 181, .9); }
html.dg-anim .dg-ruler:not(.is-play) .dg-work i, html.dg-anim .dg-ruler:not(.is-play) .dg-dl, html.dg-anim .dg-ruler:not(.is-play) .dg-rl { opacity: 1; }
html.dg-anim .dg-ruler:not(.is-play) .dg-days-axis { transform: none; }
html.dg-anim .dg-ruler .dg-work i, html.dg-anim .dg-ruler .dg-dl, html.dg-anim .dg-ruler .dg-rl { transition: none; }
html.dg-anim .dg-ruler.is-play .dg-band-a { animation: dg-band28 1.2s cubic-bezier(.45, 0, .25, 1) both; }
@keyframes dg-band28 { 0% { transform: scaleX(0); } 55% { transform: scaleX(calc(var(--a1) / var(--a2))); } 64% { transform: scaleX(calc(var(--a1) / var(--a2))); } 100% { transform: scaleX(1); } }
html.dg-anim .dg-ruler.is-done .dg-band-a { animation: none; transform: none; }
/* the five tiles: outlines and text from the first paint; the play only lights them in turn */
html.dg-anim .dg-tiles:not(.is-play) .dg-tile { border-color: rgba(255, 255, 255, .2); }
/* the AI Brain: the ring, nodes, labels and core from the first paint; the play only draws the threads in */
html.dg-anim .dg-brain:not(.is-play) .dg-node, html.dg-anim .dg-brain:not(.is-play) .dg-brain-l li { opacity: 1; }
html.dg-anim .dg-brain .dg-thread { transition-duration: .9s; }
/* the aging board: every queue and item (waiting) from the first paint; the play scans, nudges and resolves */
html.dg-anim .dg-board .dg-q-h, html.dg-anim .dg-board .dg-qi { opacity: 1; transform: none; transition: none; }
/* Prompt 29: tablets (700 to 899px) keep two card columns, so no line runs past about 64 characters */
@media (min-width: 700px) and (max-width: 899.98px) { .dg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Prompt 32: the AI Brain's labels are placed by js/days.js (placeLabels) clear of every line, node and label, at least 6px:
   left and top are the label's own top-left corner, so no centring transform */
.dg-brain-l li.is-free, .dg-brain-l li.is-free.is-up { transform: none; }
