* { box-sizing: border-box; }
html { scroll-padding-top: 92px; }
body { margin: 0; background: var(--bspb-bg-primary-system); color: var(--bspb-text-primary); font: 500 16px/1.45 var(--bspb-font-family); letter-spacing: .02em; font-synthesis: none; }
button, input { font: inherit; letter-spacing: .01em; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 3px; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--bspb-border-hover-focus); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 40px; font-weight: 700; text-wrap: balance; }
h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
h3 { font-size: 18px; line-height: 24px; font-weight: 600; }
.icon { width: 24px; height: 24px; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--bspb-text-secondary); }
.small { font-size: 14px; line-height: 20px; }
.header { position: sticky; top: 0; z-index: 10; background: white; border-bottom: 1px solid var(--bspb-border-default); }
.header-inner, .layout, .toolbar, .footer { width: min(calc(100% - 32px), 1140px); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; line-height: 18px; font-weight: 700; letter-spacing: 0; }
.brand svg { width: 34px; height: 34px; color: var(--bspb-icon-primary); fill: currentColor; }
.tabs { display: flex; align-self: stretch; gap: 24px; }
.tabs a { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; border-bottom: 2px solid transparent; padding: 0 8px; }
.tabs .icon { width: 20px; height: 20px; }
.tabs a:hover { background: var(--bspb-bg-primary-hover); }
.tabs a[aria-current] { border-color: var(--bspb-border-tertiary); font-weight: 700; }
.download-link { font-size: 14px; text-decoration: none; background: var(--bspb-button-bg-secondary-default); border-radius: 16px; padding: 10px 16px; }
.download-link:hover { background: var(--bspb-button-bg-secondary-hover); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 24px; }
.breadcrumb { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--bspb-text-secondary); min-width: 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb span:last-child { overflow-wrap: anywhere; }
.search-wrap { position: relative; width: 348px; flex-shrink: 0; }
.search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search-field { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--bspb-border-contrast); border-radius: 16px; padding: 0 14px; }
.search-field svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
.search-field input { min-width: 0; width: 100%; height: 46px; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--bspb-text-primary); }
.search-field:focus-within { outline: 2px solid var(--bspb-border-hover-focus); outline-offset: 2px; }
.search-field input:focus-visible { outline: none; }
input::placeholder { color: var(--bspb-text-secondary); opacity: 1; }
.search-results { position: absolute; top: calc(100% + 8px); right: 0; width: min(520px, calc(100vw - 32px)); max-height: 65vh; overflow: auto; background: white; border: 1px solid var(--bspb-border-default); box-shadow: var(--bspb-overlay-shadow); border-radius: 16px; z-index: 20; padding: 8px; }
.search-summary { padding: 12px; color: var(--bspb-text-secondary); font-size: 14px; }
.search-results a { display: grid; gap: 4px; padding: 12px; text-decoration: none; border-radius: 8px; }
.search-results a:hover, .search-results a:focus { background: var(--bspb-bg-info-default); }
.search-results a span { color: var(--bspb-text-secondary); font-size: 14px; }
.layout { display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 36px 56px; }
.layout:focus { outline: none; }
.context { display: grid; gap: 16px; min-width: 0; }
.paper { background: white; padding: 24px; border-radius: 24px; min-width: 0; }
.context h2 { font-size: 18px; line-height: 24px; }
.info-panel { background: var(--bspb-bg-info-default); }
.total { font-size: 24px; line-height: 30px; font-weight: 700; margin: 12px 0 4px; }
.info-detail { margin-top: 16px; font-size: 14px; color: var(--bspb-text-secondary); }
.preparation h2 { margin-bottom: 16px; }
.preparation > p { margin-top: 16px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; overflow-wrap: anywhere; }
.check-row input { appearance: none; margin: 1px 0 0; width: 20px; height: 20px; border: 1.5px solid var(--bspb-border-hover-focus); border-radius: 5px; background: white; flex: 0 0 auto; cursor: pointer; }
.check-row input:checked { background: var(--bspb-button-bg-primary-default); border-color: var(--bspb-button-bg-primary-default); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check-row input:checked + span { color: var(--bspb-text-secondary); }
.progress-panel p { margin-top: 8px; }
progress { appearance: none; height: 6px; width: 100%; border: 0; border-radius: 8px; overflow: hidden; margin-top: 16px; background: var(--bspb-bg-secondary); }
progress::-webkit-progress-bar { background: var(--bspb-bg-secondary); }
progress::-webkit-progress-value { background: var(--bspb-button-bg-primary-default); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--bspb-button-bg-primary-default); }
.text-button { border: 0; color: var(--bspb-text-secondary); font-size: 14px; background: none; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; }
.content { min-width: 0; }
.page-heading { margin-bottom: 24px; }
.page-heading > p { margin-top: 16px; color: var(--bspb-text-secondary); line-height: 24px; }
.course-list { display: grid; gap: 20px; }
.course-card { position: relative; }
.course-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.course-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 16px; background: var(--bspb-bg-info-default); }
.course-number { color: var(--bspb-text-secondary); font-size: 14px; }
.completion { margin-left: auto; font-size: 14px; font-weight: 600; }
.course-card h2 a { text-decoration: none; }
.course-card h2 a:hover { color: var(--bspb-text-clickable-hover); }
.metadata { display: flex; gap: 16px; color: var(--bspb-text-secondary); font-size: 14px; flex-wrap: wrap; margin-top: 12px; }
.metadata span { display: flex; align-items: center; gap: 6px; }
.metadata .icon { width: 16px; height: 16px; }
.course-card > p { margin-top: 16px; line-height: 24px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 32px; border: 0; border-radius: 16px; background: var(--bspb-button-bg-primary-default); color: white; font-weight: 700; text-decoration: none; text-align: center; font-size: 16px; line-height: 22px; }
.button:hover { background: var(--bspb-button-bg-primary-hover); }
.button.secondary { color: var(--bspb-text-primary); background: var(--bspb-button-bg-secondary-default); }
.notice { display: flex; gap: 16px; background: var(--bspb-bg-info-default); border-radius: 16px; padding: 20px 24px; margin-top: 24px; }
.notice h2 { font-size: 18px; line-height: 24px; }
.notice p { color: var(--bspb-text-secondary); font-size: 14px; line-height: 20px; margin-top: 4px; }
.notice-symbol { display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; height: 22px; width: 22px; flex: 0 0 auto; font-weight: 700; }
.download-bottom { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 24px 0 0; }
.download-bottom .icon { width: 18px; height: 18px; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; border-top: 1px solid var(--bspb-border-default); color: var(--bspb-text-secondary); font-size: 12px; }
.toc-paper { padding: 20px 16px; }
.back-link { display: block; color: var(--bspb-text-secondary); font-size: 14px; margin: 0 8px 24px; }
.toc-paper h2 { padding-inline: 8px; margin-bottom: 12px; }
.toc-toggle, .mobile-progress { display: none; }
.toc { display: grid; gap: 4px; max-height: calc(100vh - 260px); overflow-y: auto; }
.toc a { display: flex; gap: 10px; text-decoration: none; padding: 10px 8px; border-radius: 8px; font-size: 14px; line-height: 20px; }
.toc a:hover { background: var(--bspb-bg-primary-hover); }
.toc a[aria-current] { background: var(--bspb-bg-info-default); font-weight: 700; }
.section-state { width: 18px; height: 18px; display: inline-flex; flex: 0 0 auto; border: 1px solid var(--bspb-border-contrast); border-radius: 50%; margin-top: 1px; }
.section-state .icon { width: 16px; height: 16px; opacity: 0; }
.section-state.done { color: white; background: var(--bspb-button-bg-primary-default); border-color: transparent; }
.section-state.done .icon { opacity: 1; }
.lesson-meta { display: flex; gap: 12px; align-items: center; color: var(--bspb-text-secondary); font-size: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lesson-tools { display: flex; justify-content: space-between; gap: 12px; color: var(--bspb-text-secondary); font-size: 14px; margin-bottom: 20px; }
.lesson-section { margin-bottom: 20px; }
.section-content { margin-top: 16px; }
.section-content > * + * { margin-top: 16px; }
.section-content p { white-space: pre-line; overflow-wrap: anywhere; }
.section-content strong { font-weight: 700; }
.section-content a { color: var(--bspb-text-clickable-hover); overflow-wrap: anywhere; }
.section-content :not(pre) > code { background: var(--bspb-bg-info-default); padding: 2px 4px; border-radius: 4px; color: var(--bspb-text-primary); font-size: .88em; }
.content-list { padding-left: 22px; }
.content-list li { padding-left: 4px; margin-block: 8px; overflow-wrap: anywhere; }
.section-complete { border-top: 1px solid var(--bspb-border-default); margin-top: 24px; padding-top: 12px; font-size: 14px; }
.callout { background: var(--bspb-bg-info-default); border-radius: 16px; padding: 16px; }
.callout h3 { font-size: 16px; line-height: 22px; font-weight: 700; }
.callout p { margin-top: 8px; font-size: 14px; line-height: 21px; color: var(--bspb-text-secondary); }
.table-scroll { overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 21px; }
th { color: var(--bspb-text-secondary); font-weight: 600; }
th, td { padding: 12px 8px; vertical-align: top; border-bottom: 1px solid var(--bspb-border-default); min-width: 110px; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 0; }
tbody tr:last-child td { border-bottom: 0; }
.code-block { border: 1px solid var(--bspb-border-default); border-radius: 16px; overflow: hidden; min-width: 0; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bspb-bg-info-default); padding: 12px 16px; font-size: 14px; font-weight: 600; }
.code-toolbar > span { min-width: 0; overflow-wrap: anywhere; }
.code-toolbar small { display: block; font-size: 12px; font-weight: 500; color: var(--bspb-text-secondary); margin-top: 2px; }
.copy-button { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 0; background: var(--bspb-button-bg-secondary-default); border-radius: 8px; padding: 8px 10px; min-height: 36px; color: var(--bspb-text-primary); font-size: 14px; font-weight: 600; }
.copy-button:hover { background: var(--bspb-button-bg-secondary-hover); }
.copy-button .icon { width: 16px; height: 16px; }
pre { margin: 0; padding: 20px; background: #f8fafc; overflow: auto; color: #163652; font: 400 13px/1.7 Consolas, 'Cascadia Code', monospace; letter-spacing: 0; tab-size: 2; }
pre code { font: inherit; }
pre.long-code { max-height: 430px; }
pre.expanded { max-height: none; }
.expand-code { width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--bspb-border-default); color: var(--bspb-text-secondary); font-size: 14px; background: white; }
.expand-code:hover { background: var(--bspb-bg-info-default); }
.tok-string { color: #216e42; }.tok-variable { color: #92501b; }.tok-keyword { color: #7144a5; }.tok-comment { color: #596f7a; font-style: italic; }.tok-number { color: #a02d54; }
.lesson-end { padding: 24px 0; }.lesson-end p { margin: 12px 0 24px; color: var(--bspb-text-secondary); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); background: var(--bspb-button-bg-primary-default); color: white; border-radius: 16px; padding: 14px 20px; max-width: calc(100% - 32px); width: max-content; opacity: 0; pointer-events: none; transition: .16s ease; z-index: 30; font-size: 14px; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.skip-link { position: fixed; top: -80px; left: 16px; background: white; padding: 12px; z-index: 50; }.skip-link:focus { top: 8px; }
.menu-button { display: none; }.menu-dialog { border: 0; border-radius: 24px; padding: 24px; width: min(440px, calc(100% - 32px)); color: var(--bspb-text-primary); box-shadow: var(--bspb-overlay-shadow); }.menu-dialog::backdrop { background: var(--bspb-bg-modal-overlay); }
.dialog-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }.icon-button { border: 0; border-radius: 50%; background: var(--bspb-bg-info-default); width: 36px; height: 36px; font-size: 24px; color: inherit; }
#mobile-nav { display: grid; gap: 8px; }#mobile-nav a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 8px; text-decoration: none; }#mobile-nav a[aria-current] { background: var(--bspb-bg-info-default); font-weight: 700; }
.loading, .error-panel { grid-column: 1 / -1; }.error-panel p { margin-top: 20px; }.noscript { padding: 24px; background: white; }
[hidden] { display: none !important; }
@media (min-width: 1172px) { .lesson .page-heading { min-height: 100px; }.context:has(.toc) { position: sticky; top: 92px; } }
@media (max-width: 1171px) {
  html { scroll-padding-top: 140px; }
  .header-inner, .layout, .toolbar, .footer { max-width: 640px; }
  .header-inner { gap: 12px; flex-wrap: wrap; padding-top: 12px; }
  .tabs { order: 3; width: 100%; justify-content: space-between; gap: 8px; height: 48px; }
  .tabs a { font-size: 14px; padding-inline: 4px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 20px; }
  .search-wrap { width: 100%; }.search-results { width: 100%; }
  .layout { grid-template-columns: 1fr; gap: 24px; padding-block: 24px 40px; }
  .layout > .content { order: -1; }
  .context { grid-template-columns: 1fr; }
  .context:has(.toc) { order: -2; }
  .toc-paper { padding: 16px; }.toc-paper h2 { display: none; }.toc { display: none; max-height: 260px; margin-top: 12px; }.toc.toc-open { display: grid; }.toc-paper .back-link { margin-bottom: 12px; }.context:has(.toc) .progress-panel { display: none; }
  .toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; color: var(--bspb-text-primary); padding: 8px; font-weight: 700; text-align: left; }.toc-toggle span { font-size: 22px; font-weight: 500; }.mobile-progress { display: block; margin: 4px 8px 0; }
  h1 { font-size: 24px; line-height: 32px; }h2 { font-size: 20px; }
  .button { min-height: 44px; padding: 10px 16px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 84px; }
  body { line-height: 1.45; }.header-inner { min-height: 68px; padding-block: 10px; }.brand { font-size: 16px; }.brand svg { width: 30px; height: 30px; }
  .tabs { display: none; }.menu-button { display: inline-flex; min-height: 40px; margin-left: auto; font-size: 14px; border-radius: 12px; }.download-link { display: none; }
  .paper { padding: 20px 16px; }.page-heading { margin-bottom: 20px; }.page-heading > p { margin-top: 12px; }
  .course-card-heading { margin-bottom: 12px; }.course-icon { width: 40px; height: 40px; border-radius: 12px; }.course-number { font-size: 14px; }
  .course-card h2 { font-size: 20px; line-height: 26px; }.metadata { gap: 8px 16px; }.card-bottom { flex-wrap: wrap; margin-top: 20px; }.card-bottom .button { flex: 1; white-space: nowrap; }.card-bottom > span { font-size: 12px; }
  .notice { padding: 16px; gap: 12px; }.footer { flex-direction: column; gap: 8px; }.breadcrumb { font-size: 14px; }
  .code-toolbar { padding: 10px; gap: 8px; }.copy-button { padding: 8px; }.copy-button span { font-size: 12px; }pre { padding: 16px; font-size: 12px; }
  .lesson-meta { gap: 8px; }.lesson-tools { align-items: flex-start; }.lesson-tools a { text-align: right; }
  .toast { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media print { .header, .toolbar, .context, .footer, .lesson-tools, .copy-button, .expand-code, .section-complete, .toast, .lesson-end { display: none; }.layout { display: block; width: 100%; padding: 0; }.paper { break-inside: avoid; padding: 12px 0; }.code-block { break-inside: auto; }pre.long-code { max-height: none; }pre { white-space: pre-wrap; overflow-wrap: anywhere; }body { background: white; color: black; } }
