:root {
    color-scheme: dark;
    --page: #1b2530;
    --page-deep: #17212b;
    --surface: #26323e;
    --surface-raised: #2b3743;
    --surface-soft: #202b36;
    --border: #3a4652;
    --text: #f2f4f7;
    --muted: #a4afbb;
    --subtle: #71808e;
    --pink: #f04086;
    --pink-soft: #ff6aa4;
    --mint: #58d1a0;
    --gold: #f1bd68;
    --red: #ff777f;
    --shadow: 0 14px 36px rgba(5, 10, 17, .18);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
    --page: #f2f6fb;
    --page-deep: #eaf0f6;
    --surface: #fff;
    --surface-raised: #f8fafc;
    --surface-soft: #f3f6fa;
    --border: #d7e1eb;
    --text: #172a3d;
    --muted: #52677b;
    --subtle: #778a9b;
    --shadow: 0 14px 36px rgba(18, 41, 67, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: radial-gradient(ellipse at 82% 0, rgba(240, 64, 134, .075), transparent 30rem), var(--page);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--pink-soft); text-underline-offset: 3px; }
a:hover { color: var(--text); }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(240, 64, 134, .65);
    outline-offset: 3px;
}
::selection { color: #fff; background: var(--pink); }

.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page-deep) 92%, transparent); border-bottom: 1px solid var(--border); box-shadow: 0 8px 24px rgba(5, 10, 17, .12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.topbar, .navigation, .page-shell, .site-footer { width: min(100% - 48px, 1180px); margin-inline: auto; }
.topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: block; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 0 4px rgba(240, 64, 134, .09), 0 5px 16px rgba(240, 64, 134, .19); }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 17px; letter-spacing: -.025em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.pool-link { color: var(--pink-soft); font-size: 13px; font-weight: 650; text-decoration: none; }
.theme-toggle, .menu-toggle {
    min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 7px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text);
    background: var(--surface-soft); cursor: pointer; font: inherit; font-size: 12px; font-weight: 650;
    transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.theme-toggle:hover, .menu-toggle:hover { transform: translateY(-1px); border-color: rgba(240, 64, 134, .6); background: var(--surface); box-shadow: 0 5px 15px rgba(240, 64, 134, .1); }
.theme-icon { color: var(--gold); font-size: 17px; }
.menu-toggle { display: none; font-size: 20px; }
.navigation { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.navigation ul { display: flex; align-items: center; gap: 5px; padding: 0; margin: 0; list-style: none; }
.nav-link { display: block; padding: 7px 11px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease; }
.nav-link:hover, .nav-link[aria-current="page"] { transform: translateY(-1px); border-color: rgba(240, 64, 134, .28); color: var(--pink-soft); background: rgba(240, 64, 134, .12); }

.page-shell { padding-block: 34px 64px; }
.breadcrumbs { margin: 0 0 17px; color: var(--subtle); font-size: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.page-hero {
    position: relative; overflow: hidden; padding: clamp(26px, 5vw, 48px);
    margin-bottom: 25px; border: 1px solid rgba(240, 64, 134, .22); border-radius: 19px;
    background: linear-gradient(105deg, #242b3b 0%, #272a3b 52%, #34253a 100%); box-shadow: var(--shadow);
}
.page-hero::after { position: absolute; width: 240px; height: 240px; top: -135px; right: -60px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; content: ""; box-shadow: 0 0 0 27px rgba(255,255,255,.025), 0 0 0 55px rgba(255,255,255,.02); }
.eyebrow { margin: 0 0 8px; color: var(--pink-soft); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
.page-hero h1 { max-width: 760px; margin: 0; color: #f5f6f9; font-size: clamp(32px, 5vw, 48px); line-height: 1.12; letter-spacing: -.045em; }
.page-hero .lead { max-width: 720px; margin: 14px 0 0; color: #bac3ce; font-size: 16px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.content-page { min-width: 0; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.content-page > :last-child { margin-bottom: 0; }
.content-page h2 { margin: 32px 0 10px; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
.content-page h2:first-child { margin-top: 0; }
.content-page h3 { margin: 22px 0 7px; font-size: 16px; line-height: 1.35; }
.content-page p, .content-page li { color: var(--muted); }
.content-page p { margin-bottom: 14px; }
.content-page strong { color: var(--text); }
.content-page ul, .content-page ol { padding-left: 22px; margin: 10px 0 20px; }
.content-page li { padding-left: 3px; margin: 6px 0; }
.content-page li::marker { color: var(--pink); font-weight: 750; }
.content-page code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--pink-soft); background: var(--surface-soft); font-size: .9em; overflow-wrap: anywhere; }
.content-page hr { height: 1px; border: 0; margin: 28px 0; background: var(--border); }
.content-page a { font-weight: 600; }
.content-page table { width: 100%; margin: 16px 0 22px; border-collapse: collapse; font-size: 13px; }
.content-page th, .content-page td { padding: 11px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.content-page th { color: var(--text); background: var(--surface-soft); }
.content-page td { color: var(--muted); }
.callout { padding: 16px 18px; margin: 20px 0; border: 1px solid rgba(240,64,134,.25); border-left: 3px solid var(--pink); border-radius: 10px; color: var(--muted); background: var(--surface-soft); }
.callout strong { display: block; margin-bottom: 4px; }
.callout.warning { border-color: rgba(241,189,104,.3); border-left-color: var(--gold); }
.callout.success { border-color: rgba(88,209,160,.28); border-left-color: var(--mint); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 17px 0 24px; }
.info-card { padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.info-card h3 { margin: 0 0 6px; }
.info-card p { margin: 0; font-size: 13px; }
.step-list { display: grid; gap: 12px; padding: 0 !important; margin: 18px 0 24px !important; list-style: none; counter-reset: steps; }
.step-list li { position: relative; min-height: 72px; padding: 15px 16px 15px 58px !important; margin: 0 !important; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); counter-increment: steps; }
.step-list li::before { position: absolute; top: 16px; left: 16px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--pink); font-size: 12px; font-weight: 800; content: counter(steps); }
.step-list li::marker { content: ""; }
.step-list li strong { display: block; margin-bottom: 2px; }
.step-list li span { color: var(--muted); }
.side-card { position: sticky; top: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.side-card h2 { margin: 0 0 12px; font-size: 15px; }
.side-card ul { padding: 0; margin: 0; list-style: none; }
.side-card li { margin: 0; border-top: 1px solid var(--border); }
.side-card a { display: block; padding: 9px 0; color: var(--muted); font-size: 13px; text-decoration: none; }
.side-card a:hover { color: var(--pink-soft); }
.button-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; color: #fff !important; background: var(--pink); font-size: 13px; font-weight: 750; text-decoration: none; }
.button-link:hover { color: #fff !important; background: #d93378; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button-row > a:not(.button-link) { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 13px; font-weight: 650; text-decoration: none; transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease; }
.button-row > a:not(.button-link):hover { transform: translateY(-1px); border-color: rgba(240, 64, 134, .55); color: var(--pink-soft); background: var(--surface-raised); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 22px 30px; border-top: 1px solid var(--border); }
.footer-brand .brand-mark { width: 31px; height: 31px; }
.footer-brand strong { font-size: 14px; }
.footer-brand small { font-size: 8px; }
.site-footer p { margin: 0; color: var(--subtle); font-size: 11px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.footer-nav a:hover { color: var(--pink-soft); }

@media (max-width: 900px) {
    .content-grid { grid-template-columns: minmax(0, 1fr); }
    .side-card { position: static; }
    .side-card ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}
@media (max-width: 700px) {
    .topbar, .navigation, .page-shell, .site-footer { width: min(100% - 32px, 1180px); }
    .topbar { min-height: 64px; }
    html { scroll-padding-top: 76px; }
    .pool-link { display: none; }
    .menu-toggle { display: inline-flex; }
    .navigation { display: none; align-items: stretch; padding-block: 0 12px; }
    .navigation.is-open { display: flex; flex-direction: column; }
    .navigation ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-link { padding: 10px 12px; }
    .page-shell { padding-top: 23px; }
    .page-hero { padding: 28px 22px; }
    .page-hero .lead { font-size: 14px; }
    .content-page { padding: 21px 18px; }
    .card-grid { grid-template-columns: 1fr; }
    .site-footer { align-items: flex-start; flex-direction: column; }
    .content-page table { font-size: 12px; }
    .content-page th, .content-page td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
