/*
 * UCL Fruity TwentyThree v1.1.1
 * Readability-first UCL child theme for LimeSurvey Fruity TwentyThree.
 *
 * Design principle: retain Fruity TwentyThree's interaction model and let
 * UCL purple act as an accent/structural colour, not as the reading colour
 * for every control and table cell.
 */

:root {
  --ucl-dark-purple: #361a54;
  --ucl-bright-purple: #993bff;
  --ucl-mid-purple: #ba82ff;
  --ucl-light-purple: #ddbdff;
  --ucl-pale-purple: #eedeff;
  --ucl-ultra-pale: #f8f3fc;
  --ucl-off-white: #fafafa;
  --ucl-white: #ffffff;

  /* Readability colours: intentionally neutral rather than purple. */
  --ucl-text: #242126;
  --ucl-text-soft: #55505a;
  --ucl-heading: #361a54;
  --ucl-border: #e5ddec;
  --ucl-border-strong: #b9a9c7;
  --ucl-danger: #b42318;
  --ucl-focus: rgba(153, 59, 255, 0.32);

  --ucl-font: "UCL Sans", Aptos, "Segoe UI", Arial, Helvetica, sans-serif;
  --ucl-radius: 9px;
  --ucl-content-width: 1180px;

  /* Re-point Bootstrap/Fruity primary colour away from Apple green. */
  --bs-primary: #6f2dbd;
  --bs-primary-rgb: 111, 45, 189;
  --bs-link-color: #6f2dbd;
  --bs-link-hover-color: #361a54;
}

/* --------------------------------------------------------------------------
   GLOBAL TYPOGRAPHY
   -------------------------------------------------------------------------- */

html {
  scroll-padding-top: 92px;
}

body,
body.fruity_twentythree {
  background: var(--ucl-off-white) !important;
  color: var(--ucl-text) !important;
  font-family: var(--ucl-font) !important;
  font-size: 19px !important;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body p,
body li,
body label,
body input,
body select,
body textarea,
body button,
body .btn,
body .dropdown-menu {
  font-family: var(--ucl-font) !important;
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  color: var(--ucl-heading) !important;
  font-family: var(--ucl-font) !important;
  font-weight: 650;
  letter-spacing: -0.025em;
}

p,
.survey-description,
.survey-welcome,
.group-description,
.ls-questionhelp {
  max-width: 82ch;
}

a {
  color: #6f2dbd;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ucl-dark-purple);
  text-decoration-thickness: 2px;
}

/* A single, soft but visible focus ring. Do not stack outline + dark box-shadow. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--ucl-focus) !important;
  outline-offset: 2px !important;
}

/* --------------------------------------------------------------------------
   WIDTH / PAGE FRAME
   -------------------------------------------------------------------------- */

@media (min-width: 1200px) {
  #outerframe .col-xl-8,
  .top-container .col-xl-8,
  #survey-nav .col-xl-8 {
    width: 100% !important;
    max-width: var(--ucl-content-width) !important;
    flex: 0 0 auto !important;
  }
}

#outerframe,
.top-container,
#survey-nav {
  --bs-gutter-x: 2rem;
}

/* --------------------------------------------------------------------------
   HEADER / PROGRESS
   -------------------------------------------------------------------------- */

#survey-nav.navbar {
  min-height: 70px;
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--ucl-dark-purple) !important;
  border: 0 !important;
  border-bottom: 3px solid var(--ucl-bright-purple) !important;
  box-shadow: none !important;
}

#survey-nav .logo-container {
  display: flex;
  align-items: center;
  min-height: 46px;
}

#survey-nav .logo {
  width: auto !important;
  max-width: 220px;
  max-height: 44px;
  object-fit: contain;
}

#survey-nav .navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  color: #fff !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.7) !important;
  border-radius: 7px !important;
}

#survey-nav .dropdown-menu {
  border: 1px solid var(--ucl-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 28px rgba(54,26,84,.14) !important;
}

.top-container {
  margin-bottom: .75rem !important;
  background: transparent !important;
}

.top-container .ls-progress-container {
  padding: 12px 0 4px !important;
}

.top-container .progress {
  height: 6px !important;
  overflow: hidden;
  background: var(--ucl-pale-purple) !important;
  border-radius: 99px !important;
}

.top-container .progress-bar {
  background: #6f2dbd !important;
  border-radius: 99px !important;
}

/* --------------------------------------------------------------------------
   WELCOME / GROUPS
   -------------------------------------------------------------------------- */

.survey-name {
  margin-top: .5rem;
  margin-bottom: 1rem !important;
  color: var(--ucl-heading) !important;
  font-size: clamp(2rem, 3.1vw, 2.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: -.04em;
  line-height: 1.08;
}

.survey-description,
.survey-welcome {
  color: var(--ucl-text) !important;
  font-size: 1.1rem !important;
  line-height: 1.65 !important;
}

.group-title-container {
  margin: .25rem 0 1.25rem !important;
  padding: 1rem 1.2rem !important;
  color: var(--ucl-heading) !important;
  background: var(--ucl-ultra-pale) !important;
  border: 0 !important;
  border-left: 5px solid var(--ucl-bright-purple) !important;
  border-radius: 7px !important;
}

.group-description {
  color: var(--ucl-text) !important;
  font-size: 1.02rem !important;
  line-height: 1.6 !important;
}

/* v1.1.1 hierarchy tuning: Fruity's h1/h2 defaults made page/group titles
   disproportionately large once the general reading text was improved. */
.group-title-container .group-title,
.group-title-container .ls-group-title,
.group-title-container h1,
.group-title-container h2,
.group-title-container h3,
.group-title,
.ls-group-title {
  margin-top: 0 !important;
  margin-bottom: .35rem !important;
  font-size: clamp(1.75rem, 2.5vw, 2.2rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em !important;
}

/* Keep welcome pages calm and editorial rather than poster-like. */
.survey-welcome p,
.survey-description p {
  margin-top: 0 !important;
  margin-bottom: 1.2rem !important;
}

.survey-name + .survey-description,
.survey-name + .survey-welcome {
  margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   QUESTION SURFACES + QUESTION TEXT
   -------------------------------------------------------------------------- */

.question-container {
  margin-bottom: 1.4rem !important;
  padding: 1.7rem 1.85rem !important;
  background: #fff !important;
  border: 1px solid #ebe5ef !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.question-container .question-title-container {
  margin-bottom: .72rem !important;
}

/* Normal single-line question titles are deliberately larger than v1.0. */
.question-container .question-text,
.question-container .ls-label-question,
.question-container .ls-question-text {
  color: var(--ucl-heading) !important;
  font-size: clamp(1.35rem, 1.65vw, 1.58rem) !important;
  font-weight: 650 !important;
  letter-spacing: -.018em;
  line-height: 1.28 !important;
}

.question-container .question-title-container h1,
.question-container .question-title-container h2,
.question-container .question-title-container h3,
.question-container .question-title-container h4 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/*
 * Rich question text (e.g. participant-information/consent paragraphs) must
 * not inherit title weight. A normal question consisting of one <p> retains
 * the title styling via :only-child.
 */
.question-container .ls-question-text > p:not(:only-child),
.question-container .ls-question-text > ul,
.question-container .ls-question-text > ol,
.question-container .question-text > p:not(:only-child),
.question-container .question-text > ul,
.question-container .question-text > ol {
  color: var(--ucl-text) !important;
  font-size: 1.08rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.62 !important;
}

.question-container .ls-question-text > p:not(:only-child) strong,
.question-container .question-text > p:not(:only-child) strong {
  color: var(--ucl-text) !important;
  font-weight: 650 !important;
}

.question-container .ls-question-text > p:not(:only-child) + p,
.question-container .question-text > p:not(:only-child) + p {
  margin-top: .85rem;
}

.question-container .asterisk {
  color: var(--ucl-danger) !important;
  font-weight: 700 !important;
}

.question-container .ls-question-message,
.question-container .help-block,
.ls-questionhelp,
.question-help-container {
  color: var(--ucl-text-soft) !important;
  font-size: 1rem !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

/* Validation should be readable, but not visually louder than the question. */
.question-container .ls-question-message.text-danger,
.question-container .text-danger,
.invalid-feedback,
.emtip.error {
  color: var(--ucl-danger) !important;
}

/* --------------------------------------------------------------------------
   TEXT INPUTS + SELECTS
   -------------------------------------------------------------------------- */

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select {
  min-height: 48px;
  color: var(--ucl-text) !important;
  background-color: #fff !important;
  border: 1.5px solid var(--ucl-border-strong) !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 1.05rem !important;
}

textarea.form-control,
textarea {
  min-height: 120px;
}

.form-control:hover,
.form-select:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: #846d99 !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  color: var(--ucl-text) !important;
  border-color: #6f2dbd !important;
  box-shadow: 0 0 0 3px var(--ucl-focus) !important;
}

/* Prevent the generic focus-visible rule adding a second ring to form fields. */
:where(input, select, textarea):focus-visible {
  outline: 0 !important;
}

::placeholder {
  color: #77717c !important;
  opacity: 1;
}

/* Single-choice dropdowns should look like a field, not a giant panel. */
.list-dropdown .ls-answers select,
.list-dropdown .form-select,
.list-dropdown .form-control,
.list-dropdown .bootstrap-select {
  width: 100% !important;
  max-width: 31rem !important;
}

/* Bootstrap-select / LimeSurvey enhanced select menu. */
.bootstrap-select > .dropdown-toggle {
  min-height: 48px !important;
  padding: .62rem .9rem !important;
  color: var(--ucl-text) !important;
  background: #fff !important;
  border: 1.5px solid var(--ucl-border-strong) !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
}

.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
  border-color: #6f2dbd !important;
  box-shadow: 0 0 0 3px var(--ucl-focus) !important;
  outline: 0 !important;
}

.bootstrap-select .dropdown-menu {
  max-width: min(36rem, calc(100vw - 2rem));
  padding: .35rem !important;
  background: #fff !important;
  border: 1px solid #ded6e4 !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 30px rgba(35,25,44,.16) !important;
}

.bootstrap-select .dropdown-menu li a,
.bootstrap-select .dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item {
  color: var(--ucl-text) !important;
  background: transparent !important;
  padding: .55rem .75rem !important;
  border-radius: 5px !important;
  font-size: 1.02rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}

.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li a:focus,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  color: var(--ucl-heading) !important;
  background: var(--ucl-ultra-pale) !important;
}

/* Kill Fruity Apple's green selected dropdown state. */
.bootstrap-select .dropdown-menu li.selected > a,
.bootstrap-select .dropdown-menu li.active > a,
.bootstrap-select .dropdown-menu .dropdown-item.active,
.bootstrap-select .dropdown-menu .dropdown-item.selected,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  color: var(--ucl-heading) !important;
  background: var(--ucl-pale-purple) !important;
}

/* Native option highlight is browser/OS controlled, but this helps browsers
   that honour option colours. */
select option:checked {
  color: var(--ucl-heading) !important;
  background: var(--ucl-pale-purple) !important;
}

/* --------------------------------------------------------------------------
   CHECKBOXES / RADIOS
   -------------------------------------------------------------------------- */

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  accent-color: #6f2dbd !important;
}

.form-check {
  margin-bottom: .62rem;
}

.form-check-input {
  width: 1.25em !important;
  height: 1.25em !important;
  border: 2px solid #77717e !important;
}

.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: #6f2dbd !important;
  border-color: #6f2dbd !important;
}

/* Awesome/custom Bootstrap checkbox/radio patterns used by LimeSurvey. */
.checkbox-item input[type="checkbox"] + label,
.radio-item input[type="radio"] + label,
.multiple-opt .checkbox-item label,
.multiple-opt-comments .checkbox-item label {
  color: var(--ucl-text) !important;
}

.checkbox-item input[type="checkbox"]:checked + label,
.radio-item input[type="radio"]:checked + label,
.checkbox-item.checked label,
.radio-item.checked label,
.multiple-opt .checkbox-item input:checked ~ label,
.multiple-opt-comments .checkbox-item input:checked ~ label {
  color: var(--ucl-text) !important;
}

/* Stop the Apple variation turning selected consent statements green. */
.multiple-opt .answer-item,
.multiple-opt .answer-item label,
.multiple-opt .answer-item label span,
.multiple-opt-comments .answer-item,
.multiple-opt-comments .answer-item label {
  color: var(--ucl-text) !important;
  font-size: 1.06rem !important;
  line-height: 1.4 !important;
}

/* Pseudo-element controls across classic/custom question themes. */
.checkbox-item input[type="checkbox"] + label::before,
.checkbox input[type="checkbox"] + label::before,
.radio-item input[type="radio"] + label::before,
.radio input[type="radio"] + label::before {
  border-color: #77717e !important;
}

.checkbox-item input[type="checkbox"]:checked + label::before,
.checkbox input[type="checkbox"]:checked + label::before,
.radio-item input[type="radio"]:checked + label::before,
.radio input[type="radio"]:checked + label::before {
  border-color: #6f2dbd !important;
}

.checkbox-item input[type="checkbox"]:checked + label::after,
.checkbox input[type="checkbox"]:checked + label::after {
  color: #fff !important;
  background-color: transparent !important;
}

.checkbox-item input[type="checkbox"]:checked + label::before,
.checkbox input[type="checkbox"]:checked + label::before {
  background-color: #6f2dbd !important;
}

.radio-item input[type="radio"]:checked + label::after,
.radio input[type="radio"]:checked + label::after {
  background-color: #6f2dbd !important;
}

body .answer-item label::after {
  border-color: #6f2dbd;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  min-height: 44px;
  padding: .62rem 1.05rem;
  border-radius: 7px !important;
  font-size: 1rem !important;
  font-weight: 650 !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.dropdown-toggle.show {
  color: #fff !important;
  background-color: #6f2dbd !important;
  border-color: #6f2dbd !important;
}

.btn-primary:hover {
  background-color: #5e23a5 !important;
  border-color: #5e23a5 !important;
}

.btn-secondary,
.btn-outline-secondary {
  color: var(--ucl-heading) !important;
  background: #fff !important;
  border: 1.5px solid var(--ucl-heading) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  color: var(--ucl-heading) !important;
  background: var(--ucl-ultra-pale) !important;
}

.btn-check + .btn,
.btn-check:focus + .btn-primary {
  color: var(--ucl-heading) !important;
  background: #fff !important;
  border: 1.5px solid var(--ucl-border-strong) !important;
}

.btn-check:checked + .btn-primary,
.btn-check:checked + .btn-primary:focus,
.btn-check:active + .btn-primary,
.btn-check + .btn-primary:active,
.btn-check + .btn-primary.active {
  color: #fff !important;
  background: #6f2dbd !important;
  border-color: #6f2dbd !important;
}

#navigator-container {
  padding-top: .5rem;
  padding-bottom: 2.25rem !important;
}

/* --------------------------------------------------------------------------
   MATRICES / ARRAYS — READABILITY FIRST
   -------------------------------------------------------------------------- */

.question-container .ls-answers {
  color: var(--ucl-text) !important;
}

.question-container table,
.question-container .table {
  --bs-table-color: var(--ucl-text);
  --bs-table-bg: #fff;
  --bs-table-border-color: #ebe5ef;
  color: var(--ucl-text) !important;
  font-size: .98rem !important;
  line-height: 1.28 !important;
}

/* Header: pale rather than dark purple. This is the biggest v1.1 change. */
.question-container table > thead > tr > th,
.question-container .table > thead > tr > th,
.array-flexible-row table thead th,
.array-multi-flexi table thead th,
.array-multi-flexi-text table thead th {
  color: var(--ucl-heading) !important;
  background: #f1e8f8 !important;
  border-color: #e0d3e9 !important;
  padding: .72rem .6rem !important;
  font-size: .98rem !important;
  font-weight: 650 !important;
  line-height: 1.18 !important;
  text-align: center !important;
  vertical-align: bottom !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Empty top-left matrix cell does not need a coloured block. */
.array-flexible-row table thead th:first-child,
.array-multi-flexi table thead th:first-child,
.array-multi-flexi-text table thead th:first-child {
  background: #fff !important;
  border-top-color: transparent !important;
  border-left-color: transparent !important;
}

.question-container table tbody th.answertext,
.question-container table tbody th,
.array-flexible-row table tbody th.answertext,
.array-multi-flexi table tbody th.answertext {
  color: #403b44 !important;
  background: transparent !important;
  padding: .65rem .72rem !important;
  font-size: .99rem !important;
  font-weight: 550 !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.question-container table tbody td,
.array-flexible-row table tbody td,
.array-multi-flexi table tbody td {
  color: var(--ucl-text) !important;
  padding: .58rem .55rem !important;
  vertical-align: middle !important;
}

/* Very light zebra stripes; no purple wall of colour. */
.question-container .table-striped > tbody > tr:nth-of-type(odd) > *,
.question-container table tbody tr:nth-child(odd) > *,
.array-flexible-row table tbody tr:nth-child(odd) > *,
.array-multi-flexi table tbody tr:nth-child(odd) > * {
  --bs-table-accent-bg: transparent;
  background-color: #faf7fc !important;
}

.question-container table tbody tr:nth-child(even) > *,
.array-flexible-row table tbody tr:nth-child(even) > *,
.array-multi-flexi table tbody tr:nth-child(even) > * {
  background-color: #fff !important;
}

.question-container table tbody tr:hover > * {
  background-color: #f5eff9 !important;
}

/*
 * Ordinary radio arrays: preserve complete words (e.g. "Sometimes") and give
 * each answer heading a realistic minimum width. Horizontal scrolling is a
 * better failure mode on smaller screens than breaking a single word in half.
 */
.array-flexible-row .ls-answers,
.array-5-pt .ls-answers,
.array-10-pt .ls-answers,
.array-yes-uncertain-no .ls-answers,
.array-increase-same-decrease .ls-answers {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.array-flexible-row table thead th:not(:first-child),
.array-5-pt table thead th:not(:first-child),
.array-10-pt table thead th:not(:first-child),
.array-yes-uncertain-no table thead th:not(:first-child),
.array-increase-same-decrease table thead th:not(:first-child) {
  min-width: 7.25rem !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.array-flexible-row table thead th,
.array-flexible-row table thead th *,
.array-5-pt table thead th,
.array-10-pt table thead th {
  hyphens: none !important;
  word-break: normal !important;
}

/* More compact circular controls in matrices. */
.array-flexible-row input[type="radio"],
.array-5-pt input[type="radio"],
.array-10-pt input[type="radio"],
.array-yes-uncertain-no input[type="radio"],
.array-increase-same-decrease input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #6f2dbd !important;
}

/* --------------------------------------------------------------------------
   ARRAY (NUMBERS) WITH DROPDOWNS — COMPACT TWO-COLUMN FEEL
   -------------------------------------------------------------------------- */

.array-multi-flexi .ls-answers {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Do not let one numeric dropdown consume the whole page width. */
.array-multi-flexi table.dropdown-array {
  width: auto !important;
  max-width: 54rem !important;
  min-width: 0 !important;
  table-layout: auto !important;
  margin-right: auto !important;
}

.array-multi-flexi table.dropdown-array tbody th.answertext {
  width: 28rem !important;
  min-width: 20rem !important;
  max-width: 28rem !important;
  padding-right: 1.35rem !important;
}

.array-multi-flexi table.dropdown-array thead th:not(:first-child),
.array-multi-flexi table.dropdown-array td.dropdown-item {
  width: 9rem !important;
  min-width: 9rem !important;
  max-width: 9rem !important;
}

.array-multi-flexi table.dropdown-array td.dropdown-item select,
.array-multi-flexi table.dropdown-array td.dropdown-item .form-select,
.array-multi-flexi table.dropdown-array td.dropdown-item .form-control,
.array-multi-flexi table.dropdown-array td.dropdown-item .bootstrap-select {
  width: 8rem !important;
  min-width: 8rem !important;
  max-width: 8rem !important;
  min-height: 44px !important;
  font-size: 1rem !important;
}

.array-multi-flexi table.dropdown-array td.dropdown-item .bootstrap-select > .dropdown-toggle {
  min-height: 44px !important;
  padding: .5rem .72rem !important;
}

/* --------------------------------------------------------------------------
   ALERTS / MISC
   -------------------------------------------------------------------------- */

.alert {
  border-width: 1px;
  border-radius: 8px !important;
}

.alert-info,
.alert-primary {
  color: var(--ucl-text) !important;
  background: #f7f1fb !important;
  border-color: #dfd1e9 !important;
}

.alert-danger {
  color: #842018 !important;
  background: #fff4f2 !important;
  border-color: #efc1ba !important;
}

.modal-content,
.card,
.well,
.panel {
  border: 1px solid var(--ucl-border) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.modal-header,
.card-header {
  color: var(--ucl-heading) !important;
  background: var(--ucl-ultra-pale) !important;
  border-bottom-color: var(--ucl-border) !important;
}

footer,
#surveyListFooter {
  color: var(--ucl-text-soft) !important;
  background: transparent !important;
  font-size: .92rem !important;
}

/* --------------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  body,
  body.fruity_twentythree {
    font-size: 17px !important;
  }

  #outerframe,
  .top-container,
  #survey-nav {
    --bs-gutter-x: 1.15rem;
  }

  .question-container {
    padding: 1.2rem 1rem !important;
    margin-bottom: 1rem !important;
    border-radius: 8px !important;
  }

  .question-container .question-text,
  .question-container .ls-label-question,
  .question-container .ls-question-text {
    font-size: 1.28rem !important;
  }

  .group-title-container .group-title,
  .group-title-container .ls-group-title,
  .group-title-container h1,
  .group-title-container h2,
  .group-title-container h3,
  .group-title,
  .ls-group-title {
    font-size: 1.65rem !important;
  }

  .survey-name {
    font-size: 2.05rem !important;
    line-height: 1.08 !important;
  }

  .question-container .ls-question-text > p:not(:only-child),
  .question-container .question-text > p:not(:only-child) {
    font-size: 1rem !important;
  }

  .group-title-container {
    padding: .9rem 1rem !important;
    border-left-width: 4px !important;
  }

  .btn {
    min-height: 48px;
  }

  /* Single dropdown remains full-width on phone. */
  .list-dropdown .ls-answers select,
  .list-dropdown .form-select,
  .list-dropdown .form-control,
  .list-dropdown .bootstrap-select {
    max-width: 100% !important;
  }

  /* Numeric dropdown arrays keep a compact, scrollable table rather than
     stretching controls to the viewport width. */
  .array-multi-flexi table.dropdown-array tbody th.answertext {
    min-width: 15rem !important;
    width: 15rem !important;
    max-width: 15rem !important;
  }

  .array-multi-flexi table.dropdown-array thead th:not(:first-child),
  .array-multi-flexi table.dropdown-array td.dropdown-item {
    width: 8.5rem !important;
    min-width: 8.5rem !important;
    max-width: 8.5rem !important;
  }

  .array-multi-flexi table.dropdown-array td.dropdown-item select,
  .array-multi-flexi table.dropdown-array td.dropdown-item .form-select,
  .array-multi-flexi table.dropdown-array td.dropdown-item .form-control,
  .array-multi-flexi table.dropdown-array td.dropdown-item .bootstrap-select {
    width: 7.75rem !important;
    min-width: 7.75rem !important;
    max-width: 7.75rem !important;
  }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================================================================== 
   NATIVE PUBLIC LANDING PAGE / SURVEY LIST — v1.1.2
   Scoped to .ucl-portal so these rules do not alter actual survey pages.
   ========================================================================== */

body.ucl-portal-page {
  margin: 0 !important;
  background: #fafafa !important;
}

.ucl-portal {
  --portal-purple: #361a54;
  --portal-bright: #993bff;
  --portal-mid: #ba82ff;
  --portal-pale: #f2eafb;
  --portal-off: #fafafa;
  --portal-ink: #242126;
  --portal-muted: #69636f;
  --portal-line: #e7e0ea;
  background: var(--portal-off);
  color: var(--portal-ink);
  min-height: 100vh;
  font-family: var(--ucl-font);
  font-size: 18px;
  line-height: 1.55;
}

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

.ucl-portal__shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.ucl-portal__mast {
  background: var(--portal-purple);
  color: #fff;
  border-bottom: 4px solid var(--portal-mid);
}

.ucl-portal__mast-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ucl-portal__brand {
  display: flex;
  align-items: baseline;
  gap: 13px;
  color: #fff !important;
  text-decoration: none !important;
}

.ucl-portal__brand strong {
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: .005em;
}

.ucl-portal__brand span {
  color: rgba(255,255,255,.76);
  font-size: .92rem;
  font-weight: 500;
}

.ucl-portal__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.ucl-portal__nav a {
  color: #fff !important;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 650;
}

.ucl-portal__nav a:hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ucl-portal__signin {
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 7px;
  padding: 8px 12px;
}

.ucl-portal__signin:hover {
  background: rgba(255,255,255,.09);
  text-decoration: none !important;
}

.ucl-portal__hero {
  padding: 76px 0 66px;
  position: relative;
  overflow: hidden;
}

.ucl-portal__hero::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -210px;
  width: 510px;
  height: 510px;
  border: 72px solid var(--portal-pale);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.ucl-portal__hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr);
  gap: 64px;
  align-items: start;
}

.ucl-portal__eyebrow {
  margin: 0 0 17px !important;
  color: #6d497f !important;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .76rem !important;
  font-weight: 800;
}

.ucl-portal h1 {
  margin: 0 !important;
  max-width: 840px;
  color: var(--portal-purple) !important;
  font-size: clamp(2.7rem, 5.3vw, 4.75rem) !important;
  line-height: 1.01 !important;
  letter-spacing: -.042em !important;
  font-weight: 700 !important;
}

.ucl-portal__lede {
  margin: 28px 0 0 !important;
  max-width: 760px !important;
  color: #454049 !important;
  font-size: 1.22rem !important;
  line-height: 1.55 !important;
}

.ucl-portal__participant {
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  padding: 29px;
  box-shadow: 0 16px 42px rgba(54,26,84,.075);
}

.ucl-portal__accent {
  width: 46px;
  height: 7px;
  margin-bottom: 21px;
  background: var(--portal-bright);
  border-radius: 999px;
}

.ucl-portal__participant h2,
.ucl-portal__section h2 {
  color: var(--portal-purple) !important;
  letter-spacing: -.025em !important;
}

.ucl-portal__participant h2 {
  margin: 0 0 11px !important;
  font-size: 1.34rem !important;
  line-height: 1.22 !important;
}

.ucl-portal__participant > p {
  margin: 0 !important;
  color: var(--portal-muted) !important;
  font-size: .98rem !important;
}

.ucl-portal__steps {
  margin: 21px 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: ucl-portal-step;
}

.ucl-portal__steps li {
  counter-increment: ucl-portal-step;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 12px;
  align-items: start;
  margin: 15px 0;
  color: #413b46;
  font-size: .97rem;
}

.ucl-portal__steps li::before {
  content: counter(ucl-portal-step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--portal-pale);
  color: var(--portal-purple);
  font-weight: 800;
  font-size: .8rem;
}

.ucl-portal__small {
  font-size: .84rem !important;
  line-height: 1.45 !important;
}

.ucl-portal__section {
  padding: 62px 0;
  border-top: 1px solid var(--portal-line);
}

.ucl-portal__section-grid {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 72px;
  align-items: start;
}

.ucl-portal__section h2 {
  margin: 0 !important;
  font-size: clamp(1.85rem, 3.1vw, 2.55rem) !important;
  line-height: 1.1 !important;
  font-weight: 680 !important;
}

.ucl-portal__section-copy > p {
  margin-top: 0 !important;
  color: #413d44 !important;
  font-size: 1.02rem !important;
}

.ucl-portal__cards {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 17px;
  margin-top: 24px;
}

.ucl-portal__card {
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 11px;
  padding: 24px;
}

.ucl-portal__card h3 {
  margin: 0 0 7px !important;
  color: var(--portal-purple) !important;
  font-size: 1.08rem !important;
}

.ucl-portal__card p {
  margin: 0 !important;
  color: var(--portal-muted) !important;
  font-size: .94rem !important;
}

.ucl-portal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.ucl-portal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: .94rem;
  font-weight: 700;
  text-decoration: none !important;
}

.ucl-portal__button--primary {
  background: var(--portal-purple);
  color: #fff !important;
}

.ucl-portal__button--primary:hover {
  background: #4b2569;
}

.ucl-portal__button--secondary {
  background: #fff;
  border-color: #9e8cac;
  color: var(--portal-purple) !important;
}

.ucl-portal__button--secondary:hover {
  background: var(--portal-pale);
}

.ucl-portal__participation {
  background: var(--portal-pale);
}

.ucl-portal__note {
  border-left: 5px solid var(--portal-bright);
  padding: 3px 0 3px 20px;
  color: #493c51 !important;
}

.ucl-portal__footer {
  background: #23152f;
  color: #e9dff0;
  padding: 32px 0;
  font-size: .86rem;
}

.ucl-portal__footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.ucl-portal__footer a {
  color: #fff !important;
}

@media (max-width: 850px) {
  .ucl-portal__shell {
    width: min(100% - 30px, 1180px);
  }
  .ucl-portal__hero {
    padding: 50px 0 54px;
  }
  .ucl-portal__hero-grid,
  .ucl-portal__section-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .ucl-portal__cards {
    grid-template-columns: 1fr;
  }
  .ucl-portal__nav a:not(.ucl-portal__signin) {
    display: none;
  }
  .ucl-portal h1 {
    font-size: clamp(2.4rem, 12vw, 3.85rem) !important;
  }
  .ucl-portal__brand span {
    display: none;
  }
}
