/* Stage 2 — internal pages REFRESH, Concept 02 v2, batch 03. */

/* Shared long-form reading treatment. */
.th-inner-page--privacy .th-inner-content-card,
.th-inner-page--terms .th-inner-content-card {
    padding-top: 38px;
}

.th-inner-page--privacy .th-inner-rich,
.th-inner-page--terms .th-inner-rich {
    max-width: 1040px;
    color: #414A57;
    line-height: 1.78;
}

.th-inner-page--privacy .th-inner-rich p,
.th-inner-page--privacy .th-inner-rich div,
.th-inner-page--terms .th-inner-rich p,
.th-inner-page--terms .th-inner-rich div {
    overflow-wrap: anywhere;
}

.th-inner-page--privacy .th-inner-rich a,
.th-inner-page--terms .th-inner-rich a {
    word-break: break-word;
}

/* Privacy: normalize imported legal markup without removing its content. */
.th-inner-page--privacy .th-inner-rich .Article {
    color: #414A57;
    font-size: 15px;
    line-height: 1.78;
}

.th-inner-page--privacy .th-inner-rich .Article > div {
    width: 100%;
}

.th-inner-page--privacy .th-inner-rich .Heading {
    margin: 0 0 24px;
    padding: 22px 24px;
    background: linear-gradient(118deg, #FFF8EF, #FFF0DF);
    border-left: 3px solid var(--th-orange);
    border-radius: 0 14px 14px 0;
}

.th-inner-page--privacy .th-inner-rich .Heading .Title {
    margin: 0 0 6px;
    color: var(--th-ink);
    font-size: 20px !important;
    line-height: 1.35;
}

.th-inner-page--privacy .th-inner-rich .Heading .Title:last-child {
    margin-bottom: 0;
    font-size: 17px !important;
}

.th-inner-page--privacy .th-inner-rich .page-title {
    margin: 32px 0 18px;
    padding: 22px 24px;
    color: var(--th-ink);
    background: var(--th-surface-soft);
    border: 1px solid var(--th-line);
    border-radius: 14px;
    font-size: 18px !important;
    font-weight: 500;
    line-height: 1.5;
}

.th-inner-page--privacy .th-inner-rich .page-title span {
    color: var(--th-ink) !important;
    font-size: inherit !important;
}

.th-inner-page--privacy .th-inner-rich p.Title,
.th-inner-page--privacy .th-inner-rich .entry-content > p,
.th-inner-page--privacy .th-inner-rich .entry-content > div {
    margin: 0 0 16px !important;
    text-align: left !important;
    line-height: 1.78 !important;
}

.th-inner-page--privacy .th-inner-rich .entry-content,
.th-inner-page--privacy .th-inner-rich .hentry {
    width: 100%;
    max-width: none;
}

.th-inner-page--privacy .th-inner-rich ul,
.th-inner-page--privacy .th-inner-rich ol {
    margin: 18px 0 26px;
    padding: 20px 24px 20px 44px;
    background: var(--th-surface-soft);
    border: 1px solid var(--th-line);
    border-radius: 14px;
}

.th-inner-page--privacy .th-inner-rich li {
    margin-bottom: 10px;
}

.th-inner-page--privacy .th-inner-rich [onclick*="window.external"] {
    cursor: default;
}

/* Terms: definitions and financing information become distinct blocks. */
.th-inner-page--terms .th-inner-rich > p {
    margin: 0 0 16px;
}

.th-inner-page--terms .th-inner-rich > p:nth-child(1) {
    margin-bottom: 20px;
    padding: 22px 24px;
    color: var(--th-ink);
    background: linear-gradient(118deg, #FFF8EF, #FFF0DF);
    border-left: 3px solid var(--th-orange);
    border-radius: 0 14px 14px 0;
    font-size: 20px !important;
    line-height: 1.45;
}

.th-inner-page--terms .th-inner-rich > p:nth-child(n+5):nth-child(-n+14) {
    margin: 0 0 9px;
    padding: 13px 16px;
    background: var(--th-surface-soft);
    border: 1px solid var(--th-line);
    border-radius: 10px;
}

.th-inner-page--terms .th-inner-rich > p:nth-child(15),
.th-inner-page--terms .th-inner-rich h2,
.th-inner-page--terms .th-inner-rich h3 {
    margin: 34px 0 16px;
    color: var(--th-ink);
    font-size: 21px !important;
    font-weight: 500;
    line-height: 1.35;
}

.th-inner-page--terms .th-inner-rich > div:nth-child(16) {
    padding: 24px;
    background: #FFF9F2;
    border: 1px solid rgba(243, 148, 48, .28);
    border-radius: 14px;
}

.th-inner-page--terms .th-inner-rich > div:nth-child(n+18) {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--th-line);
}

.th-inner-page--terms .th-inner-rich img {
    display: block;
    width: auto !important;
    max-width: min(100%, 760px) !important;
    height: auto !important;
    margin: 24px auto;
    border-radius: 13px;
}

/* tbi bank: visual, readable flow using only the existing CMS content. */
.th-inner-page--tbi .th-inner-rich {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 1120px;
}

.th-inner-page--tbi .th-inner-rich > * {
    grid-column: 1 / -1;
    margin: 0;
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(2),
.th-inner-page--tbi .th-inner-rich > p:nth-child(4),
.th-inner-page--tbi .th-inner-rich > p:nth-child(6),
.th-inner-page--tbi .th-inner-rich > p:nth-child(7),
.th-inner-page--tbi .th-inner-rich > p:nth-child(13) {
    display: none;
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(1) img,
.th-inner-page--tbi .th-inner-rich > div:nth-child(5) img {
    display: block;
    width: 100% !important;
    max-width: 1000px !important;
    height: auto !important;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: var(--th-shadow-sm);
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(3) {
    padding: 24px 26px;
    color: var(--th-ink);
    background: linear-gradient(118deg, #FFF8EF, #FFF0DF);
    border-left: 3px solid var(--th-orange);
    border-radius: 0 14px 14px 0;
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(8) {
    margin-top: 18px;
    color: var(--th-ink);
    font-size: 23px !important;
    font-weight: 500;
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(9),
.th-inner-page--tbi .th-inner-rich > p:nth-child(10),
.th-inner-page--tbi .th-inner-rich > p:nth-child(11) {
    grid-column: span 1;
    min-height: 104px;
    padding: 20px;
    color: var(--th-ink);
    background: var(--th-surface-soft);
    border: 1px solid var(--th-line);
    border-radius: 14px;
}

.th-inner-page--tbi .th-inner-rich > p:nth-child(12) {
    padding: 22px 24px;
    white-space: pre-line;
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: var(--th-shadow-sm);
}

.th-inner-page--tbi .th-inner-rich > div:nth-child(14) {
    padding: 24px;
    text-align: center;
    background: var(--th-surface-soft);
    border: 1px solid var(--th-line);
    border-radius: 14px;
}

.th-inner-page--tbi .th-inner-rich > div:nth-child(14) img {
    width: min(100%, 360px) !important;
    height: auto !important;
    border-radius: 12px;
}

.th-inner-page--tbi .th-inner-rich > div:nth-child(15) {
    padding: 24px 26px;
    color: #394250;
    background: linear-gradient(118deg, #F9FAFB, #F1F3F5);
    border: 1px solid var(--th-line);
    border-radius: 14px;
}

.th-inner-page--tbi .th-inner-rich > div:nth-child(15) > div:first-child,
.th-inner-page--tbi .th-inner-rich > div:nth-child(15) > a:first-child {
    color: var(--th-ink);
    font-size: 20px;
    font-weight: 500;
}

@media (max-width: 767px) {
    .th-inner-page--privacy .th-inner-content-card,
    .th-inner-page--terms .th-inner-content-card {
        padding-top: 22px;
    }

    .th-inner-page--privacy .th-inner-rich,
    .th-inner-page--terms .th-inner-rich {
        line-height: 1.68;
    }

    .th-inner-page--privacy .th-inner-rich .Heading,
    .th-inner-page--privacy .th-inner-rich .page-title,
    .th-inner-page--terms .th-inner-rich > p:nth-child(1) {
        padding: 18px;
    }

    .th-inner-page--privacy .th-inner-rich .Heading .Title,
    .th-inner-page--terms .th-inner-rich > p:nth-child(1) {
        font-size: 18px !important;
    }

    .th-inner-page--privacy .th-inner-rich ul,
    .th-inner-page--privacy .th-inner-rich ol {
        padding: 17px 17px 17px 34px;
    }

    .th-inner-page--terms .th-inner-rich > p:nth-child(n+5):nth-child(-n+14) {
        padding: 12px 14px;
    }

    .th-inner-page--terms .th-inner-rich > div:nth-child(16) {
        padding: 18px;
    }

    .th-inner-page--tbi .th-inner-rich {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .th-inner-page--tbi .th-inner-rich > p:nth-child(9),
    .th-inner-page--tbi .th-inner-rich > p:nth-child(10),
    .th-inner-page--tbi .th-inner-rich > p:nth-child(11) {
        grid-column: 1 / -1;
        min-height: 0;
    }

    .th-inner-page--tbi .th-inner-rich > p:nth-child(3),
    .th-inner-page--tbi .th-inner-rich > p:nth-child(12),
    .th-inner-page--tbi .th-inner-rich > div:nth-child(14),
    .th-inner-page--tbi .th-inner-rich > div:nth-child(15) {
        padding: 18px;
    }
}
