:root {
    color-scheme: dark;
    --terms-page: #171717;
    --terms-surface: #222222;
    --terms-surface-raised: #292929;
    --terms-border: #454140;
    --terms-text: #f3f1f0;
    --terms-muted: #bcb5b2;
    --terms-accent: #d9945d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 20rem;
    min-height: 100svh;
    margin: 0;
    background: var(--terms-page);
    color: var(--terms-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.terms-header,
.terms-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 2rem, 75rem);
    margin: auto;
}

.terms-header {
    min-height: 4.75rem;
}

.terms-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--terms-text);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.terms-brand img {
    width: 2rem;
    height: 2rem;
    border-radius: .45rem;
}

.terms-back {
    color: var(--terms-accent);
    font-size: .9rem;
    font-weight: 700;
    text-underline-offset: .22rem;
}

.terms-layout {
    display: grid;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    gap: 2.25rem;
    width: min(100% - 2rem, 75rem);
    margin: 1.25rem auto 3rem;
}

.terms-navigation {
    align-self: start;
    position: sticky;
    top: 1rem;
    display: grid;
    gap: .3rem;
    padding: 1rem;
    border: 1px solid var(--terms-border);
    border-radius: .75rem;
    background: var(--terms-surface);
}

.terms-navigation__label {
    margin: 0 0 .4rem;
    color: var(--terms-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.terms-navigation a,
.terms-navigation span {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .52rem .6rem;
    border-radius: .45rem;
    font-size: .9rem;
    text-decoration: none;
}

.terms-navigation .is-current {
    background: rgba(217, 148, 93, .17);
    color: var(--terms-accent);
    font-weight: 700;
}

.terms-navigation span {
    color: #918a87;
    cursor: not-allowed;
}

.terms-navigation small {
    font-size: .68rem;
    white-space: nowrap;
}

.terms-document {
    min-width: 0;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--terms-border);
    border-radius: 1rem;
    background: var(--terms-surface);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .13);
}

.terms-document h1,
.terms-document h2 {
    line-height: 1.2;
}

.terms-document h1 {
    margin: 0 0 2rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.terms-document h2 {
    margin: 2.25rem 0 .8rem;
    color: var(--terms-accent);
    font-size: 1.2rem;
}

.terms-document h1 + p {
    margin-top: -1.25rem;
    color: var(--terms-muted);
    font-size: .9rem;
}

.terms-document p,
.terms-document li {
    color: #e1dddd;
}

.terms-document p {
    margin: .9rem 0;
}

.terms-document ul {
    display: grid;
    gap: .45rem;
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.terms-document strong {
    color: #fff;
}

.terms-error {
    color: #ffb4a6;
}

.terms-footer {
    min-height: 5rem;
    border-top: 1px solid var(--terms-border);
    color: var(--terms-muted);
    font-size: .8rem;
}

.terms-footer a {
    color: var(--terms-accent);
}

@media (max-width: 48rem) {
    .terms-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: .5rem;
    }

    .terms-navigation {
        position: static;
    }

    .terms-navigation span,
    .terms-navigation a {
        padding: .65rem;
    }
}

@media (max-width: 28rem) {
    .terms-header,
    .terms-footer {
        width: min(100% - 1.25rem, 75rem);
    }

    .terms-layout {
        width: min(100% - 1.25rem, 75rem);
    }

    .terms-back {
        font-size: .78rem;
    }
}
