/* Momentum Delta exam stylesheet
 * Navy theme, readable formatting, original layout and responsive rules retained.
 */

/* Theme colours — navy accent is #000045. The legacy name --teal is kept for compatibility. */
:root {
    --ink: #142b35;
    --muted: #5e7178;
    --teal: #000045;
    --lime: #e6e6ef;
    --paper: #f3f3f3;
    --line: #dbdbe8;
    --red: #a32938;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial,Helvetica,sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

button, input, textarea {
    font: inherit;
}

button, a, input, textarea {
    outline-offset: 4px;
}

/* Buttons */
button {
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 19px;
    background: white;
    color: var(--ink);
    font-weight: 700;
}

button:hover {
    border-color: var(--teal);
}

button:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.primary {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.primary:hover {
    background: #000030;
}

.subtle {
    background: transparent;
}

.small {
    padding: 8px 12px;
    font-size: .86rem;
}

.danger {
    color: var(--red);
}

/* Page header and branding */
header {
    height: 90px;
    max-width:  1180px;
    padding: 0 30px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.mark {
    width: 36px;
    height: 36px;
    background: var(--teal);
    border-radius: 8px;
    color: var(--lime);
    display: grid;
    place-items: center;
    font-size: 25px;
}

.brand small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: .18em;
    font-weight: 600;
}

.top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    border-radius: 20px;
    background: #e6e6ef;
    padding: 5px 11px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: bold;
}

/* Page layout and headings */
main {
    max-width:  1120px;
    margin: 20px auto 60px;
    padding: 0 20px;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.25rem,5vw,3.5rem);
    line-height: 1.08;
    letter-spacing: -.045em;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(1.5rem,3vw,2.1rem);
    line-height: 1.25;
    letter-spacing: -.025em;
}

h3 {
    font-size: 1.05rem;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 18px;
}

.muted {
    color: var(--muted);
}

.lead {
    font-size: 18px;
    max-width:  580px;
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
}

/* Introductory layout */
.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.hero-main {
    padding: 48px 40px;
}

.hero-art {
    background: var(--ink);
    border-radius: 18px;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-art:after {
    content: '';
    position: absolute;
    border: 1px solid #38515a;
    border-radius: 50%;
    width: 280px;
    height: 280px;
    right: -120px;
    top: -70px;
    pointer-events: none;
}

.hero-art h2 {
    font-size: 35px;
    max-width:  230px;
    position: relative;
    z-index: 1;
}

.hero-art .eyebrow {
    color: var(--lime);
}

.art-symbol {
    font-size: 90px;
    line-height: 1;
    color: var(--lime);
    margin: 24px 0;
    letter-spacing: -.1em;
}

.specs {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
    margin: 32px 0;
}

.specs strong {
    display: block;
    font-size: 26px;
    line-height: 1.1;
}

.specs span {
    font-size: 12px;
    color: var(--muted);
}

.steps {
    border-top: 1px solid #3b5059;
    padding-top: 20px;
    font-size: 14px;
    color: #d2dedf;
}

.steps p {
    margin-bottom: 10px;
}

/* Notes and messages */
.footnote {
    font-size: 12px;
    color: var(--muted);
    margin-top: 18px;
}

.notice {
    padding: 14px 17px;
    border-radius: 9px;
    background: #ededf5;
    border: 1px solid #d6d6e8;
    font-size: 14px;
}

.error {
    color: var(--red);
    background: #fff1f1;
    border: 1px solid #efc4c4;
    padding: 14px;
    border-radius: 9px;
    margin: 14px 0;
}

.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: white;
    padding: 14px 23px;
    border-radius: 10px;
    z-index: 20;
    max-width:  90vw;
    font-size: 14px;
}

/* Exam layout and progress counter */
.exam-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
}

.exam-side {
    align-self: start;
}

.stat-number {
    color: var(--teal);
    font-size: 35px;
    font-weight: 800;
    line-height: 1;
}

.progress {
    height: 5px;
    border-radius: 8px;
    background: #e6e6ef;
    overflow: hidden;
    margin: 20px 0;
}

.progress>div {
    height: 100%;
    background: var(--teal);
    transition: width .2s;
}

/* Question navigation — answered questions use navy with white text */
.q-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 6px;
}

.q-grid button {
    padding: 8px 0;
    border-radius: 6px;
    font-size: 12px;
}

.q-grid .answered {
    background: var(--teal);
    border-color: var(--teal);
    color: #ffffff;
}

.q-grid .current {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
}

/* Question cards and answer choices */
.question-card {
    min-height: 570px;
    display: flex;
    flex-direction: column;
}

.question-text {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 28px;
    letter-spacing: -.02em;
}

.options {
    display: grid;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

.option:hover {
    border-color: var(--teal);
    background: #f5f5fa;
}

.option.selected {
    background: #ededf5;
    border: 2px solid var(--teal);
    padding: 16px;
}

.option input {
    accent-color: var(--teal);
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.letter {
    font-weight: 700;
    color: var(--muted);
}

/* Question navigation controls */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 30px;
}

.q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

/* Results and certificate screens */
.center {
    max-width:  790px;
    margin: 30px auto;
}

.result-head {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 30px;
}

.score-ring {
    color: var(--teal);
    border: 9px solid #e6e6ef;
    border-top-color: var(--teal);
    border-right-color: var(--teal);
    border-radius: 50%;
    width: 125px;
    height: 125px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800;
}

.result-copy {
    font-size: 16px;
    line-height: 1.8;
}

.success-icon {
    font-size: 34px;
    background: #ededf5;
    color: var(--teal);
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin-bottom: 25px;
}

/* Forms */
label.field {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

input[type=text], input[type=email], textarea {
    display: block;
    width: 100%;
    border: 1px solid #c4c4d8;
    border-radius: 8px;
    background: white;
    color: var(--ink);
    padding: 12px;
    margin-top: 8px;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

/* Existing editor styles */
.editor-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px;
}

.editor-list {
    max-height: 580px;
    overflow: auto;
    display: grid;
    gap: 6px;
    margin-top: 18px;
}

.editor-list button {
    text-align: left;
    font-size: 12px;
    padding: 10px;
    font-weight: 400;
}

.editor-list button.active {
    border-color: var(--teal);
    background: #ededf5;
}

.edit-options {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.edit-option {
    display: flex;
    gap: 12px;
    align-items: center;
}

.edit-option input[type=radio] {
    width: 22px;
    height: 22px;
    accent-color: var(--teal);
    flex-shrink: 0;
}

.edit-option label {
    flex: 1;
    font-size: 12px;
    font-weight: bold;
}

.edit-option textarea {
    min-height: 65px;
    margin-top: 5px;
    font-size: 14px;
}

/* Shared controls and footer */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 27px 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    padding: 0 20px 30px;
}

a {
    color: var(--teal);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* Responsive layouts */
@media (max-width: 800px) {
    .hero, .exam-layout, .editor-layout {
        grid-template-columns: 1fr;
    }

    .hero-art {
        min-height: 270px;
    }

    .art-symbol {
        display: none;
    }

    .hero-main {
        padding: 30px;
    }

    .exam-side .q-grid {
        grid-template-columns: repeat(10,1fr);
    }

    .exam-side {
        padding: 20px;
    }

    .question-card {
        min-height: 510px;
    }

    .editor-list {
        max-height: 180px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 0 20px;
        height: 80px;
    }

    .brand {
        font-size: 13px;
    }

    .badge {
        display: none;
    }

    main {
        margin-top: 10px;
    }

    .card {
        padding: 25px;
    }

    .result-head {
        align-items: flex-start;
    }

    .score-ring {
        width: 90px;
        height: 90px;
        font-size: 22px;
        border-width: 7px;
    }

}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none!important;
    }

}

/* Visibility and download controls */
[hidden] {
    display: none!important;
}

.download {
    display: inline-block;
    text-decoration: none;
    padding: 12px 19px;
    border-radius: 9px;
}

.review-shortcut {
    margin-top: 15px;
    width: 100%;
}

@media (max-width: 500px) {
    .result-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .card {
        padding: 22px;
    }

    .toolbar>* {
        width: 100%;
    }

}

@media (max-width: 800px) {
    .question-card {
        order: 0;
    }

    .exam-side {
        order: 1;
    }

}

@media (max-width: 500px) {
    .question-text {
        font-size: 22px;
    }

    .nav-row>span {
        display: none;
    }

    .nav-row button {
        flex: 1;
        padding: 12px 10px;
    }

}
