:root {
  color-scheme: light;
  --aubergine: #4b2142;
  --aubergine-2: #6d365f;
  --coral: #ef6a5b;
  --coral-dark: #d85346;
  --cream: #fff8f0;
  --cream-2: #f9ecdf;
  --ink: #242233;
  --muted: #686475;
  --line: #dfd9dc;
  --sage: #2f8f72;
  --sage-soft: #eaf5f1;
  --amber: #a46111;
  --amber-soft: #fff4dd;
  --red: #b73b3b;
  --red-soft: #fff0ef;
  --white: #fff;
  --shadow: 0 18px 55px rgb(75 33 66 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--ink);
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgb(239 106 91 / 9%), transparent 26rem),
    var(--cream);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
label,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

a {
  color: var(--aubergine);
}

.skip-link {
  background: var(--ink);
  color: var(--white);
  left: 1rem;
  padding: .75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  background: rgb(255 248 240 / 92%);
  border-bottom: 1px solid rgb(75 33 66 / 9%);
  display: flex;
  justify-content: space-between;
  min-height: 82px;
  padding: .75rem clamp(1rem, 4vw, 4.5rem);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

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

.header-actions {
  align-items: center;
  display: flex;
  gap: 1.5rem;
}

.text-button,
.link-button {
  background: none;
  border: 0;
  color: var(--aubergine);
  font-weight: 700;
  padding: .4rem;
  text-decoration: underline;
  text-underline-offset: .25rem;
}

.secure-label {
  align-items: center;
  color: var(--sage);
  display: inline-flex;
  font-size: .9rem;
  font-weight: 700;
  gap: .45rem;
}

.secure-label::before {
  content: "";
  background: currentColor;
  border-radius: 50%;
  height: .55rem;
  width: .55rem;
}

main {
  margin: 0 auto;
  max-width: 1440px;
  padding: 2.8rem clamp(1rem, 4vw, 4.5rem) 2rem;
}

.hero {
  margin: 0 auto 2rem;
  max-width: 900px;
  text-align: center;
}

.eyebrow {
  color: var(--coral-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  margin: 0 0 .65rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.14;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  margin: 0;
}

.hero > p:last-child {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  margin: 1rem auto 0;
  max-width: 760px;
}

.layout-shell {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(175px, .31fr) minmax(0, 1.69fr);
  margin: 0 auto;
  max-width: 1180px;
}

.stage-panel {
  background:
    linear-gradient(90deg, rgb(36 34 51 / 28%), transparent),
    linear-gradient(155deg, #2a1628, var(--aubergine) 60%, #1e1720);
  border-radius: 24px 0 0 24px;
  min-height: 660px;
  overflow: hidden;
  position: relative;
}

.stage-panel::before,
.stage-panel::after {
  background: linear-gradient(90deg, #2d1328, #734063 55%, #35162f);
  box-shadow: 13px 0 22px rgb(0 0 0 / 24%);
  content: "";
  height: 74%;
  position: absolute;
  top: 0;
  width: 48%;
}

.stage-panel::before {
  border-radius: 0 0 90% 0;
  left: -22%;
  transform: skewX(-3deg);
}

.stage-panel::after {
  border-radius: 0 0 0 90%;
  right: -27%;
  transform: skewX(4deg);
}

.spotlight {
  background: linear-gradient(175deg, rgb(255 244 205 / 62%), transparent 72%);
  clip-path: polygon(38% 0, 63% 0, 92% 100%, 4% 100%);
  height: 70%;
  left: 15%;
  opacity: .8;
  position: absolute;
  top: 3%;
  width: 70%;
}

.stage-copy {
  bottom: 2.8rem;
  color: rgb(255 255 255 / 72%);
  display: grid;
  font-size: .7rem;
  gap: .75rem;
  left: 1.6rem;
  letter-spacing: .17em;
  position: absolute;
  z-index: 2;
}

.wizard-card {
  background: var(--white);
  border: 1px solid rgb(75 33 66 / 8%);
  border-radius: 0 24px 24px 0;
  box-shadow: var(--shadow);
  min-height: 660px;
  padding: clamp(1.25rem, 3.5vw, 3.2rem);
}

.stepper {
  counter-reset: wizard-step;
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  margin: 0 0 2.3rem;
  padding: 0;
}

.stepper li {
  align-items: center;
  color: #8b8792;
  display: flex;
  flex-direction: column;
  font-size: .78rem;
  font-weight: 700;
  gap: .55rem;
  min-width: 0;
  position: relative;
  text-align: center;
}

.stepper li::after {
  background: #e5e0e3;
  content: "";
  height: 2px;
  left: calc(50% + 22px);
  position: absolute;
  right: calc(-50% + 22px);
  top: 18px;
}

.stepper li:last-child::after {
  display: none;
}

.step-number {
  align-items: center;
  background: #ece9eb;
  border-radius: 50%;
  color: #716d78;
  display: flex;
  font-size: .9rem;
  height: 36px;
  justify-content: center;
  position: relative;
  width: 36px;
  z-index: 1;
}

.stepper .active,
.stepper .done {
  color: var(--aubergine);
}

.stepper .active .step-number {
  background: var(--coral);
  color: var(--white);
}

.stepper .done .step-number {
  background: var(--sage);
  color: var(--white);
}

.stepper .done::after {
  background: var(--sage);
}

.section-heading {
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin: 0 0 .55rem;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.profile-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-option {
  position: relative;
}

.profile-option input {
  opacity: 0;
  position: absolute;
}

.profile-card {
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  height: 100%;
  justify-content: center;
  min-height: 130px;
  padding: 1rem .75rem;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.profile-card:hover {
  border-color: var(--aubergine-2);
  transform: translateY(-2px);
}

.profile-option input:focus-visible + .profile-card,
.profile-option input:checked + .profile-card {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgb(239 106 91 / 15%);
}

.profile-option input:checked + .profile-card {
  background: #fffaf8;
}

.profile-choice {
  background: var(--cream-2);
  border-radius: 999px;
  color: var(--aubergine);
  font-size: .7rem;
  font-weight: 800;
  padding: .35rem .6rem;
}

.profile-option input:checked + .profile-card .profile-choice {
  background: var(--sage);
  color: var(--white);
}

.selection-summary {
  color: var(--aubergine);
  font-size: .84rem;
  margin: -1rem 0 1rem;
  text-align: right;
}

.selection-summary strong {
  background: var(--aubergine);
  border-radius: 999px;
  color: var(--white);
  display: inline-grid;
  margin-right: .25rem;
  min-height: 24px;
  min-width: 24px;
  place-items: center;
}

.profile-icon {
  align-items: center;
  background: var(--cream);
  border-radius: 50%;
  color: var(--aubergine);
  display: flex;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.profile-card strong {
  font-size: .91rem;
  line-height: 1.3;
}

.form-grid {
  display: grid;
  gap: 1rem 1.15rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.identity-grid {
  margin-top: 1.5rem;
}

.profile-activities {
  display: grid;
  gap: 1.2rem;
}

.profile-activity-card {
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem;
}

.profile-activity-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: .8rem;
  margin-bottom: 1rem;
  padding-bottom: .9rem;
}

.profile-activity-heading > div > span {
  color: var(--coral-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profile-activity-heading h3 {
  font-size: 1.2rem;
  margin: .15rem 0 0;
}

.profile-picker {
  background: #f7f1f6;
  border: 1px solid rgb(75 33 66 / 16%);
  border-radius: 12px;
  padding: 1rem;
}

.field {
  display: grid;
  gap: .45rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  font-size: .9rem;
  font-weight: 750;
}

.field small,
.help-text {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--white);
  border: 1.5px solid #cbc4c9;
  border-radius: 10px;
  min-height: 46px;
  padding: .75rem .85rem;
  width: 100%;
}

textarea {
  min-height: 105px;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(239 106 91 / 40%);
  outline-offset: 2px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.check-row {
  align-items: flex-start;
  background: #fbf9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: .75rem;
  padding: .85rem;
}

.check-row input {
  accent-color: var(--aubergine);
  flex: 0 0 auto;
  height: 18px;
  margin-top: .1rem;
  width: 18px;
}

.notice {
  background: var(--amber-soft);
  border-left: 4px solid #d89532;
  border-radius: 8px;
  color: #66420f;
  font-size: .88rem;
  line-height: 1.55;
  margin: 1.25rem 0;
  padding: .85rem 1rem;
}

.notice.info {
  background: #f0edf7;
  border-color: var(--aubergine-2);
  color: var(--aubergine);
}

.documents-list {
  display: grid;
  gap: .8rem;
}

.document-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: .8rem;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr);
  padding: 1rem;
}

.document-row strong,
.document-row span {
  display: block;
}

.document-row span {
  color: var(--muted);
  font-size: .8rem;
  margin-top: .3rem;
}

.document-row input[type="file"] {
  font-size: .76rem;
  max-width: 100%;
}

.document-row.ready {
  background: var(--sage-soft);
  border-color: rgb(47 143 114 / 45%);
}

.document-row .document-scope {
  color: var(--coral-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  margin: 0 0 .4rem;
  text-transform: uppercase;
}

.document-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: -1rem 0 1rem;
}

.document-legend span {
  background: var(--cream-2);
  border-radius: 999px;
  color: var(--aubergine);
  font-size: .7rem;
  font-weight: 750;
  padding: .35rem .65rem;
}

.consent-box {
  margin-top: 1.2rem;
}

.wizard-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: space-between;
  margin-top: 2rem;
}

.button {
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  min-height: 48px;
  padding: .8rem 1.35rem;
}

.button.primary {
  background: var(--coral);
  color: var(--white);
  margin-left: auto;
  min-width: 180px;
}

.button.primary:hover {
  background: var(--coral-dark);
}

.button.secondary {
  background: var(--white);
  border: 1.5px solid var(--aubergine);
  color: var(--aubergine);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.error-summary {
  background: var(--red-soft);
  border: 1px solid rgb(183 59 59 / 35%);
  border-radius: 10px;
  color: var(--red);
  margin-bottom: 1.1rem;
  padding: .8rem 1rem;
}

.result-hero {
  border-radius: 16px;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
}

.result-hero.likely {
  background: var(--sage-soft);
  border: 1px solid rgb(47 143 114 / 35%);
}

.result-hero.review {
  background: var(--amber-soft);
  border: 1px solid rgb(164 97 17 / 28%);
}

.result-hero.not-now {
  background: var(--red-soft);
  border: 1px solid rgb(183 59 59 / 28%);
}

.result-hero h2 {
  margin: 0 0 .45rem;
}

.result-hero p {
  line-height: 1.5;
  margin: 0;
}

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

.result-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.result-card.full {
  grid-column: 1 / -1;
}

.result-card h3 {
  font-size: 1.1rem;
  margin: 0 0 .75rem;
}

.result-card ul,
.result-card ol {
  line-height: 1.55;
  margin: 0;
  padding-left: 1.25rem;
}

.result-card li + li {
  margin-top: .45rem;
}

.status-dot {
  border-radius: 50%;
  display: inline-block;
  height: .65rem;
  margin-right: .5rem;
  width: .65rem;
}

.status-dot.ok { background: var(--sage); }
.status-dot.warn { background: #d89532; }
.status-dot.stop { background: var(--red); }

.funding-amount {
  color: var(--aubergine);
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.applications-panel {
  border-top: 2px solid var(--cream-2);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.applications-heading,
.application-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.applications-heading h3 {
  font-size: 1.45rem;
  margin: 0;
}

.application-count {
  background: var(--aubergine);
  border-radius: 999px;
  color: var(--white);
  font-size: .75rem;
  font-weight: 800;
  padding: .45rem .75rem;
  white-space: nowrap;
}

.applications-list {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}

.application-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.application-card.current {
  border-color: var(--aubergine-2);
  box-shadow: inset 4px 0 var(--aubergine-2);
}

.application-kicker {
  color: var(--coral-dark);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.application-card h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  margin: .2rem 0;
}

.application-card p {
  color: var(--muted);
  font-size: .78rem;
  margin: 0;
}

.small-button {
  background: var(--white);
  border: 1px solid var(--aubergine);
  border-radius: 8px;
  color: var(--aubergine);
  font-size: .75rem;
  font-weight: 800;
  padding: .45rem .7rem;
}

.application-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .85rem;
}

.status-chip {
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  padding: .35rem .6rem;
}

.status-chip.success { background: var(--sage-soft); color: #1f6b56; }
.status-chip.warning { background: var(--amber-soft); color: var(--amber); }
.status-chip.danger { background: var(--red-soft); color: var(--red); }
.status-chip.progress { background: #e9efff; color: #3855a4; }
.status-chip.neutral { background: #efedf0; color: var(--muted); }

.accepted-summary {
  background: #f6f4f5;
  border-radius: 10px;
  display: grid;
  gap: .25rem;
  margin-top: 1rem;
  padding: .85rem 1rem;
}

.accepted-summary.has-accepted {
  background: var(--sage-soft);
}

.accepted-summary strong {
  color: var(--aubergine);
  font-size: .82rem;
}

.accepted-summary span {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.trust-strip {
  background: rgb(255 255 255 / 72%);
  border: 1px solid rgb(75 33 66 / 9%);
  border-radius: 16px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.25rem auto 0;
  max-width: 980px;
  padding: 1rem;
}

.trust-strip div {
  display: grid;
  gap: .15rem;
  padding: .2rem 1rem;
  text-align: center;
}

.trust-strip div + div {
  border-left: 1px solid var(--line);
}

.trust-strip strong {
  color: var(--aubergine);
  font-size: .88rem;
}

.trust-strip span {
  color: var(--muted);
  font-size: .75rem;
}

footer {
  align-items: center;
  border-top: 1px solid rgb(75 33 66 / 10%);
  color: var(--muted);
  display: flex;
  font-size: .78rem;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1.4rem clamp(1rem, 4vw, 4.5rem);
}

footer p {
  margin: 0;
}

footer nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

dialog {
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 580px;
  padding: 2rem;
  width: calc(100% - 2rem);
}

dialog::backdrop {
  background: rgb(24 15 23 / 56%);
  backdrop-filter: blur(3px);
}

.dialog-close {
  background: var(--cream);
  border: 0;
  border-radius: 50%;
  font-size: 1.4rem;
  height: 36px;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 36px;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-shell {
    grid-template-columns: 1fr;
  }

  .stage-panel {
    border-radius: 20px 20px 0 0;
    min-height: 90px;
  }

  .stage-panel::before,
  .stage-panel::after,
  .spotlight {
    display: none;
  }

  .stage-copy {
    align-items: center;
    bottom: auto;
    display: flex;
    flex-wrap: wrap;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: absolute;
  }

  .wizard-card {
    border-radius: 0 0 20px 20px;
  }
}

@media (max-width: 650px) {
  .site-header {
    min-height: 68px;
  }

  .brand img {
    height: 46px;
    max-width: 205px;
  }

  .secure-label {
    display: none;
  }

  main {
    padding-top: 1.8rem;
  }

  .hero {
    text-align: left;
  }

  .wizard-card {
    padding: 1.15rem;
  }

  .stepper {
    gap: .2rem;
  }

  .stepper li {
    font-size: .6rem;
  }

  .step-number {
    height: 30px;
    width: 30px;
  }

  .stepper li::after {
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    top: 15px;
  }

  .profile-grid,
  .form-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .document-row {
    grid-template-columns: 1fr;
  }

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

  .applications-heading,
  .application-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .button.primary {
    margin-left: 0;
  }

  .result-card.full {
    grid-column: auto;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .trust-strip div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: .7rem;
    padding-top: .9rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .hero,
  .stage-panel,
  .stepper,
  .wizard-actions,
  .trust-strip,
  footer {
    display: none !important;
  }

  body,
  main,
  .wizard-card {
    background: white;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }
}
