/* WAUDIT survey — styled to match the Waudit dashboard (navy tiles, white panels, serif type). */

:root {
  --page: #eceef2;
  --panel: #f7f7f8;
  --panel-line: #e1e4ea;
  --ink: #10233d;
  --ink-muted: #5b6a7e;

  --navy: #0c2b4d;
  --navy-2: #143a63;
  --navy-3: #1f4a78;
  --on-navy: #ffffff;
  --on-navy-muted: #b6c3d5;
  --on-navy-line: rgba(255, 255, 255, 0.16);

  --blue: #1e7be0;
  --indigo: #3f51b5;
  --green: #2e8b3e;
  --orange: #ef8a17;
  --error: #ff9e8f;

  --radius-card: 8px;
  --radius-panel: 12px;
  --shadow-panel: 0 1px 2px rgba(16, 35, 61, 0.06), 0 2px 8px rgba(16, 35, 61, 0.05);
  --shadow-card: 0 14px 34px rgba(12, 43, 77, 0.22);

  --font: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --dur: 460ms;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  overflow-x: clip;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  padding: 18px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-line);
}
.brand-text { flex: 1; min-width: 0; }
.brand-text h1 { margin: 0; font-size: 1.6rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.brand-text p { margin: 2px 0 0; color: var(--ink-muted); font-size: 0.95rem; }

/* Colored square tiles, like the section headers on the dashboard */
.tile {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--accent, var(--blue));
  color: #fff;
  flex: none;
}
.tile .icon { width: 18px; height: 18px; }
.tile-lg { width: 38px; height: 38px; border-radius: 8px; }
.tile-lg .icon { width: 22px; height: 22px; }
.tile-sm { width: 24px; height: 24px; border-radius: 6px; }
.tile-sm .icon { width: 14px; height: 14px; }

/* ---------- Section chips ---------- */
.chips {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip .tile { background: #c9d0db; transition: background 0.2s; }
.chip:hover { color: var(--ink); border-color: #c7cdd7; }
.chip.is-done .tile, .chip.is-current .tile { background: var(--accent); }
.chip.is-current {
  color: var(--ink);
  font-weight: 600;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Progress ---------- */
.progress { display: flex; align-items: center; gap: 12px; }
.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #dde1e8;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--navy);
  transition: width var(--dur) var(--ease);
}
.progress-text { font-size: 0.85rem; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Card deck ---------- */
.stage { margin-top: 22px; }

.deck {
  position: relative;
  padding-bottom: 26px; /* room for the stacked cards peeking out below */
}

.ghost {
  position: absolute;
  inset: 0 0 26px 0;
  border-radius: var(--radius-card);
  pointer-events: none;
  transform-origin: 50% 100%;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.ghost.g1 { background: var(--navy-2); transform: translateY(12px) scale(0.965); z-index: 1; opacity: 0.9; }
.ghost.g2 { background: var(--navy-3); transform: translateY(24px) scale(0.93); z-index: 0; opacity: 0.55; }
.deck.stack-1 .g2, .deck.stack-0 .g2, .deck.stack-0 .g1 { opacity: 0; transform: translateY(0) scale(0.9); }

.qcard {
  position: relative;
  z-index: 2;
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 30px 32px 32px;
}
.qcard[aria-hidden='true'] { pointer-events: none; }

/* Moving cards: forward = card flies off left, next rises from the stack. Back = reverse. */
.qcard.leave-next, .qcard.leave-prev { position: absolute; left: 0; right: 0; }
.qcard.leave-next { z-index: 3; animation: leaveNext var(--dur) var(--ease) forwards; }
.qcard.leave-prev { z-index: 1; animation: leavePrev var(--dur) var(--ease) forwards; }
/* rise from / sink into the stack, which is anchored at the bottom edge */
.qcard.enter-next, .qcard.leave-prev { transform-origin: 50% 100%; }
.qcard.enter-next { animation: enterNext var(--dur) var(--ease) both; }
.qcard.enter-prev { z-index: 3; animation: enterPrev var(--dur) var(--ease) both; }

@keyframes leaveNext {
  to { transform: translateX(-112%) rotate(-5deg); opacity: 0; }
}
@keyframes enterNext {
  from { transform: translateY(12px) scale(0.965); opacity: 0.35; }
  to { transform: none; opacity: 1; }
}
@keyframes enterPrev {
  from { transform: translateX(-112%) rotate(-5deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes leavePrev {
  to { transform: translateY(12px) scale(0.965); opacity: 0; }
}

.qcard.shake { animation: shake 0.38s ease; }
@keyframes shake {
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

@media (prefers-reduced-motion: reduce) {
  .qcard, .ghost, .progress-fill { animation: none !important; transition: none !important; }
}

/* ---------- Card header ---------- */
.qcard-head { display: flex; gap: 16px; align-items: flex-start; }

.badge {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent, var(--blue));
  flex: none;
  margin-top: 2px;
}
.badge .icon { width: 22px; height: 22px; }

.qcard-titles { min-width: 0; flex: 1; }
.kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.qcard-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.qcard-title:focus { outline: none; }
.qcard-desc { margin: 8px 0 0; color: var(--on-navy-muted); font-size: 0.98rem; }
.qcard-desc ol { margin: 8px 0 0; padding-left: 1.25em; }
.qcard-desc li + li { margin-top: 4px; }

.qcard-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0 62px; }
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--on-navy-line);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.2s;
}
.link-pill:hover { background: rgba(255, 255, 255, 0.16); }
.link-pill .icon-sm { opacity: 0.7; }

/* Photo examples & guidance (panels on cards and in the full guide) */
.guides { margin: 20px 0 0 62px; }
.guides-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #cfe2ff;
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-btn:hover { color: #fff; }

.guide {
  border: 1px solid var(--on-navy-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.guide + .guide { margin-top: 8px; }
.guide summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 6px;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary .icon:first-child { color: #f6c445; }
.guide-name { flex: 1; min-width: 0; }
.guide-count { font-weight: 400; font-size: 0.85rem; color: var(--on-navy-muted); white-space: nowrap; }
.guide summary:hover { background: rgba(255, 255, 255, 0.05); }
.guide summary:focus-visible { outline: 2px solid #7fb6ff; }
.guide-chev { opacity: 0.7; transition: transform 0.2s; }
.guide[open] .guide-chev { transform: rotate(180deg); }
.guide-body { padding: 0 14px 14px; }
.guide-tips { margin: 0; padding-left: 1.2em; color: #dbe3ee; font-size: 0.93rem; }
.guide-tips li + li { margin-top: 4px; }
.guide-album { margin: 14px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--on-navy-muted); }
.guide-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.guide-album + .guide-thumbs { margin-top: 6px; }
.guide-thumb {
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  cursor: zoom-in;
  aspect-ratio: 1;
}
.guide-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.guide-thumb:hover img { transform: scale(1.05); }
.guide-thumb:focus-visible { outline: 2px solid #7fb6ff; outline-offset: 2px; }

/* Dialogs: full photo guide and photo viewer */
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.icon-btn:focus-visible { outline: 2px solid #7fb6ff; outline-offset: 2px; }
.icon-btn[hidden] { display: none; }

.guide-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--navy);
  color: var(--on-navy);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.guide-dialog[open] { display: flex; flex-direction: column; }
.guide-dialog::backdrop, .lightbox::backdrop { background: rgba(8, 22, 40, 0.6); }
.guide-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--on-navy-line);
}
.guide-dialog-head h2 { flex: 1; margin: 0; font-size: 1.3rem; font-weight: 600; }
.guide-dialog-body { padding: 4px 20px 24px; overflow-y: auto; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; }
.guide-note { margin: 14px 0 0; color: #dbe3ee; font-size: 0.95rem; }
.guide-dialog-body h3 {
  margin: 22px 0 10px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}

.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0;
  padding: 56px 16px 24px;
  border: 0;
  background: rgba(5, 15, 30, 0.92);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; text-align: center; max-width: 100%; }
.lb-img { display: block; max-width: min(100%, 900px); max-height: calc(100dvh - 140px); margin: 0 auto; border-radius: 6px; background: #fff; }
.lb-caption { margin-top: 10px; font-size: 0.92rem; color: #dbe3ee; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.16); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

/* ---------- Fields ---------- */
.fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px 16px;
  margin: 24px 0 0 62px;
}
.field { grid-column: span 6; min-width: 0; }
.field.w-half { grid-column: span 3; }
.field.w-third { grid-column: span 2; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.field-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
}
.req { color: var(--error); }
.field-hint { margin: -4px 0 8px; font-size: 0.88rem; color: var(--on-navy-muted); }

.input-wrap { position: relative; }
.input-wrap input, .input-wrap textarea, .input-wrap select, .other-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap textarea { resize: vertical; min-height: 64px; }
.input-wrap select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2b4d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  cursor: pointer;
}
.input-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap.has-suffix input { padding-right: 64px; }
.suffix {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--ink-muted);
  pointer-events: none;
}
.input-wrap input:focus, .input-wrap textarea:focus, .input-wrap select:focus, .other-input:focus {
  outline: none;
  border-color: #7fb6ff;
  box-shadow: 0 0 0 3px rgba(127, 182, 255, 0.35);
}
::placeholder { color: #8a96a8; }

/* Sliders (number fields) */
.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 16px;
  align-items: start;
}
.field.w-third .slider-row, .field.w-half .slider-row { grid-template-columns: 1fr; gap: 6px; }
.field.w-third .slider-track, .field.w-half .slider-track { order: 2; padding-top: 2px; }
.slider-track { padding-top: 10px; min-width: 0; }

.range {
  --pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #7fb6ff 0 var(--pct), rgba(255, 255, 255, 0.18) var(--pct) 100%);
}
.range::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: #7fb6ff; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.range::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(127, 182, 255, 0.45); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(127, 182, 255, 0.45); }

/* Not answered yet: thumb parked at the start, dimmed */
.slider-row.is-unset .range::-webkit-slider-thumb { background: #9fb0c6; border-color: #9fb0c6; }
.slider-row.is-unset .range::-moz-range-thumb { background: #9fb0c6; border-color: #9fb0c6; }
.slider-row.is-unset .range::-moz-range-progress { background: transparent; }

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--on-navy-muted);
  font-variant-numeric: tabular-nums;
}

/* Choice options */
.options { display: grid; gap: 8px; }
.options-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--on-navy-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  line-height: 1.35;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.opt:hover { background: rgba(255, 255, 255, 0.09); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt:focus-within { border-color: #7fb6ff; box-shadow: 0 0 0 3px rgba(127, 182, 255, 0.3); }
.opt.is-on { background: #fff; color: var(--ink); border-color: #fff; }

.mark {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.55);
  transition: border-color 0.15s, background 0.15s;
}
.mark-dot { border-radius: 50%; }
.mark-box { border-radius: 5px; }
.mark .icon { width: 14px; height: 14px; stroke-width: 3; opacity: 0; color: #fff; }
.opt.is-on .mark { border-color: var(--blue); }
.opt.is-on .mark-dot { box-shadow: inset 0 0 0 3px #fff; background: var(--blue); }
.opt.is-on .mark-box { background: var(--blue); }
.opt.is-on .mark .icon { opacity: 1; }

.other-row { grid-column: 1 / -1; }
.select-other { margin-top: 8px; }
.other-row[hidden] { display: none; }

/* Errors */
.field-error { margin: 6px 0 0; font-size: 0.88rem; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.field.has-error .input-wrap input,
.field.has-error .input-wrap textarea,
.field.has-error .input-wrap select,
.field.has-error .other-input { border-color: var(--error); }
.field.has-error .opt:not(.is-on) { border-color: rgba(255, 158, 143, 0.6); }

/* File uploads */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe3ee;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone:hover, .dropzone.is-over { background: rgba(255, 255, 255, 0.09); border-color: #7fb6ff; }
.file-input:focus-visible + .dropzone { outline: 2px solid #7fb6ff; outline-offset: 2px; }
.dropzone strong { color: #fff; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list:empty { display: none; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
}
.file-icon { display: grid; color: var(--on-navy-muted); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--on-navy-muted); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.file-item.is-done .file-icon { color: #7fdc8f; }
.file-item.is-error .file-icon, .file-item.is-error .file-meta { color: var(--error); white-space: normal; }
.file-btn {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--on-navy-muted);
  cursor: pointer;
  flex: none;
}
.file-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.file-btn:focus-visible { outline: 2px solid #7fb6ff; }

/* Password screen: only the card shows until the survey is unlocked */
body.is-locked .chips, body.is-locked .progress, body.is-locked .actions,
body.is-locked #open-guide, body.is-locked #export-now { display: none; }
body.is-locked .panel-head { border-bottom: 0; padding-bottom: 0; }
.gate-form { display: grid; gap: 16px; margin: 22px 0 0 62px; max-width: 420px; }
.gate-form .pill { justify-self: start; }

.review-error { margin: 18px 0 0 62px; color: var(--error); font-size: 0.95rem; }
.review-error:empty { display: none; }
.pill:disabled { opacity: 0.7; cursor: progress; }

/* ---------- Intro card ---------- */
.qcard-body { margin: 18px 0 0 62px; }
.lead { margin: 0 0 12px; color: #dbe3ee; }
.eyebrow {
  margin: 22px 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.intro-sections { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.intro-sections li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--on-navy-line);
}
.intro-sections li > span:last-child { display: flex; flex-direction: column; }
.intro-sections .muted { color: var(--on-navy-muted); font-size: 0.9rem; }
.contacts { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--on-navy-line); font-size: 0.92rem; }
.contacts-title { margin: 0 0 6px; color: var(--on-navy-muted); }
.contact { margin: 2px 0; overflow-wrap: anywhere; }
.contact a { color: #cfe2ff; }

/* ---------- Review card ---------- */
.review { margin: 20px 0 0 62px; display: grid; gap: 22px; }
.review-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 20px;
  gap: 14px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid var(--on-navy-line);
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.93rem;
  transition: background 0.15s;
}
.review-row:hover { background: rgba(255, 255, 255, 0.06); }
.review-row:focus-visible { outline: 2px solid #7fb6ff; }
.review-q { color: var(--on-navy-muted); }
.review-a { overflow-wrap: anywhere; }
.review-a.is-empty { color: rgba(255, 255, 255, 0.35); font-style: italic; }
.review-edit { opacity: 0; color: var(--on-navy-muted); transition: opacity 0.15s; }
.review-row:hover .review-edit, .review-row:focus-visible .review-edit { opacity: 1; }

/* ---------- Done card ---------- */
.qcard-done { text-align: center; padding: 44px 32px; }
.done-mark {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  color: var(--green);
}
.done-mark .icon { width: 32px; height: 32px; stroke-width: 2.6; }
.qcard-done .qcard-desc { max-width: 460px; margin: 10px auto 0; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- Pills (bottom bar buttons) ---------- */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.save-status { flex: 1; text-align: center; font-size: 0.85rem; color: var(--ink-muted); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pill[hidden] { display: none; }
.pill-sm { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; gap: 8px; }
.pill-sm .icon { width: 17px; height: 17px; }

.pill-navy { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(12, 43, 77, 0.25); }
.pill-navy:hover { background: var(--navy-2); }
.pill-navy .icon:first-child { color: #f6c445; }

.pill-outline { background: #fff; color: var(--ink); border-color: var(--navy); }
.pill-outline:hover { background: #f0f3f8; }
.pill-outline .icon { color: var(--navy); }
#export-now .icon { color: var(--green); }
#open-guide .icon { color: var(--orange); }

.pill-light { background: #fff; color: var(--navy); }
.pill-light:hover { background: #e9eef6; }
.pill-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.pill-ghost-light:hover { background: rgba(255, 255, 255, 0.08); }

/* Next sits on the right even when Back is hidden */
#next { margin-left: auto; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .shell { padding: 16px 16px 40px; }
  .panel { padding: 14px 14px; }
  .brand-text h1 { font-size: 1.3rem; }
  #export-now span { display: none; }
  #export-now { padding: 6px 10px; }

  .chip .chip-label { display: none; }
  .chip { padding: 4px; }
  .chip.is-current { padding-right: 12px; }
  .chip.is-current .chip-label { display: inline; }

  .qcard { padding: 22px 18px 24px; }
  .qcard-head { gap: 12px; }
  .badge { width: 38px; height: 38px; }
  .badge .icon { width: 19px; height: 19px; }
  .qcard-title { font-size: 1.25rem; }

  .fields, .qcard-links, .qcard-body, .review, .guides, .gate-form, .review-error { margin-left: 0; }
  #open-guide span { display: none; }
  #open-guide { padding: 6px 10px; }
  .field.w-half { grid-column: span 6; }
  .field.w-third { grid-column: span 3; }
  .options-2col { grid-template-columns: 1fr; }

  .review-row { grid-template-columns: 1fr 20px; gap: 2px 10px; }
  .review-q { grid-column: 1; }
  .review-a { grid-column: 1; grid-row: 2; }
  .review-edit { grid-row: 1 / span 2; grid-column: 2; align-self: center; opacity: 0.6; }

  .pill { padding: 10px 18px; }
  .save-status { display: none; }
}
