:root {
    color-scheme: light;
    font-family: "Roboto", Arial, sans-serif;
    color: #111111;
    background: #f3f3f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #f3f3f0;
}

button,
input,
select {
    font: inherit;
}

.login-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    height: 100%;
    overflow: hidden;
}

.manager-entry {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #30302e;
    background: #ffffff;
    border: 1px solid #b8bab4;
    border-radius: 4px;
}

.manager-entry:hover {
    color: #ffffff;
    background: #1e3d32;
    border-color: #1e3d32;
}

.manager-entry svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.manager-entry:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.login-intro {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    min-width: 0;
    min-height: 0;
    padding: clamp(48px, 7vw, 108px);
    background: #101010;
    color: #ffffff;
    overflow: hidden;
}

.brand-mark {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
}

.brand-mark span {
    position: absolute;
    width: 17px;
    height: 17px;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.brand-mark span:nth-child(1) {
    left: 27px;
    top: 0;
}

.brand-mark span:nth-child(2) {
    left: 0;
    top: 27px;
}

.brand-mark span:nth-child(3) {
    right: 0;
    top: 27px;
}

.brand-mark span:nth-child(4) {
    left: 14px;
    bottom: 0;
}

.brand-mark span:nth-child(5) {
    right: 14px;
    bottom: 0;
}

.product-label {
    margin: 0 0 14px;
    color: #b8b8b2;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

.login-intro h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(48px, 7vw, 104px);
    font-weight: 500;
    line-height: 0.95;
}

.product-summary {
    max-width: 590px;
    margin: 28px 0 0;
    color: #c9c9c4;
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.55;
}

.login-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 70px 48px 56px;
    background: #ffffff;
    border-left: 1px solid #d7d7d2;
    overflow-y: auto;
}

.access-shell {
    width: min(100%, 520px);
}

.access-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 44px;
    margin-bottom: 38px;
    border: 1px solid #8b8b86;
    border-radius: 4px;
}

.access-tabs a {
    display: grid;
    place-items: center;
    color: #30302e;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.access-tabs a + a {
    border-left: 1px solid #8b8b86;
}

.access-tabs a.active {
    color: #ffffff;
    background: #1e3d32;
}

.login-form {
    width: 100%;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 34px;
    color: #30302e;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.login-back-link:hover {
    text-decoration: underline;
}

.login-back-link svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-heading {
    margin-bottom: 32px;
}

.form-heading h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 500;
    line-height: 1.15;
}

.form-heading p {
    margin: 0;
    color: #686863;
    font-size: 14px;
    line-height: 1.5;
}

.form-field {
    margin-bottom: 22px;
}

.form-field label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 500;
}

.form-field > input,
.form-field > select,
.password-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    color: #111111;
    background: #ffffff;
    border: 1px solid #8b8b86;
    border-radius: 4px;
    outline: none;
    appearance: none;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 52px;
}

.form-field > input:focus,
.form-field > select:focus,
.password-input-wrap input:focus {
    border-color: #111111;
    box-shadow: 0 0 0 2px #111111;
}

.form-field.has-error > input,
.form-field.has-error > select,
.form-field.has-error .password-input-wrap input {
    border-color: #b42318;
    box-shadow: 0 0 0 1px #b42318;
}

.form-field.has-error > input:focus,
.form-field.has-error > select:focus,
.form-field.has-error .password-input-wrap input:focus {
    border-color: #b42318;
    box-shadow: 0 0 0 2px #b42318;
}

.visibility-button {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: #444440;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.visibility-button:hover {
    background: #edede9;
}

.visibility-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visibility-button .eye-closed,
.visibility-button.showing .eye-open {
    display: none;
}

.visibility-button.showing .eye-closed {
    display: block;
}

.field-help,
.form-message,
.field-error {
    margin: 9px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.field-help {
    color: #73736e;
}

.form-message {
    color: #a1261d;
}

.field-error {
    color: #b42318;
}

.form-error {
    margin: -12px 0 24px;
    padding: 11px 13px;
    background: #fff1ef;
    border-left: 3px solid #a1261d;
}

.portal-notice {
    margin: -12px 0 24px;
    padding: 11px 13px;
    color: #3f4b42;
    background: #eef4ef;
    border-left: 3px solid #557361;
}

.portal-privacy {
    margin: 4px 0 0;
    padding: 16px;
    color: #343a35;
    background: #f1f4f1;
    border: 1px solid #c6cec8;
    border-radius: 4px;
}

.portal-privacy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.portal-privacy p {
    margin: 0;
    color: #606660;
    font-size: 12px;
    line-height: 1.55;
}

.portal-form .submit-button[disabled] {
    color: #d4d4d0;
    background: #555550;
    border-color: #555550;
    cursor: wait;
}

.form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    min-width: 0;
    margin: 0 0 28px;
    padding: 22px 0 4px;
    border: 0;
    border-top: 1px solid #d7d7d2;
}

.form-section.has-error {
    border-top-color: #b42318;
}

.form-section.has-error .consent-control {
    color: #8f1d14;
}

.form-section legend {
    padding: 0 12px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.placeholder-copy,
.consent-control,
.full-width {
    grid-column: 1 / -1;
}

.placeholder-copy {
    margin: 0 0 17px;
    color: #686863;
    font-size: 13px;
    line-height: 1.55;
}

.consent-control {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.consent-control input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #1e3d32;
}

.registration-form .submit-button {
    margin-top: 4px;
}

.invitation-verified {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 30px;
    padding: 13px 14px;
    color: #173e30;
    background: #eef7f2;
    border: 1px solid #8eaf9f;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.invitation-verified span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.invitation-verified span svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.invitation-verified button {
    padding: 3px 0;
    color: #173e30;
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 52px;
    margin-top: 28px;
    padding: 0 16px 0 18px;
    color: #ffffff;
    background: #111111;
    border: 1px solid #111111;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.submit-button:hover {
    background: #30302e;
}

.submit-button:focus-visible,
.visibility-button:focus-visible,
.login-back-link:focus-visible,
.access-tabs a:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

.submit-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.consent-modal-open {
    overflow: hidden;
}

.consent-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 16, 16, 0.68);
}

.consent-modal-backdrop[hidden] {
    display: none;
}

.consent-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(820px, 100%);
    height: min(880px, calc(100dvh - 48px));
    min-height: 0;
    color: #20201e;
    background: #ffffff;
    border: 1px solid #6e6e69;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.consent-modal-header {
    padding: 24px 30px 20px;
    border-bottom: 1px solid #d7d7d2;
}

.consent-modal-header > p {
    margin: 0 0 8px;
    color: #1e3d32;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.consent-modal-header h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 500;
    line-height: 1.18;
}

.consent-study-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 18px 0 0;
}

.consent-study-meta div {
    min-width: 0;
}

.consent-study-meta dt {
    margin-bottom: 4px;
    color: #686863;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.consent-study-meta dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.consent-modal-content {
    min-height: 0;
    padding: 8px 30px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.consent-modal-content:focus-visible {
    outline: 2px solid #1e3d32;
    outline-offset: -4px;
}

.consent-modal-content section {
    padding-top: 20px;
}

.consent-modal-content section + section {
    margin-top: 20px;
    border-top: 1px solid #e4e4df;
}

.consent-modal-content h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.35;
}

.consent-modal-content p {
    margin: 0 0 11px;
    color: #42423e;
    font-size: 14px;
    line-height: 1.65;
}

.consent-modal-content p:last-child {
    margin-bottom: 0;
}

.consent-modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 20px;
    align-items: end;
    padding: 20px 30px 24px;
    background: #f3f3f0;
    border-top: 1px solid #b8bab4;
}

.consent-decision {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.consent-decision legend {
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.consent-options {
    display: flex;
    gap: 22px;
    margin-top: 13px;
}

.consent-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.consent-options input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1e3d32;
}

.consent-continue-button {
    height: 46px;
    padding: 0 18px;
    color: #ffffff;
    background: #111111;
    border: 1px solid #111111;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.consent-continue-button:hover {
    background: #30302e;
}

.consent-continue-button:focus-visible,
.consent-options input:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}

@media (max-width: 820px) {
    .login-page {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, 36vh) minmax(0, 1fr);
    }

    .login-intro {
        align-items: flex-end;
        padding: 40px 28px;
    }

    .brand-mark {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }

    .brand-mark span {
        width: 13px;
        height: 13px;
    }

    .brand-mark span:nth-child(1) {
        left: 20px;
    }

    .brand-mark span:nth-child(2),
    .brand-mark span:nth-child(3) {
        top: 20px;
    }

    .brand-mark span:nth-child(4) {
        left: 10px;
    }

    .brand-mark span:nth-child(5) {
        right: 10px;
    }

    .login-intro h1 {
        font-size: clamp(44px, 13vw, 72px);
    }

    .product-summary {
        margin-top: 18px;
        font-size: 16px;
    }

    .login-panel {
        align-items: flex-start;
        height: 100%;
        padding: 46px 28px 60px;
        border-top: 1px solid #d7d7d2;
        border-left: 0;
    }

    .manager-entry {
        top: 18px;
        right: 18px;
    }
}

@media (max-width: 520px) {
    .access-tabs a {
        font-size: 12px;
    }

    .login-intro {
        display: block;
    }

    .brand-mark {
        margin-bottom: 28px;
    }

    .product-summary {
        max-width: 34ch;
    }

    .form-section {
        grid-template-columns: 1fr;
    }

    .placeholder-copy,
    .consent-control,
    .full-width {
        grid-column: 1;
    }

    .consent-modal-backdrop {
        padding: 0;
    }

    .consent-modal {
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .consent-modal-header {
        padding: 20px 20px 16px;
    }

    .consent-study-meta {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 14px;
    }

    .consent-modal-content {
        padding: 4px 20px 24px;
    }

    .consent-modal-footer {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px 20px 18px;
    }

    .consent-continue-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
