.lgx { --lx-r: 22px; max-width: 1180px; padding-top: 22px; }
.lx { display: grid; gap: 18px; min-width: 0; }
.lx a:not(.lx-switch a, .lx-toc a, .lx-n) { color: var(--lilac); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(169,204,255,.3); }
.lx a:not(.lx-switch a, .lx-toc a, .lx-n):hover { color: #fff; border-color: currentColor; }
.lx strong { color: var(--text); }

.lx .legal-fill { padding: 0 4px; border-radius: 4px; color: #1a1300; background: #ffd45c; }

.lx-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: end;
    border-radius: 28px; border: 1px solid var(--acc-line);
    background:
        radial-gradient(520px 300px at 88% 20%, rgba(77,141,255,.38), transparent 70%),
        radial-gradient(420px 260px at 10% 120%, rgba(247,201,75,.12), transparent 70%),
        linear-gradient(135deg, #16233d 0%, #111a2b 55%, #0d1422 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 60px -40px rgba(77,141,255,.6);
}
.lx-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
            mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.lx-hero-tx { padding: 26px 0 30px 34px; min-width: 0; }

.lx-switch {
    display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px;
    background: rgba(7,11,18,.55); border: 1px solid var(--line-2);
}
.lx-switch a {
    padding: 8px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 700; color: var(--muted);
    text-decoration: none; white-space: nowrap; transition: color .18s, background .18s;
}
.lx-switch a:hover { color: var(--text); }
.lx-switch a.on { color: #fff; background: var(--acc-grad); box-shadow: var(--acc-sh); }

.lx-hero h1 {
    margin: 18px 0 8px; font-family: var(--f-display); font-weight: 800; letter-spacing: -.01em;
    font-size: clamp(26px, 3.2vw, 42px); line-height: 1.08; overflow-wrap: break-word; hyphens: auto;
    background: linear-gradient(180deg, #fff 30%, #b9d3ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lx-lead { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.5; max-width: 560px; }
.lx-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.lx-meta > span {
    padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--muted);
    background: rgba(7,11,18,.45); border: 1px solid var(--line-soft);
}
.lx-meta b { color: var(--text); font-weight: 800; }

.lx-hero-art { position: relative; align-self: stretch; min-height: 250px; }
.lx-hero-art::after {
    content: ""; position: absolute; left: 50%; bottom: -8px; width: 200px; height: 250px; margin-left: -100px;
    background: url(../assets/art/lion/doc-scroll.webp?v=2) center bottom / contain no-repeat;
    filter: drop-shadow(0 20px 26px rgba(0,0,0,.45)); transform-origin: 50% 100%; animation: lx-sway 5s ease-in-out infinite;
}
.lx[data-doc="privacy"] .lx-hero-art::after { background-image: url(../assets/art/lion/doc-shield.webp?v=2); }
.lx-ring {
    position: absolute; left: 50%; bottom: -70px; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%;
    background: radial-gradient(circle, rgba(107,160,255,.42), rgba(77,141,255,.08) 58%, transparent 70%);
}
.lx-mark {
    position: absolute; z-index: 1; display: grid; place-items: center; border-radius: 14px; font: 800 19px/1 var(--f-display); font-style: normal;
    color: #fff; background: var(--acc-grad); box-shadow: var(--acc-sh); animation: lx-float 4.6s ease-in-out infinite;
}
.lx-mark svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lx-mark.m1 { width: 44px; height: 44px; top: 30px; left: 20px; transform: rotate(-12deg); font: 800 24px/1 Georgia, "Times New Roman", serif; }
.lx-mark.m2 { width: 40px; height: 34px; top: 66px; right: 22px; font-size: 13px; border-radius: 11px; background: var(--gold-grad); color: var(--gold-ink); box-shadow: 0 10px 22px -10px rgba(247,201,75,.9); animation-delay: -1.6s; }
.lx[data-doc="privacy"] .lx-mark.m2 { width: 36px; height: 36px; }
.lx-mark.m3 { width: 28px; height: 28px; top: 132px; left: 30px; font-size: 14px; border-radius: 9px; background: var(--green-grad); color: var(--green-ink); box-shadow: 0 10px 22px -10px rgba(54,216,154,.9); animation-delay: -3s; }
@keyframes lx-float { 50% { translate: 0 -9px; } }
@keyframes lx-sway { 50% { rotate: 2deg; } }

.lx-note {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px;
    color: #ffe7b0; font-size: 14px; line-height: 1.6;
    background: linear-gradient(180deg, rgba(247,201,75,.12), rgba(247,201,75,.04)); box-shadow: inset 0 0 0 1px rgba(247,201,75,.28);
}
.lx-note::before {
    content: "18+"; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    font: 800 13px/1 var(--f-display); color: var(--gold-ink); background: var(--gold-grad);
}
.lx-note p { margin: 0; }
.lx-note strong { color: #fff3d1; }
.lx-note.legal-note--info { color: var(--dim); background: linear-gradient(180deg, rgba(77,141,255,.12), rgba(77,141,255,.04)); box-shadow: inset 0 0 0 1px var(--acc-line); }
.lx-note.legal-note--info::before { content: "i"; font-size: 18px; color: #fff; background: var(--acc-grad); }

.lx-sum { padding: 22px; border-radius: var(--lx-r); background: var(--panel); border: 1px solid rgba(255,255,255,.06); }
.lx-sum h2 { margin: 0 0 14px; font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.lx-sum ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lx-sum li {
    position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; align-content: start;
    padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft);
    transition: border-color .2s, background .2s, translate .2s;
}
.lx-sum li:hover { translate: 0 -2px; background: color-mix(in srgb, var(--t) 6%, rgba(255,255,255,.03)); border-color: color-mix(in srgb, var(--t) 34%, transparent); }
.lx-sum li i {
    grid-row: span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--t);
    background: color-mix(in srgb, var(--t) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent);
}
.lx-sum li svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lx-sum li b { font-size: 14.5px; line-height: 1.3; margin: 1px 0 4px; }
.lx-sum li span { color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.lx-sum-fn { margin: 12px 0 0; color: var(--faint); font-size: 12.5px; }

.lx-body { display: grid; grid-template-columns: 284px minmax(0, 1fr); gap: 18px; align-items: start; }
.lx-toc {
    position: sticky; top: 92px; padding: 14px 10px 10px; border-radius: var(--lx-r);
    background: var(--panel); border: 1px solid rgba(255,255,255,.06);
    max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
}
.lx-toc .legal-toc__title { padding: 0 10px 8px; font-size: 12px; font-weight: 600; color: var(--faint); }
.lx-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lx-toc a {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px;
    color: var(--dim); font-size: 13.5px; font-weight: 600; line-height: 1.3; text-decoration: none;
    transition: background .18s, color .18s;
}
.lx-toc a:hover { color: var(--text); background: var(--surface-2); }
.lx-toc a i {
    flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-style: normal;
    font: 800 12px/1 var(--f-display); color: var(--muted); background: var(--surface-3); transition: background .18s, color .18s;
}
.lx-toc a.on { color: #fff; background: rgba(77,141,255,.13); box-shadow: inset 0 0 0 1px var(--acc-line); }
.lx-toc a.on i { color: #fff; background: var(--acc-grad); }
.lx-toc a.done i { color: var(--acc-2); }
.lx-prog { height: 3px; margin: 10px 10px 2px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lx-prog i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--acc-grad); transition: width .15s linear; }

.lx-main { display: grid; gap: 16px; min-width: 0; }
.lx-sec {
    position: relative; overflow: hidden; padding: 22px 26px 12px; scroll-margin-top: 92px;
    border-radius: var(--lx-r); background: var(--panel); border: 1px solid rgba(255,255,255,.06);
    transition: border-color .4s, box-shadow .4s;
}
.lx-sec::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 110px; pointer-events: none;
    background: radial-gradient(360px 110px at 0 0, rgba(77,141,255,.12), transparent 75%);
}
.lx-sec.is-hit { border-color: var(--acc-line-2); box-shadow: 0 0 0 4px rgba(77,141,255,.14); }
.lx-sec h2 {
    position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
    font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -.005em;
    overflow-wrap: anywhere;
}
.lx-n {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
    font: 800 15px/1 var(--f-display); color: var(--acc-2); text-decoration: none;
    background: rgba(77,141,255,.14); box-shadow: inset 0 0 0 1px var(--acc-line);
}

.lx-link {
    flex: none; margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px;
    color: var(--muted); background: transparent; cursor: pointer; opacity: 0; transition: opacity .18s, background .18s, color .18s;
}
.lx-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-sec:hover .lx-link, .lx-link:focus-visible { opacity: 1; }
.lx-link:hover { color: var(--text); background: var(--surface-3); }
@media (hover: none) { .lx-link { opacity: 1; } }

.lx-sec p { position: relative; margin: 0 0 12px; color: var(--dim); font-size: 14.5px; line-height: 1.72; }
.lx-sec p.sub { margin-left: 6px; padding-left: 16px; border-left: 2px solid var(--line-soft); }
.lx .pn { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 2px; }

.lx-table { position: relative; display: grid; gap: 6px; margin: 0 0 14px; }
.lx-table > div {
    display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; padding: 12px 14px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft);
}
.lx-table b { font-size: 14px; color: var(--text); }
.lx-table span { color: var(--dim); font-size: 14px; line-height: 1.55; }

.lx-cards { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.lx-card { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; }
.lx-card small { font-size: 12px; font-weight: 600; color: var(--faint); }
.lx-card b { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.lx-card[data-link] { grid-column: 1 / -1; }

@media (max-width: 1100px) {
    .lx-sum ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lx-body { grid-template-columns: minmax(0, 1fr); }

    .lx-toc {
        top: var(--lx-top, 59px); z-index: 3; max-height: none; overflow: visible; padding: 8px 0 0;
        margin: 0 calc(var(--pad-x) * -1); border-radius: 0; border-width: 0 0 1px;
        background: rgba(10,15,24,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    }
    .lx-toc .legal-toc__title { display: none; }
    .lx-toc ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--pad-x) 8px; }
    .lx-toc ol::-webkit-scrollbar { display: none; }
    .lx-toc a { flex: none; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; font-size: 13px; }
    .lx-toc a i { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; }
    .lx-prog { margin: 0; height: 2px; border-radius: 0; }
    .lx-sec { scroll-margin-top: 64px; }
}
@media (max-width: 760px) {
    .lgx { padding-top: 14px; }
    .lx { gap: 14px; }
    .lx-hero { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
    .lx-hero-tx { position: relative; z-index: 1; padding: 18px 16px 20px; }
    .lx-hero-art { position: absolute; right: -10px; bottom: 0; min-height: 0; width: 120px; height: 150px; opacity: .95; }
    .lx-hero-art::after { width: 112px; height: 140px; margin-left: -56px; bottom: 0; }
    .lx-ring { width: 160px; height: 160px; margin-left: -80px; bottom: -40px; }
    .lx-mark { display: none; }
    .lx-switch { display: flex; }
    .lx-switch a { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }
    .lx-hero h1 { margin-top: 16px; font-size: 22px; }
    .lx-lead { font-size: 14px; padding-right: 92px; }
    .lx-meta { margin-top: 16px; gap: 6px; padding-right: 92px; }
    .lx-meta > span { font-size: 12px; padding: 5px 10px; }
    .lx-note { padding: 14px; gap: 12px; font-size: 13.5px; }
    .lx-note::before { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
    .lx-sum { padding: 16px 12px; border-radius: 18px; }
    .lx-sum ul { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .lx-sum li { padding: 12px; }
    .lx-sec { padding: 16px 14px 6px; border-radius: 18px; }
    .lx-sec h2 { font-size: 16.5px; gap: 10px; }
    .lx-n { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
    .lx-sec p { font-size: 14px; line-height: 1.68; }
    .lx-sec p.sub { margin-left: 2px; padding-left: 12px; }
    .lx-table > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .lx-cards { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .side, .topbar, .gload, .lx-toc, .lx-hero-art, .lx-switch, .lx-link, .legal { display: none !important; }
    .lgx { max-width: none; padding: 0; }
    .lx-hero, .lx-sum, .lx-sec, .lx-note, .lx-sum li, .lx-table > div, .lx-card { background: none !important; box-shadow: none !important; border-color: #ccc !important; }
    .lx-hero h1 { background: none; color: #000; }
    .lx-body { display: block; }
    .lx-sec { break-inside: auto; margin-bottom: 12px; }
}

html.is-lite .lx-hero-art::after, html.is-lite .lx-mark { animation: none; }
html.is-lite .lx-toc { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 1100px) { html.is-lite .lx-toc { background: var(--screen); } }
@media (prefers-reduced-motion: reduce) {
    .lx-hero-art::after, .lx-mark { animation: none; }
    .lx-sum li, .lx-prog i { transition: none; }
}
