:root {
    --marine: #1b3a4b;
    --marine-deep: #0f2631;
    --marine-light: #234e64;
    --gold: #d4a655;
    --gold-light: #e8c882;
    --gold-pale: #f5e6c8;
    --sand: #f7f0e4;
    --paper: #fdfaf5;
    --terracotta: #b5503c;
    --terracotta-deep: #8f3d2f;
    --basin: #3a7d6a;
    --ink: #24343d;
    --muted: #65747c;
    --line: rgba(27, 58, 75, 0.15);
    --white: #ffffff;
    --shadow: 0 20px 55px rgba(15, 38, 49, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Inter", "Segoe UI", sans-serif;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

body.dark {
    --paper: #0d1e27;
    --sand: #142c38;
    --ink: #eef2ef;
    --muted: #aebbc1;
    --line: rgba(232, 200, 130, 0.2);
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

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

a {
    color: inherit;
}

button {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.16;
}

h1 {
    margin-bottom: 1.2rem;
    font-size: clamp(3.2rem, 9vw, 6.8rem);
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 0;
    color: var(--marine);
    font-size: clamp(2rem, 5vw, 3.3rem);
    letter-spacing: -0.025em;
}

body.dark h2 {
    color: var(--gold-light);
}

h3 {
    color: var(--marine);
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

body.dark h3 {
    color: var(--gold-light);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: var(--marine-deep);
    background: var(--gold-light);
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    color: var(--white);
    background: rgba(15, 38, 49, 0.96);
    border-bottom: 2px solid var(--gold);
    backdrop-filter: blur(14px);
}

.header-inner,
.hero-inner,
.official-alert-inner,
.section-inner,
.footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.15rem;
    text-decoration: none;
    white-space: nowrap;
}

.brand img,
.footer-brand img {
    border: 1.5px solid var(--gold);
    border-radius: 50%;
}

.brand strong {
    color: var(--gold);
}

.site-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.site-menu a {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

.site-menu a:hover {
    color: var(--gold-light);
    background: rgba(212, 166, 85, 0.14);
}

.theme-button,
.menu-button {
    min-height: 42px;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 9px;
    color: var(--white);
    background: transparent;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
}

.theme-button:hover,
.menu-button:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.menu-button {
    display: none;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 18%, rgba(212, 166, 85, 0.23), transparent 22rem),
        linear-gradient(135deg, var(--marine-deep) 0%, var(--marine) 66%, var(--marine-light) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    right: -10rem;
    bottom: -18rem;
    width: 42rem;
    height: 42rem;
    border: 1px solid rgba(232, 200, 130, 0.22);
    border-radius: 50%;
    box-shadow: 0 0 0 5rem rgba(232, 200, 130, 0.04), 0 0 0 10rem rgba(232, 200, 130, 0.025);
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 540px;
    padding-block: clamp(4.5rem, 9vw, 7.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    align-items: end;
    gap: clamp(3rem, 8vw, 8rem);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin-bottom: 1rem;
    color: var(--gold-light);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.eyebrow-dark {
    color: var(--terracotta);
}

.hero-lead {
    max-width: 680px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.08rem, 2.3vw, 1.4rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.button,
.share-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.05rem;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.share-button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--marine-deep);
    background: var(--gold);
}

.button-primary:hover {
    background: var(--gold-light);
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: var(--white);
}

.button-secondary:hover {
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.button-map {
    color: var(--white);
    background: var(--terracotta);
}

.button-map:hover {
    background: var(--terracotta-deep);
}

.hero-card {
    padding: 1.5rem;
    border: 1px solid rgba(232, 200, 130, 0.5);
    border-radius: var(--radius);
    background: rgba(15, 38, 49, 0.52);
    backdrop-filter: blur(8px);
}

.hero-card-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--gold-light);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-card strong {
    display: block;
    margin-bottom: 0.45rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.3rem;
}

.hero-card p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.86rem;
}

.official-alert {
    color: var(--white);
    background: var(--terracotta);
}

.official-alert-inner {
    min-height: 52px;
    padding-block: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.latest-section,
.sources-section {
    padding-block: clamp(4.5rem, 9vw, 7rem);
}

.section-heading {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.share-button {
    border: 1px solid var(--marine);
    color: var(--marine);
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
}

body.dark .share-button {
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.bulletin {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

body.dark .bulletin,
body.dark .source-card,
body.dark .archive-item,
body.dark .transparency-note,
body.dark .stale-notice {
    background: #112a36;
}

.bulletin-head {
    padding: clamp(1.6rem, 4vw, 3rem);
    color: var(--white);
    background: linear-gradient(135deg, var(--marine) 0%, var(--marine-deep) 100%);
    border-bottom: 4px solid var(--gold);
}

.bulletin-meta {
    margin-bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 700;
}

.bulletin-meta .tag {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    color: var(--marine-deep);
    background: var(--gold-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bulletin-head h3 {
    max-width: 850px;
    margin-bottom: 0.7rem;
    color: var(--white);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.bulletin-status-detail {
    max-width: 830px;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
}

.risk-pill {
    display: inline-flex;
    padding: 0.46rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 9px;
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 800;
}

.bulletin-body {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.bulletin-lead {
    max-width: 900px;
    margin-bottom: 2rem;
    color: var(--marine);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.2rem, 2.6vw, 1.55rem);
    font-weight: 600;
}

body.dark .bulletin-lead {
    color: var(--gold-light);
}

.source-cutoff {
    margin: -1rem 0 2rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.metrics-grid {
    margin-bottom: 2.6rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.metric {
    min-height: 150px;
    padding: 1.15rem;
    border-top: 4px solid var(--gold);
    border-radius: 12px;
    background: var(--sand);
}

.metric strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--marine);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.1;
}

body.dark .metric strong {
    color: var(--gold-light);
}

.metric span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.metric small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.bulletin-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.bulletin-section {
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.bulletin-section h4 {
    margin: 0 0 0.75rem;
    color: var(--marine);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.23rem;
}

body.dark .bulletin-section h4 {
    color: var(--gold-light);
}

.bulletin-section p,
.bulletin-section li {
    color: var(--muted);
    font-size: 0.9rem;
}

.bulletin-section p:last-child,
.bulletin-section ul:last-child {
    margin-bottom: 0;
}

.bulletin-section ul {
    padding-left: 1.2rem;
}

.changes-box {
    margin-top: 1rem;
    padding: 1.5rem;
    border-left: 5px solid var(--basin);
    border-radius: 0 14px 14px 0;
    background: color-mix(in srgb, var(--basin) 9%, transparent);
}

.changes-box h4 {
    margin: 0 0 0.8rem;
    color: var(--marine);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem;
}

body.dark .changes-box h4 {
    color: var(--gold-light);
}

.changes-box ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.changes-box li + li {
    margin-top: 0.3rem;
}

.transparency-note,
.stale-notice {
    margin-top: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.transparency-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.transparency-note strong {
    color: var(--terracotta);
}

.transparency-note p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.stale-notice {
    margin: 0 0 1rem;
    border-color: var(--terracotta);
    color: var(--terracotta-deep);
    font-size: 0.88rem;
    font-weight: 700;
}

body.dark .stale-notice {
    color: #f0b6a8;
}

.loading-state,
.error-state {
    min-height: 390px;
    padding: 3rem;
}

.loading-line {
    display: block;
    width: 100%;
    height: 14px;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--sand), var(--gold-pale), var(--sand));
    background-size: 200% 100%;
    animation: loading 1.7s linear infinite;
}

.loading-line-short {
    width: 24%;
}

.loading-line-title {
    width: 65%;
    height: 36px;
    margin-block: 1.2rem;
}

.loading-state p {
    margin-top: 1.5rem;
    color: var(--muted);
}

@keyframes loading {
    to { background-position: -200% 0; }
}

.archive-section,
.method-section {
    padding-block: clamp(4.5rem, 9vw, 7rem);
    color: var(--white);
    background: var(--marine);
}

.archive-section h2,
.method-section h2 {
    color: var(--white);
}

.archive-layout {
    display: grid;
    grid-template-columns: minmax(230px, 0.45fr) minmax(0, 1fr);
    gap: clamp(2rem, 8vw, 7rem);
}

.section-intro {
    max-width: 380px;
    color: rgba(255, 255, 255, 0.7);
}

.archive-list {
    display: grid;
    gap: 0.75rem;
}

.archive-item {
    width: 100%;
    padding: 1.15rem 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
    text-align: left;
}

.archive-item:hover,
.archive-item.active {
    border-color: var(--gold);
    background: rgba(212, 166, 85, 0.12);
}

.archive-date {
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 800;
}

.archive-item strong {
    display: block;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.05rem;
}

.archive-item small {
    color: rgba(255, 255, 255, 0.6);
}

.archive-arrow {
    color: var(--gold-light);
    font-size: 1.3rem;
}

.sources-heading > p {
    max-width: 470px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.source-card {
    min-height: 190px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.source-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.source-card span {
    margin-bottom: 0.7rem;
    color: var(--terracotta);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.source-card strong {
    margin-bottom: 0.55rem;
    color: var(--marine);
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.3;
}

body.dark .source-card strong {
    color: var(--gold-light);
}

.source-card p {
    margin-bottom: auto;
    color: var(--muted);
    font-size: 0.8rem;
}

.source-card em {
    margin-top: 1rem;
    color: var(--marine-light);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 800;
}

body.dark .source-card em {
    color: var(--gold-light);
}

.method-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.4fr) minmax(0, 1fr);
    gap: clamp(2rem, 8vw, 7rem);
}

.method-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.method-points > div {
    padding-top: 1rem;
    border-top: 2px solid var(--gold);
}

.method-points span {
    color: var(--gold-light);
    font-weight: 800;
}

.method-points h3 {
    margin: 0.45rem 0;
    color: var(--white);
    font-size: 1.14rem;
}

.method-points p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.site-footer {
    padding-block: 2.4rem;
    color: rgba(255, 255, 255, 0.62);
    background: var(--marine-deep);
    border-top: 2px solid var(--gold);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-brand strong,
.footer-brand span {
    display: block;
}

.footer-brand strong {
    color: var(--gold-light);
    font-family: "Playfair Display", Georgia, serif;
}

.footer-brand span {
    font-size: 0.76rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1500;
    max-width: min(360px, calc(100% - 2rem));
    padding: 0.8rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 10px;
    color: var(--white);
    background: var(--marine-deep);
    box-shadow: var(--shadow);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 920px) {
    .hero-inner,
    .archive-layout,
    .method-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        min-height: 500px;
        align-items: center;
        gap: 2rem;
    }

    .hero-card {
        max-width: 420px;
    }

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

    .site-menu {
        position: absolute;
        top: 100%;
        right: 20px;
        left: 20px;
        display: none;
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid rgba(212, 166, 85, 0.3);
        border-radius: 0 0 12px 12px;
        background: var(--marine-deep);
        box-shadow: var(--shadow);
    }

    .site-menu.open {
        display: flex;
    }

    .menu-button {
        display: inline-flex;
        margin-left: auto;
        align-items: center;
    }
}

@media (max-width: 680px) {
    .header-inner,
    .hero-inner,
    .official-alert-inner,
    .section-inner,
    .footer-inner {
        width: min(100% - 28px, 1180px);
    }

    .brand span {
        display: none;
    }

    .theme-button {
        padding-inline: 0.55rem;
        font-size: 0.7rem;
    }

    .hero-inner {
        padding-block: 4.2rem;
    }

    .hero-actions,
    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    .share-button {
        width: 100%;
    }

    .official-alert-inner {
        display: block;
    }

    .official-alert-inner strong {
        display: block;
    }

    .metrics-grid,
    .bulletin-sections,
    .sources-grid,
    .method-points {
        grid-template-columns: 1fr;
    }

    .metric {
        min-height: 0;
    }

    .transparency-note {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .archive-item {
        grid-template-columns: 1fr auto;
    }

    .archive-date {
        grid-column: 1 / -1;
    }

    .footer-links {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
