* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: auto;
    min-height: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--text-main);

    -webkit-overflow-scrolling: touch;
}

.page {
    min-height: 100vh;
    width: 100%;
    font-family: var(--font-sans);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.content-wrapper {
    width: 70%;
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.header {
    width: 100%;

    padding: 0.3rem 1.5rem;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background-color: var(--header-bg);

    position: sticky;

    top: 0;

    z-index: 9999999;
}

.header .title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.7rem;
}

.left-side,
.right-side {
    flex: 0 0 auto;
}

.home-icon-container {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    cursor: pointer;
    transition: transform 0.1s;
}

.home-icon-container:hover .home-icon {
    background-color: var(--accent-color-2);
}

.home-icon {
    height: 100%;
    aspect-ratio: 1/1;
    background-color: var(--text-main);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-image: url("/shared-resources/svg/home.svg");
    mask-image: url("/shared-resources/svg/home.svg");
}

.socials-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.social-icon-container {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    cursor: pointer;
    transition: transform 0.1s;
}

.social-icon-container:hover {
    transform: translateY(0);
}

.social-icon-container:hover .social-icon {
    background-color: var(--accent-color-2);
}

.social-icon {
    height: 100%;
    aspect-ratio: var(--icon-aspect);
    background-color: var(--text-main);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.bold {
    font-weight: 500;
}

.italic {
    font-style: italic;
    font-size: 0.9rem;
}

.tos-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.disclaimers {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: solid 2px var(--borders);

    outline: solid 2px var(--table-borders);
    outline-offset: 7px;

    border-radius: 1rem;

    background-color: var(--surface);
    color: var(--text-main);
    gap: 0.5rem;

    width: 80%;
    margin-bottom: 1rem;
}

.tos-disclaimer {
    text-align: center;
    font-size: 1rem;
}

.tos-disclaimer.agree {
    font-weight: 600;
}

.updated {
    color: var(--text-main);
    text-align: center;
    font-size: 0.9rem;
    padding: 1rem 0;
    font-style: italic;
}

.accordion {
    width: 80%;
    display: flex;
    flex-direction: column;
}

.accordion-toggle {
    background: none;
    color: var(--text-main);

    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.accordion-toggle.sub {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.accordion-toggle.show {
    transform: skewX(-5deg);
}

.accordion-toggle:hover .section-title {
    background: var(--accent-color-3);
    color: var(--text-accent-1);
}

.accordion-toggle.show .section-title {
    background: var(--accent-color-3);
    color: var(--text-accent-1);
}

.accordion-toggle.show:hover .section-title {
    background: var(--accent-color-3-hover);
    color: var(--text-accent-1);
}

@media (hover: none) and (pointer: coarse) {
    .accordion-toggle:hover .section-title {
        background: none;
        color: var(--text-main);
    }

    .accordion-toggle.show:hover .section-title {
        background: var(--accent-color-3);
        color: var(--text-main);
    }
}

.section-number {
    font-family: var(--font-sans);
    color: var(--text-main);
    font-weight: 800;
    margin-right: 0.3rem;
    font-size: 1.2rem;
}

.section-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.2rem;

    color: var(--text-main);

    padding: 0.2rem 0.5rem;
}

.accordion-content,
.accordion-sub-content {
    max-height: 0;
    overflow: hidden;
    padding: 0rem 0.5rem 0rem 1.5rem;
    background-color: var(--surface);
    border: 2px solid var(--table-borders);
    border-radius: 1rem;
    margin-bottom: 0.3rem;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;

    text-align: justify;
    text-justify: inter-word;

    opacity: 0;
}

.accordion-content.show,
.accordion-sub-content.show {
    max-height: 300rem;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    margin: 0.5rem 0 1rem 0;
    opacity: 1;
}

.accordion-sub-content.show {
    margin-left: 1rem;
    margin-right: 1rem;
}

/* lists */
ol {
    margin: 0.5rem 1rem 0.5rem 1rem;
    line-height: 1.6;
}

ol li {
    margin-bottom: 0.5rem;
}

/*custom numbering */
ol.custom {
    counter-reset: item;
}

ol.custom li {
    counter-increment: item;
    list-style: decimal;
}

ol.custom li::marker {
    font-weight: bold;
}

.content-block li {
    padding-left: 0;
    margin-left: 1rem;
    /* Force a new containing block for list markers on iOS */
    position: relative;
}

.accordion-controls {
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.accordion-controls button {
    background-color: var(--tab-bg);
    color: var(--text-accent-2);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.accordion-controls button:hover {
    background-color: var(--borders);
}

.accordion-controls button:active {
    transform: scale(0.97);
}

a {
    color: var(--text-main);
}

a:hover {
    color: var(--accent-color-2);
}

.darkmode a:hover {
    color: var(--accent-color-1);
}

a:visited {
    color: var(--text-main);
}

a:visited:hover {
    color: var(--accent-color-2);
}

.darkmode a:visited:hover {
    color: var(--accent-color-1);
}

@media (max-width: 768px) {

    .header .title {
        position: static;
        transform: none;
        grid-area: title;
        margin: 0.5rem 0;
        white-space: unset;
        text-align: center;
    }

    .left-side {
        grid-area: left-side;
        margin-left: 3rem;
    }

    .right-side {
        grid-area: right-side;
        margin-right: 3rem;
    }
}

@media (max-width: 700px){
.header {
        display: grid;
        grid-template-areas:
            "left-side right-side"
            "title title";
        grid-template-columns: 1fr 1fr;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 540px) {
    .content-wrapper {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .accordion {
        width: 100%;
    }

    .disclaimers {
        width: 100%;
        padding: 0.8rem;
    }

    .accordion-toggle {
        font-size: 1.3rem;
    }

    .accordion-toggle.sub {
        font-size: 1.15rem;
        margin-left: 0.5rem;
    }

    .accordion-sub-content.show {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    ol {
        margin-left: 0.5rem;
    }
}

@media (max-width: 380px) {
    .accordion-toggle {
        font-size: 1.2rem;
    }

    .accordion-toggle.sub {
        font-size: 1.1rem;
    }
}