/* The listening chapter: one statement, one switch, the measured phrase drawn on the page itself. */
.astg-stage.ass-story {
  --ass-ink: var(--aop-ink, #171d19);
  --ass-muted: #59625b;
  --ass-yellow: var(--aop-yellow, #f6ce2b);
  --ass-rule: #cbd1c8;
  --ass-ease: cubic-bezier(.22, 1, .36, 1);
  --ass-reserve: 44px;
  display: block; min-height: 0;
  padding: clamp(88px, 8vw, 124px) var(--aop-gutter, 4vw) 0;
  color: var(--ass-ink); background: var(--aop-canvas, #f4f5f2); color-scheme: light;
}
.ass-story :is(h2, p, figure) { margin: 0; }
.ass-story button { font-family: inherit; cursor: pointer; }
.ass-story button:disabled { cursor: default; }
.ass-story [hidden] { display: none !important; }
.ass-story :is(button, a, summary):focus-visible { outline: 2px solid var(--ass-ink); outline-offset: 5px; }
.ass-story .ass-heading { position: relative; width: min(100%, 1120px); margin: 0 auto; text-align: center; scroll-margin-top: 100px; }
.ass-heading strong { font-weight: 600; }
.ass-heading > p { margin-top: 20px; color: var(--ass-muted); font-size: 22px; line-height: 1.4; letter-spacing: -.01em; }
.proof-anchor { position: absolute; top: 0; scroll-margin-top: 100px; }
.proof-noscript { margin-top: 12px !important; color: var(--ass-muted); font-size: 14px; line-height: 1.5; }
.ass-experience { width: min(100%, 1120px); margin: 44px auto 0; }
.ass-console { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; width: fit-content; max-width: 100%; margin-inline: auto; }
.ass-story .ass-play { display: inline-flex; justify-content: center; align-items: center; gap: 12px; width: 280px; min-height: 60px; border: 1px solid var(--ass-ink); border-radius: var(--sys-radius, 8px); padding: 0; background: var(--ass-ink); color: #f4f5f2; font-size: 18px; font-weight: 500; transition: background-color 180ms, color 180ms; }
.ass-play svg { flex-shrink: 0; }
.ass-story .ass-play:hover { background: #343e36; border-color: #343e36; }
.ass-play:active { transform: translateY(1px); }
.ass-story .ass-replay { position: absolute; top: 100%; left: 50%; display: inline-flex; align-items: center; gap: 8px; min-height: var(--ass-reserve); border: 0; padding: 0 12px; background: none; color: var(--ass-ink); font-size: 15px; font-weight: 500; white-space: nowrap; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transform: translateX(-50%); transition: text-decoration-color 180ms; }
.ass-story .ass-replay:hover { text-decoration-color: currentColor; }
.ass-story .ass-audio-error { margin: var(--ass-reserve) auto 0; max-width: 44ch; color: #9c291e; font-size: 14px; line-height: 1.4; text-align: center; }
.ass-choices { --ass-versions: 3; --ass-choices-inset: 5px; position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: var(--ass-choices-inset); border-radius: 14px; background: #e9ece5; }
.ass-choices::before { content: ""; position: absolute; inset: var(--ass-choices-inset) auto var(--ass-choices-inset) var(--ass-choices-inset); width: calc((100% - 2 * var(--ass-choices-inset)) / var(--ass-versions)); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgb(23 29 25 / .16), 0 0 0 1px rgb(23 29 25 / .04); transform: translateX(calc(var(--ass-chosen) * 100%)); transition: transform 360ms var(--ass-ease); }
.ass-choices:has(.ass-step:nth-child(1)[aria-pressed="true"]) { --ass-chosen: 0; }
.ass-choices:has(.ass-step:nth-child(2)[aria-pressed="true"]) { --ass-chosen: 1; }
.ass-choices:has(.ass-step:nth-child(3)[aria-pressed="true"]) { --ass-chosen: 2; }
.ass-story .ass-step { position: relative; min-height: 50px; padding: 0 24px; border: 0; border-radius: 10px; background: none; color: var(--ass-muted); font-size: 17px; font-weight: 500; white-space: nowrap; transition: color 180ms; }
.ass-story .ass-step:hover, .ass-story .ass-step[aria-pressed="true"] { color: var(--ass-ink); }
.ass-story .ass-drawing { margin-top: var(--ass-reserve); }
.ass-graph { position: relative; height: clamp(180px, calc(100svh - 2 * var(--sys-h2, 80px) - 426px), 320px); padding-top: 44px; }
.ass-graph > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ass-graph path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ass-reference-fill { fill: #dce1d7; }
.ass-original-line { fill: none; stroke: #748371; stroke-width: 1.5; stroke-dasharray: 5 5; }
.ass-drawing[data-step="original"] .ass-original-line { stroke: var(--ass-ink); stroke-dasharray: none; }
.ass-result-line { fill: none; stroke: var(--ass-ink); stroke-width: 2; }
.ass-difference { fill: var(--ass-yellow); }
.ass-recording-layer { opacity: 0; transition: opacity 400ms var(--ass-ease); }
.ass-recording-layer[data-selected="true"] { opacity: 1; }
.ass-drawing[data-entered="true"] .ass-recording-layer[data-selected="true"] { animation: ass-trace-enter 700ms var(--ass-ease) both; }
@keyframes ass-trace-enter { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.ass-hit-label, .ass-body-label { position: absolute; top: 0; text-align: center; font-size: 17px; line-height: 1.2; }
.ass-hit-label { left: 15%; transform: translateX(-50%); }
.ass-hit-label > span { display: block; height: 42px; width: 1px; margin: 12px auto 0; background: var(--ass-rule); }
.ass-body-label { left: 67%; width: 17%; display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.ass-body-label strong { font-weight: 500; }
.ass-body-label > span { display: block; align-self: stretch; height: 14px; margin-top: 12px; border: 1px solid #a5af9f; border-bottom: 0; transition: border-color 300ms; }
.ass-drawing:not([data-step="original"]) .ass-body-label > span { border-color: #8a782b; }
.ass-graph-key { display: flex; justify-content: center; min-height: 20px; margin-top: 16px; color: var(--ass-muted); font-size: 13px; }
.ass-graph-key .scope-key-static { display: inline-flex; align-items: center; gap: 7px; }
.ass-graph-key .scope-key-static i { width: 18px; height: 0; border-top: 2px dashed #7b887b; }
.ass-graph-key .scope-key-static .ass-key-atomic { margin-left: 16px; border-top: 2px solid var(--ass-ink); }
.ass-key-result { display: inline-flex; align-items: center; gap: 7px; }
.ass-graph-key .scope-key-static .ass-key-added { width: 5px; height: 14px; margin-left: 16px; border: 0; border-radius: 2px 2px 0 0; background: var(--ass-yellow); }
.ass-drawing[data-step="original"] .scope-key-static i { border-top: 2px solid var(--ass-ink); }
.ass-story .ass-result-caption { margin-top: 28px; color: var(--ass-ink); font-size: 28px; line-height: 1.25; letter-spacing: -.02em; text-align: center; }
.ass-footer { width: min(100%, 1120px); margin: 20px auto 0; display: flex; justify-content: center; }
.ass-footer .astg-evidence summary { display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px; margin-inline: auto; list-style: none; color: var(--ass-muted); font-size: 14px; cursor: pointer; }
.astg-evidence summary::-webkit-details-marker { display: none; }
.astg-evidence[open] summary svg { transform: rotate(45deg); }
.ass-footer .astg-evidence-copy { max-width: 80ch; padding-block: 16px; color: var(--ass-muted); }
.ass-footer .astg-evidence-copy p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.ass-footer .astg-evidence-copy a { padding-block: 11px; color: var(--ass-ink); text-underline-offset: 4px; }
@media (min-width: 761px) and (max-height: 800px) {
  .astg-stage.ass-story { --ass-reserve: 40px; }
  .aop-page #inside { scroll-margin-top: 76px; }
  .ass-heading > p { margin-top: 12px; font-size: 20px; }
  .ass-experience { margin-top: 28px; }
  .ass-graph { height: clamp(160px, calc(100svh - 2 * var(--sys-h2, 80px) - 346px), 220px); padding-top: 36px; }
  .ass-hit-label > span { height: 30px; }
  .ass-story .ass-result-caption { margin-top: 20px; font-size: 24px; }
}
@media (max-width: 760px) {
  .ass-heading > p { font-size: 18px; }
  .ass-graph { height: 220px; }
  .ass-hit-label, .ass-body-label { font-size: 14px; }
  .ass-story .ass-result-caption { font-size: 22px; }
}
@media (max-width: 520px) {
  .ass-console { flex-direction: column; align-items: stretch; }
  .ass-choices { display: grid; }
  .ass-story .ass-step { padding: 0 8px; font-size: 14px; }
  .ass-story .ass-play { width: 100%; font-size: 16px; }
  .ass-graph-key { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ass-story *, .ass-story *::before, .ass-story *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* Server-rendered graph keeps its silent state; the script swaps it for the painted phrase. */
.proof-scope, .scope-key-live { display: none; }
.scope-key { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.proof-stack { display: grid; }
.proof-stack > * { grid-area: 1 / 1; }
.proof-stack-sizer { visibility: hidden; }
.scope-swatch { flex: none; width: 5px; height: 14px; border-radius: 2px 2px 0 0; }
.scope-swatch--plain { background: #8b958a; }
.scope-swatch--added { background: #f6ce2b; }
.scope-swatch--removed { background: #bfc6bc; }
@media (prefers-reduced-motion: no-preference) {
  .proof-enhanced .proof-scope { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .proof-enhanced .ass-graph > svg { opacity: 0; }
  .proof-enhanced :is(.ass-hit-label, .ass-body-label) { display: none; }
  .proof-enhanced .scope-key-static { display: none; }
  .proof-enhanced .scope-key-live { display: grid; }
  .proof-enhanced :is(.scope-key-plain, .scope-key-diff) { grid-area: 1 / 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; transition: opacity 320ms ease-out, visibility 320ms; }
  .proof-enhanced[data-scope-pass="reference"] .scope-key-diff, .proof-enhanced[data-scope-pass="treated"] .scope-key-plain { visibility: hidden; opacity: 0; transition: none; }
  .proof-enhanced[data-scope-pass="reference"] .ass-result-caption { animation: scope-turn-reference 420ms cubic-bezier(.2, .7, .2, 1) backwards; }
  .proof-enhanced[data-scope-pass="treated"] .ass-result-caption { animation: scope-turn-treated 420ms cubic-bezier(.2, .7, .2, 1) backwards; }
}
@keyframes scope-turn-reference { from { opacity: 0; transform: translateY(6px); } }
@keyframes scope-turn-treated { from { opacity: 0; transform: translateY(6px); } }
