/* Chapter 2 · Text becomes tokens (classes prefixed s2-). Per-frame properties (opacity, transform, clip-path) are set by render, so none of them has a CSS transition. */
.s2 {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(10px, 1.6cqw, 18px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--card-shadow);
  padding: clamp(14px, 2cqw, 28px);
}
.s2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: calc(var(--scene-figure) * 1.1); }
.s2-label { font: 650 var(--scene-meta)/1.2 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.s2-figure { font: 560 var(--scene-figure)/1 var(--f-serif); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.s2-body { position: relative; display: grid; min-height: 0; }
.s2-view { --fs: 20px; display: grid; grid-area: 1 / 1; min-height: 0; overflow-x: hidden; overflow-y: auto; font-size: var(--fs); align-content: start; }
.s2-foot { min-height: calc(var(--scene-meta) * 1.4 * 3); font: 500 var(--scene-meta)/1.4 var(--f-sans); color: var(--text-muted); }

/* Plain text, then chips */
.s2-plain { grid-area: 1 / 1; font: 450 clamp(22px, 3.1cqw, 42px)/1.3 var(--f-serif); letter-spacing: -.01em; }
.s2-plain.is-hint { font: 450 var(--scene-body)/1.4 var(--f-sans); letter-spacing: 0; color: var(--text-faint); }
.s2-chips {
  grid-area: 1 / 1; display: flex; flex-wrap: wrap; align-content: flex-start; column-gap: .28em;
  row-gap: calc(max(14px, .56em) * 1.3 + .5em); padding-bottom: calc(max(14px, .56em) * 1.3 + .3em);
}
.s2-view.no-num .s2-chips { row-gap: .4em; padding-bottom: .1em; }
.s2-lang .s2-chips { grid-area: auto; }
.s2-chip {
  position: relative; min-width: 48px; padding: .12em .42em; border-radius: .22em; text-align: center; white-space: pre;
  font: 500 1em/1.25 var(--f-sans); color: var(--text);
}
.s2-view.no-num .s2-chip { min-width: 0; }
.s2-chip.c0 { background: var(--you-soft); box-shadow: inset 0 -3px 0 var(--you-mid); }
.s2-chip.c1 { background: var(--model-soft); box-shadow: inset 0 -3px 0 var(--model-mid); }
.s2-chip.c2 { background: var(--cached-soft); box-shadow: inset 0 -3px 0 var(--cached-mid); }
.s2-chip.c3 { background: var(--app-soft); box-shadow: inset 0 -3px 0 var(--line-strong); }
.s2-sp { color: var(--text-faint); }
.s2-num {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: .22em; text-align: center; white-space: nowrap;
  font: 600 max(14px, .56em)/1.2 var(--f-sans); font-variant-numeric: tabular-nums; color: var(--text-muted);
}
.s2-view.no-num .s2-num { display: none; }

/* "strawberry" */
.s2-straw { align-content: center; justify-items: center; gap: clamp(14px, 2.2cqw, 26px); text-align: center; }
.s2-word { display: flex; justify-content: center; font: 560 clamp(40px, 12cqw, 120px)/1.15 var(--f-serif); letter-spacing: -.01em; padding: .1em 0; }
.s2-piece { position: relative; display: inline-block; white-space: pre; }
.s2-bg { position: absolute; inset: .04em -.05em; border-radius: .14em; opacity: 0; z-index: -1; }
.s2-piece.c0 .s2-bg { background: var(--you-soft); box-shadow: inset 0 -.06em 0 var(--you-mid); }
.s2-piece.c1 .s2-bg { background: var(--model-soft); box-shadow: inset 0 -.06em 0 var(--model-mid); }
.s2-piece.c2 .s2-bg { background: var(--cached-soft); box-shadow: inset 0 -.06em 0 var(--cached-mid); }
.s2-r { color: var(--you-strong); }
.s2-cap { margin: 0; font: 500 var(--scene-body)/1.35 var(--f-serif); color: var(--text); max-width: 34em; opacity: 0; }
.s2-cap-r { font: 500 var(--scene-label)/1.35 var(--f-sans); color: var(--text-muted); }
.s2-straw { isolation: isolate; }

/* English and German */
.s2-lang { gap: clamp(14px, 2.2cqw, 26px); }
.s2-row { display: grid; gap: 8px; align-content: start; }
.s2-rowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.s2-rowlang { font: 650 var(--scene-label)/1.2 var(--f-sans); }
.s2-rowcount { font: 600 var(--scene-label)/1.2 var(--f-sans); font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* Limits */
.s2-lim { gap: clamp(14px, 2.4cqw, 28px); align-content: start; align-content: safe center; }
.s2-limrow { display: grid; gap: 8px; }
.s2-track { position: relative; height: clamp(18px, 2.4cqw, 30px); background: var(--surface-sunk); border-radius: var(--radius-1); overflow: hidden; }
.s2-wipe { position: absolute; inset: 0; }
.s2-bar, .s2-hatch { position: absolute; top: 0; bottom: 0; left: 0; }
.s2-limrow.is-en .s2-bar { background: var(--model); }
.s2-limrow.is-de .s2-bar { background: var(--you); }
.s2-hatch { background: repeating-linear-gradient(135deg, var(--you-mid) 0 6px, var(--you-soft) 6px 12px); }
.s2-limnote { margin: 0; font: 500 var(--scene-meta)/1.35 var(--f-sans); color: var(--text-muted); }
.s2-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.s2-pill { background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: var(--radius-pill); font: 600 var(--scene-label)/1.2 var(--f-sans); }

/* Presenter control in the card */
.s2-ctl { display: grid; gap: var(--space-2); }
.s2-ctl label { font: 650 var(--type-label)/1.2 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.s2-input {
  width: 100%; min-height: var(--control-h); padding: 0 var(--space-3); border: 1px solid var(--text); border-radius: var(--radius-2);
  background: var(--surface); color: var(--text); font: 450 1rem/1.3 var(--f-sans);
}
.s2-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 899px) and (orientation: portrait) {
  .s2 { padding: 12px; gap: 8px; }
  .s2-head { min-height: calc(var(--scene-figure) * 1.1); }
  .s2-label { letter-spacing: .04em; }
  .s2-foot { min-height: calc(var(--scene-meta) * 1.4 * 4); }
  /* The estimate notes are in the card; the stage keeps bars and figures so everything fits the half-height stage. */
  .s2-limnote { display: none; }
}

/* Short landscape stages (e.g. a phone held sideways): reclaim vertical room, keep every text at 14px or more. */
@media (max-height: 480px) {
  .s2 { padding: 10px 14px; gap: 6px; }
  .s2-head { min-height: 0; }
  .s2-lang { gap: 8px; }
  .s2-row { gap: 4px; }
  .s2-limnote { display: none; }
  .s2-lim { gap: 12px; }
  .s2-pill { padding: 6px 14px; }
}
