/* story-rhythm.1.css (/story, story-page-1116, deploy v72): the page's rhythm layer, loaded after story.1.css and appbar.1.css.
   Section bands, one icon chip per section, the pull quote, the timeline, the "old way" drawing, the assembled card and the atmosphere figure.
   Colours are the generated tokens of /styles.css only (both themes come from them); no new colour value is written here.
   Motion: only transform and opacity. story-motion.1.js (when motion is allowed) sets .is-pre, the hidden start, with no transition on it; on
   the first crossing it swaps .is-pre for .is-play, the only state that carries transitions, so the elements move once into place. Without
   script, or under prefers-reduced-motion, neither class is set and every element is drawn in its final state. Timing follows the
   live-it-up-motion skill: a reveal is about 400 ms on the strong ease-out curve, cubic-bezier(0.23, 1, 0.32, 1). */

:root { --story-ease: cubic-bezier(0.23, 1, 0.32, 1); }

/* ---- bands: every other section sits on the home card tone, full width, without widening the page (no horizontal scroll) ---- */
main > .s + .s { border-top: 0; }
.band {
  background: var(--web-homeCard);
  box-shadow: 0 0 0 100vmax var(--web-homeCard);
  clip-path: inset(0 -100vmax);
}

/* ---- one icon per section ---- */
.s-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 12px; border: 1px solid var(--accent-tintBorder); background: var(--accent-tint);
  color: var(--accent-light);
}
.s-ico svg, .fold svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.finale .s-ico { margin-left: auto; margin-right: auto; }

/* ---- pull quote ---- */
.pull { max-width: 1180px; margin: 0 auto; padding: 72px 24px 56px; }
.pull p {
  max-width: 18ch; margin: 0;
  padding-left: 24px; border-left: 4px solid var(--accent-line);
  font-size: clamp(32px, 6vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  color: var(--text-primary);
}

/* ---- atmosphere figures (AI-generated, captioned) ---- */
.story-atmo { max-width: 1180px; margin: 0 auto; padding: 0 24px 56px; }
.story-atmo img { aspect-ratio: 5 / 2; object-fit: cover; }
.story-atmo figcaption { max-width: none; margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--text-secondary); }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 22px 0 0; padding: 0; max-width: 62ch; }
.timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 0 0 22px 30px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid var(--accent-line); background: var(--background-primary);
}
.timeline li::after { content: ""; position: absolute; left: 6px; top: 22px; bottom: 2px; width: 2px; background: var(--border-default); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline time { font-size: 14px; font-weight: 600; letter-spacing: 0.3px; color: var(--accent-light); font-variant-numeric: tabular-nums; }
.timeline span { font-size: 18px; line-height: 1.5; color: var(--text-primary); }

/* ---- the old way: four tabs and the one card ---- */
.fold { margin: 32px 0 0; max-width: 760px; }
.fold-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr); align-items: center; gap: 18px; }
.fold-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fold-tab, .fold-one {
  border: 1px solid var(--border-default); border-radius: 12px; background: var(--web-homeCard2);
  box-shadow: 0 6px 18px var(--shadow-card);
}
.fold-tab { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 14px; min-width: 0; }
.fold-head {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%;
  padding: 3px 10px 3px 8px; border-radius: 8px 8px 0 0; border-bottom: 2px solid var(--accent-line);
  font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; overflow: hidden;
}
.fold-head svg { flex: none; color: var(--accent-light); }
.fold-body { display: grid; gap: 7px; }
.fold-body i, .fold-rows i { display: block; height: 7px; border-radius: 4px; background: var(--border-default); }
.fold-body i.short { width: 60%; }
.fold-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fold-keys i { height: 10px; }
.fold-arrow { color: var(--accent-light); stroke-width: 2.25; }
.fold-one { display: grid; gap: 12px; padding: 16px; border-color: var(--accent-line); }
.fold-q { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.fold-rows { display: grid; gap: 8px; }
.fold-rows i:nth-child(2) { width: 85%; }
.fold-rows i:nth-child(3) { width: 70%; }
.fold-sum { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--border-default); }
.fold-sum b { display: block; width: 46%; height: 12px; border-radius: 6px; background: var(--accent-line); }
.fold figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }

/* the tabs start scattered and settle; the arrow and the card follow (.is-pre is the start, .is-play the move) */
.fold.is-play .fold-tab, .fold.is-play .fold-arrow, .fold.is-play .fold-one { transition: transform 400ms var(--story-ease), opacity 400ms var(--story-ease); }
.fold.is-play .fold-tab:nth-child(2) { transition-delay: 60ms; }
.fold.is-play .fold-tab:nth-child(3) { transition-delay: 120ms; }
.fold.is-play .fold-tab:nth-child(4) { transition-delay: 180ms; }
.fold.is-play .fold-arrow { transition-delay: 320ms; }
.fold.is-play .fold-one { transition-delay: 420ms; }
.fold.is-pre .fold-tab { opacity: 0; }
.fold.is-pre .fold-tab:nth-child(1) { transform: translate(-14px, -10px) rotate(-6deg); }
.fold.is-pre .fold-tab:nth-child(2) { transform: translate(12px, -14px) rotate(5deg); }
.fold.is-pre .fold-tab:nth-child(3) { transform: translate(-10px, 12px) rotate(4deg); }
.fold.is-pre .fold-tab:nth-child(4) { transform: translate(14px, 10px) rotate(-5deg); }
.fold.is-pre .fold-arrow { opacity: 0; transform: translateX(-8px); }
.fold.is-pre .fold-one { opacity: 0; transform: scale(0.94); }

/* ---- the assembled card (illustration of the capture in #answer) ---- */
.asm { margin: 28px 0 0; max-width: 460px; }
.asm-card {
  padding: 18px 18px 16px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--web-homeCard2);
}
.asm-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-secondary); }
.asm-rows { list-style: none; margin: 0; padding: 0; }
.asm-row, .asm-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; }
.asm-row + .asm-row { border-top: 1px solid var(--border-color); }
.asm-k { min-width: 0; font-size: 16px; color: var(--text-primary); }
.asm-k small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.asm-v { flex: none; font-size: 16px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.asm-total { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border-default); }
.asm-total .asm-k { font-weight: 700; }
.asm-total .asm-v { font-size: 24px; color: var(--accent-light); }
/* the counting digits keep one width: tabular figures, and story-motion.1.js pads a shorter figure with figure spaces */
.asm-num { font-variant-numeric: tabular-nums; }
.asm figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }

.asm.is-play .asm-row, .asm.is-play .asm-total { transition: transform 400ms var(--story-ease), opacity 400ms var(--story-ease); }
.asm.is-play .asm-row:nth-child(2) { transition-delay: 160ms; }
.asm.is-play .asm-row:nth-child(3) { transition-delay: 320ms; }
.asm.is-play .asm-total { transition-delay: 480ms; }
.asm.is-pre .asm-row, .asm.is-pre .asm-total { opacity: 0; transform: translateY(8px); }

@media (max-width: 900px) {
  .pull { padding: 48px 20px 40px; }
  .pull p { padding-left: 18px; }
  .story-atmo { padding: 0 20px 40px; }
  .story-atmo img { aspect-ratio: 16 / 9; }
  .proof-shot.story-atmo { max-width: none; }
  .asm { max-width: none; }
}

@media (max-width: 700px) {
  /* the drawing stacks: the four tabs, an arrow pointing down, the one card (side by side, the "Calculator" label was cut at 561-608 px) */
  .fold-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .fold-tabs, .fold-one { width: 100%; }
  .fold-arrow { transform: rotate(90deg); }
  .fold.is-pre .fold-arrow { transform: rotate(90deg) translateX(-8px); }
}

@media (max-width: 560px) {
  .asm-card { padding: 14px 14px 12px; }
  .asm-total .asm-v { font-size: 22px; }
}

/* a page printed before it was scrolled shows the drawings in their final state */
@media print {
  .is-pre .fold-tab, .is-pre .fold-arrow, .is-pre .fold-one, .is-pre .asm-row, .is-pre .asm-total { opacity: 1 !important; transform: none !important; }
}
