:root {
    --primary: var(--blue);
    --primary-dark: var(--blue-dark);
    --dark: var(--ink);
    --text: var(--muted);
    --border: var(--line);
}

.terms-hero {
    padding: 110px 0 85px;
    background: linear-gradient(180deg, #fff 0%, #f7f9ff 100%);
    position: relative;
    overflow: hidden
}

.terms-hero:before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 86, 255, .10), transparent 68%);
    top: -250px;
    left: -180px
}

.terms-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 70px;
    align-items: center
}

.terms-hero-copy {
    position: relative;
    z-index: 1
}

.terms-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px
}

.terms-tag:before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--blue)
}

.terms-hero h1 {
    margin: 0 0 24px;
    font-size: clamp(48px, 5.4vw, 78px);
    line-height: 1.1;
    letter-spacing: -3px;
    color: var(--ink)
}

.terms-hero h1 span {
    color: var(--blue)
}

.terms-hero p {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85
}

.effective-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700
}

.effective-date i {
    color: var(--blue)
}

.terms-hero-card {
    position: relative;
    min-height: 340px;
    border-radius: 30px;
    background: var(--ink);
    color: #fff;
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(11, 16, 32, .16)
}

.terms-hero-card:before {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    top: -75px;
    right: -55px
}

.terms-hero-card:after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 28px;
    background: rgba(37, 86, 255, .18);
    bottom: -55px;
    left: -45px;
    transform: rotate(25deg)
}

.terms-icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font-size: 30px;
    margin-bottom: auto;
    position: relative;
    z-index: 1
}

.terms-hero-card h2 {
    position: relative;
    z-index: 1;
    font-size: 34px;
    line-height: 1.15;
    margin: 35px 0 12px
}

.terms-hero-card p {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.7;
    margin: 0
}

.terms-content-section {
    background: #fff;
    padding: 95px 0 110px
}

.terms-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 75px;
    align-items: start
}

.terms-sidebar {
    position: sticky;
    top: 105px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #f8f9fc
}

.terms-sidebar-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 15px
}

.terms-sidebar a {
    display: block;
    padding: 9px 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    transition: .25s
}

.terms-sidebar a:hover {
    color: var(--blue);
    transform: translateX(4px)
}

.terms-document {
    max-width: 850px
}

.terms-intro {
    margin-bottom: 48px;
    padding: 28px 30px;
    border-left: 4px solid var(--blue);
    background: #f7f9ff;
    border-radius: 0 18px 18px 0
}

.terms-intro p {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.85
}

.terms-section {
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 110px
}

.terms-section:last-child {
    border-bottom: 0
}

.terms-section h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--ink);
    margin: 0 0 20px
}

.terms-number {
    color: var(--blue);
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 800;
    white-space: nowrap
}

.terms-section p,
.terms-section li {
    color: var(--text);
    font-size: 16px;
    line-height: 1.9
}

.terms-section p {
    margin: 0 0 17px
}

.terms-section ul {
    margin: 15px 0 0;
    padding-left: 22px
}

.terms-section li {
    margin-bottom: 9px
}

.terms-contact {
    margin-top: 45px;
    padding: 35px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff
}

.terms-contact h3 {
    margin: 0 0 12px;
    font-size: 28px
}

.terms-contact p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.8
}

.terms-contact a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px
}

.terms-back {
    margin-top: 35px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 700
}

@media(max-width:992px) {
    .terms-hero {
        padding: 95px 0 70px
    }

    .terms-hero-grid {
        grid-template-columns: 1fr;
        gap: 45px
    }

    .terms-hero-card {
        min-height: 300px
    }

    .terms-layout {
        grid-template-columns: 1fr;
        gap: 35px
    }

    .terms-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 18px
    }

    .terms-sidebar-label {
        width: 100%
    }
}

@media(max-width:768px) {
    .terms-hero {
        padding: 85px 0 60px
    }

    .terms-hero h1 {
        font-size: 43px;
        line-height: 1.12;
        letter-spacing: -2px
    }

    .terms-hero p {
        font-size: 16px;
        line-height: 1.8
    }

    .terms-hero-card {
        min-height: 280px;
        padding: 30px
    }

    .terms-content-section {
        padding: 65px 0 80px
    }

    .terms-section {
        padding: 30px 0
    }

    .terms-section h2 {
        font-size: 25px
    }

    .terms-section p,
    .terms-section li {
        font-size: 15px;
        line-height: 1.85
    }

    .terms-intro,
    .terms-contact {
        padding: 24px
    }
}

/* ===== FINAL RESPONSIVE FIXES ===== */
html,
body {
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1240px, calc(100% - 48px));
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: currentColor;
    display: block;
}

@media (max-width: 992px) {
    .container {
        width: min(760px, calc(100% - 40px));
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 10px 16px 16px;
        background: #fff;
        box-shadow: 0 16px 30px rgba(0, 0, 0, .10);
        z-index: 100;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 13px 8px;
    }

    .terms-hero-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }

    .terms-hero-copy {
        max-width: 760px;
        margin: auto;
    }

    .terms-hero-copy p {
        margin-inline: auto;
    }

    .terms-hero-card {
        max-width: 700px;
        width: 100%;
        margin: auto;
    }

    .terms-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }



}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 32px);
    }

    .terms-tag {
        margin-top: 50px;
    }

    .terms-hero {
        padding: 58px 0 48px;
    }

    .terms-hero-copy h1 {
        font-size: clamp(34px, 9vw, 46px);
        line-height: 1.08;
    }

    .terms-hero-copy p {
        font-size: 15px;
        line-height: 1.7;
    }

    .terms-hero-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .terms-hero-card h2 {
        font-size: 25px;
    }

    .terms-hero-card p {
        font-size: 14px;
        line-height: 1.7;
    }

    .terms-content {
        padding: 50px 0 65px;
    }

    .terms-sidebar {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 7px;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .terms-sidebar-title {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .terms-sidebar a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 13px;
        border-radius: 999px;
    }

    .terms-intro {
        padding: 19px 16px;
        margin-bottom: 26px;
    }

    .terms-intro p {
        font-size: 14px;
        line-height: 1.75;
    }

    .terms-section {
        padding: 26px 0;
        scroll-margin-top: 80px;
    }

    .terms-section h2 {
        font-size: clamp(21px, 6vw, 27px);
        line-height: 1.2;
    }

    .terms-section p,
    .terms-section li {
        font-size: 14px;
        line-height: 1.8;
    }

    .terms-section ul,
    .terms-section ol {
        padding-left: 20px;
    }

    .terms-contact {
        padding: 21px 17px;
        border-radius: 18px;
    }

    .terms-contact a {
        overflow-wrap: anywhere;
    }


}

@media (max-width: 480px) {
    .container {
        width: calc(100% - 24px);
    }

    .brand-mark {
        max-width: 135px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .terms-hero {
        padding: 45px 0 40px;
    }

    .terms-hero-copy h1 {
        font-size: 32px;
    }

    .terms-hero-copy p {
        font-size: 14px;
    }

    .terms-hero-card {
        padding: 20px 15px;
        border-radius: 17px;
    }

    .terms-hero-card h2 {
        font-size: 22px;
    }

    .terms-hero-card p {
        font-size: 13px;
    }

    .terms-content {
        padding: 42px 0 55px;
    }

    .terms-sidebar {
        padding: 8px;
    }

    .terms-sidebar a {
        font-size: 11px;
        padding: 8px 11px;
    }

    .terms-intro {
        padding: 17px 14px;
    }

    .terms-section h2 {
        font-size: 21px;
    }

    .terms-section p,
    .terms-section li {
        font-size: 13.5px;
    }

    .terms-contact {
        padding: 19px 14px;
    }

}

@media (max-height: 520px) and (orientation: landscape) and (max-width: 900px) {
    .terms-hero {
        padding: 42px 0;
    }

    .terms-hero-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        align-items: center;
    }

    .terms-hero-copy p {
        margin-inline: 0;
    }
}

@media (min-width: 993px) {
    .terms-content-section {
        height: calc(100vh - 80px);
        overflow: hidden;
    }

    .terms-layout {
        height: 100%;
    }

    .terms-document {
        height: 100%;
        max-width: 850px;
        overflow-y: auto;
        padding-right: 20px;
    }

    .terms-sidebar {
        position: sticky;
        top: 25px;
        align-self: start;
    }
}