/* Slide 24: multi-head attention. */

.attn24-stage {
    --attn24-source-w: 13.4rem;
    --attn24-source-max-h: 18.5rem;
    /* Pre–projection: head body height fixed so split reveal does not resize the lower stage */
    --attn24-head-slot-body-h: 7.8rem;
    --attn24-head-card-preproj-h: 10.2rem;
    --attn24-head-gap: 0.85rem;
    --attn24-mini-x-w: 7.6rem;
    --attn24-branch-gap: 1.85rem;
    --attn24-qkv-w: 3.18rem;
    --attn24-proj-shell-w: var(--attn24-qkv-w);
    --attn24-proj-shell-pad: 0.07rem;
    --attn24-proj-shell-h: calc((var(--attn24-struct-row-h) * 5) - 4px + (var(--attn24-proj-shell-pad) * 2));
    --attn24-proj-top-band: 1.45rem;
    --attn24-proj-bottom-band: 0.25rem;
    --attn24-attn-w: 7.8rem;
    --attn24-output-w: 5.9rem;
    --attn24-concat-w: 10.7rem;
    --attn24-final-output-w: 10.7rem;
    --attn24-wo-w: 3.05rem;
    --attn24-wo-h: 3.05rem;
    --attn24-combine-gap: 0.62rem;
    --attn24-struct-row-h: 0.64rem;
    --attn24-output-row-h: 0.88rem;
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.62rem;
    padding-top: 0.52rem;
    transition: gap 0.26s ease, padding-top 0.26s ease;

}

/* Lower “two-head” block only: captions sit on this region, not above embedding X */
.attn24-head-region {
    width: min(calc(100% - 0.6rem), 63rem);
    max-width: 100%;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.32rem;
    position: relative;
    z-index: 4;

}

.attn24-head-captions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--attn24-head-gap);
    width: 100%;

}

.attn24-head-caption {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: center;
    justify-self: center;
    gap: 0.38rem;
    min-width: 0;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;

}

.attn24-head-caption-title {
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;

}

.attn24-head-caption-meta {
    font-size: var(--fs-2xs);
    font-family: 'JetBrains Mono', monospace;
    color: rgba(10,20,80,1);
    white-space: nowrap;

}

.attn24-head-caption-meta sub {
    font-size: 0.78em;
    line-height: 0;

}

#attn24-head-caption-h1 .attn24-head-caption-title {
    color: rgba(var(--attn19-focus-rgb), 0.94);

}

#attn24-head-caption-h2 .attn24-head-caption-title {
    color: rgba(var(--attn19-source-rgb), 0.9);

}

#slide-24 .slide-header .attn19-subtitle {
    max-width: none;
    white-space: nowrap;
    line-height: 1.35;
    font-size: 0.875rem;

}

#attn24-takeaway {
    display: block;
    line-height: 1.5;

}

/* Step 0: two head columns visible below X; body is a single empty slot until split. */
#slide-24:not(.attn24-show-split) .attn24-head-body {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    min-height: var(--attn24-head-slot-body-h);
    height: var(--attn24-head-slot-body-h);
    max-height: var(--attn24-head-slot-body-h);
    padding: 0.45rem;
    border: 1px dashed rgba(40,60,130,0.32);
    border-radius: var(--radius-sm);
    background: rgba(60, 70, 130, 0.18);
    box-sizing: border-box;

}

#slide-24:not(.attn24-show-split) .attn24-head-source-col {
    grid-column: 1;

}

/* Q/K/V rows stay out of the layout until the projection step — avoids a huge jump on split reveal. */
.attn24-head-card:not(.is-proj-visible) .attn24-head-proj-pane {
    display: none;

}

.attn24-head-card.is-split-visible:not(.is-proj-visible) .attn24-head-body {
    min-height: var(--attn24-head-slot-body-h);
    height: var(--attn24-head-slot-body-h);
    max-height: var(--attn24-head-slot-body-h);
    box-sizing: border-box;

}

/* Lock full card height until Q/K/V stage so reveal only swaps content inside the slot */
.attn24-head-card:not(.is-proj-visible) {
    height: var(--attn24-head-card-preproj-h);
    min-height: var(--attn24-head-card-preproj-h);
    max-height: var(--attn24-head-card-preproj-h);
    overflow: hidden;
    box-sizing: border-box;

}

.attn24-head-card.is-proj-visible {
    height: auto;
    max-height: none;
    min-height: 14.2rem;
    overflow: visible;

}

#slide-24:not(.attn24-show-split) .attn24-head-overlay {
    display: none;

}

.attn24-ghost-layer,
  .attn24-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;

}

/* Stacking: heads < ghosts < bus SVG < embedding X (source always on top — no cover during copy reveal) */
.attn24-ghost-layer {
    z-index: 5;
    overflow: hidden;

}

.attn24-overlay {
    z-index: 6;
    opacity: 0;
    transition: opacity 0.22s ease;

}

/* Match slide 23 matrix projection bus (attn23-proj-overlay) */
.attn24-overlay-line,
  .attn24-overlay-bus {
    opacity: 0;
    transition: opacity 0.22s ease;

}

.attn24-overlay-line {
    stroke: rgba(var(--attn19-focus-rgb), 0.92);
    stroke-width: 1.28;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;

}

.attn24-overlay-bus {
    stroke: rgba(var(--attn19-focus-rgb), 0.66);
    stroke-width: 1.12;
    fill: none;

}

.attn24-copy-node {
    fill: rgba(var(--attn19-focus-rgb), 0.16);
    stroke: rgba(var(--attn19-focus-rgb), 0.8);
    stroke-width: 1.08;
    opacity: 0;
    transition: opacity 0.22s ease;

}

.attn24-copy-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    fill: rgba(10,20,80,0.96);
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;

}

#slide-24.attn24-show-split:not(.attn24-source-collapsed) .attn24-overlay,
  #slide-24.attn24-show-split:not(.attn24-source-collapsed) .attn24-overlay-line,
  #slide-24.attn24-show-split:not(.attn24-source-collapsed) .attn24-overlay-bus,
  #slide-24.attn24-show-split:not(.attn24-source-collapsed) .attn24-copy-node,
  #slide-24.attn24-show-split:not(.attn24-source-collapsed) .attn24-copy-label {
    opacity: 1;

}

.attn24-source-panel {
    width: var(--attn24-source-w);
    display: grid;
    justify-items: center;
    gap: 0.22rem;
    transition: opacity 0.24s ease, transform 0.24s ease;
    position: relative;
    z-index: 1;

}

.attn24-source-wrap,
  .attn24-head-grid,
  .attn24-head-region {
    transition: opacity 0.24s ease, transform 0.24s ease;

}

.attn24-source-wrap {
    width: 100%;
    display: grid;
    justify-items: center;
    align-content: start;
    max-height: var(--attn24-source-max-h);
    overflow: visible;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.28s ease, opacity 0.24s ease, transform 0.24s ease;
    position: relative;
    z-index: 10;
    isolation: isolate;

}

.attn24-source-label {
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(10,20,80,1);
    text-align: center;

}

.attn24-source-meta {
    font-size: var(--fs-2xs);
    font-family: 'JetBrains Mono', monospace;
    color: rgba(30,50,120,1);

}

.attn24-source-meta sup,
  .attn24-source-meta sub {
    font-size: 0.78em;

}

.attn24-source-shell,
  .attn24-head-mini-x-shell,
  .attn24-head-qkv-shell,
  .attn24-head-output-shell {
    position: relative;
    border: 1px solid rgba(40,60,130,0.28);
    border-radius: var(--radius-sm);
    background: rgba(40,60,130,0.05);
    overflow: hidden;

}

.attn24-source-shell {
    width: 100%;
    padding: 0.16rem 0.22rem;

}

.attn24-source-shell::before,
  .attn24-head-mini-x-shell::before,
  .attn24-head-qkv-shell::before,
  .attn24-head-output-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);

}

.attn24-matrix-slots {
    display: grid;

}

.attn24-matrix-row {
    min-height: 0;
    padding: 0;

}

.attn24-matrix-row .attn19-vector-wrap {
    display: block;
    width: 100%;
    min-height: 0;

}

.attn24-matrix-row .attn19-vector {
    width: 100%;
    border-radius: 0;

}

.attn24-matrix-row + .attn24-matrix-row .attn19-vector {
    margin-top: -1px;

}

.attn24-source-row .attn19-vector {
    height: var(--fs-sm);

}

.attn24-source-row:first-child .attn19-vector,
  .attn24-head-mini-x-row:first-child .attn19-vector,
  .attn24-head-qkv-row:first-child .attn19-vector,
  .attn24-head-output-row:first-child .attn19-vector,
  .attn24-concat-row:first-child .attn19-vector,
  .attn24-mha-output-row:first-child .attn19-vector {
    border-top-left-radius: var(--sp-1);
    border-top-right-radius: var(--sp-1);

}

.attn24-source-row:last-child .attn19-vector,
  .attn24-head-mini-x-row:last-child .attn19-vector,
  .attn24-head-qkv-row:last-child .attn19-vector,
  .attn24-head-output-row:last-child .attn19-vector,
  .attn24-concat-row:last-child .attn19-vector,
  .attn24-mha-output-row:last-child .attn19-vector {
    border-bottom-left-radius: var(--sp-1);
    border-bottom-right-radius: var(--sp-1);

}

.attn24-head-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--attn24-head-gap);
    align-items: start;
    position: relative;
    z-index: 0;
    transform: translateY(0);
    transition: width 0.28s ease, opacity 0.24s ease, transform 0.24s ease;

}

.attn24-head-card {
    --attn24-head-rgb: var(--attn19-focus-rgb);
    min-height: var(--attn24-head-card-preproj-h);
    display: grid;
    align-content: start;
    gap: 0.32rem;
    padding: 0.4rem 0.52rem 0.44rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(40,60,130,0.24);
    background: rgba(224,229,248,0.82);
    box-shadow: inset 0 0 0 1px rgba(40,60,130,0.14);
    transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;

}

#attn24-head-card-h1 {
    --attn24-head-rgb: var(--attn19-focus-rgb);

}

#attn24-head-card-h2 {
    --attn24-head-rgb: var(--attn19-source-rgb);

}

.attn24-head-mini-x-label,
  .attn24-head-dummy-x-label,
  .attn24-head-qkv-label,
  .attn24-head-output-label,
  .attn24-head-w-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;

}

.attn24-head-body {
    position: relative;
    display: grid;
    grid-template-columns: var(--attn24-mini-x-w) var(--attn24-branch-gap) minmax(0, 1fr);
    align-items: start;
    column-gap: 0;

}

.attn24-head-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.22s ease;

}

.attn24-head-overlay-line,
  .attn24-head-overlay-bus {
    stroke: rgba(var(--attn24-head-rgb), 0.96);
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: butt;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.22s ease;

}

.attn24-head-overlay-bus {
    stroke: rgba(var(--attn24-head-rgb), 0.78);
    stroke-width: 1.5;
    stroke-linecap: round;

}

.attn24-head-copy-badge {
    opacity: 0;
    transition: opacity 0.22s ease;

}

.attn24-head-copy-pill {
    fill: rgba(230, 234, 252, 0.97);
    stroke: rgba(var(--attn24-head-rgb), 0.85);
    stroke-width: 1.25;
    filter: drop-shadow(0 0.05rem 0.18rem rgba(40, 60, 130, 0.22));

}

.attn24-head-copy-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    fill: rgba(10,20,80,1);
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;

}

.attn24-head-source-col {
    grid-column: 1;
    display: grid;
    justify-items: center;
    align-content: start;
    position: relative;
    z-index: 2;

}

.attn24-head-mini-x-wrap {
    display: grid;
    justify-items: center;
    gap: 0.14rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.18rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;

}

.attn24-head-mini-x-label {
    color: rgba(40,60,130,0.82);
    transform: translateX(-0.7rem);

}

.attn24-head-mini-x-shell {
    width: var(--attn24-mini-x-w);
    padding: 0.07rem;

}

.attn24-head-mini-x-row .attn19-vector {
    height: var(--attn24-struct-row-h);
    border-color: rgba(10,20,80,1);
    background: rgba(40,60,130,0.13);

}

.attn24-head-dummy-x-wrap {
    display: grid;
    width: var(--attn24-proj-shell-w);
    grid-template-rows: var(--attn24-proj-top-band) var(--attn24-proj-shell-h) var(--attn24-proj-bottom-band);
    justify-items: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.18rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    position: relative;
    z-index: 2;

}

.attn24-head-dummy-x-label {
    color: rgba(40,60,130,0.8);
    line-height: 1;
    grid-row: 1;
    align-self: end;

}

.attn24-head-dummy-x-shell {
    position: relative;
    grid-row: 2;
    width: var(--attn24-proj-shell-w);
    height: var(--attn24-proj-shell-h);
    border: 1px solid rgba(40,60,130,0.45);
    border-radius: var(--radius-sm);
    background: rgba(40,60,130,0.11);
    overflow: hidden;

}

.attn24-head-dummy-x-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    pointer-events: none;

}

.attn24-head-dummy-x-grid {
    position: absolute;
    inset: 0;

}

.attn24-head-dummy-x-grid-v,
  .attn24-head-dummy-x-grid-h {
    position: absolute;
    background: rgba(40,60,130,0.4);
    pointer-events: none;

}

.attn24-head-dummy-x-grid-v {
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);

}

.attn24-head-dummy-x-grid-h {
    left: 0;
    right: 0;
    height: 1px;

}

.attn24-head-proj-pane {
    grid-column: 3;
    display: grid;
    gap: 0.24rem;
    position: relative;
    z-index: 2;
    transition: opacity 0.22s ease, filter 0.22s ease;
    margin-left: 1.4rem;
    margin-top: -0.8rem;

}

.attn24-head-proj-row {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content minmax(0, 1fr);
    align-items: center;
    gap: 0.52rem;

}

.attn24-head-proj-op {
    min-width: 1.05rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(10,20,80,1);
    opacity: 0;
    transform: translateY(0.08rem);
    transition: opacity 0.22s ease, transform 0.22s ease;

}

.attn24-head-w-wrap,
  .attn24-head-qkv-wrap {
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.18rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;

}

.attn24-head-w-wrap {
    display: grid;
    width: var(--attn24-proj-shell-w);
    grid-template-rows: var(--attn24-proj-top-band) var(--attn24-proj-shell-h) var(--attn24-proj-bottom-band);
    justify-items: center;
    align-items: center;
    position: relative;
    z-index: 2;

}

.attn24-head-w-shell {
    position: relative;
    grid-row: 2;
    width: var(--attn24-proj-shell-w);
    height: var(--attn24-proj-shell-h);
    border: 1px solid rgba(40,60,130,0.45);
    border-radius: var(--radius-sm);
    background: rgba(40,60,130,0.1);
    overflow: hidden;

}

.attn24-head-w-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    pointer-events: none;

}

.attn24-head-w-grid {
    position: absolute;
    inset: 0;

}

.attn24-head-w-grid-v,
  .attn24-head-w-grid-h {
    position: absolute;
    background: rgba(40,60,130,0.4);
    pointer-events: none;

}

.attn24-head-w-grid-v {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);

}

.attn24-head-w-grid-h {
    left: 0;
    right: 0;
    height: 1px;

}

.attn24-head-w-label {
    color: rgba(10,20,80,1);
    grid-row: 1;
    align-self: end;

}

.attn24-head-w-label sub {
    font-size: 0.78em;
    line-height: 0;

}

.attn24-head-w-dims {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    color: rgba(30,50,120,1);
    letter-spacing: 0.04em;
    grid-row: 1;
    align-self: start;

}

.attn24-head-qkv-wrap {
    display: grid;
    width: var(--attn24-proj-shell-w);
    grid-template-rows: var(--attn24-proj-top-band) var(--attn24-proj-shell-h) var(--attn24-proj-bottom-band);
    justify-items: center;
    align-items: center;
    position: relative;
    z-index: 2;

}

.attn24-head-qkv-shell {
    grid-row: 2;
    width: var(--attn24-proj-shell-w);
    height: var(--attn24-proj-shell-h);
    padding: var(--attn24-proj-shell-pad);

}

.attn24-head-qkv-row .attn19-vector {
    height: var(--attn24-struct-row-h);
    border-color: rgba(10,20,80,1);
    background: rgba(40,60,130,0.12);

}

.attn24-head-qkv-wrap[data-proj="q"] .attn24-head-qkv-label {
    color: rgba(var(--attn19-focus-rgb), 0.92);
    grid-row: 1;
    align-self: end;

}

.attn24-head-qkv-wrap[data-proj="q"] .attn19-vector {
    border-color: rgba(var(--attn19-focus-rgb), 0.52);
    background: rgba(var(--attn19-focus-rgb), 0.1);

}

.attn24-head-qkv-wrap[data-proj="k"] .attn24-head-qkv-label {
    color: rgba(var(--attn19-source-rgb), 0.9);
    grid-row: 1;
    align-self: end;

}

.attn24-head-qkv-wrap[data-proj="k"] .attn19-vector {
    border-color: rgba(var(--attn19-source-rgb), 0.44);
    background: rgba(var(--attn19-source-rgb), 0.07);

}

.attn24-head-qkv-wrap[data-proj="v"] .attn24-head-qkv-label {
    color: rgba(40,60,130,0.84);
    grid-row: 1;
    align-self: end;

}

.attn24-head-qkv-wrap[data-proj="v"] .attn19-vector {
    border-color: rgba(40,60,130,0.42);
    background: rgba(40,60,130,0.08);

}

.attn24-head-attn-block,
  .attn24-head-output-wrap {
    display: none;

}

.attn24-head-attn-block {
    width: 100%;
    margin-top: 0.04rem;
    padding: 0.3rem 0.36rem;
    border: 1px solid rgba(var(--attn24-head-rgb), 0.28);
    border-radius: var(--radius-md);
    background:
      linear-gradient(180deg, rgba(var(--attn24-head-rgb), 0.1), rgba(var(--attn24-head-rgb), 0.04)),
      rgba(232,236,252,0.92);
    display: none;
    justify-items: center;
    gap: 0.12rem;
    transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;

}

.attn24-head-attn-block-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(var(--attn24-head-rgb), 0.92);
    text-align: center;

}

.attn24-head-attn-block-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: rgba(10,20,80,1);
    text-align: center;
    line-height: 1.28;
    white-space: normal;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;

}

.attn24-head-attn-block-formula sup,
  .attn24-head-attn-block-formula sub {
    font-size: 0.78em;
    line-height: 0;

}

.attn24-head-attn-block.is-active {
    border-color: rgba(var(--attn24-head-rgb), 0.48);
    box-shadow:
      0 0 0 1px rgba(var(--attn24-head-rgb), 0.22),
      0 0 0.7rem rgba(var(--attn24-head-rgb), 0.18);

}

.attn24-head-output-wrap {
    gap: 0.12rem;
    justify-items: center;

}

.attn24-head-output-label {
    color: rgba(var(--attn24-head-rgb), 0.94);

}

.attn24-head-output-label sup {
    font-size: 0.74em;
    line-height: 0;

}

.attn24-head-output-shell {
    width: var(--attn24-output-w);
    padding: 0.08rem;

}

.attn24-head-output-row {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.22s ease;

}

.attn24-head-output-row.is-hidden {
    opacity: 0;
    transform: translateY(0.12rem);

}

.attn24-head-output-row.is-active .attn19-vector {
    box-shadow:
      0 0 0 1px rgba(var(--attn24-head-rgb), 0.38),
      0 0 0.48rem rgba(var(--attn24-head-rgb), 0.18);

}

.attn24-head-output-row .attn19-vector-wrap {
    display: block;
    width: 100%;
    min-height: 0;

}

.attn24-head-output-row .attn19-vector {
    width: 100%;
    height: var(--attn24-output-row-h);
    border-radius: 0;

}

#attn24-head-card-h1 .attn24-head-output-row .attn19-vector {
    border-color: rgba(var(--attn19-focus-rgb), 0.52);
    background: rgba(var(--attn19-focus-rgb), 0.14);

}

#attn24-head-card-h2 .attn24-head-output-row .attn19-vector {
    border-color: rgba(var(--attn19-source-rgb), 0.48);
    background: rgba(var(--attn19-source-rgb), 0.11);

}

.attn24-combine-stage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: var(--attn24-concat-w);
    justify-content: center;
    align-content: start;
    justify-items: center;
    gap: var(--attn24-combine-gap);
    padding: 0.6rem 1rem 0.9rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.26s ease, transform 0.26s ease;
    transform: translateY(0.18rem);
    z-index: 3;

}

.attn24-combine-stage-inner {
    display: contents;

}

.attn24-concat-wrap,
  .attn24-wo-wrap,
  .attn24-mha-output-wrap {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.12rem;

}

.attn24-concat-wrap,
  .attn24-mha-output-wrap {
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.18rem) scale(0.985);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;

}

.attn24-concat-label,
  .attn24-mha-output-label,
  .attn24-wo-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(10,20,80,1);

}

.attn24-concat-dims,
  .attn24-mha-output-dims,
  .attn24-wo-dims {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-2xs);
    color: rgba(30,50,120,1);
    letter-spacing: 0.04em;
    text-align: center;

}

.attn24-concat-shell,
  .attn24-mha-output-shell {
    position: relative;
    width: var(--attn24-concat-w);
    padding: 0.08rem;
    border: 1px solid rgba(40,60,130,0.28);
    border-radius: var(--radius-sm);
    background: rgba(40,60,130,0.05);
    overflow: hidden;

}

.attn24-concat-shell::before,
  .attn24-mha-output-shell::before,
  .attn24-wo-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    pointer-events: none;

}

.attn24-concat-row .attn19-vector,
  .attn24-mha-output-row .attn19-vector {
    height: var(--attn24-output-row-h);

}

.attn24-concat-vector {
    background:
      linear-gradient(90deg,
        rgba(var(--attn19-focus-rgb), 0.14) 0,
        rgba(var(--attn19-focus-rgb), 0.14) 50%,
        rgba(var(--attn19-source-rgb), 0.14) 50%,
        rgba(var(--attn19-source-rgb), 0.14) 100%);
    border-color: rgba(40,60,130,0.42);

}

.attn24-concat-vector::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(214,224,250,0.34);
    transform: translateX(-50%);
    pointer-events: none;

}

.attn24-concat-target {
    position: absolute;
    top: 0.1rem;
    bottom: 0.1rem;
    width: calc(50% - 0.08rem);
    opacity: 0;
    pointer-events: none;

}

.attn24-concat-target.is-left {
    left: 0.1rem;

}

.attn24-concat-target.is-right {
    right: 0.1rem;

}

.attn24-combine-mul,
  .attn24-combine-equals {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-base);
    color: rgba(10,20,80,1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.12rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    align-self: center;

}

.attn24-wo-wrap {
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.16rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;

}

.attn24-wo-shell {
    position: relative;
    width: var(--attn24-wo-w);
    height: var(--attn24-wo-h);
    border: 1px solid rgba(40,60,130,0.28);
    border-radius: var(--radius-sm);
    background: rgba(40,60,130,0.05);
    overflow: hidden;

}

.attn24-wo-grid {
    position: absolute;
    inset: 0;

}

.attn24-wo-grid-v,
  .attn24-wo-grid-h {
    position: absolute;
    background: rgba(40,60,130,0.2);
    pointer-events: none;

}

.attn24-wo-grid-v {
    top: 0;
    bottom: 0;
    width: 1px;

}

.attn24-wo-grid-h {
    left: 0;
    right: 0;
    height: 1px;

}

.attn24-final-output-vector {
    border-color: rgba(40,60,130,0.46);
    background: rgba(40,60,130,0.1);

}

#slide-24.attn24-show-concat .attn24-source-wrap,
  #slide-24.attn24-show-concat .attn24-head-region,
  #slide-24.attn24-show-concat .attn24-overlay,
  #slide-24.attn24-show-wo .attn24-source-wrap,
  #slide-24.attn24-show-wo .attn24-head-region,
  #slide-24.attn24-show-wo .attn24-overlay {
    opacity: 0;
    transform: translateY(-0.18rem);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;

}

#slide-24.attn24-show-concat-flight .attn24-combine-stage,
  #slide-24.attn24-show-concat .attn24-combine-stage,
  #slide-24.attn24-show-wo .attn24-combine-stage {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

#slide-24.attn24-show-concat-ready .attn24-concat-wrap,
  #slide-24.attn24-show-wo .attn24-concat-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);

}

#slide-24.attn24-show-wo .attn24-combine-stage {
    grid-template-columns: var(--attn24-concat-w) auto var(--attn24-wo-w) auto var(--attn24-final-output-w);
    align-items: start;

}

#slide-24.attn24-source-collapsed .attn24-stage {
    gap: 0.18rem;
    padding-top: 0.24rem;

}

#slide-24.attn24-source-collapsed .attn24-source-wrap {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-0.42rem);
    pointer-events: none;

}

#slide-24.attn24-source-collapsed .attn24-overlay,
  #slide-24.attn24-source-collapsed .attn24-overlay-line,
  #slide-24.attn24-source-collapsed .attn24-overlay-bus,
  #slide-24.attn24-source-collapsed .attn24-copy-node,
  #slide-24.attn24-source-collapsed .attn24-copy-label {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

}

#slide-24.attn24-source-collapsed .attn24-head-grid {
    width: min(calc(100% - 0.3rem), 67rem);
    transform: translateY(-0.36rem);

}

#slide-24.attn24-show-output:not(.attn24-show-concat-flight):not(.attn24-show-concat):not(.attn24-show-wo) .attn24-head-grid {
    transform: translateY(-0.22rem);

}

#slide-24.attn24-show-output:not(.attn24-show-concat-flight):not(.attn24-show-concat):not(.attn24-show-wo) .attn24-source-collapsed .attn24-head-grid {
    transform: translateY(-0.5rem);

}

#slide-24.attn24-show-wo .attn24-concat-wrap,
  #slide-24.attn24-show-wo .attn24-wo-wrap,
  #slide-24.attn24-show-wo .attn24-mha-output-wrap {
    align-self: start;

}

#slide-24.attn24-show-wo .attn24-wo-wrap,
  #slide-24.attn24-show-wo .attn24-combine-mul,
  #slide-24.attn24-show-wo .attn24-combine-equals,
  #slide-24.attn24-show-wo .attn24-mha-output-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

/* Keep X visually unchanged during the split/copy transition; dim only once projections begin. */
#slide-24.attn24-show-split:not(.attn24-source-collapsed):not(.attn24-show-proj) .attn24-source-panel,
  #slide-24.attn24-show-split:not(.attn24-source-collapsed):not(.attn24-show-proj) .attn24-source-wrap {
    opacity: 1;

}

#slide-24.attn24-show-proj .attn24-source-panel {
    opacity: 1;

}

#slide-24.attn24-show-attn .attn24-source-panel,
  #slide-24.attn24-show-output .attn24-source-panel {
    opacity: 1;

}

.attn24-head-card.is-split-visible .attn24-head-mini-x-wrap,
  .attn24-head-card.is-proj-visible .attn24-head-mini-x-wrap,
  .attn24-head-card.is-attn-visible .attn24-head-mini-x-wrap,
  .attn24-head-card.is-output-visible .attn24-head-mini-x-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

.attn24-head-card.is-proj-dummies .attn24-head-dummy-x-wrap,
  .attn24-head-card.is-attn-visible .attn24-head-dummy-x-wrap,
  .attn24-head-card.is-output-visible .attn24-head-dummy-x-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

.attn24-head-card.is-proj-dummies .attn24-head-overlay,
  .attn24-head-card.is-attn-visible .attn24-head-overlay,
  .attn24-head-card.is-output-visible .attn24-head-overlay,
  .attn24-head-card.is-proj-dummies .attn24-head-overlay-line,
  .attn24-head-card.is-attn-visible .attn24-head-overlay-line,
  .attn24-head-card.is-output-visible .attn24-head-overlay-line,
  .attn24-head-card.is-proj-dummies .attn24-head-overlay-bus,
  .attn24-head-card.is-attn-visible .attn24-head-overlay-bus,
  .attn24-head-card.is-output-visible .attn24-head-overlay-bus,
  .attn24-head-card.is-proj-dummies .attn24-head-copy-badge,
  .attn24-head-card.is-attn-visible .attn24-head-copy-badge,
  .attn24-head-card.is-output-visible .attn24-head-copy-badge {
    opacity: 1;

}

.attn24-head-card.is-proj-weights .attn24-head-w-wrap,
  .attn24-head-card.is-attn-visible .attn24-head-w-wrap,
  .attn24-head-card.is-output-visible .attn24-head-w-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

.attn24-head-card.is-qkv-visible .attn24-head-qkv-wrap,
  .attn24-head-card.is-attn-visible .attn24-head-qkv-wrap,
  .attn24-head-card.is-output-visible .attn24-head-qkv-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

.attn24-head-card.is-proj-weights .attn24-head-proj-op,
  .attn24-head-card.is-attn-visible .attn24-head-proj-op,
  .attn24-head-card.is-output-visible .attn24-head-proj-op {
    opacity: 1;
    transform: translateY(0);

}

.attn24-head-card.is-attn-visible .attn24-head-attn-block,
  .attn24-head-card.is-output-visible .attn24-head-attn-block {
    display: grid;

}

.attn24-head-card.is-output-visible .attn24-head-output-wrap {
    display: grid;

}

.attn24-head-card.is-attn-visible .attn24-head-proj-pane {
    opacity: 1;

}

.attn24-head-card.is-attn-visible .attn24-head-body {
    opacity: 1;
    transition: opacity 0.28s ease;

}

.attn24-head-card.is-output-visible .attn24-head-proj-pane {
    opacity: 1;

}

.attn24-head-card.is-output-visible .attn24-head-attn-block {
    opacity: 0.92;

}

.attn24-ghost {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    transform-origin: center center;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
    opacity: 1;

}
