/* Signalful — editorial theme */
:root {
    --ink: #1E1E1C;
    --ink-soft: #3F3E3A;
    --muted: #5E5C55;
    --paper: #F7F5EF;
    --paper-2: #FBFAF6;
    --green: #2E5242;
    --green-ink: #F3EFE4;
    --rule: rgba(30, 30, 28, 0.12);
    --serif: var(--gh-font-heading, "Newsreader", Georgia, "Times New Roman", serif);
    --sans: var(--gh-font-body, "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --max: 1320px;
    --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 6px; font: 600 15px/1 var(--sans); border: 0; cursor: pointer; transition: opacity .2s; }
.btn:hover { opacity: .9; }
.btn-green { background: var(--green); color: var(--paper); }
.btn-green:hover { color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { color: var(--paper); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 245, 239, 0.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; }
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 40px; width: auto; }
.logo-mark { width: 40px; height: 40px; border-radius: 9px; background: var(--green); color: var(--green-ink); display: flex; align-items: center; justify-content: center; font: 400 28px/1 var(--serif); }
.site-nav { display: flex; gap: 36px; font-size: 15px; font-weight: 500; }
.nav-link { padding: 12px 2px; border-bottom: 2px solid transparent; }
body[data-section="builders"] .nav-builders,
body[data-section="investors"] .nav-investors,
body[data-section="health"] .nav-health { border-bottom-color: var(--green); color: var(--green); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.text-link { font-size: 14px; font-weight: 500; padding: 12px 10px; }
.header-actions .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* Masthead */
.masthead { padding: 64px 0 56px; border-bottom: 1px solid var(--ink); margin-bottom: 56px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.masthead-title { margin: 0; font: 600 76px/1 var(--serif); letter-spacing: -0.02em; }
.masthead-def { margin: 0; font-size: 16px; line-height: 1.45; }
.masthead-desc { margin: 0; max-width: 620px; font-size: 19px; line-height: 1.55; }
.masthead-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Story cards */
.stories { margin-bottom: 112px; }
.stagger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px 48px; align-items: start; }
.stagger.is-columned { display: flex; gap: 48px; align-items: flex-start; }
.stagger-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 72px; }
.card-link { display: flex; flex-direction: column; gap: 16px; }
.card-art { position: relative; margin: 0; overflow: hidden; border-radius: 2px; aspect-ratio: 16 / 9; background: #E4E0D4; }
.card-art img { position: absolute; inset: 0; }
.card-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .45s ease; }
.card-link:hover .card-art img, .card-link:focus-visible .card-art img { filter: grayscale(0); }
.card-art-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--green-ink); font: 400 110px/1 var(--serif); }
.kick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.kick .free { color: var(--muted); }
.kick .who:empty { display: none; }
.card-lock { margin: 0; font: 600 13px/1.4 var(--sans); color: var(--green); }
.key { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 4px 6px; border: 1px solid rgba(30, 30, 28, .2); border-radius: 999px; color: var(--ink); letter-spacing: .08em; }
.card-title { margin: 0; font: 600 34px/1.1 var(--serif); letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; transition: color .2s; }
.card-title { font-size: 30px; line-height: 1.15; }
.card-dek { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-link:hover .card-title { color: var(--green); }
.card-dek { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-soft); }
.card-by { margin: 0; font: 500 13px/1.4 var(--sans); color: var(--muted); }
.empty { color: var(--muted); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 72px; font-size: 14px; font-weight: 600; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 6px; }
.pagination .page-number { color: var(--muted); font-weight: 500; }

/* Issues archive */
.issues { margin-bottom: 112px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 32px; }
.section-head h2 { margin: 0; font: 600 36px/1.1 var(--serif); }
.issues-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.issue-card { display: flex; flex-direction: column; gap: 28px; padding: 22px; border: 1px solid rgba(30, 30, 28, .15); background: var(--paper-2); transition: border-color .2s; }
.issue-card:hover { border-color: var(--green); }
.issue-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.issue-name { font: 600 30px/1.05 var(--serif); }
.issue-count { font-size: 13px; color: var(--muted); }

/* Subscribe band */
.band { background: var(--green); color: var(--green-ink); }
.band-inner { max-width: 760px; margin: 0 auto; padding: 88px var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.band-def { font: italic 400 18px/1.4 var(--serif); color: #CFDACB; }
.band h2 { margin: 0; font: 600 48px/1.05 var(--serif); color: var(--paper); }
.band p { margin: 0; font-size: 17px; color: #DCE4D8; }
.band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* Article */
.article { max-width: var(--max); margin: 0 auto; padding: 64px var(--gutter) 88px; }
.topics:not(:has(.topic)) { display: none; }
.article-header { max-width: 860px; margin: 0 auto 48px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.article-header .kick { justify-content: center; }
.article-title { margin: 0; font: 600 60px/1.05 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.article-dek { margin: 0; font-size: 21px; line-height: 1.5; color: var(--ink-soft); max-width: 720px; }
.article-by { margin: 0; font-size: 14px; color: var(--muted); }
.article-image { max-width: 860px; margin: 0 auto 56px; }
.article-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.gh-content img { max-height: 520px; width: auto; margin: 0 auto; border-radius: 2px; }

/* Topics + Keep reading */
.topics { max-width: 720px; margin: 48px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.topics-label { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.topic { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid rgba(30, 30, 28, .2); border-radius: 999px; font-weight: 500; }
.topic:hover { border-color: var(--green); }
.read-next { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 112px; }
.read-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 40px; }
.article-image figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Post content */
.gh-content { max-width: 720px; margin: 0 auto; font-size: 19px; line-height: 1.7; }
.gh-content > * + * { margin-top: 1.4em; margin-bottom: 0; }
.gh-content h2, .gh-content h3, .gh-content h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin-top: 2em; }
.gh-content h2 { font-size: 34px; }
.gh-content h3 { font-size: 27px; }
.gh-content a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.gh-content blockquote { margin-left: 0; padding-left: 24px; border-left: 3px solid var(--green); font-family: var(--serif); font-size: 24px; font-style: italic; }
.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.gh-content hr { border: 0; border-top: 1px solid var(--rule); }
.gh-content .kg-width-wide { position: relative; width: 85vw; min-width: 100%; max-width: 1080px; left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full img { width: 100%; }

/* Gated-content CTA from Ghost */
.gh-post-upgrade-cta { margin-top: 2em; }
.gh-post-upgrade-cta-content { background: var(--green) !important; border-radius: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 13px; color: var(--muted); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 24px; }

/* Phones and small tablets */
@media (max-width: 820px) {
    .header-inner { flex-wrap: wrap; }
    .site-nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; }
    .masthead { padding: 44px 0 40px; margin-bottom: 40px; }
    .masthead-title { font-size: 56px; }
    .masthead-desc { font-size: 17px; }
    .stagger, .read-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
    .card-title { font-size: 26px; }
    .article-title { font-size: 40px; }
    .band h2 { font-size: 36px; }
}
