/* DTT Terms of Use -------------------------------------------------------
 * Dedicated presentation layer for /dieu-khoan-su-dung/.
 */

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

.dtt-legal-page {
    --legal-ink: #241d1a;
    --legal-muted: #776d67;
    --legal-border: rgba(82, 69, 58, .12);
    --legal-purple: #7c5df6;
    --legal-purple-deep: #5e46c8;
    --legal-orange: #f56a1f;
    --legal-paper: #fffdf9;
    --legal-body-size: 17px;
    --legal-body-size-mobile: 16px;
    --legal-secondary-size: 14px;
    --legal-label-size: 12px;
    min-height: 72vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(245,106,31,.05), transparent 25rem),
        radial-gradient(circle at 92% 5%, rgba(124,93,246,.055), transparent 28rem),
        #fbfaf8;
    color: var(--legal-ink);
}

.dtt-legal-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(28px,4vw,56px) 0 clamp(84px,8vw,124px);
}

.dtt-legal-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr);
    gap: clamp(34px,5vw,76px);
    align-items: center;
    overflow: hidden;
    min-height: 370px;
    margin-bottom: clamp(26px,3vw,38px);
    padding: clamp(30px,4.5vw,60px);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 38px;
    background:
        radial-gradient(circle at 84% 10%, rgba(124,93,246,.28), transparent 27rem),
        radial-gradient(circle at 6% 96%, rgba(245,106,31,.17), transparent 30rem),
        linear-gradient(135deg,#171319 0%,#241a28 58%,#17151d 100%);
    box-shadow: 0 34px 88px rgba(28,20,24,.17);
    color: #fff;
    isolation: isolate;
}

.dtt-legal-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255,255,255,.024) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.024) 1px,transparent 1px);
    background-size: 38px 38px;
    content: "";
    opacity: .5;
    -webkit-mask-image: linear-gradient(90deg,#000 0%,rgba(0,0,0,.55) 58%,transparent 100%);
    mask-image: linear-gradient(90deg,#000 0%,rgba(0,0,0,.55) 58%,transparent 100%);
}

.dtt-legal-hero__content {
    min-width: 0;
}

.dtt-legal-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 25px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.48);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.dtt-legal-breadcrumb a {
    color: #ffd0b3;
    text-decoration: none;
}

.dtt-legal-breadcrumb a:hover,
.dtt-legal-breadcrumb a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dtt-legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #ff9e69;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .17em;
}

.dtt-legal-kicker::before {
    width: 24px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg,#ff9b63,#ad9bff);
    content: "";
}

.dtt-legal-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(48px,6vw,82px);
    font-weight: 950;
    letter-spacing: -.066em;
    line-height: .96;
    text-wrap: balance;
}

.dtt-legal-hero h1 span {
    color: transparent;
    background: linear-gradient(92deg,#ff9b61 0%,#ad9bff 60%,#ddd4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dtt-legal-hero__content > p {
    max-width: 66ch;
    margin: 20px 0 0;
    color: rgba(255,255,255,.65);
    font-size: clamp(16px,1.15vw,17px);
    line-height: 1.72;
}

.dtt-legal-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.dtt-legal-hero__meta > span {
    display: inline-flex;
    min-height: 38px;
    align-items: baseline;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.50);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.dtt-legal-hero__meta strong {
    color: #fff;
    font-size: 13px;
    font-weight: 950;
}

.dtt-legal-hero__panel {
    min-width: 0;
}

.dtt-legal-hero__document {
    position: relative;
    min-height: 222px;
    overflow: hidden;
    padding: 25px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 12%,rgba(245,106,31,.18),transparent 43%),
        rgba(255,255,255,.045);
    box-shadow: 0 22px 48px rgba(0,0,0,.12);
    backdrop-filter: blur(18px);
}

.dtt-legal-hero__document::before,
.dtt-legal-hero__document::after {
    position: absolute;
    right: -28px;
    bottom: -74px;
    width: 166px;
    height: 220px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px 24px 10px 10px;
    background: linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.02));
    content: "";
    transform: rotate(-8deg);
}

.dtt-legal-hero__document::after {
    right: 78px;
    bottom: -88px;
    width: 138px;
    height: 195px;
    background: linear-gradient(145deg,rgba(124,93,246,.17),rgba(255,255,255,.015));
    transform: rotate(7deg);
}

.dtt-legal-hero__document span,
.dtt-legal-hero__document strong,
.dtt-legal-hero__document i {
    position: relative;
    z-index: 2;
}

.dtt-legal-hero__document span {
    display: block;
    color: rgba(255,255,255,.40);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .18em;
}

.dtt-legal-hero__document strong {
    display: block;
    max-width: 220px;
    margin-top: 5px;
    color: #fff;
    font-size: clamp(34px,3.6vw,52px);
    font-weight: 950;
    letter-spacing: -.055em;
    line-height: .94;
}

.dtt-legal-hero__document i {
    position: absolute;
    top: 19px;
    right: 20px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: #ffb486;
    font-family: Georgia,serif;
    font-style: normal;
    font-size: 22px;
}

.dtt-legal-hero__links {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
    margin-top: 8px;
}

.dtt-legal-hero__links a {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.65);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    transition: background .2s ease,border-color .2s ease,color .2s ease;
}

.dtt-legal-hero__links a:hover,
.dtt-legal-hero__links a:focus-visible {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.dtt-legal-layout {
    display: grid;
    grid-template-columns: 276px minmax(0,1fr);
    gap: clamp(22px,3vw,38px);
    align-items: start;
}

.dtt-legal-rail {
    min-width: 0;
}

.dtt-legal-rail__inner {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 14px;
}

.dtt-legal-rail__head {
    padding: 17px 18px 13px;
    border: 1px solid var(--legal-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: rgba(255,255,255,.82);
}

.dtt-legal-rail__head span {
    display: block;
    margin-bottom: 4px;
    color: #967eea;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .14em;
}

.dtt-legal-rail__head strong {
    color: #29211e;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -.02em;
}

.dtt-legal-toc {
    display: grid;
    gap: 3px;
    margin-top: -14px;
    padding: 6px 8px 10px;
    border: 1px solid var(--legal-border);
    border-top: 0;
    border-radius: 0 0 20px 20px;
    background: rgba(255,255,255,.82);
}

.dtt-legal-toc__loading {
    padding: 10px;
    color: #9a9089;
    font-size: 13px;
}

.dtt-legal-toc a {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr);
    gap: 8px;
    align-items: start;
    padding: 9px 10px;
    border-radius: 12px;
    color: #6f655f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    transition: background .2s ease,color .2s ease,transform .2s ease;
}

.dtt-legal-toc a:hover,
.dtt-legal-toc a:focus-visible,
.dtt-legal-toc a.is-active {
    background: #f4f0ff;
    color: #5e47c7;
}

.dtt-legal-toc a:hover {
    transform: translateX(2px);
}

.dtt-legal-toc__number {
    color: #e57332;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .05em;
}

.dtt-legal-rail__help {
    padding: 16px;
    border: 1px solid rgba(124,93,246,.11);
    border-radius: 19px;
    background: linear-gradient(145deg,#f8f5ff,#fffaf5);
}

.dtt-legal-rail__help > span {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 11px;
    background: #241c28;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.dtt-legal-rail__help strong {
    display: block;
    color: #2b2320;
    font-size: 15px;
    font-weight: 950;
}

.dtt-legal-rail__help p {
    margin: 5px 0 12px;
    color: #82766f;
    font-size: 13px;
    line-height: 1.55;
}

.dtt-legal-rail__help a {
    color: #634bc9;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.dtt-legal-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--legal-border);
    border-radius: 28px;
    background: rgba(255,255,255,.90);
    box-shadow: 0 18px 50px rgba(40,31,25,.06);
}

.dtt-legal-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px clamp(22px,3.5vw,46px);
    border-bottom: 1px solid rgba(82,69,58,.09);
    background: rgba(250,248,245,.80);
}

.dtt-legal-card__label {
    color: #887c74;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .14em;
}

.dtt-legal-card__reading {
    padding: 5px 8px;
    border: 1px solid rgba(124,93,246,.12);
    border-radius: 999px;
    background: #f4f0ff;
    color: #654dcc;
    font-size: 12px;
    font-weight: 900;
}

.dtt-legal-prose {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(30px,4.5vw,64px) clamp(22px,5vw,72px);
    color: #413833;
    font-size: var(--legal-body-size);
    line-height: 1.82;
    font-family: 'Be Vietnam Pro',system-ui,sans-serif;
}

.dtt-legal-prose > p:first-child {
    display: inline-flex;
    margin: 0 0 16px;
    padding: 7px 11px;
    border: 1px solid rgba(245,106,31,.12);
    border-radius: 999px;
    background: #fff5ee;
    color: #b95722;
    font-size: 13px;
    font-weight: 900;
}

.dtt-legal-prose > p:nth-child(2) {
    margin: 0 0 34px;
    padding: 0 0 26px;
    border-bottom: 1px solid rgba(82,69,58,.10);
    color: #5b504a;
    font-size: clamp(17px,1.5vw,19px);
    line-height: 1.75;
}

.dtt-legal-prose p {
    margin: 0 0 1.25em;
    color: #4f4540;
}

.dtt-legal-prose h2 {
    position: relative;
    scroll-margin-top: 104px;
    margin: 54px 0 20px;
    padding: 18px 20px 18px 54px;
    border: 1px solid rgba(82,69,58,.10);
    border-radius: 18px;
    background:
        linear-gradient(90deg,rgba(124,93,246,.055),transparent 62%),
        #fcfbf9;
    color: #271f1c;
    font-size: clamp(20px,2vw,26px);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1.3;
}

.dtt-legal-prose h2::before {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 23px;
    height: 23px;
    border-radius: 8px;
    background: linear-gradient(135deg,#f48344,#765bd8);
    box-shadow: 0 6px 14px rgba(124,93,246,.16);
    content: "";
    transform: translateY(-50%);
}

.dtt-legal-prose h2:first-of-type {
    margin-top: 0;
}

.dtt-legal-prose h3 {
    margin: 34px 0 13px;
    color: #2c2421;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.dtt-legal-prose h4 {
    margin: 28px 0 10px;
    color: #332a26;
    font-size: 18px;
    font-weight: 900;
}

.dtt-legal-prose ul,
.dtt-legal-prose ol {
    margin: 0 0 24px;
    padding-left: 0;
    list-style: none;
}

.dtt-legal-prose li {
    position: relative;
    margin: 0 0 10px;
    padding: 12px 14px 12px 38px;
    border: 1px solid rgba(82,69,58,.075);
    border-radius: 13px;
    background: #fdfcfb;
    color: #4f4540;
}

.dtt-legal-prose li::before {
    position: absolute;
    left: 14px;
    top: 17px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg,#f27639,#846ae0);
    content: "";
}

.dtt-legal-prose strong,
.dtt-legal-prose b {
    color: #2c2421;
    font-weight: 850;
}

.dtt-legal-prose a {
    color: #6048c8;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(96,72,200,.22);
    text-underline-offset: 3px;
}

.dtt-legal-prose blockquote {
    margin: 28px 0;
    padding: 18px 20px;
    border-left: 3px solid #765bd8;
    border-radius: 0 14px 14px 0;
    background: #f6f2ff;
    color: #544b61;
}

.dtt-legal-prose hr {
    margin: 38px 0;
    border: 0;
    border-top: 1px solid rgba(82,69,58,.10);
}

.dtt-legal-prose table {
    width: 100%;
    margin: 26px 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--legal-border);
    border-radius: 14px;
}

.dtt-legal-prose th,
.dtt-legal-prose td {
    padding: 11px 13px;
    border-right: 1px solid var(--legal-border);
    border-bottom: 1px solid var(--legal-border);
    text-align: left;
}

.dtt-legal-prose th {
    background: #f6f3ef;
    color: #372f2b;
    font-weight: 900;
}

.dtt-legal-prose tr:last-child td {
    border-bottom: 0;
}

.dtt-legal-prose th:last-child,
.dtt-legal-prose td:last-child {
    border-right: 0;
}

.dtt-legal-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px clamp(22px,3.5vw,46px);
    border-top: 1px solid rgba(82,69,58,.09);
    background: #faf8f5;
}

.dtt-legal-card__footer > div:first-child > span {
    display: block;
    margin-bottom: 3px;
    color: #967eea;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .14em;
}

.dtt-legal-card__footer > div:first-child > strong {
    color: #302824;
    font-size: 14px;
    font-weight: 950;
}

.dtt-legal-card__footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dtt-legal-card__footer-links a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid var(--legal-border);
    border-radius: 999px;
    background: #fff;
    color: #655b55;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.dtt-legal-card__footer-links a:hover,
.dtt-legal-card__footer-links a:focus-visible {
    border-color: rgba(124,93,246,.18);
    color: #5e47c7;
}

@media (max-width: 1020px) {
    .dtt-legal-hero {
        grid-template-columns: minmax(0,1fr) 320px;
    }

    .dtt-legal-layout {
        grid-template-columns: 232px minmax(0,1fr);
    }
}

@media (max-width: 840px) {
    .dtt-legal-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .dtt-legal-hero__document {
        display: none;
    }

    .dtt-legal-hero__panel {
        max-width: 640px;
    }

    .dtt-legal-layout {
        grid-template-columns: 1fr;
    }

    .dtt-legal-rail__inner {
        position: static;
    }

    .dtt-legal-rail__help {
        display: none;
    }

    .dtt-legal-rail__head {
        border-radius: 18px 18px 0 0;
    }

    .dtt-legal-toc {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        padding: 7px 8px 10px;
        border-radius: 0 0 18px 18px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dtt-legal-toc::-webkit-scrollbar {
        display: none;
    }

    .dtt-legal-toc a {
        flex: 0 0 auto;
        display: inline-flex;
        min-height: 36px;
        align-items: center;
        max-width: 220px;
        padding: 8px 10px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .dtt-legal-toc a span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 640px) {
    .dtt-legal-shell {
        width: calc(100% - 20px);
        padding-top: 22px;
        padding-bottom: 72px;
    }

    .dtt-legal-hero {
        gap: 23px;
        padding: 24px 22px 26px;
        border-radius: 28px;
    }

    .dtt-legal-breadcrumb {
        margin-bottom: 20px;
    }

    .dtt-legal-hero h1 {
        font-size: clamp(42px,13vw,58px);
    }

    .dtt-legal-hero__content > p {
        margin-top: 16px;
        font-size: var(--legal-body-size-mobile);
        line-height: 1.68;
    }

    .dtt-legal-hero__meta {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 6px;
        margin-top: 20px;
    }

    .dtt-legal-hero__meta > span {
        display: grid;
        align-content: center;
        gap: 2px;
        min-height: 50px;
        border-radius: 13px;
    }

    .dtt-legal-hero__links {
        grid-template-columns: 1fr;
    }

    .dtt-legal-rail__head {
        padding: 14px 15px 11px;
    }

    .dtt-legal-card {
        border-radius: 22px;
    }

    .dtt-legal-card__top {
        padding: 13px 17px;
    }

    .dtt-legal-prose {
        padding: 26px 18px 34px;
        font-size: var(--legal-body-size-mobile);
        line-height: 1.78;
    }

    .dtt-legal-prose > p:nth-child(2) {
        margin-bottom: 28px;
        padding-bottom: 22px;
        font-size: 16px;
    }

    .dtt-legal-prose h2 {
        margin-top: 42px;
        padding: 15px 14px 15px 46px;
        border-radius: 15px;
        font-size: 18px;
        line-height: 1.38;
    }

    .dtt-legal-prose h2::before {
        left: 14px;
        width: 21px;
        height: 21px;
        border-radius: 7px;
    }

    .dtt-legal-prose li {
        padding: 11px 12px 11px 34px;
    }

    .dtt-legal-prose li::before {
        left: 13px;
        top: 16px;
    }

    .dtt-legal-card__footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dtt-legal-page *,
    .dtt-legal-page *::before,
    .dtt-legal-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
