:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f5f6f8;
    --surface-hover: #e9ecef;

    --text: #111827;
    --text-strong: #050816;
    --muted: #465a73;
    --muted-light: #64748b;

    --border: #dbe3ee;
    --border-strong: #b8c2d6;

    --brand-teal: #048277;
    --brand-teal-dark: #036b62;
    --brand-teal-soft: #ecfdf5;

    --brand-gold: #d29b54;

    --footer-bg: #f3f4f6;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.04);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1240px, calc(100% - 56px));
    margin: 0 auto;
}

/* Header */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid transparent;
    padding-top: 24px;
}

.header-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-logo {
    width: 136px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
}

.site-logo img {
    max-width: 136px;
    max-height: 44px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 15px;
    font-weight: 700;
    margin-left: auto;
}

.site-nav a {
    color: var(--text-strong);
    padding: 9px 12px;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
    background: var(--surface-hover);
    color: #000000;
    text-decoration: none;
}

/* Search */

.search-area {
    padding: 12px 0 30px;
}

.search-form {
    width: 100%;
    margin: 0;
}

.search-box {
    width: 100%;
    height: 50px;
    border: 0;
    outline: 0;
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--muted);
    display: block;
    padding: 0 110px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 50px;
    appearance: none;
    -webkit-appearance: none;
}

.search-box::placeholder {
    color: var(--muted);
    opacity: 1;
}

.search-box:focus {
    background: var(--surface-soft);
    box-shadow: 0 0 0 2px rgba(4, 130, 119, 0.12);
}

/* Main layout */

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

.home-intro {
    max-width: 900px;
    margin-bottom: 42px;
}

h1,
h2,
h3 {
    line-height: 1.22;
    margin-top: 0;
    color: var(--text-strong);
}

h1 {
    font-size: 42px;
    letter-spacing: -0.045em;
    margin-bottom: 16px;
}

h2 {
    font-size: 28px;
    letter-spacing: -0.035em;
    margin-bottom: 14px;
}

h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.home-intro p,
.page-heading p,
.section-description,
.article-summary {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

/* Topic group on Home */

.topic-group {
    margin-bottom: 52px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.section-title-row a {
    color: var(--brand-teal-dark);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.section-title-row a:hover {
    color: var(--brand-teal);
    text-decoration: underline;
}

.section-description {
    max-width: 900px;
    margin-bottom: 22px;
}

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

.topic-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: flex-start;
    min-height: 88px;
    padding: 10px;
    border-radius: 12px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.topic-card:hover {
    background: var(--brand-teal-soft);
    text-decoration: none;
    transform: translateY(-1px);
}

.topic-icon {
    width: 52px;
    height: 52px;
    border-radius: 9px;
    background: var(--brand-teal);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(4, 130, 119, 0.18);
}

.topic-card:hover .topic-icon {
    background: var(--brand-teal-dark);
}

.topic-card h3,
.topic-summary-card h2,
.article-row h3 {
    color: var(--text-strong);
}

.topic-card p,
.topic-summary-card p,
.article-row p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

/* Breadcrumb */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 26px;
    color: var(--muted);
}

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

.breadcrumb a:hover {
    color: var(--brand-teal-dark);
}

.page-heading {
    margin-bottom: 32px;
    max-width: 960px;
}

/* Category / Topic article sections */

.topic-article-section {
    margin-bottom: 48px;
}

.topic-summary-card {
    display: inline-grid;
    grid-template-columns: 58px minmax(300px, 1fr);
    gap: 16px;
    align-items: center;
    background: var(--surface-soft);
    border-radius: 10px;
    padding: 10px 22px 10px 0;
    min-width: 720px;
    max-width: 760px;
    margin-bottom: 22px;
    transition: background-color 0.15s ease;
}

.topic-summary-card:hover {
    background: var(--brand-teal-soft);
    text-decoration: none;
}

.topic-summary-card h2 {
    font-size: 16px;
    margin: 0 0 4px;
}

.article-list-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.article-row {
    display: grid;
    grid-template-columns: 1fr 26px;
    gap: 18px;
    align-items: center;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s ease;
}

.article-row:last-child {
    border-bottom: 0;
}

.article-row:hover {
    background: #fbfcfd;
    text-decoration: none;
}

.article-row h3 {
    font-size: 15.5px;
    margin: 0 0 5px;
}

.arrow {
    color: var(--muted-light);
    font-size: 28px;
    line-height: 1;
}

.article-row:hover .arrow {
    color: var(--brand-teal-dark);
}

.view-all-row {
    text-align: center;
    margin-top: 22px;
}

.view-all-row a,
.pagination-row span {
    color: var(--brand-teal-dark);
    font-size: 15px;
    font-weight: 700;
}

/* Pagination */

.pagination-row {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 28px;
}

.pagination-disabled {
    color: var(--muted-light) !important;
}

/* Article detail */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 860px) 300px;
    gap: 48px;
    width: 100%;
    align-items: start;
}

.article-main {
    width: 100%;
    max-width: none;
}

.article-main h1 {
    font-size: 42px;
    letter-spacing: -0.045em;
    margin-bottom: 14px;
    max-width: none;
}

.article-main h2 {
    font-size: 28px;
    margin-top: 44px;
    margin-bottom: 14px;
    padding-top: 8px;
    max-width: none;
}

.article-main h3 {
    font-size: 21px;
    margin-top: 30px;
    margin-bottom: 12px;
    max-width: none;
}

.article-main p {
    color: #1f2937;
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 18px;
    max-width: none;
}

.article-summary {
    max-width: none;
}

.article-image-placeholder {
    height: 92px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px dashed var(--border-strong);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 28px 0 36px;
    font-size: 14px;
    max-width: none;
}

/* Article TOC */

.article-toc {
    position: sticky;
    top: 24px;
    width: 300px;
    max-width: 300px;
    padding-top: 6px;
    text-align: left !important;
}

.article-toc .toc-title {
    font-weight: 800;
    margin: 0 0 14px;
    text-align: left !important;
    color: var(--text-strong);
}

.article-toc .toc-link {
    display: block;
    width: 100%;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    padding: 8px 0;
    text-align: left !important;
}

.article-toc .toc-level-2 {
    padding-left: 18px;
    font-size: 13.5px;
}

.article-toc .toc-link:hover {
    color: var(--brand-teal-dark);
    text-decoration: none;
}

.article-toc .toc-empty {
    display: block;
    color: var(--muted);
    text-align: left !important;
}

/* Related articles */

.related-section {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border-strong);
    width: 100%;
    max-width: none;
}

.related-section .section-title-row {
    margin-bottom: 16px;
}

.related-list {
    width: 100%;
}

.related-row {
    border-radius: 0;
}

/* About */

.about-content {
    max-width: 840px;
}

.about-content h2 {
    margin-top: 34px;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
}

/* Footer */

.site-footer {
    padding: 28px 0 34px;
    background: var(--surface);
}

.footer-inner {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
}

.footer-links a {
    background: var(--footer-bg);
    padding: 7px 13px;
    border-radius: 5px;
    font-size: 13px;
    color: #374151;
    transition: background-color 0.15s ease;
}

.footer-links a:hover {
    background: var(--surface-hover);
    text-decoration: none;
}

.footer-inner p {
    color: var(--muted-light);
    font-size: 13px;
    margin: 0;
}

/* Responsive */

@media (max-width: 1100px) {
    .container {
        width: min(100% - 40px, 1040px);
    }

    .article-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 36px;
    }

    .article-toc {
        width: 250px;
        max-width: 250px;
    }

    .topic-summary-card {
        min-width: 620px;
    }
}

@media (max-width: 900px) {
    .container {
        width: min(100% - 32px, 760px);
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .site-nav {
        margin-left: 0;
        gap: 10px;
        font-size: 14px;
    }

    .search-box {
        padding: 0 18px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .topic-summary-card {
        min-width: 100%;
        max-width: 100%;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .article-toc {
        position: static;
        width: 100%;
        max-width: none;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 18px;
        order: -1;
        background: var(--surface-soft);
    }

    h1,
    .article-main h1 {
        font-size: 32px;
    }

    h2,
    .article-main h2 {
        font-size: 24px;
    }

    .site-logo {
        width: 122px;
        height: 44px;
    }

    .site-logo img {
        max-width: 122px;
        max-height: 40px;
    }
}

@media (max-width: 560px) {
    .container {
        width: calc(100% - 24px);
    }

    .site-header {
        padding-top: 18px;
    }

    .site-nav {
        gap: 6px;
    }

    .site-nav a {
        padding: 7px 8px;
    }

    .search-area {
        padding-bottom: 22px;
    }

    .topic-card {
        grid-template-columns: 52px 1fr;
    }

    .topic-icon {
        width: 48px;
        height: 48px;
    }

    .article-row {
        padding: 18px;
    }

    .footer-links {
        gap: 8px;
    }
}