/* ============================================================
   UOB Preview Forms — Component styles (form mode)
   Aggregated from artifacts/html/ design-system component pages.
   Only the interactive component styles are reproduced here;
   documentation chrome (state galleries, spec panels) is omitted.
   Fields render full-width inside a form panel/card.
   ============================================================ */

/* ── SHARED FIELD WRAP / LABEL / HELPER ── */
.field-wrap,
.phone-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.field-label,
.phone-label {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.req { color: var(--uob-red); }

/* ── TEXT / EMAIL INPUT (Single Line, Email) ── */
.field-input-row,
.phone-input-row {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input,
.phone-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-sm);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}
.field-input::placeholder,
.phone-input::placeholder {
  color: var(--uob-grey-30);
}
.field-input:hover,
.phone-input:hover { border-color: var(--uob-black); }
.field-input:focus,
.phone-input:focus { border-color: var(--uob-primary-dark); border-width: 2px; }

.field-input.is-disabled,
.phone-input.is-disabled {
  background: var(--uob-grey-10);
  border-color: var(--uob-grey-20);
  color: var(--uob-grey-30);
  cursor: not-allowed;
}
.field-input.is-valid,
.phone-input.is-valid { border-color: var(--uob-green); border-width: 2px; }
.field-input.is-error,
.phone-input.is-error { border-color: var(--uob-red); border-width: 2px; }

/* ── TEXTAREA (Multi-line Text) ── */
.field-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-sm);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  appearance: none;
  line-height: 1.5;
}
.field-textarea::placeholder { color: var(--uob-grey-30); }
.field-textarea:hover { border-color: var(--uob-black); }
.field-textarea:focus { border-color: var(--uob-primary-dark); border-width: 2px; }
.field-textarea.is-error { border-color: var(--uob-red); border-width: 2px; }
.field-textarea.is-valid { border-color: var(--uob-green); border-width: 2px; }

/* ── HELPER / ERROR / COUNTER ── */
.field-helper,
.phone-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-helper.is-error,
.phone-helper.is-error { color: var(--uob-red); }
.field-helper.is-valid,
.phone-helper.is-valid { color: var(--uob-green); }
.field-helper[hidden],
.phone-helper[hidden] { display: none; }

.field-counter-row { display: flex; align-items: center; }
.field-counter {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  text-align: right;
  margin-left: auto;
}
.field-counter.is-error { color: var(--uob-red); }

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  border: none;
  border-radius: var(--uob-radius-sm);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--uob-primary);
  color: var(--uob-white);
}
.btn-primary:hover:not(:disabled) { background: var(--uob-hover-blue); }
.btn-primary:active:not(:disabled) { background: var(--uob-accent-blue); }
.btn-primary:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}
.btn-secondary {
  background: var(--uob-grey-20);
  color: var(--uob-black);
}
.btn-secondary:hover:not(:disabled) { background: var(--uob-grey-30); }
.btn-secondary:active:not(:disabled) { background: var(--uob-grey-40); color: var(--uob-white); }
.btn-secondary:focus-visible {
  outline: 3px solid var(--uob-hover-blue);
  outline-offset: 2px;
}
.btn-sm { height: 32px; min-width: 62px; padding: 0 14px; font-size: var(--uob-font-xs); }
.btn-md { height: 40px; min-width: 88px; padding: 0 18px; font-size: var(--uob-font-sm); }
.btn-lg { height: 48px; min-width: 114px; padding: 0 28px; font-size: var(--uob-font-base); }
.btn:disabled,
.btn.is-disabled {
  background: var(--uob-grey-20);
  color: var(--uob-grey-30);
  cursor: not-allowed;
}

/* ── RADIO BUTTON ── */
.rb-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rb-label-text {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.rb-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.rb-group--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.rb-group--row .rb-option { align-items: center; }
.rb-group--row .rb-input { margin-top: 0; }
.rb-group--row .rb-text { margin-top: 0; }
.rb-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.rb-input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--uob-grey-20);
  border-radius: 50%;
  background: var(--uob-white);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
  margin-top: 2px;
}
.rb-input:hover { border-color: var(--uob-black); }
.rb-input:focus { border-color: var(--uob-accent-blue); outline: none; }
.rb-input:checked { border-color: var(--uob-accent-blue); }
.rb-input:checked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--uob-accent-blue);
}
.rb-input.is-error { border-color: var(--uob-red); }
.rb-text {
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  line-height: 1.5;
  margin-top: 3px;
}
.rb-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  padding-top: 2px;
}
.rb-helper.is-error { color: var(--uob-red); }
.rb-helper[hidden] { display: none; }

/* ── DROPDOWN LIST ── */
.dd-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.dd-field { position: relative; width: 100%; min-width: 0; }
.dd-label {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.dd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  min-width: 0;
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  transition: border-color 0.15s, border-width 0.15s;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  outline: none;
  user-select: none;
}
.dd-trigger:hover { border-color: var(--uob-black); }
.dd-trigger:focus,
.dd-trigger.is-open,
.dd-trigger.is-error { border-width: 2px; }
.dd-trigger:focus { border-color: var(--uob-primary-dark); }
.dd-trigger.is-open { border-color: var(--uob-primary-dark); }
.dd-trigger.is-error { border-color: var(--uob-red); }
.dd-value {
  flex: 1;
  min-width: 0; /* nowrap label must shrink so ellipsis works; else overflows Layout E gutters */
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-grey-30);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-value.is-filled { color: var(--uob-black); }
.dd-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--uob-grey-40);
  transition: transform 0.2s;
  display: block;
}
.dd-chevron.is-up { transform: rotate(180deg); }
.dd-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 20;
  display: none;
  overflow-y: auto;
  max-height: 260px;
}
.dd-panel.is-visible { display: block; }
.dd-option {
  padding: 10px 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  cursor: pointer;
  transition: background 0.1s;
}
.dd-option:hover,
.dd-option.is-highlighted { background: var(--uob-grey-10); }
.dd-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
}
.dd-helper.is-error { color: var(--uob-red); }
.dd-helper[hidden] { display: none; }

/* ── CHECKBOX (multi-select group) ── */
.cb-group-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cb-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cb-input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 2px;
}
.cb-input:hover { border-color: var(--uob-black); }
.cb-input:focus { border-color: var(--uob-accent-blue); outline: none; }
.cb-input:checked { background: var(--uob-accent-blue); border-color: var(--uob-accent-blue); }
.cb-input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: 2px solid var(--uob-white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.cb-text {
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  line-height: 1.5;
  margin-top: 3px;
}

/* ── CHECKBOX (Terms & Conditions / Declaration) ── */
.cbt-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}
.cbt-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cbt-header.is-disabled {
  cursor: not-allowed;
}
.cbt-input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 0;
}
.cbt-input:hover { border-color: var(--uob-black); }
.cbt-input:focus { border-color: var(--uob-primary); outline: none; }
.cbt-input:checked { background: var(--uob-primary); border-color: var(--uob-primary); }
.cbt-input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: 2px solid var(--uob-white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.cbt-input.is-disabled,
.cbt-input:disabled {
  background: var(--uob-grey-10);
  border-color: var(--uob-grey-20);
  cursor: not-allowed;
}
.cbt-input.is-disabled:hover,
.cbt-input:disabled:hover {
  border-color: var(--uob-grey-20);
}
/* Checked + disabled — muted fill, tick still visible (checkbox-terms Checked gallery) */
.cbt-input.is-disabled:checked,
.cbt-input:disabled:checked {
  background: var(--uob-grey-30);
  border-color: var(--uob-grey-30);
}
.cbt-input.is-error { border-color: var(--uob-red); }
.cbt-label-text {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
  line-height: 1.54;
}
.cbt-label-text.is-disabled { color: var(--uob-grey-30); }
.cbt-label-text.is-error { color: var(--uob-red); }
.cbt-desc {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  line-height: 1.54;
  margin: 0;
}
/* Legacy: single body next to checkbox (appointment / compliment) */
.cbt-text {
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  line-height: 1.54;
}
.cbt-text.is-error { color: var(--uob-red); }
.cbt-helper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--uob-font-xs);
  color: var(--uob-red);
  line-height: 1.54;
}
.cbt-helper[hidden] { display: none; }

/* ── DATE PICKER (Appointment) ── */
.dp-wrap {
  width: 100%;
  background: var(--uob-white);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  font-family: 'Noto Sans', sans-serif;
}
.dp-section-label {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-primary);
  line-height: 1.54;
}
.dp-stack { display: flex; flex-direction: column; gap: 8px; }
.dp-stack-with-label { display: flex; flex-direction: column; gap: 16px; }
.dp-branch { position: relative; width: 100%; }
.dp-branch-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--uob-grey-20);
  border-radius: 5px;
  background: var(--uob-white);
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-primary);
  cursor: pointer;
  outline: none;
  text-align: left;
  line-height: 1.54;
}
.dp-branch-trigger:hover { border-color: var(--uob-grey-30); }
.dp-branch-trigger.is-open { border-color: var(--uob-primary); }
.dp-branch-trigger.is-error { border-color: var(--uob-red); }
.dp-branch-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--uob-grey-40);
  transition: transform 0.2s;
}
.dp-branch-trigger.is-open .dp-branch-chevron,
.dp-branch-chevron.is-up { transform: rotate(180deg); color: var(--uob-primary); }
.dp-branch-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-30);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 20;
  display: none;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
}
.dp-branch-panel.is-visible { display: flex; flex-direction: column; gap: 8px; }
.dp-branch-option {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 4px 16px;
  border-radius: 4px;
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-black);
  cursor: pointer;
  line-height: 1.54;
  transition: background 0.12s, color 0.12s;
}
.dp-branch-option:hover,
.dp-branch-option.is-hover { background: var(--uob-hover-blue); color: var(--uob-white); }
.dp-branch-option.is-selected { background: var(--uob-grey-10); color: var(--uob-primary); }
.dp-branch-option.is-selected:hover { background: var(--uob-hover-blue); color: var(--uob-white); }

/* Branch search (reuses the Dropdown-with-search pattern) */
.dp-branch-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--uob-grey-10);
  position: sticky;
  top: 0;
  background: var(--uob-white);
}
.dp-branch-search-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--uob-grey-40); }
.dp-branch-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-base);
  color: var(--uob-black);
  background: transparent;
}
.dp-branch-search-input::placeholder { color: var(--uob-grey-30); }
.dp-branch-noresults {
  padding: 12px 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  text-align: center;
}

/* Pre-selection info banner (relocated above the branch selector) */
.dp-info-banner {
  background: #eff6ff;
  border-radius: 5px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dp-info-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--uob-primary); }
.dp-info-text { flex: 1; font-size: var(--uob-font-base); font-weight: 700; color: var(--uob-primary); line-height: 1.54; }
.dp-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0;
}
.dp-month-arrow {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--uob-primary);
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0;
  font-family: inherit;
  transition: background 0.12s;
}
.dp-month-arrow:hover:not(.is-disabled) { background: var(--uob-grey-10); }
.dp-month-arrow.is-disabled { color: var(--uob-grey-30); cursor: not-allowed; }
.dp-month-arrow svg { width: 20px; height: 20px; }
.dp-month-label { font-size: var(--uob-font-base); font-weight: 700; color: var(--uob-primary); line-height: 1.54; }
.dp-dates-row { display: flex; align-items: stretch; gap: 8px; justify-content: center; }
/* Static row (sparse availability): centre cards, no pagination arrows */
.dp-dates-row.is-static { gap: 12px; }
.dp-dates-row.is-static .dp-date-nav { display: none; }
.dp-date-nav {
  flex-shrink: 0;
  width: 40px;
  height: 92px;
  background: var(--uob-grey-10);
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--uob-primary);
  padding: 0;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.dp-date-nav:hover:not(.is-disabled) { background: var(--uob-hover-blue); color: var(--uob-white); }
.dp-date-nav.is-disabled { color: var(--uob-grey-30); cursor: not-allowed; background: var(--uob-grey-10); }
.dp-date-nav svg { width: 20px; height: 20px; }
.dp-dates { flex: 0 1 auto; display: flex; gap: 8px; overflow: hidden; }
.dp-dates-row.is-static .dp-dates { flex: 0 0 auto; gap: 12px; }
.dp-date-card {
  flex-shrink: 0;
  width: 84px;
  min-height: 92px;
  background: var(--uob-grey-10);
  border: 1px solid var(--uob-grey-30);
  border-radius: 6px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  text-align: center;
  color: var(--uob-black);
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dp-date-card:hover:not(.is-active):not(.is-disabled) { background: var(--uob-hover-blue); color: var(--uob-white); }
.dp-date-card.is-active { background: var(--uob-primary); border-color: var(--uob-primary); color: var(--uob-white); }
.dp-date-card.is-disabled { color: var(--uob-grey-30); cursor: not-allowed; background: var(--uob-grey-10); }
.dp-date-day { font-size: var(--uob-font-base); font-weight: 700; text-transform: uppercase; line-height: 1.2; }
.dp-date-num { font-size: 24px; font-weight: 700; line-height: 1.15; }
.dp-date-month { font-size: var(--uob-font-base); font-weight: 400; line-height: 1.2; }
/* "Next available appointment" context line (single/sparse date) */
.dp-next-available {
  font-size: var(--uob-font-base);
  color: var(--uob-black);
  text-align: center;
  line-height: 1.54;
}
.dp-dates-count { font-size: var(--uob-font-sm); color: var(--uob-grey-40); text-align: center; line-height: 1.4; }
.dp-duration { font-size: var(--uob-font-base); color: var(--uob-black); line-height: 1.54; }
.dp-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}
.dp-time-slot {
  min-height: 48px;
  border: 1px solid var(--uob-grey-30);
  border-radius: 6px;
  background: var(--uob-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: var(--uob-font-base);
  font-weight: 400;
  cursor: pointer;
  color: var(--uob-black);
  text-align: center;
  font-family: inherit;
  line-height: 1.3;
  padding: 4px 6px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dp-time-slot:hover:not(.is-active):not(.is-disabled) { background: var(--uob-hover-blue); border-color: var(--uob-hover-blue); color: var(--uob-white); }
.dp-time-slot.is-active { background: var(--uob-primary); border-color: var(--uob-primary); color: var(--uob-white); }
/* Unavailable (booked) slot — visible but not selectable (issue #8) */
.dp-time-slot.is-disabled {
  color: var(--uob-grey-40);
  background: var(--uob-grey-10);
  border-color: var(--uob-grey-20);
  border-style: dashed;
  cursor: not-allowed;
}
.dp-slot-sub { font-size: var(--uob-font-xs); font-weight: 400; letter-spacing: 0.01em; }
.dp-time-slot.is-disabled .dp-slot-sub { color: var(--uob-grey-40); }

/* Availability legend (issue #8) */
.dp-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  line-height: 1.4;
}
.dp-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dp-legend-swatch { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.dp-legend-swatch--selected { background: var(--uob-primary); border: 1px solid var(--uob-primary); }
.dp-legend-swatch--available { background: var(--uob-white); border: 1px solid var(--uob-grey-30); }
.dp-legend-swatch--unavailable { background: var(--uob-grey-10); border: 1px dashed var(--uob-grey-30); }
.dp-legend-hint { color: var(--uob-grey-40); }

/* Inline hint when tapping an unavailable slot */
.dp-slot-hint {
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  text-align: center;
  line-height: 1.4;
}
.dp-slot-hint[hidden] { display: none; }

.dp-time-block { display: flex; flex-direction: column; gap: 12px; }

/* Show more — secondary button treatment with count (issue #2) */
.dp-show-more {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--uob-font-base);
  font-weight: 700;
  color: var(--uob-primary);
  background: var(--uob-white);
  border: 1.5px solid var(--uob-primary);
  border-radius: var(--uob-radius-full);
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.dp-show-more:hover { background: var(--uob-primary); color: var(--uob-white); }
.dp-show-more-chevron { width: 16px; height: 16px; transition: transform 0.2s; }
.dp-show-more.is-expanded .dp-show-more-chevron { transform: rotate(180deg); }

/* Booking summary — structured, labelled rows (issue #3) */
.dp-summary {
  background: var(--uob-grey-10);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dp-summary-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--uob-font-base);
  font-weight: 700;
  color: var(--uob-black);
}
.dp-summary-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--uob-primary); }
.dp-summary-rows { display: flex; flex-direction: column; gap: 4px; }
.dp-summary-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: var(--uob-font-base);
  line-height: 1.5;
}
.dp-summary-label { color: var(--uob-grey-40); }
.dp-summary-value { color: var(--uob-black); font-weight: 700; }

/* Loading skeleton (branch/date change) */
.dp-loading { display: flex; flex-direction: column; gap: 12px; }
.dp-loading[hidden] { display: none; }
.dp-skeleton {
  background: linear-gradient(90deg, var(--uob-grey-10) 25%, var(--uob-grey-20) 37%, var(--uob-grey-10) 63%);
  background-size: 400% 100%;
  border-radius: 6px;
  animation: dp-shimmer 1.2s ease-in-out infinite;
}
.dp-skeleton--slots { height: 48px; }
.dp-loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
@keyframes dp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.dp-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: var(--uob-font-base);
  color: var(--uob-black);
  background: var(--uob-grey-10);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dp-empty[hidden] { display: none; }
.dp-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--uob-font-base);
  font-weight: 700;
  color: var(--uob-primary);
  background: var(--uob-white);
  border: 1.5px solid var(--uob-primary);
  border-radius: var(--uob-radius-full);
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
}
.dp-empty-cta:hover { background: var(--uob-primary); color: var(--uob-white); }

/* ── STEPPER ── */
.stepper {
  display: flex;
  align-items: flex-start;
  width: 100%;
}
.step {
  flex-shrink: 0;
  width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.step-circle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--uob-white);
  border: 1.5px solid var(--uob-grey-30);
  color: var(--uob-grey-40);
  font-size: var(--uob-font-sm);
  font-weight: 700;
  line-height: 1.54;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.step-circle.is-active,
.step-circle.is-complete {
  background: var(--uob-primary);
  border-color: var(--uob-primary);
  color: var(--uob-white);
}
.step-circle.is-complete .step-num { display: none; }
.step-circle .step-check { display: none; width: 14px; height: 11px; }
.step-circle.is-complete .step-check { display: block; }
.step-label {
  font-size: var(--uob-font-base);
  line-height: 1.54;
  color: var(--uob-black);
  white-space: nowrap;
  font-weight: 400;
}
.step-label.is-bold { font-weight: 700; }
.step-line {
  flex: 1 1 0;
  min-width: 8px;
  height: 2px;
  border-radius: 10px;
  background: var(--uob-grey-30);
  margin-top: 15px;
  transition: background 0.2s;
}
.step-line.is-active { background: var(--uob-primary); }

/* ============================================================
   NEW 2026-08-05 — components added for the All Components page
   (/preview/components.html). Ported from the design-system doc
   pages in artifacts/html/ so every Batch 1–3 component has a
   form-mode style here, not only the ones used by a live form.
   Doc-page max-widths are dropped: fields fill the form card,
   matching the shared field/dropdown rules above.
   ============================================================ */

/* ── PHONE + COUNTRY DROPDOWN (cphone-*) ──
   NEW 2026-08-05 — from artifacts/html/phone-with-country-dropdown.html */
.cphone-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.cphone-label {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.cphone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.cphone-country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  height: 40px;
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  flex-shrink: 0;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  min-width: 88px;
  white-space: nowrap;
  transition: border-color 0.15s, border-width 0.1s;
}
.cphone-country-btn:hover:not(:disabled) { border-color: var(--uob-black); }
.cphone-flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--uob-grey-10);
}
.cphone-dial {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.cphone-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.cphone-bar.is-open .cphone-chevron { transform: rotate(180deg); }
.cphone-bar.is-open .cphone-country-btn {
  border-color: var(--uob-primary-dark);
  border-width: 2px;
}
.cphone-bar.is-open .cphone-input { border-color: var(--uob-black); }
.cphone-input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  padding: 0 12px;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  outline: none;
  min-width: 0;
  transition: border-color 0.15s, border-width 0.1s;
}
.cphone-input::placeholder { color: var(--uob-grey-30); }
.cphone-input:hover:not(:disabled):not([readonly]) { border-color: var(--uob-black); }
.cphone-input:focus:not(:disabled) { border-color: var(--uob-primary-dark); border-width: 2px; }
.cphone-bar.is-valid .cphone-input { border-color: var(--uob-green); border-width: 2px; }
.cphone-bar.is-error .cphone-input { border-color: var(--uob-red); border-width: 2px; }

/* Country dropdown panel */
.cphone-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-sm);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.cphone-dropdown.is-open { display: flex; }
.cphone-search {
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--uob-grey-10);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Icon column matches the flag width so search text aligns with country names */
.cphone-search-icon {
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--uob-grey-40);
}
.cphone-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  background: transparent;
}
.cphone-search input::placeholder { color: var(--uob-grey-30); }
.cphone-list {
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
}
.cphone-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  border-bottom: 1px solid var(--uob-grey-10);
  transition: background 0.1s;
}
.cphone-list-item:last-child { border-bottom: none; }
.cphone-list-item:hover { background: var(--uob-grey-10); }
.cphone-list-item.is-selected { background: rgba(0, 94, 184, 0.06); }
.cphone-list-item.is-highlighted { background: var(--uob-grey-10); }
.cphone-list-item.is-highlighted.is-selected { background: rgba(0, 94, 184, 0.12); }
.cphone-list-item .item-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid var(--uob-grey-10);
}
.cphone-list-item .item-name { flex: 1; }
.cphone-list-item .item-code { color: var(--uob-grey-40); font-size: var(--uob-font-xs); margin-left: 4px; }
.cphone-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cphone-helper.is-error { color: var(--uob-red); }
.cphone-helper.is-valid { color: var(--uob-green); }

/* ── DROPDOWN WITH SEARCH (dd-search-*) ──
   NEW 2026-08-05 — from artifacts/html/dropdown-with-search.html
   Delta only: reuses the .dd-* base rules defined earlier in this file. */
.dd-search-icon-wrap {
  width: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dd-search-icon {
  flex-shrink: 0;
  display: block;
  color: var(--uob-grey-40);
}
.dd-search-input {
  flex: 1;
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-black);
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  min-width: 0;
}
.dd-search-input::placeholder { color: var(--uob-grey-30); }
.dd-chevron.is-up { transform: rotate(180deg); }
.dd-no-results {
  padding: 10px 16px;
  font-size: var(--uob-font-sm);
  color: var(--uob-grey-40);
  font-style: italic;
}

/* ── TOGGLE (tgl-*) ──
   NEW 2026-08-05 — from artifacts/html/toggle.html */
.tgl-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.tgl-label-text {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.tgl-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tgl-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background: var(--uob-grey-30);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.tgl-track.is-on { background: var(--uob-accent-blue); }
.tgl-track:focus-visible { box-shadow: 0 0 0 2px var(--uob-accent-blue); }
.tgl-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--uob-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.2s;
}
.tgl-track.is-on .tgl-knob { left: 22px; }
.tgl-desc {
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  line-height: 1.5;
}
.tgl-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
}
.tgl-helper.is-error { color: var(--uob-red); }

/* ── FILE UPLOAD (fu-*) ──
   NEW 2026-08-05 — from artifacts/html/file-upload.html */
.fu-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.fu-label-text {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
}
.fu-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 166px;
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  cursor: pointer;
  transition: border-color 0.15s, border-width 0.15s, background 0.15s;
  text-align: center;
  overflow: hidden;
  outline: none;
}
.fu-dropzone:hover:not(.is-disabled):not(.is-maxfiles) { border-color: var(--uob-black); }
.fu-dropzone:focus-visible:not(.is-disabled):not(.is-error):not(.is-maxfiles) {
  border-color: var(--uob-primary-dark);
  border-width: 2px;
}
.fu-dropzone.is-dragover {
  border-color: var(--uob-primary-dark);
  border-width: 2px;
  background: var(--uob-white);
}
.fu-dropzone.is-dragover .fu-req { color: var(--uob-grey-40); }
.fu-dropzone.is-error { border-color: var(--uob-red); border-width: 2px; }
.fu-dropzone.is-maxfiles {
  background: var(--uob-grey-10);
  border-color: var(--uob-grey-20);
  border-width: 1px;
  cursor: not-allowed;
}
.fu-dropzone.is-maxfiles:hover { border-color: var(--uob-grey-20); }
.fu-dropzone.is-maxfiles .fu-text { color: var(--uob-grey-30); }
.fu-dropzone.is-maxfiles .fu-icon { color: var(--uob-grey-30); }
.fu-icon {
  width: 22px;
  height: 20px;
  color: var(--uob-primary);
  flex-shrink: 0;
}
.fu-text {
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-black);
  line-height: 1.54;
}
.fu-req {
  font-size: var(--uob-font-xs);
  font-weight: 400;
  color: var(--uob-grey-30);
  line-height: 1.54;
  text-align: center;
}
.fu-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--uob-font-xs);
  font-weight: 400;
  line-height: 1.54;
  color: var(--uob-grey-40);
}
.fu-helper-row.is-error .fu-helper-left { color: var(--uob-red); }
.fu-helper-row.is-maxfiles .fu-helper-left { color: var(--uob-orange); }
.fu-helper-row.is-maxfiles .fu-helper-right { color: var(--uob-orange); }
.fu-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  height: 47px;
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-sm);
  background: var(--uob-white);
  font-size: var(--uob-font-sm);
  overflow: hidden;
}
.fu-file-preview {
  flex-shrink: 0;
  width: 31px;
  height: 31px;
  aspect-ratio: 1 / 1;
  border-radius: var(--uob-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--uob-grey-10);
}
.fu-file-icon {
  width: 17px;
  height: 21px;
  color: var(--uob-primary);
}
.fu-file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fu-file-thumb[hidden],
.fu-file-icon[hidden] { display: none; }
.fu-file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.fu-file-name {
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-black);
  line-height: 1.54;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fu-file-size {
  font-size: var(--uob-font-xs);
  font-weight: 400;
  color: var(--uob-grey-30);
  line-height: 1.54;
}
.fu-file-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--uob-grey-30);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fu-file-remove:hover { color: var(--uob-grey-40); }

/* ── MODAL (modal__*) ──
   NEW 2026-08-05 — from artifacts/html/modal.html
   .modal-overlay replaces the doc page's .comp-demo-overlay so the
   dialog covers the viewport the way it does in production. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 33, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  z-index: 200;
}
.modal-overlay.is-visible { display: flex; }
.modal {
  position: relative;
  background: var(--uob-white);
  border-radius: var(--uob-radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: min(560px, 100%);
  max-height: min(80vh, 560px);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  animation: modalIn 0.18s ease-out;
  box-sizing: border-box;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}
.modal:not(.modal--with-image) .modal__scroll { padding-top: 12px; }
/* Room under the frosted footer: 31 gradient + 40 button + 12 bottom */
.modal:not(.modal--plain) .modal__scroll { padding-bottom: 83px; }
.modal--plain .modal__scroll { padding-bottom: 24px; }
.modal__heading {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-shrink: 0;
  padding: 0 24px;
  box-sizing: border-box;
}
/* Non-image: title keeps ~24px from top; room for the absolute close button */
.modal:not(.modal--with-image) .modal__heading { padding: 12px 52px 0 24px; }
.modal:not(.modal--with-image) .modal__heading .modal__close {
  position: absolute;
  top: 0;
  right: 12px;
  z-index: 2;
}
.modal__title {
  flex: 1 0 0;
  min-width: 0;
  font-size: var(--uob-font-lg);
  font-weight: 700;
  line-height: 1.5;
  color: var(--uob-black);
  word-wrap: break-word;
}
.modal__close {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--uob-radius-md);
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--uob-grey-40);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  transition: color 0.15s;
}
.modal__close-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgb(255 255 255 / 40%);
  pointer-events: none;
  transition: background 0.15s;
}
.modal__close:hover { color: var(--uob-white); }
.modal__close:hover .modal__close-scrim { background: var(--uob-primary); }
.modal__close svg {
  position: relative;
  z-index: 2;
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
  pointer-events: none;
}
.modal__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 24px;
  box-sizing: border-box;
}
.modal__body-text {
  flex: 1 0 0;
  min-width: 0;
  font-size: var(--uob-font-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--uob-black);
}
.modal__body-text p { margin: 0 0 12px; }
.modal__body-text p:last-child { margin-bottom: 15px; }
.modal__body-text a { color: var(--uob-primary); text-decoration: underline; }
.modal__body-text a:hover { color: var(--uob-primary-dark); }
.modal__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  flex-shrink: 0;
  background: rgb(230 230 230 / 40%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 31px);
  mask-image: linear-gradient(to bottom, transparent, #000 31px);
  padding: 31px 12px 12px;
  border-radius: 0 0 var(--uob-radius-lg) var(--uob-radius-lg);
}
.modal__buttons {
  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  gap: 12px;
  width: 100%;
}
.modal__footer .modal__buttons .btn {
  flex: 1 1 0;
  min-width: 0;
  width: 50%;
}
.modal__footer .btn-secondary { background: var(--uob-white); }
.modal__footer .btn-secondary:hover:not(:disabled) { background: var(--uob-grey-30); }
.modal__footer .btn-primary { background: var(--uob-primary); color: var(--uob-white); }
.modal--plain .modal__footer { display: none; }
/* Destructive button — modal-only variant, not used by the live forms */
.btn-destructive {
  background: var(--uob-red);
  color: var(--uob-white);
}
.btn-destructive:hover:not(:disabled) { background: #d4001f; }
.btn-destructive:active:not(:disabled) { background: #b8001a; }
@media (max-width: 480px) {
  .modal-overlay { padding: 16px; }
  .modal { max-height: calc(100dvh - 32px); }
}

/* ── ACCORDION (accordion__*) ──
   NEW 2026-08-05 — from artifacts/html/accordion.html */
.accordion {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.accordion__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  width: 100%;
}
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  outline: none;
}
.accordion__header:focus-visible {
  outline: 2px solid var(--uob-primary);
  outline-offset: 4px;
  border-radius: 2px;
}
.accordion__title {
  flex: 1 0 0;
  min-width: 0;
  font-size: var(--uob-font-base);
  font-weight: 700;
  line-height: 1.6;
  color: var(--uob-black);
  transition: color 0.15s;
  word-break: break-word;
}
.accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--uob-grey-40);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.15s;
}
.accordion__icon svg { width: 100%; height: 100%; display: block; }
.accordion__header:hover .accordion__title { color: var(--uob-hover-blue); }
.accordion__header:hover .accordion__icon  { color: var(--uob-hover-blue); }
.accordion__item.is-open .accordion__title { color: var(--uob-primary); }
.accordion__item.is-open .accordion__icon  { color: var(--uob-primary); transform: rotate(180deg); }
.accordion__divider {
  height: 1px;
  background: var(--uob-grey-30);
  width: 100%;
}
.accordion__body {
  width: 100%;
  display: none;
  padding-top: 0;
  padding-bottom: 4px;
}
.accordion__item.is-open .accordion__body { display: block; }
.accordion__body-text {
  font-size: var(--uob-font-sm);
  font-weight: 400;
  line-height: 1.54;
  color: var(--uob-black);
}

/* ── SCALE NUMBER (scale-*) ──
   NEW 2026-08-05 — from artifacts/html/scale-number.html */
.scale-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.scale-question {
  font-size: var(--uob-font-base);
  font-weight: 700;
  color: var(--uob-black);
  line-height: 1.6;
}
.scale-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.scale-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-md);
  background: var(--uob-white);
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-base);
  font-weight: 700;
  color: var(--uob-black);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  outline: none;
}
.scale-cell:hover { border-color: var(--uob-black); }
.scale-cell:focus-visible {
  outline: 2px solid var(--uob-primary);
  outline-offset: 2px;
}
.scale-cell.is-selected {
  background: var(--uob-primary);
  border-color: var(--uob-primary);
  color: var(--uob-white);
}
.scale-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  font-weight: 400;
}
.scale-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  line-height: 1.54;
}
.scale-helper.is-error { color: var(--uob-red); }
.scale-helper.is-valid { color: var(--uob-green); }
/* Narrow viewports collapse the gaps into one joined bar */
@media (max-width: 480px) {
  .scale-row { gap: 0; }
  .scale-cell {
    border-radius: 0;
    border-right-width: 0;
  }
  .scale-cell:first-child {
    border-top-left-radius: var(--uob-radius-md);
    border-bottom-left-radius: var(--uob-radius-md);
  }
  .scale-cell:last-child {
    border-top-right-radius: var(--uob-radius-md);
    border-bottom-right-radius: var(--uob-radius-md);
    border-right-width: 1px;
  }
}

/* ── RANKING (rank-*) ──
   NEW 2026-08-05 — from artifacts/html/ranking.html */
.rank-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.rank-question {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
  line-height: 1.54;
}
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-lg);
  padding: 11px 12px;
  position: relative;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s, transform 0.18s ease;
}
.rank-item:hover { border-color: var(--uob-black); }
.rank-item.is-dragging {
  background: #e6f1ff;
  border-color: var(--uob-primary);
  box-shadow: 0 6px 16px rgba(0, 36, 123, 0.18);
  z-index: 5;
}
.rank-item.is-placeholder {
  background: var(--uob-grey-10);
  border-style: dashed;
  border-color: var(--uob-grey-30);
}
.rank-item.is-placeholder * { visibility: hidden; }
.rank-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  min-width: 42px;
  padding: 4px 8px;
  border: 1px solid var(--uob-grey-30);
  border-radius: var(--uob-radius-md);
  background: var(--uob-white);
  font-family: 'Noto Sans', sans-serif;
  font-size: var(--uob-font-sm);
  font-weight: 400;
  color: var(--uob-black);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.rank-badge:hover { border-color: var(--uob-black); }
.rank-badge svg {
  width: 10px;
  height: 10px;
  stroke: var(--uob-grey-40);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.rank-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 12px;
  z-index: 20;
  background: var(--uob-white);
  border: 1px solid var(--uob-grey-20);
  border-radius: var(--uob-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: none;
  flex-direction: column;
  min-width: 80px;
  overflow: hidden;
}
.rank-menu.is-open { display: flex; }
.rank-menu-option {
  padding: 8px 14px;
  font-size: var(--uob-font-sm);
  color: var(--uob-black);
  cursor: pointer;
  transition: background 0.1s;
}
.rank-menu-option:hover { background: var(--uob-grey-10); }
.rank-menu-option.is-current {
  background: var(--uob-grey-10);
  font-weight: 700;
}
.rank-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--uob-font-base);
  font-weight: 400;
  color: var(--uob-black);
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-handle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--uob-primary);
  touch-action: none;
}
.rank-handle:active { cursor: grabbing; }
.rank-handle svg {
  width: 16px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.rank-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  line-height: 1.54;
}

/* ── STAR RATING (star-*) ──
   NEW 2026-08-05 — from artifacts/html/star-rating.html */
.star-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.star-label {
  font-size: var(--uob-font-sm);
  font-weight: 700;
  color: var(--uob-black);
  line-height: 1.54;
}
.star-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.star-cell {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--uob-grey-30);
  transition: color 0.12s, transform 0.08s;
  outline: none;
}
.star-cell:hover { color: var(--uob-hover-blue); }
.star-cell:focus-visible {
  outline: 2px solid var(--uob-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.star-cell svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.star-cell.is-selected { color: var(--uob-primary); }
.star-cell.is-selected svg { fill: currentColor; }
.star-helper {
  font-size: var(--uob-font-xs);
  color: var(--uob-grey-40);
  line-height: 1.54;
}
.star-helper.is-error { color: var(--uob-red); }
.star-helper.is-valid { color: var(--uob-green); }
