:root {
    color-scheme: light;
    --ink: #14211b;
    --muted: #5a665f;
    --line: #d9e1dc;
    --paper: #ffffff;
    --soft: #f2f6f4;
    --green: #246648;
    --blue: #2f6fa3;
    --coral: #d96850;
    --yellow: #f1bf4b;
    --header-height: 106px;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
summary {
    font: inherit;
}

button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 5000;
    padding: 10px 14px;
    background: var(--ink);
    color: #ffffff;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Sticky masthead keeps the publication identity and navigation available. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
}

.edition-bar {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.edition-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.wordmark-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--green);
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.menu-toggle span {
    width: 23px;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-open .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 20px 18px 30px;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--green);
}

.site-nav .nav-cta {
    margin-top: 16px;
    padding: 13px 16px;
    border: 1px solid var(--green);
    border-radius: 4px;
    color: var(--green);
    text-align: center;
}

/* The hero uses the local editorial photograph with readable text contrast. */
.hero {
    position: relative;
    min-height: 570px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(12, 28, 20, 0.9) 0%, rgba(12, 28, 20, 0.58) 47%, rgba(12, 28, 20, 0.08) 78%), url('/common-ground/images/community-square.webp');
    background-position: 58% center;
    background-size: cover;
    color: #ffffff;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    padding: 58px 18px 64px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffe08c;
}

.hero h1 {
    margin: 0;
    max-width: 680px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.45rem;
    line-height: 0.98;
    font-weight: 700;
}

.hero-copy {
    max-width: 580px;
    margin: 22px 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.02rem;
    line-height: 1.7;
}

.primary-link {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 17px;
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.primary-link:hover,
.primary-link:focus-visible {
    background: var(--yellow);
}

.photo-caption {
    position: absolute;
    right: 16px;
    bottom: 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.68rem;
}

.story-section,
.weekend-section,
.about-section {
    width: min(100% - 36px, 1180px);
    margin: 0 auto;
    padding: 74px 0;
}

.section-heading {
    display: grid;
    gap: 20px;
    margin-bottom: 34px;
}

.section-heading h2,
.world-intro h2,
.weekend-section h2,
.about-section h2 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.25rem;
    line-height: 1.12;
    font-weight: 700;
}

.section-heading > p,
.world-intro > p:last-child {
    margin: 0;
    color: var(--muted);
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin: 0 -18px 28px;
    padding: 0 18px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.filter-button {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #ffffff;
}

.story-grid {
    display: grid;
    gap: 16px;
}

.story-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--blue);
    border-radius: 6px;
    background: #ffffff;
}

.story-card[data-category='science'] {
    border-top-color: var(--green);
}

.story-card[data-category='culture'] {
    border-top-color: var(--coral);
}

.story-card[data-category='places'] {
    border-top-color: var(--yellow);
}

.story-card[hidden] {
    display: none;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.story-card h3 {
    margin: 38px 0 14px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.65rem;
    line-height: 1.18;
}

.story-card > p,
.story-detail p {
    color: var(--muted);
}

.story-card details {
    margin-top: 20px;
    border-top: 1px solid var(--line);
}

.story-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    color: var(--green);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.story-card summary::-webkit-details-marker {
    display: none;
}

.story-card details[open] summary span {
    transform: rotate(90deg);
}

.story-detail {
    padding-top: 10px;
}

.story-detail p {
    margin: 10px 0 0;
}

.world-section {
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.world-inner {
    width: min(100% - 36px, 1180px);
    margin: 0 auto;
    padding: 74px 0;
}

.world-intro {
    margin-bottom: 32px;
}

.world-intro > p:last-child {
    margin-top: 16px;
}

.dispatch-list {
    border-top: 1px solid #c8d3cc;
}

.dispatch-list article {
    padding: 24px 0;
    border-bottom: 1px solid #c8d3cc;
}

.dispatch-list span {
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dispatch-list h3 {
    margin: 10px 0 8px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    line-height: 1.25;
}

.dispatch-list p {
    margin: 0;
    color: var(--muted);
}

.weekend-section {
    display: grid;
    gap: 28px;
    align-items: center;
}

.weekend-number {
    width: 104px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--coral);
    color: #ffffff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.3rem;
}

.weekend-section p:not(.section-kicker) {
    max-width: 780px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.weekend-section a {
    color: var(--green);
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.about-section {
    border-top: 1px solid var(--line);
}

.about-grid {
    display: grid;
    gap: 24px;
}

.about-grid p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 1.03rem;
}

.site-footer {
    display: grid;
    gap: 28px;
    padding: 44px 18px;
    background: var(--ink);
    color: #ffffff;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand div {
    display: grid;
}

.footer-brand strong {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
}

.footer-brand span:last-child,
.site-footer > p {
    color: #aebcb4;
    font-size: 0.8rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.site-footer nav a {
    color: #ffffff;
    font-size: 0.9rem;
    text-decoration: none;
}

.site-footer > p {
    margin: 0;
}

@media (min-width: 760px) {
    :root {
        --header-height: 112px;
    }

    .edition-bar,
    .nav-shell {
        padding-left: 32px;
        padding-right: 32px;
    }

    .edition-bar {
        height: 40px;
        font-size: 0.76rem;
    }

    .nav-shell {
        height: 72px;
    }

    .menu-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        padding: 0;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav a {
        padding: 8px 0;
        border: 0;
        font-size: 0.88rem;
    }

    .site-nav .nav-cta {
        margin: 0;
        padding: 9px 13px;
    }

    .hero {
        min-height: 640px;
        background-position: center;
    }

    .hero-content {
        padding: 76px 8% 82px;
    }

    .hero h1 {
        font-size: 5.75rem;
    }

    .hero-copy {
        font-size: 1.16rem;
    }

    .section-heading {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
        align-items: end;
    }

    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story-card {
        min-height: 390px;
        display: flex;
        flex-direction: column;
    }

    .story-card details {
        margin-top: auto;
    }

    .world-inner {
        display: grid;
        grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
        gap: 70px;
    }

    .world-intro {
        position: sticky;
        top: 144px;
        align-self: start;
        margin: 0;
    }

    .weekend-section {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
        gap: 70px;
    }

    .site-footer {
        grid-template-columns: minmax(280px, 1fr) auto auto;
        align-items: center;
        padding: 42px 32px;
    }
}

@media (min-width: 1080px) {
    .edition-bar,
    .nav-shell {
        padding-left: max(42px, calc((100% - 1280px) / 2));
        padding-right: max(42px, calc((100% - 1280px) / 2));
    }

    .story-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .story-card h3 {
        font-size: 1.48rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
