/* Zcommerce user guides. Same palette, type and flat "fresh" style as the landing page
   (styles.css): solid brand blocks, pill controls, line icons, no gradients or glows. */
:root {
  --primary: #005a93;
  --accent: #00c7fb;
  --navy: #00375a;
  --ink: #0d1d2e;
  --ink-2: #44546a;
  --ink-3: #6b7a8f;
  --line: #e0ebf2;
  --sky: #dbf6fe;
  --mist: #f2f7fa;
  --bg: #ffffff;
  --ok: #157f3b;
  --ok-bg: #e6f6ec;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --warn-line: #f2b33d;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --r: 14px;
  --r-lg: 24px;
  --top: 64px;
  --side: 284px;
  --toc: 220px;
  --mark: polygon(35% 0, 100% 0, 65% 100%, 0 100%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.7; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
kbd { display: inline-block; font: 600 .78em/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(12px, 2.4vw, 28px); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand-sub { position: relative; padding-left: 14px; margin-right: 10px; font-weight: 700; color: var(--primary); text-decoration: none; font-size: 1rem; }
.brand-sub::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 9px; margin-top: -4px; background: var(--accent); clip-path: var(--mark); }
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--mist); }
.tabs a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.tabs a:hover { color: var(--primary); }
.tabs a[aria-current="true"] { background: var(--primary); color: #fff; }
.search-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; width: min(300px, 32vw); height: 40px; padding: 0 8px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--mist); color: var(--ink-3); cursor: pointer; text-align: left; font-size: .9rem; }
.search-btn span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-btn:hover { border-color: var(--primary); color: var(--ink-2); }
.search-btn .ico { width: 18px; height: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--mist); color: var(--ink); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--primary); }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--toc); align-items: start; }
.no-side .shell { display: block; max-width: none; }
.main { min-width: 0; padding: 28px clamp(20px, 4vw, 56px) 64px; }
.has-side .main { grid-column: 2; }
.no-side .main { padding: 0; }
.shell:not(:has(.toc)) { grid-template-columns: var(--side) minmax(0, 1fr); }

/* sidebar */
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-in { padding: 20px 14px 40px 20px; }
.aud-switch { display: none; gap: 4px; padding: 5px; border-radius: 18px; background: var(--mist); margin-bottom: 18px; }
.aud-switch a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 13px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.aud-switch a .ico { width: 18px; height: 18px; }
.aud-switch a:hover { color: var(--primary); background: rgba(255,255,255,.6); }
.aud-switch a[aria-current="true"] { background: var(--bg); color: var(--primary); box-shadow: 0 0 0 1px var(--line); }
.side-home { display: block; padding: 6px 10px; margin-bottom: 6px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: .95rem; letter-spacing: -.01em; }
.side-home:hover, .side-home.on { color: var(--primary); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree > li { margin-top: 2px; }
.tree summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; cursor: pointer; list-style: none; font-weight: 700; font-size: .9rem; color: var(--ink); user-select: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover { background: var(--mist); }
.tree .chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s; }
.tree details[open] > summary .chev { transform: rotate(90deg); }
.tree details ul { margin: 2px 0 8px 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.tree a { display: block; padding: 6px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .88rem; line-height: 1.4; }
.tree a:hover { color: var(--primary); background: var(--mist); }
.tree a[aria-current="page"] { background: var(--sky); color: var(--primary); font-weight: 700; position: relative; }
.tree a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 2px; background: var(--primary); }

/* table of contents */
.toc { position: sticky; top: var(--top); max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 32px 20px 32px 4px; font-size: .84rem; scrollbar-width: thin; }
.toc p { margin: 0 0 10px; font-size: .72rem; letter-spacing: .1em; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.4; }
.toc li.l3 a { padding-left: 24px; font-size: .8rem; }
.toc li a:hover { color: var(--primary); }
.toc li a.on { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* ---------------------------------------------------------------- article */
.doc { max-width: 780px; margin: 0 auto; }
.doc-wide { max-width: 1040px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 18px; font-size: .84rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumbs .ico { width: 14px; height: 14px; color: var(--line); stroke-width: 3; }
.doc-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
.lede { font-size: 1.1rem; color: var(--ink-2); line-height: 1.6; margin: 0; max-width: 62ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: .8rem; font-weight: 600; line-height: 1.3; }
.pill .ico { width: 15px; height: 15px; color: var(--primary); }
.pill-plan { background: var(--warn-bg); color: var(--warn); }
.pill-plan .ico { color: var(--warn); }

.aud-head { display: flex; gap: 20px; align-items: flex-start; }
.aud-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--primary); color: #fff; flex: none; }
.aud-ico .ico { width: 26px; height: 26px; }

/* prose */
.prose { font-size: 1rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--ink); letter-spacing: -.02em; line-height: 1.25; text-wrap: balance; }
.prose h2 { font-size: 1.5rem; font-weight: 800; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 1rem; font-weight: 700; margin: 1.5em 0 .4em; }
.prose .anchor { position: absolute; left: -1.1em; padding-right: .3em; color: var(--accent); text-decoration: none; opacity: 0; font-weight: 700; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose li > p { margin: 0 0 .5em; }
.prose li > ul, .prose li > ol { margin: .4em 0 .6em; }
.prose ul > li::marker { color: var(--primary); }
.prose code { font: .88em ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: var(--navy); color: #e6f4fb; border-radius: var(--r); padding: 16px 18px; overflow-x: auto; font-size: .86rem; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--line); color: var(--ink-2); }

/* numbered steps */
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; }
.prose ol.steps > li { position: relative; counter-increment: step; padding-left: 46px; margin: 0 0 14px; min-height: 30px; }
.prose ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--sky); color: var(--primary); font-weight: 800; font-size: .88rem; }
.prose ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: -12px; border-left: 2px dashed var(--line); }
.prose ol.steps ol.steps > li::before { background: var(--mist); color: var(--ink-2); width: 26px; height: 26px; border-radius: 8px; font-size: .8rem; }
.prose ol.steps ol.steps > li { padding-left: 40px; }
.prose ol.steps ol.steps > li::after { display: none; }
.prose ol.steps > li > .shot { margin-top: 10px; }

/* task checks "[ ]" / "[x]" */
.check { display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; border: 2px solid var(--line); border-radius: 5px; }
.check.on { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--primary); }
.prose ul:has(> li > .check) { list-style: none; padding-left: 0; }

/* callouts */
.callout { display: flex; gap: 14px; margin: 1.4em 0; padding: 16px 18px; border-radius: var(--r); background: var(--mist); border-left: 4px solid var(--ink-3); }
.callout > .ico { margin-top: 2px; color: var(--ink-2); }
.callout > div { min-width: 0; flex: 1; }
.callout > div > :last-child { margin-bottom: 0; }
.callout p { margin: 0 0 .6em; }
.callout-title { font-weight: 700; color: var(--ink); }
.callout-tip { background: var(--sky); border-left-color: var(--primary); }
.callout-tip > .ico { color: var(--primary); }
.callout-note { background: var(--mist); border-left-color: var(--accent); }
.callout-note > .ico { color: var(--primary); }
.callout-important { background: var(--ok-bg); border-left-color: var(--ok); }
.callout-important > .ico { color: var(--ok); }
.callout-warning { background: var(--warn-bg); border-left-color: var(--warn-line); }
.callout-warning > .ico { color: var(--warn); }
.callout-caution { background: var(--bad-bg); border-left-color: var(--bad); }
.callout-caution > .ico { color: var(--bad); }

/* screenshots */
.shot { margin: 1.4em 0 1.8em; }
.shot .zoom { display: block; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--mist); cursor: zoom-in; }
.shot .zoom:hover { border-color: var(--accent); }
.shot img { margin: 0 auto; border-radius: 10px; }
.shot.tall .zoom { width: auto; max-width: 340px; margin: 0 auto; }
.shot figcaption { margin-top: 10px; font-size: .86rem; color: var(--ink-3); text-align: center; line-height: 1.5; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; margin: 1.4em 0; }
.grid-2 .shot { margin: 0; }
.grid-2 .shot.tall .zoom { max-width: none; width: 100%; }

/* tables */
.table { margin: 1.2em 0 1.6em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { background: var(--mist); font-weight: 700; font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 600; color: var(--ink); }

/* FAQ / details */
.prose details.faq { margin: 0 0 10px; background: var(--mist); border-radius: 16px; padding: 0 18px; }
.prose details.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.prose details.faq summary::-webkit-details-marker { display: none; }
.prose details.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--primary); font-size: 1.15rem; font-weight: 600; transition: transform .2s; }
.prose details.faq[open] summary::after { transform: rotate(45deg); background: var(--primary); color: #fff; }
.prose details.faq > div { padding-bottom: 14px; color: var(--ink-2); }
.prose details.faq > div > :last-child { margin-bottom: 0; }

/* link cards ":::cards" */
.cards ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cards li { margin: 0; }
.cards li a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 700; }
.cards li a:hover { border-color: var(--primary); color: var(--primary); }

/* page footer */
.doc-foot { margin-top: 48px; }
.updated { font-size: .82rem; color: var(--ink-3); margin: 0 0 16px; }
.help { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: var(--mist); }
.help .ico { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: var(--bg); color: var(--primary); }
.help p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--primary); }
.pager small { display: block; color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.pager span { font-weight: 700; color: var(--primary); line-height: 1.4; }
.pager .next { text-align: right; grid-column: 2; }

/* section listing */
.page-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.page-list a { display: block; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.page-list a:hover { border-color: var(--primary); background: var(--mist); }
.pl-title { display: block; font-weight: 700; color: var(--ink); }
.pl-desc { display: block; margin-top: 2px; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.aud-intro { margin-bottom: 28px; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sec-card { padding: 22px 22px 18px; border-radius: 20px; background: var(--mist); }
.sec-card h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.015em; margin: 0 0 6px; }
.sec-card h2 a { color: var(--ink); text-decoration: none; }
.sec-card h2 a:hover { color: var(--primary); }
.sec-card p { margin: 0 0 12px; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.sec-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.sec-card li a { display: flex; gap: 8px; padding: 4px 0; font-size: .9rem; color: var(--ink-2); text-decoration: none; line-height: 1.45; }
.sec-card li a::before { content: ""; flex: none; width: 8px; height: 7px; margin-top: 7px; background: var(--accent); clip-path: var(--mark); }
.sec-card li a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- home */
.hero { background: var(--primary); color: #fff; margin: 10px clamp(8px, 1.4vw, 20px) 0; border-radius: 28px; padding: clamp(44px, 7vw, 92px) clamp(20px, 4vw, 40px); position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; clip-path: var(--mark); pointer-events: none; }
.hero::before { width: 320px; height: 240px; right: -40px; top: -40px; background: var(--accent); }
.hero::after { width: 240px; height: 180px; right: 160px; bottom: -80px; background: #2f7aa9; }
.hero-in { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: .78rem; letter-spacing: .1em; font-weight: 700; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.06; margin: 0 0 14px; color: #fff; }
.hero .lede { color: rgba(255,255,255,.86); margin: 0 auto 30px; }
.hero-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; height: 58px; margin: 0 auto; padding: 0 12px 0 20px; border: 0; border-radius: 999px; background: #fff; color: var(--ink-3); font-size: 1.02rem; cursor: pointer; text-align: left; }
.hero-search span { flex: 1; }
.hero-search .ico { color: var(--primary); }
.hero-search:hover { box-shadow: 0 0 0 4px rgba(0,199,251,.45); }
.aud-grid { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 32px) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.aud-card { display: flex; flex-direction: column; padding: 28px; border-radius: var(--r-lg); background: var(--mist); }
.aud-card .aud-ico { margin-bottom: 20px; }
.aud-card:nth-child(2) .aud-ico { background: var(--accent); color: var(--navy); }
.aud-card:nth-child(3) .aud-ico { background: var(--navy); }
.aud-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; margin: 0 0 8px; }
.aud-card h2 a { color: var(--ink); text-decoration: none; }
.aud-card h2 a:hover { color: var(--primary); }
.aud-card > p { color: var(--ink-2); margin: 0 0 18px; font-size: .95rem; line-height: 1.55; }
.aud-card ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 2px; }
.aud-card li a { display: flex; gap: 10px; padding: 5px 0; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; }
.aud-card li a::before { content: ""; flex: none; width: 9px; height: 8px; margin-top: 8px; background: var(--accent); clip-path: var(--mark); }
.aud-card li a:hover { color: var(--primary); }
.aud-card .more { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; }
.aud-card .more:hover { background: var(--navy); }
.aud-card .more .ico { width: 18px; height: 18px; }
.home-extra { max-width: 1200px; margin: 0 auto; padding: clamp(36px, 5vw, 64px) clamp(16px, 3vw, 32px) clamp(48px, 6vw, 80px); }
.home-extra .prose { max-width: none; }
.home-extra .prose h2 { margin-top: 0; }

/* ---------------------------------------------------------------- footer */
.foot { background: var(--mist); padding: 28px 0; font-size: .88rem; color: var(--ink-2); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 28px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- search dialog */
dialog { color: var(--ink); }
.search { width: min(680px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 48px)); margin: 8vh auto auto; padding: 0; border: 0; border-radius: 22px; background: var(--bg); box-shadow: 0 24px 60px rgba(0, 31, 53, .28); overflow: hidden; display: none; flex-direction: column; }
.search[open] { display: flex; }
.search::backdrop, .lightbox::backdrop { background: rgba(0, 31, 53, .55); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 20px; border-bottom: 1px solid var(--line); margin: 0; }
.search-box .ico { color: var(--primary); }
.search-box input { flex: 1; min-width: 0; height: 60px; border: 0; outline: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); }
.search-box input::-webkit-search-cancel-button { display: none; }
.esc { border: 1px solid var(--line); border-radius: 8px; background: var(--mist); padding: 3px 9px; font-size: .75rem; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.search-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-filter button { border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 4px 12px; font-size: .82rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.search-filter button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.search-res { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; }
.search-res li a { display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.search-res li a small { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.search-res li a b { display: block; font-weight: 700; line-height: 1.35; }
.search-res li a span { display: block; font-size: .86rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.search-res li a mark { background: var(--sky); color: var(--primary); border-radius: 3px; padding: 0 2px; }
.search-res li[aria-selected="true"] a, .search-res li a:hover { background: var(--mist); }
.search-res li[aria-selected="true"] a { box-shadow: inset 3px 0 0 var(--primary); }
.search-empty { margin: 0; padding: 28px 20px 34px; text-align: center; color: var(--ink-3); font-size: .95rem; }

/* lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94dvh; overflow: visible; }
.lightbox img { max-width: 96vw; max-height: 90dvh; width: auto; border-radius: 12px; background: #fff; }
.lb-close { position: absolute; right: -6px; top: -50px; background: #fff; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1220px) {
  .shell, .shell:not(:has(.toc)) { grid-template-columns: var(--side) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1100px) {
  .tabs { display: none; }
  .aud-switch { display: grid; }
}
@media (max-width: 920px) {
  .shell, .shell:not(:has(.toc)) { display: block; }
  .menu-btn { display: inline-grid; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; height: auto; width: min(320px, 88vw); background: var(--bg); transform: translateX(-102%); transition: transform .2s ease; box-shadow: none; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 31, 53, .25); }
  .overlay { position: fixed; inset: 0; z-index: 55; background: rgba(0, 31, 53, .45); }
  .main { padding: 22px 16px 48px; }
  .aud-grid { grid-template-columns: 1fr; }
  .search-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  .search-btn span, .search-btn kbd { display: none; }
  .brand span { display: none; }
  .brand-sub { padding-left: 12px; }
}
@media (max-width: 560px) {
  .doc-head h1 { font-size: 1.75rem; }
  .lede { font-size: 1rem; }
  .prose h2 { font-size: 1.3rem; }
  .prose ol.steps > li { padding-left: 40px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .aud-head { flex-direction: column; gap: 14px; }
  .hero-search kbd { display: none; }
  .hero { padding: 40px 18px 44px; }
  .hero::before { width: 120px; height: 90px; right: -40px; top: -30px; }
  .hero::after { width: 110px; height: 80px; right: 40px; bottom: -50px; }
  .aud-card { padding: 22px; }
  .search { margin-top: 12px; max-height: calc(100dvh - 24px); }
  .shot .zoom { padding: 6px; border-radius: 14px; }
  .prose .anchor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .top, .side, .toc, .foot, .help, .pager, .crumbs { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
}
