/* User guide in the 2026-10-29 look (plan blr, phases 12–13; round 2
   re-themed to the blueprint identity: navy, drawing paper, gold, Archivo).
   Loaded after each page's own <style> and docs-extras.css on all five
   guide pages, so it only restyles: no layout ids, anchors or heights that
   docs.js depends on are changed. Latin display type is limited to the
   English and French pages; Arabic, Urdu and Hindi keep their script fonts. */

:root {
  --g-paper: #eef1f4;
  --g-paper-2: #e0e6ec;
  --g-card: #ffffff;
  --g-ink: #0b1b30;
  --g-ink-2: #0f2440;
  --g-text: #10233b;
  --g-muted: #55697f;
  --g-line: rgba(16, 35, 59, 0.12);
  --g-amber: #f2b01e;
  --g-amber-deep: #9a6a00;
  --g-blue: #1b5e8c;
  --g-green: #2e8b57;
  --g-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body { background: var(--g-paper); color: var(--g-text); }
html:is([lang="en"], [lang="fr"]) body { font-family: 'Archivo', var(--font-sans); }
html:is([lang="en"], [lang="fr"]) :is(.docs-section h2, .docs-section h3, .page-header h1) {
  font-family: 'Archivo', var(--font-sans);
  font-weight: 800; font-stretch: 112%; font-variation-settings: 'wdth' 112; text-transform: uppercase; letter-spacing: -0.005em;
}

/* ---------- banner ---------- */
.page-header { margin: 0; }
.page-header h1 { font-size: clamp(36px, 5.4vw, 64px); letter-spacing: -0.035em; }
.page-header p { font-size: 17px; max-width: 620px; }

/* ---------- language bar ---------- */
.lang-bar { background: transparent; border: 0; padding: 22px 0 0; }
.lang-bar-label { color: var(--g-muted); }
.lang-btn {
  border: 0; background: var(--g-card); color: var(--g-text); padding: 8px 14px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--g-line);
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s var(--g-ease);
}
.lang-btn:hover { background: var(--g-card); color: var(--g-text); box-shadow: inset 0 0 0 1.5px var(--g-amber); transform: translateY(-1px); }
.lang-btn.active, .lang-btn.active:hover { background: var(--g-ink); color: var(--g-paper); box-shadow: none; }

/* ---------- layout: Contents card + paper article ---------- */
.docs-layout { gap: 28px; padding: 28px 0 110px; grid-template-columns: 280px minmax(0, 1fr); }
.docs-divider { display: none; }

.docs-toc {
  background: var(--g-card); border: 0; border-radius: 4px; padding: 20px 14px 18px;
  top: 92px; max-height: calc(100vh - 112px);
  box-shadow: 0 1px 0 var(--g-line);
  scrollbar-width: thin; scrollbar-color: var(--g-paper-2) transparent;
}
.docs-toc h4 { color: var(--g-muted); padding: 0 10px; letter-spacing: 0.12em; }
.docs-toc > ul > li > a {
  font-size: 13.5px; color: var(--g-text); padding: 8px 12px; border-radius: 4px;
  display: flex; align-items: center; gap: 8px;
}
.docs-toc > ul > li > a:hover { background: var(--g-paper); color: var(--g-ink); }
.docs-toc > ul > li > a.active,
.docs-toc > ul > li > a.is-current { background: var(--g-ink); color: var(--g-paper); }
.docs-toc > ul > li > a.is-current::after {
  content: ''; margin-inline-start: auto; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: var(--g-amber); flex: none;
}
.docs-toc .sub { border-inline-start: 1px solid var(--g-line); margin-inline-start: 18px; padding-inline-start: 6px; }
.docs-toc .sub a { color: var(--g-muted); font-size: 12.5px; border-radius: 4px; }
.docs-toc .sub a:hover { color: var(--g-ink); background: var(--g-paper); }
.docs-toc .sub a.is-current { color: var(--g-amber-deep); font-weight: 600; background: rgba(242, 176, 30, 0.1); }

.docs-body {
  background: var(--g-card); border-radius: 4px; padding: 52px 56px 24px;
  counter-reset: gsec;
}

/* ---------- sections and headings ---------- */
.docs-section { margin-bottom: 88px; scroll-margin-top: 96px; counter-increment: gsec; }
.docs-section::before {
  content: counter(gsec, decimal-leading-zero);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--g-amber-deep);
}
.docs-section h2 {
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1.08; color: var(--g-ink);
  border-bottom: 0; padding-bottom: 0; margin-bottom: 18px; gap: 14px; align-items: center;
}
.docs-section h2 .sec-icon { width: 44px; height: 44px; border-radius: 4px; background: var(--g-ink) !important; }
.docs-section h2 .sec-icon svg { width: 20px; height: 20px; stroke: var(--g-amber) !important; }
.docs-section h3 {
  font-size: 21px; letter-spacing: -0.02em; color: var(--g-ink); margin: 40px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.docs-section h3::before { content: ''; width: 14px; height: 3px; border-radius: 3px; background: var(--g-amber); flex: none; }
.docs-section h4 { color: var(--g-ink); font-size: 15px; }
.docs-section p, .docs-section ul, .docs-section ol { color: #3e3c38; font-size: 15.5px; }
.docs-section > p:first-of-type { font-size: 17px; color: var(--g-text); }
.docs-section a:not(.lang-btn):not(.gl-anchor) { color: var(--g-blue); text-decoration: underline; text-decoration-color: rgba(27, 94, 140, 0.3); text-underline-offset: 3px; }
.docs-section a:not(.lang-btn):not(.gl-anchor):hover { text-decoration-color: var(--g-blue); }
.docs-section strong { color: var(--g-ink); }
.docs-section code { background: var(--g-paper); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; }

/* copy-link button beside headings (added by docs-look.js) */
.gl-anchor {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; flex: none;
  color: var(--g-muted); background: transparent; border: 0; cursor: pointer; opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.gl-anchor svg { width: 15px; height: 15px; }
:is(h2, h3):hover > .gl-anchor, .gl-anchor:focus-visible { opacity: 1; }
.gl-anchor:hover { background: var(--g-paper); color: var(--g-ink); }
.gl-anchor.is-copied { opacity: 1; color: var(--g-green); background: rgba(46, 139, 87, 0.1); }
@media (hover: none) { .gl-anchor { opacity: 0.55; } }

/* ---------- callouts ---------- */
.tip {
  background: rgba(242, 176, 30, 0.1); border: 0; border-radius: 4px; padding: 16px 18px 16px 20px;
  color: var(--g-text); position: relative;
  box-shadow: inset 3px 0 0 var(--g-amber);
}
[dir="rtl"] .tip { box-shadow: inset -3px 0 0 var(--g-amber); }
.tip strong { color: var(--g-amber-deep); }
.info-box {
  background: rgba(27, 94, 140, 0.06); border: 0; border-radius: 4px; padding: 20px 22px;
  color: var(--g-text); box-shadow: inset 0 0 0 1px rgba(27, 94, 140, 0.12);
}
.workflow-box {
  background: var(--g-ink); color: var(--g-paper); border: 0; border-radius: 4px; padding: 22px 24px;
}
.workflow-box h4 { color: var(--g-amber); }
.workflow-box :is(p, li, ol, ul) { color: rgba(232, 240, 250, 0.8); }
.workflow-box strong { color: var(--g-paper); }
.workflow-box .step-list li { color: rgba(232, 240, 250, 0.85); }

/* ---------- lists, badges, chips ---------- */
.step-list li::before { background: var(--g-ink); color: var(--g-amber); width: 26px; height: 26px; top: 0; font-size: 12.5px; }
[dir="rtl"] .step-list li { padding-left: 0; padding-right: 40px; }
[dir="rtl"] .step-list li::before { left: auto; right: 0; }
.feat-badge { background: var(--g-paper); color: var(--g-text); padding: 8px 14px; transition: transform 0.25s var(--g-ease), background 0.2s; }
.feat-badge svg { stroke: var(--g-amber-deep); }
.feat-badge:hover { background: var(--g-paper-2); transform: translateY(-1px); }
.perm-chip, .perm-item { background: var(--g-paper); border: 0; border-radius: 4px; }
.perm-chip .pkey, .perm-name { color: var(--g-blue); }
.badge-req { background: rgba(242, 176, 30, 0.16); color: var(--g-amber-deep); }
.badge-opt { background: var(--g-paper); color: var(--g-muted); }

/* ---------- tables ---------- */
.table-scroll { border-radius: 4px; box-shadow: inset 0 0 0 1px var(--g-line); }
.field-table th { background: var(--g-paper); color: var(--g-muted); border-bottom: 0; letter-spacing: 0.08em; }
.field-table th:first-child { border-start-start-radius: 4px; }
.field-table th:last-child { border-start-end-radius: 4px; }
.field-table td { border-bottom-color: var(--g-line); color: #3e3c38; }
.field-table .fname { color: var(--g-ink); }
.field-table tbody tr { transition: background 0.15s ease; }
.field-table tbody tr:hover { background: rgba(242, 176, 30, 0.06); }

/* ---------- app mockups: framed like a phone screen ---------- */
.screen-wrap {
  max-width: 520px; margin: 30px auto 38px; border-radius: 4px; background: #f5f7fa;
  box-shadow: 0 0 0 8px var(--g-ink), 0 0 0 9px rgba(11, 27, 48, 0.25), 0 40px 60px -30px rgba(11, 27, 48, 0.55);
  transition: transform 0.5s var(--g-ease), box-shadow 0.5s var(--g-ease);
}
.screen-wrap:hover { transform: translateY(-4px); }
.screen-topbar { padding: 16px 20px; }

/* ---------- search, phone bar, back to top ---------- */
.docs-search input { border: 0; border-radius: 4px; background: var(--g-paper); padding-top: 10px; padding-bottom: 10px; }
.docs-search input:focus { border-color: transparent; box-shadow: 0 0 0 2px var(--g-amber); background: var(--g-card); }
.docs-search-clear { background: var(--g-paper-2); }
.docs-hit:hover, .docs-hit:focus { background: var(--g-paper); border-color: transparent; }
.docs-results mark { background: rgba(242, 176, 30, 0.35); }
.docs-top { background: var(--g-ink); color: var(--g-amber); box-shadow: 0 14px 30px -12px rgba(11, 27, 48, 0.6); }

/* ---------- reading progress (added by docs-look.js) ---------- */
.gl-progress {
  position: fixed; inset-inline: 0; top: var(--docs-hdr, 64px); height: 3px; z-index: 99; pointer-events: none;
  background: linear-gradient(90deg, var(--g-amber), #ffc34d);
  transform-origin: 0 50%; transform: scaleX(0);
}
[dir="rtl"] .gl-progress { transform-origin: 100% 50%; }

/* ---------- motion ---------- */
.gl-motion .docs-section.gl-hide { opacity: 0; transform: translateY(26px); }
.gl-motion .docs-section { transition: opacity 0.8s var(--g-ease), transform 0.9s var(--g-ease); }

/* ---------- tablets and phones ---------- */
@media (max-width: 960px) {
  .page-header { margin: 0; }
  .page-header h1 { font-size: 34px; line-height: 1.08; }
  .docs-layout { padding: 14px 0 64px; }
  .docs-body { padding: 30px 22px 8px; border-radius: 4px; }
  .docs-section { margin-bottom: 60px; }
  .docs-section h2 { font-size: 27px; }
  .docs-section h2 .sec-icon { width: 38px; height: 38px; border-radius: 4px; }
  .docs-section h3 { font-size: 18.5px; margin-top: 32px; }
  .docs-mbar { background: rgba(232, 240, 250, 0.94); border-bottom: 1px solid var(--g-line); }
  .docs-mbar-toc { background: var(--g-ink); color: var(--g-paper); border-radius: 4px; }
  .docs-mbar .docs-search input { background: var(--g-card); box-shadow: inset 0 0 0 1px var(--g-line); }
  .docs-toc { top: var(--docs-bar, 120px); border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(11, 27, 48, 0.45); }
  .lang-bar { padding-top: 16px; }
  .gl-progress { top: var(--docs-bar, 120px); }
}
@media (max-width: 600px) {
  .docs-body { padding: 24px 16px 4px; margin: 0 -6px; }
  .screen-wrap { margin: 24px 4px 30px; border-radius: 4px; box-shadow: 0 0 0 6px var(--g-ink), 0 30px 50px -30px rgba(11, 27, 48, 0.55); }
  .table-scroll { box-shadow: none; border-radius: 0; }
  .field-table tr { border: 0; border-radius: 4px; background: var(--g-paper); }
  .field-table tbody tr:hover { background: var(--g-paper); }
  .field-table td.fname { border-bottom-color: var(--g-line); }
}

/* Round 2: drawing paper with a faint grid; the article is a drawing sheet. */
body {
  background-image: linear-gradient(rgba(16, 35, 59, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 35, 59, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.docs-body { position: relative; border: 1px solid var(--g-line); }
.docs-body::before, .docs-body::after { content: ''; position: absolute; width: 16px; height: 16px; border: solid var(--g-amber); pointer-events: none; }
.docs-body::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.docs-body::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.docs-toc { border: 1px solid var(--g-line); }
.docs-toc h4, .lang-bar-label, .field-table th { font-family: 'IBM Plex Mono', monospace; }
.screen-wrap { border-radius: 26px; }
.docs-top { border-radius: 4px; }
html:is([lang="ar"], [lang="ur"], [lang="hi"]) .docs-section :is(h2, h3) { text-transform: none; }
