/* =========================================================
   Journal: article cards, listing page, reading page
   ========================================================= */
.avatar-sm { width: 36px; height: 36px; font-size: 12.5px; flex: none; }
.avatar-lg { width: 72px; height: 72px; font-size: 22px; flex: none; }

/* ---------- Article cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.post { display: flex; flex-direction: column; }
.post[hidden] { display: none; }
.post-img { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--butter-deep); }
.post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post-img img { transform: scale(1.05); }
.post-body { padding: 20px 4px 0; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.post-cat { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--butter); color: var(--olive); font-size: 12.5px; font-weight: 600; }
.section-butter .post-cat { background: var(--paper); }
.post h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; color: var(--olive); margin-bottom: 10px; }
.post h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--ease); }
.post h3 a:hover { background-size: 100% 1.5px; }
.post-body > p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.post-author { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 13px; color: var(--muted); line-height: 1.35; }
.post-author strong { display: block; color: var(--olive); font-size: 14px; }

.post-large { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8); }
.post-large .post-img { position: relative; aspect-ratio: auto; min-height: 480px; border-radius: 0; }
.post-large .post-img img { position: absolute; inset: 0; }
.post-large .post-body { padding: 56px 52px; justify-content: center; }
.post-large h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px; }
.post-large .post-body > p { font-size: 17px; margin-bottom: 32px; }
.post-large .post-author { margin-top: 0; }

/* Newsletter cell that completes the grid */
.post-cta {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  padding: 36px 32px; border-radius: var(--radius-md); background: var(--olive); color: var(--cream);
  min-height: 100%; position: relative; overflow: hidden;
}
.post-cta[hidden] { display: none; }
.post-cta::before { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: var(--amber); opacity: .9; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.post-cta h3 { position: relative; font-size: 26px; letter-spacing: -.025em; line-height: 1.15; }
.post-cta h3 em { font-family: var(--serif); font-weight: 400; font-size: 1.12em; }
.post-cta p { position: relative; color: rgba(255, 249, 232, .78); font-size: 15px; }
.post-cta .btn { align-self: flex-start; position: relative; }

/* ---------- Listing page ---------- */
.journal-hero { padding: 0 0 24px; }
.journal-head { max-width: 760px; margin: 12px 0 48px; }
.journal-head h1 { font-size: clamp(44px, 6.4vw, 84px); font-weight: 800; letter-spacing: -.045em; line-height: .98; color: var(--olive); margin-bottom: 20px; }
.journal-head h1 em, .bar-title em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; font-size: 1.1em; }
.journal-head p { font-size: 18px; color: var(--muted); max-width: 54ch; }
.journal-list { padding-top: 72px; }
.journal-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.journal-bar h2 { font-size: 28px; letter-spacing: -.025em; color: var(--olive); }
.journal-bar .bar-title { font-size: clamp(34px, 4.6vw, 54px); font-weight: 700; letter-spacing: -.035em; margin-bottom: 10px; }
.journal-bar header p { color: var(--muted); font-size: 16.5px; }
.chips-left { margin: 0; justify-content: flex-end; }
.posts-empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- Reading page ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress div { height: 100%; background: linear-gradient(90deg, var(--amber-light), var(--amber)); transform-origin: left; transform: scaleX(0); }
.container-narrow { width: min(820px, 100% - 48px); margin-inline: auto; }
.article-head { padding-bottom: 56px; }
.article-head .post-cat { margin-bottom: 18px; transition: background .25s; }
.article-head .post-cat:hover { background: var(--butter-deep); }
.article-head h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; color: var(--olive); margin-bottom: 20px; }
.article-lede { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 26px); line-height: 1.35; color: var(--muted); margin-bottom: 32px; }
.article-byline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0; border-block: 1px solid var(--line); margin-bottom: 40px; }
.article-byline .avatar { width: 48px; height: 48px; flex: none; }
.share { display: flex; gap: 6px; }
.share-btn { border: 1.5px solid var(--line-strong); }
.share-btn:hover { border-color: var(--olive); }
.article-hero { margin: 0; aspect-ratio: 21 / 9; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--butter-deep); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 56px; align-items: start; padding-bottom: 72px; }
.article-aside { position: sticky; top: 110px; display: grid; gap: 32px; }
.article-aside h2 { font-size: 13px; font-weight: 700; color: var(--olive); 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: 1.5px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--olive); }
.toc a.active { color: var(--olive); font-weight: 600; border-color: var(--amber); }
.aside-products ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aside-products li { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.mini-product { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-img { flex: none; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--butter-deep); isolation: isolate; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.mini-product strong { display: block; font-size: 13.5px; color: var(--olive); line-height: 1.25; }
.mini-product > span:last-child > span { font-size: 12.5px; color: var(--muted); }
.mini-product:hover strong { color: var(--amber); }
.mini-add { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--olive); background: none; color: var(--olive); display: grid; place-items: center; transition: background .25s, color .25s; }
.mini-add:hover, .mini-add.added { background: var(--olive); color: var(--cream); }

.prose { grid-column: 2; max-width: 680px; font-size: 18px; line-height: 1.78; color: #4A3D12; }
.article-aside { grid-column: 1; grid-row: 1; }
.prose > * + * { margin-top: 1.3em; }
.prose > p:first-child::first-letter { float: left; font-family: var(--serif); font-size: 4.4em; line-height: .82; margin: .06em .1em 0 0; color: var(--amber); }
.prose h2 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; color: var(--olive); margin-top: 2em; scroll-margin-top: 110px; }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prose li { position: relative; padding-left: 30px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 11px; height: 11px; background: var(--amber); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.prose blockquote { margin: 2em 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--amber); }
.prose blockquote p { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 34px); line-height: 1.25; color: var(--olive-ink); }
.prose blockquote cite { display: block; margin-top: 12px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); }
.tip { padding: 22px 26px; border-radius: var(--radius-md); background: var(--butter); border: 1px solid rgba(255,255,255,.8); }
.tip strong { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--olive); margin-bottom: 4px; }
.tip strong::before { content: ""; width: 14px; height: 14px; background: var(--amber); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.tip p { font-size: 16px; line-height: 1.6; color: var(--olive-ink); }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }

.author-box { display: flex; gap: 22px; align-items: center; padding: 32px; margin-bottom: 110px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.author-label { font-size: 13px; color: var(--muted); }
.author-box strong { display: block; font-size: 19px; color: var(--olive); margin-bottom: 4px; }
.author-box p:last-child { color: var(--muted); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 1000px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post-large { grid-template-columns: 1fr; }
  .post-large .post-img { min-height: 0; aspect-ratio: 16 / 9; }
  .post-large .post-body { padding: 36px 32px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .prose { grid-column: 1; margin-inline: auto; }
  .article-aside { position: static; grid-row: 2; max-width: 680px; width: 100%; margin-inline: auto; }
  .toc { display: none; }
  .aside-products ul { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 640px) {
  .posts { grid-template-columns: 1fr; }
  .post-cta { min-height: 280px; }
  .chips-left { justify-content: flex-start; }
  .journal-bar { align-items: flex-start; }
  .container-narrow { width: calc(100% - 32px); }
  .article-hero { aspect-ratio: 4 / 3; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; }
  .post-large .post-body { padding: 28px 22px; }
  .author-box { flex-direction: column; align-items: flex-start; padding: 24px; margin-bottom: 80px; }
}
