/* Scoped to the tutorial library and its individual tutorial pages. */
.cb-theme-page #header [data-row] { background: var(--cb-surface); }
.cb-theme-page #header svg { color: var(--cb-text); fill: var(--cb-text); }
.cb-theme-page #header .current-menu-item > a::before,
.cb-theme-page #header .current-menu-item > a::after { background-color: var(--cb-text); }
.cb-theme-page #main > .ct-container-full { padding-top: 28px; }
.cb-theme-page .hero-section { margin-bottom: 24px; }
.cb-theme-page #header a, .cb-theme-page #header button,
.cb-theme-page .entry-header, .cb-theme-page .entry-header h1,
.cb-theme-page .ct-breadcrumbs, .cb-theme-page .ct-breadcrumbs a { color: var(--cb-text); }
.cb-theme-page .hero-section { background: var(--cb-bg); }
:root[data-cb-theme="night"] .cb-theme-page #header .site-logo-container img { filter: grayscale(1) invert(1); }
:root[data-cb-theme="night"] .cb-theme-page #offcanvas,
:root[data-cb-theme="night"] .cb-theme-page #offcanvas .ct-panel-inner { background: var(--cb-surface); color: var(--cb-text); }
:root[data-cb-theme="night"] .cb-theme-page #offcanvas a,
:root[data-cb-theme="night"] .cb-theme-page #offcanvas button { color: var(--cb-text); }

.cb-library { max-width: 1200px; margin: auto; color: var(--cb-text); font-family: inherit; line-height: 1.7; }
.cb-library *, .cb-library *::before, .cb-library *::after { box-sizing: border-box; }
.cb-library [hidden] { display: none !important; }
.cb-library h2, .cb-library h3 { color: var(--cb-text); line-height: 1.18; overflow-wrap: anywhere; }
.cb-library h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; margin: 0 0 18px; }
.cb-library h3 { font-size: 1.15rem; margin: 16px 0 12px; }
.cb-library p { margin: 0 0 18px; }
.cb-library .cb-eyebrow { font-size: .72rem; letter-spacing: .15em; font-weight: 700; text-transform: uppercase; margin: 0 0 14px; }
.cb-small { font-size: .8rem; color: var(--cb-muted); }
.cb-library .cb-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  background: var(--cb-action); color: var(--cb-action-text); border: 2px solid var(--cb-action);
  border-radius: 10px; padding: 14px 20px; min-height: 50px; max-width: 100%;
  font: inherit; font-size: .76rem; line-height: 1.5; font-weight: 700; letter-spacing: .03em;
  text-decoration: none; text-align: center; white-space: normal; cursor: pointer;
}
.cb-library .cb-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.cb-library a:focus-visible, .cb-library button:focus-visible, .cb-library summary:focus-visible { outline: 3px solid var(--cb-focus); outline-offset: 4px; }
.cb-text-link { color: var(--cb-text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.cb-toolbar { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.cb-library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.cb-library-heading .cb-intro { flex: 1; margin-bottom: 0; }
.cb-library-heading .cb-toolbar { flex-shrink: 0; margin-bottom: 0; }
.cb-intro { max-width: 760px; margin-bottom: 28px; }
.cb-intro > p:last-child { font-size: 1.04rem; }
.cb-projects { display: grid; gap: 36px; }
.cb-inline-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 40px; align-items: start; padding: 36px; border: 1px solid var(--cb-border); border-radius: 20px; background: var(--cb-surface); scroll-margin-top: 110px; }
.cb-inline-info, .cb-inline-video { min-width: 0; }
.cb-inline-info > h2 { margin: 10px 0 18px; }
.cb-finished-photo { margin: 24px 0; border-radius: 14px; overflow: hidden; background: #fff; }
.cb-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; object-position: center; background: #fff; }
.cb-placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 24px; background: var(--cb-soft); color: var(--cb-muted); text-align: center; border-radius: 14px; }
.cb-inline-download .cb-button { width: 100%; justify-content: space-between; }
.cb-inline-download .cb-small { margin: 9px 0 20px; }
.cb-project-details, .cb-video-help { border-top: 1px solid var(--cb-border); padding-top: 12px; font-size: .86rem; }
.cb-library summary { min-height: 44px; padding-block: 5px; cursor: pointer; font-weight: 600; }
.cb-project-details h3 { font-size: 1rem; }
.cb-project-details ul { padding-left: 20px; }
.cb-video-panel { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1 / 1; border: 1px solid var(--cb-border); border-radius: 16px; overflow: hidden; background: #25282d; }
.cb-video-poster { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.cb-library .cb-load-video { position: absolute; bottom: 16px; left: 16px; right: 16px; margin: 0; border-color: #fff; background: #fff; color: #111; box-shadow: 0 4px 18px #0004; }
.cb-player-loaded { aspect-ratio: 9 / 16; background: #000; }
.cb-video { display: block; width: 100%; height: 100%; border: 0; margin: 0; }
.cb-player-status { position: absolute; z-index: 1; top: 8px; left: 8px; right: 8px; padding: 8px; background: #111e; color: #fff; border-radius: 8px; font-size: .8rem; pointer-events: none; text-align: center; }
.cb-inline-video > .cb-small { text-align: center; margin: 12px 0; }
.cb-print-tip { margin: 40px 0 10px; padding: 28px; background: var(--cb-soft); border-radius: 16px; }
.cb-print-tip h2 { font-size: 1.4rem; margin-bottom: 12px; }
.cb-print-tip p { margin: 0; }
.cb-notice { border-left: 4px solid var(--cb-text); padding: 12px 18px; background: var(--cb-soft); font-size: .9rem; }
.cb-status { display: inline-block; background: var(--cb-soft); color: var(--cb-text); padding: 5px 12px; border-radius: 100px; font-size: .76rem; font-weight: 600; }
.cb-section { padding: 44px 0; scroll-margin-top: 100px; }
.cb-product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin-top: 28px; }
.cb-product .cb-photo { border-radius: 16px; }
.cb-product-actions { margin-top: 22px; }
.cb-download { display: flex; gap: 24px; padding: 32px; background: var(--cb-soft); border: 1px solid var(--cb-border); border-radius: 16px; scroll-margin-top: 110px; }
.cb-pdf-icon { display: grid; place-items: center; width: 66px; height: 82px; flex-shrink: 0; border: 2px solid var(--cb-text); border-radius: 8px; font-weight: 700; }
.cb-footer { background: #151619; color: #fff; padding: clamp(28px, 5vw, 56px); border-radius: 20px; margin-bottom: 28px; }
.cb-library .cb-footer h2, .cb-library .cb-footer a { color: #fff; }
.cb-library .cb-footer .cb-button { background: #fff; color: #151619; border-color: #fff; }
.cb-library .cb-footer .cb-outline { background: transparent; color: #fff; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cb-tutorial { margin-top: 20px; }
.cb-additional:empty { display: none; }

@media (max-width: 1000px) {
  .cb-inline-project { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 28px; }
  .cb-inline-video { width: min(100%, 360px); justify-self: center; }
  .cb-projects { gap: 28px; }
}
@media (max-width: 600px) {
  .cb-library-heading { flex-direction: column-reverse; gap: 20px; }
  .cb-inline-project { padding: 20px 16px; border-radius: 16px; }
  .cb-inline-info > h2 { font-size: 1.75rem; }
  .cb-inline-download .cb-button { font-size: .7rem; gap: 8px; padding: 14px 12px; }
  .cb-product { grid-template-columns: 1fr; gap: 24px; }
  .cb-download { flex-direction: column; padding: 24px; }
  .cb-section { padding: 32px 0; }
  .cb-actions { flex-direction: column; align-items: stretch; }
  .cb-toolbar { justify-content: flex-start; }
  .cb-print-tip { padding: 24px; }
}
