/* ==========================================================================
   Supporter Blog — shell + long-form reading styles
   Loaded after supporter.css by every page under /blog and /uk/blog.
   The shell rules mirror the marketing site (index.html) so the header,
   footer and card grid look identical across the static blog pages.
   ========================================================================== */

/* ---------- shell: header, sheet, footer ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .nav-links { display: none; }
.site-head .head-cta { display: none; }
.menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; }
.head-right { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); gap: 1px; }
.lang a { height: 28px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--ink-3); font-size: var(--t-sm); font-weight: 700; letter-spacing: .02em; }
.lang a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.sheet { position: fixed; inset: 64px 0 0 0; z-index: 49; background: var(--paper); padding: var(--s4) var(--gutter) var(--s8); overflow: auto; display: none; }
.sheet.open { display: block; }
.sheet-group { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.sheet-group h4 { font-size: var(--t-sm); color: var(--ink-3); font-weight: 600; margin-bottom: var(--s2); letter-spacing: 0; }
.sheet-group a { display: block; padding: 10px 0; font-size: var(--t-lg); font-weight: 500; }
.sheet-ctas { display: grid; gap: var(--s3); padding-top: var(--s6); }

.section { padding: var(--s16) 0; }
.section + .section { padding-top: 0; }

.foot { padding: var(--s12) 0 var(--s10); border-top: 1px solid var(--line); margin-top: var(--s16); }
.foot-grid { display: grid; gap: var(--s8); }
.foot-col h4 { font-size: var(--t-sm); color: var(--ink-3); font-weight: 600; margin-bottom: 10px; }
.foot-col a { display: block; padding: 5px 0; font-size: var(--t-ui); color: var(--ink-2); }
.foot-col a:hover { color: var(--ink); }
.foot-col a.made-by { display: inline-flex; width: auto; padding: 0 0 1px; font-size: var(--t-ui); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; margin-top: var(--s10); padding-top: var(--s6); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-3); }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }

.crumb { display: flex; align-items: center; gap: 8px; font-size: var(--t-ui); color: var(--ink-3); flex-wrap: wrap; }
.crumb a { color: var(--ink-2); }
.crumb .ic { width: 14px; height: 14px; }

.cta-band { background: var(--band-bg); color: var(--band-fg); border-radius: var(--r-xl); padding: var(--s12) var(--s6); display: grid; gap: var(--s6); position: relative; overflow: hidden; }
.cta-band h2 { font-size: var(--t-h2); max-width: 16ch; color: var(--band-fg); }
.cta-band p { color: var(--band-muted); max-width: 46ch; font-size: var(--t-body); }
.cta-band .btn-secondary { background: transparent; color: var(--band-fg); border-color: var(--band-line); box-shadow: none; }
.cta-band .btn-secondary:hover { border-color: var(--band-fg); }
.cta-band .btn-primary { background: #fff; color: #121A2E; }
.cta-band .btn-primary:hover { background: #E8ECFF; }
.cta-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- blog index ---------- */
.blog-hero { padding: var(--s8) 0 var(--s10); display: grid; gap: var(--s5); }
.blog-hero h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.05; max-width: 20ch; font-weight: 700; }
.blog-hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }

.posts { display: grid; gap: 12px; }
.post { display: grid; gap: 10px; padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); align-content: start; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.post:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.post .pm { font-size: var(--t-xs); color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.post h2, .post h3 { font-size: var(--t-lg); color: var(--ink); }
.post p { font-size: var(--t-ui); color: var(--ink-2); }
.post .cover { height: 120px; border-radius: var(--r-md); background: var(--blue-tint); display: grid; place-items: center; overflow: hidden; }

.post-lead { display: grid; gap: var(--s5); padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); margin-bottom: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.post-lead:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.post-lead .cover { height: 160px; border-radius: var(--r-lg); background: var(--blue-tint); display: grid; place-items: center; overflow: hidden; }
.post-lead h2 { font-size: var(--t-xl); letter-spacing: -0.02em; max-width: 24ch; }
.post-lead p { font-size: var(--t-body); color: var(--ink-2); max-width: 62ch; }
.post-lead .pm { font-size: var(--t-xs); color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.post-lead .more { font-size: var(--t-ui); font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }

.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s6); }

/* ---------- article ---------- */
.art-head { padding: var(--s6) 0 var(--s8); display: grid; gap: var(--s5); max-width: 760px; }
.art-head h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); letter-spacing: -0.03em; line-height: 1.08; font-weight: 700; }
.art-head .lede { font-size: 1.15rem; color: var(--ink-2); }
.art-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--ink-3); }
.art-cover { height: 140px; border-radius: var(--r-xl); background: var(--blue-tint); display: grid; place-items: center; overflow: hidden; margin-bottom: var(--s10); }
.cover-art { width: 100%; height: 100%; display: block; }

.art-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s10); align-items: start; }
.toc { display: none; }
.toc-in { position: sticky; top: 92px; display: grid; gap: 6px; padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.toc h2 { font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.toc a { font-size: var(--t-ui); color: var(--ink-2); padding: 4px 0; display: block; border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

/* prose */
.prose { max-width: 720px; min-width: 0; }
.prose > * + * { margin-top: var(--s5); }
.prose h2 { font-size: var(--t-xl); letter-spacing: -0.02em; margin-top: var(--s12); scroll-margin-top: 90px; }
.prose h3 { font-size: var(--t-lg); margin-top: var(--s8); scroll-margin-top: 90px; }
.prose p { font-size: var(--t-body); color: var(--ink-2); line-height: 1.65; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--blue-line); }
.prose a:hover { text-decoration-color: var(--blue); }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 4px; }
.prose li { font-size: var(--t-body); color: var(--ink-2); line-height: 1.6; display: grid; grid-template-columns: 22px 1fr; gap: 4px; }
.prose li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-line); margin-top: 10px; }
.prose ol { counter-reset: pli; }
.prose ol li::before { content: counter(pli); counter-increment: pli; width: auto; height: auto; border-radius: 0; background: none; color: var(--blue); font-weight: 700; font-size: var(--t-sm); font-variant-numeric: tabular-nums; margin-top: 2px; }
.prose blockquote { border-left: 3px solid var(--warm); padding: 2px 0 2px var(--s5); }
.prose blockquote p { font-family: var(--font-voice); font-style: italic; font-size: 1.15rem; color: var(--ink); }
.prose .note { border: 1px solid var(--blue-line); background: var(--blue-tint); border-radius: var(--r-lg); padding: var(--s5); display: grid; gap: 8px; }
.prose .note b { font-size: var(--t-ui); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.prose .note b .ic { color: var(--blue); }
.prose .note p { font-size: var(--t-md); color: var(--ink-2); margin: 0; }
.prose .tbl-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-ui); min-width: 480px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); background: var(--surface-2); white-space: nowrap; }
.prose tr:last-child td { border-bottom: none; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); border-radius: var(--r-xs); padding: 2px 6px; color: var(--ink); }

.faq { display: grid; gap: var(--s5); max-width: 720px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); display: grid; gap: 8px; }
.faq-item h3 { font-size: var(--t-md); }
.faq-item p { font-size: var(--t-ui); color: var(--ink-2); line-height: 1.6; }

.art-foot { max-width: 720px; display: grid; gap: var(--s4); margin-top: var(--s12); padding-top: var(--s8); border-top: 1px solid var(--line); }
.art-share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: var(--t-ui); color: var(--ink-3); }

.rel-head { font-size: var(--t-xl); margin-bottom: var(--s6); }

@media (min-width: 760px) {
  .posts { grid-template-columns: repeat(2, 1fr); }
  .post-lead { grid-template-columns: 220px 1fr; align-items: center; gap: var(--s8); padding: var(--s8); }
  .post-lead .cover { height: 100%; min-height: 180px; }
  .art-cover { height: 200px; }
  .cta-band { padding: var(--s16) var(--s12); }
  .foot-grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .site-head .nav-links { display: flex; }
  .site-head .head-cta { display: flex; gap: var(--s2); }
  .menu-btn { display: none; }
  .sheet { display: none !important; }
  .posts { grid-template-columns: repeat(3, 1fr); }
  .art-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s16); }
  .toc { display: block; order: 2; }
  .prose { order: 1; }
}
