body {
    background-color: #f4f4f4;
    padding-bottom: 180px;
}

.report-container {
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
    padding: 40px;
    box-shadow: 0 0 15px rgba(0, 0, 0, .1);
    max-width: 900px;
    margin: 20px auto;
}

.report-container-wide {
    max-width: 980px;
}

input[type="text"] {
    border: 1px solid #aaa;
    padding: 2px 4px;
    margin: 0 2px;
    border-radius: 3px;
    text-align: center;
    font-family: inherit;
    background-color: #f8fbff;
    color: #000;
    font-size: 11pt;
    transition: background-color .3s, border-color .3s, color .3s;
}

input[type="text"]:focus {
    background-color: #e8f0fe;
    border-color: #0d6efd;
    outline: none;
}

select {
    border: 1px solid #aaa;
    padding: 2px;
    margin: 0 2px;
    border-radius: 3px;
    font-family: inherit;
    background-color: #f8fbff;
    cursor: pointer;
    font-size: 11pt;
    transition: background-color .3s, border-color .3s;
}

.w-sm { width: 60px; }
.w-md { width: 90px; }
.w-lg { width: 72px; }
.quiz-input { width: 72px;
margin: 0 4px;
}

.quiz-select-long {
    width: min(100%, 560px);
    max-width: 100%;
}

/* === RAPORT APA 7 & TABELA === */

.apa-heading {
    text-align: center;
    font-weight: bold;
    font-size: 12pt;
    margin-top: 0;
    margin-bottom: 1.2em;
    font-family: "Times New Roman", Times, serif;
}

.apa-table-title {
    display: block;
    margin-bottom: 0.8em;
    font-style: italic;
}

.apa-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 0.8em;
    -webkit-overflow-scrolling: touch;
}

.apa-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    text-align: center;
}

.apa-table th {
    border-bottom: 1px solid #000;
    padding: 8px 2px;
    font-weight: normal;
    font-style: normal;
    vertical-align: middle;
}

.apa-table td {
    padding: 6px 2px;
    vertical-align: middle;
}

.apa-table .col-var {
    width: 125px;
    text-align: left;
}

.apa-table td input.quiz-input {
    width: 100%;
    max-width: 68px;
    box-sizing: border-box;
    padding: 4px 2px;
    margin: 0 auto;
    text-align: center;
    font-size: 10.5pt;
    border: 1px solid #b8c2cc;
    border-radius: 4px;
    background-color: #f8fbff;
    transition: background-color .3s, border-color .3s, color .3s;
}

.apa-table td input.quiz-input::placeholder {
    color: #94a3b8;
    font-size: 9pt;
    opacity: 0.8;
}

.apa-table abbr[title] {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.apa-table th[title] {
    cursor: help;
}

.apa-note {
    font-size: 10pt;
    margin-top: 8px;
    line-height: 1.4;
}

.apa-note .apa-note-stars {
    display: block;
    margin-top: 4px; /* mały odstęp od tekstu powyżej */
}

.text-indent {
    text-indent: 1.27cm;
}

.click-tooltip {
    position: fixed;
    z-index: 3000;
    max-width: min(280px, calc(100vw - 24px));
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
    font-size: .875rem;
    line-height: 1.3;
    text-align: left;
}

.instruction-panel {
    background-color: #f0f2f5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 5px solid #0d6efd;
    font-family: Arial, sans-serif;
}

.fixed-var {
    font-weight: bold;
    color: #333;
}

/* === PRZYCISKI POBIERANIA DANYCH === */

.data-download-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-jamovi:hover {
    border-color: #315c8c;
    background-color: #f0f7ff;
    color: #1d3b5e;
}

.btn-spss:hover {
    border-color: #a33a46;
    background-color: #fff1f2;
    color: #6b1d26;
}

.download-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.fallback-icon {
    font-size: 1rem;
    display: none;
    color: #64748b;
}

/* === PASEK AKCJI I DOLNA PANEL === */

.fixed-bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column;
}

.action-bar {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .07);
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px auto;
    max-width: 1100px;
}

.action-bar--admin {
    background: #fffdf4;
    border-color: #f1df9b;
}

.action-bar-admin-controls,
.action-bar-id-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.action-bar-admin-controls {
    margin-right: 4px;
}

.action-bar-id-label {
    color: #374151;
    font-weight: 700;
}

input.action-bar-id-input {
    width: min(220px, 32vw);
    min-width: 140px;
    height: 42px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid #adb5bd;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    text-align: left;
}

.action-bar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.action-bar-button:hover {
    transform: translateY(-1px);
}

.action-bar-button:focus-visible,
.action-bar-id-input:focus-visible {
    outline: 3px solid rgba(13, 110, 253, .3);
    outline-offset: 2px;
}

.action-bar-button--admin { background: #f6c343; border-color: #d39e00; color: #332701; }
.action-bar-button--admin:hover { background: #eab52e; }
.action-bar-button--logout { background: #fff; border-color: #8b95a1; color: #343a40; }
.action-bar-button--logout:hover { background: #f1f3f5; border-color: #495057; }
.action-bar-button--primary { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.action-bar-button--primary:hover { background: #0b5ed7; border-color: #0a58ca; color: #fff; }
.action-bar-button--check { background: #198754; border-color: #198754; color: #fff; }
.action-bar-button--check:hover { background: #157347; border-color: #146c43; }

/* === PRZYCISKI PORADNIKÓW (JAMOVI & SPSS) === */

.tutorial-button {
    min-width: 176px;
    background: #fff;
}

.tutorial-button--jamovi { border-color: #315c8c; color: #23476d; }
.tutorial-button--jamovi:hover { background: #eef5fc; color: #23476d; box-shadow: 0 4px 10px rgba(49, 92, 140, .16); }
.tutorial-button--spss { border-color: #a33a46; color: #7d2632; }
.tutorial-button--spss:hover { background: #fff1f2; color: #7d2632; box-shadow: 0 4px 10px rgba(163, 58, 70, .16); }
.tutorial-button--disabled { cursor: not-allowed; opacity: .65; }
.tutorial-button--disabled:hover { transform: none; box-shadow: none; }

.tutorial-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Skalowanie plików PNG wewnątrz znaczników <img> */
.tutorial-badge img,
.tutorial-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tutorial-copy {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.tutorial-copy small {
    font-size: .68rem;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

@media (max-width: 767.98px) {
    .action-bar { align-items: stretch; padding: 10px; }
    .action-bar-admin-controls, .action-bar-id-form { width: 100%; }
    .action-bar-id-input { width: 100%; flex: 1 1 100%; }
    .action-bar-id-form .action-bar-button, .action-bar-logout-form { flex: 1 1 0; }
    .action-bar-button, .tutorial-button { flex: 1 1 auto; }
    .score-badge { flex: 1 1 100%; }
}

@media (max-width: 420px) {
    .action-bar-id-form .action-bar-button, .action-bar-logout-form,
    .action-bar > .action-bar-button, .tutorial-button { width: 100%; flex-basis: 100%; }
}

footer {
    background-color: #212529;
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.social-icons a {
    transition: transform .2s;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.score-badge {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    min-width: 150px;
    text-align: center;
    transition: all .3s ease;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.correct {
    border-color: #22c55e !important;
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    font-weight: bold;
    pointer-events: none;
}

.incorrect {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    animation: shake .4s cubic-bezier(.36, .07, .19, .97) both;
}

#resultModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content-custom {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .2);
    max-width: 400px;
    width: 90%;
    position: relative;
    z-index: 1051;
}

.modal-overlay {
    background-color: rgba(0, 0, 0, .6);
    backdrop-filter: blur(2px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
}

/* === INTERFEJS DLA STRONY GŁÓWNEJ I SYSTEMU === */

body.home-page { padding-bottom: 0; }
body.home-page.has-fixed-bottom-panel { padding-bottom: 7rem; }

.fixed-bottom-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    border-top: 1px solid #cbd5e1;
    background-color: #fff;
    box-shadow: 0 -4px 14px rgba(15, 23, 42, .16);
}

.fixed-bottom-panel--admin {
    background-color: #fff;
    color: #212529;
}

.fixed-bottom-panel__content {
    display: flex;
    min-height: 5.5rem;
    align-items: center;
    justify-content: center;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.fixed-bottom-panel__content .action-bar-admin-controls {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0;
}

.fixed-bottom-panel__content .action-bar-id-form {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: .75rem;
    margin: 0;
}

.fixed-bottom-panel__content .action-bar-logout-form {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0;
}

.fixed-bottom-panel__content .action-bar-id-input,
.fixed-bottom-panel__content .action-bar-button {
    min-height: 2.75rem;
}

.fixed-bottom-panel__content .action-bar-id-input {
    width: min(22rem, 35vw);
    min-width: 12rem;
}


@media (max-width: 767.98px) {
    body.home-page.has-fixed-bottom-panel { padding-bottom: 16rem; }

    .fixed-bottom-panel__content {
        align-items: stretch;
    }

    .fixed-bottom-panel__content .action-bar-admin-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .fixed-bottom-panel__content .action-bar-id-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .fixed-bottom-panel__content .action-bar-id-input {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .fixed-bottom-panel__content .action-bar-id-form .action-bar-button,
    .fixed-bottom-panel__content .action-bar-logout-form,
    .fixed-bottom-panel__content .action-bar-logout-form .action-bar-button {
        width: 100%;
    }
}

@media print {
    body.home-page,
    body.home-page.has-fixed-bottom-panel { padding-bottom: 0; }
    .fixed-bottom-panel { display: none !important; }
    .hypotheses-panel {
        border: 1px solid #777;
        border-left-width: .3rem;
        background: #fff !important;
        color: #000;
    }
}

.nobreak {
    white-space: nowrap;
}

/* Canonical gray hypotheses panel restored from 2711b311 */
.hypotheses-panel {
    margin: 24px 0 30px;
    padding: 0 0 0 18px;
    border: 0;
    border-left: 3px solid #cbd5e1;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
    box-shadow: none;
    break-inside: avoid;
}

.hypotheses-panel .hypotheses-title,
.hypotheses-panel .hypotheses-panel__title {
    margin: 0 0 12px !important;
    color: #0f172a;
    font-family: inherit;
    font-size: 12pt !important;
    font-weight: 700 !important;
    font-style: normal;
    line-height: 1.25;
    text-align: left !important;
}

.hypotheses-panel .h-item,
.hypotheses-panel .hypotheses-panel__content > .h-item,
.hypotheses-panel .hypotheses-panel__content li {
    margin: 0 0 6px !important;
    color: #334155;
    font-family: inherit;
    font-size: 12pt !important;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
}

.hypotheses-panel .h-item:last-child,
.hypotheses-panel .hypotheses-panel__content li:last-child {
    margin-bottom: 0 !important;
}

.hypotheses-panel .h-item strong,
.hypotheses-panel .hypotheses-panel__content li strong {
    margin-right: 6px;
    color: #0f172a;
    font-weight: 700;
}

.hypotheses-panel .h-item strong em,
.hypotheses-panel .hypotheses-panel__content li strong em {
    font-style: italic;
}

.hypotheses-panel ul,
.hypotheses-panel ol,
.hypotheses-panel .hypotheses-panel__content {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hypotheses-panel .hypotheses-panel__header {
    margin: 0;
    padding: 0;
}

@media print {
    .hypotheses-panel {
        border: 0;
        border-left: 3px solid #777;
        background: transparent !important;
        color: #000;
    }
}

/* INDEX_BRANDING_MAIN_21F3DE9_V1 */
.site-branding {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.site-branding__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.site-branding__logo-link:focus-visible {
    outline: 3px solid rgba(13, 110, 253, .35);
    outline-offset: 4px;
    border-radius: 50%;
}

.site-branding__logo {
    display: block;
    width: 104px;
    height: 104px;
    object-fit: contain;
}

.site-branding__text {
    min-width: 0;
}

.site-branding__title {
    margin-bottom: .4rem;
    color: #212529;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.1;
}

.site-branding__description {
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.5;
}

.page-section-heading {
    min-width: 0;
}

.module-card__layout {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 170px;
    align-items: center;
    gap: 1rem;
}

.module-card__icon {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    flex: 0 0 auto;
}

.module-card__content {
    min-width: 0;
}

.module-card__actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .5rem;
    min-width: 170px;
}

.module-icon-attribution a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.branding-embed-page {
    max-width: 860px;
}

.branding-embed-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    background: #fff;
}

.branding-embed-preview img {
    display: block;
    max-width: min(100%, 520px);
    max-height: 180px;
    object-fit: contain;
}

.branding-embed-code {
    display: block;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #f8f9fa;
    color: #212529;
}

@media (max-width: 720px) {
    .site-branding__logo {
        width: 84px;
        height: 84px;
    }

    .module-card__layout {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: .75rem;
    }

    .module-card__icon {
        width: 48px;
        height: 48px;
    }

    .module-card__actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    .module-card__actions > :only-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .site-branding {
        gap: .85rem;
    }

    .site-branding__logo {
        width: 72px;
        height: 72px;
    }

    .site-branding__title {
        font-size: 1.65rem;
    }
}
