* {
    box-sizing: border-box;
}

:root {
    --bg: #0b0f14;
    --surface: #121821;
    --surface-hover: #18202b;
    --border: #26303d;

    --text: #f8fafc;
    --muted: #94a3b8;

    --accent: #f59e0b;
    --accent-light: #fbbf24;

    --success: #22c55e;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: auto;
    padding: 50px 20px;
}

/* Header */

header {
    margin-bottom: 32px;
}

header h1 {
    margin: 0 0 10px;
    font-size: 36px;
    letter-spacing: -0.5px;
}

header p {
    color: var(--muted);
    margin: 0;
    max-width: 650px;
}

/* Readiness card */

.score-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 26px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.score-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
}
.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 18px;
}

.score-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

#completed-count {
    font-size: 15px;
    font-weight: 600;
}

#readiness-message {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .score-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .score-details {
        align-items: flex-start;
        text-align: left;
    }
}

.report-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.form-field input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 15px;
}

.form-field input:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}

#print-button {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

#print-button:hover {
    background: var(--accent-light);
}

.secondary-button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button:hover {
    background: var(--surface-hover);
}

@media (max-width: 600px) {
    .report-details {
        grid-template-columns: 1fr;
    }
}

/* Progress bar */

.progress-bar {
    background: #202833;
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
}

#progress {
    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-light)
    );

    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

/* Categories */

.category {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 12px;
}

.category h2 {
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 19px;
}

/* Checklist rows */

.checklist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 10px;
    margin: 0 -10px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.checklist-item:hover {
    background: var(--surface-hover);
}

.checklist-item:active {
    transform: scale(0.995);
}

/* Checkbox */

.checklist-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Item text */

.checklist-item div {
    display: flex;
    flex-direction: column;
}

.checklist-item strong {
    font-size: 15px;
    color: var(--text);
}

.checklist-item span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

/* Completed items */

.checklist-item:has(input:checked) strong {
    color: #cbd5e1;
    text-decoration: line-through;
}

.checklist-item:has(input:checked) span {
    color: #64748b;
}

/* Footer */

footer {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

/* Mobile */

@media (max-width: 600px) {

    .container {
        padding: 30px 16px;
    }

    header h1 {
        font-size: 29px;
    }

    #score {
        font-size: 40px;
    }

    .category,
    .score-card {
        padding: 18px;
    }
}

.print-only {
    display: none;
}

.print-report-meta {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.print-report-meta h2 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.print-report-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.print-footer p {
    margin: 0;
}

@media print {

    /* Chrome: use Margins "None" for edge-to-edge dark background */
    @page {
        size: letter;
        margin: 0;
    }

    html,
    body,
    .container,
    .score-card,
    .category,
    .progress-bar,
    #progress,
    .report-details input,
    .checklist-item input {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body {
        background: var(--bg);
        margin: 0;
        padding: 0;
        min-height: 100%;
    }

    body {
        color: var(--text);
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background: var(--bg);
        z-index: -1;
    }

    .screen-only {
        display: none !important;
    }

    .print-only {
        display: block;
    }

    .container {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0.6in 0.75in;
        background: var(--bg);
        box-sizing: border-box;
    }

    header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    header h1 {
        color: var(--text);
        font-size: 28px;
    }

    header p {
        color: var(--muted);
    }

    .report-details {
        margin-bottom: 16px;
    }

    .report-details input {
        background: var(--surface);
        color: var(--text);
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .report-details input::placeholder {
        color: transparent;
    }

    .form-field label {
        color: var(--muted);
    }

    .score-card,
    .category {
        background: var(--surface);
        color: var(--text);
        border: 1px solid var(--border);
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .score-card {
        margin-bottom: 20px;
        padding: 20px;
    }

    .category {
        margin-bottom: 14px;
        padding: 18px;
    }

    .score-card h2 {
        color: var(--muted);
    }

    #score {
        color: var(--text);
    }

    #completed-count {
        color: var(--text);
    }

    #readiness-message {
        color: var(--muted);
    }

    .progress-bar {
        background: #202833;
    }

    #progress {
        background: linear-gradient(
            90deg,
            var(--accent),
            var(--accent-light)
        );
    }

    .category h2 {
        border-bottom-color: var(--border);
    }

    .checklist-item {
        padding: 10px;
        cursor: default;
        transform: none;
    }

    .checklist-item:hover {
        background: transparent;
    }

    .checklist-item strong {
        color: var(--text);
    }

    .checklist-item span {
        color: var(--muted);
    }

    .checklist-item:has(input:checked) strong {
        color: #cbd5e1;
    }

    .checklist-item:has(input:checked) span {
        color: #64748b;
    }

    .checklist-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--accent);
        cursor: default;
    }

    .actions {
        display: none !important;
    }

    footer {
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
        color: var(--muted);
        font-size: 11px;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}