/* ==========================================================
   DROS BOT — STANDALONE LEGAL PAGES (TERMS & PRIVACY) v2
   Full-Width Space Guardian Layout • Comfortable Typography
   ========================================================== */

body.legal-page {
    opacity: 1 !important;
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
}

/* Ambient Space Background */
.leg-space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 42% at 50% 0%, rgba(122, 108, 255, 0.24) 0%, transparent 72%),
        radial-gradient(ellipse 55% 45% at 92% 88%, rgba(182, 245, 66, 0.08) 0%, transparent 65%),
        linear-gradient(180deg, #09051d 0%, #100832 55%, #0b0622 100%);
}
.leg-stars {
    position: absolute;
    inset: -5%;
    background-image:
        radial-gradient(1.5px 1.5px at 14% 20%, rgba(255,255,255,0.72), transparent),
        radial-gradient(1px 1px at 78% 12%, rgba(207,201,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 42% 66%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1px 1px at 88% 74%, rgba(207,201,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 60% 34%, rgba(182,245,66,0.45), transparent);
    background-size: 520px 520px;
    opacity: 0.38;
}
.leg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
}
.leg-glow-1 { width: 520px; height: 520px; background: #6a63f7; top: -140px; left: -120px; }
.leg-glow-2 { width: 460px; height: 460px; background: #8b5cf6; bottom: 5%; right: -100px; }

/* Subtle page-specific accent tuning */
body.legal-terms {
    --leg-accent: #a5b4fc;
    --leg-accent-glow: rgba(129, 140, 248, 0.28);
}
body.legal-privacy {
    --leg-accent: #b6f542;
    --leg-accent-glow: rgba(182, 245, 66, 0.24);
}

/* Navbar */
.leg-navbar {
    background: rgba(9, 5, 29, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(190, 180, 255, 0.11);
}

/* Full-Width Main Wrapper (spans comfortably across desktop monitors) */
.leg-main {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    padding: 96px 40px 80px;
    flex: 1;
}

/* Unified Full-Width Hero Banner Frame */
.leg-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding: 36px 42px;
    margin-bottom: 28px;
    border-radius: 22px;
    background:
        radial-gradient(ellipse 55% 110% at 92% 50%, var(--leg-accent-glow, rgba(122, 108, 255, 0.22)) 0%, transparent 72%),
        linear-gradient(150deg, rgba(28, 17, 82, 0.86) 0%, rgba(13, 8, 42, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.17);
    box-shadow: 0 22px 54px rgba(4, 2, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.leg-hero-left {
    flex: 1 1 560px;
    min-width: 0;
}
.leg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 99px;
    background: rgba(122, 108, 255, 0.16);
    border: 1px solid rgba(163, 157, 255, 0.34);
    color: #dedbff;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 14px;
}
.leg-hero-badge i { color: var(--lime); }

.leg-hero-title {
    font-size: clamp(32px, 3.8vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 12px;
}
.leg-hero-title span {
    background: linear-gradient(135deg, #ffffff 0%, #b4beff 50%, #b6f542 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.leg-hero-sub {
    font-size: 15.8px;
    line-height: 1.7;
    color: #cac5f0;
    max-width: 780px;
    margin: 0;
}

.leg-hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
.leg-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 12px;
    background: rgba(10, 6, 32, 0.72);
    border: 1px solid rgba(190, 180, 255, 0.18);
    font-size: 13px;
    font-weight: 600;
    color: #e2dfff;
    white-space: nowrap;
}
.leg-meta-pill i { color: var(--primary-light); font-size: 13px; }
.leg-meta-pill.lime {
    background: rgba(182, 245, 66, 0.11);
    border-color: rgba(182, 245, 66, 0.35);
    color: #e6ffb2;
}
.leg-meta-pill.lime i { color: var(--lime); }

/* 2-Column Full-Width Workspace */
.leg-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* Sticky Left Sidebar (Standalone Document Navigation — No Switcher) */
.leg-sidebar {
    position: sticky;
    top: 86px;
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.86) 0%, rgba(12, 7, 38, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.16);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 20px 48px rgba(4, 2, 20, 0.48);
}

.leg-doc-id {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(10, 6, 32, 0.7);
    border: 1px solid rgba(190, 180, 255, 0.14);
    margin-bottom: 18px;
}
.leg-doc-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(122, 108, 255, 0.2);
    border: 1px solid rgba(163, 157, 255, 0.35);
    color: var(--lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.leg-doc-id strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}
.leg-doc-id span {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #a6a0d4;
    margin-top: 2px;
}

.leg-toc-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9e98d2;
    margin-bottom: 10px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.leg-toc-title i { color: var(--lime); }

.leg-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.leg-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 13.8px;
    font-weight: 600;
    color: #c8c3ee;
    padding: 9px 12px;
    border-left: 3px solid transparent;
    border-radius: 10px;
    transition: all 0.16s ease;
}
.leg-toc-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-left-color: rgba(163, 157, 255, 0.6);
}
.leg-toc-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(182, 245, 66, 0.14) 0%, rgba(122, 108, 255, 0.1) 100%);
    border-left-color: var(--lime);
    font-weight: 700;
}

.leg-side-divider {
    height: 1px;
    background: rgba(190, 180, 255, 0.12);
    margin: 18px 0;
}
.leg-side-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.leg-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(190, 180, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #ebe8ff;
    transition: all 0.18s var(--ease-spring);
}
.leg-action-btn:hover {
    background: rgba(122, 108, 255, 0.26);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-1px);
}
.leg-action-btn.lime {
    background: var(--lime);
    border-color: var(--lime);
    color: #0a0620;
}
.leg-action-btn.lime:hover {
    box-shadow: 0 8px 22px var(--lime-glow);
}

/* Main Wide Content Frame */
.leg-card {
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.82) 0%, rgba(12, 7, 38, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.16);
    border-radius: 22px;
    padding: 36px 42px;
    box-shadow: 0 24px 60px rgba(4, 2, 20, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Quick Summary Cards (3 spacious columns) */
.leg-tldr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.leg-tldr-item {
    padding: 20px 22px;
    border-radius: 16px;
    background: rgba(9, 5, 30, 0.66);
    border: 1px solid rgba(190, 180, 255, 0.15);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.leg-tldr-item:hover {
    border-color: rgba(182, 245, 66, 0.38);
    transform: translateY(-2px);
}
.leg-tldr-ico {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(182, 245, 66, 0.12);
    border: 1px solid rgba(182, 245, 66, 0.3);
    color: var(--lime);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}
.leg-tldr-item h4 {
    font-size: 15.5px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}
.leg-tldr-item p {
    font-size: 14px;
    line-height: 1.65;
    color: #c5c0ec;
    margin: 0;
}

/* Clean Elevated Section Blocks (Comfortable Full-Width Reading) */
.leg-sections-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.leg-section {
    padding: 28px 32px;
    border-radius: 18px;
    background: rgba(9, 5, 30, 0.52);
    border: 1px solid rgba(190, 180, 255, 0.11);
    scroll-margin-top: 94px;
    transition: border-color 0.2s ease;
}
.leg-section:hover {
    border-color: rgba(190, 180, 255, 0.22);
}
.leg-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.leg-sec-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(122, 108, 255, 0.22);
    border: 1px solid rgba(163, 157, 255, 0.38);
    color: var(--lime);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.leg-section p {
    font-size: 15.6px;
    line-height: 1.85;
    color: #dbd7fa;
    margin-bottom: 14px;
    max-width: 96ch;
}
.leg-section p:last-child {
    margin-bottom: 0;
}
.leg-section ul {
    margin: 8px 0 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 94ch;
}
.leg-section li {
    font-size: 15.2px;
    line-height: 1.75;
    color: #dbd7fa;
}
.leg-section li::marker {
    color: var(--lime);
}
.leg-section strong { color: #ffffff; }
.leg-section code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: rgba(10, 6, 32, 0.9);
    border: 1px solid rgba(163, 157, 255, 0.28);
    color: #e4ffa8;
    padding: 2.5px 7px;
    border-radius: 6px;
}
.leg-section a {
    color: var(--lime);
    font-weight: 700;
    text-decoration: none;
}
.leg-section a:hover { text-decoration: underline; }

/* Highlight Callout */
.leg-callout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 14px;
    margin: 16px 0;
    font-size: 14.8px;
    line-height: 1.7;
}
.leg-callout > i { font-size: 19px; margin-top: 3px; flex-shrink: 0; }
.leg-callout strong { display: block; font-size: 15.2px; color: #fff; margin-bottom: 4px; }
.leg-callout.lime {
    background: rgba(182, 245, 66, 0.09);
    border: 1px solid rgba(182, 245, 66, 0.34);
    color: #e8ffbc;
}
.leg-callout.lime > i { color: var(--lime); }
.leg-callout.warn {
    background: rgba(245, 158, 11, 0.11);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fef0b8;
}
.leg-callout.warn > i { color: #fbbf24; }
.leg-callout.info {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(138, 147, 255, 0.38);
    color: #e2e6ff;
}
.leg-callout.info > i { color: var(--primary-light); }

/* Full-Width Spacious Data Table */
.leg-table-wrap {
    overflow-x: auto;
    margin: 18px 0 8px;
    border-radius: 14px;
    border: 1px solid rgba(190, 180, 255, 0.16);
}
.leg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    background: rgba(8, 5, 26, 0.72);
}
.leg-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 11.8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #b7b1e6;
    background: rgba(122, 108, 255, 0.15);
    border-bottom: 1px solid rgba(190, 180, 255, 0.16);
}
.leg-table td {
    padding: 16px 18px;
    line-height: 1.68;
    color: #e3e0ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}
.leg-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}
.leg-table tr:last-child td { border-bottom: none; }

/* Bottom Support Contact Frame */
.leg-contact-box {
    margin-top: 28px;
    padding: 24px 28px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(182, 245, 66, 0.09));
    border: 1px solid rgba(163, 157, 255, 0.36);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.leg-contact-box h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}
.leg-contact-box p {
    font-size: 14.8px;
    color: #dedbff;
    margin: 0;
}
.leg-contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 99px;
    background: var(--lime);
    color: #0a0620 !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.leg-contact-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--lime-glow);
}

.leg-footer { position: relative; z-index: 2; }
.leg-footer .nav-link.active-foot {
    color: var(--lime);
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .leg-main { padding: 92px 24px 70px; }
    .leg-layout { grid-template-columns: 265px minmax(0, 1fr); gap: 22px; }
    .leg-card { padding: 28px 28px; }
    .leg-section { padding: 22px 24px; }
}
@media (max-width: 960px) {
    body.legal-page {
        overflow-x: clip;
    }
    .leg-main {
        max-width: 100%;
        overflow-x: clip;
    }
    .leg-hero-card {
        padding: 24px 20px;
        gap: 18px;
        max-width: 100%;
    }
    .leg-hero-left {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }
    .leg-hero-right {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        flex-shrink: 1;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .leg-meta-pill {
        max-width: 100%;
        white-space: normal;
        line-height: 1.35;
    }
    .leg-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 100%;
    }
    .leg-sidebar,
    .leg-card,
    .leg-section,
    .leg-tldr-item,
    .leg-table-wrap,
    .leg-contact-box {
        min-width: 0;
        max-width: 100%;
    }
    .leg-sidebar { position: static; }
    .leg-tldr { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .leg-main { padding: 86px 14px 56px; }
    .leg-card { padding: 20px 16px; }
    .leg-section { padding: 18px 16px; }
    .leg-section h2 { font-size: 18.5px; }
    .leg-section p, .leg-section li { font-size: 14.5px; }
}

/* ---------- Print Friendly ---------- */
@media print {
    body.legal-page { background: #fff !important; color: #111 !important; }
    .leg-space-bg, .leg-navbar, .leg-sidebar, .leg-footer, .leg-contact-cta { display: none !important; }
    .leg-main { padding: 0 !important; max-width: 100% !important; }
    .leg-layout { display: block !important; }
    .leg-hero-card, .leg-card, .leg-section, .leg-tldr-item {
        background: #fff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        color: #111 !important;
    }
    .leg-section h2, .leg-section strong, .leg-hero-title, .leg-hero-title span, .leg-tldr-item h4 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    .leg-section p, .leg-section li, .leg-table td, .leg-hero-sub, .leg-tldr-item p { color: #222 !important; }
}

/* ==========================================================
   SMOOTH MOTION, READING PROGRESS & INTERACTIVE ANIMATIONS
   ========================================================== */

/* Hero & TL;DR Staggered Entrance */
.leg-hero-card {
    animation: legSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.leg-sidebar {
    animation: legSlideUp 0.6s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.leg-card {
    animation: legSlideUp 0.62s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes legSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-Reveal for Section Cards */
.leg-section.reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}
.leg-section.reveal-ready.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Active Section Soft Glow & Click Target Pulse */
.leg-section.is-active-sec {
    border-color: rgba(182, 245, 66, 0.32);
    background: rgba(14, 9, 44, 0.72);
    box-shadow: 0 12px 32px rgba(4, 2, 20, 0.38), inset 3px 0 0 rgba(182, 245, 66, 0.75);
}
.leg-section.is-target-pulse {
    animation: legSectionPulse 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes legSectionPulse {
    0%   { box-shadow: 0 0 0 0 rgba(182, 245, 66, 0.55), inset 3px 0 0 #b6f542; border-color: #b6f542; }
    65%  { box-shadow: 0 0 0 10px rgba(182, 245, 66, 0), inset 3px 0 0 #b6f542; border-color: rgba(182, 245, 66, 0.45); }
    100% { box-shadow: 0 12px 32px rgba(4, 2, 20, 0.38), inset 3px 0 0 rgba(182, 245, 66, 0.75); }
}

/* Sidebar Reading Progress Widget */
.leg-progress-wrap {
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 13px;
    background: rgba(10, 6, 32, 0.68);
    border: 1px solid rgba(190, 180, 255, 0.14);
}
.leg-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 800;
    color: #b9b4e6;
    margin-bottom: 8px;
}
.leg-progress-head strong {
    color: var(--lime);
    font-family: 'JetBrains Mono', monospace;
}
.leg-progress-track {
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.leg-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, #5865F2 0%, #8a93ff 55%, #b6f542 100%);
    box-shadow: 0 0 12px rgba(182, 245, 66, 0.45);
    transition: width 0.16s ease-out;
}

/* Smooth TOC Link Micro-Motion */
.leg-toc-link {
    position: relative;
    transition: color 0.2s ease, background 0.24s ease, border-color 0.24s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.leg-toc-link:hover { transform: translateX(4px); }
.leg-toc-link.active { transform: translateX(5px); }

/* Floating Back-To-Top Button */
.leg-top-btn {
    position: fixed;
    right: 26px;
    bottom: 84px;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    border: 1px solid rgba(182, 245, 66, 0.42);
    background: rgba(18, 11, 56, 0.92);
    color: var(--lime);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(14px) scale(0.92);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.leg-top-btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.leg-top-btn:hover {
    background: var(--lime);
    color: #0a0620;
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    .leg-hero-card, .leg-sidebar, .leg-card, .leg-section.reveal-ready {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


/* ---------- Phone Ergonomics Polish (<= 640px) ---------- */
@media (max-width: 640px) {
    .leg-main {
        padding: 78px 12px 52px;
    }

    .leg-hero-card {
        padding: 20px 16px;
        gap: 14px;
        border-radius: 18px;
        margin-bottom: 16px;
    }

    .leg-hero-badge {
        max-width: 100%;
        font-size: 11.5px;
        padding: 6px 12px;
    }

    .leg-hero-title {
        font-size: 27px;
        word-break: break-word;
    }

    .leg-hero-sub {
        font-size: 13.8px;
        line-height: 1.62;
    }

    .leg-hero-right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .leg-meta-pill {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        font-size: 12px;
        padding: 8px 12px;
        justify-content: flex-start;
    }

    .leg-sidebar {
        padding: 16px 14px;
        border-radius: 18px;
        overflow: hidden;
    }

    .leg-toc-list {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .leg-toc-link {
        font-size: 13px;
        padding: 9px 11px;
        border-left-width: 2.5px;
        min-width: 0;
        white-space: normal;
        word-break: break-word;
    }

    .leg-toc-link:hover,
    .leg-toc-link.active {
        transform: none;
    }

    .leg-card {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .leg-section {
        padding: 16px 14px;
        border-radius: 14px;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .leg-section h2 {
        font-size: 17.5px;
        gap: 10px;
    }

    .leg-section code {
        word-break: break-word;
        white-space: normal;
    }

    .leg-callout {
        padding: 14px;
        gap: 11px;
        font-size: 13.8px;
    }

    .leg-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .leg-table th,
    .leg-table td {
        padding: 11px 12px;
        font-size: 13px;
    }

    .leg-contact-box {
        padding: 18px 16px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .leg-contact-cta {
        justify-content: center;
        width: 100%;
    }

    .leg-top-btn {
        right: 14px;
        bottom: 18px;
        width: 42px;
        height: 42px;
    }
}
