/* ==========================================================================
   Good News Pilipinas — component styles
   Editorial system: black / white / grey, green used only as an accent.
   Design tokens live in style.css :root (--gn-*).
   ========================================================================== */

/* Base --------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--gn-serif);
    font-weight: 700;
    letter-spacing: -0.012em;
    margin: 0;
    line-height: 1.15;
    overflow-wrap: break-word;
}
.side-item__title,
.related-card__title,
.card__title,
.ranked__title,
.lead-main__title,
.lead-rail__title,
.cat-lead__title,
.cat-list__title { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--gn-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Shared wrapper — every container is the same width and edge as the article. */
.gn-wrap {
    max-width: var(--gn-max-width);
    margin: 0 auto;
    padding: 0;
}

/* Inner content grid (used by single/archive/page templates). No horizontal
   padding so the article body sits flush at the same 1140px as the header. */
.site-content__inner {
    max-width: var(--gn-max-width);
    margin: 0 auto;
    padding: 2rem 0 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
}

/* Keep content off the screen edge on narrower windows only. */
@media (max-width: 1180px) {
    .gn-wrap,
    .site-content__inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 900px) {
    .site-content__inner {
        grid-template-columns: 1fr;
    }
}

.site-main--full-width {
    grid-column: 1 / -1;
}

/* ==========================================================================
   1. UTILITY BAR
   ========================================================================== */
.utility {
    border-bottom: 1px solid var(--gn-border);
    font-size: 12px;
    color: var(--gn-muted);
    background: var(--gn-bg);
}
.utility__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 38px;
}
.utility__date { letter-spacing: .02em; }
.utility__links { display: flex; gap: 20px; align-items: center; }
.utility__links a:hover { color: var(--gn-dark); }
.utility__cta { color: var(--gn-primary); font-weight: 700; }

/* ==========================================================================
   2. MASTHEAD
   ========================================================================== */
.site-header {
    border-bottom: 1px solid var(--gn-border);
    background: var(--gn-bg);
}
.masthead__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 22px;
}
.masthead__left { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--gn-border); border-radius: 50%;
    background: none; cursor: pointer;
    color: var(--gn-ink-2);
    transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--gn-dark); color: var(--gn-dark); }
.icon-btn[hidden] { display: none; }

/* Push bell: filled green when the visitor is subscribed. */
.js-push-toggle.is-subscribed {
    border-color: var(--gn-primary);
    background: var(--gn-primary);
    color: #fff;
}
.js-push-toggle.is-subscribed:hover { background: var(--gn-primary-ink); border-color: var(--gn-primary-ink); color: #fff; }

/* Brand */
.brand { text-align: center; line-height: 1; }
.brand__link { display: inline-block; }
.brand__name {
    font-family: var(--gn-serif);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gn-dark);
    white-space: nowrap;
}
.brand__name .accent { color: var(--gn-primary); }
.brand__tag {
    display: block;
    margin-top: 7px;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gn-muted);
}
/* When a custom logo image is used instead of the text brand. */
.custom-logo-link { display: inline-block; }
.custom-logo { height: auto; }

.masthead__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 2px;
    font-size: 13px; font-weight: 700; letter-spacing: .01em;
    border: 1px solid var(--gn-dark);
    background: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn--solid { background: var(--gn-dark); color: #fff; }
.btn--solid:hover { background: var(--gn-primary); border-color: var(--gn-primary); }
.btn--ghost { color: var(--gn-dark); }
.btn--ghost:hover { background: var(--gn-dark); color: #fff; }

/* ==========================================================================
   Search overlay (toggled) — translucent white panel over the page
   ========================================================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(6px);
    -webkit-backdrop-filter: saturate(180%) blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 15vh 24px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.search-overlay__inner {
    width: min(680px, 100%);
    transform: translateY(-8px);
    transition: transform .25s ease;
}
.search-overlay.is-open .search-overlay__inner { transform: translateY(0); }

.search-overlay .search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--gn-dark);
}
.search-overlay .search-field {
    flex: 1;
    border: 0;
    background: none;
    font-family: var(--gn-serif);
    font-size: clamp(22px, 4vw, 30px);
    padding: 10px 2px;
    color: var(--gn-dark);
    outline: none;
}
.search-overlay .search-field::placeholder { color: var(--gn-muted-2); }
.search-overlay .search-submit {
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gn-primary);
    padding: 8px 6px;
}
.search-overlay .search-submit:hover { color: var(--gn-primary-ink); }
.search-overlay__hint {
    margin: 14px 2px 0;
    font-size: 12.5px;
    color: var(--gn-muted);
}
.search-overlay__close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gn-border-2);
    border-radius: 50%;
    background: #fff;
    color: var(--gn-dark);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.search-overlay__close:hover { background: var(--gn-dark); color: #fff; }

/* Prevent the page scrolling while the overlay is open. */
body.search-open { overflow: hidden; }

/* ==========================================================================
   3. STICKY NAV
   ========================================================================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--gn-border);
}
.admin-bar .nav { top: 32px; }

.nav__inner {
    display: flex;
    align-items: center;
    min-height: 48px;
    overflow: visible; /* let dropdowns escape on desktop */
    scrollbar-width: none;
}
.nav__inner::-webkit-scrollbar { display: none; }

@media (max-width: 760px) {
    /* Scroll the top-level items horizontally on small screens. */
    .nav__inner { overflow-x: auto; overflow-y: visible; }
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 0;
}
.nav__menu li { flex: none; }
.nav__menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--gn-ink-2);
    white-space: nowrap;
    transition: color .15s;
}
.nav__menu a:hover { color: var(--gn-dark); }
.nav__menu a::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 0;
    height: 3px;
    background: var(--gn-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
}
.nav__menu a:hover::after,
.nav__menu .current-menu-item > a::after,
.nav__menu .current_page_item > a::after {
    transform: scaleX(1);
}
.nav__menu .current-menu-item > a,
.nav__menu .current_page_item > a { color: var(--gn-dark); }

/* --- Dropdown submenus --- */
.nav__menu .menu-item-has-children { position: relative; display: inline-flex; align-items: center; }

.nav__sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 48px;
    margin-left: -8px;
    border: 0;
    background: none;
    color: var(--gn-ink-2);
    cursor: pointer;
}
.nav__sub-toggle svg { transition: transform .2s ease; }
.menu-item-has-children.is-open > .nav__sub-toggle svg { transform: rotate(180deg); }

.nav__menu .sub-menu {
    position: absolute;
    top: 100%;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--gn-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    display: none;
    z-index: 130;
}
.nav__menu .menu-item-has-children:hover > .sub-menu,
.nav__menu .menu-item-has-children:focus-within > .sub-menu,
.nav__menu .menu-item-has-children.is-open > .sub-menu { display: block; }

.nav__menu .sub-menu li { display: block; width: 100%; }
.nav__menu .sub-menu a {
    height: auto;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    color: var(--gn-ink-2);
}
.nav__menu .sub-menu a::after { content: none; }
.nav__menu .sub-menu a:hover { color: var(--gn-primary); background: var(--gn-bg-alt); }

/* On small screens the nav scrolls horizontally, so dropdowns are shown as a
   fixed, full-width panel (JS sets the top offset) to avoid clipping. */
@media (max-width: 760px) {
    .nav__menu .sub-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: 48px; /* overridden by JS to the nav's bottom edge */
        min-width: 0;
        max-height: 70vh;
        overflow-y: auto;
        border-left: 0;
        border-right: 0;
    }
    .nav__menu .sub-menu a { padding: 14px 18px; border-bottom: 1px solid var(--gn-border); }
    .nav__menu .menu-item-has-children:hover > .sub-menu,
    .nav__menu .menu-item-has-children:focus-within > .sub-menu { display: none; }
    .nav__menu .menu-item-has-children.is-open > .sub-menu { display: block; }
}

/* ==========================================================================
   4. TICKER
   ========================================================================== */
.ticker {
    border-bottom: 1px solid var(--gn-border);
    background: var(--gn-bg-alt);
}
.ticker__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 44px;
    overflow: hidden;
}
.ticker__label {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--gn-live);
    flex: none;
}
.dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gn-live);
    animation: gn-pulse 1.8s ease-in-out infinite;
}
@keyframes gn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.ticker__items {
    display: flex;
    align-items: center;
    min-width: 0;
    font-size: 14px;
}
.ticker__items li {
    display: flex; align-items: center; gap: 14px;
    color: var(--gn-ink-2); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.ticker__items li + li::before {
    content: "";
    width: 1px; height: 14px;
    background: var(--gn-border-2);
    flex: none;
}
.ticker__items a:hover { color: var(--gn-primary); text-decoration: underline; text-underline-offset: 3px; }
/* Only ever show a single headline in the ticker. */
.ticker__items li:nth-child(n + 2) { display: none; }

/* ==========================================================================
   SHARED — kickers, meta, thumbnails, section heads
   ========================================================================== */
.kicker {
    display: inline-block;
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--gn-primary);
    margin-bottom: 9px;
}
.kicker:hover { color: var(--gn-primary-ink); }

.meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 12.5px; color: var(--gn-muted);
}
.meta > span + span::before,
.meta > .time::before {
    content: "·";
    margin-right: 8px;
    color: var(--gn-muted-2);
}
.meta > :first-child::before { content: none; }
.meta .author { font-weight: 600; color: var(--gn-ink-2); }

.time {
    display: inline-flex; align-items: center;
    font-size: 12.5px; font-weight: 600; color: var(--gn-muted);
    font-variant-numeric: tabular-nums;
}
.time--fresh { color: var(--gn-live); }

/* Thumbnails */
.thumb-link {
    display: block;
    overflow: hidden;
    background: var(--gn-bg-alt);
    border-radius: 2px;
}
.thumb-link img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.2, .6, .2, 1);
}
.thumb-link:hover img { transform: scale(1.035); }

.thumb-link--empty {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, #1d3557, #457b9d 60%, #a8dadc);
}
.thumb-link__letter {
    font-family: var(--gn-serif);
    font-size: 44px; font-weight: 700;
    color: rgba(255, 255, 255, .9);
}

/* Aspect ratios per placement */
.lead-main__thumb  { aspect-ratio: 16 / 9;  margin-bottom: 18px; }
.lead-rail__thumb  { aspect-ratio: 1 / 1; }
.card__thumb       { aspect-ratio: 3 / 2;   margin-bottom: 13px; }
.cat-lead__thumb   { aspect-ratio: 16 / 10; margin-bottom: 14px; }

/* Headline underline-on-hover */
.headline-link {
    color: inherit;
    background-image: linear-gradient(var(--gn-primary), var(--gn-primary));
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .25s ease, color .15s ease;
}
.headline-link:hover { color: var(--gn-primary-ink); background-size: 100% 1px; }

/* Section heads */
.sec { padding: 44px 0; }
.sec-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-top: 3px solid var(--gn-dark);
    padding-top: 12px;
    margin-bottom: 24px;
}
.sec-head__title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.sec-head__more {
    font-size: 12.5px; font-weight: 700; color: var(--gn-primary); white-space: nowrap;
}
.sec-head__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   5. LEAD BLOCK
   ========================================================================== */
.lead {
    padding: 34px 0 40px;
    border-bottom: 1px solid var(--gn-border);
}
.lead__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
    gap: 40px;
}
.lead-main__title {
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.08;
    margin-bottom: 14px;
}
.lead-main__dek {
    font-family: var(--gn-serif);
    font-size: 19px; line-height: 1.5; color: var(--gn-ink-2);
    margin-bottom: 14px;
    max-width: 62ch;
}

.lead-rail { align-content: start; }
.lead-rail__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--gn-border);
}
.lead-rail__item:first-child { padding-top: 0; }
.lead-rail__item:last-child { border-bottom: 0; }
.lead-rail__title { font-size: 19px; line-height: 1.25; margin: 0 0 8px; }

/* ==========================================================================
   6. LATEST GRID
   ========================================================================== */
.latest__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 26px;
}
.card__title { font-size: 18px; line-height: 1.28; margin-bottom: 9px; }
.card__excerpt {
    font-size: 14px; color: var(--gn-muted); line-height: 1.5; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ==========================================================================
   7. CATEGORY BLOCKS + TRENDING RAIL
   ========================================================================== */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 48px;
    padding-bottom: 56px;
}
.cat-block + .cat-block { margin-top: 44px; }
.cat-block__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 32px;
}
.cat-lead__title { font-size: 24px; line-height: 1.2; margin-bottom: 9px; }
.cat-lead__dek { font-size: 14.5px; color: var(--gn-muted); line-height: 1.55; margin-bottom: 10px; }

.cat-list li { padding: 14px 0; border-bottom: 1px solid var(--gn-border); }
.cat-list li:first-child { padding-top: 0; }
.cat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cat-list__title { font-size: 16.5px; line-height: 1.3; margin-bottom: 6px; }

/* Rail */
.rail { align-self: start; position: sticky; top: 64px; }
.admin-bar .rail { top: 96px; }
.rail__panel {
    border-top: 3px solid var(--gn-dark);
    padding-top: 12px;
    margin-bottom: 34px;
}
.rail__title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    margin-bottom: 6px;
}
.rail__sub { font-size: 12px; color: var(--gn-muted); margin-bottom: 14px; }

.ranked li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gn-border);
}
.ranked li:last-child { border-bottom: 0; }
.ranked__num {
    font-family: var(--gn-serif);
    font-size: 27px; font-weight: 700; line-height: .9;
    color: var(--gn-border-2);
    font-variant-numeric: tabular-nums;
}
.ranked li:hover .ranked__num { color: var(--gn-primary); }
.ranked__title { font-size: 15.5px; line-height: 1.32; margin-bottom: 5px; }
.ranked__meta { font-size: 11.5px; color: var(--gn-muted); margin: 0; }

/* Newsletter capture */
.rail-cta {
    border: 1px solid var(--gn-border);
    background: var(--gn-bg-alt);
    padding: 22px 20px;
    border-radius: 2px;
    scroll-margin-top: 80px;
}
.rail-cta h3 { font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
.rail-cta p { font-size: 13px; color: var(--gn-muted); margin: 0 0 14px; }
.rail-cta__form { display: grid; gap: 8px; }
.rail-cta input {
    padding: 11px 12px;
    border: 1px solid var(--gn-border-2);
    border-radius: 2px;
    font: inherit; font-size: 13.5px;
    background: #fff;
}
.rail-cta input::placeholder { color: var(--gn-muted); }
.rail-cta button {
    padding: 11px;
    border: 0; border-radius: 2px;
    background: var(--gn-dark); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .03em;
    cursor: pointer;
    transition: background .15s;
}
.rail-cta button:hover { background: var(--gn-primary); }
.rail-cta small { display: block; margin-top: 10px; font-size: 11px; color: var(--gn-muted); line-height: 1.45; }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
    background: var(--gn-bg-dark);
    color: #c8ced5;
    padding: 52px 0 30px;
    font-size: 13.5px;
    border-top: 0;
    margin-top: 40px;
}
.footer__top {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer__brand .brand__name { font-size: 26px; color: #fff; }
.footer__brand .brand__tag { color: #8b939c; text-align: left; }
.footer__brand .brand { text-align: left; }
.footer__blurb { margin: 14px 0 0; color: #98a0a9; line-height: 1.6; max-width: 34ch; font-size: 13px; }
.footer__heading {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    color: #fff;
    margin: 0 0 14px;
}
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c8ced5; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
    display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding-top: 22px;
    font-size: 12px; color: #828b95;
}
.footer__bottom .site-info { margin: 0; }
.footer__social { display: flex; gap: 16px; }

/* ==========================================================================
   INNER PAGES — posts, entries, sidebar (single / archive / search / page)
   ========================================================================== */
.post-list { display: grid; gap: 2.5rem; }

.entry { padding-bottom: 2.5rem; border-bottom: 1px solid var(--gn-border); }
.entry:last-child { border-bottom: 0; }
.entry-thumbnail img { width: 100%; height: auto; border-radius: 2px; margin-bottom: 1rem; }
.entry-title { font-size: 1.9rem; line-height: 1.15; margin: .5rem 0; }
.entry-title a { color: var(--gn-dark); }
.entry-title a:hover { color: var(--gn-primary); }
.entry-meta { color: var(--gn-muted); font-size: 0.85rem; margin-bottom: .75rem; }
.entry-meta > span + span::before { content: "•"; margin: 0 0.4rem; color: var(--gn-border-2); }
.entry-content { font-size: 1.05rem; }
.cat-links a {
    color: var(--gn-primary);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
    font-size: .8rem;
}
.read-more { color: var(--gn-primary); font-weight: 600; }
.read-more:hover { text-decoration: underline; }

.page-header { margin-bottom: 2rem; }
.page-title {
    font-size: 2rem;
    border-left: 4px solid var(--gn-primary);
    padding-left: .7rem;
}

/* Sidebar */
.widget { margin-bottom: 2rem; }
.widget-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--gn-primary);
    padding-bottom: 0.4rem;
    margin: 0 0 0.75rem;
}

/* Pagination */
.pagination { margin-top: 2.5rem; }
.pagination .page-numbers {
    display: inline-block;
    padding: .4rem .8rem;
    border: 1px solid var(--gn-border);
    border-radius: 2px;
    margin-right: .3rem;
    color: var(--gn-ink-2);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--gn-dark); color: #fff; border-color: var(--gn-dark); }

/* ==========================================================================
   SINGLE POST — article body typography, figures & captions
   ========================================================================== */
.entry-content > * { min-width: 0; }
.entry-content p { margin: 0 0 1.25rem; }
.entry-content ul,
.entry-content ol { margin: 0 0 1.25rem 1.25rem; }

/* Mobile hardening: never let long words, URLs, media or tables push the
   layout wider than the screen. */
.entry-content { overflow-wrap: break-word; word-wrap: break-word; }
.entry-content a { overflow-wrap: break-word; }
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object { max-width: 100%; }
.entry-content pre { overflow-x: auto; }
.entry-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Give headings room so they don't crowd the next element. */
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
    line-height: 1.22;
    margin: 2.2rem 0 0.85rem;
}
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content h4 { font-size: 1.15rem; }

/* Keep every image and figure inside the content column (fixes overlap from
   images that carry an explicit pixel width). */
.entry-content img {
    max-width: 100%;
    height: auto;
}
.entry-content figure {
    margin: 1.75rem 0;
    max-width: 100%;
}
.entry-content figure img { width: 100%; }
.entry-content .alignwide,
.entry-content .alignfull {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignleft {
    float: left;
    max-width: 50%;
    margin: 0.4rem 1.5rem 1rem 0;
}
.entry-content .alignright {
    float: right;
    max-width: 50%;
    margin: 0.4rem 0 1rem 1.5rem;
}
.entry-content::after { content: ""; display: block; clear: both; }

/* Captions: smaller and italic. */
.entry-content figcaption,
.wp-caption-text,
.wp-element-caption {
    font-size: 13px;
    font-style: italic;
    color: var(--gn-muted);
    text-align: center;
    line-height: 1.4;
    margin-top: 0.5rem;
}

/* ==========================================================================
   SIDEBAR PANELS — Most Viewed / Most Loved (no headings; paragraph titles)
   ========================================================================== */
.side-panel { border-top: 3px solid var(--gn-dark); padding-top: 12px; margin-bottom: 30px; }
.side-panel__label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    margin: 0 0 14px;
}
.side-list { display: block; }
.side-item { padding: 13px 0; border-bottom: 1px solid var(--gn-border); }
.side-item:first-child { padding-top: 0; }
.side-item:last-child { border-bottom: 0; padding-bottom: 0; }
.side-item__title {
    font-family: var(--gn-serif);
    font-size: 16px; font-weight: 700; line-height: 1.3;
    margin: 0 0 5px;
}
.side-item__title a { color: var(--gn-dark); }
.side-item__title a:hover { color: var(--gn-primary); }
.side-item__desc { font-size: 12.5px; color: var(--gn-muted); line-height: 1.45; margin: 0; }

/* ==========================================================================
   SOCIAL "FOLLOW US" BOX (Page sidebar)
   ========================================================================== */
.social-box {
    border: 1px solid var(--gn-border);
    border-radius: 2px;
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
}
.social-box__label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    margin: 0 0 16px;
}
.social-list { display: grid; gap: 10px; }

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--gn-border);
    border-radius: 2px;
    color: var(--gn-dark);
    transition: border-color .15s, background .15s;
}
.social-item:hover {
    border-color: var(--brand, var(--gn-primary));
    background: var(--gn-bg-alt);
}
.social-item__icon {
    width: 36px; height: 36px;
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--brand, var(--gn-primary));
    color: #fff;
}
.social-item__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.social-item__count {
    font-family: var(--gn-serif);
    font-size: 18px; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.social-item__name { font-size: 12px; color: var(--gn-muted); }
.social-item__cta {
    margin-left: auto;
    flex: none;
    font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--brand, var(--gn-primary));
    opacity: 0;
    transition: opacity .15s;
}
.social-item:hover .social-item__cta { opacity: 1; }

/* ==========================================================================
   SINGLE POST — related stories (full-width, two columns, paragraph titles)
   ========================================================================== */
.single-related {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-top: 28px;
    border-top: 3px solid var(--gn-dark);
}
.single-related__label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    margin: 0 0 22px;
}
.single-related__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
}
.related-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.related-card__thumb { aspect-ratio: 1 / 1; }
.related-card__body .kicker { margin-bottom: 6px; }
.related-card__title {
    font-family: var(--gn-serif);
    font-size: 17px; font-weight: 700; line-height: 1.28;
    margin: 0 0 6px;
}
.related-card__title a { color: var(--gn-dark); }
.related-card__title a:hover { color: var(--gn-primary); }
.related-card__desc { font-size: 13px; color: var(--gn-muted); line-height: 1.5; margin: 0; }

/* ==========================================================================
   POST LIKE BUTTON (single "Like" reaction)
   ========================================================================== */
.gn-like {
    margin: 2rem 0 0.5rem;
}
.gn-like__btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border: 1px solid var(--gn-border-2);
    border-radius: 100px;
    background: #fff;
    color: var(--gn-ink-2);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s, transform .1s;
}
.gn-like__btn:hover { border-color: var(--gn-live); color: var(--gn-live); }
.gn-like__btn:active { transform: scale(0.97); }
.gn-like__btn:disabled { opacity: 0.6; cursor: default; }

.gn-like__icon { transition: transform .15s; }
.gn-like__btn:hover .gn-like__icon { transform: scale(1.1); }

.gn-like__btn.is-liked {
    border-color: var(--gn-live);
    background: var(--gn-live);
    color: #fff;
}
.gn-like__btn.is-liked .gn-like__icon { fill: currentColor; }

.gn-like__count {
    font-variant-numeric: tabular-nums;
    padding-left: 8px;
    margin-left: 2px;
    border-left: 1px solid currentColor;
    opacity: 0.9;
}

/* ==========================================================================
   FACEBOOK EMBEDS (auto-generated from bare URLs)
   ========================================================================== */
.gn-fb-embed {
    display: flex;
    justify-content: center;
    margin: 1.75rem 0;
}
.gn-fb-embed .fb-post,
.gn-fb-embed .fb-video,
.gn-fb-embed .fb-post span,
.gn-fb-embed iframe {
    max-width: 100% !important;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
    left: 1rem; top: 1rem;
    background: #fff; padding: 0.5rem 1rem;
    z-index: 200;
    border: 2px solid var(--gn-dark);
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .split { grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; }
    .latest__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .lead__grid { grid-template-columns: 1fr; gap: 30px; }
    .lead-rail { border-top: 1px solid var(--gn-border); padding-top: 6px; }
    .split { grid-template-columns: 1fr; gap: 44px; }
    .rail { position: static; }
    .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
    .gn-wrap { padding: 0 20px; }
    .single-related__grid { grid-template-columns: 1fr; }
    .related-card { grid-template-columns: 96px minmax(0, 1fr); gap: 13px; }
    .utility__date { font-size: 11px; }
    .utility__links a:not(.utility__cta) { display: none; }
    .masthead__inner { grid-template-columns: auto 1fr auto; padding: 16px 0; }
    .brand { text-align: left; }
    .brand__name { font-size: 26px; }
    .brand__tag { font-size: 9px; letter-spacing: .16em; }
    .latest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
    .cat-block__grid { grid-template-columns: 1fr; gap: 22px; }
    .lead-main__title { font-size: 28px; }
    .lead-main__dek { font-size: 17px; }
    .sec { padding: 32px 0; }
}

@media (max-width: 520px) {
    .latest__grid { grid-template-columns: 1fr; }
    .card { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 14px; align-items: start; }
    .card__thumb { aspect-ratio: 1 / 1; margin-bottom: 0; order: 2; }
    .card__body { order: 1; }
    .card__excerpt { display: none; }
    .lead-rail__item { grid-template-columns: minmax(0, 1fr) 92px; }
    .footer__top { grid-template-columns: 1fr; }
    .nav.is-open .nav__menu li { width: 100%; }
    /* Let the wordmark wrap instead of overflowing on very small phones. */
    .brand__name { white-space: normal; font-size: 22px; }
}
