:root {
    --navy: #003366;
    --blue: #007bff;
    --red: #cc0000;
    --ink: #253347;
    --muted: #617080;
    --line: #d9e2eb;
    --surface: #ffffff;
    --wash: #f2f8fc;
    --warning-bg: #fff7dd;
    --warning-line: #e6bd45;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(rgba(242, 248, 252, .93), rgba(242, 248, 252, .93)), url('../images/hospital_background.jpg') center / cover fixed;
    font-family: Arial, sans-serif;
}

.waiver-shell {
    width: min(100% - 32px, 980px);
    margin: 32px auto;
    padding: clamp(24px, 5vw, 56px);
    background: rgba(255, 255, 255, .97);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 51, 102, .16);
}

.back-link { color: var(--navy); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--red); text-decoration: underline; }

.waiver-hero, .form-heading { text-align: center; max-width: 740px; margin: 28px auto 32px; }
.waiver-hero img { width: min(100%, 300px); height: auto; margin-bottom: 16px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { color: var(--navy); }
h1 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.12; }
h2 { margin-top: 0; }
p { color: var(--muted); line-height: 1.65; }

.preview-notice { display: grid; gap: 6px; margin: 24px 0 36px; padding: 18px 20px; color: #624d0b; background: var(--warning-bg); border-left: 5px solid var(--warning-line); border-radius: 8px; }
.preview-notice strong { font-size: 1rem; }

.choice-grid, .attachment-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 22px rgba(0, 51, 102, .06); }
.choice-card h2 { margin: 16px 0 8px; font-size: 1.5rem; }
.choice-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: var(--navy); border-radius: 50%; font-weight: 800; }
.primary-action { display: inline-block; margin-top: 12px; padding: 11px 16px; color: #fff; background: var(--blue); border-radius: 7px; font-weight: 700; text-decoration: none; }
.primary-action:hover { background: #005fc4; }

.what-happens, .next-step { margin-top: 38px; padding: 28px; background: var(--wash); border-radius: 12px; }
.what-happens ol { margin: 0; padding-left: 22px; }
.what-happens li { margin: 12px 0; line-height: 1.55; }

.waiver-preview-form { display: grid; gap: 22px; }
fieldset { margin: 0; padding: 26px; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 8px; color: var(--navy); font-size: 1.25rem; font-weight: 800; }
.field-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 7px; color: var(--ink); font-size: .92rem; font-weight: 700; }
label span { color: var(--muted); font-size: .82rem; font-weight: 400; }
input { width: 100%; min-height: 44px; padding: 10px 12px; color: #687583; border: 1px solid #cfd9e3; border-radius: 6px; background: #f3f6f8; font: inherit; }
input:disabled { cursor: not-allowed; opacity: 1; }
.full-width { grid-column: 1 / -1; }
.program-options { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.program-options label { display: flex; align-items: center; gap: 8px; }
.program-options input { width: auto; min-height: auto; }

.attachment-section { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.attachment-section h2 { margin-bottom: 8px; }
.attachment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.attachment-card { display: grid; gap: 6px; min-height: 142px; padding: 18px; border: 1px dashed #9cb5ca; border-radius: 10px; background: var(--surface); }
.attachment-card strong { color: var(--navy); }
.attachment-card span { color: var(--muted); font-size: .9rem; }
.attachment-card em { align-self: end; color: #7c8b99; font-size: .8rem; font-style: normal; }

.privacy-consent { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.privacy-consent h2 { margin-bottom: 8px; }
.privacy-download { display: inline-block; margin: 4px 0 20px; color: var(--navy); font-weight: 800; }
.privacy-download:hover { color: var(--red); }
.consent-check { display: flex; align-items: flex-start; gap: 10px; padding: 16px; color: #596979; border: 1px solid #d7e0e8; border-radius: 8px; background: #f3f6f8; font-weight: 600; }
.consent-check input { flex: 0 0 auto; width: 18px; min-height: 18px; margin-top: 2px; }
.preview-consent { margin: 12px 0 0; color: #7c8b99; font-size: .88rem; }

@media (max-width: 700px) {
    .waiver-shell { width: 100%; margin: 0; border-radius: 0; }
    .choice-grid, .field-grid, .attachment-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
    fieldset, .attachment-section, .what-happens, .next-step { padding: 20px; }
}
