:root {
    --bg: #f5efe6;
    --bg-alt: #fffaf5;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --surface-soft: rgba(255, 247, 237, 0.78);
    --text: #0f172a;
    --muted: #475569;
    --line: rgba(15, 23, 42, 0.12);
    --line-strong: rgba(15, 23, 42, 0.2);
    --accent: #f97316;
    --accent-strong: #c2410c;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --sage: #0f766e;
    --sage-soft: rgba(15, 118, 110, 0.1);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.1);
    --shadow-lg: 0 24px 80px rgba(15, 23, 42, 0.14);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    color: var(--text);
    font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", system-ui, sans-serif;
    line-height: 1.65;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 34%),
        linear-gradient(180deg, #fff9f2 0%, #f5efe6 52%, #efe8de 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 78%);
}

a {
    color: inherit;
}

a[href^="mailto:"] {
    overflow-wrap: anywhere;
    word-break: break-word;
}

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

::selection {
    color: #ffffff;
    background: rgba(194, 65, 12, 0.82);
}

:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.45);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -56px;
    left: 16px;
    z-index: 30;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--text);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    top: 16px;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 0 10px;
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background:
        linear-gradient(140deg, rgba(249, 115, 22, 0.24), rgba(15, 118, 110, 0.2)),
        #fff7ed;
    color: var(--accent-strong);
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.1);
}

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

.brand-copy strong {
    display: block;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", sans-serif;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.brand-copy span {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    white-space: nowrap;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
    border-color: var(--text);
    background: var(--text);
    color: #ffffff;
}

.page-main {
    padding: 34px 0 72px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.hero-grid,
.split-grid,
.policy-grid,
.cards-grid,
.summary-grid,
.support-grid,
.link-grid,
.step-grid {
    display: grid;
    gap: 20px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: stretch;
}

.hero-copy,
.hero-side,
.section-card,
.article,
.toc,
.footer-inner {
    padding: clamp(26px, 4vw, 42px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", sans-serif;
    letter-spacing: -0.04em;
    line-height: 1.06;
}

h1 {
    margin-top: 20px;
    font-size: clamp(2.8rem, 6vw, 4.9rem);
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
    font-size: 1.2rem;
}

.lead,
.article p,
.article li,
.section-copy,
.footer-text,
.metric-card span,
.link-card p,
.summary-card p,
.step p,
.toc p,
.notice p,
.small-copy {
    color: var(--muted);
}

.lead {
    margin: 18px 0 0;
    max-width: 64ch;
    font-size: clamp(1.02rem, 1.35vw, 1.2rem);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    max-width: 100%;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(194, 65, 12, 0.2);
}

.button-secondary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.62);
    color: var(--text);
}

.button-ghost {
    border-color: rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    color: var(--sage);
}

.hero-side {
    display: grid;
    align-content: start;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 242, 0.88)),
        var(--surface);
}

.label {
    display: inline-block;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.metric-grid,
.cards-grid,
.summary-grid,
.support-grid,
.link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.summary-card,
.link-card,
.step,
.notice,
.mini-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-md);
}

.metric-card,
.summary-card,
.link-card,
.mini-card {
    padding: 18px;
}

.metric-card strong,
.summary-card strong,
.link-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}

.section {
    margin-top: 28px;
}

.section-card > h2 {
    margin-bottom: 10px;
}

.section-card > .section-copy {
    margin: 0 0 24px;
    max-width: 68ch;
}

.cards-grid,
.summary-grid,
.support-grid,
.link-grid {
    align-items: stretch;
}

.summary-card {
    min-height: 100%;
}

.summary-card ul,
.article ul,
.article ol,
.check-list {
    margin: 0;
    padding-left: 20px;
}

.summary-card li + li,
.article li + li,
.check-list li + li {
    margin-top: 8px;
}

.split-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
}

.notice {
    padding: 18px 20px;
}

.notice strong {
    display: block;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.notice-warning {
    background: var(--accent-soft);
    border-color: rgba(249, 115, 22, 0.2);
}

.notice-success {
    background: var(--sage-soft);
    border-color: rgba(15, 118, 110, 0.18);
}

.notice-danger {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.18);
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.26);
}

.link-card span {
    color: var(--accent-strong);
    font-weight: 700;
}

.policy-grid {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    align-items: start;
}

.toc {
    position: sticky;
    top: 106px;
    background: rgba(255, 255, 255, 0.72);
}

.toc h2 {
    font-size: 1.3rem;
}

.toc p {
    margin: 10px 0 18px;
}

.toc nav {
    display: grid;
    gap: 8px;
}

.toc a {
    padding: 11px 12px;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.toc a:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.article {
    background: rgba(255, 255, 255, 0.8);
}

.article section + section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.article h2 {
    margin-bottom: 14px;
    font-size: 1.45rem;
}

.article p {
    margin: 0 0 14px;
}

.article a,
.footer a {
    color: var(--accent-strong);
}

.article code,
.inline-code {
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.06);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.95em;
}

.step-grid {
    grid-template-columns: 1fr;
}

.step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
}

.step-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--text);
    color: #ffffff;
    font-weight: 800;
}

.step strong {
    display: block;
    margin-bottom: 6px;
}

.article,
.summary-card,
.metric-card,
.link-card,
.notice,
.step,
.badge,
.button,
.top-nav a,
.footer-nav a {
    overflow-wrap: anywhere;
}

.footer {
    padding: 0 0 42px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-md);
}

.footer-text {
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    text-decoration: none;
}

.footer-nav a:hover {
    background: rgba(15, 23, 42, 0.06);
}

.anchor {
    scroll-margin-top: 110px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .panel,
    .metric-card,
    .summary-card,
    .link-card,
    .button,
    .step {
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    }

    .hero-copy,
    .hero-side,
    .section-card,
    .toc,
    .article {
        animation: rise 520ms ease both;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .split-grid,
    .policy-grid,
    .metric-grid,
    .cards-grid,
    .summary-grid,
    .support-grid,
    .link-grid {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-shell {
        width: min(calc(100% - 20px), var(--container));
    }

    .site-header {
        position: static;
        padding-top: 12px;
    }

    .header-inner,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
        border-radius: 28px;
    }

    .top-nav,
    .footer-nav {
        justify-content: flex-start;
    }

    .top-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .top-nav a {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 8px;
        font-size: 0.8rem;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
        word-break: break-word;
        border-radius: 16px;
    }

    .footer-nav a,
    .button {
        width: 100%;
    }

    .brand-copy span {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    body::before {
        background-size: 22px 22px;
    }

    .page-main {
        padding: 18px 0 42px;
    }

    .section {
        margin-top: 18px;
    }

    .header-inner,
    .hero-copy,
    .hero-side,
    .section-card,
    .article,
    .toc,
    .footer-inner {
        padding: 18px;
    }

    .panel,
    .footer-inner,
    .header-inner {
        border-radius: 22px;
    }

    h1 {
        margin-top: 16px;
        font-size: clamp(2rem, 11vw, 2.8rem);
        line-height: 1.08;
    }

    h2 {
        font-size: clamp(1.35rem, 7vw, 1.8rem);
    }

    .lead {
        font-size: 1rem;
    }

    .eyebrow,
    .badge {
        width: 100%;
        justify-content: center;
        text-align: center;
        border-radius: 16px;
    }

    .meta-row,
    .cta-row {
        gap: 10px;
    }

    .metric-card,
    .summary-card,
    .link-card,
    .notice,
    .step,
    .mini-card {
        padding: 16px;
    }

    .step {
        grid-template-columns: 1fr;
    }

    .step-index {
        width: 38px;
        height: 38px;
    }

    .toc nav {
        gap: 10px;
    }

    .toc a {
        padding: 13px 14px;
    }

    .top-nav a {
        min-height: 42px;
        padding: 9px 6px;
        font-size: 0.74rem;
    }

    .footer-nav a,
    .button {
        min-height: 50px;
        padding: 14px 16px;
    }
}
