section { padding: 2.5rem 0; position: relative; }

/* ============================================================
   HERO — matches platform design system
   ============================================================ */
.bg-hero {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color: #fff;
    padding: 2.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.bg-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    mask-image: linear-gradient(135deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}
.bg-hero::after {
    content: '';
    position: absolute;
    top: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.bg-hero .container { position: relative; z-index: 2; }

.policy-breadcrumb {
    display: flex; align-items: center; gap: .5rem;
    font-size: .82rem; color: rgba(255,255,255,.6);
    margin-bottom: 1rem; flex-wrap: wrap;
}
.policy-breadcrumb a { color: #a5b4fc; text-decoration: none; transition: .2s; }
.policy-breadcrumb a:hover { color: #fff; }
.policy-breadcrumb .sep { opacity: .5; }
.policy-breadcrumb .active { color: rgba(255,255,255,.75); }

.policy-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: #fff;
    margin-bottom: .65rem;
}
.policy-title .accent {
    background: linear-gradient(135deg, #fbbf24, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.policy-lead {
    font-size: 1rem;
    color: rgba(255,255,255,.82);
    line-height: 1.6;
    font-weight: 300;
    max-width: 620px;
    margin-bottom: 1.25rem;
}
.policy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.policy-meta span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: rgba(255,255,255,.8);
    font-weight: 600;
}
.policy-meta i { color: #a5b4fc; }

/* ============================================================
   BODY — light bg with subtle grid, overlapping hero
   ============================================================ */
.bg-body {
    background-color: #f8fafc;
    background-image:
        linear-gradient(rgba(99,102,241,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    margin-top: -3rem;
    padding-top: 5rem !important;
    position: relative;
    z-index: 3;
}

/* ============================================================
   TOP TABS — switch between policies
   ============================================================ */
.policy-tabs {
    display: flex;
    gap: .5rem;
    background: #fff;
    border-radius: 1.25rem;
    border: 1.5px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
    padding: .5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.policy-tab {
    flex: 1;
    min-width: 140px;
    padding: .75rem 1.15rem;
    border-radius: .85rem;
    color: #64748b;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    text-align: center;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.policy-tab:hover { background: #f8fafc; color: var(--primary); }
.policy-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 8px 20px rgba(99,102,241,.28);
}
.policy-tab i { font-size: 1rem; }
@media (max-width: 576px) {
    .policy-tab { min-width: 100px; font-size: .78rem; padding: .6rem .85rem; }
}

/* ============================================================
   MAIN CONTENT CARD
   ============================================================ */
.policy-card {
    background: #fff;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 12px 40px rgba(15,23,42,.08);
    overflow: hidden;
    position: relative;
}
.policy-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 2;
}

.policy-header {
    padding: 2rem 2.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}
.policy-header .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .85rem;
    box-shadow: 0 10px 24px rgba(99,102,241,.28);
}
.policy-header h1 {
    font-weight: 800;
    font-size: 1.65rem;
    letter-spacing: -.03em;
    color: #0f172a;
    margin-bottom: .35rem;
    line-height: 1.2;
}
.policy-header .subtitle {
    color: #64748b;
    font-size: .95rem;
    line-height: 1.55;
    margin: 0;
    max-width: 640px;
}

.policy-body {
    padding: 2rem 2.25rem 2.25rem;
    font-size: 1rem;
    line-height: 1.85;
    color: #334155;
}
.policy-body h1,
.policy-body h2,
.policy-body h3 {
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
    scroll-margin-top: 100px;
}
.policy-body h1 {
    font-size: 1.6rem;
    margin: 2.25rem 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid #f1f5f9;
}
.policy-body h1:first-child { margin-top: 0; }
.policy-body h2 {
    font-size: 1.3rem;
    margin: 2rem 0 .85rem;
    position: relative;
    padding-left: 1rem;
}
.policy-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: .3em;
    bottom: .3em;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.policy-body h2:first-child,
.policy-body h3:first-child { margin-top: 0; }
.policy-body h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 .65rem;
    color: #1e293b;
}
.policy-body p { margin-bottom: 1.1rem; }
.policy-body ul,
.policy-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.policy-body li { margin-bottom: .5rem; }
.policy-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(99,102,241,.35);
    text-underline-offset: 3px;
}
.policy-body a:hover { text-decoration-color: var(--primary); }
.policy-body strong { color: #0f172a; font-weight: 700; }
.policy-body blockquote {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    padding: 1.15rem 1.5rem;
    border-radius: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #475569;
}
.policy-body code {
    background: #f1f5f9;
    color: #db2777;
    padding: .15rem .4rem;
    border-radius: 6px;
    font-size: .88em;
}
.policy-body hr {
    border: 0;
    border-top: 2px solid #f1f5f9;
    margin: 2rem 0;
}

@media (max-width: 576px) {
    .policy-header { padding: 1.5rem 1.25rem 1.25rem; }
    .policy-header h1 { font-size: 1.35rem; }
    .policy-body { padding: 1.5rem 1.25rem; font-size: .96rem; }
    .policy-body h1 { font-size: 1.3rem; }
    .policy-body h2 { font-size: 1.1rem; }
}

/* ============================================================
   SIDEBAR — sticky stack of cards
   ============================================================ */
.policy-sidebar {
    position: sticky;
    top: calc(var(--header-h, 70px) + var(--subnav-h, 60px) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (max-width: 992px) {
    .policy-sidebar { position: static; margin-top: 1rem; }
}

.sidebar-block {
    background: #fff;
    border-radius: 1.25rem;
    border: 1.5px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
    padding: 1.35rem;
    overflow: hidden;
}
.sidebar-block h6 {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
    margin-bottom: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.sidebar-block h6 i { color: var(--primary); }

/* TOC nav */
.toc-nav {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 400px;
    overflow-y: auto;
    margin-right: -.4rem;
    padding-right: .4rem;
}
.toc-nav::-webkit-scrollbar { width: 4px; }
.toc-nav::-webkit-scrollbar-track { background: transparent; }
.toc-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
.toc-nav a {
    display: block;
    padding: .5rem .75rem;
    border-radius: .5rem;
    color: #475569;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: .2s;
    border-left: 3px solid transparent;
}
.toc-nav a.level-2 {
    padding-left: 1.5rem;
    font-size: .8rem;
    color: #64748b;
}
.toc-nav a:hover { background: #f8fafc; color: var(--primary); }
.toc-nav a.active {
    background: #eef2ff;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 700;
}

/* Progress bar inside TOC block */
.reading-progress {
    height: 3px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.reading-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .15s ease;
    border-radius: 2px;
}

/* Switch policies list */
.switch-list { display: flex; flex-direction: column; gap: .5rem; }
.switch-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem .85rem;
    border-radius: .75rem;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
    transition: .2s;
    border: 1.5px solid transparent;
}
.switch-item:hover {
    background: #eef2ff;
    border-color: rgba(99,102,241,.2);
    color: inherit;
    transform: translateX(2px);
}
.switch-item .sw-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.switch-item .sw-info { flex: 1; min-width: 0; }
.switch-item .sw-info .name {
    font-weight: 700;
    color: #0f172a;
    font-size: .85rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.switch-item .sw-info .sub {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.switch-item .sw-arrow { color: #94a3b8; font-size: .85rem; flex-shrink: 0; }

/* Actions block */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1rem;
    border-radius: .75rem;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    font-size: .82rem;
    transition: .2s;
    border: 1.5px solid transparent;
    cursor: pointer;
    width: 100%;
    margin-bottom: .5rem;
}
.action-btn:last-child { margin-bottom: 0; }
.action-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,.28);
}

/* Help card */
.help-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 1.25rem;
    padding: 1.35rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.help-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,.15), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.help-card h6 {
    font-weight: 800;
    font-size: .95rem;
    margin-bottom: .5rem;
    color: #fff;
    position: relative;
}
.help-card p {
    font-size: .82rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 1rem;
    line-height: 1.5;
    position: relative;
}
.help-card a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.5rem;
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    font-size: .85rem;
    text-decoration: none;
    border-radius: 50px;
    transition: .25s;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    position: relative;
}
.help-card a:hover {
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,.25);
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.15rem;
    border-radius: 50px;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    font-size: .82rem;
    text-decoration: none;
    border: 1.5px solid #e2e8f0;
    transition: .2s;
    margin-bottom: 1rem;
}
.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,.12);
}