/*
 * The MultiPress start page (templates/start_page), from the earlier static start page: max. 1400px wide, centred,
 * breakpoints 960px and 640px. Blobs are isolated from these styles (Shadow DOM); only their host element
 * (.content-blob: its size and position in the zone) is styled here.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    /* The MultiPress webview shows no scrollbars; the page still scrolls. */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    background: #f4f6f9;
    color: #1a1a2e;
    font-family: "Segoe UI", "Lucida Grande", "Calibri", sans-serif;
}

/* Page: the areas top, main and side */

.start-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.start-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 0.25rem;
    column-gap: 1.25rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.start-page__grid--two-columns {
    grid-template-columns: 2fr 1fr;
}

.start-page__top {
    grid-column: 1 / -1;
    overflow: hidden;
}

.start-page__main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.start-page__side {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-width: 0;
}

.start-page__side > * {
    flex: 1;
}

/* Zones */

.zone {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.zone__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 1.25rem;
}

.zone__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 1rem 1.25rem 0.75rem;
    color: #1a1a2e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zone__bar {
    display: inline-block;
    flex-shrink: 0;
    width: 3px;
    height: 0.85em;
    background: #1a1a2e;
}

.zone__link {
    color: #5a6e88;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}

.zone__link:hover {
    text-decoration: underline;
}

/* single: one blob, the full width (and height, e.g. the side column) of the zone */
.zone--single .zone__items {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.zone--single .zone__items > * {
    flex: 1;
}

/* cards: next to each other, rows of equal height */
.zone--cards .zone__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 5px;
}

/* list: rows below each other, scrollable */
.zone--list .zone__items {
    max-height: 18.75rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid #e4e7ec;
}

.zone--list .zone__items > * + * {
    border-top: 1px solid #e4e7ec;
}

.zone--list .zone__items::-webkit-scrollbar {
    width: 10px;
}

.zone--list .zone__items::-webkit-scrollbar-thumb {
    border: 2px solid #fff;
    background: #c8d0da;
}

.zone--list .zone__items::-webkit-scrollbar-track {
    background: #f7f8fa;
}

@media (max-width: 960px) {
    .start-page__grid--two-columns {
        grid-template-columns: 1fr;
    }

    .start-page__side {
        align-self: auto;
    }
}

@media (max-width: 640px) {
    .start-page__grid {
        gap: 0.75rem;
    }

    .zone--cards .zone__items {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
