:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #5f6b76;
  --line: #d8dee4;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --coral: #c75345;
  --amber: #a86505;
  --green-soft: #e8f6f1;
  --amber-soft: #fff6df;
  --coral-soft: #fff0ed;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow: hidden;
}

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

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 116px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  padding: 0 18px;
  text-align: center;
}

button:hover,
button:focus-visible {
  background: var(--teal-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.secondary {
  background: #e9edf0;
  color: var(--ink);
}

.secondary:hover,
.secondary:focus-visible {
  background: #dce3e7;
}

.submit-button {
  min-width: 188px;
  background: var(--coral);
}

.submit-button:hover,
.submit-button:focus-visible {
  background: #9f3e34;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  height: 100dvh;
  margin: 0 auto;
  padding: 24px 0;
  overflow: hidden;
}

.topbar {
  padding: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  width: 92px;
  color: var(--ink);
  margin-bottom: 18px;
}

.ven-logo {
  display: block;
  width: 100%;
  height: auto;
}

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

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.sidebar-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.progress-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: auto;
}

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

.progress-meter div {
  width: 16.7%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 180ms ease;
}

.step-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  position: relative;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 0 8px 12px;
  transition: background 160ms ease, color 160ms ease;
}

.step-list li:hover,
.step-list li:focus-visible {
  background: #f3f7f7;
  color: var(--ink);
  outline: none;
}

.step-list li.active {
  border-left-color: var(--teal);
  color: var(--ink);
}

.step-list li.completed {
  color: #71808c;
  padding-left: 34px;
  text-decoration: line-through;
}

.step-list li.completed::before {
  position: absolute;
  left: 11px;
  top: 50%;
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  content: "✓";
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-50%);
}

.side-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-step {
  display: none;
  padding: clamp(22px, 4vw, 42px);
}

.form-step.active {
  display: block;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

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

.flow-item,
.info-card,
.notice,
.risk-band,
.review-summary,
.privacy-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-item {
  padding: 18px;
}

.flow-marker {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

.flow-item h3,
.info-card h3,
.risk-band h3 {
  margin: 14px 0 8px;
  font-size: 1.04rem;
}

.flow-item p,
.notice,
.privacy-copy {
  color: var(--muted);
}

.notice {
  margin-top: 18px;
  padding: 18px;
  background: #f8fbfb;
}

.notice strong {
  color: var(--ink);
}

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

.info-card {
  padding: 20px;
}

.info-card.success {
  background: var(--green-soft);
}

.info-card.warning {
  background: var(--amber-soft);
}

.info-card ul,
.risk-band ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.info-card li,
.risk-band li {
  margin: 8px 0;
}

.risk-band {
  margin-top: 18px;
  padding: 20px;
  background: var(--coral-soft);
}

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

.question-stack {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 800;
}

fieldset label,
.ack-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd5db;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 12px 13px;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--teal);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

input[readonly] {
  background: #f3f7f7;
  color: var(--ink);
  cursor: default;
}

.field-error {
  border-color: var(--coral);
  outline: 3px solid rgba(199, 83, 69, 0.16);
}

.readiness-grid {
  margin-bottom: 18px;
}

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

.ack-list label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.review-summary {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 20px;
}

.review-group h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 1rem;
}

.review-group dl {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.review-group dt {
  color: var(--muted);
  font-weight: 800;
}

.review-group dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.privacy-copy {
  margin-top: 18px;
  padding: 16px;
  background: #f8fbfb;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 18px clamp(22px, 4vw, 42px);
}

.action-spacer {
  flex: 1;
}

#formMessage {
  color: var(--coral);
  font-weight: 750;
}

.hidden-field {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    overflow: visible;
  }

  .topbar {
    padding: 0;
  }

  .layout,
  .flow-grid,
  .info-columns,
  .fields-grid,
  .readiness-grid {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    position: static;
  }

  main {
    overflow: visible;
    padding-right: 0;
  }

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

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

  .action-spacer {
    display: none;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 14px 0;
  }

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

  .review-group dl {
    grid-template-columns: 1fr;
  }
}
