:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #18243a;
    background: #f3f6fa;
    line-height: 1.55;
}

body { margin: 0; }
a { color: #134d76; }
h1, h2, p { margin-block-start: 0; }
h1 { margin-block-end: 0; line-height: 1.2; font-size: clamp(2rem, 5vw, 3rem); }
h2 { margin-block-end: 1rem; font-size: 1.25rem; }

.consent-shell { width: min(52rem, calc(100% - 2rem)); margin: 2.5rem auto; }
.consent-header { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.program { color: #245779; font-weight: 650; margin-block-end: .25rem; }
.language-picker { display: flex; gap: .25rem; padding: .25rem; border: 1px solid #c3d0dd; border-radius: .65rem; background: white; }
.language-picker a { padding: .4rem .8rem; border-radius: .4rem; text-decoration: none; }
.language-picker a[aria-current] { background: #174263; color: white; }
.preview-note { margin-block: 1.25rem; padding: .75rem 1rem; background: #e6eef6; border-radius: .5rem; }

.form-card { padding: clamp(1rem, 4vw, 1.75rem); margin-block: 1rem; background: white; border: 1px solid #d6dfe8; border-radius: .8rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; gap: 1rem; }
.field-grid label { display: grid; gap: .35rem; font-weight: 600; min-width: 0; }
.field-grid input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 2.8rem; padding: .5rem .65rem; font: inherit; font-weight: 400; border: 1px solid #8699ac; border-radius: .4rem; color: inherit; background: white; }
.prescriptions { margin: 1.25rem 0 0; padding: 0; border: 0; min-width: 0; }
.prescriptions legend { font-weight: 600; margin-block-end: .5rem; padding: 0; }
.prescription { display: flex; gap: .6rem; align-items: flex-start; padding-block: .5rem; cursor: pointer; }
.prescription input { margin: .25rem 0 0; inline-size: 1.1rem; block-size: 1.1rem; flex: none; accent-color: #174263; }
.policy p:last-child { margin-block-end: 0; }
.policy ul { padding-inline-start: 1.5rem; }
.reference { color: #465770; font-size: .9rem; }
:focus-visible { outline: 3px solid #006d91; outline-offset: 2px; }
[data-language="en"] span[lang="ar"],
[data-language="ar"] span[lang="en"] { display: none; }
#blazor-error-ui { display: none; }

.field-error { display: block; color: #a42226; font-size: .9rem; font-weight: 500; }
.field-grid input[aria-invalid="true"] { border-color: #a42226; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-block-start: 1rem; }
.preview-actions button { padding: .65rem 1.3rem; border: 0; border-radius: .4rem; font: inherit; font-weight: 650; background: #174263; color: white; cursor: pointer; }
.preview-actions button:disabled { opacity: .6; cursor: default; }
.preview-result { margin: 0; }
[data-submit-invalid] { color: #a42226; }
[data-submit-valid] { color: #216244; }

.consent-shell--branded { width: 100%; margin-block-start: 0; }
.consent-shell--branded > :not(.consent-top),
.consent-shell--branded .consent-header {
    box-sizing: border-box;
    width: min(52rem, calc(100% - 2rem));
    margin-inline: auto;
}
.consent-shell--branded .consent-top {
    position: sticky;
    inset-block-start: 0;
    z-index: 10;
    background: #f3f6fa;
    box-shadow: 0 1px 0 #d6dfe8;
}
.merck-band {
    --merck-logo-base-width: 128px;
    min-block-size: calc(var(--merck-logo-base-width) * 41.5 / 261.5);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    direction: ltr;
    padding: .8rem max(1rem, calc((100% - 52rem) / 2));
    background: #0e69af;
}
.merck-band img { display: block; width: calc(var(--merck-logo-base-width) * .8); height: auto; }
.consent-shell--branded .consent-header { padding-block: .8rem; }
.consent-shell--branded form :focus { scroll-margin-block-start: 12rem; }

@media (max-width: 30rem) {
    .consent-shell--branded .consent-header { gap: .6rem; }
    .consent-shell--branded h1 { font-size: 1.6rem; }
    .merck-band { --merck-logo-base-width: 108px; }
}
