/* =====================================================================
   Survey-taking theme.

   Visual identity:
     - Dark navy topbar (AGORA admin look) — sticky, holds page indicator + Next
     - Cream paper content area on warm-cream background (UzprasAI palette)
     - Serif typography (Georgia / Playfair Display) for headers
     - 760 px max content shell, squared cards, hairline borders, soft shadows

   The layout intentionally has no AGORA sidebar — respondents see a
   focused single-task UI, just like UzprasAI's article pages.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  /* UzprasAI base palette */
  --bg:        #f4efe5;
  --paper:     #fffdf8;
  --ink:       #23201c;
  --muted:     #72685a;
  --line:      #d9d0c3;

  /* Dark topbar — matches AGORA admin chrome */
  --topbar:        #212529;
  --topbar-border: #2c3137;
  --topbar-text:   #f5f1e8;
  --topbar-muted:  #9aa0a8;
  --topbar-accent: #c8a45a;  /* warm gold to harmonize with cream content */

  --error:     #b3392e;
  --error-bg:  #fbeae6;
  --accent:    #3a5f8a;       /* muted blue for active inputs */
  --accent-bg: #e9eff7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body.survey-body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------
   Topbar — sticky, dark, holds page indicator + Next button
   --------------------------------------------------------------------- */

.survey-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar);
  color: var(--topbar-text);
  border-bottom: 1px solid var(--topbar-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.survey-topbar-inner {
  width: min(760px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.survey-topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.survey-topbar-parent {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--topbar-muted);
  text-decoration: none;
  font-family: 'Inter', -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.survey-topbar-parent:hover,
.survey-topbar-parent:focus-visible {
  color: var(--topbar-accent);
  outline: none;
}
.survey-topbar-parent-arrow {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 0.9;
  position: relative;
  top: -1px;
}
.survey-topbar-sep {
  color: var(--topbar-muted);
  opacity: 0.55;
  flex-shrink: 0;
  font-weight: 400;
}

.survey-topbar-agora {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--topbar-text);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.survey-topbar-agora:hover,
.survey-topbar-agora:focus-visible {
  color: var(--topbar-accent);
  outline: none;
}

.survey-topbar-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--topbar-text);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survey-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

/* Language switcher — visible only on the consent page (page_index == 1).
   Plain "LV | RU" / "RU | LV"; the current language is bold/white,
   the sibling is muted with a dotted underline so it reads as a link. */
.survey-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Inter', -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.survey-lang-current {
  font-weight: 700;
  color: var(--topbar-text);
}
.survey-lang-sep {
  color: var(--topbar-muted);
  opacity: 0.55;
}
.survey-lang-other {
  color: var(--topbar-muted);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.survey-lang-other:hover,
.survey-lang-other:focus-visible {
  color: var(--topbar-accent);
  outline: none;
}

.survey-page-indicator {
  font-family: 'Inter', -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--topbar-muted);
  white-space: nowrap;
}
.survey-page-indicator strong {
  color: var(--topbar-text);
  font-weight: 600;
}

.survey-topbar-next {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--topbar-accent);
  background: transparent;
  color: var(--topbar-accent);
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.survey-topbar-next:hover,
.survey-topbar-next:focus-visible {
  background: var(--topbar-accent);
  color: var(--topbar);
  outline: none;
}
.survey-topbar-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Visible progress bar under the topbar */
.survey-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.survey-progress-bar-fill {
  height: 100%;
  background: var(--topbar-accent);
  transition: width 0.3s ease;
}

/* ---------------------------------------------------------------------
   Content shell — UzprasAI sizing
   --------------------------------------------------------------------- */

.survey-shell {
  width: min(760px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

/* Block header at the top of each page */
.survey-block-header {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.survey-block-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.survey-block-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.survey-intro {
  margin: 0.6rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  font-size: 1rem;
  line-height: 1.7;
}
.survey-intro p {
  margin: 0 0 0.65rem;
}
.survey-intro p:last-child {
  margin-bottom: 0;
}

.survey-instruction {
  margin: 0 0 1.4rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--ink);
  background: var(--paper);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
}

/* In-page sub-group instruction (emitted by `pre_text` on a question) */
.survey-section-instruction {
  margin: 1.5rem 0 0.6rem;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--muted);
  background: rgba(255, 253, 248, 0.5);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 0.98rem;
}

/* Page-level error banner */
.survey-page-error {
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d9b4ad;
  background: var(--error-bg);
  color: var(--error);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------------
   Question wrapper
   --------------------------------------------------------------------- */

.survey-form {
  display: block;
}

.survey-questions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.survey-question {
  position: relative;
  border: 0;
  margin: 0;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top-width: 0;
}
.survey-question:first-of-type,
.survey-questions > .survey-question:nth-child(1),
.survey-section-instruction + .survey-question {
  border-top-width: 1px;
}
.survey-question.has-error {
  background: var(--error-bg);
  border-color: #d9b4ad;
}

.survey-question-title {
  display: block;
  padding: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}
.survey-qid {
  color: var(--muted);
  font-weight: 700;
  margin-right: 0.4rem;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}
.survey-required {
  color: var(--error);
  margin-left: 0.15rem;
}
.survey-error-msg {
  margin: 0.6rem 0 0;
  color: var(--error);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------
   Radio buttons
   --------------------------------------------------------------------- */

.survey-radio-group {
  display: flex;
  gap: 0.45rem;
  font-family: 'Inter', sans-serif;
}
.survey-radio-vertical   { flex-direction: column; }
.survey-radio-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}
.survey-radio-horizontal > .survey-radio-item {
  flex: 1 1 0;
  min-width: 110px;
  justify-content: center;
  text-align: center;
}

.survey-radio-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  background: #fffefb;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 44px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.survey-radio-item:hover {
  border-color: #c0856a;
  background: #fff8f1;
}
.survey-radio-item input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.survey-radio-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.survey-radio-item:has(input:checked) span {
  font-weight: 600;
}
.survey-radio-special {
  color: var(--muted);
  font-style: italic;
  background: rgba(255, 253, 248, 0.5);
}

/* ---------------------------------------------------------------------
   Slider layout — discrete stops on a horizontal track, label under each
   --------------------------------------------------------------------- */

.survey-slider {
  font-family: 'Inter', sans-serif;
  padding: 0.5rem 0.5rem 0.25rem;
}
.survey-slider-track {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 1.25rem 0.5rem 0.25rem;
}
.survey-slider-track::before {
  content: '';
  position: absolute;
  top: 1.85rem;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.survey-slider-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.survey-slider-step input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.survey-slider-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  transition: border-color 0.15s ease, background-color 0.15s ease,
              transform 0.15s ease, box-shadow 0.15s ease;
}
.survey-slider-step:hover .survey-slider-dot {
  border-color: var(--accent);
}
/* The active state is driven entirely by `:has(input:checked)`. Browsers
   give exactly one input the checked attribute for a given radio name, so
   exactly one step can ever match this selector. */
.survey-slider-step:has(input:checked) .survey-slider-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 2px 6px rgba(58, 95, 138, 0.32);
}
.survey-slider-label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.survey-slider-step:has(input:checked) .survey-slider-label {
  color: var(--ink);
  font-weight: 600;
}
.survey-slider-aux {
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}
.survey-slider-aux > label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Inline screen-out — emphasised differently from "don't know" so the
   respondent realises selecting it ends the survey. */
.survey-slider-screen-out {
  font-style: normal !important;
  color: var(--ink) !important;
}
.survey-slider-screen-out span {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.survey-slider-screen-out:has(input:checked) span {
  color: var(--error);
  font-weight: 600;
}

/* Red→navy political-spectrum gradient on the track. The pseudo-element
   that draws the connector line is replaced (not just recoloured) when
   this modifier is present. */
.survey-slider-gradient-red-blue .survey-slider-track::before {
  background: linear-gradient(
    90deg,
    #b33b3b 0%,
    #b88c2f 35%,
    var(--muted) 50%,
    #3a5f8a 65%,
    #1f3864 100%
  );
  height: 4px;
  top: 1.7rem;  /* slight nudge so the thicker bar centres on dots */
  border-radius: 2px;
}

/* ---------------------------------------------------------------------
   Icons layout — grid of icon-buttons. Mobile auto-wraps via minmax.
   --------------------------------------------------------------------- */

.survey-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}
.survey-icon-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.55rem 0.75rem;
  border: 1px solid var(--line);
  background: #fffefb;
  cursor: pointer;
  min-height: 110px;
  text-align: center;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.survey-icon-item:hover {
  border-color: #c0856a;
  background: #fff8f1;
}
.survey-icon-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.survey-icon-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.survey-icon-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
}
.survey-icon-art svg {
  width: 100%;
  height: 100%;
}
.survey-icon-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: currentColor;
}
.survey-icon-label {
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--ink);
}
.survey-icons-aux {
  display: flex;
  gap: 1.25rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}
.survey-icons-aux label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------------------------------------------------------------------
   Likert
   --------------------------------------------------------------------- */

.survey-likert {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  font-family: 'Inter', sans-serif;
}
.survey-likert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--line);
  background: #fffefb;
  cursor: pointer;
  font-size: 0.82rem;
  min-height: 66px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.survey-likert-item:hover { border-color: #c0856a; background: #fff8f1; }
.survey-likert-item input {
  margin-bottom: 0.35rem;
  accent-color: var(--accent);
}
.survey-likert-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.survey-likert-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.survey-likert-label {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 0.18rem;
}
.survey-likert-dk {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  margin-top: 0.35rem;
  background: rgba(255, 253, 248, 0.4);
}
.survey-likert-dk input { margin: 0; }

/* ---------------------------------------------------------------------
   Scale 0..10
   --------------------------------------------------------------------- */

.survey-scale011 {
  font-family: 'Inter', sans-serif;
}
.survey-scale011-anchors {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-style: italic;
}
.survey-scale011-anchor-mid { text-align: center; }
.survey-scale011-row {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0.2rem;
}
.survey-scale011-item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.5rem 0;
  border: 1px solid var(--line);
  background: #fffefb;
  cursor: pointer;
  font-size: 0.92rem;
  min-height: 44px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
}
.survey-scale011-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.survey-scale011-item:hover { border-color: #c0856a; background: #fff8f1; }
.survey-scale011-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--topbar-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.survey-scale011-dk {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding: 0.4rem 0.6rem;
  color: var(--muted);
  font-style: italic;
  cursor: pointer;
}

/* ---------------------------------------------------------------------
   Matrix — desktop table
   --------------------------------------------------------------------- */

.survey-matrix-wrapper {
  font-family: 'Inter', sans-serif;
}
.survey-matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffefb;
  border: 1px solid var(--line);
}
.survey-matrix-table th,
.survey-matrix-table td {
  padding: 0.55rem 0.35rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.survey-matrix-table tbody tr:last-child td,
.survey-matrix-table tbody tr:last-child th { border-bottom: 0; }
.survey-matrix-row-label {
  text-align: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  width: 32%;
  font-size: 0.94rem;
  padding-left: 0.85rem;
}
.survey-matrix-col-head {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: bottom;
  border-bottom: 2px solid var(--line);
}
.survey-matrix-col-num {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: var(--ink);
}
.survey-matrix-col-label {
  display: block;
  font-size: 0.7rem;
  line-height: 1.15;
  color: var(--muted);
}
.survey-matrix-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
}
.survey-matrix-cell input {
  transform: scale(1.15);
  accent-color: var(--accent);
}

/* ---------------------------------------------------------------------
   Matrix — mobile stack
   --------------------------------------------------------------------- */

.survey-matrix-stack {
  font-family: 'Inter', sans-serif;
}
.survey-matrix-stack-row {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--line);
}
.survey-matrix-stack-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.survey-matrix-stack-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}
.survey-matrix-stack-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.survey-matrix-stack-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  background: #fffefb;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 44px;
}
.survey-matrix-stack-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.survey-matrix-stack-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--ink);
  min-width: 1.5rem;
  text-align: center;
}
.survey-matrix-stack-text {
  flex: 1;
  font-size: 0.9rem;
}
.survey-matrix-stack-dk {
  background: rgba(255, 253, 248, 0.5);
  color: var(--muted);
  font-style: italic;
}

/* ---------------------------------------------------------------------
   Bottom nav (Next button mirrored at end of form)
   --------------------------------------------------------------------- */

.survey-bottom-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.survey-bottom-back,
.survey-bottom-next {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.survey-bottom-next {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.survey-bottom-next:hover {
  background: #0e0c0a;
}
/* Back is the subordinate action — outline only, muted ink. */
.survey-bottom-back {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.survey-bottom-back:hover,
.survey-bottom-back:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

/* ---------------------------------------------------------------------
   Terminal pages (consent declined / screen-out / thank you)
   --------------------------------------------------------------------- */

.survey-terminal {
  margin-top: 3rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.survey-terminal h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 1rem;
  line-height: 1.15;
}
.survey-terminal p {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  line-height: 1.7;
}
.survey-terminal p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */

.survey-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 1.2rem 0;
}
.survey-footer-inner {
  width: min(760px, calc(100vw - 2rem));
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   Honeypot — visually hidden but still in the DOM and focus tree so naive
   bots that fill every input will populate it. Real users never see it.
   --------------------------------------------------------------------- */
.survey-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------------------
   Helpers — Bootstrap d-md-block compat without Bootstrap
   --------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.d-md-block { display: block; }
.d-md-none  { display: none; }

@media (max-width: 767.98px) {
  .d-md-block { display: none !important; }
  .d-md-none  { display: block !important; }
}

/* ---------------------------------------------------------------------
   Responsive tweaks
   --------------------------------------------------------------------- */

@media (max-width: 640px) {
  .survey-topbar-inner   { padding: 0.7rem 0; gap: 0.6rem; }
  .survey-topbar-title   { font-size: 0.95rem; }
  .survey-topbar-parent  { font-size: 0.75rem; }
  .survey-topbar-agora   { font-size: 0.85rem; }
  .survey-topbar-sep     { display: none; }
  .survey-topbar-brand   { flex-direction: column; align-items: flex-start; gap: 0; }
  .survey-topbar-next    { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .survey-page-indicator { font-size: 0.7rem; letter-spacing: 0.08em; }

  .survey-shell   { padding: 1.4rem 0 3rem; }
  .survey-block-name { font-size: 1.4rem; }
  .survey-question   { padding: 1.1rem 1.1rem 1.2rem; }

  .survey-likert {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .survey-likert-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.65rem;
    text-align: left;
    padding: 0.55rem 0.7rem;
    min-height: 44px;
  }
  .survey-likert-item input { margin: 0; }
  .survey-likert-num { font-size: 0.95rem; }
  .survey-likert-label { font-size: 0.88rem; margin: 0; }
  .survey-likert-dk { margin-top: 0; }

  .survey-scale011-row { gap: 0.15rem; }
  .survey-scale011-item { font-size: 0.82rem; min-height: 38px; }

  .survey-slider-track { padding-left: 0.25rem; padding-right: 0.25rem; }
  .survey-slider-track::before { left: 0.6rem; right: 0.6rem; }
  .survey-slider-label { font-size: 0.68rem; }

  .survey-icons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .survey-icon-item  { min-height: 96px; padding: 0.65rem 0.4rem; }
  .survey-icon-art   { width: 32px; height: 32px; }
  .survey-icon-label { font-size: 0.72rem; }
}
