:root {
  --bg-ink: #04131f;
  --bg-cloud: #f4f8fb;
  --card: #ffffff;
  --brand: #005f73;
  --brand-soft: #d8f0f2;
  --highlight: #f4a261;
  --text-main: #102a43;
  --text-soft: #486581;
  --border-soft: #d9e2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 5% 8%, #def5fa 0, transparent 35%),
    radial-gradient(circle at 90% 92%, #ffd8ba 0, transparent 28%),
    linear-gradient(160deg, var(--bg-cloud) 0%, #e8eef7 100%);
  color: var(--text-main);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

.app-shell {
  position: relative;
  z-index: 2;
  max-width: 1040px;
}

.bg-shape {
  position: fixed;
  z-index: 1;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
}

.shape-a {
  width: 320px;
  height: 320px;
  background: #8ad5dc;
  top: -120px;
  right: -80px;
}

.shape-b {
  width: 280px;
  height: 280px;
  background: #ffd8ba;
  bottom: -130px;
  left: -100px;
}

.hero {
  animation: reveal 0.6s ease-out;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.hero-logo {
  max-height: 48px;
  width: auto;
  display: block;
}

.hero-eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.78rem;
}

.hero-title {
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0;
}

.hero-subtitle {
  max-width: 100%;
  color: var(--text-soft);
  font-size: 1.04rem;
}

.app-card {
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 12px 36px rgba(16, 42, 67, 0.08);
  margin-bottom: 1rem;
  animation: reveal 0.4s ease-out;
}

.btn-brand {
  background: linear-gradient(120deg, var(--brand), #0a9396);
  color: #ffffff;
  border: none;
}

.btn-brand:hover,
.btn-brand:focus {
  background: linear-gradient(120deg, #004f60, #087f82);
  color: #ffffff;
}

.form-list-item {
  border: 1px solid var(--border-soft);
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 1rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 42, 67, 0.08);
}

.question-block {
  border: 1px solid var(--border-soft);
  border-radius: 0.85rem;
  padding: 1rem;
  margin-bottom: 0.85rem;
  background: #ffffff;
}

.question-label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.badge-soft {
  background: var(--brand-soft);
  color: #003843;
  font-weight: 600;
}

.badge-warning-soft {
  background: color-mix(in srgb, var(--highlight) 24%, #ffffff);
  color: #8a3d00;
  font-weight: 600;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating action buttons panel */
#questionnaireActions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: auto;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(4, 19, 31, 0.15);
  flex-direction: column;
  gap: 0.75rem;
  display: flex;
  flex-wrap: nowrap;
}

#questionnaireActions.d-none {
  display: none !important;
}

#questionnaireActions button {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #questionnaireActions {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    background: transparent;
    box-shadow: none;
    padding: 1rem 0 0 0;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  #questionnaireActions button {
    width: auto;
    flex: 1;
  }

  .hero-head {
    gap: 0.65rem;
  }

  .hero-logo {
    max-height: 42px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .app-card {
    border-radius: 0.8rem;
  }
}
