/* Docs site (/api/docs/v2/): brand shell around Stoplight Elements, plus the Overview landing page.
   Colours and type follow the BestEx Research brand guidelines (DM Sans; navy text; blue and green). */

:root {
  --navy: #0f2230;
  --blue: #49a7dd;
  --blue-dk: #2282b9;
  --blue-lt: #b6dbf1;
  --green: #9ad19f;
  --tint: #f3f8fc;
  --line: #dfe7ee;
  --hdr: 64px;

  /* Stoplight Elements reads these (pinned to 9.0.25 in docs/product.html). */
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-prose: "DM Sans", system-ui, sans-serif;
  --primary-h: 202; --primary-s: 69%; --primary-l: 43%;   /* #2282b9 */
  --text-h: 206; --text-s: 52%; --text-l: 12%;           /* #0f2230 */
}
.sl-elements {
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-prose: "DM Sans", system-ui, sans-serif;
  --primary-h: 202; --primary-s: 69%; --primary-l: 43%;
  --text-h: 206; --text-s: 52%; --text-l: 12%;
}

html, body { margin: 0; }
body { background: #fff; color: var(--navy); font-family: "DM Sans", system-ui, sans-serif; }

/* Elements pads every prose <li> by ~62px with the bullet at ~50px, squeezing callouts into a narrow column. */
.sl-prose ul > li { padding-left: 1.4em !important; }
.sl-prose ul > li::before { left: .3em !important; }

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; height: var(--hdr); z-index: 1000; background: #fff;
  display: flex; align-items: center; gap: 24px; padding: 0 24px; box-sizing: border-box;
  border-bottom: 1px solid var(--line);
}
.hdr::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.hdr .logo { height: 44px; display: block; }
.hdr .tabs { display: inline-flex; background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.hdr .tabs a {
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 6px;
}
.hdr .tabs a:hover { color: var(--blue-dk); }
.hdr .tabs a[aria-current="page"] { background: #fff; box-shadow: 0 1px 3px rgba(15, 34, 48, .15); color: var(--blue-dk); }
.hdr .links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.hdr .links a:not(.btn) {
  color: var(--navy); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 6px;
}
.hdr .links a:not(.btn):hover { background: var(--tint); }

.btn {
  display: inline-block; background: var(--blue-dk); color: #fff; text-decoration: none; font-weight: 600;
  font-size: 15px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--blue-dk);
}
.btn:hover { background: #1b6f9f; }
.btn.ghost { background: #fff; color: var(--blue-dk); }
.btn.ghost:hover { background: var(--tint); }

.messages { position: fixed; top: calc(var(--hdr) + 12px); left: 50%; transform: translateX(-50%); z-index: 1001; }
.message { margin: 0 0 8px; padding: 10px 16px; border-radius: 8px; background: var(--tint); border: 1px solid var(--line); }
.message-error { background: #fdecea; border-color: #f9beba; }

/* ---------- product tabs: Elements fills the page below the header ---------- */
.reference { position: fixed; inset: calc(var(--hdr) + 2px) 0 0 0; }
.reference elements-api { display: block; height: 100%; }

/* ---------- Overview landing ---------- */
.landing { padding-top: var(--hdr); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero { background: linear-gradient(180deg, var(--tint), #fff); padding: 64px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--blue-dk); margin: 0 0 12px; }
.hero h1 { font-size: 44px; line-height: 1.12; font-weight: 700; margin: 0 0 16px; }
.hero h1 span {
  background: linear-gradient(90deg, var(--blue-dk), var(--blue)); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lead { font-size: 18px; line-height: 1.55; margin: 0 0 28px; max-width: 34em; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.code {
  background: var(--navy); color: #fff; border-radius: 10px; padding: 18px 20px;
  font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre;
}
.code .k { color: var(--blue-lt); }
.code .s { color: var(--green); }
.code .n { color: #fff; font-weight: 700; }
.code-cap { font-size: 13px; margin: 8px 2px 0; }
section.block { padding: 48px 0; }
section.block.tight { padding-top: 0; }
section.block h2 {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dk); margin: 0 0 20px;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--blue-dk); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 14px;
}
.step h3 { margin: 0; font-size: 18px; }
.step p { margin: 0; line-height: 1.5; }
.step .code { font-size: 12px; padding: 12px 14px; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 24px; border-top: 4px solid var(--blue); }
.card.eq { border-top-color: var(--green); }
.card h3 { margin: 0 0 4px; font-size: 22px; }
.card .scope { margin: 0 0 14px; font-weight: 500; }
.card ul { margin: 0 0 18px; padding-left: 18px; line-height: 1.7; }
.card .links { display: flex; gap: 16px; flex-wrap: wrap; }
.card .links a, .strip a { color: var(--blue-dk); font-weight: 600; text-decoration: none; }
.card .links a:hover, .strip a:hover { text-decoration: underline; }
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.strip > div { background: var(--tint); border-radius: 10px; padding: 20px 22px; line-height: 1.55; scroll-margin-top: calc(var(--hdr) + 16px); }
.strip h3 { margin: 0 0 6px; font-size: 17px; }
.disclaimer { border-top: 1px solid var(--line); padding: 24px 0 48px; font-size: 13px; line-height: 1.6; }

@media (max-width: 860px) {
  .hero .wrap, .steps, .products, .strip { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hdr .links a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  .hdr { gap: 10px; padding: 0 12px; }
  .hdr .logo { height: 34px; }
  .hdr .links .btn { display: none; }
  .hdr .tabs a { padding: 6px 9px; font-size: 13px; }
}

/* ---------- Python SDK (PUL-181): shared by the Overview (.landing) and the Python SDK tab (.pyguide) ----------
   Scoped to those two pages: docs.css also loads under Stoplight Elements on the product tabs. */
:is(.landing, .pyguide) .code .c { color: #8aa4b6; }
:is(.landing, .pyguide) .codetabs { border-radius: 10px; overflow: hidden; background: var(--navy); }
:is(.landing, .pyguide) .codetabs .bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: #16303f; }
:is(.landing, .pyguide) .codetabs .bar button {
  font: 600 12px "DM Sans", system-ui, sans-serif; color: var(--blue-lt); background: transparent; border: 0;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
}
:is(.landing, .pyguide) .codetabs .bar button[aria-pressed="true"] { background: var(--navy); color: #fff; }
:is(.landing, .pyguide) .codetabs .bar .copy { margin-left: auto; color: #9fb3c2; }
:is(.landing, .pyguide) .codetabs .code { border-radius: 0; }
:is(.landing, .pyguide) .codetabs [hidden] { display: none; }
:is(.landing, .pyguide) .badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: 0;
  background: var(--tint); color: var(--blue-dk); border: 1px solid var(--line); vertical-align: middle;
}
:is(.landing, .pyguide) .badge.new { background: #e8f6ea; color: #2f7a39; border-color: #cfe9d2; }
.pyguide .install {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font: 15px ui-monospace, Menlo, Consolas, monospace; max-width: 30em; margin: 0 0 18px;
}
.pyguide .install .p { color: #8aa4b6; }
.pyguide .install code { background: none; padding: 0; }
.pyguide .install button {
  margin-left: auto; font: 600 12px "DM Sans", system-ui, sans-serif; color: var(--blue-dk); background: var(--tint);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer;
}

/* Overview: Python next to curl, a third product card, and a link into the guide */
.landing .products.three { grid-template-columns: 1fr 1fr 1fr; }
.landing .card.py { border-top-color: var(--navy); }
.landing .step .more { color: var(--blue-dk); font-weight: 600; text-decoration: none; font-size: 14px; }
.landing .step .more:hover { text-decoration: underline; }
.landing .step .codetabs .code { font-size: 12px; padding: 12px 14px; }
/* grid items default to min-width: auto, so one long code line would widen the column past the screen */
.landing .hero .wrap > *, .landing .steps > *, .landing .products > * { min-width: 0; }

/* Python SDK tab: contents on the left, the guide on the right */
.pyguide { padding-top: var(--hdr); display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }
.pyguide .toc {
  position: sticky; top: var(--hdr); align-self: start; height: calc(100vh - var(--hdr)); overflow-y: auto;
  padding: 28px 16px 28px 24px; border-right: 1px solid var(--line); box-sizing: border-box; font-size: 14px;
}
.pyguide .toc p { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-dk); margin: 18px 0 6px; }
.pyguide .toc p:first-child { margin-top: 0; }
.pyguide .toc a { display: block; color: var(--navy); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.pyguide .toc a:hover, .pyguide .toc a.on { background: var(--tint); }
.pyguide .toc a.on { color: var(--blue-dk); font-weight: 600; }
.pyguide .prose { padding: 32px 40px 80px; line-height: 1.65; font-size: 16px; min-width: 0; }
.pyguide h1 { font-size: 34px; margin: 0 0 8px; line-height: 1.15; }
.pyguide h2 { font-size: 24px; margin: 44px 0 10px; padding-top: 8px; scroll-margin-top: calc(var(--hdr) + 12px); }
.pyguide h3 { font-size: 18px; margin: 24px 0 8px; }
.pyguide p { margin: 0 0 14px; }
.pyguide a { color: var(--blue-dk); }
.pyguide code { font: 14px ui-monospace, Menlo, Consolas, monospace; background: var(--tint); padding: 1px 5px; border-radius: 4px; }
.pyguide .code code, .pyguide th code { background: none; padding: 0; }
.pyguide .code, .pyguide .codetabs { margin: 0 0 18px; }
.pyguide .lede { font-size: 18px; color: #3b5363; margin: 0 0 22px; max-width: 40em; }
.pyguide .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 8px; }
.pyguide .fact { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.pyguide .fact b { display: block; font-size: 15px; margin-bottom: 4px; }
.pyguide .fact span { font-size: 14px; color: #3b5363; line-height: 1.45; }
.pyguide .callout { border-left: 4px solid var(--green); background: #f1f9f2; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 18px; font-size: 15px; }
.pyguide table.map { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 18px; }
.pyguide table.map th {
  text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #5b7182;
  border-bottom: 2px solid var(--line); padding: 8px 10px;
}
.pyguide table.map th.next { padding-top: 22px; }
.pyguide table.map td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.pyguide table.map td:first-child { font: 13px ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.pyguide table.map a { text-decoration: none; font-weight: 500; }
.pyguide table.map a:hover { text-decoration: underline; }
.pyguide .strip { margin-top: 40px; }

@media (max-width: 960px) {
  .pyguide { grid-template-columns: 1fr; }
  .pyguide .toc { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .pyguide .prose { padding: 24px 20px 64px; }
  .pyguide .facts, .landing .products.three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hdr .tabs .long { display: none; }   /* "Python SDK" becomes "Python": four tabs must fit a phone */
  .hdr .tabs a { padding: 6px 7px; font-size: 12px; }
  .pyguide table.map td:first-child { white-space: normal; word-break: break-word; }
  .pyguide .install { font-size: 13px; }
}
