:root {
  --bg: #83cbcc;
  --bg-dark: #6db9ba;
  --panel: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);
  --accent: #ffffff;
  --button-bg: #f9f9f9;
  --button-text: #2a4d4e;
  --line: rgba(255, 255, 255, 0.55);
  --error: #ffd7d7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-dark) 100%);
  color: var(--text);
  font-family: "Lato", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

.waves {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
.waves svg { width: 100%; height: 18vh; display: block; }
.waves path { fill: rgba(255, 255, 255, 0.18); }

.topbar {
  position: relative;
  z-index: 2;
  padding: 20px 28px;
}
.brand {
  height: 100px;
  display: block;
}

.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 3;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.3s ease;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 28px 140px;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
}

.screen { width: 100%; animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.q-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin-right: 10px;
  vertical-align: middle;
}

.q-title {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 22px;
}

.q-help {
  font-size: 13px;
  color: var(--muted);
  margin: -14px 0 18px;
}

/* Text / long text / date inputs */
.text-input, .long-text {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  color: #fff;
  font-size: 20px;
  font-family: inherit;
  padding: 10px 2px;
  outline: none;
}
.text-input::placeholder, .long-text::placeholder { color: rgba(255,255,255,0.55); }
.text-input:focus, .long-text:focus { border-bottom-color: #fff; }
.long-text { resize: vertical; min-height: 90px; }

.date-row { display: flex; align-items: flex-end; gap: 8px; }
.date-row .field { display: flex; flex-direction: column; gap: 4px; }
.date-row label { font-size: 12px; color: var(--muted); }
.date-row input {
  width: 72px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  color: #fff;
  font-size: 20px;
  font-family: inherit;
  padding: 8px 2px;
  outline: none;
}
.date-row input:focus { border-bottom-color: #fff; }
.date-sep { padding-bottom: 10px; opacity: 0.7; }
.date-picker-btn {
  margin-bottom: 8px;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.date-picker-btn:hover { background: rgba(255,255,255,0.2); }
.native-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Choice list (single / multi) */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.choice:hover { background: rgba(255,255,255,0.14); }
.choice.selected { border-color: #fff; background: rgba(255,255,255,0.22); }
.choice .key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  flex-shrink: 0;
}
.choice input[type="text"] {
  margin-top: 8px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 15px;
  padding: 6px 2px;
  outline: none;
}
.choice-other-wrap { display: flex; flex-direction: column; width: 100%; }

/* Matrix */
.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  margin-bottom: 8px;
}
.matrix-table th {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px 10px;
  text-align: center;
}
.matrix-table th:first-child { text-align: left; }
.matrix-table td {
  padding: 12px 8px;
  text-align: center;
  background: rgba(255,255,255,0.06);
}
/* Fixed width on every dot column (as opposed to letting the table stretch
   columns proportionally) keeps the gap between radio dots visually the
   same regardless of whether a row has 2 columns (Yes/No) or 4
   (Poor/Fair/Good/Excellent) - only the label column grows to fill space. */
.matrix-table th:not(:first-child),
.matrix-table td:not(:first-child) {
  width: 64px;
}
.matrix-table tr td:first-child {
  text-align: left;
  border-radius: 8px 0 0 8px;
  font-size: 15px;
}
.matrix-table tr td:last-child { border-radius: 0 8px 8px 0; }
.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.radio-dot.selected { border-color: #fff; }
.radio-dot.selected::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}
.clear-all {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  padding: 0 0 18px;
}

/* Yes/No */
.yesno { display: flex; flex-direction: column; gap: 10px; max-width: 260px; margin-bottom: 18px; }

.actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.btn-primary {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { filter: brightness(0.97); }
.btn-primary.shake { animation: shake 0.32s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.hint { font-size: 12px; color: var(--muted); }

/* Language picker */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.lang-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  font-size: 16px;
}
.lang-choice:hover { background: rgba(255,255,255,0.16); }
.lang-choice .flag { font-size: 26px; }

/* Thank you / error screens */
.center-screen { text-align: center; }
.center-screen h1 { font-size: 30px; margin-bottom: 12px; }
.center-screen p { color: var(--muted); font-size: 16px; max-width: 440px; margin: 0 auto; }

/* Honeypot - visually hidden but present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer.foot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  gap: 8px;
}
.nav-arrow {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:disabled { opacity: 0.35; cursor: default; }
.nav-arrow-right svg { transform: scaleX(-1); }

@media (max-width: 480px) {
  .q-title { font-size: 21px; }
  .lang-grid { grid-template-columns: 1fr; }
  .app { padding: 32px 18px 130px; }
}
