html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

:root {
    --content-width: 900px;
}

* {
    box-sizing: border-box;
}

/* screen is the scroll container */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: normal 16px Tahoma, Arial, Helvetica, sans-serif;
    color: #666666;
    background: #ebe5e5;
    overflow-y: auto;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: black;
}

p a:hover {
    color: gray;
}

h1 {
    text-transform: uppercase;
    font-size: 18px;
}

/* ── Menu ── */
.menu {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.menu-bar {
    height: 48px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 10px 12px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.hamburger span {
    display: block;
    height: 2px;
    background: #505050;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 48px;
    display: flex;
    align-items: center;
    max-width: calc(100% - 160px);
    overflow-x: auto;
    overflow-y: hidden;
}

.menu-links a {
    height: 48px;
    padding: 0 20px;
    color: #505050;
    font-size: 12pt;
    line-height: 48px;
    white-space: nowrap;
    transition: 0.125s;
}

.menu-links a:hover {
    color: #000;
    background: #c8c8c888;
}

.menu-brand {
    height: 48px;
    padding: 0 20px;
    color: #222;
    font-size: 13pt;
    font-weight: 600;
    line-height: 48px;
    white-space: nowrap;
    border-left: 1px solid #e0e0e0;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 1;
}

.menu-brand:hover {
    background: #c8c8c888;
}

.menu-drawer {
    display: none;
}

/* ── Page ── */
.page {
    width: min(var(--content-width), 100vw);
    flex: 1;
    margin: 0 auto;
    padding: 40px 24px;
    background-color: #ebe5e5;
    display: flex;
    flex-direction: column;
}

.page img {
    max-width: 100%;
    height: auto;
}

/* ── Footer ── */
.footer {
    width: 100%;
    padding: 16px 0 8px;
    border-top: 1px solid #c8c8c8;
    text-align: center;
    font-size: 10pt;
    background-color: #ebe5e5;
    background-image: url(../images/bottom.png);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% auto;
    flex-shrink: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

/* ══ Mobile ≤ 768px ══ */
@media (max-width: 768px) {

    .hamburger {
        display: flex;
    }

    .menu-links {
        display: none;
    }

    .menu-brand {
        margin-left: auto;
    }

    .menu-drawer {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        border-top: 0.5px solid #f0f0f0;
        background: #fff;
    }

    .menu-drawer.open {
        max-height: 480px;
    }

    .menu-drawer a {
        display: block;
        padding: 14px 20px;
        color: #505050;
        font-size: 11pt;
        border-bottom: 0.5px solid #f0f0f0;
        background: #fff;
    }

    .menu-drawer a:last-child {
        border-bottom: none;
    }

    .page {
        padding: 24px 16px;
    }
}
