/* V3 blog: listing + single post. Builds on ../v3.css tokens. */

.demo-bar { background: var(--butter); border-bottom: 1.5px solid var(--ink); font-size: 14px; text-align: center; padding: 9px 16px; }
.demo-bar strong { font-weight: 700; }

/* ---------- covers (image, or tinted card with the moon) ---------- */
.cover { position: relative; display: block; aspect-ratio: 1200 / 630; overflow: hidden; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--ice { background: var(--ice); }
.cover--lilac { background: var(--lilac); }
.cover--butter { background: var(--butter); }
.cover--paper { background: var(--paper-2); }
.cover::before { /* faint ruled lines, like a notebook page */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 27px, rgb(10 15 44 / .07) 27px 28px);
}
.cover-tag { position: absolute; left: 22px; bottom: 18px; font: 500 italic clamp(26px, 3vw, 40px)/1 var(--font-head); color: var(--ink); }
.cover .moon { position: absolute; right: 18px; top: 16px; width: 26%; max-width: 120px; height: auto; transform: rotate(-8deg); transition: transform .6s var(--spring); }

/* ---------- listing ---------- */
.b-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 4vw, 48px); }
.b-hero h1 { font-size: clamp(46px, 7vw, 92px); margin: 18px 0 22px; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.b-list { padding-bottom: clamp(72px, 10vw, 120px); }

.feat { display: grid; grid-template-columns: 1.2fr 1fr; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--card); box-shadow: 0 6px 0 var(--ink); margin-bottom: 32px; transition: transform .35s var(--spring), box-shadow .3s; }
.feat:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--ink); }
.feat .cover { border-bottom: 0; border-right: 1.5px solid var(--ink); aspect-ratio: auto; min-height: 340px; }
.feat:hover .cover .moon, .bcard:hover .cover .moon { transform: rotate(6deg) scale(1.06); }
.feat-body { padding: clamp(24px, 3.4vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.feat-body h2 { font-size: clamp(30px, 3.4vw, 44px); }
.feat-body p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kicker .new { font: 700 11px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 6px 9px; border-radius: 999px; }
.meta { font-size: 14px; color: var(--muted); }
.read { font-weight: 700; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }

.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bcard { display: flex; flex-direction: column; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 5px 0 var(--ink); transition: transform .35s var(--spring), box-shadow .3s, opacity .3s; }
.bcard:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 10px 0 var(--ink); }
.bcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bcard h3 { font-size: 22px; line-height: 1.2; }
.bcard p { margin: 0; color: var(--ink-soft); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .meta { margin-top: auto; }
.is-hidden { display: none !important; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.pager span { color: var(--muted); font-size: 15px; }

.empty { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; border: 1.5px solid var(--ink); border-radius: 22px; background: var(--card); box-shadow: 10px 12px 0 var(--lilac), 10px 12px 0 1.5px var(--ink); padding: clamp(28px, 5vw, 56px); }
.empty .moon { width: clamp(90px, 14vw, 150px); height: auto; }
.empty h2 { font-size: clamp(32px, 4vw, 48px); }
.empty p { margin: 14px 0 22px; color: var(--ink-soft); font-size: 17px; max-width: 34em; }

/* ---------- single post ---------- */
.progress { position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 60; background: var(--violet); transform-origin: left; transform: scaleX(0); }
.p-head { padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 4vw, 40px); }
.back { display: flex; width: max-content; gap: 8px; align-items: center; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-bottom: 26px; }
.back:hover { color: var(--violet-ink); }
.p-head h1 { font-size: clamp(38px, 5.6vw, 72px); max-width: 16em; margin: 18px 0 20px; }
.p-head .lede { max-width: 38em; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.byline .av { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--lilac); display: grid; place-items: center; }
.byline .av .moon { width: 30px; height: 30px; }
.byline strong { display: block; font-size: 15px; }
.p-cover { border: 1.5px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 8px 10px 0 var(--ink); margin-bottom: clamp(40px, 6vw, 72px); }
.p-cover .cover { border-bottom: 0; }
.p-cover [class*="cover--"] { aspect-ratio: 1200 / 340; } /* no image: shorter tinted band */
.p-cover .cover-tag { font-size: clamp(34px, 5vw, 64px); left: 32px; bottom: 26px; }

.p-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(56px, 8vw, 96px); }
.toc { position: sticky; top: 100px; font-size: 14px; }
.toc .k { font: 700 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1.5px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-soft); line-height: 1.35; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--violet); }
.share { margin-top: 26px; display: grid; gap: 10px; }
.share button { font: 600 14px/1 var(--font-body); padding: 11px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); box-shadow: 0 3px 0 var(--ink); cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; }
.share button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }

.prose { max-width: 680px; font-size: 18.5px; line-height: 1.75; color: var(--ink-soft); }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose > p:first-of-type::first-letter { font: 600 3.6em/.8 var(--font-head); float: left; margin: 8px 12px 0 0; color: var(--violet); }
.prose h2 { font-size: clamp(28px, 3vw, 36px); color: var(--ink); margin: 1.9em 0 .6em; scroll-margin-top: 100px; }
.prose h3 { font-size: 23px; color: var(--ink); margin: 1.6em 0 .5em; }
.prose a { color: var(--ink); text-decoration-color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--violet-ink); }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--violet); }
.prose blockquote { margin: 1.6em 0; padding: 22px 26px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--ink); font: 500 italic 22px/1.45 var(--font-head); color: var(--ink); }
.prose img { border: 1.5px solid var(--ink); border-radius: 14px; margin: 1.4em 0; }
.prose strong { color: var(--ink); }

.p-end { max-width: 680px; margin-top: 44px; padding-top: 28px; border-top: 1.5px dashed var(--line); display: grid; gap: 24px; }
.author { display: flex; gap: 16px; align-items: center; padding: 20px 22px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.author .av { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--lilac); display: grid; place-items: center; }
.author .av .moon { width: 38px; height: 38px; }
.author p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

.more { padding: clamp(64px, 9vw, 104px) 0; border-top: 1.5px solid var(--ink); background: var(--card); }
.more .bcard { background: var(--paper); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .feat { grid-template-columns: 1fr; }
  .feat .cover { border-right: 0; border-bottom: 1.5px solid var(--ink); min-height: 0; aspect-ratio: 1200 / 630; }
  .bgrid { grid-template-columns: 1fr 1fr; }
  .p-grid { grid-template-columns: 1fr; }
  .toc { position: static; order: 2; }
  .toc ol { display: none; }
  .toc .k { display: none; }
  .share { grid-template-columns: 1fr 1fr; margin-top: 0; }
}
@media (max-width: 600px) {
  .bgrid { grid-template-columns: 1fr; }
  .empty { grid-template-columns: 1fr; }
  .prose { font-size: 17.5px; }
  .pager .btn { padding: 12px 16px; }
}
