/* Jasmina Project - Breakpoint Explicit Styles */

/* --- Mobile Phone Breakpoint (max 767px) --- */
@media (max-width: 767px) {

    #breakpoint-indicator::before {
        content: 'Mobile max 767px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }

    /* Phone Sizing */
    body {
        font-family: sans-serif;
        font-size: 16px;
    }

    body.debug-visible {
        padding-top: 2em;
        padding-bottom: 8em;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 80%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.3em;
        height: 1.3em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 1em;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 1.25rem;
        margin-bottom: 1em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 1em;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 1em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1em;
        margin-left: 0.5em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 1em;
    }

    #erq_all h2 {
        font-size: 1.25rem;
        margin-bottom: 1em;
    }

    #erq_all .erq-question {
        font-size: 1em;
        padding: 1em;
        margin-bottom: 1em;
    }

    #erq_all .erq-options {
        display: block;
    }

    #erq_all .erq-option-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 1em;
    }

    #erq_all .erq-option-item label {
        font-size: 0.9em;
        margin-left: 0.5em;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 1em;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 1.25rem;
        margin-bottom: 1em;
    }

    /* Task Screens */
    
    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 1em;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 100%;
        height: auto;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 2em;
        font-family: sans-serif;
    }

    #response_btns {
    position: absolute;
    top: 65%;       /* Starts the button row at 65% down the image */
    width: 100%;    /* Spans the full width of the image */
    left: 0;
    margin: 0;      /* Remove bootstrap row margins */
    z-index: 10;    /* Ensure it sits on top of image and text */
    /* optional: background-color: rgba(255,255,255,0.2) for debugging */
    }

    .response-btn {
       background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 5px 10px;
        border-radius: 6px;
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 1em;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 1em;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 1em;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 1em;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 80px;
        height: 80px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        text-align: center;
    }

    #block_attention_check .valence_img {
        max-width: 100%;
        height: auto;
    }

    #block_attention_check .ui-key-img {
        width: 80px;
        height: 80px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 1em;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 1em;
    }

    #debrief h2 {
        font-size: 1.25rem;
        margin-bottom: 1em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.6em 1.2em;
        font-size: 1em;
    }

    /* Phone Layout */
    .debugdisplay {
        position: fixed;
        bottom: 0;
        top: auto;
    }

    .progress-container {
        position: fixed;
        top: 0;
        width: 100%;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }

}

/* --- Tablet Breakpoint (768px+) --- */
@media (min-width: 768px) {

    #breakpoint-indicator::before {
        content: 'Tablet min 768px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }
    
    /* Tablet Sizing */
    body {
        font-family: sans-serif;
        font-size: 18px;
    }

    body.debug-visible {
        padding-top: 6em;
        padding-bottom: 0;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 80%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.3em;
        height: 1.3em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 2em;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 2em;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 1.5em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 1.5em;
        height: 1.5em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1.2em;
        margin-left: 0.5em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 2em;
    }

    #erq_all h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5em;
    }

    #erq_all .erq-question {
        font-size: 1em;
        padding: 1.5em;
        margin-bottom: 1.5em;
    }

    #erq_all .erq-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #erq_all .erq-option-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        min-width: 80px;
    }

    #erq_all .erq-option-item input[type="radio"] {
        width: 0.9em;
        height: 0.9em;
    }

    #erq_all .erq-option-item label {
        font-size: 0.85em;
        margin-left: 0;
        margin-top: 0.5em;
        text-align: center;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 2em;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5em;
    }

    /* Task Screens */
    
    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 2em;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 600px;
        height: auto;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 12px 25px;
        border-radius: 6px;
        font-size: 2.5em;
        font-family: sans-serif;
    }

    #response_btns {
        position: absolute;
        top: 65%;
        width: 100%;
        left: 0;
        margin: 0;
        z-index: 10;
    }

    .response-btn {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 8px 15px;
        border-radius: 8px;
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 2em;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 2em;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 2em;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 2em;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 100px;
        height: 100px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        text-align: center;
    }

    #block_attention_check .valence_img {
        max-width: 600px;
        height: auto;
    }

    #block_attention_check .ui-key-img {
        width: 100px;
        height: 100px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 2em;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 2em;
    }

    #debrief h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.75em 1.5em;
        font-size: 1.2em;
    }

    /* Tablet Layout */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .progress-container {
        position: static;
        width: 85%;
        margin: 1em auto;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }

}

/* --- Budget Laptops Breakpoint (992px+) --- */
@media (min-width: 992px) {

    #breakpoint-indicator::before {
        content: 'Desktop min 992px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }
    
    /* Desktop Sizing */
    body {
        font-family: sans-serif;
        font-size: 16px;
    }

    body.debug-visible {
        padding-top: 5em;
        padding-bottom: 0;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 600px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.3em;
        height: 1.3em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 1em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1em;
        margin-left: 0.5em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #erq_all h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5em;
    }

    #erq_all .erq-question {
        font-size: 1.1em;
        padding: 1.5em;
        margin-bottom: 1.5em;
    }

    #erq_all .erq-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #erq_all .erq-option-item {
        flex-direction: column;
        justify-content: center;
        margin-bottom: 0;
        min-width: 80px;
    }

    #erq_all .erq-option-item label {
        font-size: 1em;
        margin-left: 0;
        margin-top: 0.5em;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5em;
    }

    /* Task Screens */
    
    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 600px;
        max-height: 450px;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 15px 30px;
        border-radius: 8px;
        font-size: 3em;
        font-family: sans-serif;
    }

    #response_btns {
    position: absolute;
    top: 65%;       /* Starts the button row at 65% down the image */
    width: 100%;    /* Spans the full width of the image */
    left: 0;
    margin: 0;      /* Remove bootstrap row margins */
    z-index: 10;    /* Ensure it sits on top of image and text */
    /* optional: background-color: rgba(255,255,255,0.2) for debugging */
    }

    .response-btn {
       background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 8px 15px;
        border-radius: 8px; 
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 100px;
        height: 100px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_attention_check .valence_img {
        max-width: 600px;
        max-height: 450px;
    }

    #block_attention_check .ui-key-img {
        width: 100px;
        height: 100px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 2.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 2.5em;
        background-color: #fafafa;
    }

    #debrief h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.5em 1em;
        font-size: 1em;
    }

    /* Desktop Layout */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .progress-container {
        position: static;
        width: 70%;
        margin: 1em auto;
    }

    .secframe{
        min-height: 80vh;
        display: flex;
        align-items: center;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}

/* --- Laptop Letterbox Fix for 992px Range (Short Screens) --- */
@media (min-width: 992px) and (max-height: 600px) {
    
    #breakpoint-indicator::before {
        content: 'Desktop 992px (Short)';
    }

    /* Aggressively shrink padding on short screens */
    #block_attention_check .valence-frame {
        padding: 0.25em;
    }
    
    #block_attention_check h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5em;
    }

    /* Shrink the image significantly */
    #block_attention_check .valence_img {
        max-width: 400px;
        max-height: 300px; 
    }

    /* Shrink buttons */
    #block_attention_check .ui-key-img {
        width: 80px;
        height: 80px;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}

/* --- Mid range monitors Breakpoint (1440px+) --- */
@media (min-width: 1440px) {

    #breakpoint-indicator::before {
        content: 'Desktop min 1440px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }

    /* Large Desktop Sizing */
    body {
        font-family: sans-serif;
        font-size: 17px;
    }

    body.debug-visible {
        padding-top: 5em;
        padding-bottom: 0;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 700px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.3em;
        height: 1.3em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 2rem;
        margin-bottom: 2em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 1.5em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 1.8em;
        height: 1.8em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1.3em;
        margin-left: 0.6em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #erq_all h2 {
        font-size: 2rem;
        margin-bottom: 2em;
    }

    #erq_all .erq-question {
        font-size: 1.1em;
        padding: 2em;
        margin-bottom: 2em;
    }

    #erq_all .erq-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #erq_all .erq-option-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        min-width: 90px;
    }

    #erq_all .erq-option-item input[type="radio"] {
        width: 0.9em;
        height: 0.9em;
    }

    #erq_all .erq-option-item label {
        font-size: 0.95em;
        margin-left: 0;
        margin-top: 0.6em;
        text-align: center;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 2rem;
        margin-bottom: 2em;
    }

    /* Task Screens */

    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 700px;
        max-height: 525px;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 20px 35px;
        border-radius: 10px;
        font-size: 4em;
        font-family: sans-serif;
    }

    #response_btns {
    position: absolute;
    top: 65%;       /* Starts the button row at 65% down the image */
    width: 100%;    /* Spans the full width of the image */
    left: 0;
    margin: 0;      /* Remove bootstrap row margins */
    z-index: 10;    /* Ensure it sits on top of image and text */
    /* optional: background-color: rgba(255,255,255,0.2) for debugging */
    }

    .response-btn {
       background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 10px 18px;
        border-radius: 10px; 
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 3em;
        background-color: #fafafa;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 3em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 3em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 3em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 120px;
        height: 120px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_attention_check .valence_img {
        max-width: 700px;
        max-height: 525px;
    }

    #block_attention_check .ui-key-img {
        width: 120px;
        height: 120px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 3em;
        background-color: #fafafa;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 3em;
        background-color: #fafafa;
    }

    #debrief h2 {
        font-size: 2rem;
        margin-bottom: 2em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.8em 1.6em;
        font-size: 1.3em;
    }

    /* Large Desktop Layout */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .progress-container {
        position: static;
        width: 65%;
        margin: 1em auto;
    }

    .secframe{
        min-height: 85vh;
        display: flex;
        align-items: center;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}

/* --- Laptop Letterbox Fix (Wide but Short) --- */
/* Target 1440px+ width but limited height (e.g. 1440x900 laptops) */
@media (min-width: 1440px) and (max-height: 900px) {
    
    #breakpoint-indicator::before {
        content: 'Desktop 1440px (Short)';
    }

    #block_attention_check .valence_img {
        max-width: 560px; /* 80% of 700px */
        max-height: 420px; /* 80% of 525px */
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}

/* --- Full HD Desktop Breakpoint (1920px+) --- */
@media (min-width: 1920px) {

    #breakpoint-indicator::before {
        content: 'Desktop min 1920px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }

    /* XL Desktop Sizing */
    body {
        font-family: sans-serif;
        font-size: 17px;
    }

    body.debug-visible {
        padding-top: 4em;
        padding-bottom: 0;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 800px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.1em;
        height: 1.1em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 2.25rem;
        margin-bottom: 2.2em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 1.7em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 2em;
        height: 2em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1.4em;
        margin-left: 0.7em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #erq_all h2 {
        font-size: 2.25rem;
        margin-bottom: 2.2em;
    }

    #erq_all .erq-question {
        font-size: 1.2em;
        padding: 2.2em;
        margin-bottom: 2.2em;
    }

    #erq_all .erq-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #erq_all .erq-option-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        min-width: 100px;
    }

    #erq_all .erq-option-item input[type="radio"] {
        width: 0.9em;
        height: 0.9em;
    }

    #erq_all .erq-option-item label {
        font-size: 1em;
        margin-left: 0;
        margin-top: 0.7em;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 2.25rem;
        margin-bottom: 2.2em;
    }

    /* Task Screens */

    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 800px;
        max-height: 600px;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 25px 40px;
        border-radius: 12px;
        font-size: 4.5em;
        font-family: sans-serif;
    }

    #response_btns {
    position: absolute;
    top: 65%;       /* Starts the button row at 65% down the image */
    width: 100%;    /* Spans the full width of the image */
    left: 0;
    margin: 0;      /* Remove bootstrap row margins */
    z-index: 10;    /* Ensure it sits on top of image and text */
    /* optional: background-color: rgba(255,255,255,0.2) for debugging */
    }

    .response-btn {
       background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 12px 20px;
        border-radius: 12px; 
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 130px;
        height: 130px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_attention_check .valence_img {
        width: 600px;
        height: 450px;
    }

    #block_attention_check .ui-key-img {
        width: 130px;
        height: 130px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 3.5em;
        background-color: #fafafa;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 3.5em;
        background-color: #fafafa;
    }

    #debrief h2 {
        font-size: 2.25rem;
        margin-bottom: 2.2em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.5em 1em;
        font-size: 1em;
    }

    /* XL Desktop Layout */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .progress-container {
        position: static;
        width: 60%;
        margin: 1em auto;
    }

    .secframe{
        min-height: 90vh;
        display: flex;
        align-items: center;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}


/* --- QHD and UHD Desktop Breakpoint (2560px+) --- */
@media (min-width: 2560px) {

    #breakpoint-indicator::before {
        content: 'QHD/UHD min 2560px';
    }

    /* Debug Display */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: left;
        border-style: solid;
        border-width: 1px;
        padding-left: 1em;
        padding-right: 0.25em;
        background-color: #a8a7a7;
        color: white;
        font-size: 1em;
    }

    .debugbar {
        border-style: solid;
        border-width: 1px;
        padding-left: 0.25em;
        padding-right: 0.25em;
        background-color: #ccbfbf;
    }

    /* QHD/UHD Desktop Sizing */
    body {
        font-family: sans-serif;
        font-size: 24px;
    }

    body.debug-visible {
        padding-top: 5em;
        padding-bottom: 0;
    }

    .button-container {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .logo-img {
        max-width: 900px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* ERQ Base Styles */
    .erq-option-item input[type="radio"] {
        width: 1.1em;
        height: 1.1em;
    }

    .erq-question {
        font-size: 1.1em;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1.5em;
        margin-bottom: 1.5em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #ffffff;
    }

    /* Welcome/Info/Consent Screens */
    #welcome .responseFrame,
    #partinfo .pisFrame,
    #consent .pisFrame,
    #question_instructions .pisFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #welcome h2,
    #partinfo h2,
    #consent h2,
    #question_instructions h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5em;
    }

    /* Demographics Screens */
    #demo_meds .pisFrame,
    #demo_vision .pisFrame,
    #demo_location .pisFrame,
    #demo_gender .pisFrame,
    #demo_age .pisFrame,
    #demo_fluency .pisFrame,
    #demo_education .pisFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #demo_meds .form-check,
    #demo_vision .form-check,
    #demo_location .form-check,
    #demo_gender .form-check,
    #demo_age .form-check,
    #demo_fluency .form-check,
    #demo_education .form-check {
        margin-bottom: 2em;
    }

    #demo_meds .form-check-input,
    #demo_vision .form-check-input,
    #demo_location .form-check-input,
    #demo_gender .form-check-input,
    #demo_age .form-check-input,
    #demo_fluency .form-check-input,
    #demo_education .form-check-input {
        width: 2.2em;
        height: 2.2em;
    }

    #demo_meds .form-check-label,
    #demo_vision .form-check-label,
    #demo_location .form-check-label,
    #demo_gender .form-check-label,
    #demo_age .form-check-label,
    #demo_fluency .form-check-label,
    #demo_education .form-check-label {
        font-size: 1.5em;
        margin-left: 0.8em;
    }

    /* ERQ Screen */
    #erq_all .pisFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #erq_all h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5em;
    }

    #erq_all .erq-question {
        font-size: 1.1em;
        padding: 2.5em;
        margin-bottom: 2.5em;
    }

    #erq_all .erq-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #erq_all .erq-option-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        min-width: 110px;
    }

    #erq_all .erq-option-item input[type="radio"] {
        width: 0.9em;
        height: 0.9em;
    }

    #erq_all .erq-option-item label {
        font-size: 0.95em;
        margin-left: 0;
        margin-top: 0.8em;
        text-align: center;
    }

    /* Instructions Screens */
    #practice_instructions .pisFrame,
    #trial_instructions .pisFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #practice_instructions h2,
    #trial_instructions h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5em;
    }

    /* Task Screens */

    /* block_fixation & block_word - shared layout */
    #block_fixation .responseFrame,
    #block_word .responseFrame,
    #block_response .responseFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #block_fixation .stimulus-img,
    #block_word .stimulus-img,
    #block_response .stimulus-img {
        max-width: 900px;
        max-height: 675px;
    }

    #block_fixation .block_image_container,
    #block_word .block_image_container,
    #block_response .block_image_container {
        position: relative;
        display: inline-block;
    }

    #block_fixation .text-layer,
    #block_word .text-layer,
    #block_response .text-layer{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #block_fixation .text-layer span,
    #block_word .text-layer span,
    #block_response .text-layer span {
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 30px 45px;
        border-radius: 14px;
        font-size: 5em;
        font-family: sans-serif;
    }

    #response_btns {
    position: absolute;
    top: 65%;       /* Starts the button row at 65% down the image */
    width: 100%;    /* Spans the full width of the image */
    left: 0;
    margin: 0;      /* Remove bootstrap row margins */
    z-index: 10;    /* Ensure it sits on top of image and text */
    /* optional: background-color: rgba(255,255,255,0.2) for debugging */
    }

    .response-btn {
       background-color: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 15px 25px;
        border-radius: 14px;
    }

    /* block_intro */
    #block_intro .responseFrame {
        padding: 4em;
        background-color: #fafafa;
        text-align: center;
    }

    /* practice_feedback */
    #practice_feedback .responseFrame {
        padding: 4em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 4em;
        background-color: #fafafa;
        text-align: center;
    }

    /* block_response */
    #block_response .responseFrame {
        padding: 4em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_response .ui-key-img {
        width: 140px;
        height: 140px;
    }

    /* block_attention_check */
    #block_attention_check .valence-frame {
        padding: 0.5em;
        background-color: #fafafa;
        text-align: center;
    }

    #block_attention_check .valence_img {
        max-width: 900px;
        max-height: 675px;
    }

    #block_attention_check .ui-key-img {
        width: 140px;
        height: 140px;
    }

    /* block_end */
    #block_end .responseFrame {
        padding: 4em;
        background-color: #fafafa;
        text-align: center;
    }

    /* Debrief */
    #debrief .pisFrame {
        padding: 4em;
        background-color: #fafafa;
    }

    #debrief h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5em;
    }

    /* Buttons for all screens */
    #welcome .btn,
    #partinfo .btn,
    #consent .btn,
    #question_instructions .btn,
    #demo_meds .btn,
    #demo_vision .btn,
    #demo_location .btn,
    #demo_gender .btn,
    #demo_age .btn,
    #demo_fluency .btn,
    #demo_education .btn,
    #erq_all .btn,
    #practice_instructions .btn,
    #trial_instructions .btn,
    #block_intro .btn,
    #block_response .btn,
    #block_attention_check .btn,
    #block_end .btn,
    #debrief .btn {
        padding: 0.9em 1.8em;
        font-size: 1.2em;
    }

    /* Utility Classes */
    .disabled-link {
        pointer-events: none;
        opacity: 0.5;
        text-decoration: none;
    }

    /* QHD/UHD Desktop Layout */
    .debugdisplay {
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .progress-container {
        position: static;
        width: 55%;
        margin: 1em auto;
    }

    .secframe{
        min-height: 90vh;
        display: flex;
        align-items: center;
    }

    /* Accordion Styles for PIS */
    .accordion-button {
        cursor: pointer;
        font-size: 1em;
        font-weight: bold;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    .accordion-body {
        font-size: 1em;
        font-weight: normal;
    }
}