* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f7fa;
    color: #1f2937;
}

.container {
    width: min(100% - 32px, 1000px);
    margin: 0 auto;
}

.site-header {
    background: #111827;
    color: white;
    padding: 22px 0;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.subtitle {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

main {
    padding-top: 40px;
    padding-bottom: 60px;
}

.intro {
    margin-bottom: 35px;
}

.intro h1 {
    margin-bottom: 12px;
    font-size: 2rem;
}

.intro p {
    line-height: 1.6;
    color: #4b5563;
}

#progress-section {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

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

.progress-bar-value {
    width: 0;
    height: 100%;
    background: #2563eb;
    transition: width 0.2s ease;
}

.question-section {
    margin-bottom: 35px;
}

.question-section h2 {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d1d5db;
}

.question {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;

    padding: 20px;
    margin-bottom: 14px;
}

.question-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.45;
}

.question-id {
    display: inline-block;
    margin-right: 8px;

    font-family: monospace;
    font-size: 0.75rem;

    color: #6b7280;
}

.required-marker {
    color: #b91c1c;
    margin-left: 4px;
}

.help {
    margin-top: -5px;
    margin-bottom: 12px;

    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #cbd5e1;
    border-radius: 6px;

    font-size: 1rem;
    background: white;
}

.option {
    display: block;
    margin: 8px 0;
}

.option input {
    margin-right: 8px;
}

.form-actions {
    margin-top: 30px;
}

button {
    border: 0;
    border-radius: 6px;

    padding: 12px 22px;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    background: #2563eb;
    color: white;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result {
    margin-top: 30px;
    padding: 20px;

    background: white;

    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.result.error {
    border-color: #dc2626;
}

.result.success {
    border-color: #16a34a;
}

.hidden {
    display: none !important;
}

.site-footer {
    padding: 30px 0;

    background: #e5e7eb;

    color: #4b5563;
    font-size: 0.85rem;
    line-height: 1.5;
}


/* =========================================================
   Assessment Result
   ========================================================= */

.assessment-result {
    margin-top: 45px;
}

.assessment-result > h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.7rem;
}

.assessment-overview {
    margin-top: 0;
    margin-bottom: 25px;
    color: #4b5563;
}

.summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 25px 0 35px;
}

.summary-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.summary-card-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
}

.summary-card-label {
    margin-top: 8px;
    color: #4b5563;
    font-size: 0.9rem;
}

.summary-card.implemented {
    border-top: 4px solid #16a34a;
}

.summary-card.partial {
    border-top: 4px solid #d97706;
}

.summary-card.missing {
    border-top: 4px solid #dc2626;
}

.summary-card.unknown {
    border-top: 4px solid #64748b;
}


.findings-section {
    margin-top: 35px;
}

.findings-section h3 {
    margin-bottom: 18px;
    font-size: 1.3rem;
}

.finding-list {
    display: grid;
    gap: 16px;
}

.finding-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.finding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.finding-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.finding-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.priority-critical {
    background: #fee2e2;
    color: #991b1b;
}

.priority-high {
    background: #ffedd5;
    color: #9a3412;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #e5e7eb;
    color: #374151;
}

.status-missing {
    background: #fee2e2;
    color: #991b1b;
}

.status-partial {
    background: #fef3c7;
    color: #92400e;
}

.status-unknown {
    background: #e2e8f0;
    color: #334155;
}

.status-implemented {
    background: #dcfce7;
    color: #166534;
}

.management-priority {
    margin-top: 12px;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
}

.finding-text {
    margin-top: 16px;
}

.finding-text strong {
    display: block;
    margin-bottom: 4px;
}

.finding-text p {
    margin: 0;
    line-height: 1.55;
    color: #4b5563;
}

.finding-examples {
    margin-top: 12px;
    margin-bottom: 0;
    padding-left: 22px;
    color: #4b5563;
}

.finding-examples li {
    margin: 5px 0;
}

.consistency-summary {
    margin-top: 30px;
    padding: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
}

.consistency-summary h3 {
    margin-top: 0;
}

.consistency-summary p {
    margin-bottom: 5px;
}

.consistency-critical {
    color: #9a3412;
    font-weight: 600;
}

.assessment-note {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;

    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.5;
}


@media (max-width: 750px) {

    .summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .finding-header {
        flex-direction: column;
    }

    .finding-badges {
        justify-content: flex-start;
    }
}

.full-report-button {
    margin-top: 25px;
    background: #111827;
}


/* =========================================================
   Regulatory Overview
   ========================================================= */

.regulatory-overview {
    margin-top: 35px;
    margin-bottom: 35px;
}

.regulatory-overview h3 {
    margin-bottom: 8px;
}

.regulatory-notice {
    margin-top: 0;
    margin-bottom: 18px;

    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.regulatory-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}

.regulatory-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
}

.regulatory-card h4 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.regulatory-metric {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 6px 0;

    border-bottom:
        1px solid #e5e7eb;

    font-size: 0.9rem;
}

.regulatory-metric span {
    color: #4b5563;
}

.regulatory-status {
    margin-top: 14px;

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.regulatory-status-item {
    font-size: 0.82rem;
    color: #4b5563;
}


@media (max-width: 850px) {

    .regulatory-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   ACCOUNT
   ========================================================== */

.account-panel {
    margin: 2rem 0;
    padding: 1.75rem;
    border: 1px solid #d8dde5;
    border-radius: 12px;
    background: #ffffff;
}

.account-panel h2 {
    margin-top: 0;
}

.account-domain-group {
    margin-top: 1.5rem;
}

.account-domain-group input,
.totp-code-group input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
}

.field-help {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.75;
}

.auth-methods {
    margin-top: 1.5rem;
}

.auth-method-button {
    width: 100%;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
}

.auth-method-button strong {
    display: block;
    margin-bottom: 0.35rem;
}

.auth-method-button span {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
}

.secondary-auth-method {
    background: transparent;
    border: 1px solid #cfd6df;
}

.auth-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d8dde5;
}

.auth-separator span {
    padding: 0 1rem;
    font-size: 0.9rem;
    opacity: 0.65;
}

.account-message {
    margin-top: 1rem;
    min-height: 1.5rem;
}


/* ==========================================================
   TOTP
   ========================================================== */

.totp-qr-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.totp-qr-code {
    width: 240px;
    height: 240px;
    max-width: 100%;
    image-rendering: pixelated;
    border: 12px solid #ffffff;
}

.totp-manual {
    margin: 1rem 0;
}

.totp-manual code {
    display: block;
    padding: 0.8rem;
    margin-top: 0.75rem;
    word-break: break-all;
    user-select: all;
}

.totp-code-group {
    margin-top: 1.5rem;
}

#totp-verification-code {
    max-width: 220px;
    font-size: 1.35rem;
    letter-spacing: 0.25rem;
}


/* ==========================================================
   AUTHENTICATED ACCOUNT
   ========================================================== */

.account-status-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.account-badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #cfd6df;
    font-weight: 700;
    font-size: 0.8rem;
}

.account-expiry {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f5f7fa;
}

.account-countdown {
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.secondary-button {
    background: transparent;
    border: 1px solid #cfd6df;
}

.secondary-auth-method,
.secondary-button {
    color: #1f2937;
}

.secondary-auth-method:hover,
.secondary-button:hover {
    background: #f8fafc;
}

.secondary-auth-method strong,
.secondary-auth-method span {
    color: #1f2937;
}
/* ==========================================================
   ACCOUNT MODE SWITCH
   ========================================================== */

.account-mode-switch {
    display: flex;

    gap: 4px;

    margin-bottom: 1.75rem;

    padding: 4px;

    background: #e5e7eb;

    border-radius: 8px;
}


.account-mode-button {
    flex: 1;

    background: transparent;

    color: #374151;
}


.account-mode-button:hover {
    background: #f8fafc;

    opacity: 1;
}


.account-mode-button.active {
    background: #2563eb;

    color: #ffffff;
}


/* ==========================================================
   LOGIN
   ========================================================== */

.totp-login-box {
    padding: 1rem;

    border:
        1px solid #cfd6df;

    border-radius: 8px;

    background: #f8fafc;
}


.totp-login-box input {
    width: 100%;

    max-width: 220px;

    margin-bottom: 1rem;

    font-size: 1.25rem;

    letter-spacing: 0.2rem;
}


.totp-login-box button {
    display: block;
}


@media (
    max-width: 650px
) {

    .account-mode-switch {
        flex-direction: column;
    }


    .totp-login-box input {
        max-width: 100%;
    }
}

/* ==========================================================
   ACCOUNT DANGER ZONE
   ========================================================== */

.account-danger-zone {
    margin-top: 2rem;

    padding: 1.25rem;

    border:
        1px solid #fecaca;

    border-radius: 8px;

    background: #fff7f7;
}


.account-danger-zone h3 {
    margin-top: 0;

    color: #991b1b;
}


.account-danger-zone p {
    color: #6b7280;
}


.danger-button {
    background: #b91c1c;

    color: #ffffff;
}


.danger-button:hover {
    background: #991b1b;
}


.delete-confirmation {
    margin-top: 1.25rem;

    padding-top: 1.25rem;

    border-top:
        1px solid #fecaca;
}


.delete-confirmation input {
    width: 100%;

    max-width: 260px;

    margin:
        0.5rem 0 1rem;

    padding:
        0.75rem;

    border:
        1px solid #fca5a5;

    border-radius: 6px;

    font-size: 1rem;

    font-weight: 700;

    letter-spacing: 0.08em;
}

/* ==========================================================
   ASSESSMENT STORAGE STATUS
   ========================================================== */

.assessment-storage-status {
    margin-top: 1.25rem;

    padding: 1rem;

    border: 1px solid #d8dde5;

    border-radius: 10px;

    background: #f8fafc;
}


.assessment-storage-status-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 0.65rem;
}


.assessment-storage-status-badge {
    display: inline-flex;

    align-items: center;

    gap: 0.4rem;

    padding: 0.3rem 0.65rem;

    border-radius: 999px;

    font-size: 0.8rem;

    font-weight: 700;
}


.assessment-storage-status-badge::before {
    content: "";

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: currentColor;
}


.assessment-storage-status-badge.status-saved {
    color: #166534;

    background: #dcfce7;
}


.assessment-storage-status-badge.status-empty {
    color: #475569;

    background: #e2e8f0;
}


.assessment-storage-status-badge.status-loading {
    color: #1d4ed8;

    background: #dbeafe;
}


.assessment-storage-status-badge.status-error {
    color: #991b1b;

    background: #fee2e2;
}


.assessment-storage-status-text {
    color: #475569;

    font-size: 0.95rem;
}


.assessment-storage-status-time {
    margin-top: 0.35rem;

    color: #64748b;

    font-size: 0.85rem;
}


@media (
    max-width: 650px
) {

    .assessment-storage-status-header {
        align-items: flex-start;

        flex-direction: column;
    }
}
