:root {
    --ink: #17212b;
    --muted: #5d6875;
    --paper: #f5f7f2;
    --panel: #ffffff;
    --line: #d8dfd5;
    --asphalt: #252f39;
    --green: #12715f;
    --blue: #245c83;
    --yellow: #d99a1f;
    --red: #b94135;
    --shadow: 0 18px 42px rgba(23, 33, 43, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.62;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    max-width: 980px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.14;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.24;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px clamp(16px, 4vw, 48px);
    background: rgba(245, 247, 242, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    text-decoration: none;
}

.brand-emblem {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--asphalt);
    border: 3px solid var(--asphalt);
    border-radius: 6px;
    background: var(--yellow);
    line-height: 1;
    transform: rotate(-8deg);
}

.brand-logo span {
    display: block;
    color: var(--asphalt);
    font-size: clamp(20px, 2.2vw, 30px);
    line-height: 0.92;
}

.brand-logo small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 5px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.nav-link,
.nav-trigger {
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.nav-trigger {
    cursor: pointer;
}

.nav-trigger::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.nav-search,
.button.primary {
    color: #fff;
    background: var(--green);
}

.nav-group {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    min-width: 300px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.nav-group:hover .nav-dropdown,
.nav-group.is-open .nav-dropdown {
    display: grid;
    gap: 4px;
}

.nav-dropdown a {
    display: block;
    padding: 10px 11px;
    border-radius: 7px;
    color: var(--ink);
    text-decoration: none;
}

.nav-dropdown a:hover {
    background: #edf5ef;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    background: #fff;
    font-weight: 800;
}

.home-hero,
.subhero,
.article-hero {
    color: #fff;
    background: linear-gradient(120deg, rgba(23, 33, 43, 0.98), rgba(18, 113, 95, 0.94));
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.9fr);
    gap: clamp(26px, 5vw, 70px);
    align-items: center;
    min-height: 74vh;
    padding: clamp(44px, 7vw, 94px) clamp(16px, 4vw, 48px);
}

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

.hero-copy p:not(.eyebrow),
.subhero p,
.article-hero p {
    max-width: 760px;
    font-size: 18px;
}

.hero-panel {
    display: grid;
    gap: 14px;
}

.hero-photo {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #d8dfd5;
    box-shadow: var(--shadow);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.today-card,
.summary-card,
.tool-card,
.guide-card,
.cluster-card,
.related a,
.source-grid a {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.today-card {
    padding: 22px;
    color: var(--ink);
}

.today-card small {
    display: block;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--yellow);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 900;
    text-decoration: none;
}

.button.ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.12);
}

.button.wide {
    width: 100%;
    margin-top: 16px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.search-box {
    display: flex;
    width: min(100%, 620px);
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 14px 16px;
    font: inherit;
}

.search-box button {
    border: 0;
    padding: 0 18px;
    color: var(--asphalt);
    background: var(--yellow);
    font-weight: 900;
    cursor: pointer;
}

.intro-grid,
.guide-grid,
.cluster-band,
.top-keywords,
.faq-section,
.related,
.article-body,
.source-panel {
    padding: clamp(36px, 6vw, 76px) clamp(16px, 4vw, 48px);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 36px;
    background: #fff;
}

.tools-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tool-card {
    padding: 20px;
}

.tool-card h2 {
    font-size: 22px;
}

.tool-card label {
    display: block;
    margin: 12px 0;
    font-weight: 800;
}

.tool-card select {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.tool-output {
    display: block;
    min-height: 50px;
    margin-top: 12px;
    padding: 12px;
    color: var(--asphalt);
    border-left: 4px solid var(--yellow);
    background: #fff8df;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.section-heading {
    grid-column: 1 / -1;
    max-width: 820px;
}

.guide-card {
    min-height: 292px;
    padding: 22px;
}

.guide-card > p:first-child {
    color: var(--blue);
    font-weight: 900;
}

.guide-card a,
.cluster-card,
.related a,
.source-grid a,
.text-link {
    color: var(--asphalt);
    text-decoration: none;
}

.guide-card p,
.cluster-card span,
.cluster-card em,
.related span,
.source-grid span {
    color: var(--muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips span {
    padding: 6px 9px;
    color: var(--asphalt);
    border: 1px solid #cbd7cc;
    border-radius: 999px;
    background: #edf5ef;
    font-size: 13px;
}

.chips.stacked {
    align-items: flex-start;
    flex-direction: column;
}

.cluster-band,
.top-keywords,
.faq-section {
    background: #fff;
    border-block: 1px solid var(--line);
}

.cluster-grid,
.keyword-map,
.related-grid,
.source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.cluster-card,
.related a,
.source-grid a {
    display: block;
    min-height: 150px;
    padding: 20px;
}

.cluster-card strong,
.cluster-card span,
.cluster-card em,
.keyword-map strong,
.keyword-map span,
.related strong,
.related span,
.source-grid strong,
.source-grid span {
    display: block;
}

.cluster-card em,
.keyword-map span,
.related span,
.source-grid span {
    margin-top: 8px;
    font-style: normal;
}

.keyword-map {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.keyword-map a {
    min-height: 112px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    text-decoration: none;
}

.subhero {
    padding: clamp(44px, 7vw, 90px) clamp(16px, 4vw, 48px);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: 0;
    background: #fff;
}

.article-hero {
    padding: clamp(42px, 7vw, 84px) clamp(16px, 4vw, 48px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.article-meta span {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.summary-card {
    padding: clamp(22px, 4vw, 34px);
    border-radius: 0;
    border-block: 0;
    border-right: 0;
    box-shadow: none;
}

.feature-list {
    margin: 0;
    padding-left: 22px;
}

.feature-list li,
.steps li {
    margin-bottom: 10px;
}

.article-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 8px;
}

.toc h2 {
    font-size: 18px;
}

.toc a {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    text-decoration: none;
}

.article-content {
    max-width: 940px;
}

.intent-box,
.article-section {
    margin-bottom: 34px;
}

.intent-box {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #fff;
    background: var(--asphalt);
}

.faq-list {
    display: grid;
    gap: 10px;
}

details {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

summary {
    cursor: pointer;
    font-weight: 900;
}

.ad-slot {
    width: min(970px, calc(100% - 32px));
    min-height: 0;
    margin: 18px auto;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
}

.hero-copy .ad-slot,
.summary-card .ad-slot {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    padding: 28px clamp(16px, 4vw, 48px);
    color: #e4eee7;
    background: var(--asphalt);
}

.site-footer p {
    max-width: 860px;
    margin: 6px 0 0;
}

@media (max-width: 1120px) {
    .guide-grid,
    .keyword-map,
    .cluster-grid,
    .related-grid,
    .source-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-body {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
    }
}

@media (max-width: 860px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        grid-column: 1 / -1;
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-group,
    .nav-link,
    .nav-trigger {
        width: 100%;
    }

    .nav-dropdown {
        position: static;
        min-width: 0;
        margin: 4px 0 8px;
        box-shadow: none;
    }

    .home-hero,
    .intro-grid,
    .tools-panel,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .summary-card {
        border: 0;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 620px) {
    .guide-grid,
    .keyword-map,
    .cluster-grid,
    .related-grid,
    .source-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: auto;
    }

    .search-box {
        flex-direction: column;
        width: 100%;
    }

    .search-box button {
        min-height: 44px;
    }

    .hero-actions,
    .button {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
    }
}
