:root {
    color-scheme: dark;

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --bg-color: #161616;
    --surface-color: #1e1e1e;
    --input-bg: #242424;
    --border-color: #333333;
    --default-font-color: #f2f0ea;
    --accent-color: #7ba7c9;
    --danger-color: #a3453f;
    --success-color: #7a9d78;

    /* Near-square. 8px/14px rounding on every surface was the single
       loudest "assembled from a component library" signal; 2px keeps edges
       from looking accidentally sharp without reading as a UI kit. */
    --radius-sm: 2px;
    --radius-lg: 2px;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Inter-roman.var.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/assets/fonts/PlayfairDisplay-Variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url('/assets/fonts/PlayfairDisplay-Italic-Variable.woff2') format('woff2');
}

html {
    /* Always reserve the scrollbar's width so opening/closing content
       (e.g. the settings dropdown) never triggers a horizontal reflow. */
    overflow-y: scroll;
}

body {
    background-color: var(--bg-color);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10%;
    margin-right: 10%;
}

.header-bar__brand {
    white-space: nowrap;
    flex-shrink: 0;
}

header {
    position:sticky;
    top:0;
    background-color: var(--bg-color);
    z-index:100;
}

.menu_items {
    background-color:var(--bg-color);
    color: var(--default-font-color);
    padding-top:5px;
    padding-left:8px;
    padding-right:8px;
    font-family: var(--font-body);
    font-size:18px;
    font-weight: 300;
    list-style:None;
    display:flex;
    text-transform: uppercase;
    text-decoration: none;
}

.playfair-regular {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: normal;
    font-size:54px;
    color: var(--default-font-color);
}

.login-main {
    font-family:var(--font-body);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    /* No min-height: the page is only as tall as the card, so it scrolls
       only when the card (e.g. with a status message) outgrows the window. */
    padding-bottom: 40px;
}

/* Keeps its outline -- a form needs to read as one bounded thing -- but
   loses the raised fill, so it sits on the page rather than floating above
   it. Padding opened up because a hairline box needs interior air that a
   filled panel does not. */
.login-card {
    width: 100%;
    max-width: 380px;
    border-color: var(--border-color);
    border-style: solid;
    border-width: 1px;
    border-radius: var(--radius-lg);
    padding: 20px;
}

.login-card__title {
    color: var(--default-font-color);
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 1.25rem;
}

.login-field label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: none;
    color: var(--default-font-color);
}

.login-field input {
    font-family: var(--font-body);
    font-size: 16px;
    /* Pinned so the box stays the height it was at the old 15px size. */
    line-height: 20px;
    color: var(--default-font-color);
    background: var(--input-bg);
    border-width: 1px;
    border-style: solid;
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    padding-top: 12px;
    padding-bottom: 12px;
}

.login-field input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.login-field__hint {
    font-size: 13px;
    opacity: 0.7;
}

/* Register-form honeypot (see templates/register.html). Off-screen rather
   than display:none, which some bots detect and skip. */
.login-field--hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.login-submit {
    width: 100%;
    background: var(--default-font-color);
    color: var(--bg-color);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: none;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: 5px;
    transition-property: background-color, color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
    transition-delay: 0s;
}

.login-submit:hover {
    background: var(--accent-color);
    color: var(--default-font-color);
}

.login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-status--error {
    color: var(--danger-color);
}

.login-status--success {
    color: var(--success-color);
}

.login-card__register {
    padding-top: 10px;
    border-top-color: var(--border-color);
    border-top-width: 1px;
    margin-left:10px;
    text-align: left;
    text-transform: none;
    font-size: 15px;
    letter-spacing: 1px;
}

.login-card__register a {
    color: var(--default-font-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.login-card__register a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.settings-dropdown {
    position: relative;
}

.settings-dropdown__toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--bg-color);
    color: var(--default-font-color);
    border: none;
    margin: 0;
    padding-top: 5px;
    padding-left: 15px;
    padding-right: 15px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 300;
    text-transform: uppercase;
    cursor: pointer;
}

.settings-dropdown__toggle:hover,
.settings-dropdown__toggle[aria-expanded="true"] {
    color: var(--accent-color);
}

/* About is a plain nav item that happens to open a dropdown -- unlike the
   logged-in Settings menu, it shouldn't call attention to itself with the
   accent color on hover/open. */
#aboutToggle:hover,
#aboutToggle[aria-expanded="true"] {
    color: var(--default-font-color);
}

.settings-dropdown__caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--default-font-color);
    transition: transform 0.15s ease;
}

.settings-dropdown__toggle[aria-expanded="true"] .settings-dropdown__caret {
    transform: rotate(180deg);
}

/* Floats over page content, so it KEEPS its fill -- without an opaque
   background the text underneath shows through. Same reason .session-modal
   below keeps its own. In-flow containers lost their fill; overlapping ones
   did not. */
.settings-dropdown__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 15px;
    background-color: var(--surface-color);
    border-color: var(--border-color);
    border-style: solid;
    border-width: 1px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 150px;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 200;
}

.settings-dropdown__item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    margin: 0;
    color: var(--default-font-color);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    text-transform: uppercase;
    text-align: left;
    text-decoration: none;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 15px;
    padding-right: 15px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.settings-dropdown__item:hover,
.settings-dropdown__item:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
    outline: none;
}

.session-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Overlays the page -- keeps its fill, see .settings-dropdown__panel. */
.session-modal {
    width: 90%;
    max-width: 360px;
    background: var(--surface-color);
    border-color: var(--border-color);
    border-style: solid;
    border-width: 1px;
    border-radius: var(--radius-lg);
    padding: 20px;
    font-family: var(--font-body);
    text-align: center;
}

.session-modal__text {
    color: var(--default-font-color);
    margin-bottom: 20px;
}

.session-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.session-modal__dismiss {
    background: none;
    border-color: var(--border-color);
    border-style: solid;
    border-width: 1px;
    border-radius: var(--radius-sm);
    color: var(--default-font-color);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    padding-top: 12px;
    padding-bottom: 12px;
    transition-property: background-color, color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

.session-modal__dismiss:hover {
    background: var(--default-font-color);
    color: var(--bg-color);
}

/* ---------- Side nav + content layout (Resources, Market) ---------- */

/* Left nav + content pane, side by side. The nav has no card/background
   of its own -- it's the header bar's menu_items look, just stacked
   vertically instead of laid out in a row. */
.side-nav-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.side-nav {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    background: none;
    /* Sticks alongside the content as the page scrolls, like the header
       does at the top of the viewport. */
    position: sticky;
    top: 88px;
}

/* Same typography/color as .menu_items above -- no hover color change,
   matching the plain header links. An empty row's worth of gap between
   each item spaces the list out. */
.side-nav__item {
    background: none;
    border: none;
    margin: 0;
    padding: 8px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 300;
    text-transform: uppercase;
    text-align: left;
    color: var(--default-font-color);
    cursor: pointer;
}

.side-nav__item:not(:last-child) {
    margin-bottom: 40px;
}

/* Hover and the active state both use the same blue as the Feature
   card's subtitle on the Bulletin page
   (.bulletin-section--feature .content-cell__subtitle, bulletin.css) --
   color only, never an underline. */
.side-nav__item:hover,
.side-nav__item[aria-selected="true"] {
    color: var(--accent-color);
}

.side-nav-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 800px) {
    .side-nav-layout {
        flex-direction: column;
    }
    .side-nav {
        flex-direction: row;
        width: 100%;
        position: static;
    }
    .side-nav__item {
        flex: 1;
        text-align: center;
    }
    .side-nav__item:not(:last-child) {
        margin-bottom: 0;
    }
}
