/* ===============================================================
   Long-form pages: legal documents and the blog.
   Loaded after site.min.css on those pages only.
   =============================================================== */

/* ---- page banner ---- */
.doc-hero {
    position: relative;
    padding: 190px 0 64px;
    background: #030014;
    overflow: hidden;
    color: #fff;
}

.doc-hero::before,
.doc-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.doc-hero::before { top: -120px; left: -80px; width: 320px; height: 320px; background: #ee0979; opacity: .26; }
.doc-hero::after { right: -100px; bottom: -180px; width: 420px; height: 420px; background: #0A3459; opacity: .85; }

.doc-hero .themesflat-container { position: relative; z-index: 1; }

.doc-hero__eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 30px;
    background: rgba(255, 255, 255, .06);
    color: #dbe4f0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.doc-hero__eyebrow a { color: inherit; }
.doc-hero__eyebrow a:hover { color: #fff; }

.doc-hero h1 {
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -1px;
    text-wrap: balance;
}

.doc-hero p.doc-hero__lead {
    max-width: 720px;
    margin: 18px 0 0;
    color: #b9c5d6;
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
}

.doc-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    color: #b9c5d6;
    font-size: 14.5px;
    line-height: 1.5;
}

.doc-hero__meta strong { color: #fff; font-weight: 600; }

/* ---- layout: contents list + article ---- */
.doc-body { padding: 64px 0 90px; background: #fff; }

.doc-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.doc-grid--single { grid-template-columns: minmax(0, 820px); justify-content: center; }

.doc-toc {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 150px);
    padding: 22px 8px 22px 22px;
    border: 1px solid #e6eaf1;
    border-radius: 16px;
    background: #f8fafd;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.doc-toc summary {
    display: block;
    color: #0a1f44;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    list-style: none;
}

.doc-toc summary::-webkit-details-marker { display: none; }

.doc-toc ol { margin: 12px 0 0; padding: 0; list-style: none; }
.doc-toc li { margin: 0; }

.doc-toc a {
    display: block;
    padding: 6px 10px;
    border-left: 2px solid transparent;
    color: #5a6474;
    font-size: 13.5px;
    line-height: 1.45;
}

.doc-toc a:hover { border-left-color: #ee0979; color: #d6086e; }

/* ---- text ---- */
.prose { color: #475062; font-size: 16.5px; line-height: 1.75; }

.prose p,
.prose li,
.prose td,
.prose th { text-align: left; hyphens: manual; -webkit-hyphens: manual; }

.prose p { margin: 0 0 16px; color: inherit; font-size: inherit; line-height: inherit; }

.prose h2 {
    margin: 48px 0 16px;
    color: #0a1f44;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.4px;
    scroll-margin-top: 28px; /* adds to the 96px scroll-padding on html */
}

.prose > h2:first-child,
.prose section:first-child > h2 { margin-top: 0; }

.prose h3 { margin: 30px 0 12px; color: #0a1f44; font-size: 19px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }

.prose ul,
.prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 9px; padding-left: 4px; color: inherit; font-size: inherit; line-height: 1.7; list-style: inherit; }
.prose li::marker { color: #d6086e; font-weight: 600; }

.prose strong { color: #0a1f44; font-weight: 600; }

.prose a:not(.fa-btn) { color: #c40763; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:not(.fa-btn):hover { color: #0a1f44; }

.prose address { margin: 0 0 16px; font-style: normal; line-height: 1.7; }

.prose__note,
.prose blockquote {
    margin: 0 0 18px;
    padding: 16px 20px;
    border: 0;
    border-left: 4px solid #ee0979;
    border-radius: 0 12px 12px 0;
    background: #fdf3f8;
    color: #0a1f44;
}

.prose__note p:last-child,
.prose blockquote p:last-child { margin-bottom: 0; }

.prose__table {
    margin: 6px 0 24px;
    border: 1px solid #e6eaf1;
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prose__table:focus-visible { outline: 2px solid #ee0979; outline-offset: 2px; }

/* the theme sets fixed columns and dark borders on every table */
.prose table { width: 100%; min-width: 460px; margin: 0; border: 0; border-collapse: collapse; table-layout: auto; font-size: 15px; line-height: 1.6; }
.prose th { padding: 13px 16px; border: 0; background: #0a1f44; color: #fff; font-weight: 600; vertical-align: top; }
.prose td { padding: 13px 16px; border: 0; border-top: 1px solid #e6eaf1; color: #475062; vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: #f8fafd; }
.prose td:first-child { color: #0a1f44; font-weight: 500; }
.prose tr.is-total td { background: #eef2f8; color: #0a1f44; font-weight: 700; }

/* ---- related documents / call to action ---- */
.doc-related,
.post-cta { margin: 48px 0 0; padding: 28px 30px; border-radius: 18px; }

.doc-related { border: 1px solid #e6eaf1; background: #f8fafd; }
.doc-related p { margin: 0; }

.post-cta { background: linear-gradient(135deg, #0a1f44, #0A3459); color: #dbe4f0; }
.post-cta h2 { margin: 0 0 10px !important; color: #fff; font-size: 23px; }
.post-cta p { margin: 0 0 18px; color: #dbe4f0; }
.post-cta a:not(.fa-btn) { color: #fff; }
.post-cta a:not(.fa-btn):hover { color: #ffd1e8; }
.post-cta .fa-btn { display: inline-flex; margin: 0 14px 0 0; }
.post-cta__more { margin: 18px 0 0 !important; font-size: 15px; }

/* ---- blog: questions ---- */
.post-faq { margin: 0 0 8px; }
.post-faq h3 { margin: 22px 0 6px; font-size: 17.5px; }
.post-faq p { margin-bottom: 0; }

/* ---- blog: listing ---- */
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 26px;
    border: 1px solid #e6eaf1;
    border-radius: 18px;
    background: #fff;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.post-card::before {
    content: "";
    width: 44px;
    height: 4px;
    margin-bottom: 18px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

.post-card:hover { border-color: rgba(238, 9, 121, .3); box-shadow: 0 16px 38px rgba(10, 52, 89, .1); transform: translateY(-3px); }
.post-card:focus-within { border-color: #ee0979; }

.post-card h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.2px; }
.post-card h2 a { color: #0a1f44; }
.post-card h2 a:hover { color: #d6086e; }
/* the whole card is clickable */
.post-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.post-card p { margin: 0 0 20px; color: #5a6474; font-size: 15px; line-height: 1.65; text-align: left; hyphens: manual; }
.post-card__meta { margin-top: auto; color: #6b7585; font-size: 13.5px; line-height: 1.5; }

.preview-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 9990; padding: 10px 16px; background: #ffd166; color: #0a1f44; font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; }

/* ---- responsive ---- */
@media (max-width: 1199px) {
    .doc-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
    .doc-grid--single { grid-template-columns: minmax(0, 820px); }
    .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .doc-grid,
    .doc-grid--single { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .doc-toc { position: static; max-height: none; padding: 16px 18px; }
    .doc-toc summary { display: flex; justify-content: space-between; align-items: center; min-height: 28px; cursor: pointer; }
    .doc-toc summary::after { content: "+"; font-size: 20px; line-height: 1; }
    .doc-toc[open] summary::after { content: "\2212"; }
}

@media (max-width: 767px) {
    .doc-hero { padding: 150px 0 46px; }
    .doc-hero h1 { font-size: 31px; letter-spacing: -.5px; }
    .doc-hero p.doc-hero__lead { font-size: 16px; }
    .doc-body { padding: 40px 0 64px; }
    .prose { font-size: 16px; }
    .prose h2 { margin-top: 38px; font-size: 23px; }
    .post-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .prose table { min-width: 0; font-size: 14px; line-height: 1.5; }
    .prose table:has(th:nth-child(4)) { min-width: 560px; }
    .prose th,
    .prose td { padding: 10px 12px; }
    .doc-related,
    .post-cta { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-card:hover { transition: none; transform: none; }
}

@media print {
    #header_main, #footer, .doc-toc, .progress-wrap, #cc-banner, #sticky-fab, .tf-mouse { display: none !important; }
    .doc-hero { padding: 20px 0; background: none; }
    .doc-hero h1, .doc-hero__meta, .doc-hero__meta strong { color: #000; }
    .doc-grid { display: block; }
}

/* ---- legal documents: cards, tabs, reading position ---- */
.doc-hero--legal { padding: 170px 0 34px; }
.doc-hero--legal h1 { font-size: 50px; }
.doc-hero--legal .doc-hero__meta { margin-top: 14px; }

.doc-tabs { display: flex; gap: 8px; margin: 30px 0 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tabs a { flex: 0 0 auto; padding: 11px 20px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 30px; color: #dbe4f0; font-size: 14.5px; font-weight: 500; line-height: 1.3; transition: background-color .2s ease, color .2s ease; }
.doc-tabs a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.doc-tabs a.is-here { border-color: transparent; background: #fff; color: #0a1f44; font-weight: 600; }

.doc-body--legal { background: #f4f6fa; padding-top: 48px; }
.doc-body--legal .doc-toc { background: #fff; }
.doc-toc a { border-radius: 0 8px 8px 0; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.doc-toc a.is-here { border-left-color: #ee0979; background: #fdf3f8; color: #b00659; font-weight: 600; }

.doc-cards { display: grid; gap: 16px; counter-reset: sec; }
.doc-sec { padding: 30px 32px; border: 1px solid #e8ecf3; border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(10, 31, 68, .03); }
.doc-sec > :last-child { margin-bottom: 0; }
.doc-cards .doc-sec h2 { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 14px; font-size: 21px; line-height: 1.4; }
.doc-cards--numbered .doc-sec h2::before { counter-increment: sec; content: counter(sec); flex: 0 0 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #ee0979, #ff6a00); color: #fff; font-size: 15px; font-weight: 700; line-height: 34px; text-align: center; }
.doc-sec--intro { border-left: 4px solid #ee0979; }

@media (max-width: 991px) {
    .doc-body--legal .doc-toc { position: sticky; top: 74px; z-index: 5; max-height: 62vh; box-shadow: 0 8px 24px rgba(10, 31, 68, .08); }
}

@media (max-width: 767px) {
    .doc-hero, .doc-hero--legal { padding: 88px 0 22px; }
    .doc-hero h1, .doc-hero--legal h1 { font-size: 28px; }
    .doc-tabs { margin: 18px -20px 0; padding: 0 20px; }
    .doc-tabs a { padding: 9px 16px; font-size: 13.5px; }
    .doc-body, .doc-body--legal { padding: 16px 0 34px; }
    .doc-grid { gap: 14px; }
    .doc-toc, .doc-body--legal .doc-toc { top: 70px; padding: 12px 16px; border-radius: 16px; }
    .doc-toc a { padding: 10px; font-size: 14px; }
    .doc-cards { gap: 12px; }
    .doc-sec { padding: 20px 18px; border-radius: 18px; }
    .doc-cards .doc-sec h2 { gap: 12px; font-size: 18px; scroll-margin-top: 70px; }
    .doc-cards--numbered .doc-sec h2::before { flex-basis: 30px; height: 30px; border-radius: 10px; font-size: 14px; line-height: 30px; }
    .doc-cards.prose { font-size: 15.5px; }
    .post-list { gap: 12px; }
    .post-card { padding: 20px; }
}
