/* Skinventry blog: the index and the post template (blog/post/index.html,
   which scripts/publish-blog.mjs renders every post from). Builds on
   /assets/site.css tokens. Class names below are emitted by the renderer
   (generateStaticHtml, renderAppAd, renderRailAd, generateRelatedPostsHtml)
   and by post bodies; do not rename them here without changing the renderer. */

/* Legacy token names still referenced by inline styles the renderer emits
   (breadcrumb category span, sources host span). Mapped onto the new system. */
:root {
  --on-surface-variant: var(--ink-2);
  --outline: var(--ink-3);
  --measure: 660px;
  --rail: 300px;
}

/* ---------- reading progress ---------- */

.reading-progress {
  position: fixed; top: 0; left: 0; z-index: 70;
  height: 3px; width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ---------- entrance motion (quiet) ---------- */

.fade-in { animation: sv-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fade-delay-1 { animation-delay: 0.05s; }
.fade-delay-2 { animation-delay: 0.1s; }
.fade-delay-3 { animation-delay: 0.15s; }
.fade-delay-4 { animation-delay: 0.2s; }
@keyframes sv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible, html:not(.js) .reveal { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.04s; }
.reveal-delay-2 { transition-delay: 0.08s; }
.reveal-delay-3 { transition-delay: 0.12s; }

/* ---------- loading state (the renderer replaces this block) ---------- */

.loading-state { max-width: var(--measure); margin: 0 auto; padding: clamp(64px, 10vw, 120px) var(--gutter) 80px; }
.loading-spinner {
  height: 44px; width: 80%; border-radius: var(--r-inner);
  background: var(--surface-muted); margin-bottom: 18px;
  animation: sv-pulse 1.4s ease-in-out infinite;
}
.loading-state p { color: var(--ink-3); font-size: 15px; }
.loading-state h2 { font-size: 30px; margin-bottom: 10px; }
@keyframes sv-pulse { 50% { opacity: 0.5; } }

/* =========================================================
   POST
   ========================================================= */

.post-hero {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}
/* Wide screens with a rail: the hero spans column plus rail, left aligned
   with the reading column. Without a rail (or without :has support) it stays
   centered over the single column. */
@media (min-width: 1180px) {
  article:has(.post-rail) > .post-hero { max-width: calc(var(--measure) + 64px + var(--rail) + 2 * var(--gutter)); }
  article:has(.post-rail) > .post-hero > * { max-width: 820px; }
}

.post-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.post-breadcrumb a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.post-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-breadcrumb svg { width: 14px; height: 14px; stroke: var(--ink-3); }
.post-breadcrumb span { font-size: 15px !important; color: var(--ink-2) !important; }

/* The breadcrumb already names the category; the pill would repeat it. */
.post-category-tag { display: none; }

.post-hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 20px;
}
.post-hero .post-excerpt {
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  margin-bottom: 28px;
  max-width: 36em;
}

.post-hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 5vw, 52px);
  font-size: 15px;
}
.post-author { display: flex; align-items: center; gap: 10px; }
.post-author-avatar { display: none; }
.post-author-name { font-weight: 600; color: var(--ink); }
.meta-dot { display: none; }
.meta-text { color: var(--ink-2); font-variant-numeric: lining-nums; }
.share-buttons { display: flex; gap: 8px; margin-left: auto; }
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink-2); cursor: pointer; transition: box-shadow 0.15s, color 0.15s;
}
.share-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); color: var(--ink); }
.share-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.share-btn svg path[fill="currentColor"] { fill: currentColor; }

/* ---------- layout + rail ---------- */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  justify-content: center;
  gap: 64px;
  max-width: calc(var(--measure) + 64px + var(--rail) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.post-rail { display: none; }
/* Two columns only when the renderer actually emitted a rail. A post with no
   truthful ad has no <aside class="post-rail">, and stays one centered column.
   Browsers without :has() also keep the single column and hide the rail. */
@media (min-width: 1180px) {
  .post-layout:has(> .post-rail) { grid-template-columns: minmax(0, var(--measure)) var(--rail); justify-content: start; }
  .post-layout:has(> .post-rail) > .post-rail { display: block; }
}
.post-rail-inner { position: sticky; top: calc(var(--header-h) + 28px); }

/* ---------- the article body ---------- */

.post-body {
  font-size: 19px;
  line-height: 1.72;
  color: var(--ink);
  padding-bottom: 24px;
  overflow-wrap: break-word;
}
@media (max-width: 600px) { .post-body { font-size: 18px; line-height: 1.68; } }

.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.15em; }
.post-body p.lead { font-size: 1.14em; line-height: 1.55; color: var(--ink-2); }

.post-body h2 {
  font-size: clamp(25px, 2.6vw, 30px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2.1em 0 0.6em;
}
.post-body h3 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; margin: 1.7em 0 0.5em; }
.post-body h4 { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.008em; margin: 1.5em 0 0.4em; }
.post-body h2 + h3, .post-body h2 + h4 { margin-top: 0.6em; }

.post-body strong { font-weight: 600; }
.post-body a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent);
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: currentColor; }

.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.5em; padding-left: 0.2em; }
.post-body li::marker { color: var(--ink-3); }
.post-body ol > li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
.post-body li > ul, .post-body li > ol { margin: 0.5em 0 0; }

.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.post-body blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 22px;
  border-left: 3px solid var(--line);
  color: var(--ink-2);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body blockquote.pullquote {
  border-left-color: var(--accent);
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 1.8em 0;
}
.post-body cite { font-style: normal; font-size: 15px; color: var(--ink-3); }

/* tables: full width, calm hairlines, numbers aligned */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 15.5px;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  background: var(--surface);
  border-radius: var(--r-inner);
  overflow: hidden;
}
.post-body th {
  text-align: left; font-weight: 600; color: var(--ink);
  background: var(--surface-muted);
  padding: 12px 14px;
}
.post-body td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
@media (max-width: 600px) {
  .post-body table { font-size: 14px; }
  .post-body th, .post-body td { padding: 10px 9px; }
}

/* images and figures */
.post-body img { width: 100%; height: auto; border-radius: 16px; margin: 1.6em 0; background: var(--surface-muted); }
.post-body figure { margin: 2em 0; }
.post-body figure img { margin: 0; }
.post-body figcaption, .post-body .sv-figure figcaption {
  font-size: 15px; line-height: 1.5; color: var(--ink-2);
  margin-top: 12px;
}
.post-body .sv-figure .sv-source { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 6px; }
.post-body .sv-photo img { border-radius: 16px; }

/* comparison bars */
.post-body .sv-bars { background: var(--surface); border-radius: var(--r-card); padding: clamp(20px, 3vw, 28px); }
.post-body .sv-bars-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 18px; text-transform: none; letter-spacing: 0; }
.post-body .sv-bar { margin-bottom: 16px; }
.post-body .sv-bar:last-child { margin-bottom: 0; }
.post-body .sv-bar-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 6px; font-size: 15px; line-height: 1.35; }
.post-body .sv-bar-label { font-weight: 600; color: var(--ink); }
.post-body .sv-bar-note { font-weight: 400; color: var(--ink-2); }
.post-body .sv-bar-value { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-body .sv-bar-track { height: 12px; background: var(--surface-muted); border-radius: var(--r-pill); overflow: hidden; }
.post-body .sv-bar-fill { height: 100%; min-width: 8px; border-radius: var(--r-pill); background: var(--accent); }
.post-body .sv-bar.is-full .sv-bar-fill { background: var(--ink-2); }

/* the short answer block */
.post-body .tldr {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 28px);
  margin: 0 0 2em;
}
.post-body .tldr::before {
  content: "The short version";
  display: block;
  font-size: 14px; font-weight: 600; color: var(--accent-text);
  margin-bottom: 8px;
}
.post-body .tldr p { font-size: 18px; line-height: 1.6; margin: 0; }
.post-body .tldr p + p { margin-top: 0.8em; }

/* product cards in the body */
.post-body .product-card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(18px, 2.6vw, 24px) clamp(18px, 2.8vw, 26px);
  margin: 0 0 12px;
}
.post-body .product-card h4 { font-size: 19px; margin: 0 0 6px; }
.post-body .product-card h4 a { color: var(--ink); text-decoration-color: var(--line); }
.post-body .product-card h4 a:hover { text-decoration-color: var(--accent); }
.post-body .product-card p { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.post-body .product-card p + p { margin-top: 0.6em; }

/* inline citations */
.post-body sup.ref { font-size: 0.66em; line-height: 0; vertical-align: super; margin-left: 1px; }
.post-body sup.ref a { text-decoration: none; font-weight: 600; padding: 0 2px; border-radius: 4px; }
.post-body sup.ref a:hover { background: var(--accent-soft); }

/* FAQ */
.post-body .faq { margin: 2.6em 0 0; padding-top: 0.4em; }
.post-body .faq > h2 { margin-top: 0; }
.post-body .faq details { border-top: 1px solid var(--line); }
.post-body .faq details:last-child { border-bottom: 1px solid var(--line); }
.post-body .faq summary {
  list-style: none; cursor: pointer;
  position: relative; padding: 18px 44px 18px 0;
  font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--ink);
}
.post-body .faq summary::-webkit-details-marker { display: none; }
.post-body .faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) center / 2px 12px no-repeat;
  transition: transform 0.2s;
}
.post-body .faq details[open] summary::after { transform: rotate(45deg); }
.post-body .faq details p { font-size: 17.5px; line-height: 1.65; color: var(--ink-2); margin: -4px 0 20px; }

/* sources: after the app card, small and complete */
.post-sources { padding-top: 0; }
.post-body .sources, .post-body .references { margin: 2em 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.post-body .sources h2, .post-body .references h2 { font-size: 20px; margin: 0 0 14px; letter-spacing: -0.01em; }
.post-body .sources ol, .post-body .references ol { padding-left: 1.6em; margin: 0; }
.post-body .sources li, .post-body .references li { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-bottom: 8px; }
.post-body .sources li a, .post-body .references li a { word-break: break-word; }

/* tags */
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 8px; }
.post-tags-label { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.post-tag { font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--surface-muted); padding: 6px 12px; border-radius: var(--r-pill); }

/* ---------- app card after the argument (renderAppAd) ---------- */

/* The identity row both ad placements open with. */
.ad-app { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ad-app img { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5); }
.ad-app span { display: flex; flex-direction: column; line-height: 1.2; }
.ad-app b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ad-app small { font-size: 13px; color: var(--ink-3); }

.post-cta { margin: 40px 0 16px; }
.post-cta-card {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #2E2522 0%, #1E1917 52%, #161211 100%);
  color: #F6EFEB;
  border-radius: 28px;
  padding: clamp(26px, 4vw, 40px);
}
.post-cta-card::after {
  content: ""; position: absolute; right: -24px; bottom: -40px; width: 190px; height: 200px;
  background: url("/assets/brand/logo-mark-dark.svg") center / contain no-repeat;
  opacity: 0.1; pointer-events: none;
}
.post-cta-card .ad-app small { color: rgba(246, 239, 235, 0.6); }
.post-cta-card h3 { position: relative; z-index: 1; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 20em; color: #F6EFEB; }
.post-cta-card p { position: relative; z-index: 1; font-size: 17px; line-height: 1.55; color: rgba(246, 239, 235, 0.72); margin: 0 0 24px; max-width: 32em; }
.post-cta-btn, .rail-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease;
  position: relative; z-index: 1;
}
.post-cta-btn { background: #F6EFEB; color: #1A1614; }
.rail-btn { background: var(--inverse); color: var(--on-inverse); }
.post-cta-btn:hover, .rail-btn:hover { transform: translateY(-1px); }
.post-cta-btn svg, .rail-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.post-cta-fine { position: relative; z-index: 1; font-size: 14px !important; color: rgba(246, 239, 235, 0.55) !important; margin: 14px 0 0 !important; }

/* ---------- desktop rail (renderRailAd) ---------- */

.rail-card { background: var(--surface); border-radius: var(--r-card); padding: 22px 22px 20px; box-shadow: 0 0 0 1px var(--line); }
.rail-card .ad-app { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rail-eyebrow { display: block; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 14px; }
.rail-inci {
  font-size: 14.5px; line-height: 1.85; color: var(--ink);
  background: var(--surface-muted); border-radius: var(--r-inner);
  padding: 12px 14px; margin-bottom: 16px;
}
.rail-inci span { display: block; }
.rail-inci .dim { color: var(--ink-3); }
.rail-inci .flag { color: var(--accent-text); font-weight: 600; }
.rail-inci .ok { color: var(--ink); font-weight: 600; }
.rail-line { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.rail-line::before, .rail-line::after { content: ""; flex: 1; height: 1.5px; background: var(--accent); }
.rail-line i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent-text); text-transform: lowercase; letter-spacing: 0; }
.rail-note { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; }
.rail-btn { display: flex; width: 100%; font-size: 15px; min-height: 46px; }
.rail-fine { display: block; margin-top: 10px; font-size: 13px; line-height: 1.4; font-weight: 500; text-align: center; color: var(--ink-3); }

/* ---------- related posts ---------- */

.related-posts {
  max-width: calc(var(--measure) + 64px + var(--rail) + 2 * var(--gutter));
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding: 0 var(--gutter);
}
.related-posts h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.related-card { display: block; text-decoration: none; color: var(--ink); padding: 20px 0 8px; }
.related-card-gradient { display: none; }
.related-card-category { font-size: 14px; font-weight: 600; color: var(--accent-text); margin-bottom: 8px; }
.related-card-title { font-size: 21px; line-height: 1.22; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 8px; text-wrap: balance; }
.related-card:hover .related-card-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.related-card-excerpt { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-meta { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 10px; }
@media (max-width: 820px) {
  .related-posts-grid { grid-template-columns: 1fr; }
  .related-card { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
}

@media (max-width: 600px) {
  .post-hero-meta { gap: 6px 16px; }
  .share-buttons { margin-left: 0; width: 100%; }
}

/* =========================================================
   INDEX
   ========================================================= */

.blog-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 36px); }
.blog-hero h1 { font-size: clamp(44px, 7.4vw, 88px); line-height: 0.98; letter-spacing: -0.035em; margin-bottom: 20px; }
.blog-hero .lede { max-width: 30em; }

.category-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 clamp(28px, 4vw, 44px); }
.category-pill {
  min-height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-pill);
  background: transparent; box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.category-pill:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.category-pill.active { background: var(--ink); color: var(--bg); box-shadow: none; }

/* lead story */
.featured-post {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px);
  align-items: end;
  text-decoration: none; color: var(--ink);
  padding: clamp(28px, 4vw, 44px) 0 clamp(32px, 4vw, 48px);
  border-top: 2px solid var(--ink);
}
.featured-post .post-category { margin-bottom: 14px; }
.featured-post h2 { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; }
.featured-post:hover h2 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.featured-post .excerpt { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; }
.featured-aside { padding-bottom: 6px; }
@media (max-width: 820px) { .featured-post { grid-template-columns: 1fr; align-items: start; gap: 16px; } }

.post-category { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 500; color: var(--ink-3); font-variant-numeric: lining-nums; }

/* archive */
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; padding: 40px 0 14px; border-bottom: 1px solid var(--line); }
.section-label small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.posts-grid { display: block; }
.month-label { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 28px 0 4px; }

.post-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 150px;
  gap: 4px 28px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.post-card .card-date { font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; }
.post-card h3 { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; text-wrap: pretty; }
.post-card .excerpt { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 46em; }
.post-card .card-side { text-align: right; font-size: 14px; line-height: 1.5; }
.post-card .card-side .post-category { display: block; }
.post-card .card-side .read-time { color: var(--ink-3); font-weight: 500; }
.post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
@media (max-width: 760px) {
  .post-card { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 0; }
  .post-card .card-date { order: 0; font-size: 14px; }
  .post-card .card-side { text-align: left; display: flex; gap: 14px; }
}

.more-wrap { padding: 28px 0 0; }

/* skeletons */
.skeleton { background: var(--surface-muted); border-radius: var(--r-inner); animation: sv-pulse 1.4s ease-in-out infinite; }
.skeleton-featured { height: 220px; margin-bottom: 24px; }
.skeleton-card { height: 72px; margin-bottom: 14px; }

.empty-state { padding: 64px 0; max-width: 34em; }
.empty-state h3 { font-size: 26px; margin-bottom: 10px; }
.empty-state p { color: var(--ink-2); }

/* static crawler list (written by the publish scripts with inline styles) */
#staticBlogLinks > div { max-width: none !important; margin: 0 !important; padding: 0 0 24px !important; }
#staticBlogLinks h2 { font-family: var(--font) !important; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px !important; }
#staticBlogLinks li { padding: 16px 0; margin: 0 !important; border-bottom: 1px solid var(--line); }
#staticBlogLinks li a { color: var(--ink) !important; font-size: 20px !important; font-weight: 600 !important; letter-spacing: -0.01em; }
#staticBlogLinks li span { color: var(--ink-2) !important; font-size: 15.5px !important; }
#staticBlogLinks li time { color: var(--ink-3) !important; font-size: 14px !important; }

/* closing app band */
.newsletter-section {
  margin: clamp(56px, 8vw, 96px) 0 0;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center;
}
.newsletter-section h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 12px; }
.newsletter-section p { color: var(--ink-2); margin: 0; max-width: 34em; }
@media (max-width: 760px) { .newsletter-section { grid-template-columns: 1fr; } }

/* =========================================================
   Legacy download modal (opened only by #download links)
   ========================================================= */

.wl-overlay {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 16px;
}
.wl-overlay.open { display: flex; }
body.wl-locked { overflow: hidden; }
.wl-modal { position: relative; width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-card); padding: 32px 28px 28px; }
.wl-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.wl-close:hover { background: var(--surface-muted); color: var(--ink); }
.wl-close svg { width: 20px; height: 20px; }
.wl-modal h2 { font-size: 26px; margin-bottom: 8px; }
.wl-sub { color: var(--ink-2); font-size: 16px; margin-bottom: 22px; }
.wl-field { margin-bottom: 14px; }
.wl-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.wl-field input { width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: var(--r-inner); background: var(--surface-muted); color: var(--ink); font: inherit; font-size: 16px; }
.wl-field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.wl-field input.wl-error { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wl-error-msg { display: none; font-size: 13px; color: var(--accent-text); margin-top: 6px; }
.wl-error-msg.visible { display: block; }
.wl-optional { font-weight: 400; color: var(--ink-3); }
.wl-submit { width: 100%; min-height: 48px; margin-top: 8px; border: 0; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wl-submit:disabled { opacity: 0.6; cursor: default; }
.wl-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: sv-spin 0.7s linear infinite; }
.wl-submit.loading .wl-spinner { display: block; }
.wl-submit.loading .wl-btn-text { display: none; }
@keyframes sv-spin { to { transform: rotate(360deg); } }
.wl-success { display: none; text-align: center; padding: 12px 0; }
.wl-success.visible { display: block; }
.wl-check { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.wl-check svg { width: 26px; height: 26px; stroke: var(--accent-text); stroke-width: 2.5; fill: none; }
.wl-success h3 { font-size: 22px; margin-bottom: 8px; }
.wl-success p { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
.rail-card[data-ad-topic="transparency"] .rail-inci span::before, .rail-card[data-ad-topic="care"] .rail-inci span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--accent); vertical-align: middle; }

/* ---------- inline app card inside the article (renderInlineAd) ---------- */

.post-inline-cta {
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0; padding: 14px 14px 14px 16px;
  border-radius: 22px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -30px rgba(58, 30, 20, 0.4);
}
.post-inline-cta img { width: 48px; height: 48px; border-radius: 12px; flex: none; margin: 0 !important; }
.post-inline-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.post-inline-copy b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.post-inline-copy span { font-size: 13.5px; color: var(--ink-3); }
.post-inline-btn { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--inverse); color: var(--on-inverse) !important; font-size: 14.5px; font-weight: 600; text-decoration: none !important; }
@media (max-width: 480px) {
  .post-inline-cta { flex-wrap: wrap; }
  .post-inline-btn { width: 100%; justify-content: center; }
}
