.note-graphic {
  margin: 22px 0;
  padding: clamp(14px, 3.5%, 25px);
  border: 1px solid #cbd5e3;
  border-radius: 5px;
  color: #233144;
  background: #f5f7fb;
}
.note-graphic figcaption {
  font: 400 clamp(1.45rem, 2.4vw, 1.85rem)/1.17 var(--serif);
  letter-spacing: -.025em;
}
.note-graphic .figure-reading {
  margin: 14px 0 0;
  font: 400 1rem/1.48 var(--sans);
  color: #394656;
}
.graphic-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.graphic-tools[hidden] { display: none; }
.graphic-tools label { font: 500 .9rem var(--sans); margin-right: 5px; }
.graphic-tools select {
  font: 500 .9rem/1.35 var(--sans);
  border: 1px solid #b5c2e0;
  border-radius: 3px;
  padding: 6px 10px;
  min-height: 34px;
  background: #fff;
  color: #243765;
  cursor: pointer;
}
.graphic-tools select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.choice-pair, .program-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.note-graphic h4 { margin: 0; font: 600 1rem/1.35 var(--sans); }
.program-compare { container-type: inline-size; }
.program-pair { margin-top: 1rem; }
.program-path { padding: 1rem .55rem; border: 1px solid #d4ddea; border-radius: 4px; background: #fff; text-align: center; }
.program-path ol { list-style: none; padding: 0; margin: .8rem 0 0; }
.program-word { font: 500 1.25rem/1.3 var(--mono); letter-spacing: .1em; color: #253449; }
.program-word b { color: #223ec3; background: #e5eaff; outline: 1px solid #b8c6ff; border-radius: 2px; font-weight: inherit; }
.program-step { position: relative; box-sizing: border-box; width: 90%; max-width: 13.8rem; margin: 1.3rem auto; min-height: 3.4rem; display: grid; place-items: center; padding: .4rem; border: 1px solid #a8b5c7; border-radius: 4px; }
.program-step::before, .program-step::after { content: ""; position: absolute; left: 50%; height: 1rem; width: 7px; background: #8997aa; clip-path: polygon(42% 0, 58% 0, 58% 74%, 100% 74%, 50% 100%, 0 74%, 42% 74%); }
.program-step::before { bottom: calc(100% + 2px); }
.program-step::after { top: calc(100% + 2px); }
.network-step { background: #2b3747; border-color: #2b3747; color: white; font: 400 1.55rem var(--serif); }
.readable-step { background: #f0f3ff; border-color: #a8b7f3; color: #243aa5; }
.readable-step code { font: 500 .98rem/1.4 var(--mono); }
.readable-step code span { white-space: nowrap; }
@container (max-width: 420px) {
  .program-pair { gap: .4rem; }
  .program-path { padding: .7rem .25rem; }
  .program-path h4 { font-size: .9rem; }
  .program-step { width: 96%; min-height: 3.4rem; }
  .readable-step code { font-size: .875rem; }
}
.training-equation {
  display: grid;
  justify-items: center;
  gap: .95rem;
  margin: 1rem 0 1.25rem;
  padding: 1.1rem .25rem;
  border-block: 1px solid #d4ddea;
  background: var(--paper);
  color: #273453;
}
.training-equation math { font-size: clamp(1.02rem, 1.65vw, 1.18rem); }
.wire-ink, .choice-wiring h4 { color: #24499e; }
.param-ink, .choice-parameters h4 { color: #a2440a; }
.choice-pair { gap: 20px; }
.choice-pair h4 { border-top: 2px solid currentColor; padding-top: 8px; }
.choice-pair p { font: 400 .98rem/1.48 var(--sans); margin: 7px 0 0; }
@media(max-width: 530px) {
  .choice-pair { grid-template-columns: 1fr; gap: 13px; }
}

.motivation-points { margin: .7rem 0 1.3rem; padding-left: 1.7rem; }
.motivation-points > li { padding-left: .2rem; }
.motivation-points > li + li { margin-top: .75rem; }
.motivation-points > li::marker { font: 650 1rem var(--sans); color: var(--ink); }
.program-compare .figure-reading code { white-space: nowrap; }

.lift-demo { container-type: inline-size; }
.vl-formula {
  margin: 1rem 0 1.25rem;
  color: #544387;
  font: italic 1.28rem/1.4 var(--serif);
  text-align: center;
}
.vl-tokens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.55rem, 4%, 2rem);
  max-width: 36rem;
  margin: 0 auto 1.1rem;
}
.vl-token { display: flex; flex-direction: column; align-items: center; }
.vl-position { font: 550 .9rem/1.4 var(--sans); color: #38475d; }
.vl-scalar, .vl-vector { box-sizing: border-box; font: 500 1rem/1.4 var(--mono); text-align: center; }
.vl-scalar {
  min-width: 2.4rem;
  margin-top: .55rem;
  border: 1px solid var(--slot-position);
  border-radius: 2px;
  padding: .18rem .25rem;
  color: #203e59;
  background: var(--slot-position-fill);
}
.vl-arrow {
  position: relative;
  display: block;
  width: 1px;
  height: 1.35rem;
  margin: .25rem auto .4rem;
  background: #697c9a;
}
.vl-arrow::after {
  content: '';
  position: absolute;
  left: -3px;
  bottom: 0;
  width: 6px;
  height: 6px;
  border: solid #697c9a;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.vl-vector {
  display: flex;
  width: 100%;
  max-width: 8.1rem;
  overflow: hidden;
  border: 1.5px solid var(--slot-lift);
  border-radius: 2px;
  background: var(--slot-lift-fill);
  color: #473864;
}
.vl-vector span { flex: 1 1 0; min-width: 0; padding: .3rem 0; }
.vl-vector span + span { border-inline-start: 1px solid #b0a6ca; }
@container (max-width: 360px) {
  .vl-vector, .vl-scalar { font-size: .9rem; }
  .vl-position { font-size: .84rem; }
}
.basis-choice { display: block; border: 0; padding: 0; margin: 1rem 0 0; min-inline-size: 0; }
.basis-choice[hidden] { display: none; }
.basis-choice legend { float: left; font: 600 .9rem/2.5rem var(--sans); padding: 0; margin-right: .75rem; }
.basis-choice > div { display: flex; flex-wrap: wrap; gap: 0; }
.basis-choice label { position: relative; cursor: pointer; }
.basis-choice input { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); }
.basis-choice span {
  display: block;
  padding: .55rem .7rem;
  border: 1px solid #adb9d1;
  font: 500 .92rem/1.35 var(--sans);
  background: #fff;
  color: #293955;
}
.basis-choice label + label span { border-inline-start: 0; }
.basis-choice label:first-child span { border-radius: 4px 0 0 4px; }
.basis-choice label:last-child span { border-radius: 0 4px 4px 0; }
.basis-choice input:checked + span { background: #263ed4; border-color: #263ed4; color: #fff; }
.basis-choice input:focus-visible + span { position: relative; z-index: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 550px) {
  .basis-choice legend { float: none; line-height: 1.4; margin-bottom: .35rem; }
  .basis-choice span { padding-inline: .55rem; }
}
.cite { margin-left: .15em; font: 600 .70em/0 var(--sans); }
.cite a { text-decoration:none; color:#273fac; }
.cite a:hover { text-decoration:underline; }
.neuron-note { margin:.75rem 0 .85rem; padding:.55rem 1rem; border-left:3px solid #9caed1; background:#f1f4f8; }
.neuron-note p { font-size:1rem; line-height:1.55; }
#references ol { margin:1rem 0 0; padding-left:1.8rem; color:var(--muted); }
#references li { padding-left:.25rem; margin:.55rem 0; font-size:1rem; line-height:1.5; scroll-margin-top:2rem; }
#references li::marker { font-family:var(--mono); font-size:.85rem; }
#references li:target { background:#ecf0ff; color:var(--ink); }
#references a { color: #263e9a; }
.attention-equations { margin:1.2rem 0; padding:.3rem clamp(.8rem,3vw,1.4rem) 1rem; border:1px solid #c8d3e6; border-radius:5px; background:#f5f7fc; color:#203362; container-type:inline-size; }
.attention-equations > div { display:grid; align-items:baseline; grid-template-columns: minmax(8.7rem,30%) minmax(0,1fr); column-gap:1rem; border-bottom:1px solid #d9dfeb; padding:.75rem 0; }
.attention-equations strong { font:600 .94rem/1.4 var(--sans); color:#24344c; }
.equation-lines { display:flex; flex-wrap:wrap; align-items:baseline; gap:.35rem 1.4rem; }
.equation-lines .equation-row { flex-basis: 100%; }
.equation-lines math { font-size: 1.13rem; }
.attention-equations > div:last-child { border-bottom: 0; padding-bottom:0; }
@container (max-width:470px) {
  .attention-equations > div { grid-template-columns:1fr; gap:.3rem; }
  .equation-lines math { font-size: 1.04rem; }
}
