:root {
  color-scheme: dark;
  --bg: #07100a;
  --panel: #101b12;
  --panel-strong: #172518;
  --panel-soft: #20301f;
  --gold: #d9a94f;
  --gold-light: #f5d48b;
  --text: #fff7e8;
  --muted: #cdbf9e;
  --line: rgba(245, 212, 139, 0.22);
  --danger: #ffb4a8;
  --success: #c4f4c2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 169, 79, 0.18), transparent 32rem),
    linear-gradient(135deg, #050a06 0%, var(--bg) 50%, #11190f 100%);
  color: var(--text);
  font-family:
    "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

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

.shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

.brand-panel,
.interview-panel {
  border: 1px solid var(--line);
  background: rgba(16, 27, 18, 0.86);
  box-shadow: var(--shadow);
}

.brand-panel {
  border-radius: 8px;
  padding: 28px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 28px;
  min-height: calc(100vh - 56px);
}

.brand-card {
  display: grid;
  gap: 24px;
}

.brand-logo {
  width: min(100%, 320px);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 12px 28px rgba(217, 169, 79, 0.2));
}

.eyebrow,
.step-kicker {
  margin: 0 0 8px;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h3 {
  font-size: 1.15rem;
}

.intro {
  max-width: 35rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.interview-panel {
  border-radius: 8px;
  min-height: calc(100vh - 56px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.draft-badge {
  min-width: max-content;
  border: 1px solid var(--line);
  color: var(--gold-light);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-wrap {
  display: grid;
  gap: 9px;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 247, 232, 0.12);
  overflow: hidden;
}

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

#progress-label {
  color: var(--muted);
  font-size: 0.9rem;
}

form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.step-content {
  display: grid;
  gap: 18px;
}

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

.field,
.choice-group,
.section-card {
  border: 1px solid var(--line);
  background: rgba(255, 247, 232, 0.035);
  border-radius: 8px;
  padding: 16px;
}

.field.full,
.choice-group.full,
.section-card.full {
  grid-column: 1 / -1;
}

label,
legend,
.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(245, 212, 139, 0.28);
  border-radius: 8px;
  background: rgba(7, 16, 10, 0.78);
  color: var(--text);
  padding: 13px 14px;
  min-height: 48px;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(245, 212, 139, 0.2);
}

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

.option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(245, 212, 139, 0.22);
  border-radius: 8px;
  background: rgba(7, 16, 10, 0.56);
  padding: 12px;
  cursor: pointer;
}

.option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--gold);
}

.option:has(input:checked) {
  border-color: var(--gold-light);
  background: rgba(217, 169, 79, 0.16);
}

.nested-panel {
  grid-column: 1 / -1;
  border-left: 3px solid var(--gold);
  padding: 14px 0 0 16px;
  display: grid;
  gap: 14px;
}

.bank-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(217, 169, 79, 0.08);
}

.bank-row h3 {
  grid-column: 1 / -1;
  color: var(--gold-light);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.actions-inline {
  margin-top: 18px;
  padding-top: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.button {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #151006;
}

.button-ghost {
  background: transparent;
  color: var(--gold-light);
  border-color: var(--line);
}

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

.form-errors {
  margin-top: 16px;
  border: 1px solid rgba(255, 180, 168, 0.45);
  border-radius: 8px;
  background: rgba(255, 180, 168, 0.1);
  color: var(--danger);
  padding: 14px;
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.review-grid {
  display: grid;
  gap: 14px;
}

.section-card {
  display: grid;
  gap: 12px;
}

.section-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.edit-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.answer-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1fr;
  gap: 8px 14px;
  margin: 0;
}

.answer-list dt {
  color: var(--muted);
}

.answer-list dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.empty-value {
  color: var(--muted);
}

.confirm-box,
.success-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(217, 169, 79, 0.08);
  padding: 18px;
}

.success-box h3 {
  color: var(--success);
}

.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  color: var(--text);
  line-height: 1.45;
}

.consent-option input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.send-error {
  border-color: rgba(255, 180, 168, 0.45);
  background: rgba(255, 180, 168, 0.1);
}

.service-code {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-light);
  font-weight: 800;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .brand-panel {
    position: static;
    min-height: auto;
  }

  .brand-card {
    grid-template-columns: 96px 1fr;
    align-items: center;
  }

  .brand-logo {
    width: 96px;
  }

  h1 {
    max-width: none;
    font-size: 1.9rem;
  }

  .intro {
    margin-top: 10px;
  }

  .interview-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .brand-panel,
  .interview-panel {
    padding: 18px;
  }

  .brand-card,
  .field-grid,
  .options,
  .bank-row,
  .answer-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .draft-badge {
    width: fit-content;
  }

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

  .button {
    width: 100%;
  }
}
