/* =====================================================================
   THE JOURNAL (WAVE 2b TASK BB, 2026-09-26): the blog index, the category
   archives and the post page. The post page is the FROZEN VBH canon
   (core30-v6-antigravity/templates/BLOG-POST-LAYOUT-VBH-CANON.astro): every
   structural rule below mirrors a canon rule (hero -> light glance -> meta ->
   16:8 cover frame -> 260px sticky TOC cell + a ~760px .blog-prose column ->
   tag row -> CTA card); only the TOKENS are V5's (ink / paper / crimson,
   Big Shoulders Display + Onest + JetBrains Mono), as the canon requires.
   .blog-prose is LOAD-BEARING (audit-dist parses it): never rename it.
   The glance block is the LIGHT treatment (accent rule + small-caps label),
   never a filled box. body { overflow-x: clip } is already in v5.css (the
   sticky TOC depends on it, core30-add-blog §X.3.1).
   ===================================================================== */

/* page hooks (the journal body class, the article root, the TOC rail) */
.jpage { background: var(--ink-0); }
.article { position: relative; }
.jtoc { display: grid; }
.jtoc__nav { display: block; }

/* ---------- reading progress (§X.2.2), flush under the header ---------- */
.jprogress { position: fixed; left: 0; right: 0; top: var(--header-height); height: 3px; z-index: 55; pointer-events: none; background: var(--crimson-hi); transform-origin: left; transform: scaleX(0); }
html:not(.js) .jprogress { display: none; }

/* ---------- article hero (canon: breadcrumb -> eyebrow -> H1 -> glance -> meta) ---------- */
.article-hero { padding: calc(var(--header-height) + 72px) 0 32px; background: radial-gradient(70% 110% at 100% 0%, rgba(99, 18, 50, .38) 0%, rgba(14, 11, 12, 0) 60%), var(--ink-0); }
.article-eyebrow a { color: inherit; text-decoration: none; }
.article-eyebrow a:hover { color: var(--paper); }
.article-h1 { margin: 0; max-width: 22ch; font: 900 clamp(2.4rem, 5vw, 4.8rem)/.94 var(--f-display); text-transform: uppercase; letter-spacing: -.005em; color: var(--paper); text-wrap: balance; }
.blog-glance { margin: 24px 0 0; max-width: 64ch; border-left: 4px solid var(--crimson); padding: 2px 0 2px 18px; }
.glance-label { display: block; margin-bottom: 8px; font: 600 11px/1.3 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--crimson-hi); }
.blog-glance p { font-size: 1.12rem; line-height: 1.6; color: #e3d9d5; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 24px; font-size: 14.5px; color: var(--muted); }
.article-meta a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--crimson); text-underline-offset: 3px; }
.article-meta .dot { color: var(--seam); }
.article-meta__role { color: var(--dim); }
.article-byline { margin-top: 8px; font: 500 11.5px/1.5 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

/* ---------- cover band (canon: aspect-constrained rounded frame, 16:8) ---------- */
.cover-wrap { padding-bottom: 8px; }
.cover-frame { position: relative; width: 100%; aspect-ratio: 16 / 8; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-2); }
.cover-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- body grid (canon: the CELL owns the sticky) ---------- */
.body-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding-top: 44px; padding-bottom: clamp(64px, 8vw, 112px); }
.toc-cell { display: none; }
@media (min-width: 1024px) {
  .body-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; }
  .toc-cell { display: block; position: sticky; top: calc(var(--header-height) + 40px); align-self: start; }
}
.article-col { min-width: 0; max-width: 760px; }

/* ---------- TOC (§X.2.3) ---------- */
.jtoc__h, .jshare__h { margin-bottom: 12px; font: 600 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.jtoc__ol { list-style: none; margin: 0; padding: 0; max-height: 58vh; overflow-y: auto; }
.jtoc__li a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.35; }
.jtoc__li--3 a { padding-left: 26px; }
.jtoc__li a:hover { color: var(--paper); }
.jtoc__li a.is-on { border-left-color: var(--crimson-hi); color: var(--paper); font-weight: 600; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.jshare { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.jshare__row { display: flex; flex-wrap: wrap; gap: 8px; }
.jshare__btn { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: 500 12.5px/1 var(--f-body); text-decoration: none; cursor: pointer; }
.jshare__btn:hover { color: var(--paper); border-color: var(--crimson-hi); }
html:not(.js) .jshare__btn[data-copy-link] { display: none; }
.jtoc-m { position: sticky; top: calc(var(--header-height) + 12px); z-index: 20; margin: 0 0 28px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(21, 17, 19, .95); }
.jtoc-m summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font: 600 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.jtoc-m summary::-webkit-details-marker { display: none; }
.jtoc-m summary i { width: 8px; height: 8px; border-right: 1.5px solid var(--crimson-hi); border-bottom: 1.5px solid var(--crimson-hi); transform: rotate(45deg); }
.jtoc-m[open] summary i { transform: rotate(225deg); }
.jtoc-m .jtoc__ol { padding: 0 18px 14px; max-height: 50vh; }
@media (min-width: 1024px) { .jtoc-m { display: none; } }

/* ---------- .blog-prose (canon typography, V5 tokens) ---------- */
.blog-prose { font-size: 1.0625rem; line-height: 1.75; color: #e3d9d5; }
.blog-prose > *:first-child { margin-top: 0; }
.blog-prose h2 { margin: 3rem 0 1.1rem; font: 800 clamp(1.7rem, 2.6vw, 2.35rem)/1.02 var(--f-display); text-transform: uppercase; color: var(--paper); scroll-margin-top: calc(var(--header-height) + 40px); text-wrap: balance; }
.blog-prose h3 { margin: 2.2rem 0 .9rem; font: 800 1.35rem/1.1 var(--f-display); text-transform: uppercase; color: var(--paper); }
.blog-prose p { margin: 0 0 1.3rem; }
.blog-prose a { color: var(--crimson-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 107, 126, .45); }
.blog-prose a:hover { color: #fff; text-decoration-color: var(--crimson-hi); }
.blog-prose strong { font-weight: 600; color: var(--paper); }
.blog-prose ul { margin: 1.4rem 0; padding-left: 0; list-style: none; }
.blog-prose ul li { position: relative; padding-left: 1.5rem; margin-bottom: .55rem; }
.blog-prose ul li::before { content: ''; position: absolute; left: 0; top: .82rem; width: 10px; height: 2px; background: var(--crimson); }
.blog-prose ol { margin: 1.4rem 0; padding-left: 1.5rem; }
.blog-prose ol li::marker { color: var(--crimson-hi); font-weight: 600; }
.blog-prose hr { margin: 3rem 0; border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(236, 107, 126, .3), transparent); }
.blog-capsule p { font-size: 1.18rem; line-height: 1.6; color: var(--paper); font-weight: 500; }
.blog-quote { margin: 2rem 0; padding: 1.2rem 1.6rem; background: rgba(243, 236, 232, .04); border-left: 4px solid var(--crimson); border-radius: 0 16px 16px 0; font-style: italic; color: #e6dcd8; }
.blog-quote p { margin: 0; font-size: 1.15rem; }
.blog-quote p + p { margin-top: .8rem; }
.blog-quote cite { display: block; margin-top: 12px; font: normal 500 11.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.blog-note { margin: 1.6rem 0; }
.blog-note p { margin: 0; }
.blog-note .w5-note__t { font-size: 1rem; }
.blog-prose .auth { margin: -.3rem 0 1.4rem; font-size: .95rem; line-height: 1.6; color: var(--muted); }
.blog-faq { margin-top: .4rem; }
.blog-faq .qa summary { font-size: clamp(1.15rem, 1.6vw, 1.4rem); padding: 20px 0; }
.blog-faq .qa__a { padding-bottom: 20px; }
.blog-faq .qa__a p { margin-bottom: .8rem; }

/* ---------- tag row + CTA card (canon: booking primary + the descriptive up-link) ---------- */
.tagrow { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.tagrow .tag { text-decoration: none; }
.cta-card { margin-top: 44px; padding: 32px 34px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--crimson); background: linear-gradient(140deg, rgba(99, 18, 50, .55) 0%, var(--ink-1) 72%); }
.cta-card h3 { margin-bottom: 10px; font: 800 clamp(1.6rem, 2.4vw, 2.2rem)/1 var(--f-display); text-transform: uppercase; color: #fff; }
.cta-card p { margin-bottom: 22px; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-actions .btn--ghost { padding: 8px 22px; }

/* ---------- index + category archives ---------- */
.jhero { padding: calc(var(--header-height) + 88px) 0 clamp(40px, 5vw, 72px); background: radial-gradient(70% 110% at 100% 0%, rgba(99, 18, 50, .42) 0%, rgba(14, 11, 12, 0) 62%), var(--ink-0); }
.jhero__h1 { margin: 6px 0 22px; max-width: 15ch; font: 900 clamp(3rem, 7vw, 7rem)/.88 var(--f-display); text-transform: uppercase; color: var(--paper); text-wrap: balance; }
.jhero__sub p { max-width: 52ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--paper); }
.jhero__intro { margin-top: 18px; }
.jhero__intro p { max-width: 62ch; color: var(--muted); }
.jhero__intro p + p { margin-top: 12px; }
.jhero__hub { margin-top: 28px; }
.jsec { padding-block: clamp(56px, 7vw, 104px); border-top: 1px solid var(--line); }
.jgrid { margin-top: clamp(28px, 3vw, 44px); display: grid; gap: 22px; }
.jgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jpost { position: relative; display: flex; flex-direction: column; overflow: clip; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(243, 236, 232, .03); }
.jpost:hover { border-color: rgba(236, 107, 126, .45); }
.jpost[hidden] { display: none; }
.jpost__media { position: relative; aspect-ratio: 16 / 10; overflow: clip; background: var(--ink-2); }
.jpost--featured .jpost__media { aspect-ratio: 16 / 9; }
.jpost__media picture, .jpost__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.jpost__media img { object-fit: cover; }
.jpost__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 24px; }
.jpost__tag { position: relative; z-index: 2; align-self: flex-start; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--crimson-hi); text-decoration: none; }
.jpost__tag:hover { border-color: var(--crimson-hi); color: var(--paper); }
.jpost__t { font: 800 clamp(1.35rem, 1.8vw, 1.7rem)/1 var(--f-display); text-transform: uppercase; }
.jpost--featured .jpost__t { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
.jpost__t a { color: var(--paper); text-decoration: none; }
.jpost__t a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.jpost:hover .jpost__t a { color: #fff; }
.jpost__x { color: var(--muted); font-size: 15px; line-height: 1.55; }
.jpost__meta { margin-top: auto; font: 500 11.5px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.jrow__head { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 20px; }
.jrow__h { font: 800 clamp(1.5rem, 2.2vw, 2rem)/1 var(--f-display); text-transform: uppercase; }
.jrow__d { margin-top: 8px; max-width: 60ch; color: var(--muted); font-size: 15px; }
.jrow .jgrid { margin-top: 20px; }
.jchips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.jchip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 14px; text-decoration: none; }
.jchip:hover, .jchip.is-on { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.jchip__n { font: 500 11px/1 var(--f-mono); opacity: .75; }
.jempty { max-width: 60ch; font-size: 1.1rem; color: var(--muted); }
.jempty-box { display: grid; gap: 20px; justify-items: start; }

@media (max-width: 1024px) {
  .jgrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .article-hero { padding-top: calc(var(--header-height) + 40px); }
  .jhero { padding-top: calc(var(--header-height) + 48px); }
  .jgrid--2, .jgrid--3 { grid-template-columns: 1fr; }
  .cta-card { padding: 24px 22px; }
}
