/* The BZG help site. Built by help/build.py; the same sheet serves the site and the one-page preview.
   Layout: a top bar with search, then contents rail · reading column · on-this-page rail. */
:root {
  --bg: #fbfbfd;
  --tint: #f1f1f6;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #62626a;
  --line: rgba(0, 0, 0, .1);
  --accent: #5148d4;
  --select: rgba(81, 72, 212, .1);
  --mark: rgba(255, 196, 60, .45);
  --scrim: rgba(20, 20, 30, .38);
  --note-bg: #eef0ff; --note-line: #7a72f0;
  --tip-bg: #e9f7ee; --tip-line: #2f9e5b;
  --warn-bg: #fff5dc; --warn-line: #d99a00;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 10px 34px rgba(0, 0, 0, .1);
  --float: 0 0 0 .5px rgba(0, 0, 0, .2), 0 24px 70px rgba(0, 0, 0, .28);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bar: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171a; --tint: #24242a; --card: #1e1e23; --text: #f2f2f4; --muted: #a4a4ad;
    --line: rgba(255, 255, 255, .13); --accent: #aaa4ff; --select: rgba(170, 164, 255, .16);
    --mark: rgba(255, 196, 60, .3); --scrim: rgba(0, 0, 0, .6);
    --note-bg: #23224a; --note-line: #8f88ff; --tip-bg: #17301f; --tip-line: #4cc27c;
    --warn-bg: #3a2f10; --warn-line: #e6b23a;
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .16), 0 10px 34px rgba(0, 0, 0, .5);
    --float: 0 0 0 .5px rgba(255, 255, 255, .2), 0 24px 70px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17171a; --tint: #24242a; --card: #1e1e23; --text: #f2f2f4; --muted: #a4a4ad;
  --line: rgba(255, 255, 255, .13); --accent: #aaa4ff; --select: rgba(170, 164, 255, .16);
  --mark: rgba(255, 196, 60, .3); --scrim: rgba(0, 0, 0, .6);
  --note-bg: #23224a; --note-line: #8f88ff; --tip-bg: #17301f; --tip-line: #4cc27c;
  --warn-bg: #3a2f10; --warn-line: #e6b23a;
  --shadow: 0 0 0 .5px rgba(255, 255, 255, .16), 0 10px 34px rgba(0, 0, 0, .5);
  --float: 0 0 0 .5px rgba(255, 255, 255, .2), 0 24px 70px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd { font: 12px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--card); }
.wrap { max-width: 1240px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar .wrap { height: var(--bar); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { color: var(--muted); font-weight: 450; }
.bzg { display: block; flex: none; width: 27px; height: 23px; background: var(--text); -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.hero .bzg { width: 66px; height: 56px; margin-bottom: 4px; }
.bar .all { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.find { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(320px, 46vw); height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); cursor: pointer; font-size: 14.5px; }
.find:hover { border-color: var(--accent); }
.find svg { flex: none; }
.find span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Three columns */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 48px; align-items: start; padding-block: 28px 64px; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar) + 24px); max-height: calc(100vh - var(--bar) - 48px); overflow-y: auto; }
nav summary { display: none; }
nav h2, .toc h2 { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px 10px; }
nav h2:first-of-type, .toc h2 { margin-top: 0; }
nav ul, .toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
nav a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--text); font-size: 14.5px; line-height: 1.35; }
nav a:hover { background: var(--tint); text-decoration: none; }
nav a[aria-current="page"] { background: var(--select); color: var(--accent); font-weight: 550; }
.toc a { display: block; padding: 4px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { border-color: var(--accent); color: var(--accent); }

/* Article */
article { min-width: 0; max-width: 700px; }
.crumb { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.crumb a { color: var(--muted); }
article h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; font-weight: 680; margin: 0 0 10px; text-wrap: balance; }
.summary { font-size: 19px; line-height: 1.45; color: var(--muted); margin: 0 0 28px; }
.body h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; font-weight: 650; margin: 40px 0 10px; text-wrap: balance; scroll-margin-top: calc(var(--bar) + 24px); }
.body h3 { font-size: 17px; font-weight: 650; margin: 26px 0 6px; }
.body p { margin: 0 0 14px; }
.body ul, .body ol { margin: 0 0 14px; padding-left: 24px; }
.body li { margin: 5px 0; }
.body li > ul, .body li > ol { margin: 5px 0 0; }
.body .shot { display: block; width: 100%; padding: 0; margin: 22px 0 26px; border: 0; background: none; border-radius: 10px; cursor: zoom-in; }
.body img { display: block; max-width: 100%; height: auto; margin: 22px auto 26px; border-radius: 10px; box-shadow: var(--shadow); }
.body .shot img { margin: 0 auto; }
.body code { font: 14px var(--mono); background: var(--tint); padding: 1.5px 6px; border-radius: 5px; }
.body .table { overflow-x: auto; margin: 0 0 18px; }
.body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.body th, .body td { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
.body th { font-size: 13px; font-weight: 600; color: var(--muted); }
.body td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.body [class^="callout-"] { border-left: 3px solid; border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 20px 0; }
.body [class^="callout-"] p { margin: 0; }
.callout-blue { background: var(--note-bg); border-color: var(--note-line); }
.callout-green { background: var(--tip-bg); border-color: var(--tip-line); }
.callout-yellow { background: var(--warn-bg); border-color: var(--warn-line); }
.pager { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 2px; max-width: 48%; }
.pager a.next { text-align: right; margin-left: auto; }
.pager small { color: var(--muted); font-size: 12.5px; }

/* Home */
.home { padding-block: 44px 64px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 44px; }
.hero img { width: 72px; height: 72px; }
.hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.025em; font-weight: 700; margin: 0; text-wrap: balance; }
.hero p { margin: 0; color: var(--muted); font-size: 18px; }
.hero .find { margin: 8px 0 0; width: min(560px, 100%); height: 50px; font-size: 16.5px; padding: 0 14px 0 16px; border-radius: 14px; box-shadow: 0 4px 18px rgba(0, 0, 0, .06); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.starts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 44px; }
.starts a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.starts a:hover { border-color: var(--accent); text-decoration: none; }
.starts b { font-weight: 620; }
.starts span { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px 40px; }
.cats h2 { font-size: 17px; font-weight: 650; margin: 0 0 8px; }
.cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cats a { font-size: 15px; line-height: 1.4; }
.contact { margin-top: 56px; padding: 22px 24px; border-radius: 14px; background: var(--tint); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.contact b { font-weight: 650; }
.contact p { margin: 0; color: var(--muted); }
.contact .mail { display: flex; align-items: center; gap: 10px; }
.contact code { font: 15px var(--mono); user-select: all; }
.contact button, .none button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 14px; font-size: 14.5px; font-weight: 550; cursor: pointer; }
.contact button:hover, .none button:hover { border-color: var(--accent); }
article .contact { margin-top: 44px; padding: 16px 20px; }
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.apps a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); }
.apps a:hover { border-color: var(--accent); text-decoration: none; }
.apps img { width: 48px; height: 48px; flex: none; }
.apps b { display: block; font-size: 17px; font-weight: 650; }
.apps span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.4; }

/* Search palette and image viewer */
dialog { border: 0; padding: 0; background: none; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: var(--scrim); }
#palette { width: min(640px, calc(100vw - 24px)); margin: max(10vh, calc(env(safe-area-inset-top, 0px) + 12px)) auto 0; }
.pal { background: var(--card); border-radius: 14px; box-shadow: var(--float); overflow: hidden; display: flex; flex-direction: column; max-height: min(70vh, 560px); }
.pal header { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal input { flex: 1; min-width: 0; height: 54px; border: 0; outline: 0; background: none; color: var(--text); font: 17px var(--font); }
.pal .results { overflow-y: auto; padding: 8px; }
.pal .group { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.pal a { display: block; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.pal a:hover { text-decoration: none; }
.pal a.on { background: var(--select); }
.pal a b { font-weight: 600; display: block; line-height: 1.35; }
.pal a small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pal a em { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 450; }
.pal mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.pal .none { padding: 26px 16px; color: var(--muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pal footer { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
#zoom { width: 100vw; height: 100vh; cursor: zoom-out; }
#zoom div { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
#zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--float); }

@media (max-width: 1100px) { .shell { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 16px 56px; }
  .rail { position: static; max-height: none; }
  nav { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
  nav summary { display: block; cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 15px; }
  nav .list { padding: 4px 6px 12px; }
  article h1 { font-size: 28px; }
  .summary { font-size: 17px; }
  .pager a { max-width: 100%; }
  .brand span, .find kbd, .bar .all { display: none; }
  .starts { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 31px; }
  .home { padding-block: 28px 56px; }
  .pal footer { display: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Guides brought over from Help Scout use a few more elements. */
.body h1 { font-size: 24px; line-height: 1.25; font-weight: 660; margin: 36px 0 10px; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.body figure { margin: 22px auto 26px; max-width: 100%; }
.body figure img, .body figure .shot { margin-bottom: 8px; }
.body figcaption { color: var(--muted); font-size: 14px; text-align: center; }
.body pre { background: var(--tint); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.5 var(--mono); }
.body pre code { background: none; padding: 0; }
.body table { display: block; overflow-x: auto; }
.body .table table { display: table; }
