:root {
    --indigo-950: #0f1430;
    --indigo-900: #161d40;
    --indigo-800: #1d2548;
    --indigo-600: #3a4678;
    --brass: #c9a24e;
    --brass-deep: #8a6a24;
    --paper: #f3efe6;
    --paper-edge: #e3dccb;
    --ink: #1d2548;
    --ink-soft: #566083;

    --display: "Cormorant Garamond", Georgia, serif;
    --ui: "Hanken Grotesk", system-ui, sans-serif;

    /* picked up by Exolve for clue text */
    --font-family: "Source Serif 4", Georgia, serif;
    --font-size: 16px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--indigo-950);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--ui);
    color: var(--paper);
    background:
        radial-gradient(1200px 500px at 50% -10%, #263066 0%, transparent 70%),
        var(--indigo-950);
}

.page {
    width: min(1280px, 94%);
    margin: 0 auto;
    padding: 56px 0 72px;
}

/* ---------- Masthead ---------- */

.masthead {
    text-align: center;
    padding-bottom: 36px;
    margin-bottom: 36px;
    position: relative;
}

.masthead::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 120px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.masthead-script {
    margin: 0 0 4px;
    font-family: "Mukta", sans-serif;
    font-size: 22px;
    color: var(--brass);
    letter-spacing: 0.04em;
}

.masthead h1 {
    margin: 0;
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(48px, 8vw, 88px);
    line-height: 1;
    letter-spacing: 0.01em;
    color: #fbf7ec;
}

.masthead-sub {
    margin: 14px 0 0;
    font-family: var(--display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(18px, 2.4vw, 24px);
    color: #b9bfd9;
}

/* ---------- Board ---------- */

.board {
    background: var(--paper);
    color: var(--ink);
    border-radius: 6px;
    padding: clamp(14px, 2.5vw, 36px);
    border: 1px solid var(--paper-edge);
    box-shadow:
        0 0 0 6px var(--indigo-900),
        0 0 0 7px rgba(201, 162, 78, 0.55),
        0 40px 80px -20px rgba(0, 0, 0, 0.55);
    overflow-x: auto;
}

/* Exolve's own title/setter are redundant with the masthead */
.board .xlv-title-setter {
    display: none;
}

.board .xlv-frame {
    color: var(--ink);
}

/* Current clue strip */
.board .xlv-curr-clue-inner {
    font-family: var(--font-family);
    border-bottom: 1px solid var(--brass);
}

/* Clue lists */
.board .xlv-clues-label {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    padding-bottom: 8px;
}

.board .xlv-frame hr {
    border: 0;
    height: 1px;
    background: var(--brass);
    margin: 0 0 10px;
}

.board .xlv-clues-table td {
    line-height: 1.45;
}

.board .xlv-clue-label {
    color: var(--brass-deep);
    font-family: var(--ui);
    font-size: 0.85em;
}

.board .xlv-clues-box {
    scrollbar-width: thin;
    scrollbar-color: var(--brass) transparent;
}

/* Buttons */
.board .xlv-frame .xlv-button {
    font-family: var(--ui);
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 3px;
    padding: 8px 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.board .xlv-frame .xlv-nav-button {
    border-radius: 3px;
}

.board .xlv-small-print a,
.board .xlv-status {
    font-family: var(--ui);
}

.board .xlv-small-print a {
    color: var(--ink-soft) !important;
}

/* Keyboard focus */
.board button:focus-visible,
.board a:focus-visible {
    outline: 2px solid var(--brass-deep);
    outline-offset: 2px;
}

/* ---------- Colophon ---------- */

.colophon {
    text-align: center;
    margin-top: 40px;
}

.colophon p {
    margin: 0;
    font-size: 14px;
    color: #8f97b8;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    .page {
        width: 96%;
        padding: 32px 0 48px;
    }

    .masthead {
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .board {
        box-shadow:
            0 0 0 3px var(--indigo-900),
            0 0 0 4px rgba(201, 162, 78, 0.55);
    }
}