:root {
    --color-brand: #1565c0;
    --color-brand-dark: #0d47a1;
    --color-accent: #e65100;
    --color-accent-soft: #fff3e0;
    --color-text: #212121;
    --color-text-secondary: #5f6368;
    --color-border: #e0e0e0;
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-surface);
    line-height: 1.65;
    font-size: 1rem;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--color-brand);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--color-brand-dark); }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ── Header ── */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}

.site-header .top-bar {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.site-header .top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 0.75rem;
}

.site-brand a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
}

.site-brand a:hover { color: inherit; }

.site-brand .logo-img {
    height: 52px;
    width: auto;
    max-width: min(280px, 85vw);
    object-fit: contain;
}

.site-brand .tagline {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    line-height: 1.4;
}

/* ── Navigation ── */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--color-text);
    margin: 0 auto 0.75rem;
}

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

.main-nav .container { padding: 0; }

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.main-nav > .container > ul > li > a {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.main-nav > .container > ul > li > a:hover,
.main-nav > .container > ul > li > a.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
}

.dropdown { position: relative; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius) var(--radius);
    min-width: 220px;
    box-shadow: var(--shadow-sm);
    z-index: 300;
    padding: 0.35rem 0;
    max-height: 320px;
    overflow-y: auto;
}

.dropdown.open .dropdown-menu,
.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text);
    border-bottom: none !important;
}

.dropdown-menu a:hover {
    background: var(--color-bg);
    color: var(--color-brand);
}

/* ── Main content ── */
main.container { padding-top: 1.5rem; padding-bottom: 2rem; }

.section-title {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-brand);
    line-height: 1.3;
}

.section-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ── Hero ── */
.hero-article {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 0 0 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.hero-article img,
.hero-article .placeholder-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
}

.hero-article .meta {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.hero-article h2 {
    font-family: var(--font-serif);
    font-size: 1.625rem;
    line-height: 1.25;
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.hero-article h2 a { color: var(--color-text); }
.hero-article h2 a:hover { color: var(--color-brand); }

.hero-article p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0;
}

/* ── Article grid & cards ── */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.article-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-card img,
.article-card .placeholder-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.article-card .card-body { padding: 1rem 1.125rem 1.125rem; }

.article-card .meta {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card h3 {
    font-size: 1.0625rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
}

.article-card h3 a { color: var(--color-text); }
.article-card h3 a:hover { color: var(--color-brand); }

/* ── Article detail ── */
.breadcrumb {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.25rem;
    line-height: 1.5;
    word-break: break-word;
}

.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-brand); }

.article-content {
    max-width: 680px;
    margin: 0 auto 2rem;
}

.article-content h1 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 1rem;
}

.article-meta {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.6;
}

.article-content .featured-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.article-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text);
}

.article-body p { margin: 0 0 1.25rem; }
.article-body img { border-radius: var(--radius); margin: 1rem 0; }

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0 1.5rem;
}

.share-buttons a {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface);
}

.share-buttons a:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
    background: var(--color-accent-soft);
}

/* ── Temporary site notice ── */
.temp-site-notice {
    background: linear-gradient(90deg, #e65100, #f57c00);
    color: #fff;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
    border-bottom: 3px solid #bf360c;
}

.temp-site-notice strong {
    font-weight: 700;
    margin-right: 0.35rem;
}

@media (max-width: 767px) {
    .temp-site-notice {
        font-size: 0.8125rem;
        padding: 0.625rem 0;
        text-align: left;
    }
}

/* ── Forms & alerts ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9375rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit;
    font-size: 1rem;
    background: var(--color-surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.125rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-brand-dark);
    color: #fff;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.875rem;
}

.pagination span {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}

.placeholder-img {
    background: linear-gradient(135deg, var(--color-brand) 0%, #42a5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    aspect-ratio: 16 / 10;
}

/* ── Footer ── */
.site-footer {
    background: #263238;
    color: #b0bec5;
    margin-top: 2rem;
    padding: 2.5rem 0 1.25rem;
}

.site-footer a { color: #eceff1; }
.site-footer a:hover { color: #fff; }

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer h4 {
    color: #fff;
    margin: 0 0 0.875rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.site-footer p,
.site-footer li {
    font-size: 0.875rem;
    line-height: 1.6;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li { margin-bottom: 0.5rem; }

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.social-links a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 0.8125rem;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-form .form-control {
    flex: 1 1 200px;
    min-width: 0;
}

.search-form .btn { flex-shrink: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #90a4ae;
}

/* ── Tablet ── */
@media (min-width: 600px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-article h2 { font-size: 1.875rem; }
    .article-content h1 { font-size: 2rem; }
}

/* ── Desktop ── */
@media (min-width: 900px) {
    .hero-article {
        grid-template-columns: 1.1fr 1fr;
        gap: 2rem;
        align-items: center;
    }

    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .article-content h1 { font-size: 2.25rem; }
}

/* ── Mobile nav ── */
@media (max-width: 767px) {
    .nav-toggle { display: block; }

    .main-nav .container > ul {
        display: none;
        flex-direction: column;
        border-top: 1px solid var(--color-border);
    }

    .main-nav.open .container > ul { display: flex; }

    .main-nav > .container > ul > li > a {
        padding: 0.875rem 1rem;
        border-bottom: 1px solid var(--color-border);
        border-left: none;
    }

    .main-nav > .container > ul > li > a:hover {
        border-bottom-color: var(--color-border);
        background: var(--color-bg);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-height: none;
        padding-left: 1rem;
        background: var(--color-bg);
    }

    .dropdown.open .dropdown-menu { display: block; }

    .site-header .top-bar .container span:last-child { display: none; }

    .site-brand .logo-img { height: 44px; }

    main.container { padding-top: 1rem; }
}
