:root {
    --page-bg: #f5f5f7;
    --surface: #ffffff;
    --surface-soft: #fbfbfd;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #8e8e93;
    --border: #d2d2d7;
    --border-soft: #e5e5ea;
    --accent: #0066cc;
    --accent-hover: #004999;
    --shadow-soft: 0 12px 32px rgba(17, 17, 17, 0.06);
    --shell-width: 1120px;
    --reading-width: 760px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--page-bg);
    color: var(--text);
    font-size: 16px;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "SF Pro Display", "SF Pro Text", Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 245, 247, 0.96)),
        var(--page-bg);
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

a:hover {
    color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(0, 102, 204, 0.28);
    outline-offset: 3px;
}

.site-header,
.site-main,
.site-footer {
    width: min(calc(100% - 32px), var(--shell-width));
    margin: 0 auto;
}

.site-header {
    margin-top: 16px;
    padding: 18px 24px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(210, 210, 215, 0.72);
    border-radius: 8px;
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(29, 29, 31, 0.04);
}

.site-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.brand-block {
    min-width: 0;
}

.logo {
    display: inline-block;
    text-decoration: none;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.site-tagline {
    margin: 8px 0 0;
    max-width: 540px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.header-tools {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.top-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.top-nav a:hover {
    color: var(--text);
}

.language-select {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.site-main {
    padding: 28px 0 0;
}

.home-hero {
    margin-bottom: 28px;
    padding: 18px 4px 12px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.home-hero h1,
.page-content h1,
.article-header h1 {
    margin: 0;
    color: var(--text);
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.hero-summary {
    margin: 14px 0 0;
    max-width: 720px;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.story-stream {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(29, 29, 31, 0.02);
    transition: box-shadow 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.article-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.cover-image {
    display: block;
    text-decoration: none;
}

.cover-image img {
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-soft);
}

.article-info {
    min-width: 0;
    align-self: center;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.article-info h2 {
    margin: 0 0 12px;
    font-size: 1.5rem;
    line-height: 1.22;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.article-info h2 a {
    text-decoration: none;
}

.article-summary {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    min-width: 78px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}

.read-more svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.read-more::after {
    content: "\2192";
    font-size: 1rem;
    line-height: 1;
    font-weight: 600;
}

.read-more:hover {
    color: var(--text);
    border-color: rgba(0, 102, 204, 0.28);
    background: rgba(0, 102, 204, 0.06);
}

.no-articles {
    margin: 0;
    padding: 28px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-secondary);
    text-align: center;
}

.article-detail,
.page-content {
    width: min(100%, var(--reading-width));
}

.article-header {
    margin-bottom: 28px;
}

.article-meta-row-detail {
    margin-top: 16px;
    margin-bottom: 22px;
}

.article-header .cover-image {
    margin-top: 18px;
}

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

.article-content h2 {
    margin: 40px 0 14px;
    font-size: 1.625rem;
    line-height: 1.24;
    font-weight: 650;
}

.article-content h3 {
    margin: 30px 0 12px;
    font-size: 1.25rem;
    line-height: 1.28;
    font-weight: 650;
}

.article-content p,
.page-content p {
    margin: 0 0 18px;
    overflow-wrap: anywhere;
}

.article-content ul,
.article-content ol,
.page-content ul {
    margin: 0 0 22px;
    padding-left: 22px;
}

.article-content li,
.page-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    margin: 28px 0;
    padding: 0 0 0 18px;
    border-left: 3px solid var(--border);
    color: var(--text-secondary);
}

.article-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-content figure,
.page-content figure {
    max-width: 100%;
    margin: 24px 0;
}

.article-content iframe,
.article-content video,
.article-content canvas,
.page-content iframe,
.page-content video,
.page-content canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 8px;
}

.article-content table,
.page-content table,
.article-content pre,
.page-content pre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 10px;
}

.site-footer-links a,
.site-footer-meta {
    overflow-wrap: anywhere;
}

.article-content code {
    padding: 0.14em 0.34em;
    border-radius: 6px;
    background: var(--surface-soft);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
}

.page-content {
    padding-top: 6px;
}

.page-content h1 {
    margin-bottom: 18px;
}

.page-content h2 {
    margin: 34px 0 12px;
    font-size: 1.5rem;
    line-height: 1.24;
    font-weight: 650;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding: 20px 0 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
}

.pagination a {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
}

.pagination a:hover {
    color: var(--text);
    border-color: rgba(0, 102, 204, 0.28);
    background: rgba(0, 102, 204, 0.06);
}

.pagination .disabled,
.pagination .page-info {
    border: 1px solid var(--border-soft);
    background: var(--surface-soft);
    color: var(--text-muted);
}

.site-footer {
    margin-top: 40px;
    margin-bottom: 28px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(210, 210, 215, 0.72);
    border-radius: 8px;
}

.site-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
}

.site-footer-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 920px) {
    .article-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .site-header,
    .site-main,
    .site-footer {
        width: min(calc(100% - 24px), var(--shell-width));
    }

    .site-header {
        margin-top: 10px;
        padding: 14px;
    }

    .site-header-inner {
        flex-direction: column;
        gap: 12px;
    }

    .header-tools {
        width: 100%;
        align-items: flex-start;
        gap: 10px;
    }

    .top-nav {
        justify-content: flex-start;
        gap: 10px;
    }

    .top-nav a {
        font-size: 0.9rem;
    }

    .home-hero h1,
    .page-content h1,
    .article-header h1 {
        font-size: 2.05rem;
    }

    .hero-summary {
        margin-top: 10px;
        font-size: 1rem;
        line-height: 1.45;
    }

    .site-main {
        padding-top: 14px;
    }

    .home-hero {
        margin-bottom: 14px;
        padding: 4px 0 4px;
    }

    .eyebrow {
        margin-bottom: 6px;
    }

    .article-card {
        padding: 16px;
    }

    .cover-image img {
        min-height: 0;
    }

    .article-info h2 {
        font-size: 1.32rem;
    }

    .article-content,
    .page-content p {
        font-size: 1rem;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .site-header {
        margin-top: 8px;
        padding: 12px;
    }

    .site-main {
        padding-top: 10px;
    }

    .site-tagline {
        margin-top: 6px;
        font-size: 0.88rem;
    }

    .home-hero {
        margin-bottom: 12px;
        padding: 0;
    }

    .home-hero h1,
    .page-content h1,
    .article-header h1 {
        font-size: 1.72rem;
        line-height: 1.1;
    }

    .hero-summary {
        margin-top: 8px;
        font-size: 0.95rem;
    }

    .article-card {
        gap: 14px;
        padding: 12px;
    }

    .read-more {
        min-width: 68px;
        padding: 0 9px;
    }

    .read-more svg {
        width: 18px;
        height: 18px;
    }

    .read-more::after {
        font-size: 0.95rem;
    }

    .site-footer {
        padding: 18px 16px;
    }

    .site-footer-links {
        gap: 8px 14px;
        flex-direction: column;
    }
}
