:root {
  --navy: #0d1b3e;
  --green: #008037;
  --yellow: #ffe700;
  --ink: #172033;
  --muted: #677085;
  --line: #dce2ea;
  --surface: #ffffff;
  --soft: #f7f9fc;
  --warn-bg: #fff9cf;
  --shadow: 0 18px 50px rgba(13, 27, 62, 0.1);
  --shadow-soft: 0 10px 30px rgba(13, 27, 62, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 249, 252, 0.98) 460px),
    var(--soft);
  color: var(--ink);
  font-family: Lato, Helvetica, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.portal-hero,
.panel,
.summary,
.doc-card {
  background: var(--surface);
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portal-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 650px) minmax(260px, 1fr);
  min-height: 0;
  overflow: hidden;
  align-items: center;
  padding: clamp(16px, 2.4vw, 24px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.96) 52%, rgba(255, 255, 255, 0.46) 100%),
    url("assets/portal-hero.png") right center / auto 116% no-repeat,
    #fff;
}

.portal-hero::after {
  position: absolute;
  right: clamp(18px, 4vw, 44px);
  bottom: clamp(18px, 4vw, 44px);
  width: min(30vw, 320px);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(0, 128, 55, 0.42), transparent);
}

.hero-copy {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  max-width: 720px;
}

.brand-logo {
  display: block;
  width: min(205px, 48vw);
  height: auto;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(1.72rem, 3.5vw, 2.55rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  color: var(--navy);
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 1.08rem;
}

.hero-subtitle {
  max-width: 640px;
  margin-bottom: 14px;
  color: #475268;
  font-size: clamp(0.96rem, 1.6vw, 1.06rem);
  line-height: 1.45;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signal-row span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
}

.signal-row b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.progress-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  width: min(520px, 100%);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  color: var(--navy);
  font-weight: 900;
}

.progress-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.progress-card strong {
  display: block;
  font-size: 0.98rem;
  white-space: nowrap;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #12a653);
  transition: width 240ms ease;
}

.panel {
  margin-top: 18px;
  padding: clamp(20px, 3vw, 30px);
}

.borrower-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 128, 55, 0.22);
  outline-offset: 2px;
}

.wizard {
  display: grid;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.wizard.question-enter {
  animation: questionIn 220ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.wizard.question-enter.question-back {
  animation-name: questionBackIn;
}

.wizard.question-enter::after {
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid rgba(0, 128, 55, 0.12);
  border-radius: 8px;
  content: "";
  pointer-events: none;
  animation: focusPulse 2600ms ease-in-out infinite;
}

.wizard.question-enter .wizard-copy,
.wizard.question-enter .choice-grid,
.wizard.question-enter .answer-field,
.wizard.question-enter .address-grid,
.wizard.question-enter .field-hint,
.wizard.question-enter .wizard-footer {
  animation: questionContentIn 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.wizard::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--green), rgba(255, 231, 0, 0.9), rgba(13, 27, 62, 0.14));
}

@keyframes questionIn {
  from {
    opacity: 0;
    transform: translate3d(14px, 8px, 0) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes questionBackIn {
  from {
    opacity: 0;
    transform: translate3d(-12px, 6px, 0) scale(0.994);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes questionContentIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes focusPulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(1);
  }

  50% {
    opacity: 0.72;
    transform: scale(1.006);
  }
}

@keyframes arrow-breathe {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(-1px);
  }

  50% {
    opacity: 1;
    transform: translateY(2px);
  }
}

@keyframes sendPulse {
  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 128, 55, 0.2), 0 0 0 0 rgba(0, 128, 55, 0.3);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 18px 38px rgba(0, 128, 55, 0.24), 0 0 0 8px rgba(0, 128, 55, 0.1);
    transform: translateY(-1px);
  }
}

.wizard-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.wizard-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.intro-screen {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
}

.intro-copy {
  max-width: 780px;
}

.intro-copy h2 {
  margin-bottom: 12px;
}

.intro-copy p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.intro-card,
.confirm-card {
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.intro-card {
  padding: 18px;
}

.intro-card.ready-card {
  border-color: rgba(0, 128, 55, 0.16);
  background: linear-gradient(180deg, #ffffff, #f4fbf7);
}

.intro-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.intro-card h3 {
  margin-bottom: 10px;
}

.intro-card p,
.intro-card li {
  color: var(--muted);
  line-height: 1.45;
}

.intro-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.intro-card p {
  margin-bottom: 0;
}

.confirm-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  cursor: pointer;
}

.confirm-card input {
  width: 28px;
  min-height: 28px;
  margin-top: 1px;
  accent-color: var(--green);
}

.confirm-card strong,
.confirm-card small {
  display: block;
}

.confirm-card strong {
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.25;
}

.confirm-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.intro-footer {
  align-items: center;
}

.time-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  width: fit-content;
  margin: -2px 0 14px;
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--green);
  background: #f0faf4;
  font-size: 0.86rem;
  font-weight: 900;
}

.choice-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.answer-field {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.address-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
}

.address-grid .span-2 {
  grid-column: 1 / -1;
  max-width: none;
}

.answer-field > span {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 900;
}

.field-hint {
  position: relative;
  z-index: 1;
  display: none;
  max-width: 680px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 231, 0, 0.7);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--navy);
  background: #fffbe8;
  line-height: 1.4;
}

.field-hint.visible,
.field-hint.success {
  display: flex;
  flex-wrap: wrap;
}

.field-hint.success {
  border-color: rgba(0, 128, 55, 0.18);
  color: var(--green);
  background: #f0faf4;
}

.field-hint button,
.field-hint-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.money-field > div {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.money-field b {
  display: grid;
  min-height: 48px;
  place-items: center;
  color: var(--green);
  border-right: 1px solid var(--line);
  font-size: 1.1rem;
}

.money-field input {
  border: 0;
}

.choice-btn,
.primary-btn,
.secondary-btn,
.help-btn,
.defer-btn,
.file-pill button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.choice-btn {
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--navy);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 252, 255, 0.96));
  text-align: left;
  box-shadow: 0 8px 22px rgba(13, 27, 62, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.choice-btn:hover,
.choice-btn.selected {
  border-color: var(--green);
  box-shadow: 0 14px 28px rgba(0, 128, 55, 0.12), inset 0 0 0 2px rgba(0, 128, 55, 0.16);
  transform: translateY(-1px);
}

.choice-btn.tone-blue {
  border-color: rgba(48, 112, 196, 0.18);
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
}

.choice-btn.tone-yellow {
  border-color: rgba(255, 231, 0, 0.42);
  background: linear-gradient(180deg, #ffffff, #fffbe6);
}

.choice-btn.tone-green {
  border-color: rgba(0, 128, 55, 0.2);
  background: linear-gradient(180deg, #ffffff, #f0faf4);
}

.choice-btn.tone-navy {
  border-color: rgba(13, 27, 62, 0.18);
  background: linear-gradient(180deg, #ffffff, #f4f6fb);
}

.choice-btn.tone-blue.selected,
.choice-btn.tone-blue:hover {
  border-color: #3070c4;
  box-shadow: 0 14px 28px rgba(48, 112, 196, 0.12), inset 0 0 0 2px rgba(48, 112, 196, 0.15);
}

.choice-btn.tone-yellow.selected,
.choice-btn.tone-yellow:hover {
  border-color: var(--yellow);
  box-shadow: 0 14px 28px rgba(190, 160, 0, 0.12), inset 0 0 0 2px rgba(255, 231, 0, 0.36);
}

.choice-btn.tone-green.selected,
.choice-btn.tone-green:hover {
  border-color: var(--green);
}

.choice-btn.tone-navy.selected,
.choice-btn.tone-navy:hover {
  border-color: var(--navy);
  box-shadow: 0 14px 28px rgba(13, 27, 62, 0.12), inset 0 0 0 2px rgba(13, 27, 62, 0.12);
}

.choice-btn span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.35;
}

.wizard-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .wizard.question-enter,
  .wizard.question-enter::after,
  .wizard.question-enter .wizard-copy,
  .wizard.question-enter .choice-grid,
  .wizard.question-enter .answer-field,
  .wizard.question-enter .address-grid,
  .wizard.question-enter .field-hint,
  .wizard.question-enter .wizard-footer,
  .choice-btn,
  .doc-card,
  .document-path i,
  .upload-zone,
  .send-pulse {
    animation: none;
    transition: none;
  }
}

.primary-btn,
.secondary-btn {
  padding: 0 18px;
}

.primary-btn {
  color: #fff;
  background: var(--navy);
}

.secondary-btn,
.help-btn {
  color: var(--navy);
  background: #edf1f6;
}

.defer-btn {
  color: var(--navy);
  border: 1px solid rgba(13, 27, 62, 0.1);
  background: #fff;
}

.summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.summary h2 {
  margin-bottom: 8px;
}

.summary-body {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.summary.ready .secondary-btn {
  color: #fff;
  background: var(--green);
}

.checklist {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.later-prep,
.future-requests,
.document-hub {
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
}

.document-hub {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 18px;
  align-items: start;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background:
    linear-gradient(135deg, #ffffff, #f7fbf9 58%, #fffbe6);
}

.document-hub::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, var(--green), var(--yellow), rgba(13, 27, 62, 0.28));
}

.document-hub-copy {
  padding-left: 8px;
}

.document-hub-copy h2 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.document-hub-copy p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.5;
}

.document-hub-meter {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(13, 27, 62, 0.06);
}

.document-hub-meter strong {
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
}

.document-hub-meter span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.mini-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #14a955);
}

.document-path {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.document-path-needed {
  grid-template-columns: minmax(180px, 320px);
}

.document-path span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 900;
}

.document-path .active {
  color: #fff;
  background: var(--green);
}

.document-path i {
  display: inline-block;
  color: var(--yellow);
  font-style: normal;
  line-height: 1;
  animation: arrow-breathe 1.8s ease-in-out infinite;
}

.document-path i:nth-child(2) {
  animation-delay: 0.12s;
}

.document-path i:nth-child(3) {
  animation-delay: 0.24s;
}

.all-done,
.completed-uploads,
.calendar-next-step,
.review-next-steps {
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.all-done h2,
.completed-uploads h2,
.calendar-next-step h2,
.review-next-steps h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.all-done p:not(.eyebrow),
.calendar-next-step p:not(.eyebrow),
.review-next-steps p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-next-steps {
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border-color: rgba(13, 27, 62, 0.1);
  padding: clamp(24px, 4vw, 34px);
}

.review-next-steps.ready {
  border-color: rgba(0, 128, 55, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 248, 0.96) 58%, rgba(255, 251, 220, 0.72));
}

.review-next-steps::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--green), rgba(255, 231, 0, 0.92), rgba(13, 27, 62, 0.22));
}

.final-step-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.final-step-hero h2 {
  max-width: 680px;
  margin-bottom: 10px;
}

.final-step-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}

.final-status-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(0, 128, 55, 0.08);
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.next-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.next-step-list div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.9));
  box-shadow: 0 10px 24px rgba(13, 27, 62, 0.06);
}

.next-step-list div::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  content: "";
  background: var(--green);
}

.next-step-list div:nth-child(2)::before {
  background: var(--navy);
}

.next-step-list div:nth-child(3)::before {
  background: var(--yellow);
}

.next-step-list strong,
.next-step-list span {
  display: block;
}

.next-step-list strong {
  color: var(--navy);
}

.next-step-list span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.send-action-slot {
  display: flex;
  justify-content: center;
}

.send-ready-btn {
  color: #fff;
  background: var(--green);
}

.send-pulse {
  animation: sendPulse 2400ms ease-in-out infinite;
}

.trust-row {
  display: inline-grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
}

.bbb-seal-button {
  display: inline-flex;
  align-items: center;
  width: min(190px, 100%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.bbb-seal-button img {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  border: 0;
}

.bbb-seal-button:focus-visible {
  outline: 3px solid rgba(0, 128, 55, 0.22);
  outline-offset: 4px;
}

.trust-row strong,
.trust-row small {
  display: block;
}

.trust-row strong {
  color: var(--navy);
}

.trust-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.bbb-dialog-seal {
  display: block;
  width: min(293px, 100%);
  height: auto;
  margin: 8px 0 16px;
  border: 0;
}

#helpBody span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.calendar-next-step {
  border-color: rgba(255, 231, 0, 0.78);
  background: linear-gradient(180deg, #fffdf0, #ffffff);
}

.calendar-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--navy);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.calendar-btn.disabled {
  color: var(--navy);
  background: #edf1f6;
  cursor: not-allowed;
}

.credit-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.calendar-btn.secondary.disabled {
  border-color: rgba(13, 27, 62, 0.25);
  color: rgba(13, 27, 62, 0.45);
  background: #edf1f6;
}

.calendar-next-step small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.calendar-frame {
  display: block;
  width: min(760px, 100%);
  height: min(72vh, 720px);
  margin: 8px 0 16px;
  border: 1px solid rgba(13, 27, 62, 0.1);
  border-radius: 8px;
  background: #fff;
}

#helpDialog:has(.calendar-frame) {
  width: min(860px, calc(100% - 32px));
}

.completed-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.completed-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: #f6fbf8;
}

.completed-row.deferred {
  background: #fffdf0;
}

.completed-row.deferred .completed-check {
  color: var(--navy);
  background: var(--yellow);
}

.completed-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.completed-row strong,
.completed-row small {
  display: block;
}

.completed-row strong {
  color: var(--navy);
}

.completed-row small {
  margin-top: 3px;
  color: var(--muted);
}

.completed-row button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.later-prep h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.later-prep p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.later-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.later-grid span {
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--navy);
  background: #f8fafc;
  font-weight: 900;
  line-height: 1.35;
}

.future-requests {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.future-requests h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.future-requests p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.future-request-grid {
  display: grid;
  gap: 10px;
}

.future-request-grid article {
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(13, 27, 62, 0.05);
}

.future-request-grid span,
.future-request-grid strong {
  display: block;
}

.future-request-grid span {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.future-request-grid strong {
  color: var(--navy);
}

.future-request-grid p {
  margin-top: 5px;
  font-size: 0.92rem;
}

.group {
  display: grid;
  gap: 12px;
}

.group summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 900;
}

.group[open] summary {
  margin-bottom: 4px;
}

.active-request summary {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(0, 128, 55, 0.16);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--green);
  background: #f0faf4;
  font-size: 0.9rem;
}

.doc-card {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 360px);
  gap: 18px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.doc-card:hover {
  border-color: rgba(0, 128, 55, 0.18);
  box-shadow: 0 16px 36px rgba(13, 27, 62, 0.1);
  transform: translateY(-1px);
}

.doc-main {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
}

.doc-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: #f0faf4;
  font-size: 0.88rem;
  font-weight: 900;
}

.doc-card.uploaded .doc-number {
  color: #fff;
  background: var(--green);
  font-size: 0;
}

.doc-card.uploaded .doc-number::before {
  content: "✓";
  font-size: 1rem;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.doc-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 900;
}

.doc-meta .doc-tag {
  border-color: #008037;
  color: #fff;
  background: #008037;
}

.doc-meta .doc-priority {
  color: var(--green);
  background: #f0faf4;
  border-color: rgba(0, 128, 55, 0.16);
}

.doc-meta .doc-requested-at {
  color: #4a5568;
  background: #fff8e6;
  border-color: rgba(168, 126, 0, 0.18);
}

.reason {
  margin-bottom: 8px;
  color: var(--ink);
  line-height: 1.45;
}

.format {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.camera-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.camera-upload-grid .span-2 {
  grid-column: 1 / -1;
}

.upload-zone {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1.5px dashed #a9b3c3;
  border-radius: 8px;
  color: var(--navy);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(242, 247, 251, 0.92));
  text-align: center;
  cursor: pointer;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-zone:hover {
  border-color: var(--green);
  background: #f0faf4;
  transform: translateY(-1px);
}

.camera-zone {
  min-height: 112px;
  border-color: rgba(0, 128, 55, 0.28);
  background: linear-gradient(180deg, #ffffff, #f0faf4);
}

.camera-zone span::before {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  content: "Camera";
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.upload-zone.dragging {
  border-color: var(--green);
  background: #f0faf4;
}

.uploaded-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  color: var(--navy);
  background: #eaf6ef;
  font-size: 0.86rem;
  font-weight: 900;
}

.file-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-pill button {
  min-width: 32px;
  min-height: 32px;
  color: var(--green);
  background: #fff;
}

.attention {
  border-color: rgba(255, 231, 0, 0.7);
  background: var(--warn-bg);
}

dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(13, 27, 62, 0.32);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: #edf1f6;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.close-dialog {
  float: right;
}

.dev-toolbar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  display: flex;
  max-width: min(540px, calc(100% - 28px));
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.dev-toolbar strong {
  color: var(--navy);
  font-size: 0.78rem;
  white-space: nowrap;
}

.dev-toolbar strong span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.dev-toolbar button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
}

.dev-toolbar button[data-dev-action="docs"],
.dev-toolbar button[data-dev-action="done"] {
  background: var(--green);
}

.dev-toolbar button[data-dev-action="clear"] {
  color: var(--navy);
  background: #edf1f6;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 16px, 520px);
    padding: 6px 0 36px;
  }

  .portal-hero,
  .borrower-panel,
  .summary,
  .doc-card,
  .document-hub {
    grid-template-columns: 1fr;
  }

  .portal-hero,
  .summary {
    display: grid;
  }

  .portal-hero {
    min-height: 0;
    padding: 14px;
    align-items: start;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 100%),
      #fff;
  }

  h1 {
    max-width: none;
    margin-bottom: 6px;
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.03;
  }

  h2 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    line-height: 1.08;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .signal-row {
    gap: 6px;
  }

  .signal-row span {
    min-height: 30px;
    gap: 6px;
    padding: 4px 8px 4px 5px;
    font-size: 0.8rem;
  }

  .signal-row b {
    width: 22px;
    height: 22px;
  }

  .progress-card {
    position: relative;
    top: auto;
    right: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    justify-self: stretch;
    margin-top: 10px;
    padding: 10px 12px;
  }

  .progress-card strong {
    font-size: 1rem;
  }

  .progress-track {
    height: 9px;
    margin-top: 8px;
  }

  .brand-logo {
    width: min(150px, 48vw);
    margin-bottom: 8px;
  }

  .panel,
  .summary,
  .later-prep,
  .document-hub,
  .future-requests,
  .all-done,
  .completed-uploads,
  .calendar-next-step,
  .review-next-steps {
    margin-top: 14px;
    padding: 18px;
  }

  .wizard {
    gap: 18px;
  }

  .wizard.question-enter::after {
    inset: 7px;
  }

  .intro-card,
  .confirm-card,
  .choice-btn,
  .doc-card {
    box-shadow: var(--shadow-soft);
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .choice-btn {
    min-height: 84px;
    padding: 16px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .confirm-card {
    grid-template-columns: 32px 1fr;
    padding: 18px;
  }

  .confirm-card input {
    width: 26px;
    min-height: 26px;
  }

  .next-step-list {
    grid-template-columns: 1fr;
  }

  .final-step-hero {
    grid-template-columns: 1fr;
  }

  .final-status-pill {
    width: fit-content;
  }

  .trust-row {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100%;
    text-align: center;
  }

  .bbb-seal-button {
    width: min(210px, 100%);
    justify-content: center;
  }

  .send-action-slot {
    justify-content: stretch;
  }

  .send-ready-btn {
    min-height: 54px;
    font-size: 1rem;
  }

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

  .answer-field,
  .address-grid {
    max-width: none;
  }

  input,
  select,
  textarea {
    min-height: 52px;
    font-size: 1rem;
  }

  .summary {
    gap: 14px;
    align-items: stretch;
  }

  .doc-card {
    gap: 14px;
    padding: 16px;
  }

  .doc-main {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .document-path,
  .later-grid,
  .future-requests {
    grid-template-columns: 1fr;
  }

  .doc-actions {
    gap: 12px;
  }

  .camera-upload-grid {
    grid-template-columns: 1fr;
  }

  .camera-upload-grid .span-2 {
    grid-column: auto;
  }

  .upload-zone {
    min-height: 88px;
  }

  .camera-zone {
    min-height: 102px;
  }

  .completed-row {
    grid-template-columns: 34px 1fr;
  }

  .completed-row button {
    grid-column: 1 / -1;
  }

  dialog {
    width: min(100% - 18px, 520px);
    max-height: calc(100vh - 24px);
    padding: 22px;
  }

  .calendar-frame {
    height: 70vh;
  }

  .wizard-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }

  .dev-toolbar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .dev-toolbar button {
    flex: 0 0 auto;
  }
}

@media (max-width: 390px) {
  .shell {
    width: min(100% - 12px, 380px);
  }

  .portal-hero,
  .panel,
  .summary,
  .later-prep,
  .document-hub,
  .future-requests,
  .all-done,
  .completed-uploads,
  .calendar-next-step,
  .review-next-steps {
    padding: 16px;
  }

  .brand-logo {
    width: min(170px, 56vw);
  }

  .signal-row {
    gap: 8px;
  }

  .signal-row span {
    min-height: 36px;
    gap: 7px;
    font-size: 0.86rem;
  }

  .signal-row b {
    width: 25px;
    height: 25px;
  }

  .file-pill {
    width: 100%;
    justify-content: space-between;
  }
}
