/* Minimal, mobile-first research site */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.6;
    color: #222;
    background: #fff;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5em 1em;
}

h1 {
    font-size: 1.6em;
    margin-bottom: 0.1em;
}

.site-logo {
    max-width: 200px;
    height: auto;
}

h2 {
    font-size: 1.3em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h3 {
    font-size: 1.1em;
    margin-top: 1em;
    margin-bottom: 0.4em;
}

h4 {
    font-size: 1em;
    margin-top: 1em;
    margin-bottom: 0.3em;
}

.subtitle {
    color: #555;
    font-style: italic;
    margin-bottom: 1em;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 1em 0;
}

p {
    margin-bottom: 0.8em;
}

ul, ol {
    margin-left: 1.5em;
    margin-bottom: 0.8em;
}

li {
    margin-bottom: 0.3em;
}

/* Form */

label {
    display: block;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.3em;
}

.req {
    color: #b00;
}

select, input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.6em;
    font-size: 1em;
    font-family: inherit;
    border: 1px solid #999;
    border-radius: 3px;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

select {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23555'/%3E%3C/svg%3E") no-repeat right 0.7em center;
    padding-right: 2em;
}

input[type="text"]:focus,
select:focus {
    outline: 2px solid #36c;
    border-color: #36c;
}

button, .download-btn {
    display: block;
    width: 100%;
    padding: 0.8em;
    font-size: 1.1em;
    font-family: inherit;
    font-weight: bold;
    color: #8B3A62;
    background: #FFE3F3;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 1.5em;
    text-align: center;
    text-decoration: none;
}

button:hover, .download-btn:hover {
    background: #f5c8df;
}

button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Consent box */

#consent-box {
    max-height: 400px;
    overflow-y: scroll;
    border: 1px solid #999;
    padding: 1em;
    margin-bottom: 1em;
    background: #fafafa;
    font-size: 0.95em;
}

#consent-warning {
    color: #b00;
    font-weight: bold;
    margin-bottom: 0.5em;
    padding: 0.5em;
    border: 1px solid #b00;
    background: #fff0f0;
    text-align: center;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    font-weight: normal;
    margin-top: 0.5em;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.3em;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

/* Participant ID display */

.study-id-box {
    border: 2px solid #E8B07A;
    padding: 1em;
    margin: 1em 0;
    text-align: center;
    background: linear-gradient(135deg, #FFF0E0, #FED5AF);
}

.study-id {
    font-size: 2em;
    font-weight: bold;
    font-family: "Courier New", Courier, monospace;
    color: #8B5E3C;
    letter-spacing: 0.1em;
    margin: 0.3em 0;
}

/* Instruction GIF */

.instruction-gif {
    display: block;
    max-width: 60%;
    height: auto;
    margin: 0.8em auto;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Status */

#status-message {
    padding: 0.8em;
    margin-top: 1em;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
}

#status-message.error {
    background: #fff0f0;
    color: #b00;
    border: 1px solid #b00;
}

#status-message.success {
    background: #f0fff0;
    color: #080;
    border: 1px solid #080;
}

/* Desktop warning */

#desktop-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 0.8em 1em;
    margin-bottom: 1em;
    border-radius: 3px;
    text-align: center;
    font-size: 0.95em;
}

/* Navigation */

.site-nav {
    text-align: right;
    margin-bottom: 0.5em;
}

.nav-btn {
    display: inline-block;
    padding: 0.4em 1em;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: bold;
    color: #8B3A62;
    background: #FFE3F3;
    border-radius: 12px;
    text-decoration: none;
}

.nav-btn:hover {
    background: #f5c8df;
}

/* Instructions page */

.video-section {
    text-align: center;
    margin: 1em 0;
}

.video-placeholder {
    border: 2px dashed #ccc;
    padding: 2em;
    margin-top: 0.8em;
    color: #999;
    border-radius: 8px;
}

.step-image {
    margin: 1.5em 0;
    text-align: center;
}

.step-subtext {
    font-size: 0.9em;
    color: #555;
    margin-top: 0.5em;
    text-align: center;
}

.step-image-row {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin: 1.5em 0 0.5em;
}

.step-image-row .instruction-gif {
    max-width: 30%;
}

/* FAQ dropdown */

.faq-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.8em;
    overflow: hidden;
}

.faq-item summary {
    padding: 0.8em 1em;
    font-weight: bold;
    cursor: pointer;
    background: #fafafa;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "▸ ";
    color: #8B3A62;
}

.faq-item[open] summary::before {
    content: "▾ ";
}

.faq-content {
    padding: 0.8em 1em;
}

/* Sticky continue button */

.sticky-continue {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 0.5em 0;
    border-bottom: 1px solid #eee;
}

.sticky-continue button {
    margin-top: 0;
}

/* Utility */

.hidden {
    display: none !important;
}

.small {
    font-size: 0.85em;
    color: #666;
}

.back-link {
    margin-top: 1em;
    font-size: 0.9em;
}

.back-link a {
    color: #36c;
}

footer {
    margin-top: 2em;
    color: #777;
    font-size: 0.85em;
}

/* Mobile tweaks */

@media (max-width: 480px) {
    .container {
        padding: 1em 0.8em;
    }

    h1 {
        font-size: 1.4em;
    }

    #consent-box {
        max-height: 300px;
    }

    .study-id {
        font-size: 1.6em;
    }
}
