/*
 * wiki/site/assets/wiki.css
 *
 * True Robotics Design Playground Help. Brand from src/theme.ts: purple #6a1b9a bar,
 * Gagalin headings, Roboto body, lavender tints, black outlined rounded
 * cards. Self-hosted fonts only. Light theme, like the app.
 */

@font-face {
  font-family: "Gagalin";
  src: url("fonts/Gagalin-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* A local Arial sized to match Roboto's metrics, shown for the moment before
   Roboto arrives, so lines wrap the same way and nothing jumps. */
@font-face {
  font-family: "Roboto Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
  size-adjust: 100.3%;
  ascent-override: 92.49%;
  descent-override: 24.34%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Medium-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #6a1b9a;
  --purple-dark: #4a148c;
  --purple-deep: #38106b;
  --purple-light: #8e24aa;
  --lavender: #f4eef9;
  --lavender-2: #ebe1f4;
  --lavender-line: #d9c4ea;
  --orange: #fb9637;
  --orange-tint: #fff4e8;
  --ink: #1d1d1f;
  --text: #2b2a30;
  --muted: #5f6368;
  --line: #e6e0ec;
  --bg: #faf8fc;
  --surface: #ffffff;
  --bar-h: 60px;
  --nav-w: 280px;
  --toc-w: 232px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(56, 16, 107, 0.06), 0 4px 16px rgba(56, 16, 107, 0.06);
  --font-body: "Roboto", "Roboto Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Gagalin", "Roboto", "Roboto Fallback", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
video,
svg {
  max-width: 100%;
}

a {
  color: var(--purple);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--purple-dark);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon,
.glyph {
  flex: none;
  vertical-align: middle;
}

/* ---- Top bar --------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  --tr-accent: #f3d9ff;
}

.topbar :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--purple-dark);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 10px 4px 4px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.brand .logo {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand-title {
  font: 400 1.5rem/1 var(--font-display);
  letter-spacing: 0.02em;
}
/* The full name on two lines ("True Robotics" over "Design Playground Help"), so it fits beside the search. */
.bt-long {
  display: inline-flex;
  flex-direction: column;
  font-size: 0.8em;
  line-height: 1.08;
}
.bt-short {
  display: none;
}

.menu-btn,
.search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.menu-btn:hover,
.search-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 440px;
  margin-left: auto;
}
.search[hidden] {
  display: none;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 400 15px/1 var(--font-body);
  transition: background 0.15s, border-color 0.15s;
}
.search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}
.search input:focus {
  outline: none;
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.search input:focus::placeholder {
  color: var(--muted);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 11px;
  display: flex;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.search:focus-within .search-icon {
  color: var(--purple);
}
.search-key {
  position: absolute;
  right: 10px;
  top: 9px;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  color: #fff;
  font: 500 12px/18px var(--font-body);
  text-align: center;
  background: transparent;
}
.search:focus-within .search-key {
  display: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: min(70vh, 520px);
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
  box-shadow: 0 12px 40px rgba(29, 29, 31, 0.22);
}
.search-results[hidden] {
  display: none;
}
.search-results li {
  margin: 0;
}
.search-results a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.search-results a .sr-title {
  display: block;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}
.search-results a .sr-where {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.search-results mark {
  background: #f3e5ff;
  color: inherit;
  border-radius: 2px;
}
.search-results [aria-selected="true"] a,
.search-results a:hover {
  background: var(--lavender);
}
.search-results .sr-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 15px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--purple-dark);
  font: 700 15px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.12s, box-shadow 0.12s;
  --tr-accent: var(--orange);
}
.cta:hover {
  color: var(--purple-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.search[hidden] + .search-toggle + .cta {
  margin-left: auto;
}
.cta-short {
  display: none;
}

/* ---- Layout ---------------------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--bar-h));
}
.shell:has(.toc) {
  grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--toc-w);
}

main {
  min-width: 0;
  padding: 28px clamp(20px, 4vw, 56px) 72px;
}
main:focus {
  outline: none;
}

.doc {
  max-width: 800px;
  margin: 0 auto;
}

/* ---- Side navigation ------------------------------------------------------------------- */

.sidenav {
  position: sticky;
  top: var(--bar-h);
  align-self: start;
  height: calc(100vh - var(--bar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 14px 40px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--lavender-line) transparent;
}
.sidenav-top {
  display: none;
}
.nav-group + .nav-group {
  margin-top: 18px;
}
.nav-heading {
  margin: 0 0 6px;
  padding: 0 12px;
  color: var(--purple-dark);
  font: 700 12px/1.4 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidenav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidenav li a {
  position: relative;
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}
.sidenav li.child a {
  margin-left: 12px;
  padding-left: 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: inset 1px 0 0 var(--line);
  font-size: 14.5px;
}
.sidenav li a:hover {
  background: var(--lavender);
  color: var(--purple-dark);
}
.sidenav li.active a {
  background: var(--lavender);
  color: var(--purple);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--purple);
}
.nav-extra {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.scrim {
  display: none;
}

/* ---- On this page ---------------------------------------------------------------------- */

.toc {
  position: sticky;
  top: var(--bar-h);
  align-self: start;
  max-height: calc(100vh - var(--bar-h));
  overflow-y: auto;
  padding: 32px 20px 32px 4px;
}
.toc-title {
  margin: 0 0 8px;
  color: var(--ink);
  font: 700 13px/1.4 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}
.toc a {
  display: block;
  margin-left: -2px;
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.toc a:hover {
  color: var(--purple);
}
.toc a.is-current {
  border-left-color: var(--purple);
  color: var(--purple);
  font-weight: 500;
}

/* ---- Article head ---------------------------------------------------------------------- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumbs li {
  display: flex;
  align-items: center;
}
.breadcrumbs li + li::before {
  content: "\203A";
  margin: 0 8px;
  color: #a39fae;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--purple);
  text-decoration: underline;
}
.breadcrumbs [aria-current] {
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--purple);
  font: 700 13px/1.4 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.015em;
  color: var(--purple);
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
  line-height: 1.1;
}
h2 {
  margin: 48px 0 14px;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.7rem);
  line-height: 1.2;
}
h3 {
  margin: 32px 0 8px;
  color: var(--ink);
  font: 700 1.15rem/1.35 var(--font-body);
}
h2,
h3 {
  position: relative;
}
.anchor {
  margin-left: 10px;
  color: var(--purple);
  font: 500 0.8em var(--font-body);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.12s;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}
.anchor:hover {
  color: var(--purple);
}

.direct-answer {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.6;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.page-meta li {
  display: inline-block;
}
.page-meta .glyph {
  margin-right: 6px;
}

.doc-head {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

/* Home hero */
.home .doc-head {
  position: relative;
  padding: 36px 36px 30px;
  margin: 0 0 28px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 12%, rgba(251, 150, 55, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, var(--lavender) 100%);
  overflow: hidden;
}
.home h1 {
  max-width: 22ch;
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.1rem);
}
.home .direct-answer {
  max-width: 62ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  font: 700 16px/1 var(--font-body);
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 0 var(--purple-deep);
  --tr-accent: #f3d9ff;
}
.btn-primary:hover {
  background: var(--purple-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  border: 2px solid var(--purple);
  background: #fff;
  color: var(--purple);
}
.btn-secondary:hover {
  background: var(--lavender);
  color: var(--purple-dark);
}

/* ---- Body copy ------------------------------------------------------------------------- */

.doc-body > :first-child {
  margin-top: 0;
}
.doc-body p,
.doc-body .list {
  margin: 0 0 16px;
}
.doc-body .list {
  padding-left: 1.4em;
}
.doc-body .list li {
  margin: 0 0 8px;
  padding-left: 4px;
}
.doc-body .list li::marker {
  color: var(--purple);
}
strong {
  color: var(--ink);
  font-weight: 700;
}

code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f2f8;
  color: var(--ink);
  font: 500 0.88em/1.4 var(--font-mono);
  white-space: nowrap;
}

kbd {
  display: inline-block;
  min-width: 1.75em;
  padding: 0 6px;
  border: 1px solid var(--lavender-line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--lavender);
  color: var(--purple-dark);
  font: 700 0.84em/1.55 var(--font-body);
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
}
kbd.combo {
  font: inherit;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}
kbd.combo .plus {
  margin: 0 2px;
  color: var(--muted);
  font-weight: 500;
}

/* ---- Figures --------------------------------------------------------------------------- */

figure {
  margin: 24px 0 28px;
}
figure img,
figure video,
.media-missing {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
figure.small img,
figure.small .media-missing {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
figure.tall img,
figure.tall video,
figure.tall .media-missing {
  width: auto;
  max-width: min(100%, 390px);
  max-height: 80vh;
  margin: 0 auto;
}
figure.photo img {
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
figure.photo.portrait img,
figure.photo.portrait .media-missing {
  max-width: min(100%, 420px);
  margin: 0 auto;
}
figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
figcaption .credit {
  display: block;
  margin-top: 2px;
  color: #62666d;
  font-size: 13px;
}

.video-frame {
  position: relative;
}
.video-frame video {
  background: #f4eef9;
}
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: var(--radius-lg);
  background: rgba(29, 29, 31, 0.08);
  cursor: pointer;
  transition: background 0.15s;
}
.play-btn:hover {
  background: rgba(29, 29, 31, 0.14);
}
.play-btn span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: 700 16px/1 var(--font-body);
  box-shadow: 0 8px 24px rgba(56, 16, 107, 0.35);
  transition: transform 0.15s;
}
.play-btn:hover span {
  transform: scale(1.05);
}
.play-btn:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

/* Offline in the installed app (wiki.js, 0.1.8): a video not kept yet says it needs the internet. */
.video-frame.is-offline .play-btn {
  display: none;
}
.video-offline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(244, 238, 249, 0.9);
  text-align: center;
}
.video-offline span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  background: var(--purple-dark);
  color: #fff;
  font: 700 16px/1.2 var(--font-body);
}
.video-offline small {
  color: var(--text);
  font-size: 15px;
}
/* Links to other websites, offline. */
html[data-offline] a[href^="http"]:not([href^="https://design.truerobotics.org"])::after {
  content: " (needs the internet)";
  font-weight: 400;
}

.transcript {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.transcript summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--purple);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style-position: inside;
}
.transcript summary:hover {
  background: var(--lavender);
}
.transcript p {
  margin: 0;
  padding: 4px 16px 14px;
  font-size: 15.5px;
}
.transcript .transcript-steps-title {
  padding-bottom: 4px;
  font-weight: 500;
}
.transcript-steps {
  margin: 0;
  padding: 0 16px 14px 40px;
  font-size: 15.5px;
}
.transcript-steps li + li {
  margin-top: 4px;
}

.media-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 20px;
  border: 2px dashed var(--lavender-line);
  background: repeating-linear-gradient(45deg, #fbf8fd, #fbf8fd 12px, #f6f0fa 12px, #f6f0fa 24px);
  color: var(--muted);
  text-align: center;
  box-shadow: none;
}
.media-missing .mm-kind {
  color: var(--purple);
  font-weight: 700;
}
.media-missing code {
  font-size: 13px;
}
.media-missing .mm-alt {
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.45;
}

/* ---- Steps ----------------------------------------------------------------------------- */

.steps {
  margin: 18px 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 0 0 18px 52px;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font: 700 16px/1 var(--font-body);
  box-shadow: 0 0 0 4px var(--bg);
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: 2px;
  width: 2px;
  background: var(--lavender-line);
}
.steps .step-body > p {
  margin: 0 0 6px;
  padding-top: 3px;
}
.steps .step-title {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1.04rem;
}
.steps figure {
  margin: 14px 0 6px;
}
.steps > li:target .step-body {
  border-radius: var(--radius);
  background: var(--lavender);
  box-shadow: 0 0 0 8px var(--lavender);
}

/* ---- Callouts -------------------------------------------------------------------------- */

.callout {
  margin: 24px 0;
  padding: 14px 18px 4px;
  border: 1px solid var(--lavender-line);
  border-left: 5px solid var(--purple);
  border-radius: var(--radius);
  background: var(--lavender);
}
.callout p {
  margin: 0 0 10px;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--purple-dark);
  font-weight: 700;
}
.callout-title .glyph {
  color: var(--purple);
}
.callout-note {
  border-color: #d5dbe8;
  border-left-color: #3d5a99;
  background: #f3f6fb;
}
.callout-note .callout-title {
  color: #233a6b;
}
.callout-note .callout-title .glyph {
  color: #3d5a99;
}
.callout-warning {
  border-color: #f7d2ac;
  border-left-color: var(--orange);
  background: var(--orange-tint);
}
.callout-warning .callout-title {
  color: #7a3b00;
}
.callout-warning .callout-title .glyph {
  color: #c25e00;
}

.shot-zoom {
  display: block;
  cursor: zoom-in;
  border-radius: inherit;
}
.shot-zoom:focus-visible {
  outline-offset: 3px;
}

/* ---- Tables ---------------------------------------------------------------------------- */

.table-wrap {
  margin: 20px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
caption {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--lavender);
  color: var(--purple-dark);
  font-weight: 700;
  text-align: left;
}
th,
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
thead th {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody th {
  color: var(--ink);
  font-weight: 500;
}
.shortcuts td.keys {
  width: 38%;
  white-space: normal;
}
.shortcuts tbody th {
  font-weight: 400;
}
.shortcuts .or {
  color: var(--muted);
  font-size: 14px;
}
.compare tbody th {
  min-width: 140px;
}
.table-note {
  margin: -12px 0 20px !important;
  color: var(--muted);
  font-size: 14.5px;
}
tbody tr:hover {
  background: #fcfaff;
}

/* ---- Tool cards ------------------------------------------------------------------------ */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}
.tool-grid.single {
  grid-template-columns: minmax(0, 520px);
}
.tool-card {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 14px 14px 14px 12px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tool-card.has-link:hover,
.tool-card.has-link:focus-within {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(56, 16, 107, 0.14);
}
.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 10px;
  background: var(--lavender);
  color: var(--ink);
}
.tool-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}
.tool-name {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
}
.tool-link {
  color: var(--ink);
  text-decoration: none;
}
.tool-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
}
.tool-link:hover {
  color: var(--purple);
}
.tool-link:focus-visible {
  outline: none;
}
.tool-link:focus-visible::after {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}
.tool-key kbd {
  font-size: 0.78rem;
}
.tool-purpose {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

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

.home-map h2 {
  margin-top: 36px;
}
.section-cards {
  columns: 230px 3;
  column-gap: 16px;
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
}
.section-card {
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 16px 16px 12px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
}
.sc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px !important;
}
.sc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--lavender);
  color: var(--ink);
}
.sc-title {
  color: var(--purple);
  font: 400 1.2rem/1.2 var(--font-display);
  letter-spacing: 0.02em;
}
.section-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.section-card li a {
  display: block;
  padding: 4px 0;
  font-size: 15.5px;
  line-height: 1.4;
  text-decoration: none;
}
.section-card li a:hover {
  text-decoration: underline;
}

/* ---- FAQ ------------------------------------------------------------------------------- */

.faq-item {
  margin: 12px 0;
  padding: 16px 20px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}
.faq-item p {
  margin: 0 0 10px;
}

/* ---- Keep going, previous and next ----------------------------------------------------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 40px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.related-card:hover {
  color: var(--text);
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(56, 16, 107, 0.14);
}
.rc-section {
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rc-title {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.rc-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}
.rc-arrow {
  position: absolute;
  right: 14px;
  top: 16px;
  color: var(--purple);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pn:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow);
}
.pn-next {
  text-align: right;
}
.pn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
}
.pn-next .pn-label {
  justify-content: flex-end;
}
.pn-title {
  color: var(--purple);
  font-weight: 700;
}

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

.site-footer {
  background: var(--purple-deep);
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 28px;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer :focus-visible {
  outline-color: #fff;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: #fff;
  font: 400 1.25rem/1.2 var(--font-display);
  letter-spacing: 0.02em;
}
.footer-about p:last-child {
  max-width: 52ch;
  margin: 0;
  line-height: 1.6;
}
.footer-heading {
  margin: 0 0 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links li a {
  display: inline-block;
  padding: 4px 0;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.footer-base p {
  margin: 0;
}

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

/* Phones: a table with three or more columns stacks each row into a small card,
   with the column name above each value, so nothing scrolls sideways. */
@media (max-width: 599.98px) {
  .compare-wide thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .compare-wide,
  .compare-wide tbody,
  .compare-wide tr,
  .compare-wide tbody th,
  .compare-wide td {
    display: block;
  }
  .compare-wide caption {
    display: block;
  }
  .compare-wide tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .compare-wide tbody tr:last-child {
    border-bottom: 0;
  }
  .compare-wide tbody th,
  .compare-wide td {
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .compare-wide tbody th {
    margin-bottom: 4px;
    font-weight: 700;
  }
  .compare-wide td {
    margin-top: 6px;
  }
  .compare-wide td[data-label]:not([data-label=''])::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

@media (max-width: 1279.98px) {
  .shell:has(.toc) {
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}

@media (max-width: 1100px) {
  .cta-long {
    display: none;
  }
  .cta-short {
    display: inline;
  }
}

@media (max-width: 959.98px) {
  :root {
    --bar-h: 56px;
  }
  .shell,
  .shell:has(.toc) {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-btn {
    display: inline-flex;
  }
  .brand-title {
    font-size: 1.3rem;
  }
  .brand .logo {
    width: 36px;
    height: 36px;
  }
  .sidenav {
    position: fixed;
    align-self: stretch;
    z-index: 45;
    top: var(--bar-h);
    left: 0;
    bottom: 0;
    width: min(86vw, 330px);
    height: auto;
    padding-top: 10px;
    border-right: 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .sidenav:target,
  .nav-open .sidenav {
    transform: none;
    visibility: visible;
    transition: transform 0.22s ease;
  }
  .sidenav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px;
    padding: 0 4px 8px 12px;
    border-bottom: 1px solid var(--line);
  }
  .sidenav-label {
    color: var(--ink);
    font-weight: 700;
  }
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: var(--ink);
  }
  .nav-close:hover {
    background: var(--lavender);
  }
  .sidenav li a {
    padding: 10px 12px;
    font-size: 16px;
  }
  .sidenav li.child a {
    font-size: 15.5px;
  }
  .sidenav:target ~ .scrim,
  .nav-open .scrim {
    display: block;
    position: fixed;
    inset: var(--bar-h) 0 0 0;
    z-index: 44;
    background: rgba(29, 29, 31, 0.42);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 719.98px) {
  body {
    font-size: 16.5px;
  }
  .topbar {
    gap: 4px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(6px, env(safe-area-inset-left));
  }
  .bt-long {
    display: none;
  }
  .bt-short {
    display: inline;
  }
  .search {
    display: none;
  }
  .search-toggle:not([hidden]) {
    display: inline-flex;
    margin-left: auto;
  }
  .search.is-open {
    display: block;
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    max-width: none;
    margin: 0;
    z-index: 55;
  }
  .search.is-open input {
    background: #fff;
    color: var(--ink);
    padding-right: 12px;
  }
  .search.is-open .search-icon {
    color: var(--purple);
  }
  .search.is-open .search-key {
    display: none;
  }
  .search-results {
    position: fixed;
    top: calc(var(--bar-h) + 4px);
    left: 8px;
    right: 8px;
    max-height: calc(100vh - var(--bar-h) - 24px);
  }
  .cta {
    height: 40px;
    padding: 0 12px;
    font-size: 14.5px;
  }
  .cta .icon {
    display: none;
  }
  main {
    padding: 18px 16px 56px;
  }
  .home .doc-head {
    padding: 22px 18px 18px;
  }
  h1,
  .home h1 {
    font-size: 1.95rem;
  }
  .direct-answer {
    font-size: 1.06rem;
  }
  .hero-ctas .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  h2 {
    margin-top: 40px;
  }
  figure {
    margin: 18px 0 22px;
  }
  figure img,
  figure video,
  .media-missing {
    border-radius: var(--radius);
  }
  .steps > li {
    padding-left: 44px;
  }
  .steps > li::before {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  .steps > li:not(:last-child)::after {
    left: 14px;
    top: 32px;
  }
  th,
  td {
    padding: 9px 12px;
  }
  .shortcuts td.keys {
    width: 44%;
  }
  .prev-next {
    grid-template-columns: 1fr;
  }
  .pn-next {
    text-align: left;
  }
  .pn-next .pn-label {
    justify-content: flex-start;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 32px 16px 20px;
  }
  .footer-base {
    padding: 14px 16px 24px;
  }
  .tool-grid,
  .tool-grid.single,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-cards {
    columns: 1;
  }
}

@media (max-width: 370px) {
  .brand-title {
    display: none;
  }
}

/* Touch screens: 44 px targets everywhere you tap. */
@media (pointer: coarse) {
  .sidenav li a,
  .toc a,
  .section-card li a,
  .footer-links li a,
  .breadcrumbs a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .breadcrumbs a {
    display: inline-flex;
  }
  .search input {
    height: 44px;
  }
  .search-icon {
    top: 13px;
  }
  .search-results a {
    min-height: 44px;
  }
  .anchor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .tool-card.has-link:hover,
  .related-card:hover,
  .cta:hover,
  .btn-primary:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .tool-card,
  .related-card,
  .section-card,
  .callout {
    border: 2px solid CanvasText;
  }
}

@media print {
  :root {
    --bar-h: 0px;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .topbar,
  .sidenav,
  .toc,
  .scrim,
  .prev-next,
  .related,
  .site-footer,
  .anchor,
  .play-btn,
  .hero-ctas {
    display: none !important;
  }
  .shell,
  .shell:has(.toc) {
    display: block;
  }
  main {
    padding: 0;
  }
  .doc {
    max-width: none;
  }
  .home .doc-head {
    border: 0;
    background: none;
    padding: 0;
  }
  figure,
  .callout,
  .table-wrap,
  .steps > li,
  .tool-card,
  .faq-item {
    break-inside: avoid;
  }
  figure img,
  .table-wrap {
    box-shadow: none;
  }
  h1,
  h2,
  h3 {
    break-after: avoid;
    color: #000;
  }
  a {
    color: #000;
  }
  .doc-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444;
  }
  .steps > li::before {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }
}
