/*
  Locul setup guides: shared template. Loads AFTER /assets/pv.css (tokens, nav, footer,
  buttons, .faq, .cta-panel, .route, .rv reveal all come from pv.css).

  PAGE ANATOMY (copy /setup/on-premise/index.html as the reference for a provider page)

  <head>   pv.css?v=2, setup.css?v=1, pv.js?v=1 (defer), setup.js?v=1 (defer), ph.js.
           canonical, OG, theme-color, one JSON-LD @graph: Article (author = Junaid Person
           @id), BreadcrumbList, HowTo (the numbered steps), FAQPage (the FAQ block).
  <header class="nav">           same nav as every page (no aria-current on guides).
  <section class="phero su-hero">  .grain, .crumbs (Locul / Setup guides / Page),
           .eyebrow, h1, p.lede, then:
           .su-quick          quick-answer box, must sit in the first 120 words.
             .su-quick-h      label line ("Quick answer").
           .su-meta           "Updated <time datetime>", author link, read time.
           .su-where.<kind>   pill saying where prompts go. kinds: us | region | office | device.
  <section class="su-diagram">   figure.su-fig > svg.route and figcaption. One "where your
           prompts go" diagram per page. Ship two SVGs: .su-svg-d (wide, desktop) and
           .su-svg-m (tall, phone) so labels stay readable. Zones: rect.zone(.region|.us),
           labels text.z-lbl(.region|.us), animated lines path.ln-a (EU) .ln-w (US) .ln-o
           (office or device).
  <div class="wrap su-layout">
    <nav class="su-toc">          "On this page" list of #anchors (sticky on desktop,
                                  collapses above the article on mobile).
    <article class="su-body">     the prose. Each h2 is a question with an id, and its
                                  first <p class="su-lead"> answers it in one sentence.
      ol.su-steps > li            numbered steps, each li: h3 + p + optional .su-code.
      .su-code                    terminal block: <div class="su-code"><div class="su-code-top">
                                  <span>bash</span><button class="su-copy">Copy</button></div>
                                  <pre><code>...</code></pre></div>. setup.js wires Copy.
                                  Add .out to show real captured output (dimmer, no copy).
      .su-table                   wrapper div around a <table> (scrolls sideways on phones).
      blockquote.su-quote         quote from primary docs; <cite><a href>Source</a></cite>.
      .su-note.<kind>             callout. kinds: tip | us | warn | ok.
      .su-example                 a real-feeling worked example: .su-ex-head (from/subject
                                  lines) + .su-ex-body. Gate the text with Jev realism first.
      .su-bench                   benchmark slot. Keep the <!-- BENCHMARK-SLOT: ... -->
                                  comment inside it until real numbers exist. Never invent.
      .su-provgrid > a.su-prov    provider cards (hub + region pages): .su-flag (country
                                  code), h3, p, .su-prov-go.
      .su-sources                 numbered list of every external source used.
      .su-author                  author block (photo, name, role, one line).
      .faq                        from pv.css: <details><summary>Q</summary><p>A</p></details>.
      .su-next                    links to the sibling guides.
  .cta-panel (pv.css) in a .sec, then the standard footer.

  Hub only: .su-paths > a.su-path (four path cards with .su-path-art mini SVG).
  No prices on any guide page: link to the provider's own pricing page instead.
*/

:root { --warn: #9a5b06; --warn-soft: #fbefd9; --su-code-bg: #0d1117; --su-code-ink: #dfe4ec; --su-code-dim: #8a94a6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --warn: #f0b45c; --warn-soft: #2a1f0e; --su-code-bg: #0a0d12; }
}
:root[data-theme="dark"] { --warn: #f0b45c; --warn-soft: #2a1f0e; --su-code-bg: #0a0d12; }

/* ---------- Hero ---------- */
.su-hero h1 { max-width: 940px; }
.su-hero .lede { max-width: 720px; }
.su-quick { position: relative; margin: 30px 0 0; max-width: 760px; padding: 22px 24px 22px 26px; border-radius: var(--radius); background: color-mix(in oklab, var(--surface) 88%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); backdrop-filter: blur(6px); }
.su-quick::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 30%, transparent)); }
.su-quick-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.su-quick p { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.6; }
.su-quick p + p, .su-quick ol, .su-quick ul { margin-top: 10px; }
.su-quick ol, .su-quick ul { padding-left: 20px; margin-bottom: 0; color: var(--ink-2); font-size: 16px; }
.su-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.su-meta a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.su-meta a:hover { color: var(--ink); }
.su-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .6; }
.su-where { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; }
.su-where::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.su-where.us { color: var(--warn); background: var(--warn-soft); }
.su-where.region { color: var(--accent-ink); background: var(--accent-soft); }
.su-where.office, .su-where.device { color: var(--ok); background: var(--ok-soft); }

/* ---------- Diagram ---------- */
.su-diagram { padding: 0 0 clamp(40px, 6vw, 72px); }
.su-fig { margin: 0; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow-1); padding: clamp(18px, 3vw, 36px); overflow: hidden; position: relative; }
.su-fig::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(color-mix(in oklab, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%); }
.su-fig svg { position: relative; z-index: 1; }
.su-fig figcaption { position: relative; z-index: 1; margin-top: 16px; font-size: 14.5px; color: var(--ink-3); max-width: 760px; }
.route .zone { fill: color-mix(in oklab, var(--ok-soft) 70%, transparent); stroke: var(--ok); stroke-width: 1.2; stroke-dasharray: 5 5; }
.route .zone.region { fill: color-mix(in oklab, var(--accent-soft) 70%, transparent); stroke: var(--accent); }
.route .zone.us { fill: color-mix(in oklab, var(--warn-soft) 80%, transparent); stroke: var(--warn); }
.route .z-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; font-weight: 500; fill: var(--ok); }
.route .z-lbl.region { fill: var(--accent-ink); }
.route .z-lbl.us { fill: var(--warn); }
.route .ln-w { stroke: var(--warn); stroke-width: 2; fill: none; stroke-dasharray: 4 10; stroke-linecap: round; animation: flow 1.4s linear infinite; }
.route .ln-o { stroke: var(--ok); stroke-width: 2; fill: none; stroke-dasharray: 4 10; stroke-linecap: round; animation: flow 1.4s linear infinite; }
.route .dot-ok { fill: var(--ok); }
.route .dot-w { fill: var(--warn); }
.route .chip-bg { fill: var(--bg); stroke: var(--line-2); }
.route .led { fill: var(--ok); animation: led 2.4s ease-in-out infinite; }
.route .led:nth-of-type(2n) { animation-delay: .7s; }
.route .ink-3 { fill: var(--ink-3); }
.route .stroke-2 { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.route .t-mono { font-family: var(--font-mono); font-size: 11px; font-weight: 500; fill: var(--ink-2); letter-spacing: .02em; }
@media (max-width: 560px) { .route .t-sub { display: none; } }
/* Wide diagrams ship a tall phone version: svg.su-svg-d (desktop) + svg.su-svg-m (phone). */
.su-svg-m { display: none; }
@media (max-width: 640px) { .su-svg-d { display: none; } .su-svg-m { display: block; } }

/* ---------- Hub path cards ---------- */
.su-paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .su-paths { grid-template-columns: 1fr; } }
.su-path { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-1); transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .25s ease; overflow: hidden; }
.su-path:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.su-path:active { transform: translateY(-1px) scale(.995); }
.su-path-art { height: 132px; margin: -8px -8px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.su-path-art svg { width: 100%; height: 100%; }
.su-path .su-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-3); }
.su-path h3 { font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -.01em; margin: 6px 0 8px; }
.su-path p { margin: 0 0 18px; color: var(--ink-2); font-size: 16px; }
.su-path .su-where { align-self: flex-start; margin-top: auto; }
.su-path .su-go { margin-top: 16px; font-weight: 700; font-size: 15px; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 8px; }
.su-path .su-go .arr { transition: transform .18s ease; }
.su-path:hover .su-go .arr { transform: translateX(4px); }

/* ---------- Provider cards ---------- */
.su-provgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
@media (max-width: 960px) { .su-provgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .su-provgrid { grid-template-columns: 1fr; } }
.su-prov { display: grid; grid-template-columns: 46px 1fr; gap: 4px 14px; align-items: start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.su-prov:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-1); }
.su-flag { grid-row: span 3; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.su-prov h3 { font-size: 17px; margin: 2px 0 0; }
.su-prov p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.su-prov .su-prov-go { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--accent-ink); margin-top: 6px; }
.su-prov.soon { opacity: .72; }
.su-prov.soon:hover { transform: none; border-color: var(--line); box-shadow: none; }

/* ---------- Article layout ---------- */
.su-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: clamp(56px, 8vw, 96px); }
@media (max-width: 1000px) { .su-layout { grid-template-columns: 1fr; gap: 24px; } }
.su-toc { position: sticky; top: 92px; font-size: 14px; }
.su-toc h2 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.su-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.su-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); line-height: 1.4; transition: color .15s ease, border-color .15s ease; }
.su-toc a:hover { color: var(--ink); }
.su-toc a.on { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 1000px) {
  .su-toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
  .su-toc ol { columns: 2; column-gap: 20px; border: 0; }
  .su-toc a { padding: 4px 0; border: 0; break-inside: avoid; }
}
@media (max-width: 560px) { .su-toc ol { columns: 1; } }

.su-body { max-width: 780px; min-width: 0; }
.su-body > section { scroll-margin-top: 90px; }
.su-body > section + section { margin-top: clamp(48px, 6vw, 72px); }
.su-body h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 16px; scroll-margin-top: 90px; }
.su-body h3 { margin: 28px 0 8px; }
.su-body p, .su-body li { color: var(--ink-2); }
.su-body p { margin: 0 0 16px; }
.su-body .su-lead { color: var(--ink); font-size: 18.5px; line-height: 1.6; }
.su-body ul, .su-body ol:not(.su-steps) { padding-left: 22px; margin: 0 0 18px; }
.su-body li { margin: 6px 0; }
.su-body a:not(.btn):not(.su-prov):not(.su-path) { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.su-body a:not(.btn):not(.su-prov):not(.su-path):hover { text-decoration-color: currentColor; }
.su-body strong { color: var(--ink); }
.su-body code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); overflow-wrap: anywhere; }
.su-quick code { overflow-wrap: anywhere; }

/* ---------- Steps ---------- */
.su-steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: su; display: grid; gap: 0; }
.su-steps > li { position: relative; padding: 0 0 30px 58px; margin: 0; counter-increment: su; }
.su-steps > li::before { content: counter(su); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--bg); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; font-weight: 500; z-index: 1; }
.su-steps > li::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 2px; width: 1px; background: linear-gradient(180deg, var(--accent), var(--line)); opacity: .6; }
.su-steps > li:last-child { padding-bottom: 0; }
.su-steps > li:last-child::after { display: none; }
.su-steps > li > h3 { margin: 6px 0 8px; }

/* ---------- Code / terminal ---------- */
.su-code { margin: 14px 0 20px; border-radius: 12px; background: var(--su-code-bg); border: 1px solid rgba(255,255,255,.07); box-shadow: 0 10px 30px rgba(10,14,22,.16); overflow: hidden; }
.su-code-top { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; border-bottom: 1px solid rgba(255,255,255,.07); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--su-code-dim); }
.su-code-top::before { content: ""; width: 34px; height: 8px; background: radial-gradient(circle at 4px 4px, #3a4252 3.5px, transparent 4px), radial-gradient(circle at 17px 4px, #3a4252 3.5px, transparent 4px), radial-gradient(circle at 30px 4px, #3a4252 3.5px, transparent 4px); }
.su-copy { margin-left: auto; font: inherit; letter-spacing: .08em; color: #c9d1de; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 7px; padding: 5px 10px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.su-copy:hover { background: rgba(255,255,255,.12); }
.su-copy.done { color: #4cc79a; }
.su-code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65; color: var(--su-code-ink); tab-size: 2; }
.su-code pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; white-space: pre; }
.su-code .c { color: var(--su-code-dim); }
.su-code .p { color: #7c9cff; user-select: none; }
.su-code .k { color: #4cc79a; }
.su-code.out pre { color: #b8c1cf; }
.su-code.out .su-code-top { color: #4cc79a; }

/* ---------- Tables ---------- */
.su-table { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); box-shadow: var(--shadow-1); -webkit-overflow-scrolling: touch; }
.su-table table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.su-table th, .su-table td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.su-table thead th { border-top: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.su-table tbody th { color: var(--ink); font-weight: 700; }
.su-table tbody tr:hover td, .su-table tbody tr:hover th { background: color-mix(in oklab, var(--accent-soft) 40%, transparent); }
.su-table caption { caption-side: bottom; text-align: left; padding: 10px 16px 12px; font-size: 13.5px; color: var(--ink-3); border-top: 1px solid var(--line); }

/* ---------- Quotes, notes, examples ---------- */
.su-quote { margin: 22px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); }
.su-quote p { font-family: var(--font-display); font-size: 21px; line-height: 1.45; color: var(--ink) !important; margin: 0 0 8px; font-style: italic; }
.su-quote cite { font-style: normal; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.su-note { margin: 20px 0; padding: 16px 18px 16px 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); position: relative; font-size: 15.5px; }
.su-note p { margin: 0; }
.su-note p + p { margin-top: 8px; }
.su-note::before { content: "i"; position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; background: var(--accent-soft); color: var(--accent-ink); }
.su-note.us, .su-note.warn { background: var(--warn-soft); border-color: color-mix(in oklab, var(--warn) 30%, transparent); }
.su-note.us::before, .su-note.warn::before { content: "!"; background: color-mix(in oklab, var(--warn) 18%, transparent); color: var(--warn); }
.su-note.ok { background: var(--ok-soft); border-color: color-mix(in oklab, var(--ok) 30%, transparent); }
.su-note.ok::before { content: "\2713"; background: color-mix(in oklab, var(--ok) 18%, transparent); color: var(--ok); }
.su-note strong { color: var(--ink); }

.su-example { margin: 22px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); overflow: hidden; }
.su-ex-head { padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--ink-3); display: grid; gap: 3px; }
.su-ex-head b { color: var(--ink-2); font-weight: 650; display: inline-block; min-width: 62px; }
.su-ex-body { padding: 16px 18px; font-size: 15px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.su-ex-body .q { display: block; margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.su-ex-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.su-ex-reply { border-top: 1px dashed var(--line-2); background: color-mix(in oklab, var(--accent-soft) 35%, transparent); }

/* ---------- Benchmark slot ---------- */
.su-bench { margin: 24px 0; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in oklab, var(--line) 35%, transparent) 10px 11px); display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.su-bench .ic { width: 44px; height: 44px; }
.su-bench h3 { margin: 2px 0 6px !important; font-size: 17px; }
.su-bench p { margin: 0 !important; font-size: 15px; }

/* ---------- Sources, author, next ---------- */
.su-sources ol { padding-left: 22px; font-size: 15px; }
.su-sources li { margin: 8px 0; }
.su-author { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.su-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.su-author .nm { font-weight: 700; color: var(--ink); }
.su-author .rl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); }
.su-author p { margin: 6px 0 0 !important; font-size: 15px; }
.su-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .su-next { grid-template-columns: 1fr; } }
.su-next a { display: block; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none !important; color: var(--ink) !important; transition: border-color .2s ease, transform .2s ease; }
.su-next a:hover { border-color: var(--accent); transform: translateY(-2px); }
.su-next small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.su-next b { font-weight: 700; }

/* FAQ inside the article body uses pv.css .faq, left aligned. */
.su-body .faq { margin: 0; }
.su-body .faq summary { font-size: 17.5px; color: var(--ink); }

@media (max-width: 640px) {
  .su-quick { padding: 18px 18px 18px 20px; }
  .su-steps > li { padding-left: 50px; }
  .su-code pre { font-size: 12.5px; padding: 14px; }
  .su-path { padding: 20px; }
  .su-path h3 { font-size: 25px; }
}
