:root {
    --background: #030712;
    --surface: #111827;
    --surface-light: #1f2937;
    --border: #263244;

    --text: #f3f4f6;
    --muted: #9ca3af;

    --primary: #6366f1;
    --primary-hover: #818cf8;

    --success: #34d399;
    --danger: #f87171;

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}
html,
body {

    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    width: 100%;
    max-width: 1200px;
    margin: auto;

    padding: 22px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

.logo {
    font-weight: 900;
    letter-spacing: 2px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

.site-header nav {
    display: flex;
    gap: 24px;
}

.site-header nav a {
    color: var(--muted);
    font-size: 14px;
    transition: 0.2s;
}

.site-header nav a:hover {
    color: var(--text);
}

.icon-button {
    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 10px;

    width: 38px;
    height: 38px;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: auto;
}

.hero {
    padding: 80px 0 50px;
    text-align: center;
}

.eyebrow {
    color: var(--primary-hover);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 15px 0;

    font-size: clamp(42px, 8vw, 78px);
    line-height: 0.95;
    letter-spacing: -3px;
}

.hero h1 span {
    color: var(--primary-hover);
}

.hero p {
    max-width: 650px;
    margin: 24px auto 0;

    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.daily-card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: clamp(20px, 4vw, 40px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);
}

.daily-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.daily-header h2 {
    margin: 8px 0 0;
    font-size: 28px;
}

.streak {
    color: #fbbf24;
    font-weight: 800;
}

.difficulty-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 5px;

    background: var(--background);
    padding: 5px;

    border-radius: 12px;

    margin: 28px 0;
}

.difficulty {
    border: 0;
    border-radius: 9px;

    padding: 12px;

    background: transparent;
    color: var(--muted);

    font-weight: 800;
}

.difficulty:hover {
    background: var(--surface-light);
}

.difficulty.active {
    background: var(--primary);
    color: white;
}

.cipher-meta {
    text-align: center;

    color: var(--muted);

    font-family: monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;

    margin-bottom: 14px;
}

.cipher-box {
    min-height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: var(--background);

    border: 1px solid #303b55;
    border-radius: 14px;

    font-family: monospace;
    font-size: clamp(20px, 4vw, 30px);
    font-weight: 700;

    letter-spacing: 4px;

    text-align: center;
    word-break: break-word;
}

.rules-box {
    margin-top: 18px;

    padding: 16px;

    background: rgba(3, 7, 18, 0.5);

    border: 1px solid var(--border);
    border-radius: 12px;

    text-align: center;

    font-family: monospace;
}

.rules-box strong {
    color: var(--primary-hover);
    font-size: 11px;
    letter-spacing: 2px;
}

.rules-box p {
    margin: 7px 0 0;
    color: var(--muted);
}

.answer-area {
    margin-top: 20px;
}

#solution-input {
    width: 100%;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: white;
    color: #111827;

    text-align: center;

    font-family: monospace;
    font-size: 20px;
    font-weight: 700;

    outline: none;
}

#solution-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.primary-button {
    width: 100%;

    margin-top: 10px;

    padding: 15px;

    border: 0;
    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-weight: 800;
    letter-spacing: 1px;

    transition: 0.2s;
}

.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.feedback {
    min-height: 24px;

    margin-top: 12px;

    text-align: center;
    font-weight: 700;
}

.feedback.success {
    color: var(--success);
}

.feedback.error {
    color: var(--danger);
}

.hint-area {
    margin-top: 24px;

    padding-top: 18px;

    border-top: 1px solid var(--border);

    text-align: center;
}

.text-button {
    border: 0;
    background: none;
    color: var(--muted);

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-button:hover {
    color: var(--primary-hover);
}

.hint {
    margin: 12px 0 0;

    padding: 14px;

    border-radius: 10px;

    background: var(--background);

    color: var(--muted);

    font-style: italic;
}

.hidden {
    display: none !important;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 16px;

    margin: 30px 0 80px;
}

.feature-card {
    padding: 25px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition: 0.25s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 28px;
}

.feature-card h3 {
    margin-bottom: 5px;
}

.feature-card p {
    margin: 0;

    color: var(--muted);
    line-height: 1.6;
}

.site-footer {
    padding: 40px 20px;

    border-top: 1px solid var(--border);

    text-align: center;

    color: var(--muted);
}

.site-footer p {
    margin: 0 0 6px;

    color: var(--text);
    font-weight: 800;
    letter-spacing: 2px;
}

@media (max-width: 700px) {

    .site-header {
        flex-wrap: wrap;
    }

    .site-header nav {
        order: 3;
        width: 100%;

        justify-content: center;
    }

    .hero {
        padding-top: 45px;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }
}

/* =========================
   HEADER ACTIONS
========================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-button {
    padding: 9px 13px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    transition: 0.2s;
}

.header-button:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
}


/* =========================
   UPPERCASE ANSWERS
========================= */

#solution-input {
    text-transform: uppercase;
}


/* =========================
   STATISTICS MODAL
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(7px);
}

.stats-modal {
    width: min(500px, 100%);

    max-height: 90vh;
    overflow-y: auto;

    padding: 28px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 20px;
}

.stats-modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 25px;
}

.stats-modal-header h2 {
    margin: 7px 0 0;

    font-size: 30px;
}

.modal-close {
    border: 0;

    background: transparent;
    color: var(--muted);

    font-size: 30px;
    line-height: 1;

    transition: 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.stats-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 10px;

    margin-bottom: 24px;
}

.stat-box {
    padding: 18px 8px;

    background: var(--background);

    border: 1px solid var(--border);
    border-radius: 12px;

    text-align: center;
}

.stat-number {
    color: var(--text);

    font-size: 27px;
    font-weight: 900;
}

.stat-label {
    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-detail {
    margin-bottom: 20px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-detail div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 4px;

    color: var(--muted);
}

.stats-detail div + div {
    border-top: 1px solid var(--border);
}

.stats-detail strong {
    color: var(--text);
}

.share-preview {
    margin-bottom: 15px;

    padding: 18px;

    background: var(--background);

    border: 1px solid var(--border);
    border-radius: 12px;

    text-align: center;
}

.share-preview-title {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 2px;
}

.share-grid {
    font-size: 25px;
    letter-spacing: 5px;
}

.share-feedback {
    min-height: 20px;

    margin-top: 10px;

    color: var(--success);

    text-align: center;

    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 550px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-button {
        font-size: 0;
    }

    .header-button::first-letter {
        font-size: 15px;
    }
}

/* =========================
   DAILY DIFFICULTY SYSTEM
========================= */

.challenge-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-top: 14px;
    padding-top: 14px;

    border-top: 1px solid var(--border);

    color: var(--muted);
}

.challenge-info-row strong {
    color: var(--text);
    text-align: right;
}


/* =========================
   PROGRESSIVE HINTS
========================= */

.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 15px;
}

.hint-description {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.hint-counter {
    white-space: nowrap;

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;
}

.revealed-hint-card {
    margin-bottom: 10px;
    padding: 14px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.revealed-hint-number {
    margin-bottom: 5px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.revealed-hint-title {
    margin-bottom: 5px;

    font-weight: 800;
}

.revealed-hint-text {
    margin: 0;

    color: var(--muted);

    line-height: 1.5;
}

.hint-penalty-preview {
    min-height: 18px;

    margin-top: 8px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================
   DAILY SCORE
========================= */

.daily-score-result {
    display: flex;
    flex-direction: column;

    margin-top: 18px;
    padding: 16px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 12px;

    text-align: center;
}

.daily-score-result span {
    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 2px;
}

.daily-score-result strong {
    margin: 5px 0;

    font-size: 32px;
}

.daily-score-result small {
    color: var(--muted);
}

.daily-score-result.hidden {
    display: none;
}

/* =========================
   ADVANCED STATISTICS
========================= */

.difficulty-stats {
    margin-bottom: 20px;

    padding: 16px;

    background: var(--background);

    border: 1px solid var(--border);
    border-radius: 12px;
}


.difficulty-stats-title {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 2px;
}


.difficulty-stat-row {
    display: grid;

    grid-template-columns:
        90px
        1fr
        auto;

    align-items: center;

    gap: 15px;

    padding: 11px 0;

    border-top:
        1px solid var(--border);
}


.difficulty-name {
    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1px;
}


.difficulty-name.easy {
    color: var(--success);
}


.difficulty-name.medium {
    color: #fbbf24;
}


.difficulty-name.hard {
    color: var(--danger);
}


.difficulty-stat-row span:nth-child(2) {
    color: var(--muted);

    font-size: 13px;
}


.difficulty-stat-row strong {
    font-size: 13px;
}


/* =========================
   DETAILED SHARE PREVIEW
========================= */

.detailed-share-grid {
    display: flex;

    flex-direction: column;

    gap: 10px;

    font-size: inherit;
    letter-spacing: normal;
}


.share-result-row {
    display: grid;

    grid-template-columns:
        65px
        1fr
        auto;

    align-items: center;

    gap: 12px;

    text-align: left;
}


.share-result-name {
    color: var(--muted);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;
}


.share-result-blocks {
    font-size: 18px;

    letter-spacing: 1px;

    white-space: nowrap;
}


.share-result-score {
    font-size: 12px;

    white-space: nowrap;
}


@media (max-width: 500px) {

    .share-result-row {

        grid-template-columns:
            55px
            1fr;

    }


    .share-result-score {

        grid-column: 2;

        color: var(--muted);

    }


    .difficulty-stat-row {

        grid-template-columns:
            75px
            1fr
            auto;

        gap: 8px;

    }
}
/* =====================================================
   GLOBAL FORM CONTROLS
   Consistent dropdown styling across The Daily Cipher
===================================================== */

select {
    width: 100%;

    min-height: 42px;

    padding:
        10px
        38px
        10px
        13px;

    border:
        1px solid
        var(--border)
        !important;

    border-radius:
        14px
        !important;

    background-color:
        rgba(
            31,
            41,
            55,
            0.72
        )
        !important;

    color:
        var(--text)
        !important;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif
        !important;

    font-size:
        13px
        !important;

    font-weight:
        650
        !important;

    line-height:
        1.25;

    cursor:
        pointer;

    outline:
        none;

    appearance:
        none;

    -webkit-appearance:
        none;

    -moz-appearance:
        none;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    background-repeat:
        no-repeat;

    background-position:
        right 13px center;

    background-size:
        13px;

    box-shadow:
        inset 0 1px 0
        rgba(
            255,
            255,
            255,
            0.025
        );

    transition:
        border-color 0.18s,
        box-shadow 0.18s,
        background-color 0.18s,
        transform 0.18s;
}


select:hover {
    border-color:
        #46536b
        !important;

    background-color:
        rgba(
            31,
            41,
            55,
            0.95
        )
        !important;
}


select:focus {
    border-color:
        var(--primary)
        !important;

    box-shadow:
        0 0 0 3px
        rgba(
            99,
            102,
            241,
            0.12
        );

    background-color:
        var(--surface-light)
        !important;
}


select:disabled {

    opacity:
        0.5;

    cursor:
        not-allowed;
}


/*
The opened option menu is partially controlled
by the operating system/browser, but supported
browsers will use these colors.
*/

select option {

    background:
        var(--surface);

    color:
        var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-weight:
        600;
}


/*
Optgroup support for future grouped cipher menus.
*/

select optgroup {

    background:
        var(--background);

    color:
        var(--primary-hover);

    font-weight:
        800;
}
/* =====================================================
   RAIL FENCE LEARNING GRID
===================================================== */

.rail-visualization {

    width:
        100%;

    margin:
        20px
        0;

    padding:
        18px;

    overflow-x:
        auto;

    background:
        var(--background);

    border:
        1px solid
        var(--border);

    border-radius:
        12px;
}


.rail-row {

    display:
        grid;

    /*
    JS/HTML may override the number of columns.
    */

    grid-template-columns:
        repeat(
            var(--rail-columns),
            30px
        );

    gap:
        3px;

    width:
        max-content;

    min-height:
        34px;

    align-items:
        center;
}


.rail-cell {

    width:
        30px;

    height:
        30px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size:
        17px;

    font-weight:
        800;

    line-height:
        1;

    color:
        var(--text);

    border-radius:
        5px;
}


.rail-cell.filled {

    background:
        rgba(
            99,
            102,
            241,
            0.13
        );

    color:
        var(--primary-hover);
}


.rail-cell.current {

    background:
        var(--primary);

    color:
        white;

    box-shadow:
        0 0 0 2px
        rgba(
            129,
            140,
            248,
            0.25
        );
}


.rail-label {

    margin-bottom:
        7px;

    color:
        var(--muted);

    font-family:
        monospace;

    font-size:
        10px;

    font-weight:
        800;

    letter-spacing:
        1px;
}
/* =====================================================
   CUSTOM DROPDOWNS
===================================================== */

.custom-select {
    position: relative;
    width: 100%;
}


/*
Keep the original select functional for JS,
but remove it visually.
*/

.custom-select > select {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    opacity: 0 !important;

    pointer-events: none !important;
}


/*
Visible button
*/

.custom-select-button {
    width: 100%;

    min-height: 42px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding:
        10px
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    background:
        rgba(
            31,
            41,
            55,
            0.72
        );

    color:
        var(--text);

    font: inherit;

    font-size: 13px;

    font-weight: 650;

    text-align: left;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.18s,
        background 0.18s,
        box-shadow 0.18s;
}


.custom-select-button:hover {
    border-color: #46536b;

    background:
        rgba(
            31,
            41,
            55,
            0.95
        );
}


.custom-select.open
.custom-select-button {
    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(
            99,
            102,
            241,
            0.12
        );
}


/*
Arrow
*/

.custom-select-arrow {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-right:
        2px solid
        var(--muted);

    border-bottom:
        2px solid
        var(--muted);

    transform:
        rotate(45deg)
        translateY(-2px);

    transition:
        transform 0.18s;
}


.custom-select.open
.custom-select-arrow {
    transform:
        rotate(225deg)
        translateY(-1px);
}


/*
Actual popup
*/

.custom-select-menu {
    position: absolute;

    z-index: 500;

    top:
        calc(100% + 7px);

    left: 0;

    width: 100%;

    max-height: 260px;

    overflow-y: auto;

    padding: 6px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    box-shadow:
        0 18px 45px
        rgba(
            0,
            0,
            0,
            0.42
        );

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-5px)
        scale(0.985);

    transform-origin:
        top;

    transition:
        opacity 0.14s,
        transform 0.14s,
        visibility 0.14s;
}


.custom-select.open
.custom-select-menu {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/*
Options
*/

.custom-select-option {
    width: 100%;

    display: block;

    padding:
        10px
        11px;

    border: 0;

    border-radius: 9px;

    background:
        transparent;

    color:
        var(--muted);

    font: inherit;

    font-size: 13px;

    font-weight: 650;

    text-align: left;

    cursor: pointer;
}


.custom-select-option:hover,
.custom-select-option.focused {
    background:
        var(--surface-light);

    color:
        var(--text);
}


.custom-select-option.selected {
    background:
        rgba(
            99,
            102,
            241,
            0.15
        );

    color:
        var(--primary-hover);
}


/*
Scrollbar
*/

.custom-select-menu::-webkit-scrollbar {
    width: 7px;
}


.custom-select-menu::-webkit-scrollbar-track {
    background: transparent;
}


.custom-select-menu::-webkit-scrollbar-thumb {
    background:
        #374151;

    border-radius: 999px;
}
/* =====================================================
   NUMBER INPUTS
===================================================== */

input[type="number"] {
    appearance:
        textfield;

    -moz-appearance:
        textfield;
}


/*
Chrome / Edge / Safari
*/

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {

    -webkit-appearance:
        none;

    appearance:
        none;

    margin: 0;
}
/* =====================================================
   GLOBAL SCROLLBAR
===================================================== */

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color:
        #4f5d78
        var(--background);
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background:
        var(--background);
}

::-webkit-scrollbar-thumb {
    background:
        #3f4b63;

    border:
        3px solid
        var(--background);

    border-radius:
        999px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        var(--primary);
}

::-webkit-scrollbar-corner {
    background:
        var(--background);
}
/* =====================================================
   STEP 15C — ACCESSIBILITY + MOBILE POLISH
===================================================== */


/* -----------------------------------------------------
   KEYBOARD FOCUS
----------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {

    outline:
        3px solid
        var(--primary-hover);

    outline-offset:
        3px;

}


/*
Custom select buttons previously removed the browser outline.
Restore a strong accessible focus indicator.
*/

.custom-select-button:focus-visible {

    outline:
        3px solid
        var(--primary-hover);

    outline-offset:
        3px;

    border-color:
        var(--primary);

}


/* -----------------------------------------------------
   CURRENT NAVIGATION PAGE
----------------------------------------------------- */

.site-header nav a[aria-current="page"],
.site-header nav a.nav-current {

    color:
        var(--text);

    font-weight:
        800;

}


/* -----------------------------------------------------
   SKIP LINK
----------------------------------------------------- */

.skip-link {

    position:
        fixed;

    top:
        10px;

    left:
        10px;

    z-index:
        10000;

    padding:
        10px
        14px;

    border-radius:
        9px;

    background:
        var(--primary);

    color:
        white;

    font-size:
        13px;

    font-weight:
        800;

    transform:
        translateY(
            -180%
        );

    transition:
        transform
        0.15s
        ease;

}


.skip-link:focus {

    transform:
        translateY(
            0
        );

}


/* -----------------------------------------------------
   BETTER TAP TARGETS
----------------------------------------------------- */

.site-header nav a,
.icon-button,
.header-button,
.primary-button,
.text-button {

    min-height:
        44px;

}


.site-header nav a {

    display:
        inline-flex;

    align-items:
        center;

}


/* -----------------------------------------------------
   TEXT SAFETY
----------------------------------------------------- */

body {

    overflow-wrap:
        break-word;

}


img,
svg,
canvas {

    max-width:
        100%;

}


/* -----------------------------------------------------
   MOBILE NAVIGATION
----------------------------------------------------- */

@media (
    max-width:
        700px
) {

    .site-header {

        gap:
            12px;

        padding:
            16px;

    }


    .site-header nav {

        width:
            100%;

        justify-content:
            flex-start;

        gap:
            6px;

        overflow-x:
            auto;

        padding-bottom:
            4px;

        scrollbar-width:
            thin;

        -webkit-overflow-scrolling:
            touch;

    }


    .site-header nav a {

        flex:
            0
            0
            auto;

        min-height:
            44px;

        padding:
            8px
            10px;

        border-radius:
            8px;

        font-size:
            12px;

        white-space:
            nowrap;

    }


    /*
    Prevent iOS Safari from zooming the page when
    a form field receives focus.
    */

    input,
    select,
    textarea {

        font-size:
            16px;

    }


}


/* -----------------------------------------------------
   VERY SMALL SCREENS
----------------------------------------------------- */

@media (
    max-width:
        420px
) {

    .logo {

        font-size:
            13px;

        letter-spacing:
            1.5px;

    }


    .site-header {

        padding-left:
            12px;

        padding-right:
            12px;

    }


    .hero h1 {

        font-size:
            clamp(
                34px,
                12vw,
                48px
            );

    }

}


/* -----------------------------------------------------
   REDUCED MOTION
----------------------------------------------------- */

@media (
    prefers-reduced-motion:
        reduce
) {

    html {

        scroll-behavior:
            auto;

    }


    *,
    *::before,
    *::after {

        animation-duration:
            0.01ms
            !important;

        animation-iteration-count:
            1
            !important;

        transition-duration:
            0.01ms
            !important;

        scroll-behavior:
            auto
            !important;

    }

}
@media (max-width: 700px) {

    .site-header {

        width: 100%;
        max-width: 1200px;
        margin: 0 auto;

        padding:
            16px
            16px;

        gap:
            12px;

        flex-wrap:
            wrap;
    }


    .site-header nav {

        width: 100%;

        min-width: 0;

        display:
            flex;

        justify-content:
            flex-start;

        gap:
            6px;

        overflow-x:
            auto;

        padding-bottom:
            4px;

        scrollbar-width:
            thin;

        -webkit-overflow-scrolling:
            touch;
    }


    .site-header nav a {

        flex:
            0
            0
            auto;

        min-height:
            44px;

        padding:
            8px
            10px;

        border-radius:
            8px;

        font-size:
            12px;

        white-space:
            nowrap;
    }


    input,
    select,
    textarea {

        font-size:
            16px;
    }

}
/* =====================================================
   STEP 15E — STANDARDIZED SITE HEADER
===================================================== */


/*
Desktop header uses three independent columns:

Logo          Navigation          Actions

This keeps navigation truly centered even when the
right-side buttons differ in width.
*/

@media (min-width: 701px) {

    .site-header {

        display:
            grid;

        grid-template-columns:
            minmax(0, 1fr)
            auto
            minmax(0, 1fr);

        align-items:
            center;

        width:
            100%;

        max-width:
            1200px;

        margin:
            0
            auto;

        padding:
            22px
            24px;

        gap:
            24px;
    }


    .site-header .logo {

        justify-self:
            start;
    }


    .site-header nav {

        justify-self:
            center;

        display:
            flex;

        align-items:
            center;

        justify-content:
            center;

        gap:
            24px;

        width:
            max-content;
    }


    .site-header .header-actions {

        justify-self:
            end;

        display:
            flex;

        align-items:
            center;

        justify-content:
            flex-end;

        gap:
            8px;

        min-width:
            44px;
    }

}