/* Theme "b" — Skincare News, Template B round 3. Loaded after base.css, only on sites with layout.theme = "b".
   Colours/fonts come from the site's tokens (skincare.config.mjs, themeB); everything new is `b-*` markup from
   src/lib/theme-b.mjs, and base-owned parts (article, search, info pages, 404) are adjusted under `.theme-b`.
   Breakpoints follow the design: header switches at 768px (config navCollapse), 900 lead split, 1000 3-up rows,
   1100 article rail. */

body.theme-b { --px: clamp(20px, 5.5vw, 80px); overflow-wrap: break-word; }
html.b-lock { overflow: hidden; }
.theme-b a:hover { color: var(--accent-ink); }
.theme-b img { max-width: 100%; }
.b-wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--px); padding-right: var(--px); }
@media (prefers-reduced-motion: reduce) { .theme-b *, .theme-b *::before, .theme-b *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Shared bits ---------- */
.theme-b .kicker { font: 600 12px/1.3 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.theme-b .kicker a { text-decoration: none; }
.b-kick { margin: 0; font: 600 12px/1.3 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.b-kick a { text-decoration: none; color: inherit; }
.b-by { margin: 0; font: 12px/1.4 var(--f-ui); color: var(--muted); }
.b-by--lead { font-size: 13px; color: #4A463F; }
.b-more { font: 500 13px var(--f-ui); white-space: nowrap; text-decoration: none; }
.b-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.b-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); font: 500 14px var(--f-ui); text-decoration: none; color: var(--ink); }
.theme-b .b-btn:hover { background: var(--ink); color: var(--paper); }

/* Picture slot: fixed ratio, tinted; the picture is cropped (cover) only when that is harmless, otherwise it is
   shown whole at its own size (contain) - never stretched. A failed load leaves the tinted slot only. */
.b-slot { display: block; position: relative; width: 100%; overflow: hidden; background: var(--ph-a); }
.b-slot__img { position: absolute; inset: 0; margin: auto; display: block; }
.b-slot__img--cover { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.b-slot__img--contain { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.b-slot--pad { --pad: clamp(16px, 2vw, 28px); }
.b-slot--pad .b-slot__img { inset: var(--pad); max-width: calc(100% - 2 * var(--pad)); max-height: calc(100% - 2 * var(--pad)); }
.b-slot.is-broken .b-slot__img { display: none; }

/* ---------- Header ---------- */
.b-hdr { background: var(--paper); }
.b-hdr__row { display: flex; align-items: center; gap: 24px; height: 88px; }
.b-logo { font: 500 40px/1 var(--f-display); letter-spacing: -0.02em; white-space: nowrap; text-decoration: none; color: var(--ink); }
.b-logo em { font-style: italic; font-weight: 400; color: var(--accent); }
.theme-b .b-logo:hover { color: var(--ink); }
.b-search-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--rule); border-radius: 2px; font: 13px var(--f-ui); color: var(--ink); }
.b-search-btn:hover { border-color: var(--ink); }
.b-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: inherit; padding: 0; }
.b-nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.b-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; height: 44px; }
.b-nav a { display: flex; align-items: center; height: 100%; font: 500 13.5px var(--f-ui); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.b-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.b-hdr--m .b-hdr__bar { height: 64px; padding: 0 12px 0 var(--px); display: flex; align-items: center; gap: 2px; }
.b-logo--m { flex: 1; min-width: 0; font-size: 27px; overflow: hidden; text-overflow: ellipsis; }
.b-nav--scroll ul { overflow-x: auto; padding: 0 var(--px); gap: 22px; scrollbar-width: none; }
.b-nav--scroll ul::-webkit-scrollbar { display: none; }
.b-nav--scroll a { flex: none; }

/* Header search: popover anchored to the toggle (global.js toggles [hidden]; theme-b.js closes on outside click).
   Absolutely positioned - opening it never changes the height of the header, the nav or the page. */
.b-search { position: relative; margin-left: auto; }
.b-search .b-search-btn { margin-left: 0; }
.theme-b .b-pop { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(420px, calc(100vw - 2 * var(--px))); background: var(--paper); border: 1px solid var(--rule); border-top: 2px solid var(--accent); border-radius: 2px; box-shadow: 0 8px 24px rgba(36, 35, 31, 0.1); }
.theme-b .b-pop form { display: flex; align-items: center; gap: 2px; max-width: none; margin: 0; padding: 6px 6px 6px 8px; }
.theme-b .b-pop input { flex: 1; min-width: 0; height: 44px; padding: 0 6px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; font: 400 20px/1.2 var(--f-display); color: var(--ink); -webkit-appearance: none; appearance: none; }
.theme-b .b-pop input::placeholder { color: var(--muted); opacity: 0.8; }
.theme-b .b-pop input:focus { outline: none; border-bottom-color: var(--accent); }
.theme-b .b-pop input::-webkit-search-cancel-button { display: none; }
.theme-b .b-pop button { width: 40px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 2px; background: none; color: var(--ink); font: inherit; }
.theme-b .b-pop .b-pop__close { color: var(--muted); }
.theme-b .b-pop button:hover { color: var(--accent-ink); }
.theme-b .b-pop button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.b-hdr--m { position: relative; }
.theme-b .b-hdr--m .b-pop { top: 68px; left: var(--px); right: var(--px); width: auto; }

/* Mobile menu: full-screen dialog (behaviour in theme-b.js) */
.b-menu { position: fixed; inset: 0; z-index: 40; background: var(--footer-bg); color: var(--paper); overflow: auto; padding: 0 12px 32px var(--px); }
.b-menu__bar { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.b-menu .b-logo { color: var(--paper); }
.b-menu .b-logo em { color: var(--accent-soft); }
.b-menu__search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; margin: 8px 8px 18px 0; border: 1px solid rgba(246, 242, 234, 0.4); font: 15px var(--f-ui); color: var(--paper); text-decoration: none; }
.b-menu__list { list-style: none; margin: 0; padding: 0 8px 0 0; }
.b-menu__list li { border-top: 1px solid rgba(246, 242, 234, 0.2); }
.b-menu__list a { display: flex; align-items: center; min-height: 56px; font: 400 30px var(--f-display); color: var(--paper); text-decoration: none; }
.b-menu__service { list-style: none; margin: 16px 0 0; padding: 14px 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 22px; border-top: 1px solid rgba(246, 242, 234, 0.2); }
.b-menu__service a { display: inline-flex; align-items: center; min-height: 44px; font: 15px var(--f-ui); color: #DCD6CB; text-decoration: none; }
.theme-b .b-menu a:hover { color: var(--accent-soft); }
.b-menu a:focus-visible, .b-menu button:focus-visible { outline-color: var(--paper); }

/* ---------- Home ---------- */
.b-top { padding-top: clamp(16px, 2.2vw, 32px); }
.b-lead { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--accent-soft); }
.b-lead__media { display: flex; align-items: center; background: #E4D8C8; }
.b-lead .b-slot { background: #E4D8C8; }
.b-lead__body { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 1.3vw, 18px); padding: clamp(20px, 3vw, 44px); }
.b-lead__title { margin: 0; max-width: 18em; font: 500 clamp(32px, 4vw, 58px)/1.05 var(--f-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.b-lead__title a { text-decoration: none; }
.b-lead__dek { margin: 0; max-width: 36em; font: clamp(16px, 1.3vw, 19px)/1.45 var(--f-ui); color: #3D3A34; text-wrap: pretty; }
.b-lead--text .b-lead__body { max-width: 980px; }
.b-lead--framed .b-lead__media { width: min(100%, 460px); }
@media (min-width: 720px) {
  .b-lead--framed { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .b-lead--framed .b-lead__media { width: 100%; }
}
@media (min-width: 900px) {
  .b-lead--wide, .b-lead--cover { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

.b-latest { margin-top: clamp(20px, 2.2vw, 28px); border-top: 1px solid var(--ink); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 14px 0; }
.b-latest h2 { flex: 0 0 150px; margin: 0; padding-top: 3px; font: 600 12px var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; }
.b-latest ol { flex: 1 1 600px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 0; }
.b-latest li { min-width: 0; border-left: 1px solid var(--rule); padding: 0 clamp(16px, 1.8vw, 26px); display: flex; flex-direction: column; gap: 6px; }
.b-latest__meta { font: 12px var(--f-ui); color: var(--muted); }
.b-latest__meta a { font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.b-latest__title { font: 500 21px/1.22 var(--f-display); text-decoration: none; text-wrap: pretty; overflow-wrap: anywhere; }

.b-sec, .b-cols { margin-top: clamp(48px, 5.5vw, 80px); }
.b-sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: clamp(18px, 2vw, 26px); }
.b-sechead h2 { margin: 0; font: 500 clamp(26px, 2.2vw, 32px)/1.2 var(--f-display); letter-spacing: -0.01em; }
.b-sechead h2 a { text-decoration: none; }

.b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(24px, 2.4vw, 32px); }
.b-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.b-card__media { display: block; }
.b-card__rule { border-top: 3px solid var(--accent); }
.b-card__title { margin: 0; font: 500 clamp(21px, 1.75vw, 25px)/1.16 var(--f-display); text-wrap: pretty; overflow-wrap: anywhere; }
.b-card__title a { text-decoration: none; }
.b-card__dek { margin: 0; font: 15px/1.5 var(--f-ui); color: #4A463F; }

.b-band { margin-top: clamp(56px, 6vw, 88px); background: var(--accent); color: var(--paper); }
.b-band__in { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(28px, 4vw, 56px); }
.b-band .b-sechead { border-top: 0; padding-top: 0; padding-bottom: 14px; border-bottom: 1px solid rgba(246, 242, 234, 0.4); margin-bottom: clamp(20px, 2.2vw, 28px); }
.b-band .b-sechead h2 { font-size: clamp(32px, 3.1vw, 44px); letter-spacing: -0.02em; }
.b-band .b-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(24px, 2.6vw, 36px); }
.b-band a, .b-band .b-by { color: var(--paper); }
.b-band .b-by { color: #F3E6D8; }
.theme-b .b-band a:hover { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 4px; }
.b-band .b-slot { background: #874A35; }
.b-band .b-card__rule { border-top-color: var(--accent-soft); }
.b-band .b-card__title { font-size: clamp(22px, 1.9vw, 27px); }
.b-band a:focus-visible { outline-color: var(--paper); }

.b-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 0 clamp(28px, 3.4vw, 56px); }
.b-list__item { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.b-list__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.b-list__title { margin: 0; font: 500 clamp(20px, 1.6vw, 23px)/1.2 var(--f-display); text-wrap: pretty; overflow-wrap: anywhere; }
.b-list__title a { text-decoration: none; }
.b-list__thumb { flex: 0 0 clamp(88px, 9vw, 128px); display: block; }

.b-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(28px, 3.4vw, 48px); }
.b-col { min-width: 0; border-top: 3px solid var(--ink); padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.b-col__head { margin: 0; font: 600 12px var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; }
.b-col__head a { text-decoration: none; }
.b-col__item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.b-col__title { margin: 0; font: 500 clamp(21px, 1.7vw, 24px)/1.18 var(--f-display); text-wrap: pretty; overflow-wrap: anywhere; }
.b-col__title a { text-decoration: none; }
.b-col__more { margin-top: auto; }

/* ---------- Category ---------- */
.b-cat { padding-top: clamp(18px, 2.4vw, 36px); padding-bottom: 0; }
.b-crumb { display: flex; flex-wrap: wrap; gap: 8px; font: 12.5px var(--f-ui); color: var(--muted); }
.b-crumb a { text-decoration: none; }
.b-crumb a:hover { text-decoration: underline; }
.b-cathead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 40px; padding: 10px 0 clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--ink); margin-bottom: clamp(20px, 2.6vw, 36px); }
.b-cathead h1 { margin: 0; font: 500 clamp(40px, 4.4vw, 62px)/1 var(--f-display); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.b-cathead p { margin: 0; flex: 0 1 520px; font: clamp(15px, 1.2vw, 17px)/1.5 var(--f-ui); color: #4A463F; }
.b-catlead { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: center; padding-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(24px, 3vw, 40px); }
.b-catlead__media { display: block; }
.b-catlead__body { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.b-catlead__title { margin: 0; font: 500 clamp(30px, 3.2vw, 46px)/1.06 var(--f-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.b-catlead__title a { text-decoration: none; }
.b-catlead .b-card__dek { font-size: clamp(16px, 1.3vw, 18px); color: #3D3A34; }
.b-catlead--text .b-catlead__body { max-width: 860px; }
@media (min-width: 720px) {
  .b-catlead:not(.b-catlead--text) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.b-rows { display: flex; flex-direction: column; gap: clamp(32px, 3.4vw, 48px); }
.b-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 2.6vw, 36px) clamp(20px, 2.4vw, 32px); }
.b-row--1 { max-width: 560px; }
.b-row--2 { max-width: 900px; }
@media (min-width: 768px) { .b-row--2, .b-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .b-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.b-empty { padding: clamp(32px, 5vw, 72px) clamp(20px, 4vw, 56px); background: var(--accent-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 860px; }
.b-empty__k { margin: 0; font: 600 12px var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.b-empty__t { margin: 0; font: 500 clamp(28px, 3vw, 40px)/1.1 var(--f-display); letter-spacing: -0.015em; }
.b-empty__d { margin: 0; font: 16px/1.5 var(--f-ui); color: #3D3A34; }
.b-empty__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.b-pager { margin-top: clamp(36px, 4vw, 56px); padding-top: 18px; border-top: 1px solid var(--ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font: 14px var(--f-ui); }
.b-pager ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.b-pager ol a { display: grid; place-items: center; min-width: 44px; height: 44px; border: 1px solid var(--rule); font-weight: 500; text-decoration: none; }
.theme-b .b-pager ol a:hover { border-color: var(--ink); color: var(--ink); }
.b-pager ol a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.b-pager__gap { display: grid; place-items: center; min-width: 28px; height: 44px; color: var(--muted); }
.b-pager__step { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-weight: 500; text-decoration: none; }
.b-pager__step.is-off { color: #85796C; }

/* ---------- Article ---------- */
.theme-b .article--b { --b-group: 900px; padding: clamp(22px, 3vw, 48px) var(--px) 0; }
.theme-b .article--toc { --b-group: 936px; }
.article--b > * { max-width: var(--b-group); margin-left: auto; margin-right: auto; }
.theme-b .article--b > .related { max-width: none; }
.article--b .article__head { display: flex; flex-direction: column; gap: clamp(12px, 1.4vw, 18px); margin-bottom: clamp(20px, 2.6vw, 36px); }
.article--b .article__head .kicker { align-self: flex-start; font: 600 12px/1.3 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.article--b .article__head .kicker a { text-decoration: none; }
.article--b .article__head h1 { max-width: 900px; margin: 0; font: 500 clamp(34px, 4.2vw, 60px)/1.06 var(--f-display); letter-spacing: -0.022em; text-wrap: balance; overflow-wrap: anywhere; }
.article--b .dek--lg { max-width: 700px; margin: 0; font: clamp(17px, 1.4vw, 20px)/1.5 var(--f-ui); color: #3D3A34; text-wrap: pretty; }
.article--b .article__head .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0; padding: 0; border: 0; font: 13px var(--f-ui); color: #4A463F; }
.article--b .meta strong { font-weight: 600; color: var(--ink); }
.article--b .meta__source { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.article--b .article__figure { margin-bottom: clamp(28px, 3.4vw, 52px); }
.article--b .article__figure--natural { max-width: var(--b-group); }
.article--b .article__figure figcaption { font: 13px var(--f-ui); }
.theme-b .article--b .article__figure--toc .article__figure-col { margin-left: 0; }
.article--b .article__body { max-width: var(--b-group); display: block; }
.article--b .toc--side { display: none; }
.article--b .toc--inline { display: block; margin-bottom: 28px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); max-width: 680px; }
.toc--inline summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; font: 500 14px var(--f-ui); text-transform: none; letter-spacing: 0; cursor: pointer; list-style: none; }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary::after { content: ""; width: 8px; height: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 0; }
.toc--inline[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.toc--inline ol { margin: 0 0 8px; gap: 0; }
.toc--inline li a { display: flex; align-items: center; min-height: 44px; border-top: 1px solid #E4DDD2; font: 13.5px/1.35 var(--f-ui); color: var(--ink); }
.article--b .toc__sub a { padding-left: 14px; font-size: 13px; }
.article--b .toc a:hover { color: var(--accent-ink); }
.article--b .toc--side h2 { margin: 0 0 6px; font: 600 11px var(--f-ui); letter-spacing: 0.12em; }
.article--b .toc--side ol { margin: 0; gap: 0; }
.article--b .toc--side li a { display: block; padding: 8px 0; border-bottom: 1px solid #E4DDD2; font: 13.5px/1.35 var(--f-ui); color: var(--ink); }

.article--b .prose { max-width: 680px; font-size: clamp(18px, 1.35vw, 20px); line-height: 1.6; }
.article--b .prose p { margin: 0 0 1em; }
.article--b .prose h2 { margin: 1.6em 0 0.5em; font: 600 clamp(26px, 2.1vw, 32px)/1.15 var(--f-display); letter-spacing: -0.01em; text-wrap: balance; scroll-margin-top: 16px; }
.article--b .prose h3 { margin: 1.3em 0 0.4em; font: 600 clamp(21px, 1.6vw, 24px)/1.22 var(--f-display); text-wrap: pretty; scroll-margin-top: 16px; }
.article--b .prose h2:first-child, .article--b .prose h3:first-child { margin-top: 0; }
.article--b .prose ul, .article--b .prose ol { margin: 0 0 1.1em; padding-left: 1.2em; }
.article--b .prose li { margin: 0 0 0.3em; }
.article--b .prose li::marker { color: var(--accent); }
.article--b .prose figure { margin: 1.4em 0; }
.article--b .prose figcaption { font: 13px var(--f-ui); color: var(--muted); margin-top: 6px; }
.article--b .prose img { max-width: 100%; height: auto; }
.article--b .prose a { text-underline-offset: 3px; }

.b-orig { margin-top: 2em; margin-left: max(0px, calc((100% - var(--b-group)) / 2)); margin-right: auto; max-width: 680px; border-top: 3px solid var(--accent); padding-top: 14px; font-family: var(--f-ui); }
.theme-b .article--b > .b-orig { margin-left: max(0px, calc((100% - var(--b-group)) / 2)); margin-right: auto; max-width: 680px; }
.b-orig h2 { margin: 0 0 6px; font: 600 12px var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.b-orig a { display: inline-block; font-size: 16px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.b-orig p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }

.theme-b .article--b .related { margin-top: clamp(48px, 5.5vw, 80px); padding-top: 14px; }
.article--b .related h2 { margin: 0 0 clamp(18px, 2vw, 24px); font: 500 clamp(26px, 2.2vw, 32px)/1.2 var(--f-display); }
.b-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(24px, 2.4vw, 32px); }
.b-related .b-card__title { font-size: clamp(21px, 1.8vw, 25px); }

@media (min-width: 1100px) {
  .article--toc .article__body { display: grid; grid-template-columns: 200px minmax(0, 680px); gap: 56px; }
  .article--b .toc--side { display: block; position: sticky; top: 20px; align-self: start; border-top: 1px solid var(--ink); padding-top: 10px; }
  .article--b .toc--inline { display: none; }
  .theme-b .article--toc .article__figure--toc .article__figure-col { margin-left: 256px; }
  .theme-b .article--toc > .b-orig { margin-left: calc(max(0px, (100% - var(--b-group)) / 2) + 256px); }
}

/* ---------- Search / info / 404 ---------- */
.theme-b .search-page h1, .theme-b .info-content h1, .theme-b .page-404 h1 { margin: 0 0 0.4em; font: 500 clamp(36px, 4.4vw, 56px)/1.05 var(--f-display); letter-spacing: -0.02em; }
.theme-b .search-page { padding-top: clamp(24px, 3vw, 40px); }
.theme-b .search-page__form label { font: 600 12px var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.theme-b .search-page__form { flex-wrap: wrap; align-items: flex-end; }
.theme-b .search-page__form label { flex-basis: 100%; }
.theme-b .search-page__form input { height: auto; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; padding: 2px 0 8px; font: clamp(24px, 3vw, 40px) var(--f-display); color: var(--ink); }
.theme-b .search-page__form button { border-radius: 2px; font: 500 14px var(--f-ui); height: 44px; }
.theme-b .search-results__item h3 { margin: 0; font: 500 clamp(20px, 1.8vw, 24px)/1.2 var(--f-display); }
.theme-b .search-results__item h3 a { text-decoration: none; }
.theme-b .search-prompt, .theme-b .search-results p { font-family: var(--f-ui); font-size: 15px; color: var(--muted); }
.theme-b .search-chips .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 2px; background: transparent; font: 14px var(--f-ui); text-decoration: none; }
.theme-b .info-nav a { font-family: var(--f-ui); font-size: 14px; }
.theme-b .info-content { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.6; }
.theme-b .page-404 .kicker { font-family: var(--f-ui); }
.theme-b .page-404 .search-page__form { justify-content: center; }

/* ---------- Footer ---------- */
.b-footer { margin-top: clamp(64px, 7vw, 104px); background: var(--footer-bg); color: var(--paper); }
.b-footer__in { padding-top: clamp(40px, 5vw, 72px); padding-bottom: 28px; }
.b-footer__logo { display: inline-block; font: 400 clamp(52px, 7.6vw, 112px)/0.95 var(--f-display); letter-spacing: -0.035em; color: var(--paper); text-decoration: none; }
.b-footer__logo em { font-style: italic; color: var(--accent-soft); }
.theme-b .b-footer__logo:hover { color: var(--paper); }
.b-footer__cols { display: flex; flex-wrap: wrap; gap: 28px clamp(32px, 6vw, 96px); margin-top: clamp(28px, 3vw, 44px); padding-top: 24px; border-top: 1px solid rgba(246, 242, 234, 0.22); }
.b-footer__about { flex: 1 1 280px; max-width: 26em; margin: 0; font: 15px/1.6 var(--f-ui); color: #DCD6CB; }
.b-footer__nav { flex: 1.4 1 380px; min-width: 0; }
.b-footer__nav--site { flex: 1 1 200px; }
.b-footer__nav h2 { margin: 0 0 10px; font: 600 11px var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: #B9B2A6; }
.b-footer__sections, .b-footer__service { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 24px; }
.b-footer__sections { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.b-footer__sections a { display: inline-flex; align-items: center; min-height: 36px; font: 400 20px var(--f-display); color: var(--paper); text-decoration: none; }
.b-footer__service a { display: inline-flex; align-items: center; min-height: 36px; font: 15px var(--f-ui); color: var(--paper); text-decoration: none; }
.theme-b .b-footer a:hover { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 4px; }
.b-footer a:focus-visible { outline-color: var(--paper); }
.b-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: clamp(28px, 3vw, 44px); padding-top: 16px; border-top: 1px solid rgba(246, 242, 234, 0.22); font: 12.5px var(--f-ui); color: #B9B2A6; }
.b-footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; color: #DCD6CB; text-decoration: none; }

/* ---------- Focus ---------- */
.theme-b summary:focus-visible, .theme-b .b-search-btn:focus-visible, .theme-b .b-icon-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.article--b .toc--side .toc__sub a { padding-left: 14px; font-size: 13px; }
