/* ==========================================================================
   想印 — blog (index + article)
   ========================================================================== */

.xy-crumbs a + a::before { content: "/"; margin-right: 6px; opacity: .5; }

/* ---------- index ---------- */
.bg-head .xy-eyebrow { margin-bottom: 10px; }
.bg-index { padding-bottom: clamp(80px, 10vw, 130px); }
.bg-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(24px, 4vw, 40px); }
.bg-cats a { padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: .25s var(--ease); }
.bg-cats a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.bg-cats a[aria-current] { background: var(--ink); color: #fff; box-shadow: none; }

.bg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.bg-meta b { font-weight: 600; color: var(--blue); }
.bg-meta time { font-family: var(--latin); letter-spacing: .02em; }

.bg-cover { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); border-radius: var(--radius-s); }
.bg-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.bg-cover.is-empty { display: grid; place-items: center; background: linear-gradient(135deg, #EEF3FF, #F7EEFA 55%, #FFF6E3); }
.bg-cover.is-empty img { width: 64px; height: 64px; object-fit: contain; opacity: .5; }

.bg-lead { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; text-decoration: none; padding: clamp(14px, 2vw, 20px); margin-bottom: clamp(36px, 5vw, 64px); background: var(--card); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), var(--shadow-s); transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.bg-lead:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); }
.bg-lead:hover .bg-cover img, .bg-card:hover .bg-cover img { transform: scale(1.04); }
.bg-lead .bg-cover { aspect-ratio: 16 / 10; }
.bg-lead-body { display: flex; flex-direction: column; gap: 14px; padding-right: clamp(0px, 2vw, 24px); }
.bg-lead-title { font-size: clamp(24px, 3vw, 38px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.bg-lead-ex { color: var(--ink-2); }
.bg-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.bg-more .xy-icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.bg-lead:hover .bg-more .xy-icon { transform: translateX(4px); }

.bg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.bg-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.bg-card-body { display: flex; flex-direction: column; gap: 8px; }
.bg-card-title { font-size: 19px; font-weight: 700; line-height: 1.45; letter-spacing: -.01em; }
.bg-card:hover .bg-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bg-card-ex { font-size: 14.5px; color: var(--muted); line-height: 1.7; }

.bg-pages { display: flex; justify-content: center; gap: 8px; margin-top: clamp(40px, 6vw, 72px); }
.bg-pages a { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; text-decoration: none; font-family: var(--latin); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2); }
.bg-pages a[aria-current] { background: var(--ink); color: #fff; box-shadow: none; }

.bg-empty { text-align: center; padding: clamp(48px, 8vw, 96px) 20px; background: var(--card); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.bg-empty img { margin: 0 auto 16px; opacity: .6; }
.bg-empty h2 { font-size: 24px; }
.bg-empty p { color: var(--muted); margin: 8px 0 22px; }

/* ---------- article ---------- */
.bg-preview { position: sticky; top: 0; z-index: 60; text-align: center; padding: 10px 16px; background: var(--y); color: var(--ink); font-size: 14px; font-weight: 600; }
.bg-post-head { padding-top: clamp(40px, 7vw, 96px); max-width: calc(820px + 2 * var(--gut)); }
.bg-post-head h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 700; line-height: 1.22; letter-spacing: -.025em; margin: 4px 0 18px; text-wrap: balance; }
.bg-post-head .bg-meta { font-size: 14px; }
.bg-post-cover { max-width: calc(1120px + 2 * var(--gut)); margin: clamp(26px, 4vw, 44px) auto 0; padding: 0 var(--gut); }
.bg-post-cover img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }

.bg-post-grid { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 56px; padding-top: clamp(32px, 5vw, 60px); padding-bottom: clamp(60px, 8vw, 100px); }
.bg-post-grid.has-toc { grid-template-columns: 230px minmax(0, 760px); }
.bg-toc { position: relative; }
.bg-toc details { position: sticky; top: calc(var(--head) + 24px); font-size: 14px; }
.bg-toc summary { list-style: none; cursor: pointer; font: 600 12px/1.4 var(--display); letter-spacing: .3em; color: var(--muted); margin-bottom: 12px; }
.bg-toc summary::-webkit-details-marker { display: none; }
.bg-toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1.5px solid var(--line); counter-reset: t; }
.bg-toc li { counter-increment: t; }
.bg-toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; line-height: 1.5; transition: color .2s; }
.bg-toc a::before { content: counter(t, decimal-leading-zero) "  "; font-family: var(--latin); font-size: 12px; opacity: .6; }
.bg-toc a:hover, .bg-toc a.is-on { color: var(--ink); }
.bg-toc a.is-on { font-weight: 600; }

/* body text */
.bg-prose { font-size: 17.5px; line-height: 1.95; color: #1E2230; overflow-wrap: anywhere; }
.bg-prose > * { margin: 0 0 1.25em; }
.bg-prose h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.35; font-weight: 700; letter-spacing: -.02em; margin: 2.2em 0 .8em; padding-top: .2em; color: var(--ink); }
.bg-prose h3 { font-size: 21px; line-height: 1.45; font-weight: 700; margin: 1.8em 0 .6em; color: var(--ink); }
.bg-prose h4 { font-size: 18px; margin: 1.6em 0 .5em; }
.bg-prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bg-prose strong { font-weight: 700; color: var(--ink); }
.bg-prose mark { background: linear-gradient(transparent 55%, rgba(255, 199, 44, .55) 55%); color: inherit; padding: 0 2px; }
.bg-prose ul, .bg-prose ol { padding-left: 1.4em; }
.bg-prose li { margin: .35em 0; }
.bg-prose li::marker { color: var(--blue); }
.bg-prose blockquote { margin-left: 0; margin-right: 0; padding: 18px 24px; border-left: 3px solid var(--violet); background: rgba(122, 92, 255, .06); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 18.5px; color: var(--ink-2); }
.bg-prose blockquote p { margin: 0; }
.bg-prose blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); }
.bg-prose blockquote cite::before { content: "— "; }
.bg-prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.bg-prose code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--paper-2); }
.bg-prose pre { padding: 16px 18px; border-radius: var(--radius-s); background: var(--night); color: #E6E9F2; overflow-x: auto; font-size: 14px; }
.bg-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.bg-prose th, .bg-prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.bg-prose th { background: var(--paper-2); font-weight: 600; }
.bg-prose img { border-radius: var(--radius-s); }
.bg-prose figure { margin-left: 0; margin-right: 0; }
.bg-prose figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.6; }
.bg-prose details { padding: 14px 18px; border-radius: var(--radius-s); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.bg-prose summary { cursor: pointer; font-weight: 600; }
.bg-prose .bl-center { text-align: center; }
.bg-prose .bl-right { text-align: right; }

/* image sizes */
.bg-prose .bl-img img { width: 100%; }
.bg-prose .bl-img.is-small { max-width: 420px; margin-left: auto; margin-right: auto; }
.bg-prose .bl-img.is-wide { margin-left: clamp(-120px, -8vw, 0px); margin-right: clamp(-120px, -8vw, 0px); }
.bg-prose .bl-img.is-full { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.bg-prose .bl-img.is-full img { border-radius: 0; max-height: 80vh; object-fit: cover; }
.has-toc .bg-prose .bl-img.is-wide { margin-left: 0; margin-right: clamp(-120px, -8vw, 0px); }

/* image + text */
.bg-prose .bl-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; margin: 2em 0; }
.bg-prose .bl-media.is-right .bl-media-img { order: 2; }
.bg-prose .bl-media-img { margin: 0; }
.bg-prose .bl-media-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bg-prose .bl-media-txt h3 { margin-top: 0; }
.bg-prose .bl-media-txt p { margin: 0; }

/* gallery */
.bg-prose .bl-gallery-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bg-prose .bl-gallery.cols-3 .bl-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bg-prose .bl-gallery.cols-1 .bl-gallery-grid { grid-template-columns: 1fr; }
.bg-prose .bl-gallery-grid img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }

/* callout, button, video */
.bg-prose .bl-callout { padding: 18px 22px 18px 54px; border-radius: var(--radius-s); position: relative; background: rgba(47, 107, 255, .07); box-shadow: inset 0 0 0 1px rgba(47, 107, 255, .16); }
.bg-prose .bl-callout::before { content: "i"; position: absolute; left: 18px; top: 19px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--latin); color: #fff; background: var(--blue); }
.bg-prose .bl-callout.is-tip { background: rgba(30, 123, 74, .07); box-shadow: inset 0 0 0 1px rgba(30, 123, 74, .18); }
.bg-prose .bl-callout.is-tip::before { content: "✓"; background: var(--ok); }
.bg-prose .bl-callout.is-warn { background: rgba(255, 199, 44, .14); box-shadow: inset 0 0 0 1px rgba(214, 150, 0, .3); }
.bg-prose .bl-callout.is-warn::before { content: "!"; background: #D69600; }
.bg-prose .bl-callout p { margin: 0; }
.bg-prose .bl-cta { text-align: center; margin: 2em 0; }
.bg-prose .bl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .04em; transition: transform .3s var(--ease), box-shadow .3s; box-shadow: 0 18px 36px -20px rgba(11, 14, 23, .7); }
.bg-prose .bl-btn:hover { transform: translateY(-2px); }
.bg-prose .bl-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-s); overflow: hidden; background: var(--night); }
.bg-prose .bl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* after the body */
.bg-faq { margin: 48px 0 0; }
.bg-faq h2 { font-size: 26px; margin-bottom: 16px; }
.bg-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.bg-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.bg-faq details p { margin: 10px 0 0; color: var(--ink-2); }
.bg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.bg-tags span { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.bg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.bg-share > span { color: var(--muted); margin-right: 4px; }
.bg-share a, .bg-share button { padding: 8px 16px; border-radius: 999px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; cursor: pointer; font-size: 14px; transition: .25s var(--ease); }
.bg-share a:hover, .bg-share button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.bg-share button.is-done { background: var(--ink); color: #fff; box-shadow: none; }
.bg-cta { margin-top: 48px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: radial-gradient(120% 140% at 100% 0%, rgba(47, 107, 255, .12), transparent 55%), radial-gradient(120% 140% at 0% 100%, rgba(229, 48, 126, .09), transparent 55%), var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow-s); display: grid; gap: 22px; }
.bg-cta .xy-eyebrow { margin-bottom: 8px; }
.bg-cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; }
.bg-cta p:not(.xy-eyebrow) { color: var(--ink-2); margin-top: 6px; }
.bg-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }

.bg-related { padding-bottom: clamp(80px, 10vw, 130px); }
.bg-related > h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; margin-bottom: 24px; letter-spacing: -.02em; }

/* home: latest posts */
.hm-blog .bg-grid { margin-top: 8px; }

@media (max-width: 1100px) {
	.bg-post-grid.has-toc { grid-template-columns: minmax(0, 760px); }
	.bg-toc details { position: static; padding: 14px 18px; border-radius: var(--radius-s); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
	.bg-toc summary { margin-bottom: 0; }
	.bg-toc details[open] summary { margin-bottom: 10px; }
	.has-toc .bg-prose .bl-img.is-wide, .bg-prose .bl-img.is-wide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 900px) {
	.bg-lead { grid-template-columns: 1fr; }
	.bg-lead-body { padding: 4px 6px 8px; }
	.bg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.bg-grid { grid-template-columns: 1fr; }
	.bg-prose { font-size: 16.5px; line-height: 1.9; }
	.bg-prose .bl-media { grid-template-columns: 1fr; }
	.bg-prose .bl-media.is-right .bl-media-img { order: 0; }
	.bg-prose .bl-gallery.cols-3 .bl-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bg-post-cover { padding: 0; }
	.bg-post-cover img { border-radius: 0; }
}
