.page-main {
  min-width: 0;
}

.page-main > h2,
.page-main > h3,
.page-main > h4,
.page-main > p,
.page-main > ul,
.page-main > ol,
.page-main > blockquote {
  max-width: var(--measure-prose);
}

.page-main > h2,
.page-main > h3 {
  max-width: 26ch;
  text-wrap: balance;
}

.page-main > h4,
.page-main > p,
.page-main > ul,
.page-main > ol,
.page-main > blockquote {
  max-width: var(--measure-prose);
}

.page-main p,
.page-main li {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.page-main > p:first-of-type,
.page-main > .hero + p,
.page-main > .callout + p {
  font-size: var(--text-lead);
  line-height: 1.65;
}

.page--annotated-scaffold .page-shell--with-sidebar {
  grid-template-columns: 20rem minmax(0, 1fr);
}

.page--annotated-scaffold .page-sidebar__link {
  line-height: 1.45;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 2vw + 1rem, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.66)),
    linear-gradient(135deg, rgba(13, 107, 99, 0.15), rgba(191, 90, 54, 0.1));
  box-shadow: var(--shadow);
  animation: rise 480ms ease-out both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -5rem -6rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 90, 54, 0.2), transparent 70%);
}

.hero__eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero h1 {
  font-size: clamp(2.45rem, 5vw, 4.15rem);
  line-height: 0.99;
  max-width: 11.5ch;
}

.hero__title-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.hero__title-link:hover,
.hero__title-link:focus-visible {
  text-decoration-thickness: 0.12em;
}

.hero__dek {
  max-width: 42rem;
  font-size: var(--text-lead);
  line-height: 1.62;
  color: var(--ink-muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.hero__meta span,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.section-intro {
  max-width: 46rem;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--ink-muted);
}

.callout {
  margin: 1.35rem 0;
  padding: 1.2rem 1.25rem;
  max-width: min(100%, calc(var(--measure-prose) + 5rem));
  border-left: 0.45rem solid var(--accent);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.callout h3 {
  margin-top: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.01rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.callout--important {
  border-left-color: var(--signal);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), var(--signal-soft));
}

.callout--warning {
  border-left-color: #b42318;
  background: linear-gradient(135deg, rgba(255, 250, 250, 0.96), rgba(180, 35, 24, 0.14));
  box-shadow: 0 18px 50px rgba(180, 35, 24, 0.12);
}

.callout--warning h3 {
  color: #8f1c13;
}

.callout--warning h3::before {
  content: "⚠ ";
  color: #b42318;
  font-weight: 700;
}

.callout--plain {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), var(--accent-soft));
}

.callout--optional {
  border-left-color: var(--optional);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), var(--optional-soft));
}

.callout--checklist {
  border-left-color: #233142;
}

.callout--checklist {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(35, 49, 66, 0.08));
}

.details-panel {
  margin: 1.1rem 0;
  max-width: min(100%, calc(var(--measure-prose) + 3rem));
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 48.01rem) {
  #reference-testing,
  #reference-marking {
    max-width: min(100%, calc(var(--measure-prose) + 3rem));
  }

  #reference-testing[open],
  #reference-marking[open] {
    max-width: min(100%, calc(var(--measure-prose) + 14rem));
  }
}

.details-panel summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 1.15rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.36;
  color: var(--accent-strong);
}

.details-panel summary::-webkit-details-marker {
  display: none;
}

.details-panel summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  color: var(--signal);
}

.details-panel[open] summary::after {
  content: "−";
}

.details-panel__body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--line);
}

.details-panel__body > :first-child {
  margin-top: 1rem;
}

.details-panel__body > :last-child {
  margin-bottom: 0;
}

.worked-example {
  margin: 1.2rem 0 1.35rem 0.55rem;
  max-width: min(100%, calc(var(--measure-prose) + 11rem));
  padding: 1rem 1.1rem 1rem 1.2rem;
  border-left: 0.32rem solid var(--signal);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), var(--signal-soft));
  box-shadow: 0 12px 28px rgba(31, 38, 48, 0.08);
}

.worked-example__title {
  margin: 0 0 0.75rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--signal);
}

.worked-example > :last-child {
  margin-bottom: 0;
}

.one-hot-mini {
  margin: 1rem 0 1.05rem;
  padding: 0.3rem 0;
}

.one-hot-mini__row {
  display: grid;
  grid-template-columns: minmax(8.5rem, max-content) 1.5rem minmax(19rem, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.5rem 0;
}

.one-hot-mini__token {
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(34, 37, 45, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: var(--ink);
}

.one-hot-mini__arrow {
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--ink-muted);
}

.one-hot-mini__vector {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.one-hot-mini__bracket {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-muted);
}

.one-hot-mini__slots {
  display: grid;
  grid-template-columns: repeat(8, minmax(1.85rem, 1fr));
  gap: 0.28rem;
}

.one-hot-mini__slot {
  display: grid;
  place-items: center;
  min-height: 1.9rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.82);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink-muted) 74%, white);
}

.one-hot-mini__slot.is-active {
  background: color-mix(in srgb, var(--signal) 22%, white);
  color: var(--signal);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--signal) 34%, transparent),
    0 0.35rem 0.8rem rgba(31, 38, 48, 0.08);
}

.one-hot-mini__row--ellipsis .one-hot-mini__token,
.one-hot-mini__row--ellipsis .one-hot-mini__arrow,
.one-hot-mini__row--ellipsis .one-hot-mini__bracket,
.one-hot-mini__row--ellipsis .one-hot-mini__slot {
  color: rgba(31, 38, 48, 0.42);
}

@media (max-width: 44rem) {
  .one-hot-mini__row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .one-hot-mini__arrow {
    display: none;
  }

  .one-hot-mini__vector {
    gap: 0.35rem;
  }

  .one-hot-mini__slots {
    grid-template-columns: repeat(8, minmax(1.5rem, 1fr));
    gap: 0.22rem;
  }
}

.scaffold-snippet {
  margin: 0.8rem 0 1rem;
  padding: 0.45rem 0.55rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.scaffold-snippet__title {
  margin: 0 0 0.35rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.scaffold-snippet pre {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  font-size: 0.88rem;
}

.function-signature-hover {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}

.function-signature-hover__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(13, 107, 99, 0.25);
  border-radius: 999px;
  background: rgba(13, 107, 99, 0.08);
  color: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 38, 48, 0.06);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
  text-decoration: none;
}

.function-signature-hover__trigger:hover,
.function-signature-hover__trigger:focus-visible {
  border-color: rgba(13, 107, 99, 0.45);
  background: rgba(13, 107, 99, 0.12);
  transform: translateY(-1px);
}

.function-signature-hover__trigger code {
  padding: 0;
  border-radius: 0;
  border-bottom: 2px dotted rgba(13, 107, 99, 0.5);
  background: transparent;
  color: var(--accent-strong);
  font-size: 0.96em;
}

.function-signature-hover__popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 35;
  width: min(36rem, 92vw);
  padding: 0.55rem;
  border-radius: 0.95rem;
  background: rgba(25, 33, 42, 0.98);
  box-shadow: 0 20px 48px rgba(31, 38, 48, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.2rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.function-signature-hover__code {
  display: block;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  background: #19212a;
  color: #ecf2f8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.function-signature-hover__hint {
  display: block;
  margin-top: 0.45rem;
  padding: 0 0.2rem 0.05rem;
  color: rgba(236, 242, 248, 0.82);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.function-signature-hover:hover .function-signature-hover__popover,
.function-signature-hover:focus-within .function-signature-hover__popover {
  opacity: 1;
  transform: translateY(0);
}

.scaffold-map {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 1.45rem;
}

.scaffold-map__card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(13, 107, 99, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 28px rgba(31, 38, 48, 0.08);
}

.scaffold-map__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent-strong);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scaffold-map__card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.scaffold-map__card p:last-child {
  margin-bottom: 0;
}

.annotated-scaffold-section {
  margin: 1.55rem 0 1.8rem;
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1px solid rgba(13, 107, 99, 0.14);
  border-radius: 1.1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(13, 107, 99, 0.04));
  box-shadow: 0 16px 34px rgba(31, 38, 48, 0.08);
  scroll-margin-top: 2rem;
}

.annotated-scaffold-section h3 {
  margin-top: 0;
}

.annotated-scaffold-section__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.annotated-scaffold-section__lede {
  max-width: 52rem;
  color: var(--ink-muted);
}

.annotated-scaffold-code {
  margin: 1rem 0 1.1rem;
}

.annotated-scaffold-code pre {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  font-size: 0.88rem;
}

.annotated-scaffold-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.7rem;
  margin: 0.85rem 0 1rem;
}

.annotated-scaffold-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  background: rgba(13, 107, 99, 0.08);
  border: 1px solid rgba(13, 107, 99, 0.15);
  box-shadow: 0 6px 14px rgba(31, 38, 48, 0.05);
}

.annotated-scaffold-chip code {
  background: transparent;
  border: 0;
  padding: 0;
}

.annotated-scaffold-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1rem;
}

.annotated-scaffold-note {
  padding: 0.9rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(35, 49, 66, 0.08);
}

.annotated-scaffold-note h4 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.annotated-scaffold-note p:last-child,
.annotated-scaffold-note ul:last-child {
  margin-bottom: 0;
}

.highlight,
.highlighter-rouge {
  background: transparent;
}

.highlight pre,
.highlighter-rouge pre {
  background: #19212a;
  color: #ecf2f8;
}

.page--compiler-tooling .highlight pre,
.page--compiler-tooling .highlighter-rouge pre {
  padding-left: 0.75rem;
  padding-right: 0.9rem;
}

.highlight .c,
.highlight .c1,
.highlight .cm {
  color: #8aa1b4;
  font-style: italic;
}

.highlight .cp,
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kr,
.highlight .kt {
  color: #f7c873;
}

.highlight .nb,
.highlight .bp {
  color: #79d2c0;
}

.highlight .nf,
.highlight .fm {
  color: #8ec7ff;
}

.highlight .na,
.highlight .nc,
.highlight .nd,
.highlight .nl,
.highlight .nn,
.highlight .nt {
  color: #ffb38a;
}

.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .il {
  color: #c6a7ff;
}

.highlight .s,
.highlight .sa,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .s1,
.highlight .s2,
.highlight .se,
.highlight .sh,
.highlight .si,
.highlight .sr,
.highlight .ss,
.highlight .sx {
  color: #9ee493;
}

.highlight .o,
.highlight .ow,
.highlight .p {
  color: #d9e2ec;
}

.highlight .n,
.highlight .nv,
.highlight .vc,
.highlight .vg,
.highlight .vi {
  color: #ecf2f8;
}

.eyebrow-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.5rem;
}

.eyebrow-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.path-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.path-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.formula-strip {
  margin: 1.2rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-small);
  background: linear-gradient(135deg, rgba(13, 107, 99, 0.1), rgba(255, 255, 255, 0.8));
  border: 1px solid var(--line);
  text-align: center;
}

.action-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}

.action-list--getting-started {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.15rem 0 1.6rem;
  align-items: stretch;
}

.action-list--marking {
  grid-template-columns: 1fr;
  margin: 1.1rem 0 1.4rem;
  align-items: start;
}

#reference-marking .action-list--marking {
  grid-template-columns: 1fr !important;
}

.action-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.action-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.action-card ol,
.action-card ul {
  margin-bottom: 0;
}

.action-list--getting-started .action-card {
  padding: 1.05rem 1.1rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.8));
}

.action-list--getting-started .action-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.action-list--getting-started .action-card ul {
  margin: 0;
  padding-left: 1.35rem;
}

.action-list--getting-started .action-card li + li {
  margin-top: 0.45rem;
}

.action-list--marking .action-card {
  padding: 1rem 1.05rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
}

.action-list--marking .action-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.action-list--marking .action-card ul {
  margin: 0;
  padding-left: 1.3rem;
}

.action-list--marking .action-card li + li {
  margin-top: 0.42rem;
}

.action-card--warning {
  border-color: rgba(180, 35, 24, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 248, 247, 0.98), rgba(180, 35, 24, 0.12));
}

.action-card--warning h3 {
  color: #b42318;
}

.mermaid {
  margin: 1.4rem 0;
  padding: 1rem;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.card-grid,
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.mini-card,
.stage-card {
  position: relative;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  animation: rise 520ms ease-out both;
}

.mini-card h3,
.stage-card h3 {
  margin-top: 0;
  font-size: 1.16rem;
  line-height: 1.22;
}

.mini-card p,
.stage-card p {
  margin-bottom: 0;
  font-size: 0.99rem;
  line-height: 1.66;
}

.mini-card code,
.stage-card code,
.stage-card__function code {
  font-size: 0.92rem;
}

.stage-card__eyebrow {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--signal);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stage-card--optional .stage-card__eyebrow {
  color: var(--optional);
}

.stage-card__checks {
  margin-top: 1rem;
}

.stage-card__concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.concept-link {
  display: inline;
  padding: 0.02rem 0.08rem;
  border-bottom: 2px solid rgba(13, 107, 99, 0.42);
  background: rgba(13, 107, 99, 0.05);
  text-decoration: none;
  font-weight: 500;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.concept-link:hover {
  border-color: rgba(191, 90, 54, 0.38);
  background: rgba(191, 90, 54, 0.1);
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.metric {
  padding: 1rem;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.metric span {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto 2.5rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-align: center;
  color: color-mix(in srgb, var(--ink-muted) 88%, white);
}

figure {
  margin: 1.7rem 0 1.95rem;
}

figcaption {
  margin-top: 0.8rem;
  max-width: var(--measure-prose);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: var(--text-caption);
  line-height: 1.58;
  color: color-mix(in srgb, var(--ink-muted) 90%, white);
}

.related-block {
  margin-top: 3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.76);
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.table-shell {
  margin: 1rem 0 1.4rem;
  max-width: min(100%, calc(var(--measure-prose) + 8rem));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.8) 100%);
  box-shadow: 0 14px 36px rgba(31, 38, 48, 0.08);
}

.bounds-table {
  min-width: 34rem;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.bounds-table thead th {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 107, 99, 0.1);
  color: var(--accent-strong);
}

.bounds-table tbody tr:nth-child(even) td {
  background: rgba(13, 107, 99, 0.045);
}

.bounds-table td:first-child,
.bounds-table td:last-child {
  white-space: nowrap;
}

.input-order-list {
  margin: 1rem 0 1.15rem 1.2rem;
  padding: 0;
}

.input-order-list li {
  margin: 0.45rem 0 0;
  padding-left: 0.2rem;
  line-height: 1.55;
}

.input-order-list li > code {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(31, 38, 48, 0.1);
  background: rgba(17, 24, 39, 0.04);
  font-size: 0.9rem;
  font-weight: 700;
}

.input-order-list li > span {
  color: var(--ink);
}

.input-order-list li + li {
  margin-top: 0.55rem;
}

.page--sample-input .sample-input-shell {
  margin: 1rem 0 1.4rem;
}

.page--sample-input .sample-input-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
}

.page--sample-input .sample-input-key__item {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.page--sample-input .sample-input-key__item:hover,
.page--sample-input .sample-input-key__item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.35rem 1rem rgba(17, 24, 39, 0.12);
}

.page--sample-input .sample-input-key__item code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.page--sample-input .sample-input-block,
.page--sample-input .sample-input-grouped {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page--sample-input .sample-input-line,
.page--sample-input .sample-input-heading {
  display: block;
  margin: 0 -0.2rem;
  padding: 0.08rem 0.45rem;
  border-radius: 0.5rem;
}

.page--sample-input a.sample-input-line {
  color: inherit;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.page--sample-input a.sample-input-line:hover,
.page--sample-input a.sample-input-line:focus-visible {
  transform: translateX(0.12rem);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  filter: brightness(1.05);
}

.page--sample-input .sample-input-heading {
  margin-top: 0.45rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page--sample-input .sample-input-heading:first-child {
  margin-top: 0;
}

.page--sample-input .sample-input-line[id] {
  scroll-margin-top: 5.5rem;
}

.page--sample-input .sample-breakdown {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 1.4rem;
}

.page--sample-input .sample-breakdown__item {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  text-decoration: none;
  scroll-margin-top: 5.5rem;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.page--sample-input .sample-breakdown__item:hover,
.page--sample-input .sample-breakdown__item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.45rem 1.2rem rgba(17, 24, 39, 0.08);
}

.page--sample-input .sample-breakdown__line {
  display: inline-flex;
  margin: 0;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page--sample-input .sample-breakdown__item h3 {
  margin: 0;
  font-size: 1rem;
}

.page--sample-input .sample-breakdown__item p {
  margin: 0;
}

.page--sample-input .sample-breakdown__item--sizes {
  border-left: 0.4rem solid rgba(191, 90, 54, 0.78);
}

.page--sample-input .sample-breakdown__item--sizes .sample-breakdown__line {
  background: rgba(191, 90, 54, 0.14);
  color: #8f3517;
}

.page--sample-input .sample-breakdown__item--mask {
  border-left: 0.4rem solid rgba(174, 126, 9, 0.78);
}

.page--sample-input .sample-breakdown__item--mask .sample-breakdown__line {
  background: rgba(237, 196, 60, 0.22);
  color: #745100;
}

.page--sample-input .sample-breakdown__item--prompt {
  border-left: 0.4rem solid rgba(13, 107, 99, 0.78);
}

.page--sample-input .sample-breakdown__item--prompt .sample-breakdown__line {
  background: rgba(13, 107, 99, 0.14);
  color: #0c5b56;
}

.page--sample-input .sample-breakdown__item--generated {
  border-left: 0.4rem solid rgba(93, 90, 163, 0.8);
}

.page--sample-input .sample-breakdown__item--generated .sample-breakdown__line {
  background: rgba(93, 90, 163, 0.14);
  color: #4e4a91;
}

.page--sample-input .sample-breakdown__item--wq {
  border-left: 0.4rem solid rgba(46, 134, 171, 0.8);
}

.page--sample-input .sample-breakdown__item--wq .sample-breakdown__line {
  background: rgba(46, 134, 171, 0.14);
  color: #1a5f7d;
}

.page--sample-input .sample-breakdown__item--wk {
  border-left: 0.4rem solid rgba(89, 138, 41, 0.82);
}

.page--sample-input .sample-breakdown__item--wk .sample-breakdown__line {
  background: rgba(122, 179, 79, 0.16);
  color: #456c21;
}

.page--sample-input .sample-breakdown__item--wv {
  border-left: 0.4rem solid rgba(182, 88, 132, 0.8);
}

.page--sample-input .sample-breakdown__item--wv .sample-breakdown__line {
  background: rgba(182, 88, 132, 0.14);
  color: #8a315d;
}

.page--sample-input .sample-input-line--sizes,
.page--sample-input .sample-input-heading--sizes {
  background: rgba(191, 90, 54, 0.58);
  color: #fff4ef;
}

.page--sample-input .sample-input-line--generated,
.page--sample-input .sample-input-heading--generated {
  background: rgba(93, 90, 163, 0.56);
  color: #f5f2ff;
}

.page--sample-input .sample-input-line--mask,
.page--sample-input .sample-input-heading--mask {
  background: rgba(174, 126, 9, 0.54);
  color: #fff6d2;
}

.page--sample-input .sample-input-line--prompt,
.page--sample-input .sample-input-heading--prompt {
  background: rgba(13, 107, 99, 0.54);
  color: #effffb;
}

.page--sample-input .sample-input-line--wq,
.page--sample-input .sample-input-heading--wq {
  background: rgba(46, 134, 171, 0.58);
  color: #eefaff;
}

.page--sample-input .sample-input-line--wk,
.page--sample-input .sample-input-heading--wk {
  background: rgba(89, 138, 41, 0.6);
  color: #f3ffe8;
}

.page--sample-input .sample-input-line--wv,
.page--sample-input .sample-input-heading--wv {
  background: rgba(182, 88, 132, 0.58);
  color: #fff1f7;
}

.page--sample-input .sample-input-key__item--sizes {
  background: rgba(191, 90, 54, 0.16);
  color: #8f3517;
}

.page--sample-input .sample-input-key__item--mask {
  background: rgba(237, 196, 60, 0.22);
  color: #745100;
}

.page--sample-input .sample-input-key__item--prompt {
  background: rgba(13, 107, 99, 0.14);
  color: #0c5b56;
}

.page--sample-input .sample-input-key__item--generated {
  background: rgba(93, 90, 163, 0.14);
  color: #4e4a91;
}

.page--sample-input .sample-input-key__item--wq {
  background: rgba(46, 134, 171, 0.14);
  color: #1a5f7d;
}

.page--sample-input .sample-input-key__item--wk {
  background: rgba(122, 179, 79, 0.16);
  color: #456c21;
}

.page--sample-input .sample-input-key__item--wv {
  background: rgba(182, 88, 132, 0.14);
  color: #8a315d;
}

.page--tokens-embeddings .token-journey,
.page--tokens-embeddings .embedding-matrix-figure {
  margin: 1.5rem 0;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 245, 238, 0.92));
  box-shadow: 0 0.8rem 2rem rgba(17, 24, 39, 0.06);
}

.page--tokens-embeddings .token-journey__lane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.page--tokens-embeddings .token-journey__stage,
.page--tokens-embeddings .embedding-matrix-figure__frame {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
}

.page--tokens-embeddings .token-journey__eyebrow,
.page--tokens-embeddings .embedding-matrix-figure__eyebrow {
  margin: 0 0 0.45rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.page--tokens-embeddings .token-journey__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.page--tokens-embeddings .token-journey__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 107, 99, 0.12);
  color: #0c5b56;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
}

.page--tokens-embeddings .token-journey__chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(13, 107, 99, 0.18);
  font-size: 0.78rem;
}

.page--tokens-embeddings .token-journey__arrow {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--accent-strong);
}

.page--tokens-embeddings .token-journey__rows {
  display: grid;
  gap: 0.45rem;
}

.page--tokens-embeddings .token-journey__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.page--tokens-embeddings .token-journey__row-label {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(191, 90, 54, 0.14);
  color: #8f3517;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.page--tokens-embeddings .token-journey__row code {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 0.7rem;
  background: rgba(17, 24, 39, 0.06);
  color: var(--ink-strong);
}

.page--tokens-embeddings .token-journey figcaption,
.page--tokens-embeddings .embedding-matrix-figure figcaption {
  margin-top: 0.85rem;
  color: var(--ink-muted);
}

.page--tokens-embeddings .embedding-matrix-figure__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.page--tokens-embeddings .embedding-matrix-figure__header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.page--tokens-embeddings .embedding-matrix-figure__note {
  max-width: 24rem;
  margin: 0;
  color: var(--ink-muted);
}

.page--tokens-embeddings .embedding-matrix-figure__labels,
.page--tokens-embeddings .embedding-matrix-figure__grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.page--tokens-embeddings .embedding-matrix-figure__labels {
  margin-bottom: 0.45rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.page--tokens-embeddings .embedding-matrix-figure__grid span {
  display: grid;
  place-items: center;
  min-height: 2.55rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.75rem;
  background: rgba(17, 24, 39, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
}

.page--tokens-embeddings .embedding-matrix-figure__grid .embedding-matrix-figure__row-name {
  justify-items: start;
  background: rgba(93, 90, 163, 0.12);
  color: #4e4a91;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
}

.page--strings-in-c .cstring-figure {
  margin: 1.4rem 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 245, 238, 0.94));
  box-shadow: 0 0.8rem 2rem rgba(17, 24, 39, 0.06);
}

.cstring-print-static {
  display: none;
}

.page--strings-in-c .cstring-figure__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.page--strings-in-c .cstring-figure__eyebrow {
  margin: 0 0 0.4rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.page--strings-in-c .cstring-figure__header h2 {
  margin: 0;
  font-size: 1.16rem;
}

.page--strings-in-c .cstring-figure__note {
  max-width: 24rem;
  margin: 0;
  color: var(--ink-muted);
}

.page--strings-in-c .cstring-figure__labels,
.page--strings-in-c .cstring-figure__grid {
  display: grid;
  grid-template-columns: minmax(4.8rem, auto) repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.page--strings-in-c .cstring-figure__labels {
  margin-bottom: 0.4rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.page--strings-in-c .cstring-figure__grid span {
  display: grid;
  place-items: center;
  min-height: 2.6rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.75rem;
  background: rgba(17, 24, 39, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.page--strings-in-c .cstring-figure__grid .cstring-figure__row-name {
  justify-items: center;
  background: rgba(13, 107, 99, 0.12);
  color: #0c5b56;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
}

.page--strings-in-c .cstring-figure__grid .cstring-figure__cell--nul {
  background: rgba(191, 90, 54, 0.16);
  color: #8f3517;
  font-weight: 700;
}

.page--strings-in-c .cstring-figure figcaption {
  margin-top: 0.8rem;
  color: var(--ink-muted);
}

.token-journey.has-figure-motion .token-journey__stage {
  opacity: 0;
  transform: translateY(1rem);
}

.token-journey.has-figure-motion .token-journey__arrow {
  opacity: 0;
}

.token-journey.has-figure-motion .token-journey__row {
  opacity: 0;
  transform: translateX(0.9rem);
}

.token-journey.has-figure-motion.is-visible .token-journey__stage {
  animation: figure-fade-up 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--figure-step, 1) * 140ms);
}

.token-journey.has-figure-motion.is-visible .token-journey__arrow {
  animation: figure-fade-in 280ms ease both;
  animation-delay: calc(var(--figure-step, 1) * 140ms);
}

.token-journey.has-figure-motion.is-visible .token-journey__row {
  animation: figure-slide-in 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(620ms + var(--row-step, 1) * 110ms);
}

.softmax-visual.has-figure-motion .softmax-card,
.softmax-visual.has-figure-motion .softmax-step {
  opacity: 0;
  transform: translateY(1rem);
}

.softmax-visual.has-figure-motion .softmax-bars__fill {
  transform: scaleX(0);
  transform-origin: left center;
}

.softmax-visual.has-figure-motion .softmax-curve__line {
  stroke-dasharray: var(--path-length, 0);
  stroke-dashoffset: var(--path-length, 0);
}

.softmax-visual.has-figure-motion .softmax-curve__point,
.softmax-visual.has-figure-motion .softmax-curve__label {
  opacity: 0;
}

.softmax-visual.has-figure-motion.is-visible .softmax-card {
  animation: figure-fade-up 540ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--card-step, 1) * 140ms);
}

.softmax-visual.has-figure-motion.is-visible .softmax-step {
  animation: figure-fade-up 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(220ms + var(--softmax-step, 1) * 150ms);
}

.softmax-visual.has-figure-motion.is-visible .softmax-bars__fill {
  transform: scaleX(1);
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 980ms;
}

.softmax-visual.has-figure-motion.is-visible .softmax-curve__line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 960ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 640ms;
}

.softmax-visual.has-figure-motion.is-visible .softmax-curve__point,
.softmax-visual.has-figure-motion.is-visible .softmax-curve__label {
  animation: figure-fade-in 320ms ease both;
  animation-delay: 1320ms;
}

.vector-figure.has-figure-motion .vector-figure__vector {
  stroke-dasharray: var(--path-length, 0);
  stroke-dashoffset: var(--path-length, 0);
}

.vector-figure.has-figure-motion .vector-figure__point,
.vector-figure.has-figure-motion .vector-figure__label {
  opacity: 0;
}

.vector-figure.has-figure-motion.is-visible .vector-figure__vector--accent {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 680ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 180ms;
}

.vector-figure.has-figure-motion.is-visible .vector-figure__vector--signal {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 760ms;
}

.vector-figure.has-figure-motion.is-visible .vector-figure__point--accent,
.vector-figure.has-figure-motion.is-visible .vector-figure__label--accent {
  animation: figure-fade-in 260ms ease both;
  animation-delay: 760ms;
}

.vector-figure.has-figure-motion.is-visible .vector-figure__point--signal,
.vector-figure.has-figure-motion.is-visible .vector-figure__label--signal {
  animation: figure-fade-in 260ms ease both;
  animation-delay: 1420ms;
}

.transformer-architecture.has-figure-motion .transformer-architecture__frame > section {
  opacity: 0;
  transform: translateY(1rem);
}

.transformer-architecture.has-figure-motion .transformer-architecture__arrow {
  opacity: 0;
}

.transformer-architecture.has-figure-motion .transformer-architecture__tokens span,
.transformer-architecture.has-figure-motion .transformer-architecture__stack > .transformer-architecture__box {
  opacity: 0;
  transform: translateY(0.8rem);
}

.transformer-architecture.has-figure-motion.is-visible .transformer-architecture__frame > section {
  animation: figure-fade-up 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--figure-step, 1) * 160ms);
}

.transformer-architecture.has-figure-motion.is-visible .transformer-architecture__arrow {
  animation: figure-fade-in 280ms ease both;
  animation-delay: calc(var(--figure-step, 1) * 160ms);
}

.transformer-architecture.has-figure-motion.is-visible .transformer-architecture__tokens span {
  animation: figure-fade-up 400ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(280ms + var(--token-step, 1) * 90ms);
}

.transformer-architecture.has-figure-motion.is-visible .transformer-architecture__stack > .transformer-architecture__box {
  animation: figure-fade-up 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(760ms + var(--stack-step, 1) * 110ms);
}

.marks-table th:not(:first-child),
.marks-table td:not(:first-child) {
  text-align: right;
}

.marks-table th:first-child,
.marks-table td:first-child {
  text-align: left;
}

blockquote {
  margin: 1.7rem 0;
  padding: 0.35rem 0 0.35rem 1.1rem;
  border-left: 0.35rem solid rgba(13, 107, 99, 0.35);
  color: color-mix(in srgb, var(--ink) 78%, var(--ink-muted));
  font-size: 1.01rem;
  line-height: 1.7;
}

blockquote p:last-child {
  margin-bottom: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes figure-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes figure-slide-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes figure-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
