/* Slide 27: Attention Mixes, FFN Transforms */

.ffn27-stage {
  display: grid;
  gap: 0.84rem;
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 120, 144, 0.08), transparent 32%),
    radial-gradient(circle at 18% 14%, rgba(90, 48, 200, 0.06), transparent 34%),
    var(--surface);
}

/* role comparison boxes */
.ffn27-role-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  justify-content: center;
  align-items: center;
}

.ffn27-role-box {
  flex: 1 1 14rem;
  max-width: 22rem;
  padding: 0.82rem 0.92rem;
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.28rem;
  text-align: center;
}

.ffn27-role-attn {
  border: 1px solid rgba(90, 48, 200, 0.32);
  background: rgba(90, 48, 200, 0.1);
}

.ffn27-role-ffn {
  border: 1px solid rgba(0, 120, 144, 0.3);
  background: rgba(0, 120, 144, 0.08);
}

.ffn27-role-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ffn27-role-attn .ffn27-role-title { color: #2e1a80; }
.ffn27-role-ffn .ffn27-role-title { color: #003844; }

.ffn27-role-desc {
  font-size: var(--fs-xs);
  color: rgba(10, 20, 80, 0.92);
  line-height: 1.45;
}

.ffn27-role-detail {
  font-size: var(--fs-2xs);
  font-style: italic;
  color: rgba(30, 50, 120, 0.72);
}

.ffn27-role-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(30,50,120,1);
  flex: 0 0 auto;
}

/* analogy card */
.ffn27-analogy-card {
  padding: 0.78rem 0.92rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 79, 214, 0.55);
  background: rgba(210, 218, 244, 0.5);
  margin-top: 0.42rem;
}

.ffn27-analogy-card p {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(10, 20, 80, 0.9);
  margin: 0;
}

/* flow diagram */
.ffn27-flow-section {
  padding: 0.78rem 0.88rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 120, 144, 0.55);
  background: rgba(210, 218, 244, 0.48);
  display: grid;
  gap: 0.52rem;
}

.ffn27-flow-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(10, 20, 80, 0.94);
  text-align: center;
}

.ffn27-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: center;
  align-items: center;
}

.ffn27-flow-box {
  padding: 0.42rem 0.62rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: grid;
  gap: 0.14rem;
  justify-items: center;
}

.ffn27-flow-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.ffn27-flow-dim {
  font-size: 0.62rem;
  color: rgba(30, 50, 120, 0.72);
}

.ffn27-flow-input,
.ffn27-flow-output {
  border: 1px solid rgba(42, 79, 214, 0.55);
  background: rgba(42, 79, 214, 0.1);
  color: #0d1020;
}

.ffn27-flow-expand {
  border: 1px solid rgba(0, 120, 144, 0.55);
  background: rgba(0, 120, 144, 0.1);
  color: #003844;
}

.ffn27-flow-act {
  border: 1px solid rgba(100, 75, 0, 0.55);
  background: rgba(100, 75, 0, 0.08);
  color: #4a3000;
}

.ffn27-flow-contract {
  border: 1px solid rgba(90, 48, 200, 0.55);
  background: rgba(90, 48, 200, 0.08);
  color: #2e1a80;
}

.ffn27-flow-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(30,50,120,1);
  flex: 0 0 auto;
}

.ffn27-flow-formula {
  text-align: center;
  font-size: var(--fs-xs);
  color: #0d1020;
  padding: 0.32rem 0.56rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 79, 214, 0.55);
  background: rgba(42, 79, 214, 0.06);
}

.ffn27-flow-note {
  text-align: center;
  font-size: var(--fs-2xs);
  color: rgba(10, 20, 80, 0.82);
  line-height: 1.5;
}

.ffn27-case-study {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.14rem;
  padding: 0.1rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 79, 214, 0.4);
  background: rgba(255, 255, 255, 0.5);
}

.ffn27-case-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(10, 20, 80, 0.9);
  text-align: center;
}

.ffn27-case-lead {
  margin: 0;
  font-size: 0.71rem;
  line-height: 1.0;
  color: rgba(10, 20, 80, 0.9);
  text-align: center;
}

.ffn27-case-table {
  display: grid;
  gap: 0.1rem;
}

.ffn27-case-row {
  display: grid;
  grid-template-columns: minmax(6.4rem, 1.2fr) repeat(4, minmax(0, 1fr));
  gap: 0.1rem;
  align-items: stretch;
}

.ffn27-case-cell {
  min-width: 0;
  padding: 0.34rem 0.38rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 79, 214, 0.25);
  background: rgba(42, 79, 214, 0.05);
  display: grid;
  gap: 0.08rem;
  justify-items: center;
  align-content: center;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.28;
  color: rgba(10, 20, 80, 0.92);
}

.ffn27-case-row-head .ffn27-case-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(10, 20, 80, 0.06);
}

.ffn27-case-cell strong {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0d1020;
}

.ffn27-case-cell span {
  font-size: 0.6rem;
  color: rgba(30, 50, 120, 0.72);
}

.ffn27-case-model {
  justify-items: start;
  text-align: left;
  background: rgba(0, 120, 144, 0.06);
  border-color: rgba(0, 120, 144, 0.24);
}

.ffn27-case-footnote {
  text-align: center;
  font-size: 0.62rem;
  line-height: 1.36;
  color: rgba(10, 20, 80, 0.78);
}

/* Projector-safe compaction for slide 27 */

#slide-27 .story-layout {
  margin-top: 0.54rem;
}

#slide-27 .story-stage {
  width: 66rem;
  padding: 0.84rem 0.92rem;
  gap: 0.68rem;
}

#slide-27 .story-takeaway {
  width: 66rem;
  max-width: 100%;
  margin-top: 0.42rem;
  padding: 0.46rem 0.6rem;
  font-size: var(--fs-2xs);
  line-height: 1.36;
}

#slide-27 .ffn27-stage {
  gap: 0.0rem;
}

#slide-27 .ffn27-role-compare {
  gap: 0.54rem;
}

#slide-27 .ffn27-role-box {
  padding: 0.20rem 0.76rem;
}

#slide-27 .ffn27-role-title {
  font-size: var(--fs-2xs);
}

#slide-27 .ffn27-role-desc {
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

#slide-27 .ffn27-role-detail {
  line-height: 1.35;
}

#slide-27 .hidden-content.revealed {
  margin-top: 0.62rem;
}

#slide-27 .callout {
  gap: 0.5rem;
  padding: 0.56rem 0.72rem;
  font-size: var(--fs-xs);
  line-height: 1.42;
}

#slide-27 .callout span:last-child {
  flex: 1 1 auto;
  min-width: 0;
}

#slide-27 .ffn27-analogy-card {
  margin-top: 0.28rem;
  padding: 0.62rem 0.74rem;
}

#slide-27 .ffn27-analogy-card p {
  line-height: 1.46;
}

#slide-27 .ffn27-flow-section {
  padding: 0.64rem 0.72rem;
  gap: 0.42rem;
}

#slide-27 .ffn27-flow {
  gap: 0.32rem;
}

#slide-27 .ffn27-flow-box {
  padding: 0.34rem 0.48rem;
}

#slide-27 .ffn27-flow-arrow {
  font-size: 0.78rem;
}

#slide-27 .ffn27-flow-formula {
  padding: 0.24rem 0.4rem;
  font-size: var(--fs-2xs);
}

#slide-27 .ffn27-flow-note {
  line-height: 1.38;
}

#slide-27 .ffn27-case-study {
  gap: 0.1rem;
  padding: 0.1rem 0.58rem;
}

#slide-27 .ffn27-case-lead {
  font-size: 0.68rem;
}

#slide-27 .ffn27-case-row {
  gap: 0.22rem;
}

#slide-27 .ffn27-case-cell {
  padding: 0.1rem 0.3rem;
  font-size: 0.62rem;
}

#slide-27 .ffn27-case-cell strong {
  font-size: 0.68rem;
}

#slide-27 .ffn27-case-cell span,
#slide-27 .ffn27-case-footnote {
  font-size: 0.58rem;
}
