:root {
  --ink: #17211f;
  --muted: #63716c;
  --line: #d8e1de;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --green: #16755f;
  --green-dark: #0d4f43;
  --gold: #d4a12c;
  --red: #b33d32;
  --sky: #dceff2;
  --shadow: 0 18px 48px rgba(20, 36, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(22, 117, 95, 0.08), transparent 38%),
    linear-gradient(0deg, #eef5f3, #fbfcfa);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 28px 22px;
  background: #102b25;
  color: #f7fbf9;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  font-weight: 800;
}

.brand strong,
.brand small,
.progress-item strong,
.progress-item small {
  display: block;
}

.brand small,
.progress-item small {
  margin-top: 3px;
  color: rgba(247, 251, 249, 0.68);
}

.progress-list {
  display: grid;
  gap: 10px;
}

.progress-item {
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.progress-item.active {
  background: #f7fbf9;
  color: var(--ink);
}

.progress-item.active small {
  color: var(--muted);
}

.step-dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.86rem;
  font-weight: 800;
}

.active .step-dot {
  color: #fff;
  background: var(--green);
}

.support-box {
  margin-top: auto;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.support-kicker,
.eyebrow,
.jurisdiction,
.note-block span {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.support-box .support-kicker {
  color: #f3cc64;
}

.support-box p {
  margin: 8px 0 0;
  color: rgba(247, 251, 249, 0.72);
  line-height: 1.5;
}

.main-panel {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 58px) 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow,
.topbar h1 {
  margin: 0;
}

.topbar h1 {
  margin-top: 4px;
  font-size: 2rem;
}

.save-state {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.save-state span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.hero-band {
  min-height: 180px;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 38px);
  margin-bottom: 24px;
  background:
    linear-gradient(120deg, rgba(16, 43, 37, 0.92), rgba(18, 91, 78, 0.82)),
    url("https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
}

.hero-band h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.jurisdiction {
  color: #f3cc64;
}

.hero-stat {
  flex: 0 0 auto;
  width: 150px;
  min-height: 116px;
  border-radius: 8px;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-stat strong {
  font-size: 2.35rem;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.76);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.form-card,
.insight-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.form-card {
  padding: clamp(22px, 3vw, 34px);
}

.meter {
  margin-bottom: 26px;
  display: grid;
  gap: 10px;
}

.meter span {
  color: var(--muted);
  font-weight: 700;
}

.meter-track {
  height: 9px;
  border-radius: 999px;
  background: #e7eeeb;
  overflow: hidden;
}

.meter-fill {
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 180ms ease;
}

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

.step {
  display: none;
}

.step.active {
  display: grid;
  gap: 18px;
}

legend {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 800;
}

.step-copy {
  max-width: 670px;
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  color: #2b3835;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cdd9d6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 117, 95, 0.12);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.choice-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid #cdd9d6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.choice-card input {
  width: 18px;
  min-height: 18px;
}

.choice-card span {
  color: var(--ink);
  font-size: 1.1rem;
}

.allocation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 16px;
  align-items: end;
}

output {
  min-height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--sky);
  color: var(--green-dark);
  font-weight: 850;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-list div {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}

.review-list span {
  color: var(--muted);
}

.confirm-row {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  color: var(--muted);
  font-weight: 650;
}

.confirm-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.actions {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.primary,
.secondary {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 850;
  cursor: pointer;
}

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

.secondary {
  color: var(--green-dark);
  background: #e6f1ee;
}

.secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.insight-panel {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.note-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.note-block p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.document-preview {
  min-height: 250px;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 13px;
}

.doc-header {
  width: 86px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--red), var(--gold));
}

.doc-line {
  height: 10px;
  width: 72%;
  border-radius: 999px;
  background: #dce5e2;
}

.doc-line.long {
  width: 100%;
}

.doc-line.medium {
  width: 54%;
}

.signature-row {
  margin-top: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.signature-row span {
  height: 1px;
  background: #9aaba5;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

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

  .support-box {
    display: none;
  }

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

@media (max-width: 660px) {
  .main-panel,
  .sidebar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar,
  .hero-band {
    align-items: stretch;
    flex-direction: column;
  }

  .save-state,
  .hero-stat {
    width: fit-content;
  }

  .progress-list,
  .two-col,
  .choice-grid,
  .allocation-row {
    grid-template-columns: 1fr;
  }

  .review-list div {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    flex-direction: column-reverse;
  }

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