:root {
  --bg: #f4f6fb;
  --text: #1c2431;
  --muted: #607086;
  --primary: #5784c4;
  --card: #ffffff;
  --border: #dbe2ef;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Hero ── */
.hero {
  background: #fff;
  color: var(--primary);
  border-bottom: 2px solid #5784c4;
  padding: 2rem 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 700;
  white-space: nowrap;
}

.hero-left,
.hero-right {
  display: flex;
  align-items: center;
}

.hero-right {
  justify-content: flex-end;
  text-align: right;
  margin-top: 5px;
}

.hero-logo-img {
  display: block;
  width: min(350px, 52vw);
  height: 100px;
  object-fit: contain;
}

.hero p {
  margin: 0.4rem 0 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

/* ── Form layout ── */
.form-wrap {
  padding: 1.5rem 0 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(28, 36, 49, 0.07);
  margin-bottom: 1rem;
}

/* Name card icon + label row */
.name-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.name-card-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.name-card-header .label {
  margin-bottom: 0;
}

/* ── Inputs ── */
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
}

.textarea {
  min-height: 105px;
  resize: vertical;
}

.input:focus,
.textarea:focus {
  outline: 2px solid rgba(52, 87, 213, 0.25);
  border-color: var(--primary);
}

.suggest-wrap {
  position: relative;
}

.suggest-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 30;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(28, 36, 49, 0.07);
  max-height: 240px;
  overflow-y: auto;
}

.suggest-list.open {
  display: block;
}

.suggest-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover,
.suggest-item:focus {
  background: rgba(52, 87, 213, 0.08);
  outline: none;
}

/* ── Section navigation chips ── */
.section-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(52, 87, 213, 0.3);
}

/* ── Section card ── */
.section-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

/* ── Questions ── */
.question {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.question:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.options-inline,
.options-grid {
  display: grid;
  gap: 0.65rem;
}

.options-inline {
  grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
}

.options-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.option-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  cursor: pointer;
}

/* ── Buttons ── */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:hover {
  filter: brightness(0.93);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Alert ── */
.alert {
  border: 1px solid #fdd4d0;
  color: var(--danger);
  background: #fff4f2;
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

/* ── Section panels ── */
.section-panel {
  display: none;
}

.section-panel.active {
  display: block;
}

/* ── Thank you page ── */
.page-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.thankyou {
  text-align: center;
  max-width: 520px;
}

.thankyou .icon {
  font-size: 3rem;
  margin-bottom: 0.25rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-actions {
    flex-wrap: wrap;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
