:root {
    color-scheme: light;
    --background: #f4f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #dbe3ec;
    --text: #172033;
    --text-muted: #5f6b7a;
    --primary: #2457d6;
    --primary-dark: #1944ae;
    --success: #147d55;
    --warning: #9a6700;
    --danger: #b42318;
    --shadow: 0 10px 30px rgba(24, 39, 75, 0.08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
}

main {
    width: min(960px, calc(100% - 32px));
    margin: 40px auto;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

h3 {
    font-size: 1rem;
}

p {
    color: var(--text-muted);
}

strong {
    color: var(--text);
}

section {
    margin: 20px 0;
    padding: 22px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}

fieldset {
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

legend {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

label {
    display: block;
    color: var(--text);
    font-weight: 500;
}

input[type="text"],
input[type="search"],
textarea,
select {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(36, 87, 214, 0.16);
    border-color: var(--primary);
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--primary);
    vertical-align: middle;
}

fieldset > p {
    margin: 10px 0;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

fieldset > p:has(input:checked) {
    border-color: var(--primary);
    background: #eef3ff;
}

button,
a[role="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
a[role="button"]:hover {
    background: var(--primary-dark);
}

button[value="completed"] {
    background: var(--success);
}

button[value="waiting"] {
    background: var(--warning);
}

a {
    color: var(--primary);
    font-weight: 600;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

nav a {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    text-decoration: none;
}

nav a:hover {
    border-color: var(--primary);
    background: #eef3ff;
}

table {
    width: 100%;
    border-spacing: 0;
    border-collapse: separate;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f6f8ff;
}

ul {
    padding-left: 22px;
}

li {
    margin: 7px 0;
}

form {
    display: grid;
    gap: 16px;
}

form button {
    justify-self: start;
}

@media (max-width: 720px) {
    main {
        width: min(100% - 20px, 960px);
        margin: 10px auto;
        padding: 20px;
    }

    section {
        padding: 16px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    button {
        width: 100%;
    }
}


/* Patient intake experience */

.patient-app {
    background:
        radial-gradient(
            circle at top left,
            rgba(36, 87, 214, 0.08),
            transparent 34rem
        ),
        var(--background);
}

.patient-header {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(36, 87, 214, 0.22);
}

.privacy-note {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.intake-shell {
    width: min(760px, calc(100% - 28px));
    margin: 22px auto 64px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.intake-card {
    padding: clamp(26px, 5vw, 48px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(24, 39, 75, 0.1);
}

.intake-card--welcome h1,
.question-heading h1 {
    max-width: 660px;
    margin: 8px 0 14px;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.035em;
}

.step-label {
    margin: 0;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.intro-copy,
.question-help {
    max-width: 640px;
    margin: 0 0 30px;
    color: var(--text-muted);
    font-size: 1.03rem;
}

.intake-form,
.question-form {
    display: block;
}

.story-field label {
    font-size: 0.94rem;
    font-weight: 750;
}

.story-field textarea {
    min-height: 170px;
    padding: 18px;
    border-radius: 13px;
    font-size: 1.02rem;
    line-height: 1.55;
}

.field-help {
    margin: 8px 2px 0;
    font-size: 0.84rem;
}

.choice-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 0 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.choice-divider::before,
.choice-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.selection-hint {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid #c9d6f2;
    border-radius: 13px;
    background: #f6f9ff;
    color: var(--text);
    font-size: 0.92rem;
}

.answer-grid,
.answer-list {
    display: grid;
    gap: 12px;
}

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

.answer-card {
    position: relative;
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    cursor: pointer;
    transition:
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.answer-card:hover {
    border-color: #9fb4e9;
    background: #f8faff;
    transform: translateY(-1px);
}

.answer-card:has(input:focus-visible) {
    outline: 3px solid rgba(36, 87, 214, 0.16);
    outline-offset: 2px;
}

.answer-card:has(input:checked) {
    border-color: var(--primary);
    background: #eef3ff;
    box-shadow: 0 0 0 1px var(--primary);
}

.answer-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.answer-card__indicator {
    display: inline-flex;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    align-items: center;
    justify-content: center;
    border: 2px solid #aeb9c7;
    border-radius: 50%;
    background: #ffffff;
}

.answer-card:has(input:checked)
.answer-card__indicator {
    border: 6px solid var(--primary);
}

.answer-card__text {
    color: var(--text);
    font-weight: 680;
}

.answer-card--stacked {
    align-items: flex-start;
}

.answer-card__content {
    display: grid;
    gap: 6px;
    flex: 1 1 auto;
}

.answer-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.answer-card__description {
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.answer-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e7efff;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.answer-card--large {
    min-height: 72px;
    padding: 17px 20px;
    font-size: 1.02rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.primary-action {
    gap: 10px;
    min-width: 150px;
    min-height: 50px;
    padding: 12px 22px;
    border-radius: 11px;
}

.patient-disclaimer {
    margin: 18px auto 0;
    text-align: center;
    font-size: 0.8rem;
}

.question-progress {
    margin-bottom: 36px;
}

.question-progress__labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 9px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.question-progress--staged {
    margin-bottom: 26px;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.progress-step {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.progress-step__marker {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #c8d3e2;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.progress-step__label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

.progress-step--complete {
    border-color: #bedfcd;
    background: #f2fbf6;
}

.progress-step--complete .progress-step__marker {
    border-color: var(--success);
    background: var(--success);
    color: #ffffff;
}

.progress-step--complete .progress-step__label,
.progress-step--current .progress-step__label {
    color: var(--text);
}

.progress-step--current {
    border-color: #b8caef;
    background: #f3f7ff;
    box-shadow: 0 0 0 1px rgba(36, 87, 214, 0.12);
}

.progress-step--current .progress-step__marker {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.question-heading {
    margin-bottom: 26px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    border: 0;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 620px) {
    .patient-header {
        width: min(100% - 24px, 1080px);
        padding: 15px 0;
    }

    .privacy-note {
        display: none;
    }

    .intake-shell {
        width: min(100% - 18px, 760px);
        margin-top: 8px;
    }

    .intake-card {
        padding: 24px 18px;
        border-radius: 17px;
    }

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

    .form-actions {
        justify-content: stretch;
    }

    .primary-action {
        width: 100%;
    }

    .question-progress {
        margin-bottom: 28px;
    }

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


.form-actions--split {
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.secondary-action {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.secondary-action:hover {
    border-color: var(--primary);
    background: #f5f8ff;
}

.answer-card input[type="checkbox"]
+ .answer-card__indicator {
    border-radius: 6px;
}

.answer-card:has(input[type="checkbox"]:checked)
.answer-card__indicator {
    position: relative;
    border: 2px solid var(--primary);
    background: var(--primary);
}

.answer-card:has(input[type="checkbox"]:checked)
.answer-card__indicator::after {
    content: "✓";
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
}

@media (max-width: 620px) {
    .form-actions--split {
        flex-direction: column-reverse;
    }

    .secondary-action {
        width: 100%;
    }
}


.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
}


/* Patient review and submission */

.review-card h1,
.submitted-card h1 {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.035em;
}

.review-highlight {
    display: grid;
    gap: 4px;
    margin: 26px 0;
    padding: 20px;
    border: 1px solid #b9c9ee;
    border-radius: 15px;
    background: #f3f6ff;
}

.review-label {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.review-highlight strong {
    font-size: 1.15rem;
}

.review-subtext {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.review-section {
    margin: 18px 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.review-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.review-section__header h2 {
    margin: 0;
}

.patient-story {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-muted);
    color: var(--text);
}

.review-list {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.review-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 22px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.review-row:last-child {
    border-bottom: 0;
}

.review-row dt {
    color: var(--text-muted);
    font-weight: 600;
}

.review-row dd {
    margin: 0;
    color: var(--text);
    font-weight: 750;
}

.review-alert {
    border-color: #efc86c;
    background: #fff8e7;
}

.review-alert p {
    margin-bottom: 0;
}

.review-submit-form {
    display: block;
    margin-top: 28px;
}

.review-submit {
    width: 100%;
    min-height: 56px;
}

.review-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
}

.text-action {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.text-action:hover {
    text-decoration: underline;
}

.text-action--danger {
    color: var(--danger);
}

.submitted-card {
    text-align: center;
}

.submitted-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #e8f7f0;
    color: var(--success);
    font-size: 2rem;
    font-weight: 900;
}

.submitted-card .intro-copy {
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 620px) {
    .review-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .review-section__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .review-secondary-actions {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Provider encounter lifecycle */

.queue-actions,
.provider-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.queue-actions form,
.provider-action-row form,
.provider-actions > form {
    display: inline-flex;
    margin: 0;
}

.queue-actions button,
.queue-actions a {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.84rem;
    white-space: nowrap;
}

.provider-actions {
    border-color: #b9c9ee;
    background: #f5f7ff;
}

.danger-action {
    background: var(--danger);
}

.danger-action:hover {
    background: #8f1b13;
}

@media (max-width: 720px) {
    .queue-actions {
        min-width: 210px;
    }

    .provider-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .provider-action-row a,
    .provider-action-row button,
    .provider-action-row form {
        width: 100%;
    }
}


/* Intake category groups */

.category-groups {
    display: grid;
    gap: 24px;
}

.category-group {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface-muted);
}

.category-group__heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.category-group__heading h2 {
    margin: 1px 0 4px;
    font-size: 1.08rem;
}

.category-group__heading p {
    margin: 0;
    font-size: 0.88rem;
}

.category-group__icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: #e8efff;
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 900;
}

.category-group .answer-card {
    background: var(--surface);
}

@media (max-width: 620px) {
    .category-group {
        padding: 17px 14px;
    }
}


/* Patient registration */

.registration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0;
}

.registration-grid--nested {
    margin: 18px 0 0;
}

.form-section-stack {
    display: grid;
    gap: 18px;
}

.form-panel {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-muted);
}

.form-panel__header {
    display: grid;
    gap: 5px;
}

.form-panel__header h2 {
    margin: 0;
    font-size: 1.08rem;
}

.form-panel__header p {
    margin: 0;
    font-size: 0.86rem;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field > span {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(36, 87, 214, 0.14);
}

.form-error {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #e5a8a3;
    border-radius: 10px;
    background: #fff1f0;
    color: #8f1b13;
    font-weight: 700;
}

@media (max-width: 680px) {
    .registration-grid {
        grid-template-columns: 1fr;
    }

    .form-panel {
        padding: 18px 16px;
    }

    .form-field--full {
        grid-column: auto;
    }
}


/* Provider dashboard */

.provider-app {
    min-height: 100vh;
    margin: 0;
    background: #f5f7fb;
    color: #172033;
}

.provider-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 248px;
    box-sizing: border-box;
    flex-direction: column;
    padding: 24px 18px;
    border-right: 1px solid #e2e7f0;
    background: #ffffff;
}

.provider-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 26px;
    color: #172033;
    text-decoration: none;
}

.provider-brand__logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.provider-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 800;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-brand__logo {
    width: clamp(38px, 10vw, 52px);
    height: auto;
    aspect-ratio: 986 / 982;
    object-fit: contain;
}

.provider-brand span {
    display: grid;
    gap: 2px;
}

.provider-brand strong {
    font-size: 1.08rem;
}

.provider-brand small,
.provider-sidebar__footer small {
    color: #7b8497;
    font-size: 0.75rem;
}

.provider-nav {
    display: grid;
    gap: 6px;
}

.provider-nav a {
    display: flex;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    color: #596275;
    font-size: 0.91rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 140ms ease,
        color 140ms ease;
}

.provider-nav a:hover {
    background: #f3f6fc;
    color: #2457d6;
}

.provider-nav a.active {
    background: #edf2ff;
    color: #2457d6;
}

.provider-nav a strong {
    display: grid;
    min-width: 25px;
    height: 25px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #e7ebf4;
    color: #586174;
    font-size: 0.72rem;
}

.provider-nav a.active strong {
    background: #2457d6;
    color: #ffffff;
}

.provider-sidebar__footer {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding: 18px 10px 0;
    border-top: 1px solid #edf0f5;
    color: #586174;
    font-size: 0.8rem;
}

.provider-dashboard {
    min-height: 100vh;
    box-sizing: border-box;
    margin-left: 248px;
    padding: 34px 38px 60px;
}

.provider-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.provider-eyebrow {
    margin: 0 0 7px;
    color: #2457d6;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.provider-topbar h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    letter-spacing: -0.035em;
}

.provider-topbar p:not(.provider-eyebrow) {
    margin: 7px 0 0;
    color: #737d91;
}

.provider-topbar__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    padding: 9px 12px;
    border: 1px solid #dfe5ee;
    border-radius: 999px;
    background: #ffffff;
    color: #536075;
    font-size: 0.78rem;
    font-weight: 700;
}

.system-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24a46d;
    box-shadow: 0 0 0 4px rgba(36, 164, 109, 0.12);
}

.provider-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 22px;
}

.provider-stat-card {
    display: grid;
    gap: 5px;
    padding: 19px;
    border: 1px solid #e0e6ef;
    border-radius: 14px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(25, 42, 70, 0.035);
    transition:
        border-color 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.provider-stat-card:hover {
    border-color: #aebee8;
    box-shadow: 0 12px 30px rgba(25, 42, 70, 0.075);
    transform: translateY(-1px);
}

.provider-stat-card span {
    color: #657086;
    font-size: 0.8rem;
    font-weight: 750;
}

.provider-stat-card strong {
    color: #172033;
    font-size: 1.75rem;
    line-height: 1;
}

.provider-stat-card small {
    color: #939bad;
    font-size: 0.73rem;
}

.provider-panel {
    overflow: visible;
    border: 1px solid #e0e6ef;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(25, 42, 70, 0.04);
}

.provider-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    align-items: end;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #edf0f5;
}

.provider-search input,
.provider-filter select {
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #d8deea;
    border-radius: 9px;
    background: #ffffff;
    color: #172033;
    font: inherit;
}

.provider-search input {
    width: 100%;
    padding: 10px 13px;
}

.provider-filter {
    display: grid;
    gap: 5px;
}

.provider-filter span {
    color: #687287;
    font-size: 0.72rem;
    font-weight: 750;
}

.provider-filter select {
    min-width: 165px;
    padding: 9px 32px 9px 11px;
}

.provider-search input:focus,
.provider-filter select:focus {
    border-color: #2457d6;
    outline: 3px solid rgba(36, 87, 214, 0.12);
}

.provider-filter-button,
.provider-clear-button {
    display: inline-grid;
    min-height: 44px;
    box-sizing: border-box;
    place-items: center;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
}

.provider-filter-button {
    border: 0;
    background: #2457d6;
    color: #ffffff;
    cursor: pointer;
}

.provider-clear-button {
    border: 1px solid #d8deea;
    background: #ffffff;
    color: #536075;
}

.provider-table-wrap {
    overflow-x: auto;
}

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

.provider-table th {
    padding: 13px 16px;
    border-bottom: 1px solid #e7ebf2;
    background: #fafbfc;
    color: #788296;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
}

.provider-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf0f5;
    vertical-align: middle;
}

.provider-table tbody tr:last-child td {
    border-bottom: 0;
}

.provider-table tbody tr:hover {
    background: #fbfcff;
}

.patient-identity {
    display: flex;
    min-width: 185px;
    align-items: center;
    gap: 11px;
}

.patient-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: #eaf0ff;
    color: #2457d6;
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.patient-identity > span:last-child,
.encounter-concern {
    display: grid;
    gap: 3px;
}

.patient-identity strong,
.encounter-concern strong {
    color: #172033;
    font-size: 0.85rem;
}

.patient-identity small,
.encounter-concern small,
.encounter-time {
    color: #818a9c;
    font-size: 0.72rem;
}

.priority-badge,
.encounter-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    white-space: nowrap;
}

.priority-badge--routine {
    background: #eef2f7;
    color: #667085;
}

.priority-badge--same_day_review {
    background: #fff4d8;
    color: #8a5a00;
}

.priority-badge--immediate_review {
    background: #ffe9dc;
    color: #9a3c09;
}

.priority-badge--emergency {
    background: #ffe5e3;
    color: #b42318;
}

.encounter-status--waiting {
    background: #eef2ff;
    color: #4355a7;
}

.encounter-status--in_progress {
    background: #e5f4ff;
    color: #12628d;
}

.encounter-status--completed {
    background: #e5f7ef;
    color: #17704a;
}

.encounter-status--archived {
    background: #eff1f4;
    color: #697386;
}

.provider-row-actions {
    position: relative;
    display: flex;
    min-width: 150px;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.provider-row-actions form {
    margin: 0;
}

.provider-view-button,
.provider-primary-row-action {
    display: inline-grid;
    min-height: 34px;
    box-sizing: border-box;
    place-items: center;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.provider-view-button {
    border: 1px solid #d7deea;
    background: #ffffff;
    color: #536075;
}

.provider-primary-row-action {
    border: 0;
    background: #2457d6;
    color: #ffffff;
    cursor: pointer;
}

.provider-more-menu {
    position: relative;
}

.provider-more-menu summary {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #d7deea;
    border-radius: 8px;
    background: #ffffff;
    color: #687287;
    cursor: pointer;
    list-style: none;
    font-weight: 900;
}

.provider-more-menu summary::-webkit-details-marker {
    display: none;
}

.provider-more-menu__panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(25, 42, 70, 0.15);
}

.provider-more-menu__panel a,
.provider-more-menu__panel button {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 0;
    background: #ffffff;
    color: #485469;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.provider-more-menu__panel a:hover,
.provider-more-menu__panel button:hover {
    background: #f6f8fb;
}

.provider-more-menu__panel .provider-delete-link {
    color: #b42318;
}

.provider-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border-top: 1px solid #edf0f5;
    color: #788296;
    font-size: 0.75rem;
}

.provider-pagination div {
    display: flex;
    gap: 8px;
}

.provider-pagination a {
    padding: 7px 10px;
    border: 1px solid #d8deea;
    border-radius: 7px;
    color: #536075;
    font-weight: 700;
    text-decoration: none;
}

.provider-empty-state {
    display: grid;
    place-items: center;
    padding: 72px 24px;
    text-align: center;
}

.provider-empty-state > div {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    background: #e8f7f0;
    color: #17704a;
    font-size: 1.5rem;
    font-weight: 900;
}

.provider-empty-state h2 {
    margin: 16px 0 6px;
}

.provider-empty-state p {
    max-width: 410px;
    margin: 0 0 16px;
    color: #7b8497;
}

.provider-empty-state a {
    color: #2457d6;
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .provider-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .provider-filter-bar {
        grid-template-columns: 1fr 180px;
    }

    .provider-filter-button,
    .provider-clear-button {
        width: 100%;
    }
}

@media (max-width: 820px) {
    .provider-sidebar {
        position: static;
        width: 100%;
        padding: 15px;
        border-right: 0;
        border-bottom: 1px solid #e2e7f0;
    }

    .provider-brand {
        padding-bottom: 14px;
    }

    .provider-nav {
        display: flex;
        overflow-x: auto;
    }

    .provider-nav a {
        flex: 0 0 auto;
    }

    .provider-sidebar__footer {
        display: none;
    }

    .provider-dashboard {
        margin-left: 0;
        padding: 24px 17px 44px;
    }
}

@media (max-width: 620px) {
    .provider-topbar {
        flex-direction: column;
    }

    .provider-stat-grid {
        grid-template-columns: 1fr;
    }

    .provider-filter-bar {
        grid-template-columns: 1fr;
    }

    .provider-filter select {
        width: 100%;
    }

    .provider-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Clinical encounter workspace */

.clinical-workspace-app {
    min-height: 100vh;
    margin: 0;
    background: #f4f6fa;
    color: #172033;
}

.clinical-workspace-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 70px;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 32px;
    border-bottom: 1px solid #e1e6ef;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.clinical-workspace-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #172033;
    text-decoration: none;
}

.clinical-workspace-brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.clinical-workspace-brand span {
    display: grid;
    gap: 1px;
}

.clinical-workspace-brand strong {
    font-size: 1rem;
}

.clinical-workspace-brand small {
    color: #7b8496;
    font-size: 0.7rem;
}

.clinical-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clinical-back-link {
    padding: 8px 11px;
    border: 1px solid #d8deea;
    border-radius: 8px;
    color: #536075;
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.clinical-workspace {
    display: grid;
    width: min(1380px, calc(100% - 42px));
    margin: 28px auto 70px;
    gap: 18px;
}

.clinical-patient-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px;
    border: 1px solid #dde4ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(25, 42, 70, 0.045);
}

.clinical-patient-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clinical-patient-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border-radius: 17px;
    background: #e9efff;
    color: #2457d6;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
}

.clinical-eyebrow {
    margin: 0 0 5px;
    color: #647089;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.clinical-patient-banner h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    letter-spacing: -0.035em;
}

.clinical-patient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin-top: 7px;
    color: #778195;
    font-size: 0.76rem;
}

.clinical-banner-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.clinical-banner-actions form {
    margin: 0;
}

.clinical-primary-action,
.clinical-secondary-action {
    display: inline-grid;
    min-height: 41px;
    box-sizing: border-box;
    place-items: center;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.clinical-primary-action {
    border: 0;
    background: #2457d6;
    color: #ffffff;
    cursor: pointer;
}

.clinical-secondary-action {
    border: 1px solid #d7deea;
    background: #ffffff;
    color: #536075;
}

.clinical-safety-banner {
    padding: 17px 20px;
    border: 1px solid;
    border-radius: 14px;
}

.clinical-safety-banner > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 16px;
}

.clinical-safety-banner strong {
    font-size: 0.86rem;
}

.clinical-safety-banner span,
.clinical-safety-banner li {
    font-size: 0.77rem;
}

.clinical-safety-banner ul {
    margin: 11px 0 0;
}

.clinical-safety-banner--same_day_review {
    border-color: #efcc76;
    background: #fff8e5;
    color: #75510a;
}

.clinical-safety-banner--immediate_review {
    border-color: #e9ad82;
    background: #fff0e5;
    color: #873c11;
}

.clinical-safety-banner--emergency {
    border-color: #e59b95;
    background: #ffebe9;
    color: #912018;
}

.clinical-summary-grid,
.clinical-two-column {
    display: grid;
    gap: 18px;
}

.clinical-summary-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
}

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

.clinical-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid #dfe5ee;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(25, 42, 70, 0.035);
}

.clinical-card--primary {
    border-top: 3px solid #2457d6;
}

.clinical-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.clinical-card-heading h2,
.clinical-governance-card h2 {
    margin: 0;
    color: #172033;
    font-size: 1.08rem;
    letter-spacing: -0.015em;
}

.clinical-patient-story {
    margin: 0 0 18px;
    padding: 16px 18px;
    border-left: 3px solid #7d99e7;
    border-radius: 0 10px 10px 0;
    background: #f5f7fc;
    color: #354056;
    font-size: 0.9rem;
    line-height: 1.6;
}

.clinical-muted,
.clinical-empty-copy {
    color: #858ea1;
    font-size: 0.79rem;
}

.clinical-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.clinical-fact-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e7ebf2;
    border-radius: 10px;
    background: #fafbfc;
}

.clinical-fact-grid dt,
.clinical-metric-list dt,
.clinical-detail-list dt,
.clinical-governance-facts dt {
    margin-bottom: 4px;
    color: #7d879a;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.clinical-fact-grid dd,
.clinical-metric-list dd,
.clinical-detail-list dd,
.clinical-governance-facts dd {
    overflow-wrap: anywhere;
    margin: 0;
    color: #283348;
    font-size: 0.79rem;
    font-weight: 700;
}

.clinical-completion-score {
    color: #2457d6;
    font-size: 1.45rem;
}

.clinical-progress-track {
    height: 8px;
    overflow: hidden;
    margin-bottom: 17px;
    border-radius: 999px;
    background: #e9edf4;
}

.clinical-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2457d6;
}

.clinical-metric-list,
.clinical-detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.clinical-metric-list div,
.clinical-detail-list div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f5;
}

.clinical-metric-list div:last-child,
.clinical-detail-list div:last-child {
    border-bottom: 0;
}

.clinical-metric-list dd,
.clinical-detail-list dd {
    max-width: 65%;
    text-align: right;
}

.clinical-count-badge {
    display: grid;
    min-width: 27px;
    height: 27px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef2f8;
    color: #5e697d;
    font-size: 0.7rem;
    font-weight: 850;
}

.clinical-finding-list,
.clinical-check-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clinical-finding-list li,
.clinical-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #39455a;
    font-size: 0.79rem;
    line-height: 1.5;
}

.clinical-finding-list li > span,
.clinical-check-list li > span {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    place-items: center;
    border-radius: 6px;
    background: #e6f6ee;
    color: #187149;
    font-size: 0.73rem;
    font-weight: 900;
}

.clinical-finding-list--negative li > span {
    background: #edf1f7;
    color: #657086;
}

.clinical-finding-list--uncertain li > span {
    background: #fff2d5;
    color: #8a5a00;
}

.clinical-warning-box,
.clinical-success-box {
    display: grid;
    gap: 7px;
    padding: 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 0.78rem;
}

.clinical-warning-box {
    border-color: #ebc976;
    background: #fff8e7;
    color: #75510a;
}

.clinical-success-box {
    border-color: #a7dac2;
    background: #eefaf4;
    color: #176842;
}

.clinical-warning-box ul {
    margin: 3px 0 0;
    padding-left: 20px;
}

.clinical-subheading {
    margin: 21px 0 12px;
    color: #4b576d;
    font-size: 0.8rem;
}

.clinical-answer-list {
    display: grid;
    overflow: hidden;
    border: 1px solid #e3e8f0;
    border-radius: 11px;
}

.clinical-answer-item {
    border-bottom: 1px solid #e9edf3;
}

.clinical-answer-item:last-child {
    border-bottom: 0;
}

.clinical-answer-item summary {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(140px, 0.6fr);
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    cursor: pointer;
    list-style: none;
}

.clinical-answer-item summary::-webkit-details-marker {
    display: none;
}

.clinical-answer-item summary:hover {
    background: #fafbfc;
}

.clinical-answer-item summary > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 7px;
    background: #eef2fa;
    color: #536075;
    font-size: 0.67rem;
    font-weight: 850;
}

.clinical-answer-item summary strong {
    color: #364258;
    font-size: 0.78rem;
}

.clinical-answer-item summary small {
    color: #687287;
    font-size: 0.75rem;
    text-align: right;
}

.clinical-answer-item > div {
    padding: 5px 16px 14px 55px;
    background: #fafbfc;
    color: #606b80;
    font-size: 0.75rem;
}

.clinical-answer-item > div p {
    margin: 7px 0;
}

.clinical-governance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.clinical-governance-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 25px;
    margin: 0;
}

.clinical-governance-facts div {
    min-width: 100px;
}

.clinical-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 17px 20px;
    border: 1px solid #ebcac7;
    border-radius: 13px;
    background: #fff8f7;
}

.clinical-danger-zone > div {
    display: grid;
    gap: 4px;
}

.clinical-danger-zone strong {
    color: #8f2b24;
    font-size: 0.82rem;
}

.clinical-danger-zone span {
    color: #92706d;
    font-size: 0.73rem;
}

.clinical-danger-zone form {
    margin: 0;
}

.clinical-danger-zone button {
    padding: 9px 12px;
    border: 1px solid #d98f89;
    border-radius: 8px;
    background: #ffffff;
    color: #a22f27;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 920px) {
    .clinical-summary-grid,
    .clinical-two-column {
        grid-template-columns: 1fr;
    }

    .clinical-patient-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .clinical-banner-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 650px) {
    .clinical-workspace-header {
        padding: 10px 15px;
    }

    .clinical-workspace-brand small,
    .clinical-header-actions .encounter-status {
        display: none;
    }

    .clinical-workspace {
        width: min(100% - 24px, 1380px);
        margin-top: 13px;
    }

    .clinical-card,
    .clinical-patient-banner {
        padding: 17px;
    }

    .clinical-patient-identity {
        align-items: flex-start;
    }

    .clinical-patient-meta {
        flex-direction: column;
        gap: 4px;
    }

    .clinical-banner-actions,
    .clinical-banner-actions form,
    .clinical-primary-action,
    .clinical-secondary-action {
        width: 100%;
    }

    .clinical-fact-grid {
        grid-template-columns: 1fr;
    }

    .clinical-answer-item summary {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .clinical-answer-item summary small {
        grid-column: 2;
        text-align: left;
    }

    .clinical-answer-item > div {
        padding-left: 55px;
    }

    .clinical-governance-card,
    .clinical-danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }

    .clinical-governance-facts {
        justify-content: flex-start;
    }
}


/* Consent and acknowledgement */

.review-consent-intro {
    margin: 0 0 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.consent-list {
    display: grid;
    gap: 11px;
    margin-bottom: 22px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.consent-item:hover {
    border-color: #aebee8;
    background: #f8faff;
}

.consent-item input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.consent-item > span {
    display: grid;
    gap: 4px;
}

.consent-item strong {
    color: var(--text);
    font-size: 0.9rem;
}

.consent-item small {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}


/* Registration sections */

.registration-section-heading,
.registration-subsection {
    grid-column: 1 / -1;
}

.registration-section-heading {
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.registration-section-heading h2,
.registration-subsection h3 {
    margin: 0 0 5px;
    color: var(--text);
}

.registration-section-heading h2 {
    font-size: 1.15rem;
}

.registration-subsection h3 {
    font-size: 0.92rem;
}

.registration-section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.insurance-fields,
.secondary-insurance-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.insurance-fields[hidden],
.secondary-insurance-fields[hidden] {
    display: none;
}

@media (max-width: 680px) {
    .insurance-fields,
    .secondary-insurance-fields {
        grid-template-columns: 1fr;
    }
}


/* Minor patient guardian fields */

.guardian-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 18px;
    border: 1px solid #d8e1f0;
    border-radius: 12px;
    background: #f7f9fd;
}

.guardian-fields[hidden] {
    display: none;
}

.guardian-fields .registration-subsection p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

@media (max-width: 680px) {
    .guardian-fields {
        grid-template-columns: 1fr;
    }
}


/* Clinical summary transfer tools */

button.clinical-secondary-action {
    font: inherit;
    cursor: pointer;
}

@media print {
    .clinical-workspace-header,
    .clinical-banner-actions,
    .clinical-danger-zone,
    .clinical-governance-card {
        display: none !important;
    }

    .clinical-workspace-app {
        background: #ffffff;
    }

    .clinical-workspace {
        width: 100%;
        margin: 0;
    }

    .clinical-card,
    .clinical-patient-banner,
    .clinical-safety-banner {
        break-inside: avoid;
        box-shadow: none;
    }

    .clinical-answer-item > div {
        display: block;
    }
}


/* Patient priorities and accessibility */

.clinical-patient-priority,
.clinical-patient-request,
.clinical-accessibility-alert {
    display: grid;
    gap: 5px;
    margin: 0 0 13px;
    padding: 13px 15px;
    border-radius: 10px;
}

.clinical-patient-priority {
    border: 1px solid #b9caef;
    background: #f1f5ff;
    color: #263f78;
}

.clinical-patient-request {
    border: 1px solid #dce2ec;
    background: #f8f9fb;
    color: #445066;
}

.clinical-accessibility-alert {
    border: 1px solid #dcb7ea;
    background: #fbf3ff;
    color: #6b2d7e;
}

.clinical-patient-priority span,
.clinical-patient-request span,
.clinical-accessibility-alert span {
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.clinical-patient-priority strong,
.clinical-accessibility-alert strong {
    font-size: 0.82rem;
    line-height: 1.45;
}

.clinical-patient-request p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
}


/* Submitted intake reset */

.submitted-new-intake-form {
    margin: 25px 0 0;
}

.submitted-new-intake-form .primary-action {
    width: 100%;
}

.submitted-privacy-reminder {
    margin: 13px 0 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: center;
}


/* Provider task engine */

.provider-task-card {
    border-top: 3px solid #2457d6;
}

.provider-task-description {
    margin: 6px 0 0;
    color: #7a8497;
    font-size: 0.78rem;
}

.provider-task-percentage {
    color: #2457d6;
    font-size: 1.55rem;
    line-height: 1;
}

.provider-task-error {
    margin-bottom: 16px;
}

.provider-task-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.provider-task-summary div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    background: #fafbfc;
}

.provider-task-summary span {
    color: #7b8598;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.provider-task-summary strong {
    color: #273349;
    font-size: 0.9rem;
}

.provider-task-progress {
    height: 9px;
    overflow: hidden;
    margin-bottom: 17px;
    border-radius: 999px;
    background: #e8edf5;
}

.provider-task-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2457d6;
    transition: width 180ms ease;
}

.provider-task-list {
    display: grid;
    overflow: hidden;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
}

.provider-task-item {
    margin: 0;
    border-bottom: 1px solid #e8ecf2;
}

.provider-task-item:last-child {
    border-bottom: 0;
}

.provider-task-toggle {
    display: flex;
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    background: #ffffff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.provider-task-toggle:hover {
    background: #f8faff;
}

.provider-task-checkbox {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border: 2px solid #bdc7d8;
    border-radius: 7px;
    background: #ffffff;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
}

.provider-task-label {
    display: grid;
    gap: 3px;
}

.provider-task-label strong {
    color: #344057;
    font-size: 0.81rem;
}

.provider-task-label small {
    color: #818a9d;
    font-size: 0.68rem;
}

.provider-task-item--completed {
    background: #f6fbf8;
}

.provider-task-item--completed
.provider-task-checkbox {
    border-color: #25845b;
    background: #25845b;
}

.provider-task-item--completed
.provider-task-label strong {
    color: #657267;
    text-decoration: line-through;
}

.provider-task-ready {
    margin-top: 16px;
}

.provider-task-remaining {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #ead39a;
    border-radius: 10px;
    background: #fff9e9;
    color: #75510a;
}

.provider-task-remaining strong {
    font-size: 0.78rem;
}

.provider-task-remaining ul {
    display: grid;
    gap: 5px;
    margin: 9px 0 0;
    padding-left: 18px;
    font-size: 0.73rem;
}

@media (max-width: 650px) {
    .provider-task-summary {
        grid-template-columns: 1fr;
    }
}


/* Provider documentation */

.provider-documentation-card {
    border-top: 3px solid #4f6fb8;
}

.provider-notes-saved {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f7ef;
    color: #187149;
    font-size: 0.7rem;
    font-weight: 800;
}

.provider-note-error {
    margin-bottom: 16px;
}

.provider-documentation-form {
    display: grid;
    gap: 17px;
}

.provider-documentation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.provider-note-field {
    display: grid;
    gap: 7px;
}

.provider-note-field--full {
    grid-column: 1 / -1;
}

.provider-note-field > span {
    color: #3d485d;
    font-size: 0.74rem;
    font-weight: 800;
}

.provider-note-field textarea {
    width: 100%;
    min-height: 110px;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1px solid #d7deea;
    border-radius: 10px;
    background: #ffffff;
    color: #263249;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.5;
    resize: vertical;
}

.provider-note-field textarea:focus {
    border-color: #2457d6;
    outline: 3px solid rgba(36, 87, 214, 0.12);
}

.provider-documentation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 4px;
}

.provider-documentation-actions > span {
    color: #818a9c;
    font-size: 0.7rem;
}

@media (max-width: 760px) {
    .provider-documentation-grid {
        grid-template-columns: 1fr;
    }

    .provider-note-field--full {
        grid-column: auto;
    }

    .provider-documentation-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .provider-documentation-actions
    .clinical-primary-action {
        width: 100%;
    }
}


/* Clinical subtype clarification */

.choice-card-list {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.choice-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card-copy {
    display: grid;
    gap: 5px;
    padding: 16px 17px;
    border: 1px solid #dbe2ec;
    border-radius: 12px;
    background: #ffffff;
    transition:
        border-color 140ms ease,
        box-shadow 140ms ease,
        background 140ms ease;
}

.choice-card-copy strong {
    color: #263249;
    font-size: 0.88rem;
}

.choice-card-copy small {
    color: #747f92;
    font-size: 0.75rem;
    line-height: 1.45;
}

.choice-card:hover .choice-card-copy {
    border-color: #9eb2df;
    background: #f8faff;
}

.choice-card input:checked + .choice-card-copy {
    border-color: #2457d6;
    background: #f1f5ff;
    box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.choice-card input:focus-visible + .choice-card-copy {
    outline: 3px solid rgba(36, 87, 214, 0.2);
    outline-offset: 2px;
}
