:root {
    --canvas: #f7f7f4;
    --surface: #ffffff;
    --surface-soft: #fafaf7;
    --ink: #26251e;
    --body: #5a5852;
    --muted: #807d72;
    --hairline: #e6e5e0;
    --hairline-strong: #cfcdc4;
    --primary: #f54e00;
    --primary-dark: #d04200;
    --mint: #dfece1;
    --blue-soft: #e6edf8;
    --lavender: #eee8f7;
    --gold: #f3dfbe;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow-focus: 0 0 0 3px rgba(245, 78, 0, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--body);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 40px);
    background: rgba(247, 247, 244, 0.94);
    border-bottom: 1px solid var(--hairline);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--ink);
    color: var(--canvas);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
    line-height: 1.1;
}

.brand small {
    max-width: 230px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.nav-toggle {
    min-height: 42px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    padding: 0 14px;
    font: inherit;
}

.site-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.site-nav.is-open {
    display: flex;
}

.site-nav a {
    min-height: 44px;
    border-radius: var(--radius-sm);
    color: var(--body);
    padding: 10px 12px;
}

.site-nav a.is-active,
.site-nav a:hover {
    background: var(--ink);
    color: var(--canvas);
}

.home-hero,
.guide-index,
.method-band,
.article-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-hero {
    padding: 36px 0 64px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--hairline-strong);
    text-underline-offset: 4px;
}

.hero-grid {
    display: grid;
    gap: 24px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

h1 {
    max-width: 820px;
    font-size: clamp(38px, 8vw, 76px);
}

h2 {
    font-size: clamp(28px, 4vw, 44px);
}

h3 {
    font-size: 22px;
}

.lead {
    max-width: 700px;
    margin: 20px 0 0;
    color: var(--body);
    font-size: clamp(18px, 2vw, 21px);
}

.hero-note,
.guide-card,
.toc,
.related-card,
details {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.hero-note {
    align-self: end;
    padding: 24px;
}

.hero-note strong {
    color: var(--ink);
}

.guide-index {
    padding: 56px 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading p:last-child {
    margin-bottom: 0;
}

.card-grid,
.related-grid {
    display: grid;
    gap: 16px;
}

.guide-card {
    min-height: 240px;
    padding: 24px;
    transition: transform 160ms ease, border-color 160ms ease;
}

.guide-card:hover {
    transform: translateY(-3px);
    border-color: var(--hairline-strong);
}

.guide-card span,
.related-card span {
    display: inline-flex;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--ink);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.guide-card p {
    margin-bottom: 0;
}

.method-band {
    display: grid;
    gap: 28px;
    margin-bottom: 72px;
    border-radius: 24px;
    background: var(--ink);
    color: var(--canvas);
    padding: clamp(28px, 5vw, 56px);
}

.method-band h2,
.method-band .eyebrow {
    color: var(--canvas);
}

.step-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-list li {
    display: grid;
    gap: 4px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    padding: 18px;
}

.step-list strong {
    color: #fff;
}

.article-shell {
    padding: 36px 0 72px;
}

.article-hero {
    display: grid;
    gap: 28px;
    margin-bottom: 44px;
}

.article-hero figure {
    margin: 0;
}

.article-hero img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 22px;
    object-fit: cover;
}

.article-hero figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.article-layout {
    display: grid;
    gap: 28px;
}

.toc {
    align-self: start;
    padding: 18px;
}

.toc strong,
.toc a {
    display: block;
}

.toc strong {
    margin-bottom: 10px;
    color: var(--ink);
}

.toc a {
    border-top: 1px solid var(--hairline);
    padding: 10px 0;
    color: var(--body);
}

.article-content {
    min-width: 0;
}

.article-content section {
    margin-bottom: 44px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--hairline);
}

.article-content p {
    max-width: 760px;
}

.check-list {
    display: grid;
    gap: 10px;
    max-width: 760px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 12px 14px 12px 42px;
}

.check-list li::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--primary);
}

.faq-block details {
    margin-top: 12px;
    padding: 0;
}

.faq-block summary {
    cursor: pointer;
    color: var(--ink);
    font-weight: 700;
    padding: 18px 20px;
}

.faq-block details p {
    margin: 0;
    padding: 0 20px 20px;
}

.related-block {
    margin-bottom: 0;
    border-bottom: 0;
    padding-bottom: 0;
}

.related-card {
    display: block;
    padding: 20px;
}

.related-card strong,
.related-card small {
    display: block;
}

.related-card strong {
    color: var(--ink);
    font-size: 20px;
}

.related-card small {
    margin-top: 8px;
    color: var(--body);
}

.site-footer {
    display: grid;
    gap: 28px;
    padding: 44px clamp(16px, 4vw, 40px);
    background: var(--ink);
    color: var(--canvas);
}

.footer-brand,
.site-footer .brand small,
.site-footer p,
.site-footer a {
    color: var(--canvas);
}

.site-footer .brand-mark {
    background: var(--canvas);
    color: var(--ink);
}

.site-footer p {
    max-width: 520px;
    color: rgba(247, 247, 244, 0.78);
}

.site-footer nav {
    display: grid;
    gap: 10px;
}

.site-footer nav a {
    color: rgba(247, 247, 244, 0.82);
}

@media (min-width: 720px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .site-nav a {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .hero-grid,
    .article-hero,
    .method-band,
    .site-footer {
        grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .article-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .toc {
        position: sticky;
        top: 96px;
    }

    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guide-card:nth-child(2) {
        background: var(--mint);
    }

    .guide-card:nth-child(3) {
        background: var(--lavender);
    }

    .guide-card:nth-child(4) {
        background: var(--gold);
    }
}
