*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid;
}

@property --background-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #161616;
}

@property --background-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #1a1a1a;
}

@property --background-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #2a2a2a;
}

@property --foreground {
  syntax: "<color>";
  inherits: true;
  initial-value: #b4b4b4;
}

@property --foreground-diminished {
  syntax: "<color>";
  inherits: true;
  initial-value: #b4b4b499;
}

@property --selected {
  syntax: "<color>";
  inherits: true;
  initial-value: #e2e2e2;
}

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #c8c8c8;
}

@property --contour {
  syntax: "<color>";
  inherits: true;
  initial-value: #2e2e2e;
}

:root {
  --background-1: #161616;
  --background-2: #1a1a1a;
  --background-3: #2a2a2a;
  --foreground: #b4b4b4;
  --foreground-diminished: #b4b4b499;
  --selected: #e2e2e2;
  --accent: #c8c8c8;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --contour: #2e2e2e;
  --header-height: 4.25rem;
  --theme-ease: cubic-bezier(0.52, 0.26, 0.47, 0.99);
  --theme-duration: 1.25s;
  color-scheme: dark;
}

/* Soft gray light theme (aligned with web-app) — avoids stark paper-white. */
html.theme-light {
  --background-1: #dbdbdb;
  --background-2: #e7e7e7;
  --background-3: #ffffff;
  --foreground: #3e4244;
  --foreground-diminished: #3e424499;
  --selected: #1a1a1a;
  --accent: #333333;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --contour: #bfbfbf;
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  background: var(--background-1);
  overflow-x: clip;
  transition:
    --background-1 var(--theme-duration) var(--theme-ease),
    --background-2 var(--theme-duration) var(--theme-ease),
    --background-3 var(--theme-duration) var(--theme-ease),
    --foreground var(--theme-duration) var(--theme-ease),
    --foreground-diminished var(--theme-duration) var(--theme-ease),
    --selected var(--theme-duration) var(--theme-ease),
    --accent var(--theme-duration) var(--theme-ease),
    --contour var(--theme-duration) var(--theme-ease),
    background-color var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    transition: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background-1);
  padding-top: var(--header-height);
  overflow-x: clip;
  transition:
    background-color var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--selected);
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--selected);
  margin: 2rem 0 0.75rem;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* Site header (marketing chrome) */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
}

.site-header.with-backdrop {
  background: transparent;
}

.site-header.with-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--background-1) 0%, var(--background-1) 55%, transparent 100%);
}

.header-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-height);
  padding: 0.65rem 0 0;
}

.logo-link {
  grid-column: 1;
  justify-self: start;
  position: relative;
  display: inline-grid;
  align-items: end;
  justify-items: end;
  text-decoration: none;
  transform-origin: center center;
  transition: transform 0.233s ease;
}

.logo-link:hover {
  text-decoration: none;
  transform: scale(1.08);
}

.logo-link img {
  grid-area: 1 / 1;
  width: clamp(7.5rem, 18vw, 9.5rem);
  height: auto;
  filter: invert(1) drop-shadow(2px 4px 6px black);
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

html.theme-light .logo-link img {
  filter: none;
}

.logo-mark {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: end;
  z-index: 1;
  margin: 0 0.05rem 0.12rem 0;
  transform: translateY(4px);
  padding: 0.05rem 0.28rem;
  border-radius: 0.125rem;
  background: var(--background-1);
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--accent);
  pointer-events: none;
}

.main-nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}

.main-nav__group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: inherit;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
}

.main-nav__icon,
.nav-tree__icon,
.section-index__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 0;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.15s ease;
}

html.theme-light .main-nav__icon,
html.theme-light .nav-tree__icon,
html.theme-light .section-index__icon,
html.theme-light .cross-nav-link__icon {
  filter: none;
}

.here-nav__results-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  display: inline-block;
  background-color: currentColor;
  opacity: 0.92;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.main-nav a:hover {
  color: var(--selected);
  text-shadow:
    0 0 8px rgb(255 255 255 / 0.55),
    0 0 18px rgb(255 255 255 / 0.28);
  text-decoration: none;
}

html.theme-light .main-nav a:hover {
  text-shadow:
    0 0 8px rgb(0 0 0 / 0.12),
    0 0 18px rgb(0 0 0 / 0.08);
}

.main-nav a:hover .main-nav__icon {
  opacity: 1;
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: var(--selected);
  background: color-mix(in srgb, var(--background-3) 72%, transparent);
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.header-cta {
  transition:
    transform 0.233s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.header-cta.btn-primary {
  color: var(--selected);
  background: var(--background-1);
  border: 1px solid var(--selected);
}

.header-cta.btn-primary:hover {
  color: var(--background-1);
  background: var(--selected);
  border-color: var(--selected);
  transform: none;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  color: var(--background-1);
  background: var(--selected);
  border-color: var(--selected);
}

.docs-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.docs-layout {
  position: relative;
  z-index: 1;
  display: block;
  flex: 1;
  min-height: 0;
}

.docs-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  min-width: 0;
}

/* Full-page catalog tree */

.page-navigation .lead {
  max-width: 40rem;
}

.nav-tree-page {
  margin-top: 1.75rem;
  max-width: min(72rem, 100%);
}

.nav-tree-page .nav-tree.depth-0 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem 1.5rem;
  align-items: start;
}

.nav-tree-page .nav-tree.depth-1,
.nav-tree-page .nav-tree.depth-2,
.nav-tree-page .nav-tree.depth-3,
.nav-tree-page .nav-tree.depth-4 {
  display: block;
  padding-left: 0.55rem;
  margin-left: 0.35rem;
  border-left: 1px solid color-mix(in srgb, var(--contour) 55%, transparent);
}

.nav-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}

.nav-item {
  margin: 0.08rem 0;
}

.nav-details {
  margin: 0;
}

.nav-summary {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  list-style: none;
  padding: 0.22rem 0.35rem;
  border-radius: 0.35rem;
}

.nav-summary::-webkit-details-marker,
.nav-summary::marker {
  display: none;
  content: "";
}

.nav-summary::before {
  content: "";
  flex-shrink: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid var(--foreground-diminished);
  border-bottom: 1.5px solid var(--foreground-diminished);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.nav-details[open] > .nav-summary::before {
  transform: rotate(45deg);
}

.nav-summary:hover {
  background: var(--accent-soft);
}

.nav-leaf-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  color: var(--foreground-diminished);
  text-decoration: none;
  border-radius: 0.3rem;
}

.nav-folder {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}

.nav-section-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}

.nav-leaf-link:hover,
.nav-section-link:hover {
  color: var(--selected);
  text-decoration: none;
}

.nav-item.active > .nav-leaf-link,
.nav-item.active > .nav-section-link,
.nav-item.active > .nav-details > .nav-summary .nav-section-link,
.nav-item.active > .nav-details > .nav-summary .nav-leaf-link {
  color: var(--selected);
  background: var(--accent-soft);
}

.nav-summary .nav-section-link,
.nav-summary .nav-leaf-link {
  flex: 1;
  min-width: 0;
}

.nav-tree-page a {
  text-decoration: none;
}

/* Current-nav pill in the header; popup opens below */

.here-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.here-nav__toggle,
.here-nav__panel {
  pointer-events: auto;
}

.here-nav__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  max-width: min(22rem, 52vw);
  width: max-content;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.95rem 0.55rem 1.05rem;
  border: 1px solid var(--selected);
  border-radius: 999px;
  background: var(--background-1);
  color: var(--selected);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition:
    transform 0.233s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.here-nav__toggle:hover {
  color: var(--background-1);
  background: var(--selected);
  border-color: var(--selected);
}

.here-nav__toggle:hover .here-nav__icon {
  filter: invert(0);
}

html.theme-light .here-nav__icon {
  filter: none;
}

html.theme-light .here-nav__toggle:hover .here-nav__icon {
  filter: invert(1);
}

.here-nav__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(12rem, 36vw);
}

.here-nav__toggle-icon {
  position: relative;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.here-nav__icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: invert(1);
  opacity: 0.9;
  transition: filter 0.2s ease, opacity 0.15s ease;
}

.here-nav__icon--close {
  opacity: 0;
}

.here-nav.is-expanded .here-nav__icon--search {
  opacity: 0;
}

.here-nav.is-expanded .here-nav__icon--close {
  opacity: 0.9;
}

.here-nav.is-expanded .here-nav__toggle:hover .here-nav__icon--close {
  filter: invert(0);
}

.here-nav__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(36rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--contour);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--background-1) 94%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, #000 60%, transparent);
  backdrop-filter: blur(12px);
}

.here-nav__panel[hidden] {
  display: none !important;
}

.here-nav__search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.here-nav__search {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--contour);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--background-3) 45%, transparent);
  color: var(--foreground);
  font: inherit;
  font-size: 0.95rem;
}

.here-nav__search:focus {
  outline: 1px solid var(--selected);
  outline-offset: 1px;
}

.here-nav__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: center;
  color: var(--foreground-diminished);
}

.here-nav__sep {
  color: color-mix(in srgb, var(--foreground-diminished) 70%, transparent);
}

.here-nav__crumb {
  color: var(--accent);
  text-decoration: none;
}

a.here-nav__crumb:hover {
  color: var(--selected);
  text-decoration: none;
}

.here-nav__crumb.is-current {
  color: var(--selected);
  font-weight: 600;
}

.here-nav__main {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
}

.here-nav__main a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 999px;
}

.here-nav__main a:hover {
  color: var(--selected);
  text-decoration: none;
  background: var(--accent-soft);
}

.here-nav__main a.active,
.here-nav__main a[aria-current="page"] {
  color: var(--selected);
  background: color-mix(in srgb, var(--background-3) 72%, transparent);
}

.here-nav__search-wrap {
  position: relative;
  z-index: 2;
}

.here-nav__results {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 0.35rem);
  z-index: 3;
  width: 60%;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  max-height: min(40vh, 18rem);
  overflow: auto;
  border: 1px solid var(--contour);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--background-1) 96%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 45%, transparent);
}

.here-nav__results[hidden] {
  display: none !important;
}

.here-nav__results li {
  min-width: 0;
}

.here-nav__results a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 0.4rem;
  color: var(--accent);
  text-decoration: none;
}

.here-nav__results-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.here-nav__results a:hover,
.here-nav__results a.is-active {
  color: var(--selected);
  background: var(--accent-soft);
  text-decoration: none;
}

.here-nav__assistant {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0 0.25rem;
  border-top: 1px solid var(--contour);
  margin-top: 0.35rem;
}

.here-nav__assistant[hidden] {
  display: none;
}

.here-nav__assistant-disclaimer {
  margin: 0;
  font-size: 0.72rem;
  color: var(--foreground-diminished);
}

.here-nav__assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.here-nav__assistant-msg {
  padding: 0.45rem 0.55rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

.here-nav__assistant-msg--user {
  align-self: flex-end;
  background: var(--background-3);
  color: var(--selected);
}

.here-nav__assistant-msg--assistant {
  align-self: stretch;
  border-left: 2px solid var(--contour);
  color: var(--foreground);
}

.here-nav__assistant-msg--assistant a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.here-nav__assistant-msg--assistant code {
  font-size: 0.92em;
  padding: 0.05em 0.3em;
  border-radius: 0.2em;
  background: var(--background-3, rgba(0, 0, 0, 0.06));
}

.here-nav__assistant-msg--assistant .assistant-md-table-wrap,
.home-hub__assistant-msg--assistant .assistant-md-table-wrap {
  margin: 0.45rem 0;
  overflow-x: auto;
  white-space: normal;
}

.here-nav__assistant-msg--assistant .assistant-md-table,
.home-hub__assistant-msg--assistant .assistant-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.here-nav__assistant-msg--assistant .assistant-md-table th,
.here-nav__assistant-msg--assistant .assistant-md-table td,
.home-hub__assistant-msg--assistant .assistant-md-table th,
.home-hub__assistant-msg--assistant .assistant-md-table td {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--contour);
  text-align: left;
  vertical-align: top;
}

.here-nav__assistant-msg--assistant .assistant-md-table th,
.home-hub__assistant-msg--assistant .assistant-md-table th {
  background: color-mix(in srgb, var(--background-3) 65%, transparent);
  color: var(--selected);
  font-weight: 600;
}

.here-nav__assistant-msg--status {
  align-self: stretch;
  color: var(--muted, var(--foreground-muted, #6b7280));
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  opacity: 0.9;
}

.here-nav__assistant-citations {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.here-nav__subtree {
  align-self: stretch;
  max-height: min(40vh, 22rem);
  overflow: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--contour);
  text-align: right;
}

.here-nav__subtree[hidden] {
  display: none !important;
}

.here-nav__subtree .nav-item.is-filtered-out,
.here-nav__index-main a.is-filtered-out {
  display: none !important;
}

.here-nav:has(.here-nav__subtree--index) .here-nav__main {
  display: none;
}

.here-nav__subtree--index {
  max-height: none;
  overflow: visible;
  text-align: left;
}

.here-nav__index-hint {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--foreground-diminished);
}

.here-nav__index-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.here-nav__index-main a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 999px;
}

.here-nav__index-main a:hover {
  color: var(--selected);
  text-decoration: none;
  background: var(--accent-soft);
}

.here-nav__subtree .nav-tree {
  display: inline-block;
  min-width: min(100%, 16rem);
  text-align: right;
  font-size: 0.86rem;
}

.here-nav__subtree .nav-tree.depth-1,
.here-nav__subtree .nav-tree.depth-2,
.here-nav__subtree .nav-tree.depth-3,
.here-nav__subtree .nav-tree.depth-4 {
  padding-left: 0;
  margin-left: 0;
  padding-right: 0.55rem;
  margin-right: 0.35rem;
  border-left: 0;
  border-right: 1px solid color-mix(in srgb, var(--contour) 55%, transparent);
}

.here-nav__subtree .nav-summary {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.here-nav__subtree .nav-summary::before {
  transform: rotate(135deg);
}

.here-nav__subtree .nav-details[open] > .nav-summary::before {
  transform: rotate(-135deg);
}

.here-nav__subtree .nav-leaf-link,
.here-nav__subtree .nav-section-link,
.here-nav__subtree .nav-folder {
  justify-content: flex-end;
}

.here-nav__subtree .nav-leaf-link,
.here-nav__subtree .nav-section-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-direction: row-reverse;
  width: 100%;
  box-sizing: border-box;
}

.here-nav__subtree a {
  text-decoration: none;
}

.content {
  flex: 1;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 46rem;
  margin-inline: auto;
  width: 100%;
}

.content-back {
  margin: 0 0 1.15rem;
}

.content-back__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--foreground-diminished);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.content-back__link:hover {
  color: var(--selected);
  text-decoration: none;
}

.content-back__chevron {
  width: 0.45rem;
  height: 0.45rem;
  flex-shrink: 0;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.85;
}

.content:has(.flow-steps) {
  max-width: min(72rem, 100%);
}

.content:has(.demo-gallery) {
  max-width: min(90rem, 100%);
}

.content:has(.section-index) {
  max-width: min(64rem, 100%);
  margin-inline: auto;
  width: 100%;
}

.content:has(.page-navigation) {
  max-width: min(72rem, 100%);
  margin-inline: auto;
  width: 100%;
}

.content:has(.page-home) {
  max-width: min(72rem, 100%);
  margin-inline: auto;
  width: 100%;
}

.page-home {
  padding: 1.5rem 0 2rem;
}

.home-hub__intro {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.home-hub__brand {
  position: relative;
  display: inline-grid;
  align-items: end;
  justify-items: end;
  margin: 0 auto 1.35rem;
}

.home-hub__search-wrap {
  position: relative;
  z-index: 2;
  width: min(36rem, 100%);
  margin: 2.75rem auto 3rem;
  text-align: left;
}

.home-hub__search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-hub__search {
  width: 100%;
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--contour);
  border-radius: 999px;
  background: color-mix(in srgb, var(--background-1) 70%, transparent);
  color: var(--foreground);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}

.home-hub__search::placeholder {
  font-weight: 500;
  color: var(--foreground-diminished);
}

.home-hub__search:focus {
  outline: 1px solid var(--selected);
  outline-offset: 2px;
}

.home-hub__results {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 0.45rem);
  z-index: 3;
  width: 60%;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  max-height: min(40vh, 18rem);
  overflow: auto;
  border: 1px solid var(--contour);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--background-1) 96%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 45%, transparent);
}

.home-hub__results[hidden] {
  display: none !important;
}

.home-hub__results li {
  min-width: 0;
}

.home-hub__results a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.5rem 0.55rem;
  border-radius: 0.4rem;
  color: var(--accent);
  text-decoration: none;
}

.home-hub__results-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hub__results a:hover,
.home-hub__results a.is-active {
  color: var(--selected);
  background: var(--accent-soft);
  text-decoration: none;
}

.home-hub__assistant {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.85rem 0.25rem 0.25rem;
  border-top: 1px solid var(--contour);
  text-align: left;
}

.home-hub__assistant[hidden] {
  display: none;
}

.home-hub__assistant-disclaimer {
  margin: 0;
  font-size: 0.78rem;
  color: var(--foreground-diminished);
}

.home-hub__assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-hub__assistant-msg {
  padding: 0.45rem 0.55rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}

.home-hub__assistant-msg--user {
  align-self: flex-end;
  background: var(--background-3);
  color: var(--selected);
}

.home-hub__assistant-msg--assistant {
  align-self: stretch;
  border-left: 2px solid var(--contour);
  color: var(--foreground);
}

.home-hub__assistant-msg--assistant a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.home-hub__assistant-msg--assistant code {
  font-size: 0.92em;
  padding: 0.05em 0.3em;
  border-radius: 0.2em;
  background: var(--background-3, rgba(0, 0, 0, 0.06));
}

.home-hub__assistant-msg--status {
  align-self: stretch;
  color: var(--muted, var(--foreground-muted, #6b7280));
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  opacity: 0.9;
}

.home-hub__assistant-citations {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.home-hub[hidden] {
  display: none !important;
}

.home-hub__logo {
  grid-area: 1 / 1;
  width: clamp(14rem, 42vw, 22rem);
  height: auto;
  filter: invert(1) drop-shadow(2px 6px 10px black);
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

html.theme-light .home-hub__logo {
  filter: none;
}

.home-hub__logo-mark {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: end;
  z-index: 1;
  margin: 0 0.15rem 0.2rem 0;
  transform: translateY(6px);
  padding: 0;
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--selected);
}

.home-hub__page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-hub__intro .lead {
  margin: 0.35rem auto 0;
  color: var(--foreground-diminished);
}

.home-hub {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.home-hub__entry--getting-started,
.home-hub__entry--examples {
  max-width: 52rem;
  width: 100%;
  justify-self: center;
}

@media (min-width: 900px) {
  .home-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-hub__entry--getting-started,
  .home-hub__entry--examples {
    grid-column: 1 / -1;
  }

  .home-hub__entry--structure,
  .home-hub__entry--guide,
  .home-hub__entry--api {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
}

.home-hub__entry {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.35rem 1.35rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--contour);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--background-1) 55%, transparent);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.home-hub__entry:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  border-color: var(--selected);
  background: color-mix(in srgb, var(--background-1) 75%, transparent);
}

.home-hub__icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  border: 0;
  border-radius: 0;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.15s ease;
}

html.theme-light .home-hub__icon {
  filter: none;
}

.home-hub__entry:hover .home-hub__icon {
  opacity: 1;
}

.home-hub__text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.home-hub__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--selected);
  line-height: 1.25;
}

.home-hub__desc {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--foreground-diminished);
}

.content:has(.page--app-gate) {
  max-width: none;
  padding: 0;
}

/* Language gate (matches marketing app-gate) */

.page--app-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 12rem);
  padding: 2rem 0 3rem;
}

.app-gate {
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
  padding: 0 1rem;
}

.app-gate .lead {
  margin: 0.85rem auto 0;
  max-width: 28rem;
}

.app-gate-choices {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

@media (min-width: 560px) {
  .app-gate-choices {
    grid-template-columns: 1fr 1fr;
  }
}

.app-gate-choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.25rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--contour);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--background-1) 55%, transparent);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.app-gate-choice-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.app-gate-choice-icon.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  border: 1px solid var(--contour);
  background: color-mix(in srgb, var(--background-3) 55%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--selected);
}

.app-gate-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.app-gate-choice:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  border-color: var(--selected);
  background: color-mix(in srgb, var(--background-1) 75%, transparent);
}

.app-gate-choice--primary {
  border-color: color-mix(in srgb, var(--selected) 55%, var(--contour));
  background: color-mix(in srgb, var(--selected) 12%, var(--background-1));
}

.app-gate-choice--primary:hover {
  border-color: var(--selected);
  background: color-mix(in srgb, var(--selected) 20%, var(--background-1));
}

.app-gate-choice-action {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--selected);
}

.app-gate-choice-hint {
  font-size: 0.9rem;
  color: var(--foreground-diminished);
}

.demo-empty {
  color: var(--foreground-diminished);
}

.demo-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin: 1.5rem 0 2.5rem;
}

.demo-shot {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--contour);
}

.demo-shot:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.demo-shot__header {
  margin-bottom: 1rem;
}

.demo-shot__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--selected);
}

.demo-shot__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--foreground-diminished);
}

.demo-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--selected);
  border: 1px solid var(--contour);
  border-radius: 999px;
  background: var(--accent-soft);
}

.demo-shot__devices {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 769px) {
  .demo-shot__devices {
    grid-template-columns: 1fr 1fr;
  }

  .demo-device--desktop {
    grid-column: 1 / -1;
    max-width: min(56rem, 100%);
    justify-self: center;
    width: 100%;
  }

  /* Phone is portrait-tall; chrome SVG is already framed (no side-bleed gutters). */
  .demo-device--phone {
    max-width: 15rem;
    justify-self: center;
    width: 100%;
  }

  .demo-device--tablet {
    max-width: min(28rem, 100%);
    justify-self: center;
    width: 100%;
  }
}

.demo-device {
  margin: 0;
  min-width: 0;
}

.demo-device__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--foreground-diminished);
}

.demo-device__json {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.demo-device__frame {
  display: block;
  text-decoration: none;
}

.demo-device__img,
.shot-annotate {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--background-2) 80%, transparent);
}

.flow-step__img.shot-annotate,
.flow-step__img {
  width: 100%;
  height: auto;
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--background-2) 80%, transparent);
}

/* Device chrome supplies bezel — drop the old card frame. */
.shot-annotate--dressed,
.shot-annotate.shot-annotate--dressed,
.flow-step__img.shot-annotate--dressed {
  border: none;
  border-radius: 0;
  background: transparent;
}

.shot-annotate__device,
.shot-annotate--dressed.shot-zoom__svg,
svg.shot-annotate--dressed {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Screenshot magnifier (click-to-zoom) */

.shot-zoom {
  position: relative;
  overflow: hidden;
}

.shot-zoom__hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  border-radius: inherit;
}

.shot-zoom.is-zoomed .shot-zoom__hit {
  cursor: zoom-out;
}

.shot-zoom__hit:focus {
  outline: none;
}

.shot-zoom__hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shot-zoom__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.shot-zoom__plate,
.shot-zoom__cutout,
.shot-zoom__cutout-loupe {
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .shot-zoom__plate,
  .shot-zoom__cutout,
  .shot-zoom__cutout-loupe {
    transition: none;
  }
}

.flow-step__annotate {
  display: block;
}

.shot-annotate-device--tablet,
.shot-annotate-device--desktop {
  display: none;
}

@media (min-width: 769px) {
  .shot-annotate-device--phone {
    display: none;
  }

  .shot-annotate-device--tablet {
    display: block;
  }

  .shot-annotate-device--desktop {
    display: none;
  }
}

@media (min-width: 1280px) {
  .shot-annotate-device--tablet {
    display: none;
  }

  .shot-annotate-device--desktop {
    display: block;
  }
}

/* Flow steps */

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 1.25rem 0 2rem;
}

.flow-step {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.flow-step__text {
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--selected);
}

.flow-step__num {
  font-weight: 700;
  color: var(--accent);
}

.flow-step__shot {
  min-width: 0;
}

.flow-step__picture {
  display: block;
}

.flow-step__img {
  width: 100%;
  height: auto;
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--background-2) 80%, transparent);
}

@media (min-width: 769px) {
  .flow-step {
    grid-template-columns: minmax(12rem, 0.9fr) minmax(0, 1.35fr);
    gap: 1.5rem;
  }

  .flow-step__text {
    padding-top: 0.35rem;
  }
}

.page-intro {
  margin-bottom: 0.5rem;
}

.page-intro h1 {
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1rem;
  color: var(--foreground-diminished);
  max-width: 36rem;
}

.kind-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--selected);
  border: 1px solid var(--contour);
  border-radius: 999px;
  background: var(--accent-soft);
}

.kind-badge.inline {
  margin-left: 0.5rem;
}

.section-index {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

.section-index > h1 {
  margin-bottom: 1.25rem;
  text-align: center;
  width: min(40rem, 100%);
}

.section-index-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(40rem, 100%);
  text-align: left;
}

.section-index-body .lead {
  margin: 0.75rem 0 1.25rem;
  text-align: center;
  max-width: none;
}

.section-index-intro {
  margin: 0.5rem 0 0.25rem;
  width: 100%;
  text-align: left;
}

/* Centered headline copy — first text paragraph only */
.section-index-intro:not(:has(> :first-child img)) > p:first-child,
.section-index-intro:has(> :first-child img) > :first-child + p {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.45;
  font-weight: 600;
  color: var(--selected);
  text-align: center;
}

.section-index-intro h2 {
  margin-top: 1.75rem;
  text-align: left;
}

.section-index-intro ol,
.section-index-intro ul {
  display: block;
  text-align: left;
  margin-inline: 0;
  max-width: 100%;
}

.section-index-intro img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--contour);
}

/* Wide: image left, prose right — block centered via parent max-width */
@media (min-width: 769px) {
  .section-index:has(.section-index-intro > :first-child img) > h1,
  .section-index-body:has(> .section-index-intro > :first-child img) {
    width: min(60rem, 100%);
  }

  .section-index-intro:has(> :first-child img) {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    column-gap: clamp(1.5rem, 3vw, 2.5rem);
    row-gap: 0.75rem;
    align-items: start;
  }

  .section-index-intro:has(> :first-child img) > :first-child {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    align-self: center;
  }

  .section-index-intro:has(> :first-child img) > :not(:first-child) {
    grid-column: 2;
  }

  .section-index-intro:has(> :first-child img) > :first-child + p {
    text-align: left;
  }
}

/* Narrow: image on top (inset from right), text below (inset from left) */
@media (max-width: 768px) {
  .section-index-intro:has(> :first-child img) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .section-index-intro:has(> :first-child img) > :first-child {
    margin: 0 12% 0 0;
  }

  .section-index-intro:has(> :first-child img) > :not(:first-child) {
    margin-left: 12%;
    margin-right: 0;
  }

  .section-index-intro:has(> :first-child img) > :first-child + p {
    text-align: left;
  }
}

.section-index-topics {
  margin-top: 2.25rem;
  text-align: left;
  width: 100%;
}

.section-index-body:has(.section-index-catalog) {
  width: min(56rem, 100%);
}

.section-index-catalog {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

.api-start-here {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.api-start-here__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--foreground-diminished);
}

.api-start-here__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.api-start-here__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--contour);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--background-3) 55%, transparent);
  color: var(--selected);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.api-start-here__chip:hover,
.api-start-here__chip.is-active {
  border-color: color-mix(in srgb, var(--contour) 35%, var(--selected));
  background: color-mix(in srgb, var(--background-3) 70%, var(--accent-soft));
}

.api-start-here__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  color: var(--selected);
  font-size: 0.75rem;
  font-weight: 700;
}

.api-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.api-tabs__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
  border-bottom: 1px solid color-mix(in srgb, var(--contour) 80%, transparent);
}

.api-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  padding: 0.65rem 0.85rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--foreground-diminished);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.api-tabs__tab:hover {
  color: var(--selected);
}

.api-tabs__tab.is-active {
  color: var(--selected);
  border-bottom-color: var(--selected);
}

.api-tabs__panel {
  padding: 0.15rem 0 0.25rem;
}

.api-tabs__panel[hidden] {
  display: none !important;
}

.api-tab-subgroups {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.api-tab-subgroup__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--foreground-diminished);
}

.section-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
}

.section-index-link {
  padding: 0;
  background: color-mix(in srgb, var(--background-3) 50%, transparent);
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  text-align: left;
  overflow: hidden;
}

.section-index-link:hover {
  border-color: color-mix(in srgb, var(--contour) 40%, var(--selected));
  background: color-mix(in srgb, var(--background-3) 70%, var(--accent-soft));
}

.section-index-link.has-children {
  padding: 0;
}

.section-index-link.has-children:hover {
  border-color: var(--contour);
  background: color-mix(in srgb, var(--background-3) 50%, transparent);
}

.section-index-details {
  margin: 0;
}

.section-index-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--selected);
  user-select: none;
}

.section-index-summary::-webkit-details-marker,
.section-index-summary::marker {
  display: none;
}

.section-index-summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex-shrink: 0;
  border-right: 2px solid color-mix(in srgb, var(--foreground-diminished) 70%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--foreground-diminished) 70%, transparent);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-right: 0.15rem;
}

.section-index-details[open] > .section-index-summary::before {
  transform: rotate(45deg);
}

.section-index-summary:hover {
  background: color-mix(in srgb, var(--background-3) 70%, var(--accent-soft));
}

.section-index-details[open] > .section-index-summary {
  border-bottom: 1px solid color-mix(in srgb, var(--contour) 70%, transparent);
}

.section-index-list--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 640px) {
  .section-index-list--cards {
    grid-template-columns: 1fr;
  }
}

.section-index-card {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
  border: 0;
}

.section-index-card--nested {
  grid-column: 1 / -1;
}

.section-index-card__link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  min-height: 3.25rem;
  background: color-mix(in srgb, var(--background-1) 55%, transparent);
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  color: var(--selected);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.section-index-card__link:hover {
  border-color: color-mix(in srgb, var(--contour) 35%, var(--selected));
  background: color-mix(in srgb, var(--background-3) 65%, var(--accent-soft));
  color: var(--selected);
  text-decoration: none;
}

.section-index-card__link:hover .section-index__icon {
  opacity: 1;
}

.section-index-card__title {
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.section-index-card__link .kind-badge {
  flex-shrink: 0;
  align-self: center;
}

.section-index__icon--lg {
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
}

.section-index-details > .section-index-list {
  padding: 0.45rem 0.55rem 0.55rem;
  gap: 0.35rem;
}

.section-index-details > .section-index-list > .section-index-link {
  background: color-mix(in srgb, var(--background-1) 40%, transparent);
}

.section-index-details > .section-index-list > .section-index-link > a {
  padding: 0.55rem 0.7rem;
}

.section-index-link.is-section > a {
  font-weight: 600;
  color: var(--selected);
}

.section-index-link > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.section-index-link > a:hover {
  color: var(--selected);
  text-decoration: none;
}

.section-index-link > a:hover .section-index__icon {
  opacity: 1;
}

.section-index-link > a .kind-badge {
  margin-left: auto;
}

/* Intro topic lists (Get Started / How to landings): whole row is the hit target */
.section-index-intro ol,
.section-index-intro ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.section-index-intro ol > li,
.section-index-intro ul > li {
  margin: 0;
  padding: 0;
  background: color-mix(in srgb, var(--background-3) 50%, transparent);
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
  overflow: hidden;
}

.section-index-intro ol > li > a,
.section-index-intro ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.section-index-intro ol > li:hover,
.section-index-intro ul > li:hover {
  border-color: color-mix(in srgb, var(--contour) 40%, var(--selected));
  background: color-mix(in srgb, var(--background-3) 70%, var(--accent-soft));
}

.section-index-intro ol > li > a:hover,
.section-index-intro ul > li > a:hover {
  color: var(--selected);
  text-decoration: none;
}

/* Article prose */

.commonly-used-with {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border, #ccc) 80%, transparent);
}

.commonly-used-with h2 {
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
}

.article > p,
.content > p {
  margin: 0.75rem 0;
}

.article ol,
.article ul,
.content ol,
.content ul {
  margin: 0.65rem 0 1rem;
  padding-left: 1.25rem;
}

.article li,
.content li {
  margin: 0.4rem 0;
}

/* Single-link list rows (e.g. “Next”): whole row is the hit target */
.article ol > li:has(> a:only-child),
.article ul > li:has(> a:only-child),
.content ol > li:has(> a:only-child),
.content ul > li:has(> a:only-child) {
  list-style: none;
  margin-left: -1.25rem;
  padding-left: 0;
}

.article ol > li:has(> a:only-child) > a,
.article ul > li:has(> a:only-child) > a,
.content ol > li:has(> a:only-child) > a,
.content ul > li:has(> a:only-child) > a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: calc(100% + 1.25rem);
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  margin: 0.15rem 0;
  border-radius: 0.4rem;
  text-decoration: none;
}

.article ol > li:has(> a:only-child) > a:hover,
.article ul > li:has(> a:only-child) > a:hover,
.content ol > li:has(> a:only-child) > a:hover,
.content ul > li:has(> a:only-child) > a:hover {
  background: color-mix(in srgb, var(--background-3) 70%, var(--accent-soft));
  text-decoration: none;
}

/* Cross-spine links (How to ↔ API ↔ Examples, …) — stay inline so they share the text line */
a.cross-nav-link {
  display: inline;
  white-space: nowrap;
}

/* Beat `img { height: auto; display: block }` and `.section-index-intro img { width: 100% }` */
.article img.cross-nav-link__icon,
.content img.cross-nav-link__icon,
.section-index-intro img.cross-nav-link__icon,
img.cross-nav-link__icon {
  width: 0.95rem;
  height: 0.95rem;
  max-width: 0.95rem;
  max-height: 0.95rem;
  margin: 0 0.28em 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: inline-block;
  vertical-align: -0.2em;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

html.theme-light .article img.cross-nav-link__icon,
html.theme-light .content img.cross-nav-link__icon,
html.theme-light .section-index-intro img.cross-nav-link__icon,
html.theme-light img.cross-nav-link__icon {
  filter: none;
}

.article li img:not(.section-index__icon):not(.nav-tree__icon):not(.main-nav__icon):not(.here-nav__icon):not(.cross-nav-link__icon),
.content li img:not(.section-index__icon):not(.nav-tree__icon):not(.main-nav__icon):not(.here-nav__icon):not(.cross-nav-link__icon) {
  margin: 0.6rem 0;
  border: 1px solid var(--contour);
  border-radius: 0.5rem;
}

.article code,
.content code {
  padding: 0.1rem 0.3rem;
  font-size: 0.88em;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--background-3) 75%, transparent);
  border: 1px solid var(--contour);
  color: var(--selected);
}

.article pre,
.content pre {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  overflow: auto;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--background-3) 35%, transparent);
  border: 1px solid var(--contour);
}

.article pre code,
.content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
}

.article blockquote,
.content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--contour);
  color: var(--foreground-diminished);
}

.article table,
.content table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.article th,
.article td,
.content th,
.content td {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--contour);
  text-align: left;
}

.article th,
.content th {
  background: color-mix(in srgb, var(--background-3) 65%, transparent);
  color: var(--selected);
}

.article hr,
.content hr {
  margin: 1.75rem 0;
  border: 0;
  border-top: 1px solid var(--contour);
}

/* Footer (marketing chrome) */

.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--contour);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem 0 2rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-left: auto;
  text-align: right;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--foreground-diminished);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-brand a {
  text-decoration: none;
  line-height: 0;
}

.footer-brand img {
  width: 8.5rem;
  margin-bottom: 1rem;
  filter: invert(1);
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

html.theme-light .footer-brand img {
  filter: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.233s ease;
}

.theme-toggle:hover {
  color: var(--selected);
  transform: scale(1.08);
}

.theme-toggle:hover .theme-toggle__icon {
  opacity: 1;
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: filter 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.15s ease;
}

html.theme-light .theme-toggle__icon {
  filter: none;
}

.theme-toggle__icon--sun {
  display: none;
}

html.theme-light .theme-toggle__icon--moon {
  display: none;
}

html.theme-light .theme-toggle__icon--sun {
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */

@media (min-width: 481px) and (max-width: 1024px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .header-actions {
    grid-column: 3;
  }

  .main-nav {
    grid-column: 2;
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .nav-tree-page .nav-tree.depth-0 {
    grid-template-columns: 1fr;
  }

  .docs-main {
    min-height: 0;
  }

  body.has-here-nav .site-header .main-nav {
    display: none;
  }

  body.has-here-nav .here-nav__main {
    display: flex;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 6.5rem;
  }

  body.has-here-nav {
    --header-height: 4.5rem;
  }

  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.35rem;
    padding-top: 0.75rem;
    padding-bottom: 0;
  }

  body.has-here-nav .header-inner {
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    gap: 0.75rem;
    padding-top: 0.65rem;
  }

  .logo-link {
    grid-column: 1;
    justify-self: center;
  }

  body.has-here-nav .logo-link {
    justify-self: start;
  }

  .header-actions {
    display: flex;
    grid-column: 1;
    justify-self: center;
    order: 3;
  }

  body.has-here-nav .header-actions {
    grid-column: 3;
    justify-self: end;
    order: 0;
  }

  .header-cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }

  .main-nav {
    position: static;
    grid-column: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: min(100%, 22rem);
    min-width: 0;
    padding: 0;
    order: 2;
  }

  .main-nav a {
    flex: 1 1 0;
    text-align: center;
  }

  .footer-main {
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
  }

  .footer-meta {
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

