/* Goodall Research — Ghost theme. Mirrors goodallresearch.com. */
:root { --paper:#fafaf8; --ink:#101010; --ink-soft:#55524a; --red:#c81e3a; --red-bg:#f8e2e6; --navy:#1b3a5c; --navy-bg:#e2e8ee; --hairline:#dedad2; --panel:#ffffff; --green:#1a5c3a; --green-bg:#e2ede6; }
* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:'IBM Plex Sans', sans-serif; -webkit-font-smoothing:antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width:1080px; margin:0 auto; padding:0 32px; }
.article-wrap { max-width:680px; margin-left:auto !important; margin-right:auto !important; padding:0 32px; }

/* Header */
header.site { border-bottom:3px solid var(--ink); }
.header-inner { display:flex; align-items:center; justify-content:space-between; padding:26px 32px; flex-wrap:wrap; gap:12px; }
.wordmark { font-family:'Fraunces', serif; font-size:22px; font-weight:600; color:var(--ink); text-decoration:none; }
nav.main { display:flex; align-items:center; gap:34px; }
nav.main a { color:var(--ink); text-decoration:none; font-size:15px; font-weight:500; }
nav.main a.btn-ink { color:#fff; }
.btn { display:inline-block; font-family:'IBM Plex Sans', sans-serif; font-size:14px; font-weight:600; padding:11px 22px; border-radius:2px; text-decoration:none; cursor:pointer; line-height:normal; }
.btn-ink { background:var(--ink); color:#fff; border:none; }
.btn-red { background:var(--red); color:#fff; border:none; }
.btn-ghost { background:transparent; color:var(--ink); border:2px solid var(--ink); }

/* Animated red underline on text nav links */
nav.main a:not(.btn) { position:relative; padding-bottom:4px; border-bottom:none; }
nav.main a:not(.btn)::after { content:""; position:absolute; left:0; right:0; bottom:0; height:2px; background:var(--red); transform:scaleX(0); transform-origin:left center; transition:transform .28s cubic-bezier(.22,.61,.36,1); }
nav.main a:not(.btn):hover::after, nav.main a:not(.btn):focus-visible::after, nav.main a.active::after { transform:scaleX(1); }
.nav-toggle { display:none; }

/* List page */
.page-head { padding:56px 0 12px; }
.page-head .kicker { font-family:'Fraunces', serif; font-style:italic; font-size:15px; color:var(--red); margin:0 0 8px; }
.page-head h1 { font-family:'Fraunces', serif; font-size:44px; font-weight:600; margin:0 0 14px; line-height:1.1; }
.page-head p { font-size:16px; color:var(--ink-soft); max-width:56ch; margin:0; }
.page-head p a { color:var(--red); font-weight:600; text-decoration:none; }
.filters { display:flex; gap:10px; padding:28px 0 8px; flex-wrap:wrap; }
.filter-chip { font-family:'IBM Plex Sans', sans-serif; font-size:13px; font-weight:600; padding:8px 16px; border-radius:20px; border:2px solid var(--ink); background:transparent; color:var(--ink); cursor:pointer; }
.filter-chip.active { background:var(--ink); color:#fff; }

.piece { display:grid; grid-template-columns:130px 1fr auto; gap:24px; align-items:center; padding:26px 0; border-top:2px solid var(--hairline); }
.piece[hidden] { display:none; }
.piece-tag { font-size:13px; font-weight:600; padding:6px 12px; border-radius:2px; display:inline-block; width:fit-content; text-decoration:none; }
.tag-red { background:var(--red-bg); color:var(--red); }
.tag-navy { background:var(--navy-bg); color:var(--navy); }
.piece h3 { font-family:'Fraunces', serif; font-size:21px; font-weight:600; margin:0 0 6px; line-height:1.25; }
.piece h3 a { text-decoration:none; color:var(--ink); }
.piece h3 a:hover { color:var(--red); }
.piece p { font-size:14px; color:var(--ink-soft); margin:0; max-width:52ch; }
.piece .meta { font-size:12.5px; color:var(--ink-soft); font-weight:500; white-space:nowrap; text-align:right; }
.empty-note { padding:26px 0; color:var(--ink-soft); border-top:2px solid var(--hairline); }

.pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:32px 0 8px; border-top:2px solid var(--hairline); }
.pagination .page-number { font-size:13px; color:var(--ink-soft); font-weight:500; }
.pagination .older { margin-left:auto; }

/* Post */
.article-head { padding:56px 0 0; }
.article-head .piece-tag { background:var(--red-bg); color:var(--red); margin-bottom:20px; }
.article-head h1 { font-family:'Fraunces', serif; font-size:44px; line-height:1.1; font-weight:600; margin:0 0 20px; }
.standfirst { font-family:'Fraunces', serif; font-style:italic; font-size:20px; line-height:1.45; color:var(--ink-soft); margin:0 0 20px; }
.byline { font-size:14px; color:var(--ink-soft); padding-bottom:32px; border-bottom:2px solid var(--hairline); margin-bottom:36px; }
.feature-image { margin:0 auto 36px; }
.feature-image img { width:100%; display:block; border-radius:2px; }
.feature-image figcaption { font-size:13px; color:var(--ink-soft); margin-top:10px; }

.gh-content { font-size:17px; line-height:1.75; color:var(--ink); }
.gh-content > * + * { margin-top:22px; }
.gh-content p { margin:0; }
.gh-content > p:first-child { font-size:19px; color:var(--ink-soft); }
.gh-content h2 { font-family:'Fraunces', serif; font-size:30px; font-weight:600; line-height:1.15; margin-top:44px; }
.gh-content h3 { font-family:'Fraunces', serif; font-size:24px; font-weight:600; line-height:1.2; margin-top:36px; }
.gh-content h4 { font-size:18px; font-weight:600; margin-top:30px; }
.gh-content a { color:var(--red); text-decoration:underline; text-underline-offset:3px; }
.gh-content strong { font-weight:600; }
.gh-content ul, .gh-content ol { padding-left:26px; }
.gh-content li { margin:8px 0; }
.gh-content blockquote { font-family:'Fraunces', serif; font-size:24px; line-height:1.35; font-style:italic; margin:36px 0; padding:0 0 0 24px; border-left:4px solid var(--red); }
.gh-content blockquote p { font-size:inherit; color:inherit; }
.gh-content hr { border:none; border-top:2px solid var(--hairline); margin:44px 0; }
.gh-content img, .gh-content figure img { border-radius:2px; }
.gh-content figcaption { font-size:13px; color:var(--ink-soft); text-align:center; margin-top:10px; }
.gh-content pre { background:var(--ink); color:#fff; padding:18px 20px; border-radius:2px; overflow-x:auto; font-size:14px; }
.gh-content code { font-size:.92em; background:var(--navy-bg); padding:2px 5px; border-radius:2px; }
.gh-content pre code { background:none; padding:0; }
.gh-content table { width:100%; border-collapse:collapse; font-size:14.5px; display:block; overflow-x:auto; }
.gh-content th, .gh-content td { text-align:left; padding:10px 12px; border-bottom:2px solid var(--hairline); }
.gh-content th { font-weight:600; border-bottom:3px solid var(--ink); }
.gh-content .kg-callout-card { border-radius:2px; padding:20px 24px; }
.gh-content .kg-callout-card-grey { background:var(--navy-bg); }
.gh-content .kg-callout-card-red { background:var(--red-bg); }
.gh-content .kg-callout-card-green { background:var(--green-bg); }
.gh-content .kg-button-card .kg-btn { background:var(--red); color:#fff; border-radius:2px; font-family:'IBM Plex Sans', sans-serif; font-weight:600; }
.gh-content .kg-width-wide { max-width:1080px; margin-left:calc(50% - 50vw + 32px); width:calc(100vw - 64px); }
.gh-content .kg-width-full { width:100vw; margin-left:calc(50% - 50vw); max-width:none; }
.gh-content .kg-width-full img { width:100%; border-radius:0; }
.gh-content .kg-toggle-card { border:2px solid var(--hairline); border-radius:2px; padding:16px 20px; }
.gh-content .kg-header-card h2, .gh-content .kg-header-card h3 { font-family:'Fraunces', serif; }
.gh-content .kg-signup-card .kg-signup-card-button, .gh-content .kg-signup-card button { background:var(--red) !important; border-radius:2px; }
.article-end { padding:40px 32px 64px; }

/* Paywall (Ghost gated content) */
.paywall { position:relative; margin-top:8px; }
.paywall::before { content:""; position:absolute; top:-140px; left:0; right:0; height:140px; background:linear-gradient(to bottom, rgba(250,250,248,0), var(--paper)); pointer-events:none; }
.paywall-box { background:var(--ink); color:#fff; border-radius:4px; padding:40px 44px; text-align:center; margin:8px 0 60px; }
.paywall-box .lock { font-family:'Fraunces', serif; font-style:italic; font-size:14px; color:#cfcac0; margin:0 0 14px; }
.paywall-box h2 { font-family:'Fraunces', serif; font-size:26px; font-weight:600; margin:0 auto 14px; max-width:26ch; }
.paywall-box p { font-size:15px; color:#d9d5cc; max-width:44ch; margin:0 auto 26px; line-height:1.6; }
.paywall-box .price-line { font-family:'Fraunces', serif; font-size:20px; font-weight:600; margin:0 0 20px; color:#fff; }
.paywall-box .price-line span { font-family:'IBM Plex Sans', sans-serif; font-size:13px; font-weight:400; color:#cfcac0; }
.paywall-box .signin { font-size:13px; margin:18px 0 0; }
.paywall-box .signin a { color:#fff; }

/* Footer (same as the main site) */
footer.site { background:var(--ink); color:#cfcac0; padding:52px 0 28px; margin-top:40px; }
footer.site .wordmark { color:#fff; text-decoration:none; display:inline-block; }
.footer-top { display:flex; justify-content:space-between; align-items:flex-end; gap:40px; flex-wrap:wrap; padding-bottom:32px; border-bottom:1px solid rgba(255,255,255,0.14); }
.footer-brand p { font-size:14.5px; line-height:1.6; color:#b8b5ad; max-width:40ch; margin:10px 0 0; }
.footer-sub-label { color:#fff; font-size:14px; font-weight:500; margin:0 0 10px; }
.subscribe-row { display:flex; gap:10px; flex-wrap:wrap; margin:0; position:relative; }
.subscribe-row input { font-family:'IBM Plex Sans', sans-serif; font-size:14px; padding:11px 16px; border:none; border-radius:2px; width:230px; }
.subscribe-row .btn { border:none; font-family:'IBM Plex Sans', sans-serif; }
.form-msg { display:none; flex-basis:100%; font-size:13px; margin:4px 0 0; }
.form-success { color:#9fd6b3; }
.form-error { color:#f0a5b2; }
form[data-members-form].success .form-success { display:block; }
form[data-members-form].error .form-error { display:block; }
form[data-members-form].loading .btn { opacity:.6; pointer-events:none; }
.footer-cols { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; padding:32px 0; max-width:620px; }
.footer-h { font-family:'Fraunces', serif; font-style:italic; font-size:14px; color:#fff; margin:0 0 12px; }
.footer-col a { display:block; color:#cfcac0; text-decoration:none; font-size:14px; font-weight:500; padding:5px 0; width:fit-content; position:relative; }
.footer-col a::after { content:""; position:absolute; left:0; right:0; bottom:2px; height:2px; background:var(--red); transform:scaleX(0); transform-origin:left center; transition:transform .28s cubic-bezier(.22,.61,.36,1); }
.footer-col a:hover::after, .footer-col a:focus-visible::after { transform:scaleX(1); }
.footer-col a:hover { color:#fff; }
.footer-bottom { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:22px; border-top:1px solid rgba(255,255,255,0.14); font-size:12.5px; color:#8f8b82; }
.footer-bottom p { margin:0; }
.footer-bottom a { color:#cfcac0; text-decoration:underline; text-underline-offset:3px; }

/* Mobile */
@media (max-width: 760px) {
  .wrap, .article-wrap { padding-left:20px; padding-right:20px; }
  .header-inner { padding:18px 20px; flex-wrap:nowrap; gap:12px; position:relative; }
  .wordmark { font-size:20px; }
  .nav-toggle { display:inline-flex; flex-direction:column; justify-content:center; gap:5px; width:44px; height:44px; padding:0 10px; margin-left:auto; background:transparent; border:2px solid var(--ink); border-radius:2px; cursor:pointer; }
  .nav-toggle span { display:block; height:2px; background:var(--ink); transition:transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
  nav.main { display:none; position:absolute; left:0; right:0; top:100%; z-index:50; flex-direction:column; align-items:stretch; gap:0; background:var(--paper); border-top:3px solid var(--ink); border-bottom:3px solid var(--ink); padding:8px 0 16px; }
  nav.main.open { display:flex; }
  nav.main a:not(.btn) { font-size:17px; padding:14px 20px; border-bottom:1px solid var(--hairline); }
  nav.main a:not(.btn)::after { left:20px; right:auto; width:40px; bottom:8px; }
  nav.main a.btn { margin:16px 20px 0; text-align:center; padding:14px 22px; font-size:15px; }
  .page-head h1, .article-head h1 { font-size:32px; }
  .piece { grid-template-columns:1fr; gap:8px; }
  .piece .meta { white-space:normal; text-align:left; }
  .piece p { max-width:none; }
  .gh-content { font-size:16.5px; }
  .gh-content .kg-width-wide { margin-left:0; width:auto; }
  .gh-content .kg-width-full { width:auto; margin-left:0; }
  .paywall-box { padding:28px 20px; }
  .article-end { padding:32px 20px 48px; }
  footer.site { padding:40px 0 24px; }
  .footer-top { flex-direction:column; align-items:stretch; gap:24px; }
  .subscribe-row input { flex:1 1 180px; width:auto; min-width:0; }
  .footer-cols { grid-template-columns:1fr 1fr; }
  .footer-col a { padding:9px 0; font-size:15px; }
  .footer-bottom { flex-direction:column; gap:8px; }
}
@media (max-width: 380px) { .page-head h1, .article-head h1 { font-size:28px; } }
