* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background-color: var(--mac-grey-3);
    background-image: radial-gradient(var(--mac-grey-5) 1px, transparent 0);
    background-size: 4px 4px;
    color: var(--mac-black);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

a {
    color: var(--mac-black);
    text-decoration: underline;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* Rainbow accent utilities — decorative only, never a base fill */
.rainbow-bar {
    height: 4px;
    background: var(--rainbow-gradient);
}

.rainbow-stripe-diagonal {
    background-image: repeating-linear-gradient(45deg,
            var(--rainbow-green) 0 8px,
            var(--rainbow-yellow) 8px 16px,
            var(--rainbow-orange) 16px 24px,
            var(--rainbow-red) 24px 32px,
            var(--rainbow-purple) 32px 40px,
            var(--rainbow-blue) 40px 48px);
}

.rainbow-stripe-diagonal-grey {
    background-image: repeating-linear-gradient(45deg,
            var(--mac-grey-1) 0 8px,
            var(--mac-grey-2) 8px 16px);
}

.page-wrapper {
    width: 920px;
    background-color: var(--mac-white);
    border: 2px solid var(--mac-black);
    box-shadow: var(--shadow-flat-3);
    zoom: 1.1;
}

.header-top-nav {
    background: repeating-linear-gradient(to bottom, var(--mac-white) 0 1px, var(--mac-grey-2) 1px 2px);
    text-align: right;
    padding: 3px 15px;
    font-family: var(--font-chrome);
    font-size: 10px;
    font-weight: bold;
    color: var(--mac-black);
    border-bottom: 1px solid var(--mac-black);
}

.header-top-nav a {
    color: var(--mac-black);
    text-decoration: none;
    margin-left: 15px;
    padding: 1px 4px;
}

.header-top-nav a:hover {
    background: var(--mac-black);
    color: var(--mac-white);
    text-decoration: none;
}

.header-top-nav a.active {
    text-decoration: underline;
    color: var(--mac-black);
}

.header-top-nav a.active:hover {
    color: var(--mac-white);
}

.header-main {
    height: 85px;
    background: url('/static/images/banner.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: relative;
    border-bottom: 2px solid var(--mac-black);
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-title {
    font-family: var(--font-wordmark);
    font-size: 36px;
    font-weight: 700;
    font-style: italic;
    line-height: 0.95;
    letter-spacing: -0.5px;
    color: var(--mac-white);
    -webkit-text-stroke: 0.75px var(--mac-black);
    text-stroke: 0.75px var(--mac-black);
    text-shadow:
        1px 1px 0 var(--mac-black),
        2px 2px 0 rgba(0, 0, 0, 0.5);
}

.logo-subtitle {
    font-family: var(--font-chrome);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--mac-white);
    text-transform: uppercase;
    text-shadow: 1px 1px 0px var(--mac-black);
    display: block;
    text-align: center;
}


.audio-btn {
    background: var(--mac-grey-2);
    color: var(--mac-black);
    font-family: var(--font-chrome);
    font-size: 9px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: var(--radius-button);
    border: 1px solid var(--mac-black);
    cursor: pointer;
}

.main-nav {
    background: repeating-linear-gradient(to bottom, var(--mac-white) 0 1px, var(--mac-grey-2) 1px 2px);
    border-bottom: 2px solid var(--mac-black);
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
}

.main-nav a {
    font-family: var(--font-chrome);
    font-size: 10px;
    font-weight: bold;
    color: var(--mac-black);
    text-decoration: none;
    padding: 2px 8px;
    border-right: 1px solid var(--mac-grey-4);
    text-transform: uppercase;
}

.main-nav a:last-child {
    border-right: none;
}

.main-nav a:hover {
    background: var(--mac-black);
    color: var(--mac-white);
    text-decoration: none;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-caret {
    font-size: 8px;
    margin-left: 2px;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background: var(--mac-white);
    border: 1px solid var(--mac-black);
    box-shadow: var(--shadow-flat-2);
    z-index: 50;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 6px 10px;
    border-right: none;
    border-bottom: 1px solid var(--mac-grey-3);
}

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

.nav-dropdown-menu a:hover {
    background: var(--mac-black);
    color: var(--mac-white);
    text-decoration: none;
}

.content-container {
    position: relative;
    background: var(--mac-grey-1);
}

.sidebar {
    width: 250px;
    height: calc(70vh - 50px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--mac-grey-2);
    padding: 15px 10px;
    border-right: 2px solid var(--mac-black);
}

.panel-box {
    background: var(--mac-white);
    border: 1px solid var(--mac-black);
    border-radius: 0;
    margin-bottom: 15px;
    overflow: hidden;
}

.panel-header {
    background: var(--mac-grey-2);
    color: var(--mac-black);
    font-family: var(--font-chrome);
    font-size: 10px;
    font-weight: bold;
    padding: 5px 8px;
    text-transform: uppercase;
    border-bottom: 3px solid;
    border-image: var(--rainbow-gradient) 1;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    border-bottom: 1px solid var(--mac-grey-4);
}

.menu-list a {
    display: block;
    padding: 5px 8px;
    font-family: var(--font-chrome);
    font-size: 10px;
    font-weight: bold;
    color: var(--mac-black);
    text-decoration: none;
    background: var(--mac-white);
    text-transform: uppercase;
}

.menu-list a:hover {
    background: var(--mac-black);
    color: var(--mac-white);
}

.spotlight-content {
    padding: 8px;
    font-size: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--mac-grey-1);
}

.spotlight-img {
    width: 70px;
    height: 45px;
    background: url('/static/images/announces/beercat-banner.png') no-repeat center center;
    background-size: cover;
    border: 1px solid var(--mac-black);
    flex-shrink: 0;
    object-fit: cover;
}

.main-content {
    position: absolute;
    top: 0;
    left: 250px;
    right: 0;
    bottom: 0;
    padding: 15px;
    overflow-y: auto;
    background: var(--mac-white);
    scrollbar-width: thin;
    scrollbar-color: var(--mac-grey-5) var(--mac-grey-1);
}

.main-content::-webkit-scrollbar {
    width: 10px;
}

.main-content::-webkit-scrollbar-track {
    background: var(--mac-grey-1);
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--mac-grey-5);
    border-radius: 2px;
    border: 2px solid var(--mac-grey-1);
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--mac-grey-6);
}

footer {
    background: var(--mac-grey-2);
    border-top: 2px solid var(--mac-black);
    padding: 5px 15px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-chrome);
    font-size: 9px;
    color: var(--mac-black);
    font-weight: bold;
}

footer a {
    color: var(--mac-black);
    text-decoration: underline;
}

.announcement-image {
    width: 200px;
    display: block;
    margin: 0 auto;
    border: 1px solid var(--mac-black);
    box-shadow: var(--shadow-flat-1);
    pointer-events: none;
    margin-bottom: 10px;
}

.icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    pointer-events: none;
}

.nav-icon {
    width: 12px;
    height: 12px;
    image-rendering: pixelated;
    vertical-align: -1px;
    margin-right: 4px;
    pointer-events: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    margin-bottom: 4px;
    pointer-events: none;
}

/* Generic tag-level resets — System 7 push-buttons, inset fields, tables, code */
button,
input[type="submit"],
input[type="button"] {
    font-family: var(--font-chrome);
    background: var(--mac-grey-2);
    color: var(--mac-black);
    border: 1px solid var(--mac-black);
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-flat-1);
    padding: 6px 14px;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: var(--mac-grey-3);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
    background: var(--mac-grey-4);
    box-shadow: none;
    transform: translate(1px, 1px);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
textarea,
select {
    font-family: var(--font-body);
    background: var(--mac-white);
    color: var(--mac-black);
    border: 1px solid var(--mac-black);
    border-radius: 0;
    padding: 5px 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: 1px dashed var(--mac-black);
    outline-offset: 2px;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid var(--mac-black);
    padding: 6px 8px;
    text-align: left;
}

th {
    background: var(--mac-grey-2);
    font-family: var(--font-chrome);
    text-transform: uppercase;
    font-size: 10px;
}

tbody tr:nth-child(even) {
    background: var(--mac-grey-1);
}

code {
    font-family: var(--font-mono);
    background: var(--mac-grey-1);
    border: 1px solid var(--mac-grey-4);
    border-radius: 0;
    padding: 1px 4px;
    color: var(--mac-black);
}

pre {
    font-family: var(--font-mono);
    background: var(--mac-grey-6);
    color: var(--mac-grey-1);
    border: 1px solid var(--mac-black);
    padding: 10px;
    overflow-x: auto;
}

pre code {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

blockquote {
    border-left: 4px solid var(--mac-black);
    background: var(--mac-grey-1);
    padding: 8px 12px;
    margin: 10px 0;
}

hr {
    border: none;
    border-top: 1px solid var(--mac-grey-4);
    margin: 12px 0;
}

/* ── Responsive shell ──────────────────────────────────────────────────────
   Everything above this point is the original fixed 920px desktop window,
   untouched. Below 768px we turn it into a normal single-column page: the
   sidebar drops below the main content instead of sitting beside it, and
   the nav wraps instead of overflowing. Nothing here overrides a rule
   outside a max-width query, so desktop rendering never changes. */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .page-wrapper {
        width: 100%;
        zoom: 1;
    }

    .header-main {
        height: auto;
        padding: 12px;
    }

    .logo-title {
        font-size: 20px;
        letter-spacing: -0.3px;
        overflow-wrap: anywhere;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        row-gap: 3px;
    }

    .main-nav a {
        padding: 3px 7px;
    }

    /* Extras menu floats absolutely on desktop, where there's room to spare.
       On a wrapped mobile nav the toggle can land anywhere in the row, so an
       absolutely-positioned box can run off the right edge — instead let it
       take the dropdown's full row and expand in normal flow underneath. */
    .nav-dropdown.open {
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--mac-black);
    }

    .content-container {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        order: 2;
        width: 100%;
        height: auto;
        overflow-y: visible;
        border-right: none;
        border-top: 2px solid var(--mac-black);
    }

    .main-content {
        order: 1;
        position: static;
        overflow-y: visible;
    }

    footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}
