:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17223b;
  background: #f4f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  /* Enel Brasil: verde, amarelo e azul, inspirados na bandeira nacional. */
  --navy: #002776;
  --navy-soft: #005ca9;
  --magenta: #00843d;
  --magenta-dark: #006b32;
  --cyan: #005ca9;
  --ink: #17223b;
  --muted: #5d6679;
  --line: #dfe3eb;
  --surface: #ffffff;
  --soft: #f4f6fa;
  --success: #087c5a;
  --warning: #8a4b00;
  --danger: #b42318;
  --focus: #005ca9;
  --radius: 18px;
  --shadow: 0 16px 48px rgba(7, 26, 58, 0.1);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--soft); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.08; letter-spacing: -0.045em; }
h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.18; letter-spacing: -0.025em; }
h3 { line-height: 1.25; }
p { line-height: 1.6; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.skip-link { position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 12px 16px; background: white; color: var(--navy); border-radius: 8px; transform: translateY(-160%); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.content-width { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin-bottom: 10px; color: var(--magenta); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #6de3ec; }
.icon { flex: 0 0 auto; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 6px; font-size: 1.28rem; letter-spacing: .03em; }
.brand small { font-size: .82rem; font-weight: 600; opacity: .72; }
.brand-mark { position: relative; width: 34px; height: 34px; display: inline-block; }
.brand-mark span { position: absolute; display: block; width: 22px; height: 8px; border-radius: 999px; transform-origin: center; }
.brand-mark span:nth-child(1) { background: #009739; transform: rotate(-42deg); left: 0; top: 7px; }
.brand-mark span:nth-child(2) { background: #005ca9; transform: rotate(42deg); right: 0; top: 7px; }
.brand-mark span:nth-child(3) { background: #ffdf00; transform: rotate(-5deg); left: 6px; bottom: 5px; }

.button { min-height: 48px; border: 1px solid transparent; border-radius: 12px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 750; cursor: pointer; text-decoration: none; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--magenta); color: #fff; box-shadow: 0 8px 22px rgba(212, 6, 95, .22); }
.button-primary:hover { background: var(--magenta-dark); }
.button-secondary { color: var(--navy); background: #fff; border-color: #cbd2df; }
.button-secondary:hover { background: #f7f8fb; border-color: #aab4c5; }
.button-ghost { background: transparent; color: var(--magenta-dark); padding-inline: 10px; box-shadow: none; }
.button-danger { color: #fff; background: var(--danger); }
.text-button { min-height: 44px; color: var(--navy); background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.notice, .error-summary { display: flex; align-items: flex-start; gap: 12px; border-radius: 12px; padding: 14px 16px; line-height: 1.45; }
.notice { margin-bottom: 24px; }
.notice-success { color: #075841; background: #eaf8f3; border: 1px solid #aadbc9; }
.notice-warning { color: #724000; background: #fff7e6; border: 1px solid #edcf93; }
.error-summary { margin-bottom: 24px; color: #8f1d14; background: #fff0ee; border: 1px solid #efb1ab; }
.error-summary strong { display: block; margin-bottom: 3px; }
.error-summary p { margin: 0; }

.intro { margin-bottom: 32px; color: var(--muted); }

/* Fields */
.field { margin-bottom: 22px; }
.field > label { display: inline-block; margin-bottom: 8px; color: var(--ink); font-size: .91rem; font-weight: 730; }
.required { color: var(--danger); }
.field-hint { margin: -4px 0 8px; color: var(--muted); font-size: .82rem; }
input, select, textarea { width: 100%; min-height: 48px; color: var(--ink); background: #fff; border: 1px solid #bfc7d4; border-radius: 10px; padding: 11px 13px; transition: border .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #8894a8; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(0, 95, 204, .16); }
.field-error input, .field-error select, .field-error textarea, input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.field-error-text { margin: 7px 0 0; display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: .82rem; font-weight: 650; }

/* Header and home */
.app-header { position: sticky; top: 0; z-index: 50; color: #fff; background: var(--navy); box-shadow: 0 4px 18px rgba(7, 26, 58, .18); }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.brand-button { color: #fff; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: -8px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-button { min-height: 44px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 7px; color: #fff; background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.header-button:hover { background: rgba(255,255,255,.09); }
.save-status { display: inline-flex; align-items: center; gap: 7px; margin-right: 10px; color: #b9c7dd; font-size: .82rem; }
.local-processing-badge { padding: 6px 9px; color: #dff9f2; background: rgba(0, 151, 57, .22); border: 1px solid rgba(109, 227, 236, .35); border-radius: 999px; font-size: .75rem; font-weight: 750; }
.hero-section { padding: 70px 0 76px; color: #fff; background: radial-gradient(circle at 84% 20%, rgba(0, 164, 189, .25), transparent 24%), linear-gradient(135deg, var(--navy), var(--navy-soft)); }
.hero-content { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero-content h1 { max-width: 760px; margin-bottom: 16px; }
.hero-content p:not(.eyebrow) { max-width: 650px; margin-bottom: 0; color: #c8d5e9; font-size: 1.04rem; }
.hero-stat { min-width: 172px; padding-left: 24px; display: flex; align-items: center; gap: 13px; border-left: 1px solid rgba(255,255,255,.25); }
.hero-stat strong { font-size: 2.8rem; line-height: 1; color: #6de3ec; }
.hero-stat span { color: #dce6f5; font-size: .85rem; line-height: 1.3; }
.home-content { padding: 0 0 80px; }
.home-content > .notice { margin-top: 28px; }
.test-card { position: relative; margin-top: -32px; padding: 28px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.test-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(var(--magenta), var(--cyan)); }
.test-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--magenta); background: #fff0f6; border-radius: 16px; }
.test-copy h2 { margin: 8px 0 6px; color: var(--navy); }
.test-copy > p { margin-bottom: 0; color: var(--muted); }
.draft-line { margin-top: 9px !important; display: flex; align-items: center; gap: 8px; color: #075841 !important; font-size: .86rem; font-weight: 700; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #0aa379; box-shadow: 0 0 0 4px #dff5ee; }
.test-actions { display: flex; gap: 10px; }
.status-badge { width: fit-content; display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; color: #596173; background: #edf0f5; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.status-active { color: #087052; background: #e1f6ef; }
.catalogue { padding-top: 70px; }
.section-heading { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; }
.section-heading h2 { margin-bottom: 0; color: var(--navy); font-size: 2rem; }
.catalogue-count { color: var(--muted); font-size: .85rem; }
.filters { margin-bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.search-field { position: relative; width: min(380px, 100%); }
.search-field .icon { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search-field input { padding-left: 44px; background: #fff; }
.filter-buttons { display: flex; gap: 7px; overflow-x: auto; padding: 3px; }
.filter-buttons button { min-height: 40px; white-space: nowrap; padding: 8px 14px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 700; }
.filter-buttons button:hover { color: var(--navy); background: #fff; }
.filter-buttons button.active { color: #fff; background: var(--navy); }
.document-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.document-card { position: relative; min-height: 260px; padding: 24px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 15px; transition: transform .16s, box-shadow .16s, border-color .16s; }
.document-card:hover { transform: translateY(-2px); border-color: #c0c8d5; box-shadow: 0 12px 28px rgba(7, 26, 58, .08); }
.document-number { position: absolute; top: 16px; right: 18px; color: #e2e6ed; font-size: 2.4rem; font-weight: 900; letter-spacing: -.05em; }
.document-icon { width: 48px; height: 48px; margin-bottom: 22px; display: grid; place-items: center; color: var(--magenta); background: #fff0f6; border-radius: 13px; }
.document-category { margin-bottom: 6px; color: var(--cyan); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.document-card h3 { margin: 0 0 6px; color: var(--navy); }
.document-card p { flex: 1; margin-bottom: 20px; color: var(--muted); font-size: .9rem; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #bbc3d0; border-radius: var(--radius); }
.empty-state .icon { margin: 0 auto 15px; color: var(--magenta); }
.empty-state h3 { color: var(--navy); margin-bottom: 6px; }

/* Form */
.form-page, .review-page, .complete-page { padding-top: 40px; padding-bottom: 80px; }
.breadcrumb { display: flex; gap: 9px; align-items: center; margin-bottom: 30px; color: var(--muted); font-size: .85rem; }
.breadcrumb button { min-height: 40px; padding: 4px; color: var(--magenta-dark); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.form-heading { margin-bottom: 35px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.form-heading h1 { margin-bottom: 10px; color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); }
.form-heading p:not(.eyebrow) { color: var(--muted); margin: 0; }
.test-label { padding: 9px 12px; color: #7a4300; background: #fff3d6; border: 1px solid #ebca80; border-radius: 9px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.stepper { position: relative; margin: 0 0 38px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--steps, 4), 1fr); }
.stepper::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: #d6dbe4; }
.stepper li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; color: #727b8d; }
.stepper li > span { width: 36px; height: 36px; display: grid; place-items: center; color: #6d7585; background: var(--soft); border: 2px solid #cbd1dc; border-radius: 50%; font-size: .82rem; font-weight: 800; }
.stepper li.current > span { color: #fff; background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 0 5px #ffe8f2; }
.stepper li.complete > span { color: #fff; background: var(--success); border-color: var(--success); }
.stepper li.current small, .stepper li.complete small { color: var(--navy); font-weight: 750; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.form-card, .help-card, .review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.form-card { min-height: 560px; padding: clamp(24px, 4vw, 46px); }
.step-kicker { margin-bottom: 8px; color: var(--magenta); font-size: .75rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.form-card h2 { margin-bottom: 9px; color: var(--navy); }
.step-intro { margin-bottom: 30px; color: var(--muted); }
.field-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.field-wide { grid-column: 1 / -1; }
.form-group { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.form-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-group-heading { margin-bottom: 22px; }
.form-group-heading h3 { margin: 0 0 5px; color: var(--navy); font-size: 1.08rem; }
.form-group-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.choice-field { min-width: 0; padding: 0; border: 0; }
.choice-field legend, .field-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: .91rem; font-weight: 730; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-option { position: relative; min-height: 46px; display: inline-flex; align-items: center; cursor: pointer; }
.choice-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-option span { min-height: 44px; padding: 10px 15px; display: inline-flex; align-items: center; color: var(--ink); background: #fff; border: 1px solid #bfc7d4; border-radius: 10px; font-weight: 650; }
.choice-option input:checked + span { color: #fff; background: var(--navy); border-color: var(--navy); }
.choice-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-field [aria-invalid="true"], .choice-grid[aria-invalid="true"] { padding: 6px; border: 1px solid var(--danger); border-radius: 12px; }
.official-label { color: #075841; background: #eaf8f3; border-color: #aadbc9; }
.document-card-active { border-color: #9ccdb2; box-shadow: 0 8px 24px rgba(0, 132, 61, .09); }
.document-card-active .document-icon { color: #00843d; background: #eaf8f3; }
.photo-field { min-width: 0; }
.help-card { position: sticky; top: 96px; padding: 24px; }
.help-icon { width: 44px; height: 44px; margin-bottom: 18px; display: grid; place-items: center; color: var(--cyan); background: #e7f8fa; border-radius: 12px; }
.help-card h2 { margin-bottom: 9px; color: var(--navy); font-size: 1.05rem; }
.help-card p { color: var(--muted); font-size: .86rem; }
.help-card hr { margin: 20px 0; border: 0; border-top: 1px solid var(--line); }
.help-card p:last-child { margin-bottom: 0; }
.form-actions { margin-top: 38px; padding-top: 24px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.check-list { display: grid; gap: 10px; }
.check-card { position: relative; min-height: 86px; padding: 18px; display: flex; align-items: flex-start; gap: 15px; border: 1px solid #cbd2dd; border-radius: 13px; cursor: pointer; }
.check-card:hover { border-color: var(--cyan); background: #f7fcfd; }
.check-card.invalid { border-color: var(--danger); }
.check-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.custom-check { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; color: transparent; border: 2px solid #9ca6b6; border-radius: 7px; }
.check-card input:focus-visible + .custom-check { outline: 3px solid var(--focus); outline-offset: 3px; }
.check-card input:checked + .custom-check { color: #fff; background: var(--success); border-color: var(--success); }
.check-card strong { display: block; margin: 2px 0 4px; color: var(--navy); }
.check-card small { color: var(--muted); line-height: 1.45; }
.upload-area { min-height: 150px; padding: 24px; display: grid !important; place-items: center; align-content: center; gap: 7px; color: var(--navy); background: #fbfcfe; border: 2px dashed #bdc5d2; border-radius: 13px; cursor: pointer; text-align: center; }
.upload-area:hover { background: #f4fbfc; border-color: var(--cyan); }
.upload-area .icon { color: var(--magenta); }
.upload-area span { color: var(--muted); font-size: .82rem; font-weight: 500; }
.image-preview { overflow: hidden; display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.image-preview img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; }
.image-preview strong { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signature-field { min-width: 0; margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; }
.signature-field legend { padding: 0 6px; color: var(--navy); font-weight: 750; }
.signature-mode { margin: 12px 0 16px; }
.signature-typed label { display: block; margin-bottom: 7px; font-size: .88rem; font-weight: 700; }
.signature-drawn canvas { width: 100%; height: 150px; display: block; touch-action: none; background: #fff; border: 2px dashed #aeb8c7; border-radius: 10px; }
.signature-drawn .button { margin-top: 9px; }
.signature-consent { margin-top: 16px; display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: .88rem; line-height: 1.45; cursor: pointer; }
.signature-consent input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--success); }
.signature-field[aria-invalid="true"] { border-color: var(--danger); }
.official-page-field { margin-bottom: 24px; }
.official-page { position: relative; width: 100%; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(7,26,58,.08); }
.official-page > img { width: 100%; height: auto; display: block; }
.official-check { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); min-width: 18px; min-height: 18px; transform: translate(-2px,-2px); display: grid; place-items: center; cursor: pointer; }
.official-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.official-check span[aria-hidden] { width: 100%; height: 100%; display: grid; place-items: center; color: transparent; background: rgba(255,255,255,.15); border: 2px solid transparent; border-radius: 3px; font: 900 20px/1 Arial,sans-serif; }
.official-check input:checked + span { color: #071a3a; background: rgba(255,255,255,.86); border-color: #d50057; }
.official-check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.image-choice-field { min-width: 0; padding: 0; border: 0; }
.image-choice-field > legend { margin-bottom: 12px; color: var(--ink); font-size: .91rem; font-weight: 730; }
.image-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.image-choice-card { position: relative; min-height: 190px; padding: 18px 14px 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; color: var(--ink); background: #fff; border: 1px solid #cbd2dd; border-radius: 13px; cursor: pointer; text-align: center; }
.image-choice-card:hover { border-color: var(--cyan); box-shadow: 0 6px 18px rgba(0,139,159,.10); }
.image-choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.image-choice-check { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; display: grid; place-items: center; color: transparent; background: #fff; border: 2px solid #919cab; border-radius: 6px; font-weight: 900; }
.image-choice-card input:checked + .image-choice-check { color: #fff; background: var(--success); border-color: var(--success); }
.image-choice-card input:focus-visible + .image-choice-check { outline: 3px solid var(--focus); outline-offset: 2px; }
.image-choice-card:has(input:checked) { border-color: var(--success); background: #f2fbf7; }
.image-choice-pictures { min-height: 92px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; }
.image-choice-pictures img { max-width: min(96px, 80%); max-height: 92px; width: auto; height: auto; object-fit: contain; }
.image-choice-pictures img:nth-last-child(n+2), .image-choice-pictures img:nth-last-child(n+2) ~ img { max-width: 29%; }
.image-choice-card strong { font-size: .83rem; line-height: 1.35; }
@media (max-width: 900px) { .image-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .image-choice-grid { grid-template-columns: 1fr; } }

/* Review and completion */
.review-page { max-width: 900px; }
.review-page > h1, .complete-page > h1 { color: var(--navy); margin-bottom: 14px; }
.review-intro { max-width: 720px; margin-bottom: 24px; color: var(--muted); }
.review-sections { display: grid; gap: 16px; }
.review-card { overflow: hidden; }
.review-card-header { min-height: 60px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; background: #f8f9fb; border-bottom: 1px solid var(--line); }
.review-card-header h2 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.review-card-header button { min-height: 40px; color: var(--magenta-dark); background: transparent; border: 0; text-decoration: underline; cursor: pointer; font-weight: 700; }
.review-card dl { margin: 0; padding: 8px 20px; }
.review-card dl > div { padding: 13px 0; display: grid; grid-template-columns: 200px 1fr; gap: 18px; border-bottom: 1px solid #edf0f4; }
.review-card dl > div:last-child { border: 0; }
.review-card dt { color: var(--muted); font-size: .86rem; }
.review-card dd { margin: 0; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.review-actions { margin-top: 26px; display: flex; justify-content: space-between; gap: 12px; }
.complete-page { max-width: 820px; text-align: center; }
.success-mark { width: 78px; height: 78px; margin: 12px auto 24px; display: grid; place-items: center; color: #fff; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 12px #e2f5ee; }
.complete-page > p:not(.eyebrow) { max-width: 660px; margin: 0 auto 26px; color: var(--muted); }
.complete-page .notice { max-width: 680px; margin: 0 auto 24px; text-align: left; }
.complete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.clear-card { margin-top: 44px; padding: 25px; display: flex; align-items: center; justify-content: space-between; gap: 25px; text-align: left; background: #fff; border: 1px solid #e3c2be; border-radius: var(--radius); }
.clear-card h2 { margin-bottom: 7px; color: var(--navy); font-size: 1.15rem; }
.clear-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.complete-page > .text-button { margin-top: 20px; }

@media (max-width: 980px) {
  .document-grid { grid-template-columns: repeat(2, 1fr); }
  .test-card { grid-template-columns: auto 1fr; }
  .test-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .form-layout { grid-template-columns: 1fr; }
  .help-card { position: static; order: -1; display: grid; grid-template-columns: auto 1fr; column-gap: 15px; }
  .help-card .help-icon { grid-row: 1 / 3; }
  .help-card hr, .help-card p:last-child { display: none; }
}

@media (max-width: 700px) {
  .content-width, .header-inner { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .header-button span, .save-status, .local-processing-badge { display: none; }
  .header-button { width: 44px; padding: 8px; justify-content: center; }
  .brand > span:last-child small { display: none; }
  .hero-section { padding: 48px 0 62px; }
  .hero-content { display: block; }
  .hero-stat { margin-top: 28px; padding: 17px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .home-content { padding-bottom: 50px; }
  .test-card { margin-top: -24px; padding: 22px; grid-template-columns: 1fr; }
  .test-icon { width: 50px; height: 50px; }
  .test-actions { grid-column: auto; flex-direction: column-reverse; }
  .test-actions .button { width: 100%; }
  .catalogue { padding-top: 52px; }
  .section-heading { align-items: flex-start; }
  .filters { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .filter-buttons { margin-inline: -3px; }
  .document-grid { grid-template-columns: 1fr; }
  .document-card { min-height: 235px; }
  .form-page, .review-page, .complete-page { padding-top: 24px; padding-bottom: 50px; }
  .breadcrumb { margin-bottom: 18px; }
  .form-heading { margin-bottom: 28px; display: block; }
  .test-label { display: inline-flex; margin-top: 13px; }
  .stepper { margin-inline: -7px; margin-bottom: 28px; }
  .stepper li small { font-size: .67rem; text-align: center; }
  .stepper::before { left: 12%; right: 12%; }
  .form-card { min-height: 0; padding: 22px 18px; border-radius: 14px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .stepper { overflow-x: auto; justify-content: start; grid-template-columns: repeat(var(--steps, 4), minmax(78px, 1fr)); padding-bottom: 8px; }
  .stepper::before { display: none; }
  .choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-option span { width: 100%; }
  .form-actions, .review-actions { flex-direction: column-reverse; }
  .form-actions .button, .review-actions .button { width: 100%; }
  .help-card { padding: 18px; }
  .image-preview { grid-template-columns: 1fr; }
  .image-preview img { width: 100%; height: 180px; }
  .review-card dl > div { grid-template-columns: 1fr; gap: 4px; }
  .complete-actions { flex-direction: column; }
  .complete-actions .button { width: 100%; }
  .clear-card { align-items: stretch; flex-direction: column; }
  .clear-card .button { width: 100%; }
}

@media (max-width: 420px) {
  .section-heading { display: block; }
  .catalogue-count { display: block; margin-top: 8px; }
  .stepper li small { max-width: 65px; }
}

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

@media (forced-colors: active) {
  .button, .status-badge, .test-label, .custom-check { border: 1px solid ButtonText; }
  .stepper li > span { forced-color-adjust: none; }
}

[hidden] { display: none !important; }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.search-field > span { position: absolute; left: 15px; top: 12px; z-index: 1; color: var(--muted); font-size: 1.25rem; }
