/* Blog pages (scripts/blog/build.mjs). Uses tokens from styles.css. */
.b { background: var(--bg); }
.b-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--m); position: sticky; top: 0; z-index: 5; background: var(--bg); }
.b-top .b-wm { font-size: 28px; color: var(--red); text-decoration: none; line-height: 1; }
.b-nav { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: var(--step-small); }
.b-langs { display: inline-flex; gap: 10px; }
.b-langs .is-here { color: var(--red); text-decoration-color: currentColor; }
.b-cta { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
@media (max-width: 720px) { .b-cta { display: none; } .b-nav { gap: 14px; } .b-top .b-wm { font-size: 24px; } }

.b-post, .b-index { max-width: 1180px; margin: 0 auto; padding: 24px var(--m) var(--section); }
.b-crumbs { font-size: var(--step-small); font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.b-h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; max-width: 17ch; text-wrap: balance; }
.b-index .b-h1 { max-width: 14ch; }
.b-lead { margin-top: 20px; font-size: var(--step-lead); max-width: 40ch; color: var(--muted); line-height: 1.3; }
.b-meta { margin-top: 18px; color: var(--muted); font-size: var(--step-small); font-weight: 500; }
.b-cover { width: 100%; margin: 0 0 2em; aspect-ratio: 1200 / 630; height: auto; }

.b-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; margin-top: 48px; justify-content: start; }
.b-toc { position: sticky; top: 92px; align-self: start; font-size: var(--step-small); }
.b-toc p { font-weight: 800; margin-bottom: 10px; }
.b-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.b-toc a { color: var(--muted); text-decoration: none; line-height: 1.3; display: block; }
.b-toc a:hover { color: var(--ink); }
@media (max-width: 960px) { .b-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; } .b-toc { display: none; } }

.b-body { font-size: var(--step-body); line-height: 1.65; }
.b-body > * + * { margin-top: 1.1em; }
.b-body h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.02; letter-spacing: -0.03em; margin-top: 2.2em; scroll-margin-top: 90px; }
.b-body h3 { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); margin-top: 1.8em; scroll-margin-top: 90px; }
.b-body > .b-cover + p { font-size: var(--step-lead); line-height: 1.35; font-weight: 500; }
.b-body ul, .b-body ol { padding-left: 1.3em; }
.b-body ul { list-style: disc; }
.b-body li + li { margin-top: 0.4em; }
.b-body li::marker { color: var(--red); }
.b-body a { color: var(--accent-strong); text-underline-offset: 0.18em; }
.b-body strong { font-weight: 700; }
.b-body code { font-size: 0.9em; background: var(--surface); padding: 0.08em 0.35em; }
.b-body blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1em; border-left: 4px solid var(--red); color: var(--muted); }
.tbl { overflow-x: auto; margin-top: 1.4em; }
.b-body table { border-collapse: collapse; width: 100%; font-size: var(--step-small); line-height: 1.4; min-width: 520px; }
.b-body th { text-align: left; font-weight: 800; background: var(--ink); color: var(--bg); padding: 10px 12px; }
.b-body td { padding: 10px 12px; vertical-align: top; background: var(--surface); }
.b-body tr:nth-child(even) td { background: #ddd6c8; }

.b-faq { margin-top: 3em; }
.b-faq details { background: var(--surface); padding: 16px 20px; margin-top: 8px; }
.b-faq summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 28px; }
.b-faq summary::-webkit-details-marker { display: none; }
.b-faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-weight: 800; font-size: 1.3em; color: var(--red); }
.b-faq details[open] summary::after { content: "–"; }
.b-faq details p { margin-top: 10px; }

.b-ctabox { margin-top: 3em; background: var(--red); color: var(--white); padding: clamp(24px, 4vw, 44px); }
.b-ctabox h2 { margin-top: 0; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); }
.b-ctabox p { margin-top: 14px; }
.b-ctabox .b-proof { font-weight: 700; }
.b-ctabox .button { margin-top: 22px; background: var(--ink); color: var(--white); }

.b-related { margin-top: var(--section); }
.b-related h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.b-related > p { margin-top: 24px; font-weight: 700; }
.b-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; margin-top: 36px; }
.b-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.b-card img { width: 100%; aspect-ratio: 1200 / 630; height: auto; transition: transform var(--t-hover) var(--ease-out); }
.b-card__t { margin-top: 14px; font-weight: 800; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em; }
.b-card__d { margin-top: 8px; color: var(--muted); font-size: var(--step-small); line-height: 1.45; }
@media (hover: hover) and (pointer: fine) { .b-card:hover img { transform: translateY(-3px); } .b-card:hover .b-card__t { text-decoration: underline; text-underline-offset: 0.15em; } }

.b-foot { padding: 32px var(--m) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--step-small); color: var(--muted); }

/* topics, groups, inline links */
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.b-chip { padding: 8px 14px; background: var(--surface); text-decoration: none; font-size: var(--step-small); font-weight: 600; border-radius: 999px; }
.b-chip.is-on { background: var(--ink); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .b-chip:not(.is-on):hover { background: #cfc7b6; } }
.b-group { margin-top: 64px; }
.b-group h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.b-group h2 a { text-decoration: none; }
.b-group h2 a:hover { text-decoration: underline; text-underline-offset: 0.12em; }
.b-group h2 span { color: var(--muted); font-weight: 600; font-size: 0.55em; vertical-align: middle; }
.b-list { margin-top: 16px; columns: 2 320px; column-gap: 40px; }
.b-list li { break-inside: avoid; padding: 7px 0; line-height: 1.35; }
.b-list a { text-decoration: none; }
.b-list a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.b-also { background: var(--surface); padding: 18px 22px; margin-top: 2em; }
.b-also p { font-weight: 800; font-size: var(--step-small); }
.b-also ul { list-style: none; padding: 0; margin-top: 8px; }
.b-also li + li { margin-top: 6px; }
.b-also li::marker { content: none; }
.b-also a { font-weight: 600; }
.b-next { margin-top: 2em; font-weight: 700; }
.b-ctabox .b-ctalinks { margin-top: 16px; font-weight: 600; }
.b-ctabox a:not(.button) { color: var(--white); }
.b-grid--page { grid-template-columns: minmax(0, 760px); }
@media (max-width: 1100px) { .b-sec { display: none; } }

.b-foot { flex-direction: column; }
.b-foot__cols { display: grid; grid-template-columns: 220px 1fr; gap: 32px; width: 100%; }
.b-foot__cols div { display: flex; flex-direction: column; gap: 8px; }
.b-foot__wide { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 24px !important; align-content: start; }
.b-foot__wide .b-foot__h { grid-column: 1 / -1; }
.b-foot__h { font-weight: 800; color: var(--ink); }
@media (max-width: 720px) { .b-foot__cols { grid-template-columns: 1fr; } }

/* ===== v8 redesign: inner pages share the home page system (styles.css .p8, .hd, .s8, .end8) ===== */
.p8 .b-crumbs { margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.ph { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; padding: clamp(40px, 6vw, 88px) var(--m8) clamp(56px, 6vw, 88px); }
.ph__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.ph__h { font-size: var(--h1); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; text-wrap: balance; max-width: 18ch; }
.ph .lead { max-width: 40ch; }
.ph__scene { flex: 1 1 420px; min-width: 0; min-height: 320px; }
.ph__scene canvas { inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); }
.ph--red { background: var(--red); color: #ffffff; padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 64px); }
.ph--red .b-crumbs, .ph--red .b-meta { color: #ffd9dc; }
.ph--red .ph__h { max-width: 22ch; }

.p8 .b-post, .p8 .b-index { max-width: none; margin: 0; padding: clamp(40px, 5vw, 72px) var(--m8) clamp(72px, 8vw, 120px); }
.p8 .b-index .b-h1 { font-size: var(--h1); letter-spacing: -0.045em; max-width: 16ch; }
.p8 .b-lead { font-size: var(--lead); font-weight: 500; color: var(--ink); max-width: 44ch; line-height: 1.4; }
.p8 .b-grid { margin-top: 0; grid-template-columns: 240px minmax(0, 760px); gap: 64px; }
.p8 .b-grid--page { grid-template-columns: minmax(0, 760px); }
.p8 .b-toc { top: 24px; }
.p8 .b-toc a:hover { color: var(--red); }
.p8 .b-body { font-size: 18px; line-height: 1.65; }
.p8 .b-body h2 { font-size: var(--h2); letter-spacing: -0.04em; line-height: 1; margin-top: 1.6em; }
.p8 .b-body h3 { font-size: var(--lead); }
.p8 .b-body a { color: var(--ink); text-decoration-color: var(--red) !important; text-decoration-thickness: 2px; }
.p8 .b-body a:hover { color: var(--red); }
.p8 .b-body > ul:has(> li > strong:first-child) { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.p8 .b-body > ul:has(> li > strong:first-child) > li { margin: 0; background: #ffffff; padding: 20px 24px; line-height: 1.5; }
.p8 .b-body > ul:has(> li > strong:first-child) > li > strong:first-child { display: block; font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.p8 .b-body blockquote { border-left: 0; padding: 24px; background: var(--ink); color: #ffffff; font-size: var(--lead); font-weight: 500; line-height: 1.35; }
.p8 .b-body th { background: var(--ink); color: #ffffff; }
.p8 .b-body td { background: #ffffff; }
.p8 .b-body tr:nth-child(even) td { background: #f4efe8; }

.p8 .b-faq details { background: transparent; border-top: 2px solid var(--ink); padding: 18px 0; margin: 0; }
.p8 .b-faq details:last-child { border-bottom: 2px solid var(--ink); }
.p8 .b-faq summary { font-size: 20px; font-weight: 800; }
.p8 .b-faq summary::after { color: var(--ink); }

.p8 .b-ctabox { background: var(--ink); color: #ffffff; padding: clamp(24px, 4vw, 40px); }
.p8 .b-ctabox h2 { font-size: var(--h2); color: #ffffff; }
.p8 .b-ctabox .btn { margin-top: 24px; }
.p8 .b-ctabox a:not(.btn) { color: #ffffff; text-decoration-color: currentColor !important; }
.p8 .b-ctabox .b-proof { color: var(--mustard); }

.p8 .b-also { background: #ffffff; }
.p8 .b-related h2, .p8 .b-group h2 { font-size: var(--h2); letter-spacing: -0.04em; }
.p8 .b-cards { gap: 8px; }
.p8 .b-card { background: #ffffff; text-decoration: none !important; }
.p8 .b-card__t, .p8 .b-card__d { padding: 0 20px; }
.p8 .b-card__t { font-size: 20px; }
.p8 .b-card__d { padding-bottom: 20px; }
.p8 .b-chip { background: #ffffff; border-radius: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-weight: 800; }
.p8 .b-chip.is-on { background: var(--ink); color: #ffffff; }
.p8 .hd__nav [aria-current=page] { text-decoration: underline !important; text-decoration-color: currentColor !important; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (max-width: 960px) { .p8 .b-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 720px) { .ph__scene { min-height: 240px; } .ph { gap: 32px; } }
.p8 .b-body > ul:has(> li > strong:first-child) > li > strong:first-child { display: inline; font-size: inherit; margin: 0; }
.p8 .b-grid--page { grid-template-columns: minmax(0, 760px) minmax(280px, 380px); justify-content: space-between; gap: 64px; }
.b-side { align-self: start; position: sticky; top: 24px; }
.b-check { background: var(--ink); color: #ffffff; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.b-check__h { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.b-check .go8 input { flex-basis: 100%; min-height: 52px; }
.b-check .go8 .btn { flex: 1 1 100%; min-height: 52px; }
.b-check .note { color: var(--dim); }
.b-toc .b-check { margin-top: 32px; }
.b-toc .b-check__h { font-size: 18px; }
@media (max-width: 960px) { .p8 .b-grid--page { grid-template-columns: minmax(0, 1fr); } .b-side { position: static; margin-top: 48px; } }
.p8 .b-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

/* v8 inner pages as bands */
.pg8 { display: block; }
.sec8 { padding: clamp(72px, 8vw, 120px) var(--m8); display: flex; flex-direction: column; gap: 48px; }
.sec8--surface { background: var(--surface); }
.sec8--mustard { background: var(--mustard); }
.sec8--intro { padding-top: clamp(56px, 6vw, 88px); padding-bottom: clamp(56px, 6vw, 88px); background: var(--ink); color: #ffffff; }
.sec8__intro { display: flex; flex-direction: column; gap: 16px; max-width: 62ch; }
.sec8__intro .lead { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; color: #ffffff; }
.sec8__intro p:not(.lead) { color: #f1e9e6; }
.sec8__intro a { color: var(--mustard); text-decoration-color: currentColor !important; }
.sec8__head h2 { max-width: 16ch; }
.sec8__head .lead { max-width: 46ch; }
.sec8__body { display: flex; flex-direction: column; gap: 24px; }
.sec8__body > p, .sec8__text > p, .sec8__body--text > * { max-width: 70ch; }
.sec8__body--text { margin-left: auto; width: min(100%, calc(50% + 32px)); }
.sec8 p a, .sec8 li a { text-decoration-color: var(--red) !important; text-decoration-thickness: 2px; }
.sec8__text { display: flex; flex-direction: column; gap: 16px; }
.sec8__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }
.sec8__card h3 { font-size: 22px; }
.sec8__card p + p { margin-top: 4px; }
.sec8__card ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 6px; }
.sec8__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.sec8__tiles li { background: #ffffff; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.sec8__n { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--red); }
.sec8__t { font-size: 20px; font-weight: 800; line-height: 1.2; }
.sec8__tiles span { font-size: 16px; line-height: 1.5; }
.sec8__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.sec8__stats li { background: var(--ink); color: #ffffff; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.sec8__stats b { font-size: var(--h2); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--mustard); }
.sec8 ul:not([class]) { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; max-width: 70ch; }
.sec8 ul:not([class]) li::marker { color: var(--red); }
.sec8 ol:not([class]) { list-style: decimal; padding-left: 1.3em; display: grid; gap: 8px; max-width: 70ch; }
.sec8 .tbl { overflow-x: auto; }
.sec8 table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; line-height: 1.45; }
.sec8 th { text-align: left; background: var(--ink); color: #ffffff; padding: 14px 18px; font-weight: 800; }
.sec8 td { background: #ffffff; padding: 14px 18px; vertical-align: top; border-top: 8px solid transparent; background-clip: padding-box; }
.sec8 td:first-child { font-weight: 800; }
.sec8--mustard td, .sec8--surface td { border-color: transparent; }
.ph .go8 { max-width: 560px; }
.ph .go8 input { background: #ffffff; color: var(--ink); }
.ph .go8 input::placeholder { color: var(--muted); }
.pg8 .b-cards { margin-top: 0; }
@media (max-width: 900px) { .sec8__body--text { width: 100%; } }
@media (max-width: 720px) { .sec8 { gap: 32px; } .sec8__tiles li, .sec8__stats li { padding: 20px; } }
.sec8__intro { max-width: none; display: block; columns: 2 420px; column-gap: 64px; }
.sec8__intro > * { break-inside: avoid; margin-bottom: 16px; }
.sec8__intro .lead { font-size: clamp(20px, 1.7vw, 24px); }
.sec8--cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
.sec8--cols h2 { max-width: 14ch; position: sticky; top: 24px; }
.sec8__col { display: flex; flex-direction: column; gap: 16px; max-width: 64ch; }
.sec8__col .lead { margin-bottom: 8px; }
.sec8__tiles--days .sec8__n { font-size: 24px; }
@media (max-width: 900px) { .sec8--cols { grid-template-columns: 1fr; } .sec8--cols h2 { position: static; } }
.sec8__intro { columns: auto; max-width: 34ch; }
.sec8__intro .lead { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.25; font-weight: 500; }
.sec8__intro--cols { columns: 2 420px; max-width: none; }
.sec8__intro--cols .lead { font-size: clamp(20px, 1.7vw, 24px); }
@media (max-width: 720px) { .sec8__intro .lead { font-size: 22px; } }
.sec8__intro { max-width: none; }
.sec8__intro > * { max-width: 40ch; }
.sec8__intro p:not(.lead) { max-width: 66ch; }
.sec8__intro--cols > * { max-width: none; }
