/* ---------- Theme tokens ---------- */
    :root {
      --brand: #2457d6;
      --brand-soft: rgba(36, 87, 214, 0.08);
      --page-bg: #ffffff;
      --surface-bg: #f7f8fa;
      --surface-border: #e5e7eb;
      --text-color: #1f2937;
      --muted-color: #6b7280;
      --heading-color: #0f172a;
      --code-bg: #f1f3f5;
      --code-text: #1f2937;
      --code-punct: #4b5563;
      --code-key: #1d4ed8;
      --code-string: #047857;
      --code-number: #b45309;
      --code-comment: #6b7280;
      --header-height: 64px;
      --sidebar-width: 272px;
      --outline-width: 240px;
      --content-width: 780px;
      --theme-color: var(--brand);
      --base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      color-scheme: light;
    }

    html[data-theme="dark"] {
      --brand: #f5f5f5;
      --brand-soft: rgba(255, 255, 255, 0.06);
      --page-bg: #0a0a0a;
      --surface-bg: #141414;
      --surface-border: #1f1f1f;
      --text-color: #c8c8c8;
      --muted-color: #737373;
      --heading-color: #fafafa;
      --code-bg: #161616;
      --code-text: #e5e5e5;
      --code-punct: #a3a3a3;
      --code-key: #93c5fd;
      --code-string: #86efac;
      --code-number: #fcd34d;
      --code-comment: #8a8a8a;
      --scroll-thumb: #2e2e2e;
      color-scheme: dark;
    }

    html[data-theme="dark"] .markdown-section a:not(.anchor) {
      text-decoration: underline;
      text-decoration-color: #525252;
      text-underline-offset: 3px;
    }

    html[data-theme="dark"] .markdown-section a:hover {
      text-decoration-color: var(--heading-color);
    }

    html[data-theme="dark"] .markdown-section img {
      border-color: #262626;
    }

    html[data-theme="dark"] #theme-toggle,
    html[data-theme="dark"] .site-header .search input {
      border-color: transparent;
    }

    /* ---------- Base ---------- */
    html, body {
      background: var(--page-bg);
      color: var(--text-color);
      font-family: var(--base-font-family);
    }

    body {
      font-size: 16px;
      -webkit-font-smoothing: antialiased;
    }

    /* ---------- Header ---------- */
    .site-header {
      position: fixed;
      top: 0;
      right: 0;
      left: 0;
      z-index: 40;
      height: var(--header-height);
      background: var(--page-bg);
    }

    .site-header-inner {
      display: flex;
      align-items: center;
      gap: 28px;
      height: 100%;
      padding: 0 24px;
    }

    .site-brand {
      order: 1;
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 10px;
      color: var(--heading-color);
      font-size: 19px;
      font-weight: 700;
      text-decoration: none;
    }

    .site-brand-mark {
      width: 34px;
      height: 38px;
      background: url("/i18n/en/img/bbcs-logo.webp") no-repeat left center / auto 38px;
    }

    .site-primary {
      order: 2;
      display: flex;
      align-self: stretch;
      gap: 4px;
    }

    .site-primary a {
      display: flex;
      align-items: center;
      padding: 0 12px;
      border-bottom: 2px solid transparent;
      color: var(--muted-color);
      font-size: 15px;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
    }

    .site-primary a:hover,
    .site-primary a:focus-visible {
      color: var(--heading-color);
    }

    .site-primary a.is-active {
      border-bottom-color: var(--brand);
      color: var(--heading-color);
    }

    .site-header .search {
      position: relative;
      order: 3;
      width: 100%;
      max-width: 360px;
      min-width: 0;
      margin: 0 0 0 auto;
      padding: 0;
      border: 0;
      background: none;
    }

    .site-header .search .input-wrap {
      position: relative;
      display: block;
    }

    .site-header .search input {
      width: 100%;
      min-width: 0;
      height: 38px;
      padding: 0 14px;
      border: 1px solid var(--surface-border);
      border-radius: 8px;
      background: var(--surface-bg);
      color: var(--text-color);
      font-size: 14px;
      outline: 0;
    }

    .site-header .search input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-soft);
    }

    /* Clear button sits inside the input, so typing does not move the header. */
    .site-header .search input {
      padding-right: 36px;
    }

    .site-header .search input::-webkit-search-cancel-button {
      display: none;
    }

    .site-header .search .clear-button {
      position: absolute;
      top: 50%;
      right: 8px;
      display: none !important;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      transform: translateY(-50%);
      color: var(--muted-color);
      cursor: pointer;
    }

    .site-header .search .clear-button.show {
      display: block !important;
    }

    .site-header .search .clear-button svg {
      display: none;
    }

    .site-header .search .clear-button::before,
    .site-header .search .clear-button::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12px;
      height: 1.5px;
      border-radius: 1px;
      background: currentColor;
    }

    .site-header .search .clear-button::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .site-header .search .clear-button::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

    .site-header .search .clear-button:hover {
      background: var(--brand-soft);
      color: var(--heading-color);
    }

    .site-header .search .results-panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      left: 0;
      max-height: 70vh;
      overflow-y: auto;
      border: 1px solid var(--surface-border);
      border-radius: 10px;
      background: var(--page-bg);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    }

    .site-header .search .results-panel:not(.show) {
      display: none;
    }

    .site-header .search .matching-post {
      padding: 12px 16px;
      border-bottom: 1px solid var(--surface-border);
    }

    .site-header .search .matching-post:last-child {
      border-bottom: 0;
    }

    .site-header .search .matching-post a {
      color: inherit;
      text-decoration: none;
    }

    .site-header .search .matching-post h2 {
      margin: 0 0 4px;
      color: var(--heading-color);
      font-size: 15px;
    }

    .site-header .search .matching-post p {
      margin: 0;
      color: var(--muted-color);
      font-size: 13px;
    }

    .site-header .search .empty {
      padding: 12px 16px;
      color: var(--muted-color);
    }

    /* ---------- Language dropdown ---------- */
    .lang-switch {
      position: relative;
      order: 4;
      flex: 0 0 auto;
    }

    .lang-switch-button {
      display: flex;
      align-items: center;
      gap: 6px;
      height: 38px;
      padding: 0 10px;
      border: 1px solid var(--surface-border);
      border-radius: 8px;
      background: var(--surface-bg);
      color: var(--heading-color);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
    }

    .lang-switch-button:hover,
    .lang-switch-button:focus-visible,
    .lang-switch.is-open .lang-switch-button {
      border-color: var(--brand);
    }

    .lang-switch-button::after {
      content: "";
      width: 6px;
      height: 6px;
      margin-left: 2px;
      border-right: 2px solid var(--muted-color);
      border-bottom: 2px solid var(--muted-color);
      transform: translateY(-2px) rotate(45deg);
    }

    .lang-switch .flag {
      flex: 0 0 auto;
      transform: scale(0.625);
      margin: -6px;
    }

    .lang-switch-menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      z-index: 60;
      min-width: 220px;
      max-height: calc(100vh - var(--header-height) - 16px);
      overflow-y: auto;
      margin: 0;
      padding: 6px;
      list-style: none;
      border: 1px solid var(--surface-border);
      border-radius: 10px;
      background: var(--page-bg);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    }

    .lang-switch:not(.is-open) .lang-switch-menu {
      display: none;
    }

    .lang-switch-menu a {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 10px;
      border-radius: 6px;
      color: var(--text-color);
      font-size: 14px;
      text-decoration: none;
    }

    .lang-switch-menu a:hover,
    .lang-switch-menu a:focus-visible {
      background: var(--surface-bg);
      color: var(--heading-color);
    }

    .lang-switch-menu a[aria-current="true"] {
      background: var(--brand-soft);
      color: var(--brand);
      font-weight: 600;
    }

    #theme-toggle {
      order: 5;
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border: 1px solid var(--surface-border);
      border-radius: 8px;
      background: var(--surface-bg);
      color: var(--heading-color);
      font-size: 17px;
      cursor: pointer;
    }

    #theme-toggle:hover,
    #theme-toggle:focus-visible {
      border-color: var(--brand);
      color: var(--brand);
    }

    /* Download CTA: keeps to the right end of the header. */
    .site-download {
      order: 6;
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 6px;
      height: 38px;
      padding: 0 14px;
      border: 1px solid var(--brand);
      border-radius: 8px;
      background: var(--brand);
      color: var(--page-bg);
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
    }

    .site-download:hover,
    .site-download:focus-visible {
      border-color: var(--brand);
      background: var(--brand);
      color: var(--page-bg);
      opacity: 0.88;
    }

    .site-download svg {
      display: block;
    }

    /* Inline call-to-action button inside a page body. */
    .markdown-section a.docs-btn {
      display: inline-block;
      margin: 8px 0;
      padding: 10px 18px;
      border: 1px solid var(--brand);
      border-radius: 8px;
      background: var(--brand);
      color: #ffffff;
      font-weight: 600;
      text-decoration: none;
    }

    .markdown-section a.docs-btn:hover,
    .markdown-section a.docs-btn:focus-visible {
      color: #ffffff;
      opacity: 0.88;
      text-decoration: none;
    }

    /* ---------- Sidebar ---------- */
    .sidebar {
      position: fixed;
      top: var(--header-height);
      bottom: 0;
      left: 0;
      z-index: 30;
      width: var(--sidebar-width);
      padding: 20px 0 32px;
      overflow-y: auto;
      border: 0;
      background: var(--page-bg);
      transition: transform 0.2s ease;
    }

    .sidebar > h1,
    .sidebar .search {
      display: none;
    }

    /* vue.css sets .sidebar .sidebar-nav{line-height:2em}; must match its specificity. */
    .sidebar .sidebar-nav {
      padding: 0 12px;
      line-height: 1.35;
    }

    .sidebar-nav ul {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .sidebar-nav li {
      margin: 0;
    }

    .sidebar-nav > ul > li {
      margin-bottom: 10px;
    }

    /* Docsify wraps every top-level item in a paragraph. Only the bold ones
       are group headers, so the header look lives on the strong, and a plain
       top-level link (Home) keeps the normal link look. */
    .sidebar-nav > ul > li > p {
      margin: 0;
      padding: 0;
    }

    .sidebar-nav > ul > li > p > strong {
      display: block;
      margin: 0 0 2px;
      padding: 0 12px;
      color: var(--heading-color);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .sidebar .sidebar-nav ul li a {
      display: block;
      padding: 4px 12px;
      border-radius: 6px;
      color: #636363;
      font-size: 14.5px;
      font-weight: 400;
      text-decoration: none;
      white-space: normal;
    }

    .sidebar .sidebar-nav ul li a:hover,
    .sidebar .sidebar-nav ul li a:focus-visible {
      background: var(--surface-bg);
      color: var(--heading-color);
    }

    .markdown-section .anchor span {
      color: inherit;
    }

    .sidebar .sidebar-nav ul li.active > a,
    .sidebar .sidebar-nav ul li.active > p > a {
      border-right: 0;
      background: var(--brand-soft);
      color: var(--brand);
      font-weight: 600;
    }

    /* Two areas: Guide and Add-ons. JS sets data-area on <body>. */
    body[data-area="guide"] .sidebar-nav .area-addons,
    body[data-area="addons"] .sidebar-nav .area-guide {
      display: none;
    }

    .sidebar-toggle {
      display: none;
    }

    /* ---------- Content ---------- */
    main {
      z-index: auto !important;
    }

    .content {
      position: static;
      min-height: calc(100vh - var(--header-height));
      margin: var(--header-height) 0 0 var(--sidebar-width);
      padding: 0;
      transition: none;
    }

    .markdown-section {
      max-width: var(--content-width);
      margin: 0 auto;
      padding: 40px 48px 64px;
      color: var(--text-color);
      font-size: 16px;
      line-height: 1.7;
    }

    .markdown-section h1,
    .markdown-section h2,
    .markdown-section h3,
    .markdown-section h4 {
      color: var(--heading-color);
      font-weight: 700;
      line-height: 1.3;
    }

    .markdown-section h1 {
      margin: 0 0 20px;
      font-size: 34px;
    }

    .markdown-section h2 {
      margin: 48px 0 16px;
      padding-top: 24px;
      border-top: 1px solid var(--surface-border);
      font-size: 24px;
    }

    .markdown-section h3 {
      margin: 32px 0 12px;
      font-size: 19px;
    }

    .markdown-section h4 {
      margin: 28px 0 8px;
      font-size: 16px;
    }

    .markdown-section h1 a,
    .markdown-section h2 a,
    .markdown-section h3 a,
    .markdown-section h4 a {
      color: inherit;
      text-decoration: none;
    }

    .markdown-section p,
    .markdown-section ul,
    .markdown-section ol {
      margin: 0 0 16px;
    }

    .markdown-section li {
      margin-bottom: 6px;
    }

    .markdown-section strong {
      color: var(--heading-color);
    }

    .markdown-section a {
      color: var(--brand);
      font-weight: 500;
      text-decoration: none;
    }

    .markdown-section a:hover {
      text-decoration: underline;
    }

    .markdown-section code {
      padding: 2px 6px;
      border-radius: 4px;
      background: var(--code-bg);
      color: var(--heading-color);
      font-size: 0.88em;
    }

    .markdown-section pre {
      border: 1px solid var(--surface-border);
      border-radius: 8px;
      background: var(--code-bg);
    }

    .markdown-section pre > code {
      padding: 16px;
      background: none;
      color: var(--code-text);
    }

    .markdown-section code,
    .markdown-section pre,
    .markdown-section pre > code {
      font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    }

    /* Syntax colors: vue.css defaults are too faint on both themes. */
    .markdown-section pre .token { color: var(--code-text); }
    .markdown-section pre .token.punctuation,
    .markdown-section pre .token.operator { color: var(--code-punct); }
    .markdown-section pre .token.property,
    .markdown-section pre .token.keyword,
    .markdown-section pre .token.tag,
    .markdown-section pre .token.attr-name { color: var(--code-key); }
    .markdown-section pre .token.string,
    .markdown-section pre .token.attr-value,
    .markdown-section pre .token.regex { color: var(--code-string); }
    .markdown-section pre .token.number,
    .markdown-section pre .token.boolean,
    .markdown-section pre .token.null,
    .markdown-section pre .token.constant { color: var(--code-number); }
    .markdown-section pre .token.comment { color: var(--code-comment); }

    .markdown-section table {
      display: table;
      width: 100%;
      margin: 0 0 24px;
      border-collapse: collapse;
      font-size: 15px;
    }

    .markdown-section th,
    .markdown-section td {
      padding: 10px 14px;
      border: 1px solid var(--surface-border);
      text-align: left;
    }

    .markdown-section th {
      background: var(--surface-bg);
      color: var(--heading-color);
      font-weight: 600;
    }

    .markdown-section tr,
    .markdown-section table tr:nth-child(2n) {
      background: transparent;
    }

    .markdown-section img {
      display: block;
      max-width: 100%;
      height: auto;
      margin: 8px 0 4px;
      border: 1px solid var(--surface-border);
      border-radius: 10px;
    }

    .markdown-section p > em:only-child {
      display: block;
      color: var(--muted-color);
      font-size: 14px;
    }

    .markdown-section blockquote {
      margin: 0 0 16px;
      padding: 12px 16px;
      border-left: 4px solid var(--brand);
      border-radius: 0 8px 8px 0;
      background: var(--brand-soft);
      color: var(--text-color);
    }

    .markdown-section hr {
      border: 0;
      border-top: 1px solid var(--surface-border);
    }

    /* ---------- "On this page" outline ---------- */
    .page-outline {
      position: fixed;
      top: calc(var(--header-height) + 40px);
      right: 24px;
      width: calc(var(--outline-width) - 24px);
      max-height: calc(100vh - var(--header-height) - 80px);
      overflow-y: auto;
      padding-left: 16px;
    }

    .page-outline[hidden] {
      display: none;
    }

    .page-outline-title {
      margin-bottom: 12px;
      color: var(--heading-color);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .page-outline a {
      display: block;
      padding: 4px 0;
      color: var(--muted-color);
      font-size: 14px;
      line-height: 1.4;
      text-decoration: none;
    }

    .page-outline a[data-level="3"] {
      padding-left: 12px;
      font-size: 13px;
    }

    .page-outline a:hover,
    .page-outline a.is-active {
      color: var(--brand);
    }

    @media (min-width: 1280px) {
      .content {
        margin-right: var(--outline-width);
      }
    }

    @media (max-width: 1279px) {
      .page-outline {
        display: none;
      }
    }

    /* ---------- Small screens ---------- */
    @media (max-width: 900px) {
      .site-header-inner {
        gap: 12px;
        padding: 0 12px 0 60px;
      }

      .site-brand span:last-child {
        display: none;
      }

      .site-primary a {
        padding: 0 8px;
        font-size: 14px;
      }

      .site-header .search {
        max-width: none;
      }

      .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
      }

      body.close .sidebar {
        transform: translateX(0);
      }

      .sidebar-toggle {
        position: fixed;
        top: 13px;
        left: 12px;
        z-index: 50;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px !important;
        height: 38px;
        padding: 0 !important;
        border: 1px solid var(--surface-border);
        border-radius: 8px;
        background: var(--surface-bg) !important;
      }

      .sidebar-toggle .sidebar-toggle-button span {
        display: block;
        width: 16px;
        height: 2px;
        margin: 3px auto;
        background-color: var(--heading-color);
      }

      .content,
      body.close .content {
        margin-left: 0;
      }

      .markdown-section {
        padding: 28px 20px 48px;
      }
    }

    @media (max-width: 560px) {
      .site-header-inner {
        gap: 8px;
      }

      .site-brand-mark {
        display: none;
      }

      .site-brand {
        display: none;
      }

      .site-primary a {
        padding: 0 6px;
      }

      .lang-switch-code {
        display: none;
      }

      .site-download {
        padding: 0 10px;
      }

      .site-download-label {
        display: none;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .sidebar {
        transition: none;
      }
    }

    /* Thin, theme-aware scrollbars */
    * {
      scrollbar-width: thin;
      scrollbar-color: var(--scroll-thumb, #d1d5db) transparent;
    }
    *::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    *::-webkit-scrollbar-track,
    *::-webkit-scrollbar-corner {
      background: transparent;
    }
    *::-webkit-scrollbar-button {
      display: none;
      width: 0;
      height: 0;
    }
    *::-webkit-scrollbar-thumb {
      background: var(--scroll-thumb, #d1d5db);
      border: 2px solid transparent;
      border-radius: 8px;
      background-clip: padding-box;
    }
    *::-webkit-scrollbar-thumb:hover {
      background-color: var(--muted-color);
    }

    /* ---------- Right-to-left languages ---------- */
    html[dir="rtl"] .sidebar {
      right: 0;
      left: auto;
    }

    html[dir="rtl"] .content {
      margin-right: var(--sidebar-width);
      margin-left: 0;
    }

    html[dir="rtl"] .page-outline {
      right: auto;
      left: 24px;
      padding-right: 16px;
      padding-left: 0;
    }

    html[dir="rtl"] .markdown-section,
    html[dir="rtl"] .markdown-section th,
    html[dir="rtl"] .markdown-section td {
      text-align: right;
    }

    html[dir="rtl"] .markdown-section blockquote {
      border-right: 4px solid var(--brand);
      border-left: 0;
      border-radius: 8px 0 0 8px;
    }

    html[dir="rtl"] .markdown-section .anchor span {
      direction: rtl;
    }

    @media (max-width: 1279px) {
      html[dir="rtl"] .page-outline {
        display: none;
      }
    }

    @media (max-width: 900px) {
      html[dir="rtl"] .sidebar {
        transform: translateX(100%);
      }

      html[dir="rtl"] body.close .sidebar {
        transform: translateX(0);
      }

      html[dir="rtl"] .content,
      html[dir="rtl"] body.close .content {
        margin-right: 0;
      }

      html[dir="rtl"] .sidebar-toggle {
        right: 12px;
        left: auto;
      }

      html[dir="rtl"] .site-header-inner {
        padding: 0 60px 0 12px;
      }
    }

    /* ---------- Redirect and 404 pages ---------- */
    .redirect-note,
    .not-found {
      max-width: 720px;
      margin: 120px auto;
      padding: 0 24px;
      color: var(--text-color);
      font-family: var(--base-font-family);
    }

    .not-found h1 {
      margin: 0 0 16px;
      color: var(--heading-color);
      font-size: 64px;
      line-height: 1;
    }

    .not-found a {
      color: var(--brand);
    }

    .not-found ul {
      padding-left: 20px;
    }
  