:root {
    color-scheme: light;
    --ink: #152533;
    --muted: #667985;
    --teal: #0f766e;
    --teal-dark: #0a5c56;
    --amber: #f4b942;
    --paper: #ffffff;
    --canvas: #f2f6f7;
    --line: #dbe4e8;
    --soft: #f7f9fb;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}

a {
    color: var(--teal-dark);
}

button,
input,
select {
    font: inherit;
}

.document-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(20px, calc((100vw - 1040px) / 2));
    border-bottom: 1px solid rgba(16, 24, 40, 0.09);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.document-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.document-brand span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #5ee0bd;
    font-size: 0.56rem;
    letter-spacing: -0.03em;
}

.document-home {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #435269;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
}

.document-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 60px;
}

.doc-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 6vw, 64px);
    border-radius: 18px;
    background:
        radial-gradient(circle at 86% 15%, rgba(244, 185, 66, 0.28), transparent 27%),
        linear-gradient(135deg, #152533 0%, #123f3b 100%);
    color: #ffffff;
}

.doc-hero::after {
    position: absolute;
    right: -44px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 52px;
    content: "";
    transform: rotate(14deg);
}

.doc-eyebrow {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #8ee3d6;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.doc-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.doc-lead {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 18px 0 0;
    color: #d9e5e3;
    font-size: clamp(0.86rem, 1.8vw, 1rem);
    line-height: 1.85;
    word-break: keep-all;
}

.doc-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 24px;
}

.doc-meta span {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f7f7;
    font-size: 0.66rem;
    font-weight: 800;
}

.doc-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    margin-top: 22px;
}

.doc-toc {
    position: sticky;
    top: 78px;
    align-self: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
}

.doc-toc strong {
    display: block;
    margin-bottom: 9px;
    color: #314158;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.doc-toc a {
    display: block;
    padding: 7px 8px;
    border-radius: 7px;
    color: #667085;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.doc-toc a:hover,
.doc-toc a.active {
    background: #eaf6f3;
    color: var(--teal-dark);
}

.doc-content {
    min-width: 0;
}

.doc-section {
    margin-bottom: 14px;
    padding: clamp(22px, 4vw, 36px);
    scroll-margin-top: 86px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 0 8px 26px rgba(16, 24, 40, 0.045);
}

.section-kicker {
    margin: 0 0 7px;
    color: var(--teal);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.doc-section h2 {
    margin: 0 0 16px;
    color: #152941;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.3;
    letter-spacing: -0.04em;
    word-break: keep-all;
}

.doc-section h3 {
    margin: 26px 0 9px;
    color: #20354e;
    font-size: 0.98rem;
    letter-spacing: -0.025em;
}

.doc-section p,
.doc-section li,
.doc-section dd,
.doc-section td,
.doc-section th {
    color: var(--muted);
    font-size: 0.82rem;
    word-break: keep-all;
}

.doc-section p {
    margin: 0 0 12px;
}

.doc-section ul,
.doc-section ol {
    margin: 10px 0 0;
    padding-left: 20px;
}

.doc-section li + li {
    margin-top: 7px;
}

.fact-grid,
.feature-grid,
.step-grid {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact-card,
.feature-card,
.step-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e3e9ef;
    border-radius: 10px;
    background: var(--soft);
}

.fact-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--teal-dark);
    font-size: 1.2rem;
}

.fact-card span,
.feature-card p,
.step-card p {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.65;
}

.feature-card h3,
.step-card h3 {
    margin: 0 0 7px;
    font-size: 0.9rem;
}

.feature-card p,
.step-card p {
    margin: 0;
}

.step-number {
    display: inline-grid;
    width: 30px;
    height: 24px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #dff3ef;
    color: var(--teal-dark);
    font-size: 0.65rem;
    font-weight: 900;
}

.callout {
    margin-top: 18px;
    padding: 16px 18px;
    border-left: 3px solid var(--amber);
    background: #fff9eb;
    color: #6e541b;
    font-size: 0.78rem;
    line-height: 1.75;
}

.callout strong {
    color: #503b0e;
}

.callout.safe {
    border-left-color: var(--teal);
    background: #edf8f5;
    color: #365c57;
}

.table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.doc-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.doc-table th,
.doc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e6ebf0;
    text-align: left;
    vertical-align: top;
}

.doc-table th {
    background: #f3f7f8;
    color: #314158;
    font-size: 0.72rem;
}

.doc-table tr:last-child td {
    border-bottom: 0;
}

.definition-list {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0;
    margin: 16px 0 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.definition-list dt,
.definition-list dd {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #e6ebf0;
}

.definition-list dt {
    background: #f3f7f8;
    color: #34465c;
    font-size: 0.75rem;
    font-weight: 900;
}

.definition-list dd:last-child,
.definition-list dt:nth-last-child(2) {
    border-bottom: 0;
}

.ball-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.ball-chip {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #dfe8ef;
    color: #17283d;
    font-size: 0.8rem;
    font-weight: 900;
}

.ball-chip:nth-child(-n+2) {
    background: #f8d76c;
}

.ball-chip:nth-child(n+3):nth-child(-n+4) {
    background: #8ec9e8;
}

.ball-chip:nth-child(n+5) {
    background: #9fdbb2;
}

.faq-list {
    margin-top: 12px;
}

.faq-list details {
    border-top: 1px solid #e3e9ef;
}

.faq-list details:last-child {
    border-bottom: 1px solid #e3e9ef;
}

.faq-list summary {
    padding: 15px 2px;
    color: #263950;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
}

.faq-list details p {
    padding: 0 2px 14px;
}

.doc-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.doc-source-list a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #bfdbd5;
    border-radius: 8px;
    background: #eff9f6;
    color: var(--teal-dark);
    font-size: 0.7rem;
    font-weight: 900;
    text-decoration: none;
}

.doc-footnote {
    margin: 24px 2px 0;
    color: #7a8797;
    font-size: 0.67rem;
    text-align: center;
}

body.is-framed .document-topbar {
    display: none;
}

body.is-framed .document-shell {
    width: min(1000px, calc(100% - 28px));
    padding-top: 18px;
}

body.is-framed .doc-toc {
    top: 18px;
}

@media (max-width: 760px) {
    .document-shell,
    body.is-framed .document-shell {
        width: min(100% - 20px, 1040px);
        padding-top: 10px;
    }

    .doc-hero {
        border-radius: 12px;
    }

    .doc-layout {
        display: block;
        margin-top: 10px;
    }

    .doc-toc {
        position: static;
        display: flex;
        margin-bottom: 10px;
        overflow-x: auto;
        gap: 4px;
        padding: 10px;
        white-space: nowrap;
    }

    .doc-toc strong {
        display: none;
    }

    .doc-toc a {
        flex: 0 0 auto;
        padding: 8px 10px;
        background: #f5f7f9;
    }

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

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

    .definition-list {
        grid-template-columns: 1fr;
    }

    .definition-list dt {
        border-bottom: 0;
    }

    .definition-list dd {
        padding-top: 2px;
    }
}

@media (max-width: 440px) {
    .document-topbar {
        padding: 0 12px;
    }

    .doc-hero {
        padding: 28px 22px;
    }

    .doc-section {
        padding: 22px 18px;
        border-radius: 10px;
    }
}

@media print {
    .document-topbar,
    .doc-toc {
        display: none !important;
    }

    body,
    .document-shell {
        width: 100%;
        background: #ffffff;
    }

    .doc-layout {
        display: block;
    }

    .doc-section,
    .doc-hero {
        break-inside: avoid;
        box-shadow: none;
    }
}
