:root {
  --accent: #5ca4b7;
  --accent-2: #e46671;
  --accent-soft: #edf7f8;
  --ink: #19262d;
  --muted: #6b767d;
  --line: #dce4e8;
  --surface: #ffffff;
  --page: #f4f7f8;
  --danger: #b73838;
  --success: #16784d;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.theme-prot { --accent: #9945c3; --accent-2: #21ad75; --accent-soft: #f6f0fa; }

.app-shell { max-width: 1120px; margin: 0 auto; padding: 34px 24px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.brand-lockup { display: flex; align-items: center; gap: 20px; }
.network-logo { width: 180px; height: 62px; object-fit: contain; object-position: left center; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
h1 { font-size: 27px; margin: 3px 0 0; font-weight: 720; letter-spacing: -.02em; }
.privacy-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; font-size: 12px; color: var(--muted); white-space: nowrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 45px rgba(20,40,50,.08); overflow: hidden; }
.progress-wrap { padding: 24px 32px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, var(--accent-soft), #fff 55%); }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.progress-track { height: 7px; border-radius: 999px; background: #e6ecef; overflow: hidden; }
.progress-bar { height: 100%; width: 10%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s ease; }

form { padding: 0 32px 30px; }
.step { display: none; padding: 32px 0 12px; }
.step.active { display: block; }
h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.02em; }
h3 { margin: 0 0 15px; font-size: 17px; }
.lead { color: var(--muted); margin: 0 0 24px; line-height: 1.55; }
.muted { color: var(--muted); font-weight: 400; }

.field { margin: 0 0 20px; }
.field label, legend { display: block; font-size: 14px; font-weight: 650; margin: 0 0 8px; }
input[type="text"], input[type="date"], select, textarea { width: 100%; border: 1px solid #cfd9de; border-radius: 11px; padding: 12px 13px; font: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field-grid { display: grid; gap: 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }

.choice-grid { border: 0; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.choice-grid legend { grid-column: 1 / -1; }
.choice-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; }
.choice-card:hover { border-color: var(--accent); }
.choice-card input { margin-top: 3px; accent-color: var(--accent); }
.choice-card span { display: flex; flex-direction: column; gap: 3px; }
.choice-card small { color: var(--muted); }
.choice-grid.compact { max-width: 520px; }

.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 16px; }
.checkbox-grid label { font-weight: 450; display: flex; gap: 8px; align-items: flex-start; }
.checkbox-grid input { margin-top: 3px; accent-color: var(--accent); }

.candidate-card, .optional-box, .declaration-box { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fbfcfc; margin-top: 20px; }
.candidate-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 22px; margin: 0; }
.candidate-card dl div { min-width: 0; }
.candidate-card dl .wide { grid-column: 1/-1; }
dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
dd { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.confirm-check { display: flex; gap: 9px; margin-top: 18px; font-size: 14px; font-weight: 600; }

.repeat-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; background: #fff; }
.repeat-card .repeat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.repeat-card .repeat-title { font-size: 15px; font-weight: 750; }
.remove-btn { border: 0; background: transparent; color: var(--danger); font-weight: 650; cursor: pointer; padding: 5px; }

.button { border: 0; border-radius: 10px; padding: 11px 17px; font: inherit; font-weight: 700; cursor: pointer; transition: transform .05s ease, opacity .15s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: #fff; }
.button.secondary { background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.button.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.button.large { padding: 13px 20px; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.nav-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.generate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.review-summary { display: grid; gap: 12px; margin: 22px 0; }
.review-item { border-left: 4px solid var(--accent); padding: 10px 14px; background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.review-item strong { display: block; margin-bottom: 4px; }
.review-item p { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.message { min-height: 20px; margin-top: 10px; font-size: 14px; }
.message.error { color: var(--danger); }
.message.success { color: var(--success); }
.hidden { display: none !important; }
.top-space { margin-top: 28px; }

footer { color: var(--muted); font-size: 12px; line-height: 1.55; max-width: 850px; margin: 18px auto 0; text-align: center; }

@media (max-width: 760px) {
  .app-shell { padding: 18px 12px 36px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .privacy-pill { white-space: normal; }
  .network-logo { width: 145px; height: 50px; }
  h1 { font-size: 23px; }
  form, .progress-wrap { padding-left: 20px; padding-right: 20px; }
  .field-grid.two, .field-grid.three, .choice-grid, .checkbox-grid, .candidate-card dl { grid-template-columns: 1fr; }
  .candidate-card dl .wide { grid-column: auto; }
}
