/* ServerBike Reseller: WordPress adaptation of the approved CLAUDE_V2 stylesheet (reseller.css).
   Only what the real site requires: the theme's established fonts (Sora headings, Inter body,
   Geist Mono labels), the real sticky header height, stacking under the header and mobile
   panel, and resets for global theme rules. Scoped to .sbr throughout. */

.sbr {
  --display: var(--sb-font-heading);
  position: relative;
  z-index: 1;
  overflow-x: clip;
  font-family: var(--sb-font-body);
}

.sbr-main {
  display: block;
  outline: none;
}

/* Headings and display type use Sora, as on the rest of the site. */
.sbr :is(h1, h2, h3, h4, .display, .chapter-title, .stats strong, .subnav__title) {
  font-family: var(--display);
}

/* Sora is wider than the prototype's Inter stand-in. Approved tracking is kept; the weight
   maps the prototype's variable 660-680 onto Sora's static 600 instance (700 reads too heavy). */
.sbr .display,
.sbr .chapter-title {
  font-weight: 600;
}

.sbr .chapter-title {
  /* Approved reference: clamp(44px, 11.6vw, 156px). Sora's wider glyphs made
     "Our Infrastructure." wrap at 1440 (101% of the line), so only the maximum is
     reduced to 152px; the wrapping at every other tested width matches the prototype. */
  font-size: clamp(44px, 11.6vw, 152px);
}

.sbr :is(h2, h3, h4) {
  font-weight: 600;
}

/* Theme rule a:hover recolours every link; the approved design controls hover per component. */
.sbr a:hover {
  color: inherit;
}

/* Contextual sub-navigation sits directly under the real sticky header and below the
   header's mega menu and the mobile panel in the stacking order. */
.sbr .subnav {
  top: var(--sb-header-height);
  z-index: 30;
}

.admin-bar .sbr .subnav {
  top: calc(var(--sb-header-height) + 32px);
}

@media (max-width: 782px) {
  .admin-bar .sbr .subnav {
    top: calc(var(--sb-header-height) + 46px);
  }
}

:root:has(body.sbr-body) {
  scroll-padding-top: calc(var(--sb-header-height) + 56px + 16px);
}

/* The unavailable download state (gate G5) is a non-interactive label, not a button. */
.sbr .btn.is-unavailable {
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
}

/* Visible focus on both surfaces, also for the theme's skip-link target. */
.sbr :focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 3px;
}

.sbr :is(.surface-ink, .subnav, .phero, .hero, .final) :focus-visible {
  outline-color: var(--cyan-strong);
}

.sbr-main:focus-visible {
  outline: none;
}

/* Sticky elements and anchor targets: the approved offsets assume only the 56px sub-navigation;
   on the real site the 80px theme header sits above it. */
.sbr {
  --sbr-stack: calc(var(--sb-header-height) + var(--subnav-h));
}

.admin-bar .sbr {
  --sbr-stack: calc(var(--sb-header-height) + var(--subnav-h) + 32px);
}

.sbr .faq__aside {
  top: calc(var(--sbr-stack) + 32px);
}

.sbr .form-card {
  top: calc(var(--sbr-stack) + 24px);
}

.sbr .docnav {
  top: calc(var(--sbr-stack) + 24px);
  max-height: calc(100vh - var(--sbr-stack) - 48px);
}

.sbr :is(.doc h3, .doc h4, .dlcard, .srcfile, .optag, .op, .comp, section[id]) {
  scroll-margin-top: 4px; /* the root scroll-padding already clears header + sub-navigation */
}

/* WCAG AA corrections to two approved colours that measured below 4.5:1 (also in the prototype):
   the sub-navigation "Partner Program" label and the 1:1 links on light screenshot frames. */
.sbr .subnav__title small {
  color: var(--ink-text-2);
}

.sbr .zoom {
  color: var(--paper-text-2);
}

/* OpenAPI operations carry a real heading (h3) around the path for a correct outline;
   it keeps the approved visual treatment of the code path. */
.sbr .op__h {
  display: inline;
  margin: 0;
  font: inherit;
  letter-spacing: normal;
}

/* Become a Partner (W06, owner decision D02): application checklist inside the approved form card. */
.sbr .apply-prep { margin-top: 26px; }
.sbr .apply-prep__title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin: 26px 0 4px; }
.sbr .apply-prep > .apply-prep__title:first-child { margin-top: 0; }
.sbr .apply-prep .blist { margin-top: 6px; }
.sbr .apply-path .hint { display: block; margin-top: 8px; }

/* Post-launch polish (2026-11-29). Spacing and type adjustments within the approved design,
   scoped to .sbr: internal page heroes start their content sooner, mobile sections are
   tighter, and code figures get a Copy button (reseller.js). */
.sbr .phero:not(.phero--doc) {
  padding-top: clamp(48px, 6vw, 88px);
}

.sbr .phero:not(.phero--doc):not(.phero--figure) {
  padding-bottom: clamp(48px, 6vw, 80px);
}

.sbr .phero:not(.phero--doc) h1 {
  font-size: clamp(36px, 5.4vw, 76px);
}

.sbr .phero .lead {
  margin-top: 20px;
}

@media (max-width: 760px) {
  .sbr {
    --section: 56px; /* approved mobile value 72px */
  }

  .sbr .chapter-head {
    padding-bottom: 32px;
  }

  .sbr .eyebrow {
    letter-spacing: .12em;
  }

  .sbr .hero__grid {
    margin-top: 28px;
  }

  .sbr .stats {
    margin-top: 32px;
    padding-top: 22px;
  }
}

/* Copy button on code figures (exact text of the code element, final newline included). */
.sbr .code.has-copy {
  position: relative;
}

.sbr .code.has-copy .code__bar {
  padding-right: 96px;
}

.sbr .code__copy {
  position: absolute;
  top: 4px;
  right: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ink-4);
  border-radius: 8px;
  background: #0a0d14;
  color: var(--ink-text-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.sbr .code__copy:hover {
  border-color: var(--cyan-strong);
  color: var(--cyan-strong);
}

/* Account funding methods (commercial finalization 2026-11-29). Works on dark and light surfaces. */
.sbr .paymethods {
  margin-top: 28px;
}

.sbr .paymethods h4 {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -.01em;
}

.sbr .paymethods > p {
  margin-top: 8px;
  opacity: .82;
}

.sbr .paylist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 0;
}

.sbr .paylist li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 10px;
}

.sbr .paylist b {
  font-size: 15px;
  font-weight: 620;
}

.sbr .paylist span {
  font: 400 11px/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}

@media (max-width: 760px) {
  .sbr .paylist {
    grid-template-columns: 1fr;
  }
}

/* Full policy texts on Terms and Policies: comfortable reading width. */
.sbr .policy-texts .doc {
  max-width: 820px;
  scroll-margin-top: calc(var(--sbr-stack) + 24px);
}
