/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
/* SPDX-License-Identifier: Apache-2.0 */

/*
 * Applied AI Research: Quiet NVIDIA color, NVIDIA Sans, hairline structure,
 * and post images in consistent plates. The private site brief holds the full
 * style guide; the short version: green is for actions and the NVIDIA logo,
 * sections are separated by rules rather than boxes, nothing has a shadow,
 * and labels are sentence case in the text face.
 */

/* NVIDIA Sans is loaded from NVIDIA's CDN rather than committed: the font is
 * not licensed for redistribution in this repository. */
@font-face {
  font-family: "NVIDIA Sans";
  src: url("https://images.nvidia.com/etc/designs/nvidiaGDC/clientlibs_base/fonts/nvidia-sans/NALA/var/NVIDIASansVF_NALA_W_Wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

/* Arial scaled to NVIDIA Sans metrics so the font swap does not reflow text. */
@font-face {
  font-family: "NVIDIA Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  size-adjust: 106.6%;
  ascent-override: 91.9%;
  descent-override: 26.3%;
  line-gap-override: 0%;
}

/* Tokens ------------------------------------------------------------------ */

:root {
  --nemo-sidebar-width: 15.25rem;
  --nemo-header-height: 2.8rem;
  --nemo-header-control-size: 2rem;
  --nemo-header-icon-size: 1.05rem;

  --ar-font: "NVIDIA Sans", "NVIDIA Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ar-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ar-content: 60rem;
  --ar-measure: 38rem;
  --ar-gutter: 1.5rem;
  --ar-radius-plate: 12px;
  --ar-radius-control: 6px;
  --ar-ease: 120ms ease;

  /* Quiet NVIDIA, light. */
  --ar-canvas: #f7f8f5;
  --ar-surface: #ffffff;
  --ar-ink: #20251b;
  --ar-ink-muted: #56614c;
  --ar-action: #416b0a;
  --ar-on-action: #ffffff;
  --ar-tint: #edf0e8;
  --ar-accent: #e6efda;
  --ar-rule: #d5dccd;
  --ar-control: #879379;
  --ar-nvidia: #76b900;
  --ar-question: #8a6400;

  --ar-code-keyword: #416b0a;
  --ar-code-string: #8a5300;
  --ar-code-number: #a3402a;
  --ar-code-function: #2f5a78;
  --ar-code-comment: #6c7862;
}

body[data-md-color-scheme="slate"] {
  /* Quiet NVIDIA, dark. */
  --ar-canvas: #121510;
  --ar-surface: #1c2018;
  --ar-ink: #eff3e9;
  --ar-ink-muted: #b8c2ad;
  --ar-action: #76b900;
  --ar-on-action: #101608;
  --ar-tint: #2a3024;
  --ar-accent: #303e21;
  --ar-rule: #404a35;
  --ar-control: #64724e;
  --ar-question: #e2b84c;

  --ar-code-keyword: #9bd14d;
  --ar-code-string: #e2b46c;
  --ar-code-number: #f09a7e;
  --ar-code-function: #93bfe0;
  --ar-code-comment: #8f9b83;
}

:root:has(> body[data-md-color-scheme="slate"]) {
  --ar-canvas: #121510;
  color-scheme: dark;
}

/* Map the theme's variables onto the tokens. Primary/accent attributes are
 * included so these win over the theme's "black"/"green" palette presets. */
body[data-md-color-scheme][data-md-color-primary] {
  --md-text-font: var(--ar-font);
  --md-code-font: var(--ar-mono);
  --md-default-bg-color: var(--ar-canvas);
  --md-default-bg-color--light: color-mix(in srgb, var(--ar-canvas) 70%, transparent);
  --md-default-fg-color: var(--ar-ink);
  --md-default-fg-color--light: var(--ar-ink-muted);
  --md-default-fg-color--lighter: color-mix(in srgb, var(--ar-ink) 32%, transparent);
  --md-default-fg-color--lightest: color-mix(in srgb, var(--ar-ink) 8%, transparent);
  --md-primary-fg-color: var(--ar-canvas);
  --md-primary-fg-color--light: var(--ar-tint);
  --md-primary-fg-color--dark: var(--ar-ink);
  --md-primary-bg-color: var(--ar-ink);
  --md-primary-bg-color--light: var(--ar-ink-muted);
  --md-accent-fg-color: var(--ar-action);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--ar-action) 12%, transparent);
  --md-accent-bg-color: var(--ar-on-action);
  --md-typeset-a-color: var(--ar-action);
  --md-typeset-color: var(--ar-ink);
  --md-typeset-table-color: var(--ar-rule);
  --md-typeset-mark-color: var(--ar-accent);
  --md-code-bg-color: var(--ar-tint);
  --md-code-fg-color: var(--ar-ink);
  --md-code-hl-color: color-mix(in srgb, var(--ar-nvidia) 18%, transparent);
  --md-code-hl-keyword-color: var(--ar-code-keyword);
  --md-code-hl-string-color: var(--ar-code-string);
  --md-code-hl-number-color: var(--ar-code-number);
  --md-code-hl-constant-color: var(--ar-code-number);
  --md-code-hl-special-color: var(--ar-code-number);
  --md-code-hl-function-color: var(--ar-code-function);
  --md-code-hl-comment-color: var(--ar-code-comment);
  --md-code-hl-generic-color: var(--ar-ink-muted);
  --md-code-hl-name-color: var(--ar-ink);
  --md-code-hl-variable-color: var(--ar-ink);
  --md-code-hl-operator-color: var(--ar-ink-muted);
  --md-code-hl-punctuation-color: var(--ar-ink-muted);
  --md-footer-bg-color: var(--ar-canvas);
  --md-footer-bg-color--dark: var(--ar-canvas);
  --md-footer-fg-color: var(--ar-ink);
  --md-admonition-fg-color: var(--ar-ink);
  --md-admonition-bg-color: var(--ar-surface);
  --md-shadow-z1: none;
}

/* Base ---------------------------------------------------------------------- */

html {
  background: var(--ar-canvas);
  scroll-behavior: smooth;
}

body {
  background: var(--ar-canvas);
  color: var(--ar-ink);
  font-family: var(--ar-font);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ar-accent);
  color: var(--ar-ink);
}

:focus-visible {
  outline-color: var(--ar-action);
}

.md-main {
  background: var(--ar-canvas);
}

.md-main__inner {
  margin-top: 1.6rem;
}

/* Header ------------------------------------------------------------------- */

.md-header {
  border-bottom: 1px solid var(--ar-rule);
  background: color-mix(in srgb, var(--ar-canvas) 86%, transparent);
  box-shadow: none;
  color: var(--ar-ink);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
}

.md-header__inner {
  gap: 0.2rem;
  width: min(100% - 2 * var(--ar-gutter), var(--ar-content));
  max-width: none;
  height: var(--nemo-header-height);
  margin-inline: auto;
  padding: 0;
}

.nemo-brand {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  order: -1;
  margin-right: 0.6rem;
  color: var(--ar-ink);
  text-decoration: none;
}

.nemo-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 1.05rem;
}

.nemo-brand__divider {
  flex: 0 0 auto;
  width: 1px;
  height: 1rem;
  background: color-mix(in srgb, var(--ar-ink) 24%, transparent);
}

.nemo-brand__name {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Brand in bold, section in the regular weight: one name, two levels. */
.nemo-brand__section {
  color: var(--ar-ink-muted);
  font-weight: 400;
}

.nemo-brand:focus-visible {
  border-radius: var(--ar-radius-control);
  outline: 2px solid var(--ar-action);
  outline-offset: 4px;
}

/* The theme's scrolling title stays in place as the flexible spacer. */
.md-header__title {
  margin-left: 0;
}

.md-header__title .md-header__ellipsis {
  visibility: hidden;
}

.md-header__inner > [for="__drawer"],
.md-header__inner > .nemo-drawer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nemo-header-control-size);
  height: var(--nemo-header-control-size);
  margin: 0;
  padding: 0.5rem;
  border-radius: var(--ar-radius-control);
  order: -2;
  color: var(--ar-ink-muted);
}

.md-header__option .md-header__button,
.md-header__inner > [for="__search"] {
  box-sizing: border-box;
  width: var(--nemo-header-control-size);
  height: var(--nemo-header-control-size);
  margin: 0;
  padding: 0.5rem;
  border-radius: var(--ar-radius-control);
  color: var(--ar-ink-muted);
}

.md-header__option .md-header__button svg,
.md-header__inner > [for="__search"] svg,
.nemo-drawer-button svg {
  width: var(--nemo-header-icon-size);
  height: var(--nemo-header-icon-size);
}

.md-header__option .md-header__button:hover,
.md-header__inner > [for="__search"]:hover,
.md-header__inner > .nemo-drawer-button:hover {
  background: var(--ar-tint);
  color: var(--ar-ink);
}

.nemo-drawer-button:focus-visible {
  outline: 2px solid var(--ar-action);
  outline-offset: 2px;
}

.nemo-drawer-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border-radius: var(--ar-radius-control);
  color: var(--ar-ink-muted);
  cursor: pointer;
}

.nemo-drawer-close:hover {
  background: var(--ar-tint);
  color: var(--ar-ink);
}

.nemo-drawer-close:focus-visible {
  outline: 2px solid var(--ar-action);
}

.nemo-drawer-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nemo-drawer-icon-collapse,
:root[data-navigation-drawer="open"] .nemo-drawer-icon-expand,
#__drawer:checked ~ .md-header .nemo-drawer-icon-expand {
  display: none;
}

:root[data-navigation-drawer="open"] .nemo-drawer-icon-collapse,
#__drawer:checked ~ .md-header .nemo-drawer-icon-collapse {
  display: inline;
}

.nemo-drawer-restoring .nemo-drawer-button,
.nemo-drawer-restoring .md-main,
.nemo-drawer-restoring .md-sidebar--primary,
.nemo-drawer-restoring .md-footer {
  transition: none !important;
}

/* Desktop search opens from a quiet field-shaped button. */
.md-search__button {
  height: 1.6rem;
  margin-right: 0.3rem;
  padding: 0 0.6rem;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-control);
  background: var(--ar-surface);
  color: var(--ar-ink-muted);
  font-family: var(--ar-font);
  font-size: 0.7rem;
  transition: border-color var(--ar-ease), color var(--ar-ease);
}

.md-search__button:hover {
  border-color: var(--ar-control);
  color: var(--ar-ink);
}

.md-search__button:focus-visible {
  outline: 2px solid var(--ar-action);
  outline-offset: 2px;
}

/* Phones keep the lockup whole; the theme follows the system setting when its
 * toggle is hidden. */
@media (max-width: 30em) {
  .nemo-brand {
    gap: 0.5rem;
    margin-right: 0;
  }

  .nemo-logo {
    height: 0.9rem;
  }

  /* Stack the lockup on phones so the full name fits beside the controls. */
  .nemo-brand__name {
    display: grid;
    font-size: 0.75rem;
    line-height: 1.15;
  }

  .nemo-brand__section {
    font-size: 0.7rem;
  }
}

@media (max-width: 26em) {
  .md-header__option {
    display: none;
  }
}

@media (max-width: 22.5em) {
  .nemo-brand__divider,
  .nemo-brand__name {
    display: none;
  }
}

/* Navigation drawer ---------------------------------------------------------- */

.md-overlay {
  position: fixed;
  z-index: 4;
  display: block;
  background: color-mix(in srgb, #121510 55%, transparent);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

:root[data-navigation-drawer="open"] .md-overlay,
#__drawer:checked ~ .md-overlay {
  opacity: 1;
  pointer-events: auto;
}

.md-sidebar--primary {
  position: fixed !important;
  z-index: 5;
  top: 0.5rem !important;
  bottom: auto !important;
  left: 0.5rem !important;
  display: block;
  width: var(--nemo-sidebar-width);
  height: calc(100vh - 1rem) !important;
  padding: 0;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-plate);
  background: var(--ar-canvas);
  transform: translateX(calc(-100% - 0.75rem)) !important;
  visibility: hidden;
  transition: transform 200ms ease, visibility 0s linear 200ms !important;
}

:root[data-navigation-drawer="open"] .md-sidebar--primary,
#__drawer:checked ~ .md-container .md-sidebar--primary {
  transform: translateX(0) !important;
  visibility: visible;
  transition-delay: 0s !important;
}

@media (min-width: 64rem) {
  .nemo-drawer-close {
    display: none;
  }

  .md-header {
    z-index: 6;
  }

  .md-header__inner > .nemo-drawer-button {
    position: fixed;
    z-index: 7;
    top: calc((var(--nemo-header-height) - var(--nemo-header-control-size)) / 2);
    left: 0.75rem;
    background: transparent;
    border: 0;
    transition: color var(--ar-ease), background-color var(--ar-ease);
  }

  .md-overlay,
  :root[data-navigation-drawer="open"] .md-overlay,
  #__drawer:checked ~ .md-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .md-main {
    transition: padding-left 200ms ease;
  }

  :root[data-navigation-drawer="open"] .md-main {
    padding-left: var(--nemo-sidebar-width);
  }

  :root[data-navigation-drawer="open"] .md-footer {
    padding-left: var(--nemo-sidebar-width);
  }

  .md-sidebar--primary {
    top: var(--nemo-header-height) !important;
    bottom: 0 !important;
    left: 0 !important;
    height: calc(100vh - var(--nemo-header-height)) !important;
    border-width: 0 1px 0 0;
    border-radius: 0;
    transform: translateX(calc(-100% - 1px)) !important;
    visibility: hidden;
    transition: transform 200ms ease, visibility 0s linear 200ms !important;
  }

  :root[data-navigation-drawer="open"] .md-sidebar--primary {
    transform: translateX(0) !important;
    visibility: visible;
    transition-delay: 0s !important;
  }
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  height: 100%;
  margin: 0;
  overflow-y: auto;
}

.md-sidebar--primary .md-sidebar__inner {
  padding: 0.6rem 0.7rem;
}

.md-sidebar--primary .md-nav--primary[data-md-level="0"] > .md-nav__title {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.3rem 0.8rem;
  border-bottom: 1px solid var(--ar-rule);
  margin-bottom: 0.6rem;
  background: none;
  box-shadow: none;
  color: var(--ar-ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.md-sidebar--primary .md-nav--primary[data-md-level="0"] > .md-nav__title .md-logo {
  position: static;
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.md-sidebar--primary .md-nav__title .nemo-logo {
  height: 0.9rem;
}

.md-nav {
  font-size: 0.75rem;
}

.md-nav__link {
  color: var(--ar-ink-muted);
}

.md-nav__link:hover,
.md-nav__link:focus-visible {
  color: var(--ar-ink);
}

.md-nav__item .md-nav__link--active {
  color: var(--ar-ink);
  font-weight: 600;
}

/* The theme appends subtitle metadata; sidebar links should show titles only. */
.md-sidebar--primary .md-nav__link .md-ellipsis > br,
.md-sidebar--primary .md-nav__link .md-ellipsis > small {
  display: none;
}

/* Posts are short; a centered reading column reads better than a TOC rail.
 * The theme shows the rail with a higher-specificity rule, hence !important. */
.md-sidebar--secondary {
  display: none !important;
}

/* Breadcrumbs keep complete labels together, including on narrow screens. */
.md-path {
  width: calc(100% - 2 * var(--ar-gutter));
  max-width: var(--ar-measure);
  margin-inline: auto !important;
  font-size: 0.7rem;
}

.md-path__list {
  flex-wrap: wrap;
  row-gap: 0.3rem;
}

.md-path__item {
  flex: 0 0 auto;
  max-width: 100%;
}

.md-path__link {
  color: var(--ar-ink-muted);
}

.md-path__link .md-ellipsis {
  white-space: normal;
  overflow-wrap: anywhere;
}

.md-top {
  border: 1px solid var(--ar-rule);
  background: var(--ar-surface);
  box-shadow: none;
  color: var(--ar-ink);
  font-size: 0.7rem;
}

.md-top:hover {
  border-color: var(--ar-control);
  background: var(--ar-surface);
  color: var(--ar-ink);
}

/* Footer ---------------------------------------------------------------------- */

.md-footer {
  box-sizing: border-box;
  border-top: 0;
  background: var(--ar-canvas);
  color: var(--ar-ink);
  transition: padding-left 200ms ease;
}

.md-footer__inner {
  gap: 2rem;
  width: min(100% - 3rem, var(--ar-content));
  max-width: none;
  margin: 3.2rem auto 0;
  padding: 1rem 0 1.6rem;
  border-top: 1px solid var(--ar-rule);
}

body:has(.dev-note-header) .md-footer__inner {
  width: min(100% - 2 * var(--ar-gutter), var(--ar-measure));
}

.md-footer__link {
  align-items: center;
  flex: 1 1 0;
  gap: 0.6rem;
  min-width: 0;
  max-width: calc(50% - 1rem);
  margin: 0;
  padding: 0.6rem 0;
  color: var(--ar-ink);
  opacity: 1;
}

.md-footer__link:hover,
.md-footer__link:focus-visible {
  color: var(--ar-action);
  opacity: 1;
}

.md-footer__link--next {
  margin-left: auto;
  text-align: right;
}

.md-footer__button {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  color: var(--ar-ink-muted);
}

.md-footer__button svg {
  width: 0.9rem;
  height: 0.9rem;
}

.md-footer__title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  white-space: normal;
}

.md-footer__title .md-ellipsis {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  text-overflow: clip;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.md-footer__direction {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ar-ink-muted);
  font-size: 0.65rem;
  font-weight: 450;
  line-height: 1.4;
  opacity: 1;
}

@media screen and (max-width: 44.984375em) {
  .md-footer__inner {
    flex-direction: column;
    gap: 0.25rem;
  }

  .md-footer__link {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .md-footer__link--prev .md-footer__title {
    display: block;
  }
}

.md-footer-meta {
  background: var(--ar-canvas);
  color: var(--ar-ink-muted);
}

.md-footer-meta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem 1.6rem;
  width: min(100% - 3rem, var(--ar-content));
  max-width: none;
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--ar-rule);
}

.md-typeset .nemo-brand--footer {
  order: 0;
  margin: 0;
  color: var(--ar-ink);
  text-decoration: none;
}

.nemo-brand--footer .nemo-logo {
  height: 0.85rem;
}

.nemo-brand--footer .nemo-brand__divider {
  height: 0.8rem;
}

.nemo-brand--footer .nemo-brand__name {
  font-size: 0.7rem;
}

.nemo-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-left: auto;
}

.md-typeset .nemo-footer-links a {
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  text-decoration: none;
}

.md-typeset .nemo-footer-links a:hover {
  color: var(--ar-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.md-copyright {
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
}

.md-copyright__highlight {
  color: inherit;
}

/* Home page layout -------------------------------------------------------- */

body:has(.nemo-home-page) .md-main__inner.md-grid,
body:has(.nemo-home-page) .md-footer__inner.md-grid,
body:has(.nemo-home-page) .md-footer-meta__inner.md-grid {
  max-width: none;
}

body:has(.nemo-home-page) .md-main__inner {
  margin-top: 0;
}

/* The theme reserves side margins for its sidebars with [dir] rules. */
body:has(.nemo-home-page) .md-content__inner {
  margin: 0 !important;
  padding-top: 0;
}

body:has(.nemo-home-page) .md-path {
  display: none;
}

.nemo-home-page,
.nemo-home-page * {
  box-sizing: border-box;
}

.nemo-home-page {
  width: min(100% - 2 * var(--ar-gutter), var(--ar-content));
  margin: 0 auto;
  padding-bottom: 3.2rem;
  font-size: 0.8rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--ar-rule);
}

.md-typeset .section-head h2 {
  margin: 0;
  color: var(--ar-ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

/* Cards ---------------------------------------------------------------------- */

.dev-note-card {
  margin: 0;
}

.md-typeset .dev-note-card__link,
.md-typeset .dev-note-card__link:hover {
  color: inherit;
  text-decoration: none;
}

.md-typeset .dev-note-card__link:focus-visible {
  border-radius: var(--ar-radius-plate);
  outline: 2px solid var(--ar-action);
  outline-offset: 6px;
}

/* The plate: every post image sits in the same frame, uncropped. */
.dev-note-card__visual {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-plate);
  background: var(--ar-surface);
  transition: border-color var(--ar-ease);
}

.md-typeset .dev-note-card__visual-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dev-note-card__visual--text {
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.1rem;
  background: var(--ar-tint);
}

.dev-note-card__visual-name {
  color: var(--ar-ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dev-note-card__link:hover .dev-note-card__visual {
  border-color: var(--ar-control);
}

.md-typeset .dev-note-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  margin: 0;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  font-weight: 450;
  line-height: 1.4;
}

.dev-note-card__meta time {
  font-variant-numeric: tabular-nums;
}

.dev-note-card__project {
  color: var(--ar-ink);
  font-weight: 550;
}

.md-typeset .dev-note-card h3 {
  margin: 0.4rem 0 0.4rem;
  color: var(--ar-ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: text-decoration-color var(--ar-ease);
}

.dev-note-card__link:hover h3 {
  text-decoration-color: currentColor;
}

.md-typeset .dev-note-card__summary {
  margin: 0;
  color: var(--ar-ink-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.dev-note-card__footer {
  display: flex;
  align-items: center;
  margin-top: 1rem;
}

.dev-note-card__authors {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.dev-note-card__authors img,
.dev-note-card__authors .dev-note-avatar {
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
  border: 2px solid var(--ar-canvas);
  border-radius: 50%;
  object-fit: cover;
  background: var(--ar-tint);
}

.dev-note-card__authors > :is(img, .dev-note-avatar) + :is(img, .dev-note-avatar) {
  margin-left: -0.4rem;
}

/* Initials stand in for an author without a GitHub avatar. */
.dev-note-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--ar-tint);
  color: var(--ar-ink-muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.dev-note-card__authors .dev-note-avatar {
  font-size: 0.45rem;
}

.dev-note-card__author-names {
  margin-left: 0.5rem;
  overflow: hidden;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Featured: the largest image on the page, copy beside it. */
.dev-note-card--featured .dev-note-card__link {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 2.4rem;
}

.dev-note-card--featured .dev-note-card__copy {
  min-width: 0;
}

.md-typeset .dev-note-card--featured h3 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.md-typeset .dev-note-card--featured .dev-note-card__summary {
  font-size: 0.9rem;
}

/* Recent updates: up to three equal cards under the fold. */
.home-updates__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem 1.6rem;
}

.home-updates__grid:has(> :nth-child(2):last-child),
.home-updates__grid:has(> :only-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dev-note-card--update .dev-note-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.md-typeset .dev-note-card--update .dev-note-card__summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Home ----------------------------------------------------------------------- */

.nemo-home-hero {
  padding: clamp(1.6rem, 5vh, 2.8rem) 0 clamp(1.6rem, 4vh, 2.4rem);
}

.md-typeset .nemo-home-brand {
  margin: 0;
  color: var(--ar-ink);
  font-size: clamp(2.2rem, min(6.6vw, 10vh), 4.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.md-typeset .nemo-home-dek {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--ar-ink-muted);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: -0.005em;
  line-height: 1.5;
  text-wrap: pretty;
}

.home-section + .home-section {
  margin-top: 3.2rem;
}

.md-typeset .post-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-typeset ol.post-index > li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ar-rule);
}

.md-typeset ol.post-index > li:first-child {
  margin-top: -0.6rem;
}

.md-typeset .post-index__link {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1.6rem;
  padding: 0.8rem 0;
  color: var(--ar-ink);
  text-decoration: none;
}

.post-index__link time,
.post-index__project {
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.post-index__title {
  font-size: 0.85rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--ar-ease);
}

.post-index__link:hover .post-index__title {
  text-decoration-color: currentColor;
}

.md-typeset .home-empty {
  padding: 1.6rem 0;
  border-top: 1px solid var(--ar-rule);
  color: var(--ar-ink-muted);
  font-size: 0.9rem;
}

/* Reading pages (posts) ----------------------------------------------------- */

.md-typeset {
  color: var(--ar-ink);
  font-size: 0.8rem;
  line-height: 1.65;
}

.md-content__inner:not(:has(> .nemo-home-page)) {
  position: relative;
  width: calc(100% - 2 * var(--ar-gutter));
  max-width: var(--ar-measure);
  margin-inline: auto !important;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* A floated action would narrow the entire opening, including its hero. */
.md-content__inner:not(:has(> .nemo-home-page)) > .md-content__button {
  position: absolute;
  top: 0.2rem;
  right: 0;
  margin: 0;
  color: var(--ar-ink-muted);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--ar-ink);
  font-weight: 600;
}

.md-typeset h1 {
  margin: 0 0 1.2rem;
  padding-inline-end: 2rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.md-typeset h2 {
  margin: 2.2em 0 0.6em;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.md-typeset h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.md-typeset h4 {
  margin: 1.6em 0 0.4em;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.md-typeset a {
  color: var(--ar-action);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ar-action) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--ar-ease), color var(--ar-ease);
}

.md-typeset a:hover,
.md-typeset a:focus-visible {
  color: var(--ar-action);
  text-decoration-color: currentColor;
}

.md-typeset strong {
  font-weight: 600;
}

/* Body links: ink text with a green underline, as in the original draft. */
.md-typeset a:not([class]) {
  color: var(--ar-ink);
  text-decoration-color: var(--ar-nvidia);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.md-typeset a:not([class]):hover,
.md-typeset a:not([class]):focus-visible {
  background: var(--ar-accent);
  color: var(--ar-ink);
  text-decoration-color: var(--ar-nvidia);
}

/* The takeaways list: a quiet tinted box with a green left edge. */
.md-typeset .dev-note-findings {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem 0.9rem 0.5rem;
  border: 1px solid var(--ar-rule);
  border-left: 3px solid var(--ar-nvidia);
  border-radius: var(--ar-radius-control);
  background: var(--ar-tint);
}

.md-typeset .dev-note-findings > ul {
  margin: 0;
}


.md-typeset blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1.1em;
  border-left: 2px solid var(--ar-control);
  color: var(--ar-ink-muted);
}

.md-typeset hr {
  margin: 2.4em 0;
  border-bottom: 1px solid var(--ar-rule);
}

.md-typeset code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
}

.md-typeset pre > code {
  padding: 0.9em 1.1em;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-control);
  font-size: 0.7em;
  line-height: 1.6;
}

/* Code blocks are dark in both palettes, as in the original draft. Inline code
 * keeps the light --md-code-* values. */
.md-typeset .highlight {
  --md-code-bg-color: #111827;
  --md-code-fg-color: #e5e7eb;
  --md-code-hl-keyword-color: #c792ea;
  --md-code-hl-string-color: #c3e88d;
  --md-code-hl-number-color: #f78c6c;
  --md-code-hl-constant-color: #c792ea;
  --md-code-hl-special-color: #c792ea;
  --md-code-hl-function-color: #82aaff;
  --md-code-hl-comment-color: #7d8799;
  --md-code-hl-generic-color: #e5e7eb;
  --md-code-hl-name-color: #e5e7eb;
  --md-code-hl-variable-color: #e5e7eb;
  --md-code-hl-operator-color: #89ddff;
  --md-code-hl-punctuation-color: #e5e7eb;
}

.md-typeset .highlight pre > code {
  border-color: transparent;
  scrollbar-color: #4b5563 #1f2937;
}

.md-typeset .highlight pre > code::-webkit-scrollbar-track {
  background: #1f2937;
}

.md-typeset .highlight pre > code::-webkit-scrollbar-thumb {
  background: #4b5563;
}

.md-typeset .highlight .c1,
.md-typeset .highlight .cm {
  font-style: italic;
}

.md-typeset .highlight .md-clipboard {
  color: #9ca3af;
}

.md-typeset .highlight .md-clipboard:hover {
  color: #ffffff;
}

/* Long lines scroll sideways; keep the bar visible so readers can tell. */
.md-typeset pre > code {
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--ar-control) var(--ar-tint);
}

.md-typeset pre > code::-webkit-scrollbar {
  height: 0.6rem;
}

.md-typeset pre > code::-webkit-scrollbar-track {
  background: var(--ar-tint);
}

.md-typeset pre > code::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--ar-control);
}

/* The theme bleeds code and tables to the screen edge on phones; keep them
 * inside the column so their borders and radius stay intact. */
.md-content__inner > .highlight,
.md-content__inner > pre,
.md-content__inner > .md-typeset__scrollwrap,
.md-content__inner > .tabbed-set > .tabbed-labels {
  margin-inline: 0 !important;
}

.md-content__inner > .tabbed-set > .tabbed-labels {
  max-width: 100%;
  padding-inline: 0 !important;
}

.md-typeset .tabbed-labels > label > a {
  padding-inline: 0.8em;
}

.md-content__inner > .highlight > pre > code,
.md-content__inner > pre > code {
  border-radius: var(--ar-radius-control) !important;
}

.md-typeset kbd {
  border-radius: 4px;
  font-family: var(--ar-mono);
}

/* Tables may scroll within the article; identifiers should not split mid-word. */
.md-typeset table:not([class]) {
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-control);
  background: var(--ar-surface);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.md-typeset table:not([class]) th {
  min-width: 8rem;
  background: var(--ar-tint);
  font-weight: 600;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  border-top-color: var(--ar-rule);
}

.md-typeset__table code {
  overflow-wrap: normal;
  word-break: normal;
}

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-control);
  background: var(--ar-surface);
  box-shadow: none;
  font-size: inherit;
}

.md-typeset .admonition.question,
.md-typeset details.question {
  border-color: color-mix(in srgb, var(--ar-question) 45%, var(--ar-rule));
}

.md-typeset .question > .admonition-title,
.md-typeset .question > summary {
  background-color: color-mix(in srgb, var(--ar-question) 10%, transparent);
}

.md-typeset .question > .admonition-title::before,
.md-typeset .question > summary::before {
  background-color: var(--ar-question);
}

.md-typeset .question > .admonition-title::after,
.md-typeset .question > summary::after {
  color: var(--ar-question);
}

/* Keep topic metadata searchable without displaying non-interactive badges. */
body:has(.dev-note-header) .md-typeset .md-tags {
  display: none;
}

/* Post opening ---------------------------------------------------------------- */

body:has(.dev-note-header) .md-main__inner {
  margin-top: 1rem;
}

.dev-note-header {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  /* Reserve room for the site header, breadcrumbs, and page gutters. */
  max-height: calc(100svh - var(--nemo-header-height) - 5rem);
}

.md-typeset .dev-note-header > h1 {
  margin: 0.4rem 0 0.8rem;
}

.md-typeset .dev-note-deck {
  max-width: 40rem;
  margin: 0 0 0.4rem;
  color: var(--ar-ink-muted);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  font-style: italic;
  letter-spacing: -0.005em;
  line-height: 1.5;
  text-wrap: pretty;
}

.dev-note-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  margin: 1.2rem 0 1.6rem;
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--ar-rule);
}

.dev-note-byline__authors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
}

.md-typeset .dev-note-byline__author {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ar-ink);
  text-decoration: none;
}

.dev-note-byline__author img {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ar-tint);
}

.dev-note-byline__copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.3;
}

.dev-note-byline__author strong {
  color: var(--ar-ink);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--ar-ease);
}

.dev-note-byline__author:hover strong {
  text-decoration-color: currentColor;
}

.dev-note-byline__copy span {
  color: var(--ar-ink-muted);
  font-size: 0.65rem;
}

.md-typeset .dev-note-byline__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  margin: 0;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* Figures and theme-specific images -------------------------------------------- */

body:not([data-md-color-scheme="slate"]) .dev-note-image--dark,
body[data-md-color-scheme="slate"] .dev-note-image--light {
  display: none;
}

.md-typeset .dev-note-figure {
  width: 100%;
  max-width: 100%;
  margin: 2em auto;
}

.md-typeset .dev-note-figure img,
.md-typeset p > img:only-child {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-plate);
  background: var(--ar-surface);
}

/* A caption for a figure-less block such as a code snippet, set like a figcaption. */
.md-typeset .dev-note-caption {
  margin: -0.4rem 0 1.5rem;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.md-typeset .dev-note-figure figcaption,
.md-typeset figcaption {
  max-width: none;
  margin: 0.7rem 0 0;
  font-style: normal;
  text-align: left;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

/* Interactive Plotly charts (docs/javascripts/plotly-figures.js). Charts keep the
   light plate they are drawn on, so they read the same in both palettes. */
.dev-note-plot,
.dev-note-plot-grid__cell {
  min-width: 0;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-plate);
  background: #ffffff;
  overflow: hidden;
}

.dev-note-plot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 0.75rem;
}

.dev-note-plot-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dev-note-plot-cell > .dev-note-plot {
  margin-top: auto;
}

@media (max-width: 40rem) {
  .dev-note-plot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.md-typeset .dev-note-plot-title {
  margin: 0 0 0.1rem;
  color: var(--ar-ink);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.md-typeset .dev-note-plot-subtitle {
  margin: 0 0 0.55rem;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: left;
}

.dev-note-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0 0 0.4rem;
  color: var(--ar-ink-muted);
  font-size: 0.7rem;
}

.dev-note-legend i {
  display: inline-block;
  width: 1.3rem;
  height: 0;
  margin-right: 0.4rem;
  border-top: 3px solid;
  vertical-align: middle;
}

.dev-note-legend--swatches i {
  width: 0.7rem;
  height: 0.7rem;
  border: 0;
  border-radius: 3px;
  vertical-align: -1px;
}

.dev-note-legend .is-harness { border-color: #6b7280; border-top-style: dashed; }
.dev-note-legend .is-model { border-color: #76b900; }
.dev-note-legend .is-amber { border-color: #e8a33d; }
.dev-note-legend--swatches .is-amber { background: #e8a33d; }
.dev-note-legend--swatches .is-green { background: #76b900; }
.dev-note-legend--swatches .is-blue { background: #2e7db8; }
.dev-note-legend--swatches .is-purple { background: #8b5cf6; }
.dev-note-legend--swatches .is-gray { background: #d1d5db; }
.dev-note-legend--swatches .is-ink { background: #1a1a1a; }
.dev-note-legend--swatches .is-ink-soft { background: rgba(26, 26, 26, 0.4); }

/* Frame-by-frame figure with a Restart button (docs/javascripts/frame-player.js). */
.dev-note-player__stage {
  position: relative;
}

.md-typeset .dev-note-player__stage > .dev-note-player__frame {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 180ms ease;
}

.md-typeset .dev-note-player__stage > .dev-note-player__frame.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .dev-note-player__stage > .dev-note-player__frame {
    transition: none;
  }
}

.dev-note-player__button:disabled {
  opacity: 0.5;
  cursor: default;
}

.dev-note-player__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dev-note-player__button {
  height: 1.9rem;
  padding: 0 0.7rem;
  border: 1px solid var(--ar-rule);
  border-radius: 999px;
  background: var(--ar-surface);
  color: var(--ar-ink);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--ar-ease);
}

.dev-note-player__button:hover {
  background: var(--ar-tint);
}

.dev-note-player__button:focus-visible {
  outline: 2px solid var(--ar-action);
  outline-offset: 2px;
}

.md-typeset .dev-note-figure--hero {
  display: grid;
  grid-row: 3;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  max-height: 28rem;
  margin: 1rem auto 0;
}

.dev-note-figure--hero > a {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

/* A reduced-motion still wraps the hero in <picture>; keep the image the grid item. */
.dev-note-figure--hero picture {
  display: contents;
}

.md-typeset .dev-note-figure--hero img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Numbered references at the end of research posts. */
.md-typeset ol.dev-note-references {
  color: var(--ar-ink-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.md-typeset ol.dev-note-references {
  margin-left: 0;
  padding-left: 2em;
}

.md-typeset ol.dev-note-references > li {
  margin-bottom: 0.4em;
  margin-left: 0;
  padding-left: 0.2em;
}

/* Tabs switch between variants of one figure; keep the figure close to its tabs. */
.md-typeset .tabbed-block > .dev-note-figure:first-child {
  margin-top: 1rem;
}

.md-typeset .tabbed-labels > label {
  font-size: 0.75rem;
}

.md-typeset sup a {
  text-decoration: none;
}

/* Related code: the heading and repo card that close every post. ------------------ */

.dev-note-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  margin: 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-radius-plate);
  background: var(--ar-surface);
}

.md-typeset .dev-note-project__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.5rem;
  margin: 0;
  color: var(--ar-ink-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.dev-note-project__icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.1rem;
  fill: var(--ar-ink);
}

.dev-note-project__name strong {
  color: var(--ar-ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset .dev-note-project__description {
  margin: 0.4rem 0 0;
  color: var(--ar-ink-muted);
  font-size: 0.8rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.md-typeset .dev-note-project__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.9rem;
  border-radius: var(--ar-radius-control);
  background: var(--ar-action);
  color: var(--ar-on-action);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ar-ease);
}

.md-typeset .dev-note-project__action:hover,
.md-typeset .dev-note-project__action:focus-visible {
  background: color-mix(in srgb, var(--ar-action) 86%, var(--ar-ink));
  color: var(--ar-on-action);
}

.md-typeset .dev-note-project__action:focus-visible {
  outline: 2px solid var(--ar-action);
  outline-offset: 3px;
}

/* Responsive -------------------------------------------------------------------- */

@media (max-width: 60em) {
  .dev-note-card--featured .dev-note-card__link {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 48em) {
  .home-updates__grid,
  .home-updates__grid:has(> :nth-child(2):last-child),
  .home-updates__grid:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 44em) {
  .md-typeset .post-index__link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 1rem;
  }

  .post-index__link time {
    grid-column: 1 / -1;
  }

  .dev-note-project {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.1rem;
  }

  .md-typeset .dev-note-project__action {
    justify-self: start;
  }
}

@media (max-width: 38em) {
  :root {
    --ar-gutter: 1rem;
  }

  .md-footer-meta__inner,
  .md-footer__inner {
    width: calc(100% - 2rem);
  }

  .md-footer__inner {
    margin-top: 2.4rem;
  }

  .dev-note-card__footer {
    flex-wrap: wrap;
  }

  .dev-note-card__author-names {
    overflow: visible;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
  }

  .nemo-footer-links {
    margin-left: 0;
  }

  .md-copyright {
    width: 100%;
  }
}

@media (max-width: 24rem) {
  /* Leave room for a second breadcrumb row without crowding the hero. */
  .dev-note-header {
    max-height: calc(100svh - var(--nemo-header-height) - 6.5rem);
  }

  /* A captioned hero can't share the smallest screens with the title and
   * subtitle; let the opening run long rather than squeeze the image away. */
  .dev-note-header:has(.dev-note-figure--hero > figcaption) {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nemo-drawer-button,
  .md-overlay,
  .md-sidebar--primary,
  .md-main,
  .md-footer,
  .dev-note-card__visual,
  .dev-note-card h3,
  .md-typeset a {
    transition: none !important;
  }
}

@media print {
  .md-header,
  .md-footer,
  .dev-note-project__action {
    display: none;
  }
}
