* {
    box-sizing: border-box;
}

/*body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6f8;
    color: #1f2937;
}*/

.survey-card {
    background: #F5F2FA;
    border: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.survey-card__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.survey-card__left {
    flex: 1;
    min-width: 0;
}

.survey-card__title {
    margin: 0 0 .4rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.survey-card__title a{
    color: #361E7D;
    text-decoration: none;
    font-weight: 700;
}

.survey-card__description a {
    color: #361E7D;
    text-decoration: none;
}

.survey-card__title a:hover, .survey-card__description :hover {
    text-decoration: underline;
}

.survey-card__description {
    margin: 0 0 .9rem;

    color: #6b7280;
    font-size: .92rem;
    line-height: 1.45;
}

.survey-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    font-size: .8rem;
    color: #9ca3af;
}

.survey-card__meta:first-of-type {
    margin-top: 10px !important;
    line-height: 1.7;
}

.survey-card__status {
    font-weight: 600;
}

.survey-card__right {
    width: 180px;
    flex: 0 0 180px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.survey-card__count {
    margin-bottom: .5rem;

    font-size: 1rem;
    font-weight: 700;
    color: #4b5563;
}

.survey-card__progress {
    width: 100%;
}

.survey-card__progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    overflow: hidden;
}

.survey-card__progress-fill {
    height: 100%;
    background: #26d1c3;
    border-radius: inherit;
}

.survey-card__progress-label {
    margin-top: .35rem;

    text-align: right;
    font-size: .75rem;
    color: #9ca3af;
}

@media (max-width: 760px) {
    .survey-card__content {
        flex-direction: column;
    }

    .survey-card__right {
        width: 100%;
        flex: unset;

        align-items: stretch;
    }

    .survey-card__count {
        text-align: right;
    }

    .survey-card__progress-label {
        text-align: right;
    }
}

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.topbar__brand {
    font-weight: 700;
}

.topbar__user {
    font-size: 0.875rem;
    color: #6b7280;
}

/*.page {
    width: min(100% - 2rem, 960px);
    margin: 0px auto;
}*/

.intro-card,
.progress-card,
.theme-info,
.question-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, .04);*/
}

.intro-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.intro-card h1 {
    font-size: 1.6rem;
}

.intro-card__subtitle {
    font-weight: 600;
}

.intro-card p:last-child {
    color: #4b5563;
    line-height: 1.5;
}

.progress-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.progress-card__step {
    padding: 1rem;
    background: #361E7D;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}

.progress-card__select {
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    font: inherit;
}

.progress-card__status {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: #6b7280;
    white-space: nowrap;
}

.progress-card__link {
    grid-column: 1 / -1;
    justify-self: end;
    text-decoration: none;
}

.progress-bar {
    width: 110px;
    height: 8px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: #26D1CE;
}

.theme-title h2 {
    margin: 0 0 1rem 0 !important;
    margin-block-start: 0 !important;
    font-size: 1.25rem;
}

.theme-info {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-color: #e5e7eb;
}

.theme-info h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.theme-info__box {
    padding: 1.25rem 0 !important;
    background: #fff;
    /* border-radius: 6px;*/
    line-height: 1.5;
    color: #4b5563;
}

.question-card {
    padding: 1.75rem;
    margin-bottom: 1rem;
    background: #F5F2FA;
}

.question-card h3 {
    margin: 0 0 1.5rem;
    font-size: 1.15rem;
    text-align: left;
}

.question-title__bold {
    font-weight: 700;
    line-height: 1.5;
    /**letter-spacing: .05em;**/
}

.question-card__options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: .9rem;
}

.question-card__options > span {
    width: 100%;
    font-size: .8rem;
    font-weight: 700;
    color: #6b7280;
}

.question-card__options label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.clear-link {
    color: #361E7D;
    font-weight: 600;
    margin-left: 50px;
}

.question-card__comments {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.question-card__comments label span {
    display: block;
    margin-bottom: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #6b7280;
}

textarea {
    width: 100%;
    min-height: 90px;
    padding: .9rem;
    border: 1px solid #d1d5db;
    resize: vertical;
    font: inherit;
}

textarea::placeholder {
    color: #9ca3af;
}

@media (max-width: 760px) {
    .topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
        gap: .25rem;
        padding: 1rem;
    }

    .progress-card {
        grid-template-columns: 1fr;
    }

    .progress-card__status {
        justify-content: space-between;
    }

    .progress-bar {
        flex: 1;
    }

    .question-card__comments {
        grid-template-columns: 1fr;
    }
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;
    margin-right: 6px;

    background-color: #2f80ed;
    color: #fff;
    border-radius: 50%;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    vertical-align: middle;
}

.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

.loader-overlay.hidden {
    display: none;
}

.loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 32px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .45);
}

.loader-spinner {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 6px solid rgba(31, 41, 55, .18);
    border-top-color: #16a34a;
    border-right-color: #2563eb;
    animation: loader-spin .9s linear infinite;
}
.loader-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--text);
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.question-card__save-status[data-status="saving"] {
    color: #666;
}

.question-card__save-status[data-status="saved"] {
    color: green;
}

.question-card__save-status[data-status="error"] {
    color: red;
}

.question-card__options label,
.question-card__options input[type="radio"] {
    cursor: pointer;
}

.theme-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 1.5rem 0 2rem;
}

.theme-navigation__button {
    border: 0;
    padding: .8rem 1.4rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}

.theme-navigation__button--secondary {
    background: #F5F2FA;
    color: #361E7D !important;
    border: 1px solid #d1d5db;
}

.theme-navigation__button--secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.theme-navigation__button--primary {
    background: #361E7D;
    color: #fff;
}

.theme-navigation__button--primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.theme-navigation__button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .theme-navigation {
        gap: .75rem;
    }

    .theme-navigation__button {
        flex: 1;
    }
}

.summary-page {
    width: min(100% - 2rem, 1200px);
    margin: 2rem auto;
}

.summary-back-link {
    display: inline-flex;
    margin-bottom: 1rem;
}

.summary-header {
    margin-bottom: 1rem;
}

.summary-header h1 {
    margin: 0 0 .25rem;
}

.summary-header p {
    margin: 0;
}

.summary-info-card,
.summary-status-card,
.summary-table-card {
    background: #fff;
   /* border: 1px solid #e5e7eb;*/
  /*  padding: 1.25rem;*/
    margin-bottom: 1.25rem;
}

.summary-info-card p,
.summary-status-card p {
    margin: 0 0 .75rem;
}

.summary-info-card p:last-child,
.summary-status-card p:last-child {
    margin-bottom: 0;
}

.summary-status-card {
    border-width: 2px;
}

.summary-actions {
    display: flex;
    margin-bottom: 1.25rem;
}

.summary-submit-button {
    margin-top: 15px;
    padding: .9rem 1.5rem;
    background: #361E7D;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
    border: none;
}

.summary-submit-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.summary-submit-button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.summary-table-card h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: .9rem 0;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.summary-table tfoot th {
    font-weight: 700;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: .2rem .55rem;
    font-weight: 700;
    font-size: .85rem;
}

.summary-warning {
    font-weight: 700;
}

@media (max-width: 760px) {
    .summary-actions {
        justify-content: stretch;
    }

    .summary-submit-button {
        width: 100%;
    }

    .summary-table {
        font-size: .9rem;
    }

    .summary-table th,
    .summary-table td {
        padding: .75rem .6rem;
    }
}

.summary-table tfoot th,
.summary-table tfoot td {
    border-top: 2px solid #9ca3af;
}

.summary-status-card--success {
    background: #26D1CE;
    border-color: #1aa8a6;
    color: #0d4a49;
}

.summary-status-card--success strong {
    color: #0d4a49;
}

.summary-status-card--success::before {
    background: rgb(25, 135, 84);
    color: #fff;
}

.summary-pill--success {
    background: #26D1CE;
    color: #0d4a49;
}

.summary-pill--warning {
    background-color: #fab319;
    color: #92400e;
}

.summary-pill--error {
    background-color: #fee2e2;
    color: #b91c1c;
}

.summary-status-card .fa-triangle-exclamation {
    margin-right: .45rem;
    color: #b45309;
}

.summary-table thead th {
    background-color: #361E7D;
    color: white;
    font-weight: 600;
    padding: 12px 16px;
}

.summary-table thead th:not(:first-child),
.summary-table tbody td:not(:first-child),
.summary-table tfoot th:not(:first-child) {
    text-align: center;
}

.summary-table thead th:first-child,
.summary-table tbody td:first-child,
.summary-table tfoot th:first-child {
    text-align: left;
}

.hidden {
    display: none !important;
}

.summary-theme-toggle {
    background: #fff;
    color: #1f2937;
}

.summary-theme-details-row td {
    padding: 0.75rem 1rem 1rem;
    background: #f9fafb;
}

.summary-theme-details {
    padding: 1rem;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.summary-question-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-question-list__item {
    padding: 0.9rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-question-list__item:first-child {
    padding-top: 0;
}

.summary-question-list__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.summary-question-list__question {
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

.summary-question-list__answer {
    text-align: left;
}

.summary-question-list__action {
    margin-top: 0.5rem;
    text-align: left;
}

.summary-answer {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.summary-answer--answered {
    background: #dcfce7;
    color: #166534;
}

.summary-answer--missing {
    background: #fef3c7;
    color: #92400e;
}

.summary-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 26px;

    border: 0;
    border-radius: 6px;

    background: #22c55e;
    color: #fff;

    font-size: 0.8rem;
    line-height: 1;

    cursor: pointer;

    transition: background .15s ease;
}

.summary-theme-toggle:hover,
.summary-theme-toggle[aria-expanded="true"] {
    background: #16a34a;
    color: #fff;
    text-decoration: none;
}

.summary-theme-toggle:focus-visible {
    outline: 3px solid rgba(34, 197, 94, .35);
    outline-offset: 2px;
}

.question-card__comments {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.question-card__answer-info {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: .9rem;
    line-height: 1.5;
}

.question-card__answer-info--yes {
    border-left-color: #26D1CE;
}

.question-card__answer-info--no {
    border-left-color: #dc2626;
}

.question-card__answer-info--idk {
    border-left-color: #f59e0b;
}

.question-card__answer-info--irl {
    border-left-color: #f97316;
}

.question-card__answer-info-content:empty::before {
    content: "";
}


.question-card__answer-info-content:empty::before {
    content: "";
}

.question-card__comments label span {
    display: block;
    margin-bottom: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #6b7280;
}


.review-table {
    font-size: 1.08rem;
}

.review-table thead th {
    font-size: 1rem;
    line-height: 1.25;
}

.review-table tbody td,
.review-table tbody th,
.review-table tfoot th,
.review-table tfoot td {
    font-size: 1.08rem;
    line-height: 1.35;
}

.review-table .summary-pill {
    font-size: 1rem;
    line-height: 1.2;
}

.review-question-row {
    font-size: 1.08rem;
    line-height: 1.35;
}

.review-question-row__question a,
.review-question-row__answer,
.review-question-row__action,
.review-question-row__deadline {
    font-size: 1.08rem;
    line-height: 1.35;
}

.answer-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

.survey-name h2 {
    font-size: 20px;
    line-height: 1.25;
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

.txpage__content h2 {
    margin-top:1rem !important;
}

.review-answer-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-answer-select {
    font-size: 1rem;
    padding: 3px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-width: 130px;
}

.review-answer-select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.review-answer-status {
    font-size: .85rem;
    line-height: 1;
}

.review-answer-status[data-status="saving"] { color: #6b7280; }
.review-answer-status[data-status="saved"]  { color: #16a34a; }
.review-answer-status[data-status="error"]  { color: #dc2626; }

.review-confirm-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #361E7D;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .10);
    z-index: 1000;
    padding: 16px 24px;
}

.review-confirm-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    gap: 16px;
}

.review-confirm-text {
    font-size: 1rem;
    font-weight: 600;
}

.review-confirm-footer__buttons {
    display: flex;
    gap: 10px;
}

.review-confirm-yes,
.review-confirm-cancel {
    padding: 10px 22px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.review-confirm-yes {
    background: #361E7D;
    color: #fff;
}

.review-confirm-yes:hover {
    background: #1d4ed8;
}

.review-confirm-cancel {
    background: #e5e7eb;
    color: #374151;
}

.review-confirm-cancel:hover {
    background: #d1d5db;
}

.review-submit-status {
    margin-top: 10px;
    font-size: .95rem;
    font-weight: 600;
}

.review-submit-status[data-status="success"] { color: #16a34a; }
.review-submit-status[data-status="error"]   { color: #dc2626; }