/* Support site. Layout: a calm reading column framed by a guide tree and an outline; screenshots are the heroes.
   Palette drawn from the Tembo elephant: deep night blue, leaf green, sky blue. Each space keeps its own accent. */
@font-face { font-family: Outfit; src: url(fonts/outfit.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Fraunces; src: url(fonts/fraunces.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #f6f7f4; --surface: #fff; --sunken: #eef0ea; --ink: #14233a; --muted: #566274; --line: #dde1d9; --night: #12233f;
  --accent: #127a66; --accent-soft: #dff1ea; --on-accent: #fff; --tip-bg: #e6f4ee; --tip-ink: #0f5f4f; --warn-bg: #fdf1dd; --warn-ink: #84510a;
  --shadow: 0 1px 2px #14233a12, 0 12px 32px -16px #14233a33;
  --sans: Outfit, "Segoe UI", system-ui, sans-serif; --serif: Fraunces, Georgia, serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark; --bg: #0f1826; --surface: #162234; --sunken: #1c2a3f; --ink: #e8edf3; --muted: #a2afc0; --line: #2a3a52; --night: #0b1320;
  --accent: #4fd0b0; --accent-soft: #173b39; --on-accent: #06211b; --tip-bg: #15332f; --tip-ink: #8fe3cc; --warn-bg: #3a2b12; --warn-ink: #f4c778; --shadow: 0 1px 2px #0006, 0 12px 32px -16px #000a;
} }
:root[data-theme="dark"] {
  color-scheme: dark; --bg: #0f1826; --surface: #162234; --sunken: #1c2a3f; --ink: #e8edf3; --muted: #a2afc0; --line: #2a3a52; --night: #0b1320;
  --accent: #4fd0b0; --accent-soft: #173b39; --on-accent: #06211b; --tip-bg: #15332f; --tip-ink: #8fe3cc; --warn-bg: #3a2b12; --warn-ink: #f4c778; --shadow: 0 1px 2px #0006, 0 12px 32px -16px #000a;
}
.navy { --space: #2b5ea8; --space-soft: #e3ebf7; }
.green { --space: #1d8a5a; --space-soft: #e0f2e8; }
.copper { --space: #b4632a; --space-soft: #f8e9dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .navy { --space: #8fb6ec; --space-soft: #1d2f4b; } :root:not([data-theme="light"]) .green { --space: #6fd2a0; --space-soft: #17362a; } :root:not([data-theme="light"]) .copper { --space: #eeaa72; --space-soft: #3b2818; } }
:root[data-theme="dark"] .navy { --space: #8fb6ec; --space-soft: #1d2f4b; }
:root[data-theme="dark"] .green { --space: #6fd2a0; --space-soft: #17362a; }
:root[data-theme="dark"] .copper { --space: #eeaa72; --space-soft: #3b2818; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { margin: 0; font: 600 clamp(34px, 5vw, 50px)/1.08 var(--serif); letter-spacing: -.015em; }
h2 { margin: 56px 0 14px; font: 600 clamp(24px, 3vw, 29px)/1.2 var(--serif); }
h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 16px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--space, var(--accent)); }
.ic { width: 1.15em; height: 1.15em; flex: none; }
kbd { padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--muted); font: 500 12px var(--sans); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; padding: 8px 14px; background: var(--surface); }
.skip:focus { left: 12px; }

.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; min-height: 64px; padding-block: 8px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand img { width: 30px; height: 35px; }
.brand em { margin-left: 4px; font-style: normal; font-weight: 400; color: var(--muted); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { padding: 6px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted); }
.top-nav a:hover { background: var(--sunken); color: var(--ink); }
.top-nav a[aria-current] { background: var(--sunken); color: var(--ink); }
.top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-open { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 15px; }
.tool { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.menu-open { display: none; }

.home, .videos { max-width: 1160px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.hero { display: grid; justify-items: center; gap: 8px; padding-block: clamp(48px, 9vw, 92px) 44px; text-align: center; }
.hero .lead { max-width: 60ch; margin: 8px 0 22px; }
.hero-search { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); min-height: 58px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); text-align: left; }
.hero-search span { flex: 1; min-width: 0; }
.portals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.portal { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.portal:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.portal img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; border-bottom: 1px solid var(--line); }
.portal div { display: grid; gap: 4px; padding: 18px 20px 20px; }
.portal h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--space); font-size: 24px; }
.portal p { margin: 0; color: var(--muted); }
.portal span { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 15px; font-weight: 600; }
.home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; padding-block: 24px 72px; }
.home-split h2 { margin-top: 40px; }
.popular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.popular a { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-decoration: none; font-weight: 500; line-height: 1.3; }
.popular a:hover { border-color: var(--accent); }
.popular small { display: block; color: var(--muted); font-weight: 400; }
.home-videos { display: grid; gap: 14px; margin-bottom: 14px; }
.home-videos .demo { margin: 0; }
.cta { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; }
.cta:hover { text-decoration: underline; }

.space { max-width: 1160px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); padding-bottom: 72px; }
.space-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center; padding-block: 52px; }
.space-hero img { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.space-count { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.space-group header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.space-group h2 { margin: 0; }
.space-group header p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; line-height: 1.35; }
.card:hover { border-color: var(--space); }
.card strong { font-weight: 600; }
.card span { color: var(--muted); font-size: 15px; }
.card em { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--space); font-size: 13px; font-style: normal; font-weight: 600; }

.docs { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 44px; max-width: 1460px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.side { position: sticky; top: 64px; align-self: start; max-height: calc(100dvh - 64px); overflow-y: auto; padding-block: 24px; font-size: 15px; scrollbar-width: thin; }
.side-home { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 18px; font-weight: 600; color: var(--space); text-decoration: none; }
.side-group h3 { margin: 16px 0 6px; font-size: 12px; }
.side ul { margin: 0; padding: 0; list-style: none; }
.side li a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; line-height: 1.3; }
.side li a:hover { color: var(--ink); background: var(--sunken); }
.side li a[aria-current] { background: var(--space-soft); color: var(--space); font-weight: 600; }
.article { min-width: 0; max-width: 820px; padding-block: 28px 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; }
.article .lead { margin: 12px 0 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; font-size: 14px; }
.where { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--space-soft); color: var(--space); font-weight: 500; }
.module { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.toc { position: sticky; top: 88px; align-self: start; padding-block: 32px; font-size: 14px; }
.toc h3 { margin: 0 0 8px; font-size: 12px; }
.toc ul { margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); list-style: none; }
.toc li { margin-bottom: 6px; line-height: 1.3; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--space); }

.steps { display: grid; gap: 8px; margin: 18px 0 24px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 10px 14px 10px 50px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--space-soft); color: var(--space); font-size: 14px; font-weight: 700; }
.points { display: grid; gap: 6px; margin: 14px 0 22px; padding-left: 20px; }
.points li::marker { color: var(--space); }
.note { display: flex; gap: 12px; margin: 24px 0; padding: 14px 16px; border-radius: 12px; }
.note .ic { width: 22px; height: 22px; margin-top: 2px; }
.note strong { display: block; font-size: 15px; }
.note p { margin: 2px 0 0; font-size: 16px; }
.tip { background: var(--tip-bg); color: var(--tip-ink); }
.warn { background: var(--warn-bg); color: var(--warn-ink); }
.table { overflow-x: auto; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--sunken); font-size: 13px; font-weight: 600; color: var(--muted); }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }

.shot { margin: 26px 0 30px; }
.shot-frame { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); box-shadow: var(--shadow); cursor: zoom-in; }
.shot.phone .shot-frame { width: min(300px, 100%); margin-inline: auto; border-radius: 22px; }
.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
.shot.phone figcaption { text-align: center; }
.marker { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 2px solid #fff; border-radius: 50%; background: #127a66; color: #fff; font-size: 13px; font-weight: 700; line-height: 1; box-shadow: 0 2px 8px #0005; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.35; }
.legend li { position: relative; padding-left: 30px; }
.legend li[data-n]::before { content: attr(data-n); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #127a66; color: #fff; font-size: 12px; font-weight: 700; }
.legend li.unmarked::before { content: ""; position: absolute; left: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.demo { margin: 26px 0 30px; }
.demo-frame { overflow: hidden; border-radius: 14px; background: var(--night); box-shadow: var(--shadow); }
.demo video { width: 100%; aspect-ratio: 16 / 9; }
.demo.phone .demo-frame { width: min(300px, 100%); margin-inline: auto; border-radius: 22px; }
.demo.phone video { aspect-ratio: 390 / 844; }
.demo figcaption { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; font-weight: 500; }
.demo.phone figcaption { justify-content: center; }
.demo figcaption .ic { color: var(--accent); }
.demo figcaption small { margin-left: auto; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.demo.phone figcaption small { margin-left: 6px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-weight: 600; text-decoration: none; line-height: 1.3; }
.pager a:hover { border-color: var(--space); }
.pager .next { text-align: right; }
.pager small { display: block; color: var(--muted); font-weight: 400; }

.videos { padding-block: 44px 72px; }
.video-group h2 { display: flex; align-items: center; gap: 10px; color: var(--space); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.video-grid .demo { margin: 0 0 6px; }
.video-grid .demo.phone .demo-frame { width: min(230px, 100%); }
.video-grid a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: none; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 48px; padding-block: 32px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); border-top: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.foot p { max-width: 68ch; margin: 4px 0 0; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot nav a { color: var(--muted); text-decoration: none; }

dialog { color: var(--ink); }
dialog::backdrop { background: #0b1320b3; backdrop-filter: blur(3px); }
.search { width: min(680px, calc(100vw - 24px)); max-height: min(70dvh, 620px); margin: 10vh auto auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 30px 80px -30px #000a; }
.search[open] { display: flex; flex-direction: column; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 18px; }
.search-results { flex: 1; min-height: 0; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; line-height: 1.35; }
.search-results a:hover, .search-results a.on { background: var(--sunken); }
.search-results strong { font-weight: 600; }
.search-results span { display: block; color: var(--muted); font-size: 14px; }
.search-results small { color: var(--accent); font-weight: 600; }
.search-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.zoom { width: min(96vw, 1500px); max-width: none; max-height: 94dvh; padding: 0; overflow: auto; border: 0; border-radius: 12px; background: var(--surface); }
.zoom-close { position: sticky; top: 8px; float: right; z-index: 2; width: 38px; height: 38px; margin: 8px 8px -46px 0; border: 0; border-radius: 50%; background: #0b1320cc; color: #fff; font-size: 22px; line-height: 1; }
.zoom-body { position: relative; }
.zoom-body.phone { width: min(420px, 100%); margin: 0 auto; }
.zoom-body img { width: 100%; }

@media (max-width: 1240px) { .docs { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 64px; left: 0; bottom: 0; z-index: 25; width: min(320px, 86vw); max-height: none; padding: 20px; border-right: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; }
  body:not([data-space]) .menu-open { display: none; }
  .menu-open { display: grid; }
  .top-nav { display: none; }
  .portals, .home-split, .space-hero { grid-template-columns: minmax(0, 1fr); }
  .search-open span, .search-open kbd, .hero-search kbd { display: none; }
}
@media (max-width: 960px) { body:not([data-space]) .top-nav { display: flex; margin-left: auto; overflow-x: auto; } body:not([data-space]) .top-nav a { padding: 6px 8px; font-size: 14px; } body:not([data-space]) .top-tools { margin-left: 0; } }
@media (max-width: 640px) { .brand em { display: none; } .popular { grid-template-columns: minmax(0, 1fr); } .pager { grid-template-columns: minmax(0, 1fr); } .marker { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: 10px; border-width: 1px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .portal, .side { transition: none; } }
@media print { .top, .side, .toc, .foot, .pager, dialog { display: none; } .docs { display: block; } }
