:root {
  --navy: #003572;
  --navy-hover: #0056a7;
  --yellow: #f8c00b;
  --ink: #10213b;
  --muted: #60728a;
  --border: #dce4ee;
  --background: #f5f7fa;
  --soft-blue: #edf5fd;
  --green: #17683a;
  --danger: #b72935;
  font-family: 'Nexa', 'Avenir Next', Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a { touch-action: manipulation; }
button, input, textarea, select, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--yellow); }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
button svg { pointer-events: none; }

.site-header { color: white; background: var(--navy); box-shadow: 0 6px 24px #00234c20; }
.header-inner { max-width: 1280px; min-height: 88px; padding: 19px 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand img { display: block; width: 205px; max-height: 48px; height: auto; object-fit: contain; }
.brand-divider { display: block; width: 1px; height: 36px; background: #ffffff40; }
.brand-text { display: grid; gap: 2px; }
.brand-text small { color: var(--yellow); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.brand-text strong { color: #ffffffd1; font-size: 13px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.save-status { display: flex; align-items: center; gap: 7px; min-height: 35px; padding: 7px 11px; color: #ffffffe3; font-size: 11px; font-weight: 500; border: 1px solid #ffffff26; border-radius: 24px; background: #ffffff0d; white-space: nowrap; }
.save-status svg { width: 14px; height: 14px; color: var(--yellow); }
.save-status[data-state="error"] { color: #ffe2a1; }
.reset-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 12px; color: white; border: 1px solid #ffffff55; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 700; }
.reset-btn svg { width: 15px; height: 15px; }
.reset-btn:hover { background: #ffffff14; }

.workspace { max-width: 1216px; margin: auto; padding: 38px 32px 20px; }
.intro { position: relative; margin-bottom: 27px; padding-right: 190px; }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--navy-hover); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(26px, 3vw, 34px); line-height: 1.18; letter-spacing: -.035em; font-weight: 800; }
.intro-copy { max-width: 720px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.tag { position: absolute; right: 0; top: 22px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; color: var(--navy); background: #e8eff8; border: 1px solid #d6e3f1; border-radius: 20px; font-size: 10px; font-weight: 800; }
.tag svg { width: 14px; height: 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 26px; align-items: start; }
.layout main { min-width: 0; }
.progress-nav { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; gap: 9px; }
.progress-nav button { position: relative; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 11px 7px 11px 0; border: 0; border-top: 3px solid var(--border); background: transparent; color: var(--muted); font-size: 11px; text-align: left; }
.step-num { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border: 1px solid #cad5e1; border-radius: 50%; color: #7b8ba1; font-size: 10px; font-weight: 800; }
.step-label { font-weight: 700; line-height: 1.25; }
.step-state { margin-left: auto; font-size: 10px; }
.progress-nav button.active { border-top-color: var(--yellow); color: var(--navy); }
.progress-nav button.active .step-num { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.progress-nav button.complete { border-top-color: var(--navy-hover); color: var(--navy); }
.progress-nav button.complete .step-num { color: var(--green); background: #dff2e6; border-color: #dff2e6; }
.progress-nav button:hover .step-label { color: var(--navy-hover); }
.mobile-progress { display: none; }

.form-card { overflow: hidden; padding: 28px 29px 24px; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 3px 12px #152d4c04; }
.card-heading { margin-bottom: 24px; padding-bottom: 21px; border-bottom: 1px solid #e8edf3; }
.card-heading h2 { color: var(--navy); margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
.card-heading p:not(.section-kicker) { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 8px 0 0; }
.card-heading .section-kicker { margin-bottom: 6px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 18px; }
.field { min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
.field-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }
.required { color: var(--danger); font-size: 12px; }
.optional { margin-left: auto; color: #6d7f94; font-size: 10px; font-weight: 500; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; min-height: 45px; padding: 11px 12px; color: var(--ink); background: white; border: 1px solid #cbd6e2; border-radius: 8px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #8795a5; opacity: 1; }
input:hover, textarea:hover, select:hover { border-color: #98abc0; }
input:focus, textarea:focus, select:focus { border-color: var(--navy-hover); box-shadow: 0 0 0 3px #0056a712; outline: none; }
input[readonly] { color: var(--navy); background: #f4f7fb; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--navy); width: 18px; height: 18px; margin: 0; }
textarea { min-height: 165px; resize: vertical; }
.hint { color: var(--muted); margin: 6px 0 0; font-size: 10px; line-height: 1.6; }
.error { color: var(--danger); margin: 6px 0 0; font-size: 11px; font-weight: 600; line-height: 1.5; }
.error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; background: #fffafb !important; }
.field-row { display: flex; gap: 12px; align-items: center; }
.field-row > * { min-width: 0; flex: 1; }
.read-only-field { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 45px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--navy); background: #f4f7fb; font-weight: 700; }
.locked-badge { display: inline-flex; align-items: center; gap: 4px; color: #60728a; font-size: 9px; font-weight: 600; }
.locked-badge svg { width: 12px; height: 12px; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; margin: 18px 0; color: #385674; background: var(--soft-blue); border: 1px solid #d9e8f5; border-radius: 8px; font-size: 11px; line-height: 1.6; }
.notice svg { width: 16px; height: 16px; margin-top: 1px; color: var(--navy-hover); }
.notice p { margin: 0; }
.notice.warning { color: #765510; background: #fff9e7; border-color: #f2e6bf; }
.notice.warning svg { color: #a27307; }
.notice.success { color: var(--green); background: #edf8f0; border-color: #d6eadc; }
.notice.success svg { color: var(--green); }
.section-divider { height: 1px; background: #e8edf3; border: 0; margin: 27px 0; }
.section-title { margin: 0 0 14px; color: var(--navy); font-size: 14px; line-height: 1.4; font-weight: 800; }
.optional-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; color: var(--navy); font-size: 12px; font-weight: 750; cursor: pointer; }
.optional-toggle input { flex-shrink: 0; }
.optional-toggle small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; font-weight: 400; }
.deductions { margin-top: 19px; padding-top: 20px; border-top: 1px solid #e8edf3; }
.share-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 13px 0 0; color: var(--muted); font-size: 10px; }
.share-summary strong { color: var(--navy); font-size: 11px; }
.share-bar { display: flex; overflow: hidden; height: 7px; margin-top: 10px; border-radius: 10px; background: #e9eef5; }
.share-bar span { display: block; height: 100%; background: var(--navy); transition: width .2s; }
.share-bar span + span { background: var(--yellow); }
.step-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 27px; padding-top: 23px; border-top: 1px solid #e8edf3; }
.step-footer > .hint { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 11px 18px; color: var(--navy); background: white; border: 1px solid #b4c4d5; border-radius: 8px; font-size: 12px; font-weight: 750; line-height: 1.4; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn svg, .button-icon { width: 17px; height: 17px; }
.btn.primary { color: white; border-color: var(--navy); background: var(--navy); box-shadow: 0 2px 4px #00357210; }
.btn.primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.btn.secondary:hover { border-color: var(--navy); background: #f6f9fc; }
.btn.ghost { color: var(--muted); background: transparent; border-color: transparent; padding-left: 0; }
.btn.ghost:hover { color: var(--navy); }

.sidebar { position: sticky; top: 22px; padding-top: 0; }
.summary-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: white; }
.summary-top { display: flex; align-items: center; gap: 11px; padding: 20px 21px 16px; border-bottom: 1px solid #e8edf3; }
.summary-icon { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 42px; color: white; background: var(--navy); border-radius: 9px; }
.summary-icon svg { width: 21px; height: 21px; }
.summary-top h3 { color: var(--navy); font-size: 13px; font-weight: 800; margin: 0; }
.summary-top p { color: var(--muted); font-size: 10px; margin: 3px 0 0; }
.summary-item { display: grid; gap: 5px; margin: 0 21px; padding: 14px 0; border-bottom: 1px solid #edf1f6; }
.summary-label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.summary-value { overflow-wrap: anywhere; color: var(--navy); font-size: 12px; font-weight: 700; line-height: 1.5; }
.summary-value:empty::before { content: 'Not entered'; color: #8b99a8; font-weight: 400; }
.summary-foot { display: flex; align-items: center; gap: 7px; margin: 0; padding: 14px 21px; color: var(--muted); background: #fafbfd; font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.status-dot.complete { background: #2f8a56; }
.document-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 0; color: var(--navy); font-size: 11px; font-weight: 700; text-decoration: none; }
.document-link svg { width: 15px; height: 15px; }
.document-link:hover { color: var(--navy-hover); }
.preserved-list { padding: 17px 20px; margin-top: 18px; color: var(--muted); border: 1px solid var(--border); border-radius: 11px; background: #ffffff70; font-size: 10px; line-height: 1.65; }
.preserved-list h3 { color: var(--navy); font-size: 11px; margin: 0 0 10px; }
.preserved-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.preserved-list li { display: flex; align-items: flex-start; gap: 7px; }
.preserved-list li::before { content: '✓'; color: #2c8053; font-weight: 800; }
.page-note { color: #7a8a9d; font-size: 9px; line-height: 1.65; margin: 13px 3px 0; }
.page-note strong { color: #60728a; }

.review-group { border: 1px solid var(--border); border-radius: 9px; margin-top: 17px; overflow: hidden; }
.review-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; margin: 0; background: #f6f9fc; color: var(--navy); font-size: 12px; }
.review-group dl { margin: 0; padding: 3px 15px; }
.review-row { display: grid; grid-template-columns: minmax(110px, 37%) minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid #edf1f6; font-size: 11px; }
.review-row:last-child { border-bottom: 0; }
.review-row dt { color: var(--muted); }
.review-row dd { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); margin: 0; font-weight: 600; }
.edit-link { color: var(--navy-hover); font-size: 10px; font-weight: 700; background: transparent; border: 0; padding: 3px; text-decoration: underline; text-underline-offset: 3px; }
.error-summary { padding: 15px 17px; margin-bottom: 22px; background: #fff6f6; color: #9c2733; border: 1px solid #efc9cc; border-radius: 9px; font-size: 11px; }
.error-summary h3, .error-summary p { font-size: 12px; margin: 0 0 6px; font-weight: 750; }
.error-summary ul { margin: 7px 0 0; padding-left: 18px; }
.error-summary li { margin: 4px 0; }
.error-summary a, .error-summary button { color: inherit; background: transparent; border: 0; padding: 0; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.download-panel { text-align: center; padding: 25px 18px 7px; }
.download-icon { display: grid; width: 52px; height: 58px; place-items: center; border-radius: 12px; color: var(--navy); background: #edf5fd; margin: 0 auto 13px; }
.download-icon svg { width: 28px; height: 28px; }
.download-panel h3 { color: var(--navy); margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.download-panel p { max-width: 460px; margin: 8px auto 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.download-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 19px; }
.download-panel .notice { text-align: left; }

dialog { padding: 0; border: 1px solid var(--border); border-radius: 13px; color: var(--ink); background: white; box-shadow: 0 24px 90px #00234c40; }
dialog::backdrop { background: #0a224d99; backdrop-filter: blur(3px); }
.preview-dialog { width: min(1040px, calc(100vw - 36px)); height: min(90vh, 960px); max-width: none; max-height: none; }
.dialog-heading { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 21px; border-bottom: 1px solid var(--border); }
.dialog-heading h2, .dialog-heading h3 { color: var(--navy); margin: 0; font-size: 15px; }
.dialog-heading p { color: var(--muted); margin: 3px 0 0; font-size: 11px; }
.close-btn { display: grid; flex-shrink: 0; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; color: var(--navy); background: white; font-size: 21px; line-height: 1; }
.close-btn:hover { background: #f5f7fa; }
.preview-dialog iframe { display: block; width: 100%; height: calc(100% - 76px); border: 0; background: #e8edf3; }
.reset-dialog { width: min(420px, calc(100vw - 36px)); padding: 24px; }
.reset-dialog h2 { color: var(--navy); font-size: 19px; margin: 0 0 9px; }
.reset-dialog p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.reset-dialog .dialog-actions, .reset-dialog form { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.toast { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 9px; color: white; background: var(--navy); box-shadow: 0 8px 30px #00234c33; font-size: 12px; }
.footer { max-width: 1216px; padding: 25px 32px 30px; margin: auto; color: #7b8ba1; font-size: 10px; }
.footer-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.footer a { color: var(--muted); }

@media (min-width: 1100px) {
  .sidebar { padding-top: 69px; }
}

@media (max-width: 1099px) {
  .header-inner { padding-left: 25px; padding-right: 25px; }
  .workspace { padding: 31px 25px 16px; }
  .layout { grid-template-columns: minmax(0, 1fr) 256px; gap: 20px; }
  .form-card { padding: 24px; }
  .brand { gap: 18px; }
  .brand img { width: 185px; }
  .brand-text strong { font-size: 12px; }
  .progress-nav { gap: 6px; }
  .progress-nav button { gap: 5px; font-size: 10px; }
  .step-num { flex-basis: 22px; width: 22px; height: 22px; }
  .summary-top { padding: 17px; }
  .summary-item { margin: 0 17px; }
  .summary-foot { padding: 13px 17px; }
  .preserved-list { padding: 16px; }
}

@media (max-width: 860px) {
  .brand-text, .brand-divider { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 18px; }
  .intro { padding-right: 0; }
  .tag { position: static; margin-top: 14px; }
  .form-card { padding: 22px; }
  .fields { gap: 18px 14px; }
  .progress-nav { grid-template-columns: repeat(4, 1fr); }
  .progress-nav button { display: grid; gap: 7px; justify-items: start; }
  .step-state { display: none; }
  .sidebar { padding-top: 0; }
  .summary-top { padding: 16px 14px; gap: 8px; }
  .summary-item { margin: 0 14px; }
  .summary-foot { padding: 12px 14px; }
  .summary-top h3 { font-size: 12px; }
  .summary-icon { width: 32px; height: 37px; }
  .review-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 76px; padding: 16px 20px; gap: 14px; }
  .brand img { width: 170px; }
  .header-actions { gap: 9px; }
  .save-status { min-height: 31px; padding: 6px 9px; font-size: 10px; }
  .reset-btn { width: 34px; height: 34px; padding: 0; font-size: 0; }
  .reset-btn svg { width: 16px; height: 16px; }
  .workspace { padding: 26px 20px 12px; }
  .intro { margin-bottom: 22px; }
  h1 { max-width: 580px; font-size: 29px; line-height: 1.2; }
  .intro-copy { font-size: 12px; line-height: 1.6; }
  .eyebrow { font-size: 9px; }
  .tag { margin-top: 13px; padding: 5px 9px; font-size: 9px; }
  .layout { display: flex; flex-direction: column; gap: 22px; }
  .layout main, .sidebar { width: 100%; }
  .progress-nav { margin-bottom: 16px; gap: 8px; }
  .progress-nav button { display: flex; font-size: 10px; padding-top: 9px; gap: 6px; }
  .step-num { flex-basis: 21px; width: 21px; height: 21px; font-size: 9px; }
  .form-card { border-radius: 12px; padding: 23px; }
  .card-heading { padding-bottom: 18px; margin-bottom: 22px; }
  .card-heading h2 { font-size: 21px; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 17px; align-items: start; }
  .summary-card { grid-row: span 2; border-radius: 11px; }
  .document-link { padding: 6px 0 13px; font-size: 10px; }
  .preserved-list { margin-top: 0; }
  .page-note { grid-column: 1 / -1; margin-top: 12px; }
  .footer { padding: 16px 20px 25px; }
  .footer-line { gap: 7px; font-size: 9px; }
  .preview-dialog { width: calc(100vw - 20px); height: calc(100dvh - 28px); }
  .dialog-heading { padding: 14px 15px; }
}

@media (max-width: 450px) {
  .header-inner { padding: 15px 16px; gap: 10px; }
  .brand img { width: 151px; }
  .header-actions { gap: 7px; }
  .save-status { max-width: 124px; gap: 5px; padding: 6px 8px; font-size: 9px; }
  .save-status svg { width: 12px; height: 12px; }
  .reset-btn { width: 31px; height: 31px; }
  .workspace { padding: 25px 16px 10px; }
  .intro { margin-bottom: 19px; }
  h1 { max-width: 340px; font-size: 27px; letter-spacing: -.035em; }
  .intro-copy { font-size: 11px; }
  .progress-nav { gap: 6px; }
  .progress-nav button { gap: 5px; padding-top: 9px; padding-right: 0; font-size: 9px; }
  .step-label { overflow-wrap: normal; }
  .step-num { width: 18px; height: 18px; flex-basis: 18px; font-size: 8px; }
  .form-card { padding: 21px 18px; }
  .card-heading h2 { font-size: 20px; }
  .card-heading p:not(.section-kicker) { font-size: 11px; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .field-label { font-size: 12px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 47px; font-size: 16px; padding: 11px 12px; }
  .hint { font-size: 10px; }
  .field-row { gap: 9px; }
  .notice { padding: 11px 12px; font-size: 10px; }
  .section-divider { margin: 23px 0; }
  .step-footer { padding-top: 20px; margin-top: 23px; }
  .step-footer .btn { padding: 11px 15px; font-size: 11px; }
  .step-footer > .hint { max-width: 140px; font-size: 9px; }
  .sidebar { display: block; }
  .summary-card { margin-bottom: 3px; }
  .summary-top { padding: 16px; }
  .summary-item { margin: 0 16px; padding: 12px 0; }
  .summary-item { grid-template-columns: 100px minmax(0, 1fr); align-items: baseline; gap: 12px; }
  .summary-label { font-size: 8px; }
  .summary-value { font-size: 11px; }
  .summary-foot { padding: 12px 16px; }
  .document-link { padding: 15px 2px; font-size: 11px; }
  .preserved-list { margin-top: 0; }
  .preserved-list ul { gap: 6px; }
  .review-group dl { padding: 2px 13px; }
  .review-group h3 { padding: 12px 13px; }
  .review-row { font-size: 11px; }
  .download-panel { padding: 24px 0 5px; }
  .download-panel h3 { font-size: 17px; }
  .download-actions { flex-direction: column; align-items: stretch; gap: 9px; }
  .download-actions .btn { width: 100%; }
  .footer { padding-left: 16px; padding-right: 16px; }
  .footer-line { display: grid; }
}

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

/* Component arrangements shared across the four agreement steps. */
.brand { text-decoration: none; }
.sidebar { padding-top: 0; }
.summary-icon { font-size: 23px; line-height: 1; }
.download-icon { font-size: 31px; line-height: 1; font-weight: 500; }
.tag { position: static; margin-top: 0; }
.intro > .tag { position: absolute; right: 0; top: 22px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h3 { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; }
.section-title .optional { text-align: right; }
.section-title .tag { margin: 0; padding: 4px 8px; font-size: 9px; }
.share-summary .share-bar { width: 100%; background: var(--yellow); }
.share-summary p { margin: 0; }
.step-footer > div { display: flex; gap: 9px; }
.document-card { margin-top: 18px; padding: 19px 20px 0; }
.document-card > h3 { color: var(--navy); font-size: 15px; line-height: 1.4; margin: 7px 0 14px; letter-spacing: -.015em; }
.document-card .preserved-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0 0 17px; border: 0; border-radius: 0; background: transparent; font-size: 10px; }
.document-card .document-link { border-top: 1px solid #e8edf3; }
.review-group > .section-title { padding: 13px 15px; margin: 0; background: #f6f9fc; color: var(--navy); font-size: 12px; }
.review-group h3 { padding: 0; margin: 0; color: var(--navy); font-size: 12px; }
.preview-dialog iframe { height: calc(100% - 143px); }
.preview-dialog > .download-actions { margin: 0; min-height: 79px; padding: 14px 18px; border-top: 1px solid var(--border); }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 25px 0 14px; }
.footer-line { flex: 0 0 100%; height: 1px; margin-bottom: 6px; padding: 0; }

@media (max-width: 860px) {
  .intro > .tag { position: static; margin-top: 14px; }
}
@media (max-width: 700px) {
  .reset-btn { width: auto; min-height: 34px; height: auto; padding: 7px 10px; font-size: 10px; }
  .sidebar .document-card { margin-top: 0; }
  .footer { padding: 22px 0 17px; font-size: 9px; }
}
@media (max-width: 450px) {
  .header-actions { flex-direction: column-reverse; align-items: flex-end; gap: 3px; }
  .save-status { min-height: 14px; max-width: 132px; gap: 5px; padding: 0; border: 0; background: transparent; font-size: 8px; }
  .reset-btn { width: auto; min-height: 31px; height: auto; padding: 6px 10px; font-size: 10px; }
  .sidebar .document-card { margin-top: 15px; }
  .review-group > .section-title { padding: 12px 13px; }
  .review-group h3 { padding: 0; }
  .footer { display: grid; gap: 7px; padding: 22px 0 17px; }
  .footer-line { display: block; width: 100%; margin-bottom: 6px; }
  .preview-dialog iframe { height: calc(100% - 185px); }
  .preview-dialog > .download-actions { min-height: 122px; }
}
.preview-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.preview-dialog .dialog-heading, .preview-dialog > .download-actions { flex-shrink: 0; }
.preview-pages { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 20px; background: #e8edf3; }
.pdf-page { width: min(100%,900px); margin: 0 auto 18px; }
.pdf-caption { margin: 12px 0 6px; color: #52667e; font-size: 11px; text-align: center; }
.pdf-page canvas { display: block; height: auto; background: white; box-shadow: 0 2px 12px #00357215; }

/* Live NZ address search follows the native editable-combobox pattern. */
.address-search { position: relative; }
.address-input-wrap { position: relative; }
.address-search-icon { position: absolute; left: 12px; top: 12px; display: flex; color: #60728a; pointer-events: none; }
.address-search-icon svg { width: 20px; height: 20px; }
.address-input-wrap input { padding-left: 40px !important; }
.address-input-wrap input[aria-expanded="true"] { border-color: var(--navy-hover); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.address-suggestions { position: absolute; top: calc(100% - 1px); left: 0; right: 0; z-index: 15; margin: 0; padding: 5px 0; max-height: 290px; overflow-y: auto; list-style: none; background: white; border: 1px solid var(--navy-hover); border-radius: 0 0 9px 9px; box-shadow: 0 12px 26px #00357222; overscroll-behavior: contain; }
.address-suggestions li { display: grid; gap: 2px; padding: 11px 13px; cursor: pointer; border-bottom: 1px solid #edf1f6; }
.address-suggestions li:last-child { border-bottom: 0; }
.address-suggestions li strong { color: var(--navy); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.address-suggestions li span { color: var(--muted); font-size: 11px; }
.address-suggestions li:hover, .address-suggestions li[aria-selected="true"] { background: #edf5fd; box-shadow: inset 3px 0 var(--yellow); }
.address-feedback { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; }
.address-feedback .hint { flex: 1 1 220px; margin: 0; min-height: 16px; }
.address-credit { color: #60728a; font-size: 9px; white-space: nowrap; }
@media (max-width: 450px) { .address-suggestions { max-height: 255px; } .address-search-icon { top: 13px; } .address-suggestions li { min-height: 53px; padding: 10px 12px; } }
