/* Brand the shibuya theme to match the Help site: a charcoal top bar with a
   brand-blue wordmark. shibuya's header is transparent until you scroll and it
   hides the wordmark on its own, so force both to read like the other docs
   sections (und, build notes, metrics, portal). */
.sy-head { background-color: #2b2b2b !important; }
.sy-head-blur { background-color: #2b2b2b !important; backdrop-filter: none !important; }
.sy-head, .sy-head-brand { color: rgba(255, 255, 255, 0.85); }

/* Two-part wordmark: "Understand Documentation" (brand blue) - "Python API". */
.sy-head-brand { display: flex; align-items: center; gap: 0.4rem; }
.sy-head-brand a { text-decoration: none; }
.sy-brand-home { display: inline-flex; align-items: center; gap: 0.6rem; }
.sy-brand-home strong { display: inline !important; color: #3e9bd6; font-weight: 700; }
.sy-brand-home:hover strong { color: #6bb7e4; }
.sy-brand-sep { color: rgba(255, 255, 255, 0.4); }
.sy-brand-section { color: rgba(255, 255, 255, 0.85); font-weight: 500; }
.sy-brand-section:hover { color: #3e9bd6; }

/* Search box on the charcoal bar. */
.sy-head .searchbox input {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
}
.sy-head .searchbox input::placeholder { color: rgba(255, 255, 255, 0.6); }
.sy-head kbd {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
}

/* No light/dark switcher — follow the OS only, like the Help site. */
.theme-switch { display: none !important; }

/* Hide insignificant whitespace in highlighted code (from the old custom.css). */
.highlight .w { color: transparent; }

/* ---- Compact typography ---------------------------------------------------
   Bring the content scale closer to the docs portal (docs/html, portal.css:
   16px / line-height 1.6). shibuya's "yue" content defaults read oversized and
   spacious next to it — a 1.75 line-height, an h1 at 2.25em, and an h2 with a
   2em top margin. Keep the 16px body but tighten the line-height and pull the
   headings and their top margins in to the portal's ratios (h1 1.8×, h2 1.35×,
   h3 1.2× body). */
.yue { line-height: 1.6; }
.yue h1 { font-size: 1.8em; margin-bottom: 0.6em; }
.yue h2 { font-size: 1.35em; margin-top: 1.3em; margin-bottom: 0.5em; }
.yue h3 { font-size: 1.2em; margin-top: 1.1em; margin-bottom: 0.4em; }

/* ---- Context box -----------------------------------------------------------
   The orientation blurb _templates/layout/default.html puts at the top of
   every content page (for search-engine visitors). Same look as portal.css's
   .context-box on the catalog and und pages; colors inlined here because
   this manual doesn't load portal.css. The switcher is hidden and color_mode
   is auto (see above), so prefers-color-scheme is authoritative. */
.context-box {
  margin: 1rem 0 1.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-left: 3px solid #3e9bd6;
  border-radius: 4px;
  background: #f6f7f8;
  font-size: 0.9375rem;
}
.context-box p { margin: 0.15rem 0; }
.context-box .context-box__links { color: rgba(0, 0, 0, 0.54); }
@media (prefers-color-scheme: dark) {
  .context-box {
    border-color: rgba(255, 255, 255, 0.12);
    border-left-color: #3e9bd6;
    background: #262933;
  }
  .context-box .context-box__links { color: rgba(255, 255, 255, 0.52); }
}
