:root {
  --primary: #0a4d8c;
  --accent: #1e6fbb;
  --muted: #6c7480;
  --bg: #ffffff;
  --fg: #1f2937;
  --code-bg: #f5f5f7;
  --border: #e2e6ec;
  --callout-note-bg: #eef5fb;     --callout-note-bd: #2c7ec1;
  --callout-info-bg: #eef5fb;     --callout-info-bd: #2c7ec1;
  --callout-tip-bg: #ecf8ee;      --callout-tip-bd: #2e9e4b;
  --callout-hint-bg: #ecf8ee;     --callout-hint-bd: #2e9e4b;
  --callout-success-bg: #ecf8ee;  --callout-success-bd: #2e9e4b;
  --callout-warning-bg: #fff6e0;  --callout-warning-bd: #e08f00;
  --callout-caution-bg: #fff6e0;  --callout-caution-bd: #e08f00;
  --callout-danger-bg: #fdecec;   --callout-danger-bd: #cc2e2e;
  --callout-failure-bg: #fdecec;  --callout-failure-bd: #cc2e2e;
  --callout-bug-bg: #fdecec;      --callout-bug-bd: #cc2e2e;
  --callout-important-bg: #f3ecfb;--callout-important-bd: #7c3aed;
  --callout-example-bg: #f3ecfb;  --callout-example-bd: #7c3aed;
  --callout-abstract-bg: #eef5fb; --callout-abstract-bd: #2c7ec1;
  --callout-summary-bg: #eef5fb;  --callout-summary-bd: #2c7ec1;
  --callout-question-bg: #fff6e0; --callout-question-bd: #e08f00;
  --callout-quote-bg: #f4f4f6;    --callout-quote-bd: #6c7480;
}

* { box-sizing: border-box; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.8em;
  margin-bottom: .5em;
}
h1 { font-size: 1.9rem; border-bottom: 2px solid var(--primary); padding-bottom: .25em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: .75em 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a.wikilink { color: var(--accent); border-bottom: 1px dotted var(--accent); }
a.wikilink:hover { border-bottom-style: solid; }

span.broken-link {
  color: var(--muted);
  text-decoration: line-through;
  background: #fdecec;
  padding: 0 .2em;
  border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; margin: .8em 0; border-radius: 4px; }

code {
  background: var(--code-bg);
  padding: .12em .35em;
  border-radius: 3px;
  font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  font-size: .9em;
}
pre {
  background: var(--code-bg);
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.4;
}
pre code { background: transparent; padding: 0; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: .95em;
}
th, td {
  border: 1px solid var(--border);
  padding: .5em .8em;
  text-align: left;
  vertical-align: top;
}
th { background: #f7f9fb; font-weight: 600; }
tr:nth-child(even) td { background: #fafbfc; }

ul, ol { padding-left: 1.6em; }
li { margin: .25em 0; }

blockquote {
  margin: 1em 0;
  padding: .6em 1em;
  border-left: 4px solid var(--border);
  background: #fafbfc;
  color: var(--fg);
}

blockquote.callout {
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 0 6px 6px 0;
  padding: .9em 1.1em .9em 1.1em;
  margin: 1.1em 0;
}
blockquote.callout::before {
  content: attr(data-callout-title);
  display: block;
  font-weight: 600;
  margin-bottom: .35em;
  letter-spacing: .01em;
}
blockquote.callout > p:first-of-type { margin-top: 0; }
blockquote.callout > p:last-of-type { margin-bottom: 0; }

blockquote.callout-note,
blockquote.callout-info,
blockquote.callout-abstract,
blockquote.callout-summary  { background: var(--callout-info-bg);    border-left-color: var(--callout-info-bd); }
blockquote.callout-tip,
blockquote.callout-hint,
blockquote.callout-success,
blockquote.callout-check    { background: var(--callout-tip-bg);     border-left-color: var(--callout-tip-bd); }
blockquote.callout-warning,
blockquote.callout-caution,
blockquote.callout-question,
blockquote.callout-help     { background: var(--callout-warning-bg); border-left-color: var(--callout-warning-bd); }
blockquote.callout-danger,
blockquote.callout-failure,
blockquote.callout-fail,
blockquote.callout-missing,
blockquote.callout-bug      { background: var(--callout-danger-bg);  border-left-color: var(--callout-danger-bd); }
blockquote.callout-important,
blockquote.callout-example  { background: var(--callout-important-bg); border-left-color: var(--callout-important-bd); }
blockquote.callout-quote,
blockquote.callout-cite     { background: var(--callout-quote-bg);   border-left-color: var(--callout-quote-bd); }

blockquote.callout::before { color: currentColor; }
blockquote.callout-note::before,
blockquote.callout-info::before,
blockquote.callout-abstract::before,
blockquote.callout-summary::before  { color: var(--callout-info-bd); }
blockquote.callout-tip::before,
blockquote.callout-hint::before,
blockquote.callout-success::before  { color: var(--callout-tip-bd); }
blockquote.callout-warning::before,
blockquote.callout-caution::before,
blockquote.callout-question::before { color: var(--callout-warning-bd); }
blockquote.callout-danger::before,
blockquote.callout-failure::before,
blockquote.callout-bug::before      { color: var(--callout-danger-bd); }
blockquote.callout-important::before,
blockquote.callout-example::before  { color: var(--callout-important-bd); }
blockquote.callout-quote::before    { color: var(--callout-quote-bd); }

a.block-id { display: inline-block; width: 0; height: 0; }

/* hint shown on pages that fall back to the default language */
.i18n-note {
  background: var(--callout-info-bg);
  border-left: 4px solid var(--callout-info-bd);
  border-radius: 0 6px 6px 0;
  padding: .55em 1em;
  margin: .8em 0 1.1em;
  font-size: .9em;
  color: var(--fg);
}

section.page { padding: 0; }


/* ============================================================
   Online manual — layout, navigation, search.
   Appended after shared.css (which provides the content styling).
   ============================================================ */

:root {
  /* Branding colours injected from pipeline.json at build time. */
  --primary: #0a4d8c;
  --accent: #1e6fbb;
  --topbar-h: 56px;
  --sidebar-w: 320px;
  --sidebar-bg: #f7f9fb;
  --content-max: 860px;
}

html { scroll-behavior: smooth; }
body { margin: 0; }

/* scroll-margin so in-page #anchors clear the sticky topbar */
:target { scroll-margin-top: calc(var(--topbar-h) + 12px); }
.content h1, .content h2, .content h3, .content h4 { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* ---- top bar ---------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .8em;
  padding: 0 1.1em;
  background: var(--primary);
  color: #fff;
}
/* brand keeps its size but may shrink (ellipsis) before anything overflows */
.brand { display: flex; align-items: center; gap: .6em; color: #fff; text-decoration: none; flex: 0 1 auto; min-width: 0; }
.brand:hover { text-decoration: none; }
/* max-width:none overrides shared.css `img{max-width:100%}`, which would otherwise
   cap the logo's width while its height stays fixed — squashing it on tight bars. */
.brand-logo { height: 26px; width: auto; display: block; flex: 0 0 auto; max-width: none; }
.brand-title { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px; height: 34px;
  border: 0; background: transparent; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; height: 2px; width: 20px; background: #fff; border-radius: 2px; margin: 0 auto; }

/* ---- search ----------------------------------------------------------- */
/* takes the remaining room (capped), shrinks gracefully on narrow screens */
.search { position: relative; margin-left: auto; flex: 1 1 auto; min-width: 0; max-width: 420px; }
.lang-switch { flex: 0 0 auto; }
.nav-toggle { flex: 0 0 auto; }
.search input {
  width: 100%;
  height: 36px;
  padding: 0 .8em;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: .92rem;
  outline: none;
}
.search input::placeholder { color: rgba(255,255,255,.75); }
.search input:focus { background: #fff; color: var(--fg); border-color: #fff; }
.search input:focus::placeholder { color: var(--muted); }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(560px, 92vw);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(20,30,50,.18);
  z-index: 60;
}
.search-results[hidden] { display: none; }
.search-empty { padding: 1em 1.1em; color: var(--muted); font-size: .9rem; }
.search-hint { padding: .55em 1.1em; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--border); }
.search-hit {
  display: block;
  padding: .6em 1.1em;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
}
.search-hit:last-of-type { border-bottom: 0; }
.search-hit:hover, .search-hit.sel { background: #eef5fb; text-decoration: none; }
.search-hit .hit-chapter { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.search-hit .hit-title { display: block; font-weight: 600; color: var(--primary); margin: .15em 0 .2em; }
.search-hit .hit-snippet { display: block; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.search-hit mark { background: #ffe9a8; color: inherit; padding: 0 .1em; border-radius: 2px; }

/* ---- language switcher ------------------------------------------------ */
/* Compact: a couple of quick chips (EN, the current language, and — injected by
   site.js — the visitor's browser language) plus a globe dropdown listing them all. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: .4em;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  padding: 2px;
}
.lang-switch .lang {
  display: block;
  padding: .18em .55em;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch a.lang:hover { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.lang-switch .lang.current { background: #fff; color: var(--primary); }

/* globe dropdown */
.lang-more { position: relative; display: flex; align-items: center; }
.lang-more-btn {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: .18em .35em;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  line-height: 0;
}
.lang-more-btn:hover, .lang-more-btn[aria-expanded="true"] { background: rgba(255,255,255,.22); color: #fff; }
.lang-more .lang-globe { display: block; }
.lang-more .lang-chev { display: block; transition: transform .15s ease; }
.lang-more-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 168px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.lang-menu[hidden] { display: none; }
.lang-menu .lang-opt {
  display: block;
  padding: .42em .7em;
  border-radius: 5px;
  font-size: .9rem;
  color: #1f2937;
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu .lang-opt:hover, .lang-menu .lang-opt.sel { background: #eef5fb; color: var(--primary); text-decoration: none; }
.lang-menu .lang-opt.current { font-weight: 700; color: var(--primary); }
.lang-menu .lang-opt.current::after { content: " ✓"; color: var(--accent); }

/* ---- layout ----------------------------------------------------------- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 1em .7em 3em .9em;
  font-size: .9rem;
}

.content {
  padding: 1.6em 2.6em 4em;
  max-width: var(--content-max);
  width: 100%;
}
/* breadcrumb row: full ancestor trail (left) + "View as Markdown" link (right) */
.crumb-row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: .2em;
  min-height: 1.4em;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3em .45em;
  min-width: 0;
}
.content .crumb {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
a.crumb:hover { text-decoration: underline; }
.crumb-current { color: var(--muted); }     /* current folder index: not a link */
.crumb-sep { color: var(--muted); font-size: .8rem; line-height: 1; }
.md-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: .78rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.md-link:hover { color: var(--primary); text-decoration: none; }
.md-badge {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .1em .35em;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--code-bg);
  color: var(--muted);
}
.md-link:hover .md-badge { border-color: var(--accent); color: var(--accent); }

@media (max-width: 560px) {
  .md-link span:not(.md-badge) { display: none; } /* badge only on phones */
}

/* ---- sidebar nav ------------------------------------------------------ */
.site-nav ul { list-style: none; margin: 0; padding: 0; }

.site-nav .toc-link {
  display: block;
  flex: 1;
  min-width: 0;
  padding: .3em .5em;
  color: var(--fg);
  text-decoration: none;
  border-radius: 5px;
  line-height: 1.35;
}
.site-nav .toc-link:hover { background: #e6edf5; color: var(--primary); text-decoration: none; }
/* folder group without an index page: toggles via click, never navigates */
.site-nav .toc-folder { cursor: pointer; }
.site-nav .toc-link.active { background: var(--primary); color: #fff; font-weight: 600; }
.site-nav .toc-link.active:hover { background: var(--primary); color: #fff; }

/* row = label (left) + caret (right); labels align with the entries below */
.toc-row { display: flex; align-items: center; gap: 2px; }

.toc-caret {
  flex: 0 0 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 0;
}
.toc-caret:hover { background: #e6edf5; color: var(--primary); }
.toc-caret::before {
  content: "❯";
  font-size: 1rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .15s ease;
}
.toc-group.collapsed > .toc-row .toc-caret::before { transform: rotate(0deg); }
.toc-group.collapsed > .toc-sub { display: none; }

/* nesting indent + guide line (.site-nav prefix outweighs the ul reset above) */
.site-nav .toc-sub {
  margin: .05em 0 .25em .6em;
  padding-left: .7em;
  border-left: 1px solid var(--border);
}

.toc-chapter { margin-top: .5em; }
.toc-chap-link { font-weight: 600; color: var(--primary); }

/* ---- pager (prev / next) --------------------------------------------- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--border);
}
.pager a {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  padding: .7em 1em;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
}
.pager a:hover { border-color: var(--accent); background: #f7fafd; text-decoration: none; }
.pager-next { text-align: right; margin-left: auto; }
.pager-dir { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pager-title { font-weight: 600; color: var(--primary); }

/* ---- landing page ----------------------------------------------------- */
.hero {
  text-align: center;
  padding: 2.4em 1.5em 2.8em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 10px;
  margin-bottom: 2em;
}
.hero h1 { color: #fff; border: 0; padding: 0; margin: .3em 0 .2em; font-size: 2.1rem; }
.hero-logo { max-height: 64px; width: auto; margin: 0 auto; }
.hero-subtitle { opacity: .9; font-size: 1.05rem; margin: 0 0 1.2em; }
.hero-start {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  padding: .6em 1.4em;
  border-radius: 6px;
  text-decoration: none;
}
.hero-start:hover { text-decoration: none; opacity: .92; }

.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1em; }
.chapter-card {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 1em 1.2em;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.chapter-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(20,30,50,.08); text-decoration: none; }
.chapter-card .card-name { font-weight: 600; color: var(--primary); }

/* ---- "Connect this manual to your AI" -------------------------------- */
.ai-connect {
  margin-top: 2.5em;
  padding: 1.4em 1.6em 1.6em;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faff, #fff);
}
.ai-connect h2 { margin-top: 0; color: var(--primary); }
.ai-intro { color: var(--fg); margin: .2em 0 1.1em; max-width: 60ch; }
.ai-by-product { font-weight: 600; color: var(--fg); margin: 1.2em 0 .5em; }

.ai-resources { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; }
.ai-products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.ai-resource {
  display: flex;
  align-items: center;
  gap: .6em;
  padding: .55em .8em;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}
.ai-resource > a {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-resource > a:hover { text-decoration: underline; }
.ai-resource.ai-primary {
  border-color: var(--accent);
  background: #eef5fb;
}
.ai-resource.ai-primary > a::before {
  content: "📦 ";
}

.ai-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.ai-copy:hover { color: var(--primary); border-color: var(--accent); }
.ai-copy .ai-check { display: none; }
.ai-copy.copied { color: #2e9e4b; border-color: #2e9e4b; }
.ai-copy.copied svg:not(.ai-check) { display: none; }
.ai-copy.copied .ai-check { display: inline; }

.ai-agents { margin: 1.2em 0 0; font-size: .85rem; }
.ai-agents a { color: var(--muted); }
.ai-agents a:hover { color: var(--primary); }

/* ---- responsive: sidebar becomes an off-canvas drawer ---------------- */
.scrim {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  background: rgba(15,23,42,.4);
  z-index: 40;
}
.scrim[hidden] { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: min(86vw, var(--sidebar-w));
    z-index: 45;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 30px rgba(0,0,0,.18);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .content { padding: 1.2em 1.2em 3em; }
}

/* tight screens: drop the wordmark so logo + search + languages always fit.
   With only the logo left, stop .brand from shrinking — otherwise the fixed-width
   logo would overflow a shrunken container and clip into the search field. */
@media (max-width: 680px) {
  .topbar { gap: .55em; padding: 0 .7em; }
  .brand-title { display: none; }
  .brand { flex-shrink: 0; }
}

/* narrower still: hide the logo too (it's on the landing page) so the search
   field keeps a usable width — never squash the logo to make room. */
@media (max-width: 560px) {
  .brand { display: none; }
}

/* very small: trim the search affordance hint, keep the field usable */
@media (max-width: 420px) {
  .search input { font-size: .85rem; padding: 0 .6em; }
}
