html {
    font-size: 16px;
    min-height: 100%;
}

body {
    min-height: 100vh;
}

.d2-body {
    background: #000;
    color: #f7f7f7;
    font-family: Georgia, "Times New Roman", serif;
}

.d2-access-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: #000;
}

.d2-access-panel,
.d2-success-panel {
    width: min(100%, 560px);
    text-align: center;
}

.d2-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.d2-logo-large {
    max-width: 460px;
}

.d2-logo-small {
    max-width: 260px;
}

.d2-access-form {
    width: min(100%, 340px);
    margin: 2rem auto 0;
}

.d2-access-title {
    margin-bottom: 1rem;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.16rem;
}

.d2-access-input,
.d2-questionnaire-form .form-control,
.d2-questionnaire-form .form-select {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    background: #111;
    color: #fff;
}

.d2-access-input {
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.12rem;
}

.d2-access-input:focus,
.d2-questionnaire-form .form-control:focus,
.d2-questionnaire-form .form-select:focus {
    border-color: #fff;
    background: #151515;
    color: #fff;
    box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.12);
}

.d2-questionnaire-form .form-select option {
    background: #111;
    color: #fff;
}

.d2-submit-button,
.d2-secondary-button {
    min-height: 44px;
    border: 1px solid #fff;
    border-radius: 4px;
    padding: 0.65rem 1.4rem;
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.d2-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.d2-secondary-button {
    background: transparent;
    color: #fff;
}

.d2-questionnaire-page {
    min-height: 100vh;
    padding: 3rem 1rem;
    background: #000;
}

.d2-form-wrap {
    width: min(100%, 1040px);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: clamp(1rem, 3vw, 2rem);
    background: #050505;
}

.d2-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.d2-form-header h1 {
    margin: 1rem 0 0;
    color: #fff;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.d2-form-section {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.d2-form-section h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #fff;
}

.d2-form-section p,
.d2-questionnaire-form label {
    color: #d9d9d9;
    line-height: 1.4;
}

.d2-check-list {
    display: grid;
    gap: 0.8rem;
}

.d2-questionnaire-form .form-check {
    display: grid;
    grid-template-columns: 1.2rem minmax(0, 1fr);
    column-gap: 0.6rem;
    align-items: start;
    padding-left: 0;
}

.d2-questionnaire-form .form-check-input {
    float: none;
    margin: 0.2rem 0 0;
}

.d2-answer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: start;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.d2-answer-question {
    color: #e5e5e5;
    line-height: 1.4;
}

.d2-answer-options {
    display: flex;
    gap: 1rem;
    white-space: nowrap;
}

.d2-signature-line {
    min-height: 46px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f7f7f7;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.75rem;
    color: #fff;
    font-size: 1.15rem;
    font-style: italic;
}

.d2-signature-line.is-signed {
    background: transparent;
}

.d2-submit-message {
    display: none;
}

.d2-submit-message.is-visible {
    display: block;
}

.d2-success-message {
    margin: 2rem auto 0;
    max-width: 620px;
    color: #fff;
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    line-height: 1.45;
}

@media (max-width: 640px) {
    .d2-questionnaire-page {
        padding: 1rem 0;
    }

    .d2-form-wrap {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .d2-answer-row {
        grid-template-columns: 1fr;
    }

    .d2-answer-options {
        justify-content: flex-start;
    }

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