/* ============================================================================
   SXAccess Docs — stylesheet
   Colour system, type scale, radii and motion tokens mirror docs.sxaccess.com.
   Neutrals sit on a single slightly-green hue; the brand is teal; every
   semantic token is declared once under :root and re-declared for dark.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens -- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* neutral ramp */
  --n-000: #fdfefe;
  --n-025: #f5f9f9;
  --n-050: #eef4f4;
  --n-100: #e3ebeb;
  --n-150: #d6e0e0;
  --n-200: #c9d5d5;
  --n-300: #adbcbc;
  --n-400: #8b9c9c;
  --n-500: #6d7d7d;
  --n-600: #536161;
  --n-700: #3c4949;
  --n-750: #313d3d;
  --n-800: #263131;
  --n-850: #1d2727;
  --n-900: #16201f;
  --n-925: #121b1b;
  --n-950: #0e1717;
  --n-975: #0b1313;
  --n-1000: #081010;

  /* type scale */
  --t-micro: 11px;   --lh-micro: 16px;
  --t-small: 12px;   --lh-small: 18px;
  --t-body: 14px;    --lh-body: 20px;
  --t-lead: 16px;    --lh-lead: 24px;
  --t-title: 20px;   --lh-title: 28px;
  --t-display: 28px; --lh-display: 34px;

  /* radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* header metrics (sxaccess.com --hdr-*) */
  --hdr-gap: 18px;
  --hdr-nav-gap: 4px;
  --hdr-nav-lead: 6px;
  --hdr-link-pad: 11px;
  --hdr-tool-gap: 8px;
  --hdr-cta-pad: 15px;

  /* motion */
  --e-out: cubic-bezier(.2, .8, .2, 1);
  --d-micro: .12s;
  --d-panel: .18s;
  --d-sheet: .24s;
  --dur-1: var(--d-micro);
  --dur-2: var(--d-panel);
  --ease: var(--e-out);

  /* semantic — light */
  --bg: var(--n-000);
  --bg-2: var(--n-050);
  --fg: var(--n-1000);
  --fg-2: var(--n-800);
  --fg-3: var(--n-700);
  --fg-4: var(--n-600);
  --card: var(--n-025);
  --card-2: var(--n-050);
  --muted: var(--n-050);
  --muted-2: var(--n-100);
  --border: var(--n-150);
  --border-2: var(--n-200);
  --input-border: var(--n-200);
  --hairline: var(--n-100);

  --primary: #0d9488;
  --primary-2: #0f766e;
  --btn-bg: #0f766e;
  --btn-bg-h: #115e56;
  --btn-fg: #fff;
  --accent: #0d94881a;
  --accent-fg: #0d5c54;
  --link: #0d5c54;
  --ring: #0d9488;
  --bg-blur: #ffffffd1;

  --sidebar: var(--n-025);
  --sidebar-fg: var(--n-900);
  --sidebar-muted: var(--n-600);
  --sidebar-active-bg: #0d94881a;
  --sidebar-active-fg: #0f766e;
  --sidebar-border: var(--n-150);

  --destructive: #c23c3c;
  --destructive-bg: #c23c3c17;
  --destructive-border: #c23c3c52;
  --online: #008854;
  --online-bg: #0088541a;
  --offline: var(--n-400);
  --warning: #a85e00;
  --warning-bg: #a85e001a;

  --sev-crit: #6d4bc7;  --sev-crit-bg: #6d4bc71a;
  --sev-high: #c23c3c;  --sev-high-bg: #c23c3c17;
  --sev-med:  #a85e00;  --sev-med-bg:  #a85e001a;
  --sev-low:  #008854;  --sev-low-bg:  #0088541a;
  --sev-info: #0084ac;  --sev-info-bg: #0084ac1a;

  --shadow-sm: 0 1px 2px #0810100f, 0 1px 1px #0810100a;
  --shadow-md: 0 2px 4px #0810100f, 0 4px 12px #0810100f;
  --shadow-lg: 0 8px 16px #08101014, 0 20px 40px #0810101a;
  --inset-top: none;
  --overlay: #0810106b;

  /* page ornament */
  --sx-rule: #0922220b;
  --sx-rule-size: 26px;
  --sx-card: #fff;
  --sx-card-shadow: 0 1px 2px #0818180d, 0 8px 24px -16px #0818182e;

  color-scheme: light;
}

/* semantic — dark. Declared twice so an explicit choice beats the media query. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--n-1000);
    --bg-2: var(--n-975);
    --fg: var(--n-050);
    --fg-2: var(--n-200);
    --fg-3: var(--n-300);
    --fg-4: var(--n-400);
    --card: var(--n-925);
    --card-2: var(--n-900);
    --muted: var(--n-850);
    --muted-2: var(--n-800);
    --border: var(--n-700);
    --border-2: var(--n-600);
    --input-border: var(--n-600);
    --hairline: var(--n-850);

    --primary: #2dd4bf;
    --primary-2: #14b8a6;
    --btn-bg: #0f766e;
    --btn-bg-h: #14b8a6;
    --btn-fg: #fff;
    --accent: #2dd4bf1f;
    --accent-fg: #5eead4;
    --link: #5eead4;
    --ring: #2dd4bf;
    --bg-blur: #0a0c0ed6;

    --sidebar: var(--n-925);
    --sidebar-fg: var(--n-100);
    --sidebar-muted: var(--n-400);
    --sidebar-active-bg: #2dd4bf1f;
    --sidebar-active-fg: #5eead4;
    --sidebar-border: var(--n-700);

    --destructive: #ed756e;
    --destructive-bg: #ed756e21;
    --destructive-border: #ed756e52;
    --online: #59b483;
    --online-bg: #59b48324;
    --offline: var(--n-600);
    --warning: #d28e32;
    --warning-bg: #d28e3224;

    --sev-crit: #a78bfa; --sev-crit-bg: #a78bfa24;
    --sev-high: #ed756e; --sev-high-bg: #ed756e21;
    --sev-med:  #d28e32; --sev-med-bg:  #d28e3224;
    --sev-low:  #59b483; --sev-low-bg:  #59b48324;
    --sev-info: #00b1d5; --sev-info-bg: #00b1d524;

    --shadow-sm: 0 1px 2px #0006;
    --shadow-md: 0 2px 6px #00000070;
    --shadow-lg: 0 10px 24px #00000085;
    --inset-top: inset 0 1px 0 #ffffff13;
    --overlay: #020606a8;

    --sx-rule: #ffffff08;
    --sx-card: var(--card);
    --sx-card-shadow: none;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--n-1000);
  --bg-2: var(--n-975);
  --fg: var(--n-050);
  --fg-2: var(--n-200);
  --fg-3: var(--n-300);
  --fg-4: var(--n-400);
  --card: var(--n-925);
  --card-2: var(--n-900);
  --muted: var(--n-850);
  --muted-2: var(--n-800);
  --border: var(--n-700);
  --border-2: var(--n-600);
  --input-border: var(--n-600);
  --hairline: var(--n-850);

  --primary: #2dd4bf;
  --primary-2: #14b8a6;
  --btn-bg: #0f766e;
  --btn-bg-h: #14b8a6;
  --btn-fg: #fff;
  --accent: #2dd4bf1f;
  --accent-fg: #5eead4;
  --link: #5eead4;
  --ring: #2dd4bf;
  --bg-blur: #0a0c0ed6;

  --sidebar: var(--n-925);
  --sidebar-fg: var(--n-100);
  --sidebar-muted: var(--n-400);
  --sidebar-active-bg: #2dd4bf1f;
  --sidebar-active-fg: #5eead4;
  --sidebar-border: var(--n-700);

  --destructive: #ed756e;
  --destructive-bg: #ed756e21;
  --destructive-border: #ed756e52;
  --online: #59b483;
  --online-bg: #59b48324;
  --offline: var(--n-600);
  --warning: #d28e32;
  --warning-bg: #d28e3224;

  --sev-crit: #a78bfa; --sev-crit-bg: #a78bfa24;
  --sev-high: #ed756e; --sev-high-bg: #ed756e21;
  --sev-med:  #d28e32; --sev-med-bg:  #d28e3224;
  --sev-low:  #59b483; --sev-low-bg:  #59b48324;
  --sev-info: #00b1d5; --sev-info-bg: #00b1d524;

  --shadow-sm: 0 1px 2px #0006;
  --shadow-md: 0 2px 6px #00000070;
  --shadow-lg: 0 10px 24px #00000085;
  --inset-top: inset 0 1px 0 #ffffff13;
  --overlay: #020606a8;

  --sx-rule: #ffffff08;
  --sx-card: var(--card);
  --sx-card-shadow: none;

  color-scheme: dark;
}

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;

  /* 26px graph paper, plus two soft radial washes in the brand hues */
  background-image:
    linear-gradient(to right, var(--sx-rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--sx-rule) 1px, transparent 1px),
    radial-gradient(90% 50% at 78% -6%, color-mix(in srgb, var(--primary) 6%, transparent) 0%, transparent 56%),
    radial-gradient(70% 40% at 6% 2%, #38bdf80a 0%, transparent 54%);
  background-size: var(--sx-rule-size) var(--sx-rule-size), var(--sx-rule-size) var(--sx-rule-size), auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-attachment: fixed;
}


@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image:
      linear-gradient(to right, var(--sx-rule) 1px, transparent 1px),
      linear-gradient(to bottom, var(--sx-rule) 1px, transparent 1px),
      radial-gradient(90% 50% at 78% -6%, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 56%),
      radial-gradient(70% 40% at 6% 2%, #22d3ee12 0%, transparent 54%);
  }
}
:root[data-theme="dark"] body {
  background-image:
    linear-gradient(to right, var(--sx-rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--sx-rule) 1px, transparent 1px),
    radial-gradient(90% 50% at 78% -6%, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 56%),
    radial-gradient(70% 40% at 6% 2%, #22d3ee12 0%, transparent 54%);
}

h1, h2, h3, [data-heading] { font-family: var(--font-heading); letter-spacing: -.01em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
input, textarea, button, select { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--fg-3); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ring) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent);
}
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
::selection {
  background: color-mix(in srgb, var(--primary) 26%, transparent);
  color: var(--fg);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--border-2); background-clip: padding-box;
  border: 3px solid transparent; border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); background-clip: padding-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.skip-link {
  position: fixed; top: 0; left: -9999px; z-index: 200;
  padding: 10px 16px; font-weight: 600;
  border-radius: 0 0 var(--r-md) 0;
  background: var(--btn-bg); color: var(--btn-fg);
}
.skip-link:focus { left: 0; }

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

/* ---------------------------------------------------------------- header -- */
.docs-header {
  position: sticky; top: 0; z-index: 50;
  /* viewport-fit=cover puts the bar under the status bar / Dynamic Island. */
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

/* The bar spans the viewport; its contents line up with the page columns. */
.header-row {
  display: flex; align-items: center; gap: var(--hdr-gap);
  max-width: 1440px; margin: 0 auto;
  height: 61px;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
.docs-header a:hover, .docs-header a:focus-visible { text-decoration: none; }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; padding: 0;
  border-radius: 8px; border: 1px solid var(--border-2);
  background: transparent; color: var(--fg-2); cursor: pointer;
}
.icon-btn:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.nav-toggle { width: 36px; height: 36px; border-radius: 9px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--fg); }
.brand img { flex: none; height: 27px; width: 137px; object-fit: contain; }
.docs-suffix {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--fg-3); text-transform: uppercase;
}
img.brand-light { display: block; }
img.brand-dark { display: none; }
:root[data-theme="dark"] img.brand-light { display: none; }
:root[data-theme="dark"] img.brand-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.brand-light { display: none; }
  :root:not([data-theme="light"]) img.brand-dark { display: block; }
}

.site-nav {
  display: flex; align-items: center;
  gap: var(--hdr-nav-gap); margin-inline-start: var(--hdr-nav-lead);
}
.header-tools {
  display: flex; align-items: center;
  gap: var(--hdr-tool-gap); margin-inline-start: auto;
}
.docs-nav-link {
  position: relative; display: inline-flex; align-items: center; flex: none;
  height: 34px; padding: 0 var(--hdr-link-pad); border-radius: 9px;
  font-size: 14px; font-weight: 540; color: var(--fg-2);
  white-space: nowrap; text-decoration: none;
  transition: background var(--dur-1) var(--ease);
}
.docs-nav-link:hover { color: var(--fg); background: var(--card-2); }
.docs-nav-link::after {
  content: ""; position: absolute; bottom: 4px; inset-inline: 11px;
  height: 2px; border-radius: 2px; background: var(--primary);
  scale: 0 1; transition: scale .26s var(--e-out);
}
.docs-nav-link:hover::after, .docs-nav-link[aria-current="page"]::after { scale: 1; }
.docs-nav-link[aria-current="page"] { color: var(--fg); }

.search-button {
  display: flex; align-items: center; gap: 8px;
  height: 34px; min-width: 190px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--input-border);
  background: var(--bg); color: var(--fg-3); cursor: pointer; font-size: 13px;
}
.search-button:hover { border-color: var(--border-2); color: var(--fg-2); }
.search-label { flex: 1; text-align: left; }
.search-hint {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 2px 5px; border-radius: 5px;
  border: 1px solid var(--border-2); color: var(--fg-3);
}

.locale-btn {
  height: 34px; padding: 0 11px; display: flex; align-items: center; gap: 6px;
  border-radius: 8px; border: 1px solid var(--border-2);
  background: transparent; color: var(--fg-2); cursor: pointer;
  font-weight: 600; font-size: 12px;
}
.locale-btn:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.locale-wrap { position: relative; }
.locale-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 168px; padding: 5px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--card); box-shadow: var(--shadow-lg);
  animation: mn-in .16s var(--e-out) both;
}
.locale-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--fg-2); cursor: pointer;
  font-size: 13px; text-align: left;
}
.locale-menu button:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.locale-menu button[aria-current="true"] { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); font-weight: 620; }
.locale-menu .locale-flag {
  flex: none; width: 18px; height: 13.5px; display: block;
  border-radius: 2px; border: 1px solid var(--border); object-fit: cover;
}
.locale-menu .code {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4);
  margin-left: auto; letter-spacing: .04em;
}

.cta {
  display: inline-flex; align-items: center; height: 34px; padding: 0 var(--hdr-cta-pad);
  border-radius: 9px; background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13px; font-weight: 620; text-decoration: none; flex: none;
}
.cta:hover { background: var(--btn-bg-h); text-decoration: none; }

.cta-shimmer { position: relative; overflow: hidden; isolation: isolate; }
@media (prefers-reduced-motion: no-preference) {
  .cta-shimmer::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 34%, #ffffff80 50%, transparent 66%);
    transform: translateX(-140%);
    animation: sx-cta-shimmer 5s var(--e-out) infinite;
  }
  .cta-shimmer:hover::after { animation-play-state: paused; }
  @keyframes sx-cta-shimmer {
    0%, 62% { transform: translateX(-140%); }
    82%, 100% { transform: translateX(140%); }
  }
}

@keyframes mn-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes md-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- layout -- */
.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 232px;
  align-items: start; gap: 0;
  max-width: 1440px; margin: 0 auto;
}

.sidebar {
  position: sticky; top: 61px;
  height: calc(100vh - 61px); overflow-y: auto;
  padding: 22px 14px 60px;
  border-right: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--sidebar) 72%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sidebar > * + * { margin-top: 14px; }

.sidebar-group { margin-bottom: 2px; }
.sidebar-group-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  margin: 0 0 6px; padding: 5px 10px;
  border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-family: var(--font-sans);
  font-size: 12px; font-weight: 700; letter-spacing: .045em;
  text-transform: uppercase; color: var(--fg-3);
  cursor: pointer; text-align: left;
}
.sidebar-group-btn:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg-2); }
.sidebar-group-btn .chev {
  flex: none; display: block; opacity: .75;
  transform: rotate(-90deg);
  transition: transform var(--dur-1) var(--ease);
}
.sidebar-group-btn[aria-expanded="true"] .chev { transform: rotate(0deg); }
.sidebar-group-btn .label { flex: 1; min-width: 0; }
.sidebar-group-btn .count { opacity: .7; letter-spacing: 0; }

.sidebar-list { list-style: none; margin: 0 0 10px; padding: 0; }
.sidebar-sublist { list-style: none; margin: 2px 0 6px; padding: 0; }
.sidebar-subhead {
  display: block; padding: 6px 10px 4px 20px;
  font-size: 12px; font-weight: 640; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg-4);
}
.sidebar-sublist .sidebar-link { padding-inline-start: 42px; }
.sidebar-link {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 28px; border-radius: 8px;
  font-size: 13.5px; line-height: 19px; text-decoration: none;
  color: var(--sidebar-muted);
  transition: background .18s var(--e-out), color .18s var(--e-out);
}
.sidebar-link:hover {
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  color: var(--fg); text-decoration: none;
}
.sidebar-link[aria-current="page"] {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-fg); font-weight: 620;
}
.sidebar-link[aria-current="page"]:hover { background: var(--sidebar-active-bg); }
.sidebar [aria-current="page"]::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--primary);
}

.article {
  /* Prose, tables and screenshots share one width, so every block starts and
     ends on the same two edges instead of the text stopping short. */
  --measure: 1000px; min-width: 0; padding: 34px 46px 90px;
}
.article > *, .article .prose { max-width: var(--measure); }
.article .blockgrid > * { max-width: 100%; }
.article figure, .article .blockgrid, .article .scroll-x, .article .scroll-wrap, .article [data-wide] { max-width: min(100%, 1000px); }

@media (prefers-reduced-motion: no-preference) {
  .article { animation: sx-article-in .3s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes sx-article-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .toc { animation: sx-toc-in .26s both; }
  @keyframes sx-toc-in { from { opacity: 0; } to { opacity: 1; } }
  html { scroll-behavior: smooth; }
}
:target { scroll-margin-top: 84px; }

/* ------------------------------------------------------------------- toc -- */
.toc {
  position: sticky; top: 61px;
  max-height: calc(100vh - 61px); overflow-y: auto;
  padding: 34px 20px 60px 4px;
  border-left: 1px solid var(--hairline);
  scrollbar-width: thin;
}
.toc-title {
  margin: 0 0 12px; font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--fg-4);
}
.toc-body { position: relative; }
.toc-body::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 2px; border-radius: 2px; background: var(--hairline);
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-link {
  display: block; padding: 6px 0 6px 14px;
  font-size: 12.5px; line-height: 1.45; text-decoration: none;
  color: var(--fg-4); transition: color .2s var(--e-out);
}
.toc-link:hover { color: var(--fg-2); text-decoration: none; }
.toc-link[data-level="3"] { padding-inline-start: 26px; font-size: 12px; }
.toc-link[aria-current="location"] { color: var(--accent-fg); font-weight: 620; }
.toc-rail {
  position: absolute; inset-inline-start: 0; width: 2px; border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px -1px color-mix(in srgb, var(--primary) 55%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .toc-rail { transition: top .26s var(--e-out), height .26s var(--e-out); }
}

/* --------------------------------------------------------------- article -- */
.doc-title {
  margin: 0 0 10px; font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700; line-height: 1.1; letter-spacing: -.032em;
  color: var(--fg); text-wrap: balance;
  /* German compounds (Organisationseinstellungen) exceed a 320px column. */
  overflow-wrap: break-word; hyphens: auto;
}
.doc-summary {
  margin: 0 0 12px; max-width: 66ch;
  font-size: 17px; line-height: 1.6; color: var(--fg-3); text-wrap: pretty;
  overflow-wrap: break-word; hyphens: auto;
}
.article > .doc-summary {
  margin-bottom: 34px; padding-bottom: 26px;
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 14px; padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: var(--accent); color: var(--accent-fg);
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}

.blockgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 18px; }
.blockgrid > * { grid-column: span 12; min-width: 0; }
.blockgrid > * > * { min-width: 0; }
/* Any block the table of contents can link to must clear the sticky header. */
.blockgrid > [id] { scroll-margin-top: 80px; }
.blockgrid > * > .block-heading, .blockgrid > :first-child > .block-heading { margin-top: 0; }
@media (max-width: 900px) { .blockgrid > * { grid-column: span 12 !important; } }

.block-heading {
  margin: 0 0 12px; font-size: 25px; font-weight: 660; line-height: 1.24;
  letter-spacing: -.022em; color: var(--fg); scroll-margin-top: 88px;
  overflow-wrap: break-word; hyphens: auto;
}

.prose { color: var(--fg-2); font-size: 16px; line-height: 1.72; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 16px; text-align: left; text-wrap: pretty; overflow-wrap: break-word; }
.prose h2 {
  margin: 34px 0 12px; font-size: 25px; font-weight: 660; line-height: 1.24;
  letter-spacing: -.022em; color: var(--fg); scroll-margin-top: 88px;
}
.prose h3 {
  margin: 26px 0 10px; font-size: 19px; font-weight: 650; line-height: 1.32;
  letter-spacing: -.014em; color: var(--fg); scroll-margin-top: 88px;
}
.prose h4 { margin: 22px 0 8px; font-size: 16px; font-weight: 660; color: var(--fg); }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 7px; text-align: left; overflow-wrap: break-word; }
/* Ragged-right English reads better unhyphenated; German compounds still need
   the break opportunities, especially in a phone-width column. */
:lang(de) .prose p, :lang(de) .prose li { hyphens: auto; }
.prose li::marker { color: var(--fg-3); }
.prose strong { color: var(--fg); font-weight: 620; }
.prose a { font-weight: 520; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* An identifier must never gain a hyphen it does not have: hyphens:auto on the
   surrounding text was rendering /Applications/SXAccess.app as SX-Access.app
   and network_admin as net-work_admin. */
code, kbd, samp { hyphens: none; -webkit-hyphens: none; }
.prose code {
  font-family: var(--font-mono); font-size: .92em; font-weight: 550;
  padding: .15em .4em; border-radius: var(--r-sm);
  background: var(--muted-2); color: var(--accent-fg);
  /* SXACCESS_WG_KERNEL_DISABLED=true has no break opportunity of its own. */
  overflow-wrap: anywhere;
}
.prose pre {
  margin: 0 0 18px; padding: 15px 17px; overflow-x: auto;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card-2);
}
.prose pre code { padding: 0; background: none; color: var(--fg-2); font-size: 13.5px; line-height: 22px; }
.code-line { display: block; }
.code-line:empty { min-height: 22px; }
.prose blockquote {
  margin: 0 0 18px; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--border-2); color: var(--fg-3);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.prose img { border-radius: var(--r-md); max-width: 100%; height: auto; }

/* Screenshots, framed like the cards and code panels. */
.article figure { margin: 0; }
.article figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--card-2);
}
/* A phone screenshot is portrait; on its own at column width it would be enormous,
   so a run of them lays out as a row that wraps instead of a tall single file. */
.article figure.fig-phone { max-width: 300px; }
.article .fig-row {
  /* Equal columns, so a row that wraps does not leave one screenshot wider than
     its siblings. Narrow screens fit as many as they can; wider ones lay the
     whole run out at once, which is why app.js passes the count as --n. */
  display: grid; gap: 18px; margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  justify-items: start; align-items: start;
}
@media (min-width: 720px) {
  .article .fig-row { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
}
.article .fig-row > figure.fig-phone { max-width: 232px; width: 100%; }
.article .fig-row > figure figcaption {
  margin-top: 8px; font-size: 12.5px; line-height: 17px;
  color: var(--fg-3); text-wrap: pretty;
}
.article .fig-row-caption {
  margin: 12px 0 0; font-size: 13px; line-height: 19px;
  color: var(--fg-3); text-wrap: pretty;
}
.article figcaption {
  margin-top: 10px; font-size: 13px; line-height: 19px;
  color: var(--fg-3); text-wrap: pretty;
}

.prose table, .sx-table { border-collapse: collapse; width: 100%; margin: 0; font-size: 14px; }
.prose th, .prose td, .sx-table th, .sx-table td {
  padding: 9px 12px; border: 1px solid var(--border-2);
  text-align: left; vertical-align: top;
  /* Without this a cell's min-content width is a whole German compound, which
     pushed the table into a horizontal scroll on every phone. */
  overflow-wrap: break-word; hyphens: auto;
}
.prose th, .sx-table th {
  background: var(--muted); color: var(--fg); font-weight: 620;
  border-bottom-width: 2px;
}
.sx-table td { color: var(--fg-2); }
.sx-table code { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-fg); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

/* A table wider than the screen is otherwise cut off with nothing to show for
   it. The fade marks the edge that still has content; app.js sets data-x. */
.scroll-wrap { position: relative; }
.scroll-wrap::before, .scroll-wrap::after {
  content: ""; position: absolute; inset-block: 1px; width: 30px;
  pointer-events: none; opacity: 0;
  transition: opacity var(--dur-1) var(--ease);
}
.scroll-wrap::before { inset-inline-start: 1px; background: linear-gradient(to right, var(--bg), transparent); }
.scroll-wrap::after  { inset-inline-end: 1px;   background: linear-gradient(to left,  var(--bg), transparent); }
.scroll-wrap[data-x="start"]::after,
.scroll-wrap[data-x="mid"]::after   { opacity: 1; }
.scroll-wrap[data-x="mid"]::before,
.scroll-wrap[data-x="end"]::before  { opacity: 1; }

/* ------------------------------------------------------------ components -- */
.card-link {
  display: flex; flex-direction: column; gap: 6px; padding: 17px 18px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--sx-card, var(--card)); box-shadow: var(--sx-card-shadow, none);
  transition: border-color .26s var(--e-out), box-shadow .26s var(--e-out), transform .26s var(--e-out);
}
.card-link:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 14px 34px -20px color-mix(in srgb, var(--primary) 55%, transparent), var(--shadow-md);
  transform: translateY(-2px); text-decoration: none;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.card-title { font-size: 14px; font-weight: 620; color: var(--fg); }
.card-desc { font-size: 13px; line-height: 20px; color: var(--fg-3); }
.card-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 12.5px; font-weight: 620; color: var(--link);
}

.callout {
  display: flex; gap: 11px; padding: 14px 16px;
  border-radius: var(--r-lg); border: 1px solid transparent;
}
.callout svg { flex: none; margin-top: 1px; }
.callout > div { min-width: 0; }
.callout-title { margin: 0 0 4px; font-size: 13.5px; font-weight: 650; color: var(--fg); }
.callout .prose { font-size: 14.5px; line-height: 1.6; }
.callout .prose p { margin: 0 0 10px; }
.callout .prose > :last-child { margin-bottom: 0; }
.callout-info    { border-color: color-mix(in srgb, var(--sev-info) 26%, transparent); background: var(--sev-info-bg); }
.callout-info svg    { color: var(--sev-info); }
.callout-success { border-color: color-mix(in srgb, var(--online) 26%, transparent); background: var(--online-bg); }
.callout-success svg { color: var(--online); }
.callout-warning { border-color: color-mix(in srgb, var(--warning) 30%, transparent); background: var(--warning-bg); }
.callout-warning svg { color: var(--warning); }
.callout-danger  { border-color: var(--destructive-border); background: var(--destructive-bg); }
.callout-danger svg  { color: var(--destructive); }

.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 620;
  background: var(--btn-bg); color: var(--btn-fg);
}
.btn-primary:hover { background: var(--btn-bg-h); text-decoration: none; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 620;
  border: 1px solid var(--border-2); color: var(--fg-2);
}
.btn-ghost:hover { border-color: var(--fg-3); color: var(--fg); text-decoration: none; }

.code-panel {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-2); border-radius: var(--r-lg);
  background: var(--muted); box-shadow: var(--sx-card-shadow, none);
}
.code-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em; color: var(--fg-3);
}
.code-bar svg { color: var(--accent-fg); }
.code-bar .copy {
  margin-left: auto; padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border-2); background: transparent;
  color: var(--fg-3); cursor: pointer;
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
}
.code-bar .copy:hover { color: var(--fg); border-color: var(--fg-4); }
.code-panel .sx-code { background: none; border: 0; border-radius: 0; }
.sx-code {
  margin: 0; padding: 13px 15px; overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--border-2); border-radius: var(--r-lg);
  background: var(--muted); color: var(--fg-2);
  font-family: var(--font-mono); font-size: 13.5px; line-height: 22px; tab-size: 2;
}
.sx-code code { font: inherit; color: inherit; background: none; padding: 0; white-space: pre; }
.tok-c { color: var(--fg-4); font-style: italic; }
.tok-s { color: var(--online); }
.tok-f { color: var(--accent-fg); }

.doc-steps { position: relative; margin: 22px 0 0; padding: 0; list-style: none; }
.doc-steps::before {
  content: ""; position: absolute; inset-block: 13px; inset-inline-start: 13px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 22%, transparent) 55%, transparent);
}
.doc-step { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.doc-step:last-child { padding-bottom: 0; }
.doc-step-marker {
  position: relative; z-index: 1; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
  background: var(--bg); box-shadow: 0 0 0 4px var(--bg);
  color: var(--accent-fg); font-family: var(--font-mono); font-size: 12.5px; font-weight: 700;
}
.doc-step-body { min-width: 0; flex: 1; }
.doc-step-title { margin: 3px 0 0; font-size: 15.5px; font-weight: 620; color: var(--fg); }
.doc-step-desc { margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--fg-3); }
.doc-step-desc p { margin: 0 0 10px; }
.doc-step-desc > :last-child { margin-bottom: 0; }
.doc-step .sx-code, .doc-step .code-panel { margin-top: 10px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full);
  border: 1px solid var(--border-2); background: var(--card);
  font-size: 12.5px; font-weight: 550; color: var(--fg-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* page footer bits */
.page-nav {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-top: 44px;
}
.page-nav .eyebrow-sm {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fg-3);
}
.page-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.meta-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta-label { font-size: 13px; color: var(--fg-3); }
.meta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border-2); background: transparent;
  color: var(--fg-3); cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.meta-btn:hover { color: var(--fg); border-color: var(--fg-4); }
.meta-btn[aria-pressed="true"] {
  color: var(--accent-fg); border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--accent);
}
.updated { margin: 18px 0 0; font-size: 12px; color: var(--fg-3); }

/* ---------------------------------------------------------------- search -- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  animation: ov-in .14s var(--e-out) both;
}
.search-modal {
  width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--bg); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: md-in .2s var(--e-out) both;
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--hairline); }
.search-field svg { flex: none; color: var(--fg-3); }
.search-field input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  color: var(--fg); font-size: 15px; outline: none;
}
.search-field input:focus { box-shadow: none; }
.search-results { overflow-y: auto; padding: 6px; }
.search-empty { padding: 26px 16px; text-align: center; font-size: 13.5px; color: var(--fg-3); }
.search-item {
  display: block; padding: 9px 11px; border-radius: 9px; text-decoration: none;
  border: 1px solid transparent;
}
.search-item:hover, .search-item[data-active="true"] {
  background: var(--sidebar-active-bg); text-decoration: none;
  border-color: color-mix(in srgb, var(--primary) 26%, transparent);
}
.search-item .t { display: block; font-size: 13.5px; font-weight: 620; color: var(--fg); }
.search-item .s { display: block; margin-top: 2px; font-size: 12.5px; line-height: 17px; color: var(--fg-3); }
.search-item .c {
  display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-4);
}
.search-item mark { background: color-mix(in srgb, var(--primary) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-foot {
  display: flex; align-items: center; gap: 14px; padding: 9px 14px;
  border-top: 1px solid var(--hairline); background: var(--card);
  font-size: 11.5px; color: var(--fg-4);
}
.search-foot kbd {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 5px;
  border-radius: 4px; border: 1px solid var(--border-2);
}

/* ---------------------------------------------------------------- footer -- */
.site-footer { border-top: 1px solid var(--border); background: var(--card); }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 38px max(24px, env(safe-area-inset-right, 0px)) calc(30px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
}
.footer-cols { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.footer-brand { flex: 1 1 260px; min-width: 0; }
.footer-brand img { height: 26px; width: 132px; object-fit: contain; }
.footer-tag { margin: 10px 0 0; font-size: 13px; line-height: 20px; color: var(--fg-3); max-width: 38ch; text-wrap: pretty; }
.footer-col { flex: 0 1 170px; }
.footer-col h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--fg); font-family: var(--font-sans); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-col a { font-size: 13px; color: var(--fg-3); }
.footer-col a:hover { color: var(--fg); }
.footer-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--fg-4);
}
.footer-bar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bar a { color: var(--fg-4); }
.footer-bar a:hover { color: var(--fg-2); }

/* ------------------------------------------------------------ responsive -- */
[data-mobileonly] { display: none !important; }

@media (max-width: 1240px) {
  :root {
    --hdr-gap: 12px; --hdr-nav-gap: 2px; --hdr-nav-lead: 4px;
    --hdr-link-pad: 9px; --hdr-tool-gap: 6px; --hdr-cta-pad: 12px;
  }
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
  .toc { display: none; }
  .article { padding: 30px 30px 80px; }
}
@media (max-width: 940px) {
  [data-wideonly] { display: none !important; }
}
@media (max-width: 860px) {
  [data-desktoponly], .search-label, .search-hint { display: none !important; }
  .search-button { width: 36px !important; min-width: 0 !important; padding: 0 !important; justify-content: center !important; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  [data-mobileonly] { display: inline-flex !important; }
  .sidebar {
    position: fixed; inset: calc(61px + env(safe-area-inset-top, 0px)) auto 0 0; z-index: 60; display: none;
    width: min(86vw, 300px); overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--sidebar); border-inline-end: 1px solid var(--hairline);
    box-shadow: var(--shadow-lg);
  }
  .layout[data-nav="open"] .sidebar { display: block; }
  .layout[data-nav="open"]::before {
    content: ""; position: fixed; inset: calc(61px + env(safe-area-inset-top, 0px)) 0 0; z-index: 59; background: #00000061;
    /* Without this a drag on the backdrop scrolls the article behind it. */
    touch-action: none;
  }
  .article {
    padding: 24px max(18px, env(safe-area-inset-right, 0px)) calc(72px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  }

  /* A CLI block must be readable without a sideways swipe. Lines wrap, and the
     hanging indent keeps a wrapped command from reading as two commands. */
  .sx-code { overflow-x: visible; }
  .sx-code code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-line { padding-inline-start: 2.2ch; text-indent: -2.2ch; }
  /* A command in a table cell may break, so the table fits the screen. */
  .prose th code, .prose td code, .sx-table th code, .sx-table td code { overflow-wrap: anywhere; }
  /* Tighter cells buy the columns a phone does not otherwise have room for. */
  .prose th, .prose td, .sx-table th, .sx-table td { padding: 8px 9px; }
}
@media (max-width: 560px) {
  /* One step down buys a wide matrix the columns it needs on a phone. */
  .prose table, .sx-table { font-size: 13px; }
  .prose th, .prose td, .sx-table th, .sx-table td { padding: 7px 8px; }
  .docs-suffix { display: none !important; }
  .locale-label { display: none !important; }
  .footer-cols { gap: 26px; }
  .header-row { gap: 10px; padding: 0 14px; }
  .brand img { height: 22px; width: 112px; }
}

/* Wide things scroll inside their own box rather than the page. No
   overflow-x:hidden on html/body — it breaks position:sticky in Safari. */
.article, .article > *, .blockgrid { max-width: 100%; }
.article > *, .article .prose { max-width: min(100%, var(--measure)); }
