@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Libre+Baskerville:wght@400;700&family=Libre+Franklin:wght@400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/*
 * Editorial layout - The 1776 Post (t1776) and Steady American (sta).
 * A quiet, text-first newspaper: black content on white, colour only for branding, large type for an
 * older readership (body 20px / 1.65, 48px touch targets). Brand values arrive as CSS custom properties
 * from parts/layout-head.php (theme/inc/brand.php). Loaded after the theme's root style.css, so the
 * shared header / footer markup is restyled here instead of being duplicated.
 */
:root {
    --ed-page: 1240px;
    --ed-text: 42rem;
    --ed-rail: 360px;
    --ed-body: "Source Serif 4", Georgia, serif;
    --ed-ink: #000;
    --ed-gap: 32px;
}

html body {
    background: var(--ed-paper, #fff);
    color: var(--ed-ink);
    font-family: var(--ed-body);
}

body a { color: var(--ed-ink); }
body :focus-visible { outline: 3px solid #1b5a7a; outline-offset: 3px; }

/* ---------- Header: centred masthead, rules, navigation row ---------- */
body .header {
    background: var(--ed-paper, #fff);
    border-bottom: 1px solid var(--ed-ink);
    box-shadow: none;
    margin: 0 !important;
    padding: 0;
    position: relative;
    height: auto;
}
body .header .container {
    max-width: var(--ed-page);
    width: auto;
    margin: 0 auto;
    padding: 22px 24px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: auto;
    min-height: 0;
    position: relative;
}
body .header .facebook-link,
body .header .clear { display: none; }
body .header .logo {
    position: static;
    transform: none;
    margin: 0 auto;
    width: auto;
    order: 2;
    flex: 1 1 auto;
    text-align: center;
    left: auto;
    top: auto;
}
body .header .logo a { display: inline-block; }
body .header .logo img.brand-logo {
    display: block;
    width: min(460px, 70vw);
    height: auto;
    margin: 0 auto;
}
body .header .left-link.main-nav { order: 1; flex: 0 0 auto; float: none; position: static; }
body .header .right-link.main-nav { order: 3; flex: 0 0 auto; float: none; position: static; display: flex; gap: 8px; align-items: center; }
body .header .menu-btn { order: 0; float: none; position: static; }
body .header .mobile-account-btn { order: 4; }
body .header .main-nav a,
body .header .right-link a.donor-faq,
body .header a.donor-login-link {
    font-family: var(--ed-ui);
    font-size: 16px;
    font-weight: 600;
    color: var(--ed-ink);
    background: transparent;
    border: 0;
    padding: 0 6px;
    text-decoration: none;
    text-underline-offset: .2em;
    line-height: 48px;
}
body .header a.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 48px;
    box-sizing: border-box;
    font-family: var(--ed-ui);
    font-size: 16px;
    font-weight: 600;
    background: var(--ed-primary);
    color: #fff;
    border-radius: 2px;
    padding: 0 18px;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
}
body .header .right-link a.header-button:hover,
body .header a.header-button:hover { background: var(--ed-primary); opacity: .9; }
body .header .menu-btn svg { fill: var(--ed-ink); width: 30px; height: 30px; }

/* Section navigation under the masthead (the theme's "mobile-nav" menu, shown on every screen). */
body .trending-bar { display: none; }
body .mobile-nav {
    display: block !important;
    background: var(--ed-paper, #fff);
    border-bottom: 1px solid var(--ed-ink);
    padding: 0;
}
body .mobile-nav .container { max-width: var(--ed-page); margin: 0 auto; padding: 0 24px; display: flex; justify-content: center; flex-wrap: wrap; }
body .mobile-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; margin: 0; padding: 0; }
body .mobile-nav ul li { display: block; list-style: none; }
body .mobile-nav a {
    font-family: var(--ed-ui);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ed-primary);
    padding: 0;
    line-height: 44px;
    border: 0;
    background: none;
}
body .mobile-nav a:hover { background: none; text-decoration: underline; }
body .header .menu-btn .dropdown { display: none !important; }
body .header .menu-btn { display: none; }

/* Page body */
body .container.page-body {
    max-width: var(--ed-page);
    width: auto;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Shared pieces ---------- */
.ed-label {
    font-family: var(--ed-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ed-paper, #fff);
    background: var(--ed-primary);
    display: inline-block;
    padding: 4px 10px;
    margin: 0 0 14px;
    border: 0;
    line-height: 1.4;
}
.ed-label a { color: inherit; text-decoration: none; }
.ed-kicker {
    display: inline-block;
    font-family: var(--ed-ui);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ed-primary) !important;
    text-decoration: none;
    margin: 0 0 8px;
}
.ed-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    font-family: var(--ed-ui);
    font-size: 18px;
    font-weight: 600;
    background: var(--ed-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 2px;
}
.ed-button:hover { opacity: .9; }
.ed-button--quiet { background: transparent; color: var(--ed-ink) !important; border: 1px solid var(--ed-ink); }

/* Story teasers */
.ed-card { display: grid; gap: 12px; align-content: start; padding: 16px 0; border-top: 1px solid var(--ed-rule); }
.ed-card:first-of-type { border-top: 0; }
.ed-card__media { display: block; overflow: hidden; background: #eee; }
.ed-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ed-card__title { font-family: var(--ed-headline); font-weight: 700; color: var(--ed-ink); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.ed-card__title a { color: var(--ed-ink); text-decoration: none; }
.ed-card__title a:hover { text-decoration: underline; text-underline-offset: .15em; }
.ed-card__excerpt { font-size: 18px; line-height: 1.55; margin: 8px 0 0; color: var(--ed-ink); }
.ed-card__date { display: block; font-family: var(--ed-ui); font-size: 14px; color: var(--ed-ink); margin-top: 8px; }

.ed-card--list { grid-template-columns: 1fr 84px; gap: 14px; align-items: start; }
.ed-card--list .ed-card__media { order: 2; aspect-ratio: 1; }
.ed-card--list .ed-card__title { font-size: 17px; line-height: 1.3; }
.ed-card--list .ed-card__date { display: none; }
.ed-front__latest .ed-card__date { display: block; }

.ed-card--lead { gap: 16px; padding-top: 0; }
.ed-card--lead .ed-card__media { aspect-ratio: 16 / 10; }
.ed-card--lead .ed-card__title { font-size: clamp(30px, 3vw, 42px); line-height: 1.12; letter-spacing: -.02em; }
.ed-card--lead .ed-card__excerpt { font-size: 20px; }

.ed-card--stack .ed-card__media { aspect-ratio: 16 / 10; }
.ed-card--stack .ed-card__title { font-size: 22px; }

.ed-card--grid .ed-card__media { aspect-ratio: 16 / 10; }
.ed-card--grid .ed-card__title { font-size: 21px; }
.ed-card--grid { border-top: 0; }

/* ---------- Home ---------- */
.ed-home { padding: 28px 0 40px; }
.ed-front {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: 0;
}
.ed-front__col { padding: 0 var(--ed-gap); }
.ed-front__col:first-child { padding-left: 0; }
.ed-front__col:last-child { padding-right: 0; }
.ed-front__lead { border-left: 1px solid var(--ed-ink); border-right: 1px solid var(--ed-ink); }
.ed-front__sections .ed-label + .ed-card { border-top: 0; }
.ed-front__sections .ed-card:last-of-type { margin-bottom: 18px; }
.ed-front__under { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; border-top: 1px solid var(--ed-rule); }
.ed-front__under .ed-card { border-top: 0; }
/* No categorised sections yet: Latest + lead only. */
.ed-front--two { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.ed-front--two .ed-front__lead { border-right: 0; padding-right: 0; }

.ed-support {
    margin: 40px 0;
    padding: 28px 32px;
    background: var(--ed-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.ed-support__title { font-family: var(--ed-headline); font-size: 26px; font-weight: 700; margin: 0; color: #fff; line-height: 1.25; }
.ed-support__sub { margin: 6px 0 0; font-size: 18px; color: #fff; }
.ed-support .ed-button { background: #fff; color: var(--ed-primary) !important; }

.ed-more { border-top: 1px solid var(--ed-ink); padding-top: 24px; }
.ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; }
.ed-more__link { text-align: center; margin: 28px 0 0; }

/* ---------- Archive ---------- */
.ed-archive { max-width: 860px; margin: 0 auto; padding: 32px 0 48px; }
.ed-archive__title { font-family: var(--ed-headline); font-size: clamp(30px, 4vw, 44px); line-height: 1.15; margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--ed-ink); }
.ed-archive__title a { text-decoration: none; }
.ed-archive__list .ed-card--stack { grid-template-columns: 260px 1fr; gap: 24px; align-items: start; padding: 24px 0; }
.ed-pagination { margin-top: 32px; font-family: var(--ed-ui); }
.ed-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 18px; text-decoration: none; }
.ed-pagination a.page-numbers:hover { text-decoration: underline; }
.ed-archive__page { font-family: var(--ed-ui); font-size: .5em; font-weight: 400; white-space: nowrap; }
.ed-pagination, .ed-pagination * { font-family: var(--ed-ui) !important; color: var(--ed-ink) !important; }
.ed-pagination .current { color: var(--ed-accent) !important; font-weight: 700; }

/* ---------- Article ---------- */
.ed-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--ed-rail);
    gap: 56px;
    align-items: start;
    padding-top: 36px;
}
.ed-article { min-width: 0; padding-bottom: 48px; }
.ed-article__header { max-width: 50rem; }
.ed-article__title {
    font-family: var(--ed-headline);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.14;
    letter-spacing: -.02em;
    color: var(--ed-ink);
    margin: 0 0 16px;
}
.ed-article__dek { font-size: 23px; line-height: 1.45; margin: 0 0 18px; color: var(--ed-ink); }
.ed-byline { font-family: var(--ed-ui); font-size: 16px; margin: 0 0 24px; padding-top: 14px; border-top: 1px solid var(--ed-rule); }
.ed-byline a { font-weight: 600; }
.ed-article__media { margin: 0 0 28px; position: relative; }
.ed-article__media img { display: block; width: 100%; height: auto; }
.ed-article__media figcaption { font-family: var(--ed-ui); font-size: 14px; margin-top: 8px; color: var(--ed-ink); }
.ed-article__body {
    max-width: var(--ed-text);
    font-family: var(--ed-body);
    font-size: 20px;
    line-height: 1.65;
    color: var(--ed-ink);
    background: #fff;
}
.ed-article__body p { margin: 0 0 1.15em; font-size: 20px; line-height: 1.65; }
.ed-article__body a { text-decoration: underline; text-underline-offset: .18em; }
.ed-article__body h2, .ed-article__body h3 { font-family: var(--ed-headline); line-height: 1.2; margin: 1.4em 0 .5em; }
.ed-article__body blockquote { border-left: 3px solid var(--ed-primary); margin: 1.2em 0; padding: .2em 0 .2em 1em; font-style: italic; }
.ed-article__body img { max-width: 100%; height: auto; }

.ed-share { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: var(--ed-text); margin: 28px 0; padding: 14px 0; border-top: 1px solid var(--ed-rule); border-bottom: 1px solid var(--ed-rule); font-family: var(--ed-ui); }
.ed-share__label { font-weight: 700; margin-right: 6px; }
.ed-share__link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; min-height: 48px; padding: 0; box-sizing: border-box; border: 0; text-decoration: none; }
.ed-share__link svg { display: block; width: 24px; height: 24px; }

.ed-author { display: flex; gap: 16px; align-items: flex-start; max-width: var(--ed-text); margin: 28px 0; font-family: var(--ed-ui); }
/* Read-more's generic reveal rule must preserve the author box's flex layout. */
.ed-article .article-body.read-more-visible > .show-content-below ~ .ed-author { display: flex !important; }
.ed-author__image img { border-radius: 50%; width: 72px; height: 72px; }
.ed-author__name { font-weight: 700; margin: 0 0 4px; }
.ed-author__bio { margin: 0; font-size: 16px; line-height: 1.5; }
.ed-comments { max-width: var(--ed-text); }

/* Full-height brand rail (desktop): stays in view while the article scrolls. */
.ed-rail {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    background: var(--ed-primary);
    color: #fff;
    box-shadow: 0 0 0 100vmax var(--ed-primary);
    clip-path: inset(0 -100vmax 0 0);
    padding: 36px 32px 40px;
}
.ed-rail__inner { max-width: 320px; }
.ed-rail__logo { display: block; margin: 0 0 16px; }
.ed-rail__logo img { display: block; width: 100%; height: auto; }
.ed-rail__tagline { font-size: 18px; line-height: 1.5; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.ed-rail__widget #donation-widget { margin: 0; }
.ed-rail .donation-widget-form { background: transparent; }

/* ---------- Footer ---------- */
body .footer { background: var(--ed-primary); color: #fff; padding: 36px 0; margin-top: 0; }
body .footer .container, body .bottom-bar .container { max-width: var(--ed-page); width: auto; margin: 0 auto; padding: 0 24px; }
body .footer .logo { float: none; width: auto; margin: 0 0 12px; }
body .footer .logo img.brand-logo { width: min(320px, 70vw); height: auto; display: block; }
body .footer .text, body .footer .text * { color: #fff; font-family: var(--ed-ui); font-size: 15px; }
body .bottom-bar { background: var(--ed-paper, #fff); border-top: 1px solid var(--ed-ink); font-family: var(--ed-ui); font-size: 14px; }
body .bottom-bar, body .bottom-bar .disclaimer { color: var(--ed-ink); }
body .bottom-bar a, body .bottom-bar .disclaimer a { color: var(--ed-ink); }
body .footer .text { float: none; width: auto; margin: 0; padding: 0; }

/* ---------- Pages ----------
 * page.php / 404.php of this layout (.ed-page) and the shared page templates that keep their own markup
 * (.page-content: no-sidebar pages, member sign-in, thank-you and contribution pages). Their content is
 * often inline-styled HTML from the editor, so the brand fonts and colours are forced here. */
.ed-page, html body .page-content {
    max-width: 46rem;
    margin: 0 auto !important;
    padding: 40px 0 64px;
    float: none;
    width: auto;
    overflow: visible;
}
html body .page-with-sidebar-container > .sidebar { display: none; }
.ed-page__title, html body .page-content .page-title {
    font-family: var(--ed-headline);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--ed-ink);
    margin: 0 0 28px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--ed-ink);
}
.ed-page__body, html body .page-content .body-text {
    font-family: var(--ed-body);
    font-size: 20px;
    line-height: 1.65;
    color: var(--ed-ink);
}
.ed-page__body p, html body .page-content .body-text p { margin: 0 0 1.15em; }
.ed-page__body a:not(.ed-button), html body .page-content .body-text a:not([style*="background"]) { color: var(--ed-ink); text-decoration: underline; text-underline-offset: .18em; }
.ed-page__body h2, .ed-page__body h3, .ed-page__body h4,
html body .page-content .body-text h1, html body .page-content .body-text h2,
html body .page-content .body-text h3, html body .page-content .body-text h4 {
    font-family: var(--ed-headline) !important;
    color: var(--ed-ink) !important;
    line-height: 1.25 !important;
    letter-spacing: 0;
}
.ed-page__body ul, .ed-page__body ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.ed-page__body li { margin: 0 0 .4em; }
html body .page-content .body-text [style*="font-family"] { font-family: var(--ed-ui) !important; }
html body .page-content .body-text [style*="color"]:not(a):not(span) { color: var(--ed-ink) !important; }
/* Boxes and buttons of the editor-made pages (FAQ, thank-you): brand colours instead of the old site's. */
html body .page-content .body-text [style*="gradient"]:not(a) { background: color-mix(in srgb, var(--ed-primary) 6%, #fff) !important; border-color: var(--ed-primary) !important; }
html body .page-content .body-text [style*="border: 2px solid"] { border-color: var(--ed-primary) !important; }
html body .page-content .body-text [style*="border-radius"] { border-radius: 2px !important; }
html body .page-content .body-text a[style*="background"] {
    background: var(--ed-accent) !important;
    color: #fff !important;
    font-family: var(--ed-ui) !important;
    box-shadow: none !important;
    border-radius: 2px !important;
    text-decoration: none !important;
    border: 0 !important;
    min-height: 48px;
}
.ed-page--404 .ed-page__latest { margin-top: 40px; }

/* Gravity Forms on pages (contact, subscribe): brand colours and large controls instead of the form theme's blue. */
html body .page-content .gform_wrapper {
    --gf-color-primary: var(--ed-primary);
    --gf-color-primary-darker: var(--ed-primary);
    --gf-ctrl-btn-bg-color-primary: var(--ed-primary);
    --gf-ctrl-border-color: #8a8f8b;
    --gf-ctrl-radius: 2px;
    font-family: var(--ed-ui);
}
html body .page-content .gform_wrapper input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),
html body .page-content .gform_wrapper textarea { font-family: var(--ed-ui) !important; font-size: 18px !important; min-height: 52px; border-radius: 2px !important; color: var(--ed-ink); }
html body .page-content .gform_wrapper .gfield_description { font-family: var(--ed-ui); font-size: 16px; color: var(--ed-ink); }
html body .page-content .gform_wrapper input[type=submit], html body .page-content .gform_wrapper .gform_button {
    background: var(--ed-primary) !important;
    color: #fff !important;
    font-family: var(--ed-ui) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    min-height: 52px;
    padding: 0 32px !important;
    border: 0 !important;
    border-radius: 2px !important;
}

/* Member sign-in (page-member-login.php ships its own <style>; these selectors are more specific). */
html body #donor-login-form { max-width: 460px; border: 1px solid var(--ed-rule); border-top: 4px solid var(--ed-primary); border-radius: 2px; background: #fff; font-family: var(--ed-ui); box-sizing: border-box; }
html body #donor-login-form h3 { font-family: var(--ed-headline); font-size: 30px; color: var(--ed-ink); border-bottom: 1px solid var(--ed-rule); padding-bottom: 14px; }
html body #donor-login-form p, html body #donor-login-form > p { font-family: var(--ed-ui); font-size: 17px; color: var(--ed-ink); }
html body #donor-login-form .form-group label { font-family: var(--ed-ui); font-size: 17px; color: var(--ed-ink); }
html body #donor-login-form .form-group input { width: 100%; box-sizing: border-box; min-height: 52px; font-family: var(--ed-ui); font-size: 18px; color: var(--ed-ink); border: 1px solid #8a8f8b; border-radius: 2px; }
html body #donor-login-form .form-group input:focus { border-color: var(--ed-primary); outline: 3px solid color-mix(in srgb, var(--ed-primary) 25%, transparent); }
html body #donor-login-form #send-magic-link { min-height: 52px; font-family: var(--ed-ui); font-size: 18px; font-weight: 600; background: var(--ed-primary); border-radius: 2px; }
html body #donor-login-form #send-magic-link:hover { background: var(--ed-primary); opacity: .9; }
html body #donor-login-form .success-msg, html body #donor-login-form .loading-msg { color: var(--ed-ink); border-left-color: var(--ed-primary); }
html body #donor-login-form .error-msg { color: var(--ed-accent); border-left-color: var(--ed-accent); }

/* Landing pages (header-landing.php / footer-landing.php): the masthead without navigation. */
body .header .container > .logo:only-of-type { margin: 0 auto; }

/* ---------- Membership page (page-membership.php; copy in the page content, classes ed-m-*) ---------- */
.ed-membership { max-width: 1040px; margin: 32px auto 64px; color: var(--ed-ink); }
.ed-membership h1, .ed-membership h2, .ed-membership h3 { font-family: var(--ed-headline); color: inherit; letter-spacing: -.01em; }
.ed-membership h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; text-align: center; margin: 0 0 28px; }
.ed-membership h3 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.ed-membership p { font-size: 20px; line-height: 1.6; margin: 0 0 1em; }
.ed-membership a:not(.ed-button) { color: inherit; text-decoration: underline; text-underline-offset: .18em; }

.ed-m-hero { background: var(--ed-primary); color: #fff; text-align: center; padding: 72px 40px 64px; }
.ed-m-eyebrow { display: inline-block; font-family: var(--ed-ui); font-size: 14px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .6); padding: 6px 16px; margin: 0 0 24px !important; }
.ed-m-hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; margin: 0 0 20px; color: #fff; }
.ed-m-lede { font-size: 22px !important; max-width: 40rem; margin: 0 auto 32px !important; }
.ed-membership .ed-m-cta { background: #fff; color: var(--ed-primary) !important; min-height: 56px; padding: 0 36px; font-size: 19px; font-weight: 700; }
.ed-m-note { font-family: var(--ed-ui); font-size: 15px !important; margin: 16px 0 0 !important; opacity: .9; }

.ed-m-section { padding: 64px 40px; }
.ed-m-story { max-width: 46rem; margin: 0 auto; padding-left: 0; padding-right: 0; }
.ed-m-pull { font-family: var(--ed-headline); font-size: 26px !important; line-height: 1.35 !important; font-style: italic; border-left: 4px solid var(--ed-primary); padding: 4px 0 4px 24px; margin: 0 0 28px !important; }

.ed-m-benefits { background: color-mix(in srgb, var(--ed-primary) 7%, #fff); }
.ed-m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin: 0 auto; }
.ed-m-card { background: #fff; border: 1px solid var(--ed-rule); border-top: 4px solid var(--ed-primary); padding: 28px 28px 20px; }
.ed-m-card p { font-size: 18px; margin: 0; }

.ed-m-steps { list-style: none; counter-reset: ed-step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 980px; margin: 0 auto; padding: 0; }
.ed-m-steps li { counter-increment: ed-step; text-align: center; }
.ed-m-steps li::before { content: counter(ed-step); display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 0 16px; border-radius: 50%; background: var(--ed-primary); color: #fff; font-family: var(--ed-ui); font-size: 22px; font-weight: 700; }
.ed-m-steps p { font-size: 18px; }

.ed-m-quote { border-top: 1px solid var(--ed-ink); border-bottom: 1px solid var(--ed-ink); margin: 0 40px; padding: 40px 0; text-align: center; }
.ed-m-quote p { font-family: var(--ed-headline); font-style: italic; font-size: clamp(26px, 3vw, 36px) !important; line-height: 1.3 !important; max-width: 46rem; margin: 0 auto !important; }

.ed-m-plans { background: var(--ed-primary); color: #fff; padding: 64px 40px; margin-top: 64px; scroll-margin-top: 24px; }
.ed-m-plans h2 { color: #fff; margin-bottom: 12px; }
.ed-m-plans__intro { text-align: center; margin: 0 auto 36px !important; max-width: 40rem; }
.ed-m-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 800px; margin: 0 auto; align-items: stretch; }
.ed-m-plan { position: relative; display: flex; flex-direction: column; background: #fff; color: var(--ed-ink); padding: 36px 32px 28px; text-align: center; border: 3px solid #fff; }
.ed-m-plan--featured { border-color: var(--ed-accent); box-shadow: 0 0 0 3px #fff; }
.ed-m-plan__badge { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); margin: 0 !important; padding: 4px 14px; background: var(--ed-accent); color: #fff; font-family: var(--ed-ui); font-size: 13px !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ed-m-plan__name { font-family: var(--ed-ui); font-size: 15px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px !important; }
.ed-m-plan__price { font-family: var(--ed-headline); font-size: 56px !important; line-height: 1 !important; font-weight: 700; margin: 0 0 16px !important; }
.ed-m-plan__price span { font-family: var(--ed-ui); font-size: 18px; font-weight: 400; margin-left: 4px; }
.ed-m-plan__text { font-size: 18px !important; flex: 1; }
.ed-m-plan p:last-child { margin: 0 !important; }
.ed-membership .ed-m-plan__button { width: 100%; min-height: 56px; font-size: 19px; font-weight: 700; box-sizing: border-box; }
.ed-m-plan--featured .ed-m-plan__button { background: var(--ed-accent); }
.ed-m-assurances { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; margin: 36px 0 0; padding: 0; font-family: var(--ed-ui); font-size: 16px; text-align: center; }
.ed-m-assurances strong { display: block; font-size: 17px; }

/* base style.css hides a[href~="/member-login/"] (an old menu rule) */
.ed-membership a[href~="/member-login/"] { display: inline; }
.ed-m-questions { max-width: 46rem; margin: 0 auto; text-align: center; padding-bottom: 0; }

@media (max-width: 760px) {
    .ed-membership { margin-top: 16px; }
    .ed-m-hero { padding: 48px 20px 40px; }
    .ed-m-section, .ed-m-plans { padding: 44px 20px; }
    .ed-m-story, .ed-m-questions { padding-left: 0; padding-right: 0; }
    .ed-m-quote { margin: 0; }
    .ed-m-grid, .ed-m-steps, .ed-m-plan-grid { grid-template-columns: 1fr; }
    .ed-m-plan-grid { gap: 32px; }
    .ed-m-lede { font-size: 20px !important; }
    .ed-m-pull { font-size: 22px !important; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
    .ed-front { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .ed-front__latest { grid-column: 1 / -1; order: 3; padding: 24px 0 0; border-top: 1px solid var(--ed-ink); margin-top: 24px; }
    .ed-front__lead { border-left: 0; padding-left: 0; }
    .ed-article-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
    .ed-front--two .ed-front__latest { grid-column: auto; order: 0; padding: 0 var(--ed-gap) 0 0; border-top: 0; margin-top: 0; }
    .ed-front--two .ed-front__lead { border-left: 1px solid var(--ed-ink); padding-left: var(--ed-gap); }
}
@media (max-width: 900px) {
    .ed-front { grid-template-columns: 1fr; }
    .ed-front__col { padding: 0; border: 0; }
    .ed-front__sections { border-top: 1px solid var(--ed-ink); margin-top: 24px; padding-top: 24px; }
    .ed-front--two { grid-template-columns: 1fr; }
    .ed-front--two .ed-front__latest { order: 3; padding: 24px 0 0; border-top: 1px solid var(--ed-ink); margin-top: 24px; }
    .ed-front--two .ed-front__lead { border: 0; padding: 0; }
    .ed-grid { grid-template-columns: 1fr 1fr; }
    .ed-article-layout { grid-template-columns: 1fr; gap: 0; }
    .ed-rail { position: static; min-height: 0; margin: 0 -24px; padding: 32px 24px; }
    .ed-rail__inner { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 640px) {
    body .header .container { padding: 14px 16px 12px; }
    body .header .logo img.brand-logo { width: min(300px, 64vw); }
    body .header .left-link.main-nav, body .header .right-link.main-nav { display: none; }
    body .container.page-body { padding: 0 16px; }
    .ed-front__under, .ed-grid { grid-template-columns: 1fr; }
    .ed-archive__list .ed-card--stack { grid-template-columns: 1fr; }
    .ed-support { padding: 24px 20px; }
    .ed-rail { margin: 0 -16px; padding: 28px 16px; }
    .ed-article__dek { font-size: 20px; }
}

/* ---------- The shared donation form (widgets/donation.php): in the article rail, and wherever the Website's
 * donation widget settings place it (e.g. "header" on comment pages). Same look everywhere. ---------- */
body .widget_donation_widget .donation-widget-form { max-width: 46rem; margin: 32px auto 0; padding: 32px; background: var(--ed-primary); border-radius: 2px; box-sizing: border-box; }
body .ed-rail .widget_donation_widget .donation-widget-form { max-width: none; margin: 0; padding: 0; background: transparent; }
@media (max-width: 640px) { body .widget_donation_widget .donation-widget-form { padding: 24px 16px; margin-top: 20px; } }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_wrapper { background: transparent !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_wrapper .gform_fields { display: block !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_wrapper .gfield { width: 100% !important; max-width: 100% !important; margin: 0 0 14px !important; padding: 0 !important; grid-column: auto !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield--type-html > div { padding: 0 !important; background: transparent !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield--type-html h2 {
    font-family: var(--ed-headline);
    font-size: 26px;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
    color: #fff;
    margin: 0 0 12px;
}
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield--type-html p, :is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield--type-html p * { font-family: var(--ed-body); font-size: 18px; line-height: 1.5; color: #fff; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio { display: flex !important; flex-wrap: wrap; gap: 8px; width: 100%; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio .gchoice { flex: 1 1 0; margin: 0 !important; position: relative; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 48px;
    margin: 0 !important;
    padding: 0 8px !important;
    background: #fff !important;
    color: var(--ed-primary) !important;
    border: 2px solid #fff !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-sizing: border-box;
}
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio input[type=radio]:checked + label { background: var(--ed-accent) !important; border-color: var(--ed-accent) !important; color: #fff !important; box-shadow: 0 0 0 2px #fff; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio input[type=radio]:focus-visible + label { outline: 3px solid #fff; outline-offset: 2px; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .ginput_container_product_price { width: 100% !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) input.ginput_amount { width: 100% !important; min-height: 48px; font-size: 18px !important; box-sizing: border-box; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_footer { display: block !important; padding: 0 !important; margin: 6px 0 0 !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 54px;
    background: #fff !important;
    color: var(--ed-primary) !important;
    border: 0 !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-transform: none !important;
}
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .donation-terms, :is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .donation-terms a { color: #fff !important; font-family: var(--ed-ui); font-size: 14px; line-height: 1.4; }

/* ---------- Banners at the top / bottom of the screen (read counter, membership: shared .pj-donation-widget) ---------- */
body .pj-donation-widget { background: var(--ed-primary) !important; color: #fff !important; font-family: var(--ed-ui); }
body .pj-donation-widget .pj-donation-msg, body .pj-donation-widget .pj-donation-msg *,
body .pj-donation-widget .pj-donation-content, body .pj-donation-widget .pj-donation-content * { font-family: var(--ed-ui) !important; color: #fff !important; }
body .pj-donation-widget .pj-donation-counter { background: #fff !important; color: var(--ed-primary) !important; font-family: var(--ed-ui) !important; }
body .pj-donation-widget .pj-donation-btn, body .pj-donation-widget a.button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    background: #fff !important;
    color: var(--ed-primary) !important;
    border: 0 !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}
body .pj-donation-widget .pj-donation-close, body .pj-donation-widget .pj-donation-close * { color: #fff !important; }

/* ---------- Review fixes: shared widgets and parts that keep the old sites' colours or fonts ---------- */
/* Amount field of every donation form (base style.css: body .donation-widget-dark ... ISFF navy, Source Sans Pro). */
body .donation-widget-dark .donation-form .ginput_container_product_price::before { color: var(--ed-primary) !important; border-right-color: var(--ed-primary) !important; font-family: var(--ed-ui) !important; }
body .donation-widget-dark .donation-form input.ginput_amount { color: var(--ed-ink) !important; font-family: var(--ed-ui) !important; }
body .donation-widget-dark .donation-form input.ginput_amount::placeholder { color: #6b6f6c !important; }
/* Below 980px the form is wrapped in div.sidebar-fake-for-donation, whose base rule wins on specificity. */
body :is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .donation-form .gfield--type-html h2 { font-family: var(--ed-headline) !important; font-size: 26px !important; line-height: 1.2 !important; }
/* The Gravity Forms framework sets the button height through a 0,4,0 rule. */
body :is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) #donation-widget .gform_footer .gform_button { min-height: 54px !important; min-block-size: 54px !important; }
body #donation-popup .donation-popup-close { font-family: var(--ed-ui); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
/* Slider variant of the donation widget: its inline colours are brand primary, i.e. invisible on the rail. */
.ed-rail .donation-slider-widget, .ed-rail .donation-slider-widget * { color: #fff !important; border-color: #fff !important; font-family: var(--ed-ui); }
.ed-rail .donation-slider-widget .donation-slider-button { background: #fff !important; color: var(--ed-primary) !important; min-height: 48px; }
/* Mobile "Will you join the fight?" box. */
body .donation-for-mobile .cta-box { background: var(--ed-primary) !important; color: #fff; border-radius: 2px; }
body .donation-for-mobile .cta-box h2, body .donation-for-mobile .cta-box h3, body .donation-for-mobile .cta-box p { font-family: var(--ed-headline); color: #fff !important; }
body .donation-for-mobile .cta-button { background: #fff !important; color: var(--ed-primary) !important; font-family: var(--ed-ui) !important; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px !important; }

/* Read previous / Read next under the article. */
.ed-article .read-next-widget { font-family: var(--ed-ui); max-width: var(--ed-text); }
.ed-article .read-next-item { background: #fff !important; border: 1px solid var(--ed-rule) !important; border-radius: 0 !important; box-shadow: none !important; }
.ed-article .read-next-arrow, .ed-article .read-next-item:hover .read-next-arrow { background: var(--ed-primary) !important; border-radius: 2px !important; }
.ed-article .read-next-label { color: var(--ed-primary) !important; font-family: var(--ed-ui) !important; }
.ed-article .read-next-title { color: var(--ed-ink) !important; font-family: var(--ed-headline) !important; }

/* Read-more button (Website settings print PJ colours inline, see inc/content.php). */
.ed-article .read-more-button-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 32px !important;
    color: #fff !important;
    background: var(--ed-primary) !important;
    border: 0 !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
    text-decoration: none !important;
}
.ed-article .read-more-button-wrap::before { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.9) 45%, #fff 100%); }
/* Subscription variant of read-more (?em_req=true) and other .form-widget forms. */
.ed-article .widget.form-widget { border-color: var(--ed-primary) !important; font-family: var(--ed-ui); border-radius: 2px; }
.ed-article .widget.form-widget :is(h2, h3, .title, .gfield_label) { color: var(--ed-ink) !important; font-family: var(--ed-headline) !important; }
.ed-article .widget.form-widget :is(input[type=submit], .gform_button) { background: var(--ed-primary) !important; color: #fff !important; font-family: var(--ed-ui) !important; border-radius: 2px !important; min-height: 48px; }

/* AI comment summary. */
.ed-article .vmp-comments-overview { font-family: var(--ed-ui); max-width: var(--ed-text); }
.ed-article .vmp-comments-overview__toggle { border-bottom-color: var(--ed-primary) !important; color: var(--ed-ink) !important; }
.ed-article .vmp-comments-overview__cta { background: var(--ed-primary) !important; color: #fff !important; border-radius: 2px !important; font-family: var(--ed-ui) !important; }

/* Polls inside articles. */
.ed-article .gpoll_wrapper { font-family: var(--ed-ui) !important; }
.ed-article .gpoll_wrapper :is(input[type=submit], .gform_button, .gpoll_button) { background: var(--ed-primary) !important; border-color: var(--ed-primary) !important; color: #fff !important; font-family: var(--ed-ui) !important; border-radius: 2px !important; }
.ed-article .gpoll_wrapper .gpoll_bar_juice { background-color: var(--ed-primary) !important; }
.ed-article .gpoll_wrapper input:checked { accent-color: var(--ed-accent); }

/* Membership: top/bottom banner buttons, sidebar banner, plans grid. */
body .pj-donation-widget :is(a.pj-subscribe-demo, a.pj-activate-demo) {
    display: inline-flex !important; align-items: center; justify-content: center; min-height: 48px;
    background: #fff !important; color: var(--ed-primary) !important; border: 0 !important; border-radius: 2px !important;
    font-family: var(--ed-ui) !important; font-weight: 700 !important; text-transform: none !important; box-shadow: none !important;
}
body .pj-widget-membership { font-family: var(--ed-ui) !important; background: var(--ed-primary) !important; border-color: var(--ed-primary) !important; border-radius: 2px !important; color: #fff !important; }
body .pj-widget-membership * { font-family: var(--ed-ui) !important; }
body .pj-widget-membership :is(h2, h3, h4, p, li, span, div) { color: #fff !important; }
body .pj-widget-membership .pj-widget-membership-badge { background: #fff !important; color: var(--ed-primary) !important; border-radius: 2px !important; }
body .pj-widget-membership a:is(.button, .pj-widget-cta, [class*="btn"]) { background: #fff !important; color: var(--ed-primary) !important; border: 0 !important; border-radius: 2px !important; min-height: 48px; }
body .membership-card { font-family: var(--ed-ui) !important; border-color: var(--ed-rule) !important; border-radius: 2px !important; }
body .membership-card--highlight { border-color: var(--ed-primary) !important; }
body .membership-card :is(.membership-card__name, h2, h3) { color: var(--ed-ink) !important; font-family: var(--ed-headline) !important; }
body .membership-card :is(.membership-card__cta, .pj-widget-cta) { background: var(--ed-primary) !important; color: #fff !important; border-radius: 2px !important; }
body .membership-card [class*="ribbon"], body .membership-card [class*="badge"] { background: var(--ed-accent) !important; color: #fff !important; }

/* Email gate. */
body .vmp-email-gate-overlay, body .vmp-email-gate-overlay * { font-family: var(--ed-ui) !important; }
body .vmp-email-gate-content { border-radius: 2px !important; }
body .vmp-gate-title { color: var(--ed-ink) !important; font-family: var(--ed-headline) !important; }
body .vmp-gate-form .gfield_label { color: var(--ed-ink) !important; }
body .vmp-gate-form :is(.gform_button, input[type=submit]) { background: var(--ed-primary) !important; color: #fff !important; border-radius: 2px !important; min-height: 52px; }

/* Member profile (page-member-profile.php ships its own <style> in PJ colours). */
body .member-profile-page, body .member-profile-page :is(input, select, textarea, button, label, p, li) { font-family: var(--ed-ui) !important; }
body .member-profile-page :is(h1, h2, h3, h4, .subscription-name, .perk-title) { color: var(--ed-ink) !important; font-family: var(--ed-headline) !important; }
body .member-profile-page .form-group label { color: var(--ed-ink) !important; }
body .member-profile-page :is(.form-container, .avatar-preview img) { border-color: var(--ed-primary) !important; border-radius: 2px !important; }
body .member-profile-page :is(.customer-portal-btn, .manage-subscription-btn, .primary-btn, .step-number) { background: var(--ed-primary) !important; border-color: var(--ed-primary) !important; color: #fff !important; border-radius: 2px !important; }
body .member-profile-page .upgrade-contribution-btn { background: var(--ed-accent) !important; border-color: var(--ed-accent) !important; color: #fff !important; border-radius: 2px !important; }

/* Thank-you pages: green ticks in editor content, the upgrade confirmation dialog. */
html body .page-content .body-text span[style*="color"] { color: var(--ed-primary) !important; }
#vmp-upgrade-modal, #vmp-upgrade-modal * { font-family: var(--ed-ui) !important; }
#vmp-upgrade-modal :is(h2, h3) { font-family: var(--ed-headline) !important; color: var(--ed-ink) !important; }
#vmp-upgrade-modal [style*="color: #1a365d"], #vmp-upgrade-modal [style*="color:#1a365d"] { color: var(--ed-ink) !important; }
#vmp-upgrade-modal button { border-radius: 2px !important; min-height: 48px; }
#vmp-upgrade-modal button[style*="gradient"], #vmp-upgrade-modal button[style*="#980000"] { background: var(--ed-primary) !important; color: #fff !important; border-color: var(--ed-primary) !important; }

/* Gravity Forms on pages: placeholders, confirmation message. */
html body .page-content .gform_wrapper { --gf-ctrl-placeholder-color: #6b6f6c; }
html body .page-content .gform_confirmation_wrapper, html body .page-content .gform_confirmation_message { color: var(--ed-ink) !important; font-family: var(--ed-ui) !important; font-size: 20px; }

/* Touch targets on phones (65+ readership). */
@media (max-width: 640px) {
    body .header .logo a, body .footer .logo a { display: inline-flex; align-items: center; min-height: 48px; }
    body .header .mobile-account-btn a { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
    body .bottom-bar .disclaimer a { display: inline-block; padding: 12px 0; }
}

/* ---------- Horizontal donation banner under the article (widgets/donation-horizontal*.php, Website setting):
 * a light card on the reading column, choices in rows, the selected one filled with the brand colour. ---------- */
.ed-article .horizontal-donation { max-width: var(--ed-text); margin: 32px 0; padding: 24px !important; background: #fff !important; border: 2px solid var(--ed-primary) !important; border-radius: 2px !important; box-shadow: none !important; box-sizing: border-box; }
.ed-article .horizontal-donation .gform_wrapper, .ed-article .horizontal-donation .gform_wrapper form { background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; max-width: none !important; }
.ed-article .horizontal-donation .horizontal-donation-header, .ed-article .horizontal-donation .horizontal-donation-title { font-family: var(--ed-ui) !important; font-size: 17px !important; font-weight: 600 !important; color: var(--ed-ink) !important; margin: 0 0 12px !important; padding: 0 !important; background: none !important; }
.ed-article .horizontal-donation .horizontal-donation-text, .ed-article .horizontal-donation .gfield--type-html > div { padding: 0 !important; background: transparent !important; }
.ed-article .horizontal-donation :is(.horizontal-donation-text, .gfield--type-html) h2 { font-family: var(--ed-headline) !important; font-size: 26px !important; line-height: 1.2 !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ed-ink) !important; margin: 0 0 10px !important; }
.ed-article .horizontal-donation :is(.horizontal-donation-text, .gfield--type-html) :is(p, p *) { font-family: var(--ed-body) !important; font-size: 18px !important; line-height: 1.5 !important; color: var(--ed-ink) !important; }
.ed-article .horizontal-donation .gform_fields { display: block !important; }
.ed-article .horizontal-donation .gfield { width: 100% !important; max-width: 100% !important; margin: 0 0 14px !important; padding: 0 !important; grid-column: auto !important; }
.ed-article .horizontal-donation .gfield_radio { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px; width: 100%; }
.ed-article .horizontal-donation .gfield_radio .gchoice { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; margin: 0 !important; position: relative; display: block !important; }
.ed-article .horizontal-donation .gfield_radio input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.ed-article .horizontal-donation .gfield_radio label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 48px;
    margin: 0 !important;
    padding: 0 8px !important;
    background: #fff !important;
    color: var(--ed-primary) !important;
    border: 2px solid var(--ed-primary) !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}
.ed-article .horizontal-donation .gfield_radio input[type=radio]:checked + label { background: var(--ed-accent) !important; border-color: var(--ed-accent) !important; color: #fff !important; }
.ed-article .horizontal-donation .gfield_radio input[type=radio]:focus-visible + label { outline: 3px solid var(--ed-primary); outline-offset: 2px; }
.ed-article .horizontal-donation .ginput_container_product_price { width: 100% !important; }
.ed-article .horizontal-donation .ginput_container_product_price::before { color: var(--ed-primary) !important; border-right-color: var(--ed-primary) !important; font-family: var(--ed-ui) !important; }
.ed-article .horizontal-donation input.ginput_amount { width: 100% !important; height: auto !important; min-height: 48px !important; font-family: var(--ed-ui) !important; font-size: 18px !important; color: var(--ed-ink) !important; border: 1px solid #8a8f8b !important; border-radius: 2px !important; box-sizing: border-box; }
.ed-article .horizontal-donation .gform_footer { display: block !important; padding: 0 !important; margin: 6px 0 0 !important; }
.ed-article .horizontal-donation .gform_footer .gform_button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 54px !important;
    min-block-size: 54px !important;
    background: var(--ed-primary) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 2px !important;
    font-family: var(--ed-ui) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-transform: none !important;
}
.ed-article .horizontal-donation :is(.donation-terms, .donation-terms a) { font-family: var(--ed-ui) !important; font-size: 14px !important; color: var(--ed-ink) !important; padding: 0 !important; margin: 10px 0 0 !important; }

/* ---------- Comment buttons in brand colour (shared parts/comments-link.php, parts/disqus.php) ---------- */
.ed-article .comments-link-widget { background: #fff; border: 1px solid var(--ed-rule); border-radius: 0; font-family: var(--ed-ui); max-width: var(--ed-text); }
.ed-article .comments-link-widget .btn-post-comment,
.ed-article .comments-link-widget .btn-post-comment:hover { background: var(--ed-primary); color: #fff; border-radius: 2px; font-family: var(--ed-ui); text-decoration: none; }
.ed-comments button.disqus-comment-count { background: var(--ed-primary) !important; border-radius: 2px !important; font-family: var(--ed-ui); min-height: 48px; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_wrapper, :is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gform_wrapper form { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio { flex-direction: row !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio .gchoice { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; display: block !important; }
/* The form ships id-level rules (#gform_submit_button_N, amount field), so these go through #donation-widget. */
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) #donation-widget .gform_footer .gform_button { background: #fff !important; color: var(--ed-primary) !important; border-radius: 2px !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) #donation-widget input.ginput_amount { height: auto !important; min-height: 48px !important; line-height: 1.2 !important; font-size: 18px !important; border-radius: 2px !important; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) #donation-widget .gfield_radio label { font-size: 17px !important; white-space: nowrap; }
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) #donation-widget .donation-terms { padding: 0 !important; margin: 10px 0 0 !important; }
body .mobile-nav, body .mobile-nav .container { margin-top: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
body .header .mobile-account-btn a { background: var(--ed-primary) !important; color: #fff !important; border-radius: 2px; }

/* ---------- Donation popup (shared widgets/donation-popup*.php) in brand colours ---------- */
body #donation-popup .donation-popup-content { background: var(--ed-primary) !important; color: #fff; border-radius: 2px; }
body #donation-popup .donation-popup-close, body #donation-popup .donation-popup-close * { color: #fff !important; }
body #donation-popup .gform_wrapper { background: transparent !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; max-width: none !important; }
body #donation-popup .gform_wrapper .gform_fields { display: block !important; }
body #donation-popup .gform_wrapper .gfield { width: 100% !important; max-width: 100% !important; margin: 0 0 14px !important; padding: 0 !important; grid-column: auto !important; }
body #donation-popup .gfield--type-html > div { padding: 0 !important; background: transparent !important; }
body #donation-popup .gfield--type-html h2 { font-family: var(--ed-headline); font-size: 28px; line-height: 1.2; text-transform: none; letter-spacing: 0; color: #fff; margin: 0 0 12px; }
body #donation-popup .gfield--type-html p, body #donation-popup .gfield--type-html p * { font-family: var(--ed-body); font-size: 18px; line-height: 1.5; color: #fff; }
body #donation-popup .gfield_radio { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px; width: 100%; }
body #donation-popup .gfield_radio .gchoice { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; display: block !important; margin: 0 !important; position: relative; }
body #donation-popup .gfield_radio input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
body #donation-popup .gfield_radio label { display: flex !important; align-items: center; justify-content: center; width: 100% !important; min-height: 48px; margin: 0 !important; padding: 0 8px !important; background: #fff !important; color: var(--ed-primary) !important; border: 2px solid #fff !important; border-radius: 2px !important; font-family: var(--ed-ui) !important; font-size: 17px !important; font-weight: 700 !important; white-space: nowrap; cursor: pointer; box-sizing: border-box; }
body #donation-popup .gfield_radio input[type=radio]:checked + label { background: var(--ed-accent) !important; border-color: var(--ed-accent) !important; color: #fff !important; box-shadow: 0 0 0 2px #fff; }
body #donation-popup .ginput_container_product_price { width: 100% !important; }
body #donation-popup input.ginput_amount { width: 100% !important; height: auto !important; min-height: 48px !important; font-size: 18px !important; border-radius: 2px !important; box-sizing: border-box; }
body #donation-popup .gform_footer { display: block !important; padding: 0 !important; margin: 6px 0 0 !important; }
body #donation-popup .gform_footer .gform_button { display: flex !important; align-items: center; justify-content: center; width: 100% !important; min-height: 54px; background: #fff !important; color: var(--ed-primary) !important; border: 0 !important; border-radius: 2px !important; font-family: var(--ed-ui) !important; font-size: 20px !important; font-weight: 700 !important; text-transform: none !important; }
body #donation-popup .donation-terms, body #donation-popup .donation-terms a { color: #fff !important; font-family: var(--ed-ui); font-size: 14px; }
/* Buttons and labels that sit inside the article body inherit its link underline. */
.ed-article :is(.btn-post-comment, .read-next-widget a, .read-more-button-link) { text-decoration: none !important; }

@media (max-width: 640px) {
    .ed-article .horizontal-donation { padding: 18px 16px !important; }
    .ed-article .horizontal-donation .gfield_radio .gchoice { flex: 1 1 calc(50% - 4px) !important; }
}

.ed-article .horizontal-donation .horizontal-donation-text strong { font-weight: 700 !important; }

.ed-article a.comments-link-widget, .ed-article a.comments-link-widget * { text-decoration: none !important; }


/* Light rail (brand value rail = light): plain page colour, dark logo; only the donation form is a brand-colour panel. */
.ed-rail--light { background: transparent; color: var(--ed-ink); min-height: 0; top: 24px; margin-right: 0; padding: 0; }
.ed-rail--light .ed-rail__tagline { color: var(--ed-ink); border-bottom-color: var(--ed-rule); }
.ed-rail--light .ed-rail__widget { background: var(--ed-primary); color: #fff; padding: 28px 24px 24px; }
@media (max-width: 900px) {
    .ed-rail--light { margin: 0; padding: 32px 0 0; border-top: 1px solid var(--ed-ink); }
    .ed-rail--light .ed-rail__widget { padding: 24px 20px 20px; }
}
.ed-rail--light .ed-rail__widget { padding-left: 20px; padding-right: 20px; }
.ed-rail--light #donation-widget .gfield_radio { gap: 6px !important; }
.ed-rail--light #donation-widget .gfield_radio label { font-size: 15px !important; padding: 0 2px !important; }

/* Amount field prefix: the base draws "$" for a 31px field; the editorial field is 48px+, so stretch and centre it. */
html body .donation-form .gfield .ginput_container_product_price::before { top: 0 !important; bottom: 0 !important; left: 0 !important; height: auto !important; width: 46px !important; display: flex !important; align-items: center; justify-content: center; line-height: 1 !important; font-family: var(--ed-ui) !important; font-size: 20px !important; font-weight: 700 !important; color: var(--ed-primary) !important; border-right: 1px solid #8a8f8b !important; box-sizing: border-box; }
html body .donation-form .gfield input.ginput_amount { padding-left: 58px !important; padding-right: 12px !important; line-height: 1.2 !important; }


/* =====================================================================================================
 * UI review fixes (desktop, phone and interaction reviews)
 * ===================================================================================================== */

/* Header, wide screens: the side links share the space so the masthead stays centred and the edges line up
   with the content. The account icon is a phone/tablet control. */
@media (min-width: 1121px) {
    body .header .left-link.main-nav, body .header .right-link.main-nav { flex: 1 1 0; min-width: 0; width: auto; background: none; padding: 0; }
    body .header .left-link.main-nav { text-align: left; }
    body .header .right-link.main-nav { justify-content: flex-end; }
    body .header .right-link.main-nav a:last-child:not(.header-button) { padding-right: 0; }
    body .header .logo { flex: 0 1 auto; min-width: 0; }
    body .header .logo img.brand-logo { max-width: 100%; }
    body .header .mobile-account-btn { display: none !important; }
}
/* Header up to 1120px (tablets and phones): logo plus the sign-in icon; the base theme's tablet header
   (grey full-width "Become A Member" bar) and the side links do not fit next to the masthead. */
@media (max-width: 1120px) {
    body .header .left-link.main-nav, body .header .right-link.main-nav { display: none !important; }
    body .header .container:has(.mobile-account-btn)::before { content: ""; flex: 0 0 48px; order: 0; }
    body .header .container:not(:has(.mobile-account-btn)) .logo { margin: 0 auto; }
    body .header .logo { order: 2; flex: 1 1 auto; min-width: 0; }
    body .header .logo img.brand-logo { width: min(360px, 60vw); max-width: 100%; }
    body .header .mobile-account-btn { display: block !important; order: 3; flex: 0 0 48px; margin: 0; }
    body .header .mobile-account-btn a { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
}
/* Header links: no hover styles from the old sites (red/grey pills that lift). */
body .header .right-link a:is(.donor-login-link, .donor-faq):hover,
body .header a.donor-login-link:hover { background: transparent !important; color: var(--ed-ink) !important; transform: none !important; box-shadow: none !important; text-decoration: underline; text-decoration-thickness: 2px; }
body .header a.header-button:hover { transform: none !important; box-shadow: none !important; }

/* Front page, 901-1100px: two-column front keeps Latest narrow and the lead wide. */
@media (min-width: 901px) and (max-width: 1100px) {
    .ed-front--two { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}

/* Article rail (dark, full height): never taller than the screen. */
.ed-rail:not(.ed-rail--light) { max-height: 100vh; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
.ed-rail--light { max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 900px) {
    .ed-rail:not(.ed-rail--light), .ed-rail--light { max-height: none; overflow: visible; }
    /* On phones the dark rail sits right above the footer, which repeats the logo and tagline. */
    .ed-rail:not(.ed-rail--light) .ed-rail__logo, .ed-rail:not(.ed-rail--light) .ed-rail__tagline { display: none; }
}

/* Article body on the warm page colour (sta), and the read-more fade into it. */
.ed-article__body { background: var(--ed-paper, #fff); }
.ed-article .read-more-button-wrap::before { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--ed-paper, #fff) 90%, transparent) 45%, var(--ed-paper, #fff) 100%) !important; }
@media (max-width: 640px) {
    .ed-article .read-more-button-link { padding: 12px 20px !important; line-height: 1.3; text-align: center; min-height: 56px; }
}

/* "No sidebar" pages: one left edge for the title, text and forms; no second rule under the title. */
html body .page-content .page-title,
html body .page-content .body-text > *:not([class*="responsive-ad"]) { max-width: none; margin-left: 0; margin-right: 0; }
html body .page-content .body-text > hr:first-child, html body .page-content .body-text > p:empty:first-child { display: none; }
/* FAQ page content: no extra top space or side inset. */
html body .page-content #pj-faq-wrapper { margin-top: 0 !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; max-width: none !important; }
html body .page-content #pj-faq-wrapper .pj-faq-item { background: #fff !important; border-color: var(--ed-rule) !important; border-radius: 2px !important; }
/* Thank-you pages on narrow phones: one column, less nesting padding. */
@media (max-width: 480px) {
    html body .page-content .body-text [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    html body .page-content .body-text div[style*="padding"] { padding-left: 16px !important; padding-right: 16px !important; }
}
/* Page forms (contact, subscribe): 52px submit buttons. */
html body .page-content .gform_wrapper .gform_footer :is(.gform_button, input[type=submit]) { min-height: 52px !important; min-block-size: 52px !important; height: auto !important; font-size: 18px !important; }
html body .page-content .gform_wrapper .gfield_description { margin-top: 8px !important; }

/* Archives: pagination as one style everywhere (paginate_links), centred, 48px targets; empty search. */
.ed-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.ed-pagination .page-numbers { min-width: 48px; min-height: 48px; box-sizing: border-box; }
.ed-pagination a.page-numbers:not(.prev):not(.next) { border: 1px solid var(--ed-rule); }
.ed-pagination .page-numbers.current { background: var(--ed-primary); color: #fff !important; }
.ed-archive__empty { font-size: 20px; margin: 0 0 20px; }
.ed-search { display: flex; gap: 8px; flex-wrap: wrap; max-width: 560px; }
.ed-search__input { flex: 1 1 240px; min-height: 52px; padding: 0 14px; font-family: var(--ed-ui); font-size: 18px; border: 1px solid #8a8f8b; border-radius: 2px; box-sizing: border-box; }
.ed-search .ed-button { min-height: 52px; border: 0; cursor: pointer; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Comment page: the donation panel, title and comments share one column. */
.ed-archive .ed-comments { max-width: none; }
body > .widget_donation_widget .donation-widget-form { max-width: 860px; }
@media (max-width: 900px) {
    body > .widget_donation_widget .donation-widget-form { margin: 20px 16px 0; }
}

/* Comments: buttons in the UI font with hover feedback; the comment box in the flat style. */
.ed-comments button.disqus-comment-count { font-family: var(--ed-ui) !important; }
.ed-comments button.disqus-comment-count:hover, .ed-article a.comments-link-widget:hover .btn-post-comment { opacity: .9; }
.ed-article a.comments-link-widget:hover .comments-count { text-decoration: underline !important; }
#disqus_thread [style*="border-radius"] { border-radius: 2px !important; }
#disqus_thread [style*="border"] { border-color: var(--ed-rule) !important; }
#disqus_thread .placeholder { font-family: var(--ed-ui) !important; font-size: 18px !important; }

/* Donation forms. Terms line in one size; popup gets bottom padding. */
body :is(.ed-rail, .widget_donation_widget, #donation-popup) .donation-terms,
body :is(.ed-rail, .widget_donation_widget, #donation-popup) .donation-terms a { font-size: 14px !important; line-height: 1.4 !important; }
body #donation-popup .donation-popup-content { padding-bottom: 20px !important; }
/* Selected choice: the white ring goes inside, so it does not stick out past the other controls. */
:is(.ed-rail, .widget_donation_widget:not(.horizontal-donation)) .gfield_radio input[type=radio]:checked + label,
body #donation-popup .gfield_radio input[type=radio]:checked + label { box-shadow: inset 0 0 0 2px #fff !important; }
/* "Custom" gets a little more room than the amounts in the narrow forms. */
:is(.ed-rail, #donation-popup) .gfield_radio .gchoice:last-child { flex: 1.45 1 0 !important; }
/* Under-article banner: text flush with the rest of the box; two choices per row on phones. */
.ed-article .horizontal-donation .horizontal-donation-text > div { padding: 0 !important; }
.ed-article .horizontal-donation .gfield_radio { gap: 8px !important; }

/* Donation popup: on short screens the dialog scrolls instead of being cut off; the page behind stays put. */
body #donation-popup { display: flex; overflow-y: auto; padding: 16px 10px; box-sizing: border-box; }
body #donation-popup .donation-popup-content { position: relative !important; top: auto !important; left: auto !important; transform: none !important; margin: auto !important; }
body.donation-popup-open { overflow: hidden; }
body #donation-popup .gfield_radio input[type=radio]:focus-visible + label { outline: 3px solid #fff; outline-offset: 3px; }

/* Read-counter banner: leaves room for itself, a visible edge on dark footers, a 48px close button. */
body:has(#pj-donation-widget.pj-donation-top) { padding-top: 86px; }
body:has(#pj-donation-widget.pj-donation-bottom) { padding-bottom: 160px; }
body .pj-donation-widget { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 0 14px rgba(0, 0, 0, .25); }
body .pj-donation-widget .pj-donation-close { display: inline-flex !important; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; font-size: 26px; opacity: 1; }

/* Keyboard focus on dark surfaces: white ring. */
:is(.ed-rail:not(.ed-rail--light), .ed-rail__widget, .ed-support, .footer, .pj-donation-widget, #donation-popup, .ed-m-hero, .ed-m-plans, .widget_donation_widget .donation-widget-form) :focus-visible { outline: 3px solid #fff !important; outline-offset: 3px; }
:is(.ed-rail, .widget_donation_widget, #donation-popup) .gform_wrapper :is(input, button):focus-visible { outline: 3px solid #fff !important; outline-offset: 2px; box-shadow: none !important; }

/* Footer: centred logo when the base centres the tagline (979px and below). */
@media (max-width: 979px) {
    body .footer .logo { margin: 0 auto 12px; max-width: none; text-align: center; }
    body .footer .logo img.brand-logo { margin: 0 auto; }
}
/* Bottom bar: footer menu links on the light bar (the base makes them white); a wrapping row. */
body .bottom-bar .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; }
body .bottom-bar .disclaimer, body .bottom-bar .footer-menu { float: none; }
body .bottom-bar .footer-menu ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
body .bottom-bar .footer-menu li { margin: 0; }
body .bottom-bar .footer-menu li a { color: var(--ed-ink); display: inline-block; padding: 12px 0; }
body .bottom-bar .footer-menu li a:hover { text-decoration: underline; }
/* Short pages: the footer sits at the bottom of the screen. */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > .container.page-body { flex: 1 0 auto; width: 100%; box-sizing: border-box; }

/* Popup: the close button gets its own row above the text. */
body #donation-popup .donation-popup-content { padding-top: 52px !important; }


/* Donation widget setting "hide" for phones (mobile_comment_page / mobile_post_page): the shared script has no
   such mode, so it is honoured here, at the script's own phone width (768px). */
@media (max-width: 768px) {
    body #donation-widget[data-is-comment="1"][data-mobile-comment="hide"],
    body #donation-widget[data-is-comment="0"][data-mobile-post="hide"] { display: none !important; }
}
/* No rail background extension where the rail is not a dark column. */
.ed-rail--light { box-shadow: none; clip-path: none; }
@media (max-width: 900px) { .ed-rail { box-shadow: none; clip-path: none; } }

/* Text links in page content: the base gives them a red PJ border-bottom (and red hover). Plain underlined text links.
   Links styled as buttons (inline background) and .ed-button keep their own look. */
html body .page-content .body-text a:not([style*="background"]):not(.ed-button) { color: var(--ed-ink) !important; border-bottom: 0 !important; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: .18em; }
html body .page-content .body-text a:not([style*="background"]):not(.ed-button):hover { color: var(--ed-ink) !important; text-decoration-thickness: 2px !important; }

/* The base hides every a[href~="/member-login/"] (an old rule); in content they are ordinary text links. */
:is(.page-content .body-text, .ed-page__body, .ed-article__body, .ed-membership) a[href~="/member-login/"] { display: inline !important; }

@media (max-width: 979px) {
    body .bottom-bar .container { justify-content: center; text-align: center; }
    body .bottom-bar .footer-menu ul { justify-content: center; }
}


/* Website layout changes geometry only; platform colors/type remain identical. */
body .ed-article-layout--narrow {
    display: block;
    max-width: var(--ed-text);
    margin: 0 auto;
}
body .ed-article-layout--wide-boxed .ed-rail {
    position: static;
    align-self: start;
    min-height: 0;
    max-height: none;
    overflow: visible;
}
body .ed-article-layout--wide-boxed .ed-rail__inner { position: static; top: auto; }
@media (min-width: 901px) {
    body .ed-article-layout--fixed-sidebar .ed-rail {
        position: relative;
        top: auto;
        align-self: stretch;
        max-height: none;
        overflow: visible;
    }
    body .ed-article-layout--fixed-sidebar .ed-rail__inner {
        position: sticky;
        top: var(--ed-rail-top, 24px);
    }
}
