/* Day / night home story. Paper = the business today, night = the system.
   Base styles are the readable stacked layout (phones, reduced motion, no JS).
   .dn.is-deck (set by home-dn.js) shows one example at a time with tabs and previous / next. */

.dn {
  --paper: #e9ece7; --rule: #cfd4cd; --pencil: #2b2f33; --pencil-soft: #5d6369;
  --card-p: #f7f8f5; --mark: #ffe24a; --alert: #d4442f;
  position: relative;
}

/* ---------- shared pieces ---------- */
.dn-k { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.86rem; font-weight: 600; }
.dn-k time { font-family: var(--mono); font-weight: 700; direction: ltr; letter-spacing: 0.03em; }
.dn-m .dn-k { color: var(--pencil-soft); }
.dn-k-s { color: var(--cyan); }
.dn-ctx { color: var(--faint); font-family: var(--font); letter-spacing: 0; }

.dn-m { color: var(--pencil); }
.dn-m-cv { background: linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 100% 32px, var(--paper); height: 100%; }
.dn-mt { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 1.6vw + 1.3rem, 2.6rem); line-height: 1; margin-top: 14px; }
.dn-before { font-size: 1.12rem; line-height: 1.5; margin-top: 12px; max-width: 34ch; }
.dn-props { margin-top: 18px; display: flex; flex-direction: column; align-items: flex-start; }

.dn-card { width: min(100%, 300px); margin-top: 12px; padding: 13px 16px; background: var(--card-p); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 14px 30px -20px rgb(0 0 0 / 0.35); }
.dn-card b { display: flex; align-items: center; gap: 9px; font-size: 1.02rem; }
.dn-card b i { width: 9px; height: 9px; border-radius: 50%; background: var(--alert); flex: none; }
.dn-card span { display: block; margin-top: 4px; font-size: 0.88rem; color: var(--pencil-soft); }
.dn-tilt { transform: rotate(-1.4deg); margin-inline-start: 34px; }
.dn-faded { opacity: 0.62; filter: grayscale(1); }
.dn-note { max-width: 220px; margin-top: 18px; padding: 13px 16px 17px; background: var(--mark); color: #2b2610; font-weight: 700; font-size: 1.1rem; line-height: 1.25; transform: rotate(2.4deg); box-shadow: 0 16px 28px -18px rgb(0 0 0 / 0.5); }
.dn-note-b { transform: rotate(-2deg); }
.dn-sheet { width: min(100%, 320px); margin-top: 14px; background: var(--card-p); border: 1px solid var(--rule); font-size: 0.88rem; transform: rotate(-0.8deg); }
.dn-sheet-name { padding: 6px 10px; font-family: var(--mono); font-size: 12px; background: #dde3da; border-bottom: 1px solid var(--rule); direction: ltr; text-align: left; }
.dn-sheet div { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-bottom: 1px solid var(--rule); }
.dn-sheet div:last-child { border-bottom: 0; }
.dn-sheet div span { padding: 6px 9px; border-inline-start: 1px solid var(--rule); }
.dn-sheet div span:first-child { border-inline-start: 0; }
.dn-sheet div:nth-child(2) { color: var(--pencil-soft); font-weight: 600; }
.dn-hl { background: linear-gradient(transparent 22%, var(--mark) 22%, var(--mark) 82%, transparent 82%); }
.dn-calc { width: min(100%, 300px); padding: 12px 16px; background: var(--card-p); border: 1px solid var(--rule); font-family: var(--mono); font-size: 1rem; line-height: 2; direction: ltr; text-align: left; transform: rotate(1deg); }
.dn-calc s { color: var(--alert); }
.dn-calc p:last-child { direction: rtl; text-align: right; font-family: var(--font); color: var(--pencil-soft); }

/* night side */
.dn-s { color: var(--text); }
.dn-h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 2.2vw + 1.2rem, 3rem); line-height: 1.02; margin-top: 12px; }
.dn-h1 > span { display: block; }
.dn-h1 > span + span { color: var(--accent); }
.dn-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 1vw + 1.25rem, 2.1rem); line-height: 1.06; margin-top: 12px; max-width: 24ch; }
.dn-title-sm { font-family: var(--font); font-size: 1.02rem; font-weight: 600; line-height: 1.4; color: var(--muted); margin-top: 14px; max-width: none; }
.dn-after { color: var(--muted); font-size: 1.04rem; line-height: 1.55; margin-top: 8px; max-width: 48ch; }
.dn-fact { display: grid; gap: 4px; margin-top: 12px; padding: 10px 14px; border-inline-start: 3px solid var(--accent); border-radius: 8px; background: var(--accent-wash); max-width: 52ch; font-size: 0.95rem; line-height: 1.5; }
.dn-fact b { font-size: 0.76rem; font-weight: 600; color: var(--accent-2); }
.dn-fact span { color: var(--text); }
/* the real-number callout takes room in the fixed-height deck: shorten that act's screenshot */
@media (min-width: 900px) { .dn.is-deck .dn-act.has-fact .dn-obj { margin-top: 14px; } .dn.is-deck .dn-act.has-fact .dn-shot img { max-height: 140px; } }
.dn-obj { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-top: 22px; }
.dn-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--accent-2); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.dn-more:hover { color: var(--text); }

.dn-chat { width: 268px; max-width: 100%; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0b0f1a; box-shadow: 0 24px 48px -30px rgb(47 99 245 / 0.55); }
.dn-chat-top { display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: #0b5c4e; color: #fff; font-size: 0.86rem; font-weight: 600; }
.dn-chat-top i { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #5b8cff, #2557e6); flex: none; }
.dn-chat-body { display: grid; gap: 7px; padding: 11px; background: #efeae2; }
.dn-b { max-width: 86%; padding: 7px 10px; border-radius: 10px; font-size: 0.84rem; line-height: 1.4; color: #111b21; box-shadow: 0 1px 1px rgb(0 0 0 / 0.1); }
.dn-b-o { justify-self: start; background: #fff; }
.dn-b-i { justify-self: end; background: #d9fdd3; }
.dn-b-ok { justify-self: start; background: #fff; border-inline-start: 3px solid #0b5c4e; font-weight: 600; }
.dn-log { width: 214px; max-width: 100%; list-style: none; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--card); }
.dn-log li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.dn-log li:last-child { border-bottom: 0; background: rgb(47 99 245 / 0.08); }
.dn-log time { font-family: var(--mono); font-size: 12px; color: var(--cyan); direction: ltr; }

.dn-panel { width: min(100%, 520px); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--card); box-shadow: 0 24px 48px -30px rgb(47 99 245 / 0.55); }
.dn-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 0.95rem; }
.dn-ok { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 0.84rem; font-weight: 500; }
.dn-ok i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 2px 10px rgb(25 227 255 / 0.8); }
.dn-stock, .dn-calls { list-style: none; padding: 0; margin: 0; }
.dn-stock li { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dn-stock li:last-child, .dn-calls li:last-child { border-bottom: 0; }
.dn-stock small { grid-column: 1 / -1; color: var(--faint); font-size: 0.82rem; }
.dn-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #121a2d; overflow: hidden; }
.dn-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(270deg, var(--accent-strong), var(--cyan)); margin-inline-start: auto; }
.dn-bar .w20 { width: 20%; } .dn-bar .w35 { width: 35%; } .dn-bar .w70 { width: 70%; }
.dn-tag { align-self: center; font-size: 0.76rem; padding: 3px 8px; border-radius: 3px; color: var(--accent-2); box-shadow: inset 0 0 0 1px rgb(77 132 255 / 0.4); white-space: nowrap; }
.dn-tag-hot { color: #ff7a6e; box-shadow: inset 0 0 0 1px rgb(255 90 78 / 0.5); }
.dn-wo table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.86rem; }
.dn-wo th { padding: 8px; font-family: var(--font); font-weight: 500; font-size: 0.76rem; color: var(--faint); border-bottom: 1px solid var(--line); }
.dn-wo td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.dn-wo tr:last-child td { border-bottom: 0; }
.dn-calls li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dn-calls span { color: var(--muted); font-size: 0.88rem; }
.dn-shot { width: min(100%, 520px); margin: 0; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #0b0f1a; box-shadow: 0 24px 48px -30px rgb(47 99 245 / 0.55); }
.dn-shot-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dn-shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dn-shot-bar span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.dn-shot img { display: block; width: 100%; height: auto; max-height: 270px; object-fit: cover; object-position: top; }
.dn-chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; list-style: none; padding: 0; margin: 0; }
.dn-chips li { padding: 6px 10px; font-size: 0.82rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; }

.dn-close-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 2.4vw + 1.2rem, 3rem); line-height: 1.02; }
.dn-close-title > span { display: block; }
.dn-close-title > span + span { color: var(--accent); }
.dn-close-lead { color: var(--muted); font-size: 1.08rem; line-height: 1.6; margin-top: 16px; max-width: 58ch; }
.dn-close .cta-row { margin-top: 24px; }
.dn-me { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.dn-me img, .dn-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.dn-me p { display: grid; gap: 2px; font-size: 0.92rem; color: var(--muted); text-align: start; }
.dn-me b { color: var(--text); font-size: 1rem; }

.dn-divider, .dn-clock { display: none; }
.dn-label { padding: 14px 20px 0; font-size: 12px; color: var(--faint); }

/* ---------- stacked layout (no JS: every example is listed) ---------- */
.dn-act { display: grid; border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; margin-top: 20px; }
.dn-m-in, .dn-s-in { padding: 32px 20px; }
.dn-close .dn-s-in { padding: 48px 20px; }
.dn-close-in { display: flex; flex-direction: column; align-items: flex-start; }
.dn-s { background: radial-gradient(60% 60% at 50% 40%, rgb(47 99 245 / 0.16), transparent 70%), var(--card); }
@media (min-width: 900px) {
  .dn-act { grid-template-columns: 1fr 1fr; }
  .dn-close { grid-template-columns: 1fr; }
  .dn-m-in, .dn-s-in { padding: 44px 40px; }
  .dn-close-in { align-items: center; text-align: center; }
}

/* ---------- deck (JS): one example at a time, tabs + previous/next ---------- */
.dn-tabs { scroll-margin-top: 84px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding-bottom: 2px; }
.dn-tabs::-webkit-scrollbar { display: none; }
.dn-tab { display: flex; align-items: center; gap: 8px; flex: none; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-btn); background: var(--card); color: var(--muted); font: inherit; font-size: 0.92rem; cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; }
.dn-tab time { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); direction: ltr; }
.dn-tab:hover { color: var(--text); border-color: var(--accent); }
.dn-tab.is-on { color: var(--text); border-color: var(--accent); background: rgb(47 99 245 / 0.14); }
.dn-tab.is-on time { color: var(--cyan); }
.dn-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.dn-nav .dn-label { padding: 0; text-align: center; }
.dn-nav button[disabled] { opacity: 0.35; pointer-events: none; }

.dn.is-deck .dn-act { display: none; margin-top: 14px; }
.dn.is-deck .dn-act.is-on { display: grid; animation: dn-fade 0.25s ease-out both; }

/* Desktop deck. Every transition below is transform or opacity on its own layer, run by the
   compositor: a click changes classes and one transform value, nothing is animated from JS. */
@media (min-width: 900px) {
  .dn.is-deck .dn-stage { --io: cubic-bezier(0.77, 0, 0.175, 1); --o: cubic-bezier(0.23, 1, 0.32, 1);
    position: relative; height: 680px; margin-top: 14px; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-card);
    background: radial-gradient(40% 50% at 28% 56%, rgb(47 99 245 / 0.22), transparent 70%), var(--bg); }
  .dn.is-deck .dn-act, .dn.is-deck .dn-act.is-on { position: absolute; inset: 0; display: block; margin: 0; border: 0; border-radius: 0; animation: none; contain: layout paint; }
  .dn.is-deck .dn-act { visibility: hidden; opacity: 0; transform: translateX(var(--from, -22px)); transition: opacity 0.18s ease-in, transform 0.18s ease-in, visibility 0s linear 0.18s; }
  .dn.is-deck .no-tr { transition: none !important; }
  /* painted once while idle (home-dn.js warm), but still invisible and out of reach */
  .dn.is-deck .dn-act.is-warm { visibility: visible; opacity: 0.01; transition: none; pointer-events: none; }
  .dn.is-deck .dn-act.is-on { visibility: visible; opacity: 1; transform: none; transition: opacity 0.4s var(--o) 0.08s, transform 0.5s var(--o) 0.08s; will-change: opacity, transform; }
  .dn.is-deck .dn-act.is-out { transform: translateX(var(--to, 18px)); }
  .dn.is-deck .dn-s { background: none; position: absolute; inset: 0; }
  /* the paper is a mask that slides; its content counter-slides so it stays put */
  .dn.is-deck .dn-m { position: absolute; inset: 0; overflow: hidden; transform: translateX(50%); }
  .dn.is-deck .dn-m-cv { position: absolute; inset: 0; transform: translateX(-50%); }
  .dn.is-deck .dn-m, .dn.is-deck .dn-m-cv { transition: transform 0.55s var(--io); }
  .dn.is-deck .dn-act.is-on .dn-m, .dn.is-deck .dn-act.is-on .dn-m-cv { will-change: transform; }
  .dn.is-deck .dn-m-in { position: absolute; top: 64px; right: 40px; width: 400px; max-width: calc(50% - 80px); padding: 0; }
  .dn.is-deck .dn-s-in { position: absolute; top: 64px; left: 0; width: 50%; padding: 0 40px; }
  .dn.is-deck .dn-col { max-width: 600px; margin-inline: auto; }
  .dn.is-deck .dn-close .dn-s-in { top: 0; bottom: 0; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
  .dn.is-deck .dn-divider { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; z-index: 5; transform: translateX(50%); will-change: transform; background: var(--accent); box-shadow: 0 0 0 1px rgb(77 132 255 / 0.25), 0 0 24px rgb(77 132 255 / 0.4); transition: transform 0.55s var(--io), opacity 0.3s ease; }
  .dn.is-deck .dn-clock { display: block; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 6px 13px; border: 1px solid var(--accent); border-radius: 4px; background: #05070d; color: var(--text); font-family: var(--mono); font-size: 1.25rem; font-weight: 600; white-space: nowrap; direction: ltr; }
  .dn.is-deck.is-closed .dn-divider { opacity: 0; }
  /* the props and the system objects arrive a beat after the act */
  .dn.is-deck .dn-act .dn-props > *, .dn.is-deck .dn-act .dn-obj > * { opacity: 0; translate: 0 10px; }
  .dn.is-deck .dn-act.is-on .dn-props > *, .dn.is-deck .dn-act.is-on .dn-obj > * { opacity: 1; translate: none; transition: opacity 0.4s var(--o) 0.2s, translate 0.45s var(--o) 0.2s; }
  .dn.is-deck .dn-act.is-on .dn-props > *:nth-child(2), .dn.is-deck .dn-act.is-on .dn-obj > *:nth-child(2) { transition-delay: 0.26s; }
  .dn.is-deck .dn-act.is-on .dn-props > *:nth-child(3) { transition-delay: 0.32s; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .dn.is-deck .dn-stage { height: 720px; }
  .dn.is-deck .dn-obj { zoom: 0.88; }
}
@media (prefers-reduced-motion: reduce) {
  .dn.is-deck .dn-act, .dn.is-deck .dn-act.is-on, .dn.is-deck .dn-act .dn-props > *, .dn.is-deck .dn-act .dn-obj > *,
  .dn.is-deck .dn-divider, .dn.is-deck .dn-m, .dn.is-deck .dn-m-cv { transition: none; animation: none; }
}

/* ---------- hero entrance ----------
   Pure CSS on purpose: transform/opacity keyframes run on the compositor, so they stay smooth
   while the main thread is still busy loading the page (analytics, fonts, images). */
.fx-title > span { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.fx-ln { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .fx-hero { --e: cubic-bezier(0.23, 1, 0.32, 1); }
  .fx-hero .fx-eyebrow { animation: dn-fade-up 0.5s var(--e) 0.08s both; }
  .fx-hero .fx-ln { animation: dn-rise 0.9s var(--e) 0.14s both; }
  .fx-hero .fx-title > span + span .fx-ln { animation-delay: 0.24s; }
  .fx-hero .fx-lead { animation: dn-fade-up 0.7s var(--e) 0.4s both; }
  .fx-hero .fx-copy .cta-row > * { animation: dn-fade-up 0.6s var(--e) 0.5s both; }
  .fx-hero .fx-copy .cta-row > * + * { animation-delay: 0.56s; }
  .fx-hero .fx-copy .cta-alt { animation: dn-fade 0.6s ease-out 0.62s both; }
  .fx-hero .fx-me { animation: dn-fade 0.6s ease-out 0.66s both; }
  .fx-hero .room { animation: dn-fade-up-lg 0.9s var(--e) 0.22s both; }
  .fx-hero .room-hub { animation: dn-fade 0.5s ease-out 0.6s both; }
  .fx-hero .room-lines .rl { stroke-dasharray: 100; animation: dn-draw 1s cubic-bezier(0.77, 0, 0.175, 1) 0.62s both; }
  .fx-hero .room-node { animation: dn-fade 0.45s ease-out 0.85s both; }
  .fx-hero .room-node:nth-child(4) { animation-delay: 0.92s; }
  .fx-hero .room-node:nth-child(5) { animation-delay: 0.99s; }
  .fx-hero .room-node:nth-child(6) { animation-delay: 1.06s; }
  .fx-hero .room-node:nth-child(7) { animation-delay: 1.13s; }
  .fx-hero .room-node:nth-child(8) { animation-delay: 1.2s; }
  .fx-hero .room-node:nth-child(9) { animation-delay: 1.27s; }
  .fx-hero .room-side, .fx-hero .room-foot, .fx-hero .room-head { animation: dn-fade 0.6s ease-out 1s both; }
  .fx-hero .fx-tools { animation: dn-fade 0.6s ease-out 0.9s both; }
}
@keyframes dn-rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes dn-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dn-fade-up-lg { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes dn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dn-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* ---------- inside each example: the system "works" when its example opens ----------
   Keyframes on transform and opacity only. They run when an example turns on, and only after the
   deck has scrolled into view (.is-seen, set by home-dn.js), so the first one is not over before
   anyone sees it. Without JS or with reduced motion everything simply shows. */
@media (prefers-reduced-motion: no-preference) {
  .dn.is-seen .dn-act.is-on { --o: cubic-bezier(0.23, 1, 0.32, 1); }

  /* WhatsApp: the conversation builds, the log fills in step with it */
  .dn.is-seen .dn-act.is-on .dn-b { animation: dn-in 0.42s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-b:nth-child(1) { animation-delay: 0.3s; }
  .dn.is-seen .dn-act.is-on .dn-b:nth-child(2) { animation-delay: 0.75s; }
  .dn.is-seen .dn-act.is-on .dn-b:nth-child(3) { animation-delay: 1.2s; }
  .dn.is-seen .dn-act.is-on .dn-b:nth-child(4) { animation-delay: 1.65s; }
  .dn.is-seen .dn-act.is-on .dn-b:nth-child(5) { animation-delay: 2.1s; }
  .dn.is-seen .dn-act.is-on .dn-log li { animation: dn-row 0.5s ease-out both; }
  .dn.is-seen .dn-act.is-on .dn-log li:nth-child(1) { animation-delay: 0.35s; }
  .dn.is-seen .dn-act.is-on .dn-log li:nth-child(2) { animation-delay: 0.8s; }
  .dn.is-seen .dn-act.is-on .dn-log li:nth-child(3) { animation-delay: 1.7s; }
  .dn.is-seen .dn-act.is-on .dn-log li:nth-child(4) { animation-delay: 2.15s; }

  /* stock report: the bars fill, then the flags land */
  .dn.is-seen .dn-act.is-on .dn-bar i { transform-origin: left center; animation: dn-fill 0.9s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(1) .dn-bar i { animation-delay: 0.35s; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(2) .dn-bar i { animation-delay: 0.47s; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(3) .dn-bar i { animation-delay: 0.59s; }
  .dn.is-seen .dn-act.is-on .dn-stock .dn-tag { animation: dn-pop 0.36s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(1) .dn-tag { animation-delay: 0.95s; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(2) .dn-tag { animation-delay: 1.05s; }
  .dn.is-seen .dn-act.is-on .dn-stock li:nth-child(3) .dn-tag { animation-delay: 1.15s; }

  /* work order: rows are computed one by one, then it is stamped ready */
  .dn.is-seen .dn-act.is-on .dn-wo tbody tr { animation: dn-in 0.4s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-wo tbody tr:nth-child(1) { animation-delay: 0.35s; }
  .dn.is-seen .dn-act.is-on .dn-wo tbody tr:nth-child(2) { animation-delay: 0.5s; }
  .dn.is-seen .dn-act.is-on .dn-wo tbody tr:nth-child(3) { animation-delay: 0.65s; }

  /* every "done" status lands last */
  .dn.is-seen .dn-act.is-on .dn-panel-top .dn-ok { animation: dn-pop 0.4s var(--o) 1.1s both; }
  .dn.is-seen .dn-act.is-on .dn-wo .dn-panel-top .dn-ok { animation-delay: 0.95s; }

  /* campaigns: what was built, one chip at a time */
  .dn.is-seen .dn-act.is-on .dn-chips li { animation: dn-in 0.4s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-chips li:nth-child(1) { animation-delay: 0.55s; }
  .dn.is-seen .dn-act.is-on .dn-chips li:nth-child(2) { animation-delay: 0.67s; }
  .dn.is-seen .dn-act.is-on .dn-chips li:nth-child(3) { animation-delay: 0.79s; }

  /* call list: the customers worth calling slide in, open quotes flagged */
  .dn.is-seen .dn-act.is-on .dn-calls li { animation: dn-slide 0.45s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(1) { animation-delay: 0.35s; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(2) { animation-delay: 0.48s; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(3) { animation-delay: 0.61s; }
  .dn.is-seen .dn-act.is-on .dn-calls .dn-tag { animation: dn-pop 0.36s var(--o) both; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(1) .dn-tag { animation-delay: 0.85s; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(2) .dn-tag { animation-delay: 0.95s; }
  .dn.is-seen .dn-act.is-on .dn-calls li:nth-child(3) .dn-tag { animation-delay: 1.05s; }

  /* the paper side: notes are dropped on the desk and settle */
  .dn.is-seen .dn-act.is-on .dn-note { animation: dn-drop 0.55s var(--o) 0.45s both; }
}
@keyframes dn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dn-slide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes dn-pop { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes dn-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dn-row { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes dn-drop { from { opacity: 0; translate: 0 -10px; scale: 1.04; } to { opacity: 1; translate: none; scale: none; } }

/* ===== 11-26 mobile pass ===== */
@media (max-width: 959px) {
  .dn-more { min-height: 44px; }
  .dn-tab { min-height: 44px; }
  /* fade on the leading edge hints that the tab row scrolls */
  .dn-tabs { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
  .dn-tabs::after { content: ""; flex: none; width: 56px; }
}
@media (max-width: 600px) {
  /* 11-29: tab row runs edge to edge on phones instead of being chopped at the content gutter */
  .dn-tabs { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); -webkit-mask-image: linear-gradient(to left, transparent, #000 20px, #000 86%, transparent); mask-image: linear-gradient(to left, transparent, #000 20px, #000 86%, transparent); }
}

/* ===== 11-29 phones: before / after switch per example ===== */
.dn-ba { display: none; }
@media (max-width: 899px) {
  .dn.is-deck .dn-ba:not([hidden]) { display: flex; gap: 4px; padding: 6px; margin: 0; background: var(--bg-2, #05070d); border-bottom: 1px solid var(--line-2); }
  .dn-ba button { flex: 1; min-height: 44px; border: 0; border-radius: calc(var(--r-btn) - 2px); background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
  .dn-ba button[data-ba="m"][aria-pressed="true"] { background: var(--paper); color: var(--pencil); }
  .dn-ba button[data-ba="s"][aria-pressed="true"] { background: var(--accent-strong, #2557e6); color: #fff; }
  .dn-ba button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .dn.is-deck .dn-act.has-ba:not(.is-after) .dn-s { display: none; }
  .dn.is-deck .dn-act.has-ba.is-after .dn-m { display: none; }
  .dn.is-deck .dn-act.has-ba.is-after .dn-s { animation: dn-fade 0.25s ease-out both; }
}
@media (prefers-reduced-motion: reduce) { .dn-ba button { transition: none; } .dn.is-deck .dn-act.has-ba.is-after .dn-s { animation: none; } }
