:root {
    --legal-navy: #06236b;
    --legal-blue: #1260f3;
    --legal-cyan: #14bbd6;
    --legal-ink: #16336c;
    --legal-muted: #5d72a3;
    --legal-line: #cbdcf3;
    --legal-pale: #eef8ff;
    --legal-paper: #fff;
    --legal-green: #0b9b66;
    --legal-red: #df315d;
    --legal-amber: #f3a000;
}

.tn-legal-body {
    background: #fff;
    color: var(--legal-ink);
}

.tn-legal-body .tn-topbar {
    border-bottom: 1px solid #e8eff9;
}

.legal-page {
    background:
        radial-gradient(circle at 83% 1%, rgba(25, 174, 224, .11), transparent 26rem),
        linear-gradient(105deg, #eefbff 0, #fff 38%, #fff 78%, #effaff 100%);
    color: var(--legal-ink);
    font-size: 14px;
    line-height: 1.48;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after { box-sizing: border-box; }

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page h4,
.legal-page p { margin-top: 0; }

.legal-page a { color: #0757de; }

.legal-page__hero {
    position: relative;
    overflow: hidden;
    min-height: 290px;
    padding: 18px 0 28px;
    background: linear-gradient(110deg, rgba(238, 250, 255, .96), rgba(255, 255, 255, .85));
}

.legal-page__hero::after {
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #b8dcf4, transparent);
    content: "";
}

.legal-page--terms .legal-page__hero::before {
    position: absolute;
    top: 0;
    right: 0;
    width: min(18vw, 260px);
    height: 7px;
    background: linear-gradient(90deg, transparent, #fff07a, #ffd51f);
    content: "";
}

.legal-breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 34px;
    color: #7085ad;
    font-size: 12px;
}

.legal-breadcrumbs a { color: #6a82ad; text-decoration: none; }

.legal-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    align-items: center;
    gap: 50px;
}

.legal-kicker {
    margin-bottom: 6px;
    color: #5270a7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
}

.legal-page__hero h1 {
    margin-bottom: 5px;
    color: var(--legal-navy);
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1;
    letter-spacing: -.045em;
}

.legal-hero-lead {
    max-width: 680px;
    margin-bottom: 12px;
    color: #536fa9;
    font-size: 18px;
}

.legal-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 8px;
}

.legal-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid #b9d9fa;
    border-radius: 7px;
    background: #edf7ff;
    color: #2562a8;
    font-size: 11px;
    font-weight: 700;
}

.legal-status i { font-size: 10px; }
.legal-status.is-draft { border-color: #ffcb6b; background: #fff3d8; color: #986000; }
.legal-status.is-review { border-color: #ffa2b6; background: #fff0f4; color: #b70d3c; }

.legal-effective {
    margin-bottom: 13px;
    color: #5870a0;
    font-size: 12px;
}

.legal-effective strong { color: #15376f; }

.legal-hero-actions,
.legal-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.legal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 42px;
    padding: 8px 19px;
    border: 1px solid #0d63f5;
    border-radius: 6px;
    background: #fff;
    color: #0757de;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.legal-button.is-primary {
    background: linear-gradient(100deg, #085dec, #2578ff);
    color: #fff;
    box-shadow: 0 6px 16px rgba(14, 92, 231, .18);
}

.legal-button:hover { transform: translateY(-1px); }

.legal-hero-art {
    position: relative;
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
}

.legal-hero-art__icon {
    position: relative;
    display: grid;
    width: 136px;
    height: 150px;
    place-items: center;
    border: 10px solid #d2e8ff;
    background: linear-gradient(145deg, #edf8ff, #cfe9ff);
    color: #1266ea;
    filter: drop-shadow(0 12px 16px rgba(16, 94, 196, .15));
    font-size: 54px;
}

.legal-hero-art__icon.is-shield {
    border-radius: 45% 45% 55% 55% / 25% 25% 75% 75%;
}

.legal-hero-art__icon.is-document {
    height: 160px;
    border-width: 5px;
    border-radius: 10px 26px 10px 10px;
    background: #fff;
}

.legal-hero-art__icon.is-document::before {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 40px;
    height: 40px;
    border-bottom: 5px solid #d2e8ff;
    border-left: 5px solid #d2e8ff;
    border-radius: 0 25px 0 8px;
    background: #e6f4ff;
    content: "";
}

.legal-hero-art__caption {
    max-width: 155px;
    margin-left: 34px;
    color: #3662a9;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.legal-hero-art__caption::after {
    display: block;
    width: 64px;
    height: 5px;
    margin-top: 34px;
    border-radius: 99px;
    background: #29bdd4;
    content: "";
}

.legal-draft-banner {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 0 auto;
    padding: 13px 20px;
    border: 1px solid #f2b333;
    border-radius: 8px;
    background: #fff8df;
    color: #6f4900;
    font-size: 13px;
    font-weight: 600;
}

.legal-draft-banner i {
    margin-top: 1px;
    color: #e99a00;
    font-size: 21px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding-top: 18px;
    padding-bottom: 32px;
}

.legal-toc {
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 100px);
    overflow: auto;
    padding: 16px 12px 14px;
    border: 1px solid #dfebf8;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(20, 63, 119, .06);
}

.legal-toc h2 {
    margin: 0 7px 10px;
    color: var(--legal-navy);
    font-size: 13px;
}

.legal-toc ol { margin: 0; padding: 0; list-style: none; }

.legal-toc li + li { margin-top: 2px; }

.legal-toc a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 4px 7px;
    border-radius: 6px;
    color: #365c9f;
    font-size: 11px;
    line-height: 1.15;
    text-decoration: none;
}

.legal-toc a::before {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #e9f4ff;
    color: #1767e4;
    content: attr(data-number);
    font-size: 11px;
    font-weight: 800;
}

.legal-toc a:hover,
.legal-toc a.is-active {
    background: #eaf4ff;
    color: #0757de;
    font-weight: 700;
}

.legal-toc__tools {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #d6e5f5;
}

.legal-toc__tools button,
.legal-toc__tools a {
    display: flex;
    min-height: 34px;
    grid-template-columns: none;
    gap: 10px;
    align-items: center;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: #0757de;
    font: inherit;
    font-size: 11px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.legal-toc__tools button i,
.legal-toc__tools a i { width: 19px; font-size: 14px; text-align: center; }
.legal-toc__tools a::before { display: none; }

.legal-document {
    min-width: 0;
    padding: 14px 18px 22px;
    border: 1px solid #e0ecf8;
    border-radius: 8px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 9px 30px rgba(18, 55, 106, .06);
}

.legal-section {
    scroll-margin-top: 88px;
    padding: 0 0 18px;
}

.legal-section + .legal-section { padding-top: 2px; }

.legal-section > h2 {
    margin-bottom: 1px;
    color: var(--legal-navy);
    font-size: 23px;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.legal-section > h2 .legal-number {
    display: inline-block;
    min-width: 31px;
}

.legal-section > p {
    margin-bottom: 10px;
    color: #526ba0;
}

.legal-section h3 {
    margin-bottom: 5px;
    color: #0d3679;
    font-size: 14px;
}

.legal-callout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin: 10px 0 0;
    padding: 11px 14px;
    border: 1px solid #bcdcf8;
    border-radius: 6px;
    background: linear-gradient(90deg, #edf8ff, #e9f5ff);
    color: #3561a3;
    font-size: 12px;
}

.legal-callout > i {
    display: grid;
    flex: 0 0 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    background: #2474ec;
    color: #fff;
}

.legal-callout strong { display: block; margin-bottom: 2px; color: #0c3a80; }
.legal-callout.is-warning { border-color: #ffccd6; background: #fff0f3; color: #9c2847; }
.legal-callout.is-warning > i { background: #df315d; }
.legal-callout.is-warning strong { color: #a4143b; }
.legal-callout.is-success { border-color: #bee7d7; background: #eefaf5; color: #27715a; }
.legal-callout.is-success > i { background: #0b9b66; }
.legal-callout.is-success strong { color: #08724c; }
.legal-callout.is-amber { border-color: #ffd184; background: #fff7e5; color: #8c5c00; }
.legal-callout.is-amber > i { background: #efa500; }
.legal-callout.is-amber strong { color: #885300; }

.legal-table-wrap {
    margin: 9px 0 8px;
    overflow-x: auto;
    border: 1px solid #cbdcf0;
    border-radius: 6px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    color: #36568e;
    font-size: 11px;
    line-height: 1.3;
}

.legal-table th,
.legal-table td {
    padding: 8px 10px;
    border-right: 1px solid #d5e2f1;
    border-bottom: 1px solid #d5e2f1;
    vertical-align: top;
    text-align: left;
}

.legal-table th:last-child,
.legal-table td:last-child { border-right: 0; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table th { background: #eaf4fb; color: #113a79; font-weight: 800; }
.legal-table td:first-child { color: #1e417a; font-weight: 700; }

.legal-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
}

.legal-card {
    min-width: 0;
    min-height: 86px;
    padding: 10px 11px;
    border: 1px solid #cfdef0;
    border-radius: 6px;
    background: #fff;
}

.legal-card__heading {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 6px;
    color: #123b7f;
    font-size: 11px;
    font-weight: 800;
}

.legal-card__heading i {
    display: grid;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 50%;
    background: #e7f3ff;
    color: #176eea;
    font-size: 14px;
}

.legal-card p { margin: 0; color: #5871a2; font-size: 10px; line-height: 1.35; }
.legal-card ul { margin: 6px 0 0; padding: 0; list-style: none; color: #526b9d; font-size: 10px; }
.legal-card li { position: relative; padding-left: 17px; }
.legal-card li + li { margin-top: 4px; }
.legal-card li::before { position: absolute; left: 1px; color: var(--legal-green); content: "\2713"; font-weight: 900; }

.legal-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 9px;
}

.legal-list-panel {
    padding: 12px 14px;
    border: 1px solid #cde7dc;
    border-radius: 7px;
    background: #f0fbf6;
}

.legal-list-panel.is-prohibited { border-color: #f2cbd4; background: #fff1f4; }
.legal-list-panel h3 { display: flex; gap: 9px; align-items: center; }
.legal-list-panel h3 i { color: var(--legal-green); }
.legal-list-panel.is-prohibited h3 i { color: var(--legal-red); }
.legal-list-panel ul { margin: 7px 0 0; padding: 0; list-style: none; color: #426393; font-size: 11px; }
.legal-list-panel li { position: relative; padding-left: 20px; }
.legal-list-panel li + li { margin-top: 4px; }
.legal-list-panel li::before { position: absolute; left: 2px; color: var(--legal-green); content: "\2713"; font-weight: 900; }
.legal-list-panel.is-prohibited li::before { color: var(--legal-red); content: "\00d7"; font-size: 15px; line-height: .9; }

.legal-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    margin: 10px 0;
    padding: 9px 7px;
    border: 1px solid #e1ebf7;
    border-radius: 999px;
    background: #fbfdff;
}

.legal-flow span {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    color: #345d9d;
    font-size: 10px;
    font-weight: 700;
}

.legal-flow span:not(:last-child)::after {
    position: absolute;
    right: -4px;
    color: #2d75f0;
    content: "\2192";
    font-size: 18px;
}

.legal-flow i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #e7f3ff;
    color: #176eea;
}

.legal-label-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
}

.legal-label {
    display: flex;
    gap: 9px;
    align-items: center;
    min-height: 50px;
    padding: 9px 11px;
    border: 1px solid #d4e2f1;
    border-radius: 6px;
    background: #fff;
    color: #516a9b;
    font-size: 10px;
}

.legal-label b {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dd3153;
    color: #fff;
    font-size: 8px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.legal-label:nth-child(2) b { background: #1684e5; }
.legal-label:nth-child(3) b { background: #0a9b5a; }

.legal-related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid #cce0f4;
    border-radius: 7px;
    background: #f2f9ff;
    font-size: 11px;
}

.legal-related strong { color: #123c7c; }
.legal-related a { text-decoration: none; }

.legal-mobile-tools { display: none; }

@media (max-width: 980px) {
    .legal-hero-grid { grid-template-columns: 1fr 300px; }
    .legal-layout { grid-template-columns: 190px minmax(0, 1fr); }
    .legal-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .legal-page__hero { min-height: 0; padding-bottom: 22px; }
    .legal-breadcrumbs { margin-bottom: 22px; }
    .legal-hero-grid { grid-template-columns: 1fr; gap: 20px; }
    .legal-hero-art { display: none; }
    .legal-page__hero h1 { font-size: 38px; }
    .legal-hero-lead { font-size: 16px; }
    .legal-draft-banner { margin-inline: 16px; }
    .legal-layout { display: block; padding-inline: 16px; }
    .legal-toc { position: static; display: none; }
    .legal-document { padding: 14px 13px 20px; }
    .legal-mobile-tools { display: flex; gap: 8px; margin: 0 0 14px; }
    .legal-mobile-tools button { flex: 1; }
    .legal-section > h2 { font-size: 21px; }
    .legal-split, .legal-label-row { grid-template-columns: 1fr; }
    .legal-flow { grid-template-columns: 1fr; gap: 3px; border-radius: 9px; }
    .legal-flow span { justify-content: flex-start; padding: 3px 10px; }
    .legal-flow span:not(:last-child)::after { right: 14px; bottom: -9px; content: "\2193"; }
}

@media (max-width: 480px) {
    .legal-page { font-size: 13px; }
    .legal-card-grid { grid-template-columns: 1fr; }
    .legal-button { width: 100%; }
    .legal-table { min-width: 620px; }
}

@media print {
    .tn-topbar,
    .tn-footer,
    .legal-breadcrumbs,
    .legal-hero-actions,
    .legal-hero-art,
    .legal-toc,
    .legal-mobile-tools { display: none !important; }
    .legal-page,
    .legal-page__hero { background: #fff !important; color: #111; }
    .legal-page__hero { min-height: 0; padding: 0 0 12px; }
    .legal-layout { display: block; padding: 0; }
    .legal-document { border: 0; box-shadow: none; padding: 0; }
    .legal-section { break-inside: avoid; }
    .legal-table-wrap,
    .legal-card,
    .legal-callout { break-inside: avoid; }
    .legal-page a { color: inherit; text-decoration: none; }
    .legal-page a[href]::after { content: none; }
}
