/* Grove newsletter theme v2.
   Grove brand per the Earth Onward brand book: maroon #800000 + cream #F0E6C2, Manrope.
   Rule: text on cream is ink; maroon is a fill (with white text) or a link/accent on cream.
   Borrowed moves: Tangle (top bar, card rules, mono labels, sticky signup, giant footer mark),
   Hearing Things (wordmark masthead, repeating divider, framed lead image). */

:root {
    color-scheme: light;
    --maroon: #800000;
    --maroon-dark: #5E0000;
    --cream: #FFFFFF;
    --cream-light: #F8F6F2;
    --ink: #1B1B1B;
    --ink-soft: #4A4434;
    --line: #E6E0D6;
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    --ghost-accent-color: #800000;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--cream); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 1rem 1.5rem; }
h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); font-family: var(--font); font-weight: 800; letter-spacing: -.02em; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Labels (mono, Tangle) ---------- */
.label { font-family: var(--mono); font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 .6rem; }
.label a { color: inherit; }
.label--tag { color: var(--maroon); }
.meta-sep { opacity: .5; margin: 0 .3rem; }

/* ---------- Divider: a row of maroon dots, from the logo's tree (Hearing Things' wave) ---------- */
.dots { height: 10px; margin: 2.75rem 0; background-image: radial-gradient(circle, var(--maroon) 3.2px, transparent 3.7px); background-size: 18px 10px; background-repeat: repeat-x; background-position: center; }
.dots--on-maroon { margin: 0 0 2.5rem; background-image: radial-gradient(circle, rgba(240,230,194,.55) 3.2px, transparent 3.7px); }

/* ---------- Top bar (Tangle) ---------- */
.topbar { background: var(--maroon); text-align: center; font-size: .85rem; font-weight: 600; }
.topbar a { display: block; color: #fff; padding: .5rem 1rem; }
.topbar a:hover { text-decoration: none; }
.topbar-sep { opacity: .5; margin: 0 .5rem; }
.topbar-cta { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { background: var(--cream); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; padding-top: .7rem; padding-bottom: .7rem; }
.header-brand { display: flex; align-items: center; flex-shrink: 0; }
.header-brand img.brand-logo { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: .15rem; margin-left: 1.75rem; flex: 1; }
.nav-links a { color: var(--ink); font-size: .92rem; font-weight: 600; padding: .35rem .65rem; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--maroon); text-decoration: none; }
.nav-links a.is-current { color: var(--maroon); border-bottom-color: var(--maroon); }
.nav-search { display: flex; align-items: center; margin-left: auto; background: var(--cream-light); border: 1px solid var(--line); border-radius: 999px; padding: 0 .5rem; }
.nav-search input { border: 0; background: transparent; padding: .35rem .5rem; font: inherit; font-size: .85rem; width: 190px; outline: none; color: var(--ink); }
.nav-search input::placeholder { color: #9a948a; }
.nav-search button { background: transparent; border: 0; padding: .2rem .4rem; cursor: pointer; color: var(--ink-soft); display: flex; }
.nav-search:focus-within { box-shadow: 0 0 0 2px var(--maroon); }
.header-members { margin-left: .9rem; display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.header-signin { color: var(--ink); font-size: .88rem; font-weight: 600; }
@media (max-width: 900px) { .nav-search { display: none; } }
@media (max-width: 680px) {
    .nav-links { display: none; }
    .header-members { margin-left: auto; }
    .header-signin { display: none; }
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-outline { display: inline-block; padding: .6rem 1.2rem; border-radius: 999px; font-size: .9rem; font-weight: 700; font-family: inherit; line-height: 1.3; cursor: pointer; text-align: center; }
.btn-primary { background: var(--maroon); color: #fff; border: 2px solid var(--maroon); }
.btn-primary:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
.btn-sm { padding: .4rem .95rem; font-size: .84rem; }

/* ---------- Home: masthead (Hearing Things) ---------- */
.archive-page { padding-top: 2rem; }
.masthead { padding: .75rem 0 1.5rem; border-bottom: 2px solid var(--ink); margin-bottom: 2.25rem; }
.masthead__mark { display: block; width: 100%; height: auto; }
.masthead__sub { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; }
.masthead__sub .label { margin: 0; color: var(--ink); }

.nl-hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem; align-items: center; }
@media (max-width: 800px) { .nl-hero { grid-template-columns: 1fr; gap: 1.5rem; } }
.nl-hero__title { margin: 0 0 .9rem; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.nl-hero__lede { margin: 0; font-size: 1.08rem; color: var(--ink-soft); line-height: 1.6; max-width: 36rem; }
.section-head { margin-bottom: 1.1rem; }

/* ---------- Maroon frame (Hearing Things) ---------- */
.frame { display: block; background: var(--maroon); padding: 12px; }
.frame img { display: block; width: 100%; }

/* ---------- Lead issue ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.25rem; align-items: center; margin-bottom: 3rem; }
@media (max-width: 800px) { .lead { grid-template-columns: 1fr; gap: 1.25rem; } }
.lead__media { aspect-ratio: 16/10; overflow: hidden; }
.lead__media img { height: 100%; object-fit: cover; }
.lead__title { margin: 0 0 .8rem; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--maroon); text-decoration: none; }
.lead__excerpt { margin: 0 0 1.3rem; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Issue cards (Tangle rule on top) ---------- */
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.ep-card { display: flex; flex-direction: column; background: var(--cream-light); border-top: 5px solid var(--maroon); transition: transform .15s, box-shadow .15s; }
.ep-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(80,0,0,.12); }
.ep-card__thumb { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--maroon); }
.ep-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-card__fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.ep-card__fallback img { width: 55% !important; height: auto !important; object-fit: contain !important; }
.ep-card__body { padding: .9rem 1rem 1.15rem; flex: 1; display: flex; flex-direction: column; }
.ep-card__body .label { margin-bottom: .45rem; }
.ep-card__title { margin: 0 0 .35rem; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.01em; }
.ep-card__title a { color: var(--ink); }
.ep-card__title a:hover { color: var(--maroon); text-decoration: none; }
.ep-card__blurb { margin: 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.5; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2.5rem 0 0; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.pagination a { font-weight: 500; }

/* ---------- Subscribe card ---------- */
.cta-card { background: var(--maroon); color: #fff; padding: 1.75rem 2rem; display: flex; flex-direction: column; gap: .5rem; }
.cta-card .label { color: rgba(255,255,255,.75); }
.cta-heading { margin: 0 0 .5rem; font-size: 1.3rem; font-weight: 800; color: #fff; line-height: 1.25; }
.cta-card .btn-primary { background: #fff; color: var(--maroon); border-color: #fff; }
.cta-card .btn-primary:hover { background: var(--cream); border-color: var(--cream); color: var(--maroon); }
.cta-card .btn-outline { color: #fff; border-color: #fff; align-self: flex-start; }
.cta-card .btn-outline:hover { background: #fff; color: var(--maroon); }
.subscribe-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.subscribe-form input, .sticky-signup__form input { flex: 1 1 200px; min-width: 0; padding: .6rem 1rem; border: 2px solid transparent; border-radius: 999px; font: inherit; font-size: .92rem; background: #fff; color: var(--ink); }
.subscribe-form input:focus, .sticky-signup__form input:focus { outline: none; border-color: var(--ink); }
.form-msg { display: none; flex-basis: 100%; margin: .25rem 0 0; font-size: .85rem; }
.success .form-msg--success, .error .form-msg--error { display: block; }
.loading button { opacity: .6; pointer-events: none; }
.issue-page .subscribe-card { margin: 3rem 0 0; }

/* ---------- Issue page ---------- */
.issue-page { max-width: 760px; padding-top: 2.5rem; padding-bottom: 1rem; }
.issue-title { margin: 0 0 .7rem; font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.08; }
.issue-meta { margin: 0 0 2rem; font-size: .88rem; color: var(--ink-soft); font-weight: 500; }
.issue-feature { margin: 0 0 2.5rem; }
.issue-feature figcaption { padding-top: .6rem; font-size: .78rem; color: rgba(255,255,255,.8); text-align: center; }
.issue-feature figcaption a { color: #fff; text-decoration: underline; }

.gh-content { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.gh-content > * { margin-top: 0; margin-bottom: 1.2rem; }
.gh-content h2 { font-size: 1.6rem; margin: 2.5rem 0 .8rem; }
.gh-content h3 { font-size: 1.2rem; margin: 1.9rem 0 .5rem; }
.gh-content a { color: var(--maroon); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.gh-content a:hover { background: var(--maroon); color: #fff; text-decoration: none; }
.gh-content strong { font-weight: 800; }
.gh-content ul, .gh-content ol { padding-left: 1.5rem; }
.gh-content li { margin-bottom: .45rem; }
.gh-content li::marker { color: var(--maroon); }
.gh-content blockquote { border-left: 5px solid var(--maroon); margin: 2rem 0; padding: .35rem 0 .35rem 1.25rem; font-size: 1.22rem; font-weight: 700; line-height: 1.45; color: var(--ink); }
.gh-content blockquote.kg-blockquote-alt { border: 0; text-align: center; font-size: 1.45rem; padding: 0; }
.gh-content hr { border: 0; height: 10px; margin: 2.75rem 0; background-image: radial-gradient(circle, var(--maroon) 3.2px, transparent 3.7px); background-size: 18px 10px; background-repeat: repeat-x; background-position: center; }
.gh-content figure { margin: 2rem 0; }
.gh-content .kg-image-card img { display: block; }
.gh-content .kg-image-card a:hover { background: none; }
.gh-content .kg-image-card a:hover img { opacity: .92; }
.gh-content figcaption { margin-top: .5rem; font-size: .8rem; color: var(--ink-soft); text-align: center; }
.gh-content .kg-width-wide { position: relative; width: min(1080px, 100vw - 3rem); left: 50%; transform: translateX(-50%); max-width: none; }
.gh-content .kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); max-width: none; }
.gh-content .kg-button-card a.kg-btn { text-decoration: none; border-radius: 999px; }
.gh-content .kg-bookmark-card a { text-decoration: none; }
.gh-content .kg-bookmark-card a:hover { background: none; color: inherit; }
.gh-content .kg-bookmark-container { background: var(--cream-light); border: 0; border-top: 5px solid var(--maroon); border-radius: 0; }
.gh-content .kg-callout-card { border-radius: 0; }
.gh-content .kg-embed-card iframe { max-width: 100%; }

.related { max-width: 1120px; padding-top: 0; }
.error-page { padding-top: 4rem; padding-bottom: 2rem; }
.error-page .btn-primary { margin-right: .5rem; }

/* ---------- Footer (Tangle: solid brand color, giant wordmark) ---------- */
footer.site-footer { margin-top: 5rem; background: var(--maroon); color: rgba(255,255,255,.82); font-size: .9rem; padding: 2.5rem 0 1.5rem; }
footer.site-footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-heading { color: #fff; font-family: var(--mono); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .9rem; }
.footer-brand p { margin: 0 0 .5rem; line-height: 1.55; max-width: 22rem; }
.footer-hierarchy { font-size: .8rem; opacity: .75; }
.footer-hierarchy a { text-decoration: underline; text-underline-offset: 2px; }
.footer-links ul, .footer-listen ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer-links a, .footer-listen a { font-weight: 600; }
.footer-wordmark { display: block; width: 100%; height: auto; margin: 0 0 1.75rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.1rem; }
.footer-bottom p { margin: 0; font-size: .76rem; opacity: .7; max-width: 44rem; }

/* ---------- Sticky signup bar (Tangle) ---------- */
body:has(.sticky-signup:not([hidden])) { padding-bottom: 64px; }
.sticky-signup { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--cream-light); border-top: 2px solid var(--ink); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.sticky-signup[hidden] { display: none; }
.sticky-signup .container { display: flex; align-items: center; gap: 1.25rem; padding-top: .65rem; padding-bottom: .65rem; }
.sticky-signup__label { margin: 0; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.sticky-signup__form { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; max-width: 520px; margin-left: auto; }
.sticky-signup__form input { border-color: var(--line); }
.sticky-signup__form .form-msg { font-size: .8rem; }
.sticky-signup__close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 .25rem; }
@media (max-width: 680px) { .sticky-signup__label { display: none; } .sticky-signup__form { margin-left: 0; } }
