:root {
  --brand-blue: #5dade2;
  --brand-green: #2dcc70;
  --brand-mint: #8af0da;
  --ink: #24384a;
  --muted: #657789;
  --line: #d9e7ee;
  --soft-line: #eaf2f6;
  --background: #f7fbfc;
  --surface: #ffffff;
  --surface-soft: #f1f8fa;
  --danger: #c94747;
  --shadow: 0 18px 48px rgba(45, 62, 80, 0.11);
  --radius: 8px;
  --radius-sm: 6px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(93, 173, 226, 0.08), rgba(138, 240, 218, 0.02) 360px),
    var(--background);
  font-family: "Nunito Sans", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 214px;
  min-height: 82px;
  padding: 12px 16px;
  background: #2d3c50;
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(45, 60, 80, 0.16);
}

.brand img {
  display: block;
  width: 196px;
  height: auto;
}

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

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 13px;
  color: #2b6f69;
  background: rgba(138, 240, 218, 0.18);
  border: 1px solid rgba(45, 204, 112, 0.18);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.secure-note svg {
  width: 18px;
  height: 18px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

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

.intro-label {
  margin: 0 0 10px;
  color: #2c8179;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  color: #2d3e50;
  font-size: clamp(2.15rem, 5vw, 4.1rem);
  line-height: 1.04;
  font-weight: 800;
}

.intro-copy > p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-panel,
.support-panel,
.finance-form {
  border: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
}

.panel-number {
  display: block;
  color: var(--brand-blue);
  font-size: 2.55rem;
  line-height: 1;
  font-weight: 800;
}

.panel-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}

.section-nav,
.support-panel {
  position: sticky;
  top: 18px;
}

.section-nav {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.section-nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
}

.section-nav a:hover,
.section-nav a.active {
  color: #1e6964;
  background: rgba(138, 240, 218, 0.2);
}

.finance-form {
  overflow: hidden;
  border-radius: var(--radius);
}

.form-section {
  padding: 30px;
  border-bottom: 1px solid var(--soft-line);
  scroll-margin-top: 18px;
}

.form-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 24px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #23857d;
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.15), rgba(45, 204, 112, 0.18));
  border: 1px solid rgba(45, 204, 112, 0.18);
  border-radius: var(--radius);
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-heading h2,
.final-section h2,
.support-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.38rem;
  line-height: 1.25;
  font-weight: 800;
}

.section-heading p,
.final-section p,
.support-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

.field span {
  color: #334b5f;
  font-size: 0.91rem;
  font-weight: 800;
}

.field input,
.field select,
.money-field {
  width: 100%;
  min-height: 50px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  padding: 0 14px;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #557286 50%),
    linear-gradient(135deg, #557286 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 22px,
    calc(100% - 14px) 22px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input::placeholder {
  color: #9aa9b5;
}

.field input:focus,
.field select:focus,
.upload-field:focus-within,
.money-field:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.15);
}

.field input:user-invalid,
.field select:user-invalid,
.consent input:user-invalid {
  border-color: var(--danger);
}

.money-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.money-field input {
  min-height: 48px;
  border: 0;
  box-shadow: none;
}

.money-field span {
  padding: 0 14px;
  color: #547285;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.upload-field {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(130px, auto);
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.upload-field:hover {
  border-color: rgba(93, 173, 226, 0.7);
  transform: translateY(-1px);
}

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

.upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #2d7b75;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}

.upload-icon svg {
  width: 23px;
  height: 23px;
}

.upload-field strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.3;
}

.upload-field small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.35;
}

.upload-field em {
  justify-self: end;
  max-width: 210px;
  padding: 9px 12px;
  overflow: hidden;
  color: #1f756f;
  background: rgba(138, 240, 218, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-files {
  display: grid;
  gap: 7px;
  margin: -4px 0 8px 60px;
  padding: 0;
  list-style: none;
}

.selected-files:empty {
  display: none;
}

.selected-files li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px 6px 12px;
  color: #334b5f;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 800;
}

.selected-files span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-files button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #7b4b4b;
  background: #fff4f4;
  border: 1px solid #efd4d4;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.selected-files button:hover,
.selected-files button:focus-visible {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
  outline: none;
}

.final-section {
  display: grid;
  gap: 18px;
  background: linear-gradient(180deg, #ffffff, #f6fbfb);
}

.consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-sm);
}

.consent input {
  width: 19px;
  height: 19px;
  margin: 3px 0 0;
  accent-color: var(--brand-green);
}

.privacy-summary {
  display: grid;
  gap: 12px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.privacy-summary h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 900;
}

.privacy-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.privacy-summary div {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
}

.privacy-summary dt {
  color: #334b5f;
  font-weight: 900;
}

.privacy-summary dd,
.privacy-summary p {
  margin: 0;
}

.privacy-summary a {
  color: #1f756f;
  font-weight: 900;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: #2dcc70;
  box-shadow: 0 12px 26px rgba(45, 204, 112, 0.24);
}

.secondary-button {
  color: #2b6f69;
  background: #ffffff;
  border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 4px solid rgba(93, 173, 226, 0.2);
  outline-offset: 2px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: #237d55;
  font-weight: 800;
}

.form-status.error {
  color: var(--danger);
}

.support-panel {
  padding: 20px;
  border-radius: var(--radius);
}

.support-panel ul {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.support-panel li {
  position: relative;
  padding-left: 22px;
  color: #465e70;
  font-size: 0.93rem;
}

.support-panel li::before {
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 8px;
  height: 8px;
  background: var(--brand-green);
  border-radius: 50%;
  content: "";
}

.support-panel p {
  padding-top: 15px;
  border-top: 1px solid var(--soft-line);
  font-size: 0.9rem;
}

@media (max-width: 1080px) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .section-nav {
    display: none;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, var(--container));
    padding-top: 18px;
  }

  .site-header,
  .intro {
    align-items: start;
  }

  .intro,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .support-panel {
    position: static;
    order: -1;
  }

  .intro-panel {
    max-width: 460px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 26px;
  }

  .brand img {
    width: 174px;
  }

  .secure-note {
    border-radius: var(--radius-sm);
  }

  .intro h1 {
    font-size: 2.45rem;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 22px 16px;
  }

  .section-heading {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .section-icon {
    width: 40px;
    height: 40px;
  }

  .field-grid,
  .field-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .field.span-2 {
    grid-column: auto;
  }

  .upload-field {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .upload-field em {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    text-align: center;
  }

  .selected-files {
    margin: -4px 0 8px;
  }

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

  .privacy-summary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
