:root {
    color-scheme: light only;
    --ink: #0B1220;
    --ink-2: #475569;
    --ink-3: #7A8699;
    --brand: #5B4FC9;
    --brand-tint: #F3F1FB;
    --accent: #0E9F6E;
    --amber: #D97706;
    --bg: #FFFFFF;
    --bg-soft: #FAFAFC;
    --surface: #FFFFFF;
    --line: #E8EAF0;
    --line-strong: #D9DDE7;
    --shadow-xs: 0 1px 2px rgba(11, 18, 32, 0.04);
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.sprite { position: absolute; }
.ico {
    width: 20px; height: 20px; flex: none;
    stroke: currentColor; fill: none; stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round;
}

.nav {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; height: 72px;
}
.brand {
    display: inline-flex; align-items: center; gap: 11px;
    font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em;
    color: var(--ink); text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
    position: relative; color: var(--ink-2); text-decoration: none;
    font-size: 0.9rem; font-weight: 500; transition: color 0.16s ease;
}
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
    height: 1.5px; background: var(--brand);
    transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--brand); font-weight: 600; }
.nav-links a.is-active::after { transform: scaleX(1); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 9px; padding: 9px 17px; border-radius: var(--r-sm);
    font-weight: 600; font-size: 0.875rem; text-decoration: none;
    border: 1px solid transparent; background: var(--ink); color: #fff;
    white-space: nowrap; transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: #1B2537; transform: translateY(-1px); }
.btn .ico { width: 16px; height: 16px; }

.doc-head {
    position: relative; overflow: hidden;
    padding: 64px 0 44px; border-bottom: 1px solid var(--line);
}
.doc-head::before {
    content: ""; position: absolute; inset: -60% 55% 20% -15%;
    background: radial-gradient(closest-side, rgba(91, 79, 201, 0.14), transparent);
    pointer-events: none;
}
.doc-head .wrap { position: relative; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px; color: var(--brand);
    font-weight: 600; font-size: 0.74rem; letter-spacing: 0.16em;
    text-transform: uppercase; margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: 0.55; }
h1 {
    font-size: clamp(2.1rem, 4.6vw, 2.95rem); font-weight: 800;
    letter-spacing: -0.042em; line-height: 1.08; margin-bottom: 18px;
}
.dates { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: 5px 13px; font-size: 0.79rem;
    font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-xs);
}
.chip .ico { width: 14px; height: 14px; color: var(--brand); }

.doc-body { padding: 56px 0 96px; }
.doc-grid {
    display: grid; grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px; align-items: start;
}
.toc {
    position: sticky; top: 100px;
    max-height: calc(100vh - 130px); overflow-y: auto;
}
.toc h2 {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: 16px;
}
.toc ol { list-style: none; border-left: 1px solid var(--line); }
.toc a {
    display: block; padding: 7px 0 7px 16px; margin-left: -1px;
    border-left: 1.5px solid transparent; color: var(--ink-2);
    text-decoration: none; font-size: 0.87rem; font-weight: 500;
    line-height: 1.45; transition: color 0.16s ease, border-color 0.16s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--brand); font-weight: 600; border-left-color: var(--brand); }

.content { max-width: 680px; }
.intro {
    font-size: 1.06rem; line-height: 1.75;
    color: var(--ink-2); margin-bottom: 30px;
}
.summary {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-left: 2px solid var(--brand); border-radius: var(--r);
    padding: 26px 28px; margin-bottom: 60px;
}
.summary h2 {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.summary ul { list-style: none; }
.summary li {
    display: flex; gap: 12px; align-items: flex-start;
    color: var(--ink-2); font-size: 0.95rem; line-height: 1.65; margin-bottom: 10px;
}
.summary li:last-child { margin-bottom: 0; }
.summary .ico { width: 17px; height: 17px; margin-top: 4px; color: var(--accent); stroke-width: 2.2; }

section { margin-bottom: 52px; scroll-margin-top: 104px; }
section h2 {
    display: flex; gap: 12px; font-size: 1.22rem; font-weight: 600;
    letter-spacing: -0.028em; line-height: 1.35; margin-bottom: 16px;
}
section h2 .n { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; flex: none; }
section h3 { font-size: 0.99rem; font-weight: 600; letter-spacing: -0.015em; margin: 26px 0 10px; }
p { margin-bottom: 16px; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }
.content ul.bullets { list-style: none; margin: 0 0 16px; color: var(--ink-2); }
.content ul.bullets li {
    position: relative; padding-left: 18px; margin-bottom: 8px; line-height: 1.65;
}
.content ul.bullets li::before {
    content: ""; position: absolute; left: 0; top: 0.66em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong);
}

.perm { list-style: none; margin-top: 22px; border-top: 1px solid var(--line); }
.perm li {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 20px 2px; border-bottom: 1px solid var(--line);
}
.perm-ico {
    width: 34px; height: 34px; border-radius: 10px; display: grid;
    place-items: center; flex: none; margin-top: 2px;
    background: var(--surface); border: 1px solid var(--line-strong);
    color: var(--brand); box-shadow: var(--shadow-xs);
}
.perm-ico .ico { width: 17px; height: 17px; }
.perm-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.perm-t strong { font-size: 0.97rem; font-weight: 600; letter-spacing: -0.015em; }
.perm-body { color: var(--ink-2); font-size: 0.93rem; line-height: 1.68; }
.pill {
    display: inline-flex; align-items: center; border-radius: 999px;
    padding: 2px 9px; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.pill-opt { background: #FEF6E7; color: #92400E; }
.pill-req { background: var(--brand-tint); color: var(--brand); }

code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.82em; color: var(--ink-3); font-weight: 500;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.note {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: var(--r); padding: 20px 24px; margin: 22px 0 0;
}
.note p { font-size: 0.92rem; line-height: 1.68; margin: 0; }
.note strong { color: var(--ink); font-weight: 600; }

.table-scroll {
    overflow-x: auto; border: 1px solid var(--line);
    border-radius: var(--r); margin-top: 22px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 460px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--ink-3); background: var(--bg-soft); white-space: nowrap;
}
td { color: var(--ink-2); line-height: 1.6; }
td strong { color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: none; }

.contact-card {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: var(--r); padding: 28px 30px;
}
.contact-card a { font-weight: 600; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

footer { border-top: 1px solid var(--line); padding: 56px 0 44px; }
.foot-grid {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr;
    gap: 48px; padding-bottom: 40px;
}
.foot-grid > div:first-child p {
    color: var(--ink-2); font-size: 0.91rem; line-height: 1.7;
    margin-top: 16px; max-width: 24rem;
}
.foot-col h4 {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: 16px;
}
.foot-col a {
    display: block; color: var(--ink-2); text-decoration: none;
    font-size: 0.91rem; font-weight: 500; margin-bottom: 11px;
    transition: color 0.16s ease;
}
.foot-col a:hover { color: var(--brand); }
.foot-bottom {
    padding-top: 26px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 12px 24px;
    justify-content: space-between; align-items: center;
    color: var(--ink-3); font-size: 0.85rem;
}

@media (max-width: 900px) {
    .doc-grid { grid-template-columns: 1fr; gap: 40px; }
    .toc {
        position: static; max-height: none;
        background: var(--bg-soft); border: 1px solid var(--line);
        border-radius: var(--r); padding: 22px 24px;
    }
    .toc ol { columns: 2; column-gap: 28px; border-left: 0; }
    .toc a { padding-left: 0; border-left: 0; }
    .toc a.is-current { border-left: 0; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .wrap { padding: 0 20px; }
    .nav-links { display: none; }
    .doc-head { padding: 40px 0 32px; }
    .doc-body { padding: 40px 0 68px; }
    .toc ol { columns: 1; }
    .summary { padding: 22px 20px; }
    .foot-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; }
}
