/* The site's shared header and footer (site-shared/header.html and
   footer.html, written into every /api/ page by scripts/site-shell.mjs and
   into the blog by its Navbar and Footer). Self-contained: its own colours
   and sizes, so it looks the same on the API pages (landing.css) and in the
   blog (Docusaurus). Square, like the API pages; orange for the one action. */

.sx-head, .sx-foot {
  --sx-bg: #09090b;
  --sx-bg1: #0e0f12;
  --sx-line: #1f2127;
  --sx-line2: #2c2e35;
  --sx-text: #e4e5e8;
  --sx-text2: #a3a6ae;
  --sx-text3: #6f737d;
  /* Shrine red: the torii's colour, for the brand and the one action. */
  --sx-orange: #ff4f60;
  --sx-orange-hi: #ff6b79;
  --sx-col: 1344px;
  --sx-pad: 48px;
  font-family: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  line-height: 1.5;
}
.sx-head *, .sx-foot * { box-sizing: border-box; }
.sx-head a, .sx-foot a { text-decoration: none; }
.sx-head a:focus-visible, .sx-head summary:focus-visible, .sx-foot a:focus-visible { outline: 2px solid var(--sx-orange); outline-offset: 2px; }

/* ── Header ───────────────────────────────────────────────────────────── */

.sx-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  box-shadow: inset 0 -1px 0 var(--sx-line);
  color: var(--sx-text);
}
/* The frosted bar is a layer behind the content, not the header itself: a
   menu animating inside an element with a backdrop filter can be left
   half-drawn by the compositor. */
.sx-head::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(9, 9, 11, .86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  pointer-events: none;
}
.sx-head.sx-scrolled { box-shadow: inset 0 -1px 0 var(--sx-line), 0 12px 32px -20px rgba(0, 0, 0, .9); }
/* Three columns: the brand, the menus centered on the page, the actions. */
.sx-in {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 72px;
  max-width: var(--sx-col);
  margin: 0 auto;
  padding: 0 var(--sx-pad);
}

.sx-brand { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; color: var(--sx-text); font-weight: 650; font-size: 18.5px; letter-spacing: -.02em; white-space: nowrap; }
.sx-brand img { width: 26px; height: 26px; }
.sx-brand span { color: var(--sx-orange); }
.sx-brand:hover { color: #fff; }

.sx-nav { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.sx-link,
.sx-dd > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  color: var(--sx-text2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.sx-link:hover, .sx-dd > summary:hover { color: var(--sx-text); }
.sx-dd[open] > summary { color: #fff; background: #1b1c21; }
.sx-link[aria-current='page'], .sx-dd.sx-cur > summary { color: var(--sx-text); }
.sx-dd > summary { list-style: none; }
.sx-dd > summary::-webkit-details-marker { display: none; }
.sx-chev { width: 12px; height: 12px; color: var(--sx-text3); transition: transform .2s; }
.sx-dd[open] .sx-chev { transform: rotate(180deg); color: var(--sx-text2); }

/* A menu: one wide panel under the whole bar (positioned on .sx-in, not on
   its name), its items in columns under a quiet label: an icon in a tile,
   the name, one line on what it is. */
.sx-dd { position: static; }
.sx-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: calc(var(--sx-pad) - 16px);
  right: calc(var(--sx-pad) - 16px);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 36px;
  padding: 26px 32px 28px;
  border-radius: 12px;
  background: #111215;
  box-shadow: inset 0 0 0 1px #24262c, 0 40px 90px -30px rgba(0, 0, 0, .95);
}
/* The hover bridge: the pointer can cross from the name to the panel. */
.sx-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.sx-panel.sx-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sx-span { grid-column: 1 / -1; }
.sx-col { display: grid; gap: 4px; align-content: start; }
.sx-panel a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  margin: 0 -12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--sx-text);
  transition: background .12s;
}
.sx-panel a:hover { background: rgba(255, 255, 255, .035); }
.sx-tile {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #17181c;
  box-shadow: inset 0 0 0 1px #2a2c33;
  color: #b9bcc4;
  transition: box-shadow .12s, color .12s;
}
.sx-tile svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sx-tile img { width: 19px; height: 19px; object-fit: contain; }
.sx-panel a:hover .sx-tile, .sx-panel a[aria-current='page'] .sx-tile { color: #fff; box-shadow: inset 0 0 0 1px #3d4048; }
.sx-panel a b { align-self: end; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sx-panel a > span:not(.sx-tile) { align-self: start; color: #868a94; font-size: 13px; line-height: 1.4; }
.sx-panel a[aria-current='page'] { background: rgba(255, 255, 255, .04); }
.sx-k { margin: 0 0 6px; color: #7b7f89; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.sx-sheet .sx-k, .sx-fcol .sx-k { font: 600 11px/1.4 var(--sx-mono, ui-monospace, 'SF Mono', Menlo, Consolas, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--sx-text3); }

.sx-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.sx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 0;
  background: #f0475b;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
/* Square and plain like the lander's own buttons: no gradient, glow or lift. */
.sx-btn:hover { background: #ff5a6c; color: #fff; }
.sx-btn.sx-ghost { background: transparent; color: var(--sx-text); box-shadow: inset 0 0 0 1px var(--sx-line2); }
.sx-btn.sx-ghost:hover { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px #4a4c54; color: #fff; }

/* Narrow screens: one menu button with everything in it. */
.sx-menu { position: relative; display: none; }
.sx-menu > summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--sx-text2); cursor: pointer; }
.sx-menu > summary::-webkit-details-marker { display: none; }
.sx-menu > summary span, .sx-menu > summary span::before, .sx-menu > summary span::after { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s, background .3s; }
.sx-menu > summary span { position: relative; }
.sx-menu > summary span::before, .sx-menu > summary span::after { content: ''; position: absolute; left: 0; }
.sx-menu > summary span::before { top: -5px; }
.sx-menu > summary span::after { top: 5px; }
.sx-menu[open] > summary span { background: transparent; }
.sx-menu[open] > summary span::before { transform: translateY(5px) rotate(45deg); }
.sx-menu[open] > summary span::after { transform: translateY(-5px) rotate(-45deg); }
.sx-sheet {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100vw - 24px));
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  padding: 8px;
  background: var(--sx-bg1);
  box-shadow: inset 0 0 0 1px var(--sx-line2), 0 28px 70px -24px rgba(0, 0, 0, .95);
}
.sx-sheet a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--sx-text2); font-size: 14.5px; }
.sx-sheet a:hover, .sx-sheet a[aria-current='page'] { color: var(--sx-text); background: rgba(255, 255, 255, .045); }
.sx-sheet .sx-k { margin: 14px 12px 4px; }
.sx-sheet .sx-k:first-child { margin-top: 4px; }
.sx-sheet .sx-btn.sx-full { justify-content: center; height: 40px; margin-top: 12px; font-size: 14px; color: #fff; }

@media (max-width: 1100px) {
  .sx-head, .sx-foot { --sx-pad: 28px; }
}
@media (max-width: 1060px) {
  .sx-nav, .sx-login, .sx-term { display: none; }
  .sx-menu { display: block; }
}
@media (max-width: 1060px) {
  .sx-in { grid-template-columns: 1fr auto; }
  .sx-end { grid-column: 2; }
  /* Phones and narrow windows: the bar's key button is only its words in
     Shrine red - no fill, frame, shadow or tap highlight around them. */
  .sx-end > .sx-btn:not(.sx-ghost),
  .sx-end > .sx-btn:not(.sx-ghost):hover {
    height: auto;
    padding: 6px 4px;
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--sx-orange);
    -webkit-tap-highlight-color: transparent;
  }
  .sx-end > .sx-btn:not(.sx-ghost):hover { color: var(--sx-orange-hi); }
  .sx-end > .sx-btn:not(.sx-ghost):focus:not(:focus-visible) { outline: none; }
}
@media (max-width: 720px) {
  .sx-head, .sx-foot { --sx-pad: 16px; }
  .sx-in { height: 64px; }
  .sx-btn { height: 32px; padding: 0 11px; font-size: 13px; }
}
@media (max-width: 380px) {
  .sx-end > .sx-btn:not(.sx-ghost) { display: none; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.sx-foot { border-top: 1px solid var(--sx-line); background: var(--sx-bg); color: var(--sx-text2); }
.sx-foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 40px;
  max-width: var(--sx-col);
  margin: 0 auto;
  padding: 56px var(--sx-pad) 48px;
}
.sx-foot-brand p { max-width: 300px; margin: 14px 0 18px; color: var(--sx-text3); font-size: 13.5px; line-height: 1.6; }
.sx-foot .sx-brand { font-size: 15.5px; gap: 8px; }
.sx-social { display: flex; gap: 6px; }
.sx-social a { display: grid; place-items: center; width: 34px; height: 34px; color: var(--sx-text3); box-shadow: inset 0 0 0 1px var(--sx-line); transition: color .15s, box-shadow .15s; }
.sx-social a:hover { color: var(--sx-text); box-shadow: inset 0 0 0 1px var(--sx-line2); }
.sx-social svg { width: 15px; height: 15px; }
.sx-fcol { display: flex; flex-direction: column; gap: 10px; }
.sx-fcol .sx-k { margin: 0 0 4px; }
.sx-fcol a { color: var(--sx-text2); font-size: 13.5px; transition: color .15s; }
.sx-fcol a:hover, .sx-fcol a[aria-current='page'] { color: var(--sx-text); }
.sx-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--sx-col);
  margin: 0 auto;
  padding: 18px var(--sx-pad) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--sx-line);
  color: var(--sx-text3);
  font-size: 12.5px;
}
.sx-base-l { display: flex; gap: 18px; }
.sx-base a { color: var(--sx-text3); }
.sx-base a:hover { color: var(--sx-text); }

@media (max-width: 900px) {
  .sx-foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .sx-foot-brand { grid-column: 1 / -1; }
}

/* ── Motion ───────────────────────────────────────────────────────────── */

/* A menu fades and slides in, its items one after another. */
@keyframes sx-drop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sx-dd[open] > .sx-panel { animation: sx-drop .26s cubic-bezier(.16, 1, .3, 1) both; transform-origin: 50% 0; }
.sx-dd[open] .sx-panel a, .sx-dd[open] .sx-panel .sx-k { animation: sx-rise .34s cubic-bezier(.16, 1, .3, 1) both; }
.sx-dd[open] .sx-col:nth-child(2) a, .sx-dd[open] .sx-col:nth-child(2) .sx-k, .sx-dd[open] .sx-panel > a:nth-of-type(2) { animation-delay: .04s; }
.sx-dd[open] .sx-col:nth-child(3) a, .sx-dd[open] .sx-col:nth-child(3) .sx-k, .sx-dd[open] .sx-panel > a:nth-of-type(3) { animation-delay: .08s; }
.sx-dd[open] .sx-panel > a:nth-of-type(4) { animation-delay: .12s; }
.sx-menu[open] > .sx-sheet { animation: sx-drop .26s cubic-bezier(.16, 1, .3, 1) both; transform-origin: 100% 0; }
/* The tile's icon nudges when its row is hovered. */
.sx-tile svg, .sx-tile img { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.sx-panel a:hover .sx-tile svg, .sx-panel a:hover .sx-tile img { transform: scale(1.1); }
.sx-panel a b { transition: color .15s; }
.sx-fcol a, .sx-social a { transition: color .15s, box-shadow .15s, transform .25s cubic-bezier(.16, 1, .3, 1); }
.sx-social a:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .sx-head *, .sx-foot * { animation: none !important; transition: none !important; }
}

/* ── Menu tiles: one quiet style for all (11-20: no colour per item). ── */
.sx-tile { background: linear-gradient(180deg, #1a1b20, #141519); box-shadow: inset 0 0 0 1px #2a2c33, inset 0 1px 0 rgba(255, 255, 255, .04); color: #c4c7ce; }
.sx-panel a:hover .sx-tile, .sx-panel a[aria-current='page'] .sx-tile { color: #fff; box-shadow: inset 0 0 0 1px #43464f, inset 0 1px 0 rgba(255, 255, 255, .06); }
.sx-tile img { width: 20px; height: 20px; }

/* Which chains a product runs on: small marks after its name. */
.sx-panel a b { display: flex; align-items: center; gap: 8px; }
.sx-on { display: inline-flex; gap: 3px; font-style: normal; }
.sx-on img { width: 13px; height: 13px; padding: 2px; box-sizing: content-box; border-radius: 5px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); object-fit: contain; filter: grayscale(1); opacity: .55; transition: filter .2s, opacity .2s; }
.sx-panel a:hover .sx-on img { filter: none; opacity: .95; }
.vh-sx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Links that leave the API pages for the docs (/pump, /flap, /pons, /arc)
   say so with a small arrow out. */
.sx-head a:is([href^="/pump/"], [href^="/flap/"], [href^="/pons/"], [href^="/arc/"]) b::after,
.sx-sheet a:is([href^="/pump/"], [href^="/flap/"], [href^="/pons/"], [href^="/arc/"])::after,
.sx-fcol a:is([href^="/pump/"], [href^="/flap/"], [href^="/pons/"], [href^="/arc/"])::after {
  content: '';
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  background: currentColor;
  opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5h5v5M9.5 2.5 3 9' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5h5v5M9.5 2.5 3 9' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), opacity .2s;
}
.sx-head a:hover b::after, .sx-sheet a:hover::after, .sx-fcol a:hover::after { opacity: .9; transform: translate(1px, -1px); }
.sx-head a b::after { order: 9; margin-left: 0; }
