/* =====================================================================
   Devexana Docs. Layered on styles.css: every color is a :root token or a
   color-mix of tokens. No new hex literal, no inline style.

   Shape language matches the marketing chrome (floating pill header,
   --radius / --radius-lg, soft layered shadows): surfaces are separated
   by a faint shadow ring and spacing, not by solid 1px rules.
   Motion: ease-out, under 300ms, transform and opacity (plus the
   accordion height), gated for reduced motion and for touch hover.
   ===================================================================== */

.docs-page {
  /* radius scale: control, row, surface, large surface */
  --docs-r-sm: 8px;
  --docs-r-md: 12px;
  --docs-r: var(--radius);
  --docs-r-lg: var(--radius-lg);
  /* motion: strong ease-out for UI; press feedback 160ms, open/close 200ms */
  --docs-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --docs-press: 160ms;
  --docs-open: 200ms;
  /* surfaces: a semi-transparent ring plus a soft drop, never a solid border */
  --docs-ring: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  --docs-raise: var(--docs-ring),
                0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent),
                0 6px 16px -8px color-mix(in srgb, var(--ink) 10%, transparent);
  --docs-sep: color-mix(in srgb, var(--line) 75%, transparent);
  --docs-hover: color-mix(in srgb, var(--ink) 4%, transparent);
  --docs-hover-card: color-mix(in srgb, var(--accent) 4%, var(--card));
  --docs-quiet: color-mix(in srgb, var(--ink) 2.5%, var(--ground));

  background: var(--ground); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.docs-main { padding-top: var(--header-h); }

/* content stays clear of the notch and rounded corners in landscape (viewport-fit=cover) */
.docs-page .shell {
  width: min(100% - 2 * max(var(--gutter), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)), 1240px);
}
.docs-page > .page-brand { left: max(var(--gutter), env(safe-area-inset-left, 0px)); }

/* pressables: the browser tap flash is off, so each one carries its own pressed state */
.docs-nav-section > summary, details.docs-toc > summary, .docs-nav-toggle,
.docs-related li a, .docs-pager a, .docs-index li a, .docs-path a, .docs-nav-section li a, .docs-results li a {
  touch-action: manipulation;
}

/* ---------------------------------------------------------------- layout */
.docs-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(28px, 4vw, 56px) clamp(56px, 6vw, 96px);
  align-items: start;
}
.docs-article { min-width: 0; max-width: 46rem; }

/* ---------------------------------------------------------------- side nav */
.docs-nav {
  position: sticky; top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  max-height: calc(100dvh - var(--header-h) - 40px);
  overflow: auto; overscroll-behavior: contain;
  font-size: var(--t-sm);
  margin-inline: -6px; padding: 2px 6px 16px;
  scrollbar-width: thin;
}
.docs-nav-section { margin: 0 0 2px; }
.docs-nav-section > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 38px; padding: 6px 10px; border-radius: var(--docs-r-sm);
  font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.01em; color: var(--ink);
  cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none;
  transition: background-color 150ms ease;
}
.docs-nav-section > summary::-webkit-details-marker { display: none; }
.docs-nav-section > summary::after,
details.docs-toc > summary::after {
  content: ""; width: 6px; height: 6px; flex: none; margin-right: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--docs-open) var(--docs-ease-out);
}
.docs-nav-section[open] > summary::after,
details.docs-toc[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.docs-nav-section > summary:active { background: var(--docs-hover); }
.docs-nav-section > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.docs-nav-section ul { list-style: none; margin: 2px 0 10px; padding: 0 0 0 8px; }
.docs-nav-section li a {
  display: block; padding: 6px 10px; border-radius: var(--docs-r-sm);
  color: var(--muted); text-decoration: none; line-height: 1.35;
  transition: background-color 150ms ease, color 150ms ease;
}
.docs-nav-section li a:active { background: var(--docs-hover); }
.docs-nav-section li a:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.docs-nav-section li a[aria-current="page"] {
  color: var(--accent-deep); font-weight: 600;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ---------------------------------------------------------------- search */
.docs-search { position: relative; margin-bottom: 18px; }
.docs-search label { display: block; font: 600 var(--t-xs)/1.3 var(--display); color: var(--ink); margin: 0 0 8px 2px; }
.docs-search input {
  width: 100%;
  font: 1rem/1.4 var(--body); /* 16px: iOS does not zoom into the field */
  color: var(--ink); background: var(--card);
  border: 0; border-radius: var(--docs-r-md); padding: 10px 13px;
  box-shadow: var(--docs-raise);
}
.docs-search input::placeholder { color: var(--muted); }
.docs-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-results {
  position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 8px 0 0; padding: 6px;
  list-style: none; background: var(--card); border: 0; border-radius: var(--docs-r);
  box-shadow: var(--docs-ring), var(--shadow-lift);
  max-height: 60vh; max-height: 60dvh; overflow: auto; overscroll-behavior: contain;
}
.docs-results li a {
  display: block; padding: 9px 11px; border-radius: var(--docs-r-sm);
  color: var(--ink); text-decoration: none; transition: background-color 150ms ease;
}
.docs-results li a:focus-visible, .docs-results li a:active { background: var(--tint); outline: none; }
.docs-results li a span { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.docs-results li.docs-no-result { padding: 9px 11px; color: var(--muted); }

/* ---------------------------------------------------------------- article */
.docs-crumbs { font-size: var(--t-xs); color: var(--muted); margin: 0 0 14px; display: flex; gap: 8px; }
.docs-crumbs a { color: var(--muted); text-decoration: none; border-radius: 4px; transition: color 150ms ease; }
.docs-article h1 { font: 600 var(--t-2xl)/1.12 var(--display); letter-spacing: -0.02em; margin: 0 0 14px; }
.docs-lead { font-size: var(--t-md); line-height: 1.55; color: var(--ink-2); margin: 0 0 26px; max-width: 40rem; }

.docs-body { font: var(--t-base)/1.65 var(--body); color: var(--ink-2); }
.docs-body > * + * { margin-top: 1em; }
.docs-body h2 {
  font: 600 var(--t-xl)/1.2 var(--display); color: var(--ink); letter-spacing: -0.015em;
  margin: 2.6em 0 0.4em; scroll-margin-top: calc(var(--header-h) + 16px);
}
.docs-body h3 { font: 600 var(--t-lg)/1.3 var(--display); color: var(--ink); letter-spacing: -0.01em; margin: 1.8em 0 0.3em; scroll-margin-top: calc(var(--header-h) + 16px); }
.docs-body h4 { font: 600 var(--t-md)/1.35 var(--display); color: var(--ink); margin: 1.4em 0 0.2em; }
.docs-body p { margin: 0.8em 0 0; }
.docs-body a { color: var(--accent-deep); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; transition: text-decoration-color 150ms ease; }
.docs-body strong { color: var(--ink); font-weight: 650; }
.docs-body ul, .docs-body ol { padding-left: 1.3em; margin: 0.8em 0 0; }
.docs-body li { margin: 0.35em 0; }
.docs-body li > ul, .docs-body li > ol { margin-top: 0.3em; }
.docs-body ol > li::marker { font-weight: 600; color: var(--accent-deep); }
.docs-body code { font: 0.9em/1.4 var(--mono); background: var(--tint); color: var(--ink); padding: 0.1em 0.38em; border-radius: 6px; }
.docs-body pre.code { background: var(--dark); color: var(--on-dark); padding: 16px 18px; border-radius: var(--docs-r-md); overflow: auto; font: var(--t-sm)/1.55 var(--mono); }
.docs-body pre.code code { background: none; color: inherit; padding: 0; }
.docs-body hr { border: 0; height: 1px; background: var(--docs-sep); margin: 2.4em 0; }
.docs-body blockquote { margin: 1.2em 0 0; padding: 2px 0 2px 18px; box-shadow: inset 2px 0 0 var(--accent-soft); color: var(--ink-2); }

/* figures: diagrams and screenshots, rounded and lifted off the page */
.docs-body figure { margin: 1.8em 0 0.4em; }
.docs-figure-link { display: block; border-radius: var(--docs-r); cursor: zoom-in; }
.docs-figure-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.docs-body figure img {
  display: block; width: 100%; height: auto; background: var(--card);
  border: 0; border-radius: var(--docs-r);
  box-shadow: var(--docs-ring),
              0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent),
              0 14px 34px -14px color-mix(in srgb, var(--ink) 16%, transparent);
}
.docs-body figcaption { font-size: var(--t-xs); color: var(--muted); margin: 12px 2px 0; line-height: 1.45; }
.docs-figure-full { white-space: nowrap; color: var(--muted); }

/* tables: one rounded surface, soft header, quiet row separators */
.table-wrap {
  overflow-x: auto; overscroll-behavior-x: contain;
  margin: 1.4em 0 0; background: var(--card);
  border: 0; border-radius: var(--docs-r); box-shadow: var(--docs-raise);
}
.docs-body table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); line-height: 1.5; }
.docs-body th, .docs-body td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--docs-sep); }
.docs-body thead th {
  font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.02em; color: var(--muted);
  background: var(--docs-quiet); padding-block: 11px;
}
.docs-body tbody th { font-weight: 600; color: var(--ink); }
.docs-body tbody tr:last-child > * { border-bottom: 0; }
@media (min-width: 641px) {
  .docs-body tbody th[scope="row"] { width: 28%; }
  .docs-body td code, .docs-body th code { white-space: nowrap; }
}

/* callouts: tinted rounded surfaces with a small leading mark, no heavy bar */
.callout {
  margin: 1.5em 0 0; padding: 16px 20px 18px;
  border: 0; border-radius: var(--docs-r);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.callout > p:first-of-type { margin-top: 6px; }
.callout-title {
  display: flex; align-items: center; gap: 9px; margin: 0;
  font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-deep);
}
.callout-title::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.callout-important { background: var(--tint-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }
.callout-steps { background: var(--card); box-shadow: var(--docs-raise); }
.callout-steps .callout-title::before { border-radius: 2px; }
.callout-limit, .callout-caution {
  background: color-mix(in srgb, var(--ink) 4.5%, var(--ground));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.callout-limit .callout-title, .callout-caution .callout-title { color: var(--ink); }
.callout-limit .callout-title::before { border-radius: 1px; }
.callout-caution .callout-title::before { border-radius: 1px; transform: rotate(45deg); }
.callout ul, .callout ol { margin-top: 0.5em; }

/* availability: plain labels with a leading mark, on one quiet surface */
.availability {
  margin: 0 0 18px; padding: 14px 18px; display: grid; gap: 8px;
  background: var(--card); border: 0; border-radius: var(--docs-r); box-shadow: var(--docs-raise);
}
.availability-row { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 12px; font-size: var(--t-sm); line-height: 1.45; }
.availability dt { font-weight: 650; color: var(--ink); display: flex; gap: 9px; align-items: baseline; }
.availability dt::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 3px; transform: translateY(1px); background: var(--muted); }
.availability-production dt::before { background: var(--accent-deep); }
.availability-available dt::before { background: var(--accent); }
.availability-off dt::before { background: transparent; border: 2px solid var(--muted); }
.availability-development dt::before { background: transparent; border: 2px dashed var(--muted); }
.availability dd { margin: 0; color: var(--ink-2); }

/* on this page: a folding, quietly tinted panel */
details.docs-toc { margin: 0 0 30px; padding: 2px 8px; background: var(--docs-quiet); border: 0; border-radius: var(--docs-r); }
details.docs-toc > summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px;
  font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
  cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; border-radius: var(--docs-r-sm);
}
details.docs-toc > summary::-webkit-details-marker { display: none; }
details.docs-toc > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
details.docs-toc > ul { margin: 0; padding: 0 0 12px; list-style: none; columns: 2 16rem; column-gap: 12px; font-size: var(--t-sm); }
details.docs-toc li { margin: 0; padding: 0; break-inside: avoid; }
details.docs-toc a {
  display: block; padding: 5px 10px; border-radius: var(--docs-r-sm);
  color: var(--ink-2); text-decoration: none; transition: background-color 150ms ease, color 150ms ease;
}
details.docs-toc a:active { background: var(--docs-hover); }

/* accordion motion for the sidebar sections and the contents panel: height and opacity,
   200ms ease-out. Browsers without ::details-content (or without interpolate-size) open
   instantly, which is the correct fallback. Enabled after first paint so the initial
   open/closed state never animates. */
@supports selector(::details-content) {
  .docs-nav-section, details.docs-toc { interpolate-size: allow-keywords; }
  .docs-nav-section::details-content, details.docs-toc::details-content { block-size: 0; overflow-y: clip; opacity: 0; }
  .docs-nav-section[open]::details-content, details.docs-toc[open]::details-content { block-size: auto; opacity: 1; }
  .docs-ready .docs-nav-section::details-content, .docs-ready details.docs-toc::details-content {
    transition: block-size var(--docs-open) var(--docs-ease-out), opacity var(--docs-open) var(--docs-ease-out),
                content-visibility var(--docs-open) allow-discrete;
  }
}

/* ---------------------------------------------------------------- pressable cards
   Related pages, pager, section index rows and home question cards. The whole surface is the
   link target (stretched ::after), it tints on hover, and it gives under the finger on press. */
.docs-related li, .docs-pager a, .docs-index li, .docs-path {
  position: relative;
  transition: transform var(--docs-press) var(--docs-ease-out), background-color 150ms ease;
}
.docs-related li a::after, .docs-index li a::after, .docs-path a::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
}
.docs-related li a:focus-visible, .docs-index li a:focus-visible, .docs-path a:focus-visible { outline: none; }
.docs-related li:has(a:focus-visible), .docs-index li:has(a:focus-visible), .docs-path:has(a:focus-visible),
.docs-pager a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-related li:has(a:active), .docs-index li:has(a:active), .docs-path:has(a:active), .docs-pager a:active { transform: scale(0.98); }

/* related pages */
.docs-related { margin-top: 56px; padding: 0; border: 0; }
.docs-related h2 { font: 600 var(--t-lg)/1.3 var(--display); letter-spacing: -0.01em; margin: 0 0 14px; }
.docs-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 12px; }
.docs-related li { padding: 14px 16px 15px; background: var(--card); border: 0; border-radius: var(--docs-r); box-shadow: var(--docs-raise); }
.docs-related li a { font-weight: 650; color: var(--ink); text-decoration: none; transition: color 150ms ease; }
.docs-related li span { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 4px; line-height: 1.45; }

/* pager */
.docs-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.docs-pager a {
  flex: 1 1 0; max-width: 50%; padding: 14px 18px 15px;
  background: var(--card); border: 0; border-radius: var(--docs-r); box-shadow: var(--docs-raise);
  color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35;
}
.docs-pager a span { display: block; margin-bottom: 3px; font: 500 var(--t-xs)/1.3 var(--body); color: var(--muted); }
.docs-prev span::before { content: "\2190\00a0"; }
.docs-next span::after { content: "\00a0\2192"; }
.docs-next { text-align: right; margin-left: auto; }
.docs-stamp { margin-top: 32px; font-size: var(--t-xs); color: var(--muted); }
.docs-stamp a { color: var(--muted); }

/* section index: one surface, rows separated by space and a hover tint */
.docs-index {
  list-style: none; margin: 10px 0 0; padding: 6px; counter-reset: idx;
  background: var(--card); border-radius: var(--docs-r-lg); box-shadow: var(--docs-raise);
}
.docs-index li {
  padding: 14px 14px 15px; border: 0; border-radius: calc(var(--docs-r-lg) - 6px);
  counter-increment: idx; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: 8px;
}
.docs-index li::before { content: counter(idx, decimal-leading-zero); grid-row: span 2; font: 600 var(--t-sm)/1.6 var(--display); color: var(--accent-deep); }
.docs-index li a { font: 600 var(--t-md)/1.35 var(--display); color: var(--ink); text-decoration: none; transition: color 150ms ease; }
.docs-index li span { color: var(--muted); font-size: var(--t-sm); line-height: 1.5; margin-top: 2px; }

/* ---------------------------------------------------------------- docs home */
.docs-home { padding-top: 0; }
.docs-hero { background: var(--dark); color: var(--on-dark); padding: calc(var(--header-h) + clamp(40px, 6vw, 84px)) 0 clamp(44px, 6vw, 84px); }
.docs-kicker { font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); margin: 0 0 14px; }
.docs-hero h1 { font: 600 var(--t-hero)/1.05 var(--display); letter-spacing: -0.025em; margin: 0 0 18px; max-width: 18ch; }
.docs-hero .docs-lead { color: var(--on-dark-muted); max-width: 44rem; }
.docs-search-hero { max-width: 34rem; margin-top: 28px; }
.docs-search-hero label { color: var(--on-dark-muted); }
.docs-search-hero input {
  background: var(--glass-dark); color: var(--on-dark);
  box-shadow: 0 0 0 1px var(--rule-dark), inset 0 1px 0 color-mix(in srgb, var(--card) 6%, transparent);
  border-radius: var(--docs-r); padding: 14px 16px; font-size: var(--t-base);
}
.docs-search-hero input::placeholder { color: var(--on-dark-faint); }
.docs-home-body { padding-block: clamp(40px, 5vw, 72px) clamp(56px, 6vw, 96px); }
.docs-home-body > h2 { font: 600 var(--t-xl)/1.2 var(--display); letter-spacing: -0.015em; margin: 0; }

/* home "start with the question you have": h3 + p pairs grouped into cards by the build */
.docs-paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 12px; margin-top: 18px; }
.docs-path { padding: 18px 20px 19px; background: var(--card); border-radius: var(--docs-r); box-shadow: var(--docs-raise); }
.docs-path h3 { margin: 0 0 6px; font: 600 var(--t-md)/1.3 var(--display); letter-spacing: -0.005em; }
.docs-path h3 a { color: var(--ink); text-decoration: none; transition: color 150ms ease; }
.docs-path p { margin: 0; color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }

/* home section cards */
.docs-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 14px; margin-top: 56px; }
.docs-section-card {
  padding: 22px 16px 16px; border: 0; border-radius: var(--docs-r-lg);
  background: color-mix(in srgb, var(--ink) 3%, var(--ground));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 4%, transparent);
}
.docs-section-card h2 { font: 600 var(--t-lg)/1.25 var(--display); letter-spacing: -0.01em; margin: 0 6px 6px; }
.docs-section-card h2 a { color: var(--ink); text-decoration: none; border-radius: 4px; transition: color 150ms ease; }
.docs-section-card p { color: var(--muted); font-size: var(--t-sm); line-height: 1.5; margin: 0 6px 12px; }
.docs-section-card ul { list-style: none; padding: 0; margin: 0; font-size: var(--t-sm); }
.docs-section-card li { margin: 0; }
.docs-section-card li a {
  display: block; padding: 5px 6px; border-radius: var(--docs-r-sm);
  color: var(--ink-2); text-decoration: none; transition: background-color 150ms ease, color 150ms ease;
}
.docs-section-card li a:active { background: var(--docs-hover); }

/* the split brand reads on the dark docs hero, as on the marketing heroes */
.site-shell:has(.docs-hero) > .page-brand { color: var(--on-dark); }

/* ---------------------------------------------------------------- hover (precise pointers only;
   a tap must never leave a stuck hover) */
@media (hover: hover) and (pointer: fine) {
  .docs-nav-section > summary:hover { background: var(--docs-hover); }
  .docs-nav-section li a:hover { color: var(--ink); background: var(--docs-hover); }
  .docs-nav-section li a[aria-current="page"]:hover { color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 13%, var(--card)); }
  details.docs-toc > summary:hover { color: var(--ink); }
  details.docs-toc a:hover { color: var(--accent-deep); background: var(--docs-hover); }
  .docs-search input:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
  .docs-search-hero input:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--card) 26%, transparent); }
  .docs-results li a:hover { background: var(--tint); }
  .docs-crumbs a:hover { color: var(--accent-deep); }
  .docs-body a:hover { text-decoration-color: var(--accent-deep); }
  .docs-related li:hover, .docs-pager a:hover, .docs-path:hover { background: var(--docs-hover-card); }
  .docs-related li:hover a, .docs-path:hover h3 a, .docs-pager a:hover { color: var(--accent-deep); }
  .docs-index li:hover { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
  .docs-index li:hover a { color: var(--accent-deep); }
  .docs-section-card h2 a:hover { color: var(--accent-deep); }
  .docs-section-card li a:hover { color: var(--accent-deep); background: var(--docs-hover); }
}

/* ---------------------------------------------------------------- small screens */
.docs-nav-toggle { display: none; }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; max-height: none; overflow: visible; margin: 0; padding: 0; }
  .docs-nav:not(.is-expanded) .docs-nav-section { display: none; }
  .docs-nav.is-expanded { padding-bottom: 20px; }
  .docs-search { margin-bottom: 12px; }
  .docs-nav-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 48px; margin: 0 0 24px; padding: 0 16px;
    font: 600 var(--t-sm)/1.3 var(--display); color: var(--ink);
    background: var(--card); border: 0; border-radius: var(--docs-r-md); box-shadow: var(--docs-raise);
    cursor: pointer; user-select: none; -webkit-user-select: none;
    transition: transform var(--docs-press) var(--docs-ease-out);
  }
  .docs-nav-toggle::after {
    content: ""; width: 7px; height: 7px; flex: none; margin-right: 2px;
    border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--docs-open) var(--docs-ease-out);
  }
  .docs-nav-toggle[aria-expanded="true"] { margin-bottom: 12px; }
  .docs-nav-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
  .docs-nav-toggle:active { transform: scale(0.98); }
  .docs-nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .docs-crumbs { margin-top: 0; }
  .docs-toc ul, details.docs-toc > ul { columns: 1; }
  .docs-pager { flex-direction: column; }
  .docs-pager a { max-width: none; }
}

/* phones: each table row becomes a labelled block inside the same rounded surface */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; }
  .docs-body table, .docs-body tbody, .docs-body tr, .docs-body th, .docs-body td { display: block; width: 100%; }
  .docs-body thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .docs-body tbody tr { padding: 12px 16px 13px; border-top: 1px solid var(--docs-sep); }
  .docs-body tbody tr:first-child { border-top: 0; }
  .docs-body tbody th, .docs-body tbody td { border: 0; padding: 3px 0; }
  .docs-body tbody th { font-size: var(--t-base); }
  .docs-body tbody td::before { content: attr(data-label); display: block; font: 600 var(--t-xs)/1.3 var(--display); letter-spacing: 0.02em; color: var(--muted); margin-bottom: 2px; }
  .availability-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .availability { padding: 14px 16px; }
  .callout { padding: 14px 16px 16px; }
  .docs-related ul { gap: 10px; }
  .docs-related li { padding: 12px 14px 13px; }
}

/* wide diagram: keep labels readable on phones by scrolling inside the article */
@media (max-width: 760px) {
  .docs-figure-link:has(img[src$="install-update.png"]) {
    overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; -webkit-overflow-scrolling: touch;
    padding: 1px 1px 14px; cursor: auto;
  }
  .docs-figure-link img[src$="install-update.png"] { min-width: 736px; max-width: none; }
}

/* ---------------------------------------------------------------- reduced motion
   Fewer and gentler: no scale, no height growth, no chevron swing; opacity fades stay. */
@media (prefers-reduced-motion: reduce) {
  .docs-related li, .docs-pager a, .docs-index li, .docs-path, .docs-nav-toggle { transition: background-color 150ms ease; }
  .docs-related li:has(a:active), .docs-index li:has(a:active), .docs-path:has(a:active),
  .docs-pager a:active, .docs-nav-toggle:active { transform: none; }
  .docs-nav-section > summary::after, details.docs-toc > summary::after, .docs-nav-toggle::after { transition: none; }
  .docs-ready .docs-nav-section::details-content, .docs-ready details.docs-toc::details-content {
    transition: opacity var(--docs-open) ease, content-visibility var(--docs-open) allow-discrete;
  }
}

/* ---------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .docs-nav, .docs-pager, .docs-related { display: none; }
  .docs-main { padding-top: 0; }
  .docs-layout { display: block; }
  .table-wrap, .callout, .availability, details.docs-toc, .docs-index, .docs-body figure img {
    box-shadow: none; border: 1px solid var(--line);
  }
}
