html {
  font-size: 17px;
}

body {
  background: #f4f6f8;
  color: #1f2937;
  font-size: 1rem;
}

.main-container {
  max-width: 760px;
  margin: 34px auto 28px;
}

.card-clean {
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 24px;
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.06),
    0 2px 8px rgba(15, 23, 42, 0.04);
}

.app-card {
  padding: 1.6rem 1.6rem 1.8rem !important;
  background: #fff;
}

.brand-header {
  margin-top: 0.25rem;
  margin-bottom: 1.75rem !important;
}

.brand-kpo {
  color: var(--q-accent, #f75e00);
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin: 0;
}

.brand-logo {
  display: block;
  max-height: 80px;
  width: auto;
  height: auto;
}

.brand-logo-link {
  text-decoration: none;
}

#questionnaire-title {
  font-size: 2.05rem;
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 0.8rem !important;
  color: #18212f;
}

#status-message,
#progress-label,
#last-saved {
  font-size: 0.95rem !important;
}

.progress-thin {
  height: 10px;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
}

#progress-bar {
  border-radius: 999px;
  background-color: var(--q-accent, #0d6efd);
}

.divider-tight {
  margin: 0.35rem 0 0.7rem 0;
  opacity: 0.15;
}

.fast-section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fast-section-buttons .btn {
  border-radius: 999px;
  font-weight: 600;
}

.question-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  color: #162032;
  word-break: break-word;
}

.option-row {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
  background: #fff;
  border: 1px solid #d8e0ea !important;
  border-radius: 12px !important;
  font-size: 1.2rem !important;
  line-height: 1.4;
  padding: 1rem 1.1rem !important;
  user-select: none;
  touch-action: manipulation;
}

.option-row:hover {
  background: #fafcff;
  border-color: var(--q-accent, #0d6efd) !important;
}

.option-row:active {
  transform: scale(0.98);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2937;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  box-sizing: border-box;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 0.35rem;
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-saved {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.btn-nav {
  width: 64px;
  height: 64px;
  min-width: 64px;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}

.btn-nav img {
  width: 64px;
  height: 64px;
  display: block;
}

.btn-nav:hover {
  filter: brightness(0.97);
}

.nav-sticky-wrap {
  margin-top: 1.4rem;
}

/* Report: question left, answer right */

.report-table {
  display: grid;
  grid-template-columns: 42% 58%;
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.report-table.report-two {
  grid-template-columns: 42% 58%;
}

.report-table.report-one {
  grid-template-columns: 1fr;
}

.report-row {
  display: contents;
}

.report-question,
.report-answer {
  width: auto !important;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.35;
}

.report-question {
  font-weight: 600;
  color: #162032;
  background: #f8fafc;
}

.report-answer {
  color: #1f2937;
  background: #ffffff;
}

.report-table.report-one .report-row {
  display: block;
  border-bottom: 1px solid #e5e7eb;
}

.report-table.report-one .report-question,
.report-table.report-one .report-answer {
  border-bottom: none;
  padding: 0.35rem 0.8rem;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.footer-legal {
  padding-top: 0.25rem;
  padding-bottom: 1.1rem;
}

.footer-links,
.footer-sites {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* Minimal Bootstrap fallbacks */

.container {
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-right: auto;
  margin-left: auto;
}

.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.bg-white { background: #fff !important; }
.small { font-size: 0.875em; }
.text-muted { color: #6b7280 !important; }
.text-danger { color: #dc3545 !important; }
.text-center { text-align: center !important; }

.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  background: transparent;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.btn-primary {
  color: #fff;
  background: var(--q-accent, #0d6efd);
  border-color: var(--q-accent, #0d6efd);
}

.btn-secondary {
  color: #fff;
  background: #6c757d;
  border-color: #6c757d;
}

.btn-outline-primary {
  color: var(--q-accent, #0d6efd);
  border-color: var(--q-accent, #0d6efd);
  background: #fff;
}

.btn-outline-secondary {
  color: #374151;
  border-color: #adb5bd;
  background: #fff;
}

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.alert-danger {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
}

@media (min-width: 768px) {
  .p-md-4 {
    padding: 1.5rem !important;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 18px;
  }

  .main-container {
    margin: 18px auto 22px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .brand-header {
    justify-content: center !important;
    text-align: center;
    gap: 0.85rem !important;
    margin-bottom: 1.2rem !important;
  }

  .brand-kpo {
    font-size: 1.6rem;
  }

  .brand-logo {
    max-height: 60px;
  }

  #questionnaire-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.7rem !important;
  }

  .question-title {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .option-row {
    font-size: 1.3rem !important;
    padding: 1.05rem !important;
  }

  .nav-sticky-wrap {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin-top: 1rem;
    padding-top: 0.55rem;
    padding-bottom: calc(0.2rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      to top,
      rgba(244, 246, 248, 0.98) 0%,
      rgba(244, 246, 248, 0.94) 70%,
      rgba(244, 246, 248, 0) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .nav-sticky-wrap .nav-actions {
    margin-top: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
      0 8px 24px rgba(15, 23, 42, 0.08),
      0 2px 8px rgba(15, 23, 42, 0.05);
  }

  .app-card {
    padding-bottom: 5.4rem !important;
  }

  .btn-nav {
    width: 56px;
    height: 56px;
    min-width: 56px;
  }

  .btn-nav img {
    width: 56px;
    height: 56px;
  }

  .nav-saved {
    font-size: 0.85rem !important;
  }

  .report-table,
  .report-table.report-two {
    grid-template-columns: 1fr;
  }

  .report-row {
    display: block;
    border-bottom: 1px solid #e5e7eb;
  }

  .report-question,
  .report-answer {
    border-bottom: none;
    padding: 0.25rem 0.8rem;
  }

  .report-question {
    padding-top: 0.65rem;
  }

  .report-answer {
    padding-bottom: 0.65rem;
  }
}