:root {
    --paper: #f7f5f1;
    --surface: #ffffff;
    --ink: #161d29;
    --muted: #5c6675;
    --line: #d8dce3;
    --navy: #071f3c;
    --red: #ad1026;
    --orange: #ff8b12;
    --teal: #007a78;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.utility-bar {
    background: var(--navy);
    color: #fff;
}

.utility-row,
.nav-row,
.alert-row,
.section-head,
.public-notices {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.utility-row {
    min-height: 42px;
    font-size: 0.88rem;
}

.utility-links,
.social-links,
.category-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.utility-links span {
    color: rgba(255, 255, 255, 0.78);
}

.social-links a {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
}

.masthead {
    display: flex;
    align-items: center;
    min-height: 148px;
}

.brand {
    display: block;
    width: min(560px, 100%);
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
}

.main-nav {
    border-top: 1px solid var(--line);
}

.nav-row {
    position: relative;
    min-height: 66px;
}

.category-links {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    text-transform: uppercase;
    font-size: 0.88rem;
    font-weight: 800;
}

.category-links::-webkit-scrollbar {
    display: none;
}

.category-links a:first-child {
    color: var(--red);
}

.more-button {
    width: 66px;
    min-height: 38px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.more-panel {
    position: absolute;
    top: calc(100% - 8px);
    right: 0;
    z-index: 4;
    width: min(250px, calc(100vw - 40px));
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 18px 55px rgba(7, 31, 60, 0.14);
}

.more-panel a {
    display: block;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.more-panel a:last-child {
    border-bottom: 0;
}

.alert-bar {
    background: var(--red);
    color: #fff;
}

.alert-row {
    min-height: 74px;
}

.alert-row p {
    margin: 0;
    line-height: 1.4;
}

.alert-row p strong {
    margin-right: 10px;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.radio-player {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
    min-width: 250px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(8, 14, 24, 0.18);
}

.radio-player div {
    display: grid;
    gap: 2px;
}

.radio-player strong {
    color: #fff1b5;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.radio-player span {
    font-size: 0.92rem;
    font-weight: 700;
}

.radio-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--red);
    cursor: pointer;
}

.play-icon {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid currentColor;
}

.radio-player.is-playing .play-icon {
    width: 12px;
    height: 15px;
    margin-left: 0;
    border: 0;
    border-right: 4px solid currentColor;
    border-left: 4px solid currentColor;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.82fr);
    gap: 28px;
    padding-top: 38px;
    padding-bottom: 38px;
}

.lead-story {
    display: grid;
    min-height: 548px;
    background: var(--navy);
    color: #fff;
}

.lead-photo {
    min-height: 310px;
    background:
        linear-gradient(120deg, rgba(7, 31, 60, 0.08), rgba(7, 31, 60, 0.68)),
        linear-gradient(135deg, #627484, #d5d9d7 46%, #546b72);
}

.lead-copy {
    display: grid;
    align-content: end;
    gap: 14px;
    padding: clamp(22px, 4vw, 42px);
}

.lead-copy span,
.story-brief span,
.news-card span,
.eyebrow {
    color: var(--orange);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lead-copy h1 {
    max-width: 820px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.5vw, 4rem);
    line-height: 1.02;
}

.lead-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
    line-height: 1.55;
}

.highlight-rail {
    display: grid;
    gap: 16px;
}

.story-brief {
    display: grid;
    align-content: space-between;
    gap: 28px;
    min-height: 172px;
    padding: 24px;
    border-top: 4px solid var(--teal);
    background: var(--surface);
}

.story-brief h2,
.news-card h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.16;
}

.latest-band {
    padding: 42px 0 52px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.section-head {
    margin-bottom: 25px;
}

.section-head h2,
.public-notices h2 {
    margin: 0;
    font-size: clamp(1.65rem, 2.5vw, 2.5rem);
    line-height: 1.05;
}

.section-head a,
.public-notices a {
    border: 1px solid var(--ink);
    padding: 12px 16px;
    font-weight: 800;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.news-card {
    display: grid;
    gap: 14px;
}

.thumb {
    aspect-ratio: 16 / 9;
    border-bottom: 4px solid var(--red);
    background: linear-gradient(135deg, #cfd6d4, #667688);
}

.thumb-image,
.lead-photo-image,
.article-cover {
    display: block;
    width: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #cfd6d4, #667688);
}

.thumb-image {
    aspect-ratio: 16 / 9;
    border-bottom: 4px solid var(--red);
}

.lead-photo-image {
    min-height: 310px;
    height: 100%;
    max-height: 460px;
}

.news-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.notice-band,
.listing-page,
.article-page,
.admin-shell {
    padding-top: 42px;
    padding-bottom: 58px;
}

.listing-page h1,
.article-page h1,
.admin-head h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1.02;
}

.article-page {
    width: min(860px, calc(100% - 40px));
}

.article-page header {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.article-page header span {
    color: var(--red);
    font-weight: 900;
    text-transform: uppercase;
}

.article-page time {
    color: var(--muted);
}

.article-cover {
    max-height: 580px;
    margin-bottom: 30px;
}

.article-content {
    overflow-wrap: anywhere;
    color: #202938;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 1.25vw, 1.24rem);
    line-height: 1.75;
}

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content figure {
    margin: 28px 0;
}

.article-content figcaption {
    color: var(--muted);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 0.88rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-row,
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-row {
    min-height: 88px;
    color: var(--muted);
}

.admin-head {
    margin-bottom: 28px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.admin-form,
.auth-card,
.install-card {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--line);
    background: var(--surface);
}

.admin-form h1,
.admin-form h2,
.install-card h1 {
    margin: 0;
}

.admin-form label,
.form-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.form-grid input {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 12px;
    font: inherit;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    min-height: 45px;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--navy);
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 900;
}

.primary-action {
    background: var(--navy);
    color: #fff;
}

.secondary-action {
    background: transparent;
}

.form-error,
.form-success {
    margin: 0;
    padding: 13px 15px;
    font-weight: 800;
}

.form-error {
    border-left: 4px solid var(--red);
    background: #ffe5e8;
    color: #72101d;
}

.form-success {
    border-left: 4px solid var(--teal);
    background: #dff5f2;
    color: #075854;
}

.auth-shell,
.install-shell {
    display: grid;
    min-height: 70vh;
    place-items: center;
    padding: 42px 20px;
}

.auth-card {
    width: min(430px, 100%);
}

.install-page {
    background: var(--paper);
}

.install-shell {
    gap: 24px;
}

.install-shell > img {
    width: min(460px, 100%);
    height: auto;
}

.install-card {
    width: min(700px, 100%);
}

.install-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.empty-state {
    padding: clamp(26px, 5vw, 70px);
    background: var(--surface);
}

.public-notices {
    margin-top: 42px;
    margin-bottom: 58px;
    padding: clamp(24px, 4vw, 44px);
    border-left: 8px solid var(--orange);
    background: var(--navy);
    color: #fff;
}

.public-notices div {
    display: grid;
    max-width: 650px;
    gap: 12px;
}

.public-notices p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.04rem;
    line-height: 1.5;
}

.public-notices a {
    border-color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
}

@media (max-width: 820px) {
    .shell {
        width: min(100% - 24px, 1180px);
    }

    .utility-row,
    .alert-row,
    .public-notices {
        align-items: flex-start;
        flex-direction: column;
    }

    .utility-row {
        padding: 10px 0;
    }

    .utility-links {
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .masthead {
        min-height: 112px;
    }

    .brand {
        width: min(470px, 100%);
    }

    .nav-row {
        min-height: 60px;
    }

    .category-links {
        gap: 14px;
    }

    .alert-row {
        padding: 14px 0;
    }

    .radio-player {
        min-width: 0;
        width: 100%;
    }

    .hero-grid,
    .news-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .lead-story {
        min-height: 0;
    }

    .lead-photo {
        min-height: 240px;
    }

    .lead-photo-image {
        min-height: 240px;
    }

    .article-page {
        width: min(100% - 24px, 860px);
    }

    .footer-row,
    .admin-head {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 18px;
        padding-bottom: 18px;
    }
}
