html {
    scroll-behavior: smooth;
}

#page-content {
    background-color: #F6F6F6;
    color: #141414;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding-bottom: 1em;
}

#qsg_header {
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 1.08px;
}

#product_description {
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px; /* 116.667% */
}

#deepl-message {
    border: 1px solid black;
}

/* qsg content */
#page-content a {
    color: #000;
    text-decoration: underline;
}

/* the double declaration is needed due to rich text */
.streamfield h2,
.streamfield h2 p{
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 34px;
    letter-spacing: 2.4px;
}

.streamfield h3,
.streamfield h3 p {
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 120% */
}

/* tables */
.streamfield table td, 
.streamfield table th {
    border-top: 1px solid var(--Vivid-Grey, #5F626B);
    border-right: 1px solid var(--Vivid-Grey, #5F626B);
    border-left: 1px solid var(--Vivid-Grey, #5F626B);
}

/* table of contents */
#table_of_contents {
    --toc-rail: #DBDBDB;
    --toc-accent: var(--brand-colour, #141414);
    font-size: 16px;
    line-height: 1.4;
}

#table_of_contents .toc-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.08px;
    line-height: normal;
    margin: 0 0 12px;
    text-transform: uppercase;
}

#table_of_contents #toc-parent-list,
#table_of_contents #toc-parent-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* One continuous rail down the left edge. Each link draws a line from itself to
   the bottom of the list and later links paint over earlier ones, so the active
   link's accent runs down to the next visible link. */
#table_of_contents #toc-parent-list {
    position: relative;
    overflow: hidden;
    padding-left: 16px;
}

#table_of_contents .toc-link {
    display: block;
    padding: 4px 0;
    color: #585858;
    text-decoration: none;
}

#table_of_contents .toc-link::before {
    content: "";
    position: absolute;
    left: 0;
    width: 3px;
    height: 100%;
    margin-top: -4px;
    background: var(--toc-rail);
}

#table_of_contents .toc-link:hover {
    color: #141414;
    text-decoration: underline;
}

#table_of_contents .secondary-toc .toc-link {
    padding-left: 16px;
    font-size: 15px;
}

#table_of_contents .active > .toc-link {
    color: #141414;
    font-weight: 600;
}

#table_of_contents .active > .toc-link::before {
    background: var(--toc-accent);
}

/* Only the section being read shows its sub-headings. */
#table_of_contents .toc-sub {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.3s ease-in-out, visibility 0.3s;
}

#table_of_contents .toc-sub > ol {
    min-height: 0;
    overflow: hidden;
}

#table_of_contents .toc-sub.is-collapsed {
    grid-template-rows: 0fr;
    visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    #table_of_contents .toc-sub {
        transition: none;
    }
}

/* Below the sidebar breakpoint the list sits inline between the intro and the guide. */
.qsg-body,
.qsg-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

#more_articles {
    display: flex;
    height: 48px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border: 1px solid #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 1.6px;
}

.related_article {
    background: #ecf0f1;
}

#related_articles_wrapper a {
    text-decoration: none;
}

@media (min-width: 1280px) {
    /* content */
    .streamfield, 
    .streamfield p {
        font-size: 18px;
    }
}
@media (min-width: 722px) {
    .qsg-body,
    .qsg-main {
        gap: 64px;
    }
}

@media (min-width: 1080px) {
    #article_content.qsg:has(#table_of_contents) {
        max-width: min(1320px, calc(100% - 64px));
    }

    .qsg-body:has(> #table_of_contents) {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        column-gap: 64px;
        align-items: start;
    }

    #table_of_contents {
        position: sticky;
        top: 32px;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
}

@media (min-width: 1600px) {
    /* general */
    #page-content {
        display: flex;
        gap: 32px;
        flex-direction: row;
        justify-content: center;
        padding: 0 50px;
        padding-bottom: 1em;
        padding-top: 80px;
    }

    /* article */
    #article_content {
        margin: 0;
    }
}
