/* ============================================================
   Aura Workshop — Component Styles v1.0
   ArchitectUX: Form Elements, Theme Toggle, Buttons, Cards
   ============================================================ */

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.theme-toggle-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.theme-toggle-option:hover {
  color: var(--color-text-primary);
}

.theme-toggle-option.active {
  background: var(--brand-cyan);
  color: var(--color-text-on-accent);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 1px 3px rgba(0, 229, 204, 0.3);
}

.theme-toggle-option .toggle-icon {
  font-size: 13px;
  line-height: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
  letter-spacing: var(--tracking-normal);
  line-height: 1.3;
  min-height: var(--btn-height);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

/* Primary */
.btn-primary {
  background: var(--brand-cyan);
  color: var(--color-text-on-accent);
  box-shadow: 0 2px 8px rgba(0, 229, 204, 0.2);
}

.btn-primary:hover {
  background: var(--brand-cyan-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 229, 204, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.btn-secondary:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  background: var(--color-bg-card);
}

/* Small */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 32px;
}

/* Icon-only */
.btn-icon {
  width: var(--btn-height);
  height: var(--btn-height);
  padding: 0;
  border-radius: var(--radius-full);
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
  margin-bottom: var(--space-6);
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Label */
.q-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-normal);
}

.q-label .hint {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  margin-left: var(--space-1);
}

/* ============================================================
   OPTION GRID (Radio & Checkbox rows)
   ============================================================ */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
}

.option-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  user-select: none;
  background: var(--color-bg-input);
  min-height: 40px;
  touch-action: manipulation;
}

.option-row:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

.option-row.selected {
  border-color: var(--color-border-accent);
  background: var(--brand-cyan-dim);
}

.option-row input[type="radio"],
.option-row input[type="checkbox"] {
  accent-color: var(--brand-cyan);
  width: var(--icon-sm);
  height: var(--icon-sm);
  flex-shrink: 0;
  cursor: pointer;
}

.option-row .opt-text {
  flex: 1;
  color: var(--color-text-primary);
}

.option-row .opt-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-surface);
  color: var(--color-text-dim);
  font-weight: var(--font-weight-medium);
}

/* Disabled state for mutually exclusive "none" options */
.option-row.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--color-bg-surface);
  border-color: var(--color-border);
  pointer-events: none;
}

.option-row.disabled:hover {
  border-color: var(--color-border);
  background: var(--color-bg-surface);
}

.option-row.disabled .opt-text {
  color: var(--color-text-dim);
}

.option-row.disabled input[type="checkbox"] {
  cursor: not-allowed;
  accent-color: var(--color-text-dim);
}

/* Exclusive "none" option gets subtle visual distinction */
.option-row.exclusive-option {
  border-style: dashed;
  border-color: var(--color-border-hover);
}

.option-row.exclusive-option.selected {
  border-style: solid;
  border-color: var(--color-border-accent);
}

/* "Other" free-text input inside radio groups */
.other-input-wrap {
  display: none;
  grid-column: 1 / -1;
  padding-left: calc(var(--space-3) + var(--icon-sm) + var(--space-3));
}

.other-input-wrap.visible {
  display: block;
}

/* ============================================================
   LIKERT TABLE
   ============================================================ */
.likert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.likert-table th,
.likert-table td {
  padding: var(--space-2) var(--space-2);
  text-align: center;
  vertical-align: middle;
}

.likert-table th:first-child,
.likert-table td:first-child {
  text-align: left;
  font-weight: var(--font-weight-medium);
  min-width: 180px;
  color: var(--color-text-primary);
}

.likert-table th {
  font-size: var(--text-xs);
  color: var(--color-text-dim);
  letter-spacing: var(--tracking-caps);
  font-weight: var(--font-weight-semibold);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  vertical-align: bottom;
}

.likert-table th .likert-num {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}

.likert-table th .likert-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-text-dim);
  line-height: 1.3;
  white-space: nowrap;
}

.likert-table tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.likert-table tbody tr:hover {
  background: var(--color-bg-card);
}

.likert-table tbody tr:last-child {
  border-bottom: none;
}

.likert-table td input[type="radio"] {
  accent-color: var(--brand-cyan);
  cursor: pointer;
}

/* ============================================================
   QUESTION NUMBER BADGE
   ============================================================ */
.q-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  background: var(--brand-cyan-dim);
  color: var(--brand-cyan);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  margin-right: var(--space-2);
  letter-spacing: var(--tracking-caps);
  vertical-align: middle;
  flex-shrink: 0;
}

/* Required / Optional badge */
.q-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin-left: var(--space-2);
  vertical-align: middle;
  flex-shrink: 0;
}

.q-badge.required {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.q-badge.optional {
  background: var(--color-bg-card);
  color: var(--color-text-dim);
  border: 1px solid var(--color-border);
}

/* ============================================================
   SPECTRUM SLIDER (Q2) — Segmented Design
   ============================================================ */
.spectrum-container {
  margin-top: var(--space-4);
  user-select: none;
}

/* Endpoint labels */
.spectrum-endpoint-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.spectrum-endpoint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 140px;
}

.spectrum-endpoint.left {
  text-align: left;
}

.spectrum-endpoint.right {
  text-align: right;
}

/* Track area */
.spectrum-track-area {
  position: relative;
  height: 32px;
  margin-bottom: var(--space-2);
}

/* Segmented bar */
.spectrum-bar {
  display: flex;
  gap: 4px;
  position: absolute;
  inset: 10px 0;
}

.spectrum-segment {
  flex: 1;
  height: 100%;
  background: var(--color-bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.spectrum-segment:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

.spectrum-segment.active {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan);
}

.spectrum-segment.selected {
  box-shadow: 0 0 0 2px var(--brand-cyan-dim), 0 0 8px rgba(0, 229, 204, 0.3);
}

/* Thumb */
.spectrum-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  pointer-events: none;
  transition: left 0.15s ease;
  z-index: 2;
}

.thumb-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-bg-input);
  border: 3px solid var(--brand-cyan);
  color: var(--brand-cyan);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--brand-cyan-dim);
}

/* Numbers row */
.spectrum-numbers {
  display: flex;
  justify-content: space-between;
  padding: 0 18px;
  margin-bottom: var(--space-2);
}

.spectrum-num {
  font-size: var(--text-xs);
  color: var(--color-text-dim);
  font-weight: var(--font-weight-medium);
  width: 20px;
  text-align: center;
  transition: all var(--transition-fast);
}

.spectrum-num.selected {
  color: var(--brand-cyan);
  font-weight: var(--font-weight-bold);
  transform: scale(1.15);
}

/* Segment labels */
.spectrum-seg-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.spectrum-seg-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--color-text-dim);
  line-height: 1.3;
  opacity: 0.7;
  transition: all var(--transition-fast);
}

.spectrum-seg-label.selected {
  color: var(--brand-cyan);
  opacity: 1;
  font-weight: var(--font-weight-semibold);
}

/* Hidden range input for accessibility + keyboard */
.spectrum-slider-vis {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 3;
}

/* ============================================================
   RANKING LIST (Q20)
   ============================================================ */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  cursor: grab;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  user-select: none;
}

.ranking-item:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-sm);
}

.ranking-item:active {
  cursor: grabbing;
}

.ranking-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.ranking-item .rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-cyan-dim);
  color: var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xs);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.ranking-item:hover .rank-num {
  background: rgba(0, 229, 204, 0.15);
  transform: scale(1.05);
}

.ranking-item .rank-text {
  flex: 1;
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
}

.ranking-item .rank-drag {
  color: var(--color-text-dim);
  font-size: var(--text-md);
  cursor: grab;
  flex-shrink: 0;
}

/* ============================================================
   BUCKET SORT (Feature Priorities)
   ============================================================ */
.bucket-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bucket-unsorted {
  background: var(--color-bg-card);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.bucket-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.bucket-icon {
  font-size: 16px;
  line-height: 1;
}

.bucket-count {
  margin-left: auto;
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.bucket-dropzone {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 60px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.bucket-dropzone-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.bucket-dropzone.drag-over {
  background: var(--brand-cyan-dim);
  box-shadow: inset 0 0 0 2px var(--brand-cyan);
}

.bucket-empty {
  color: var(--color-text-dim);
  font-size: var(--text-xs);
  font-style: italic;
  padding: var(--space-3);
  text-align: center;
  width: 100%;
}

.bucket-hint {
  color: var(--color-text-muted);
  font-size: 11px;
  text-align: center;
  padding: var(--space-2) 0 0;
  line-height: var(--leading-snug);
}

.bucket-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.bucket-column {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.bucket-column.bucket-must {
  border-color: rgba(239, 68, 68, 0.2);
}

.bucket-column.bucket-nice {
  border-color: rgba(245, 158, 11, 0.2);
}

.bucket-column.bucket-not {
  border-color: var(--color-border);
  opacity: 0.85;
}

.bucket-item {
  display: flex;
  align-items: flex-start;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  cursor: grab;
  user-select: none;
  transition: all var(--transition-fast);
  line-height: var(--leading-relaxed);
  touch-action: manipulation;
  position: relative;
  gap: var(--space-1);
}

.bucket-item-text {
  flex: 1;
  word-break: break-word;
  hyphens: auto;
}

.bucket-item::after {
  content: '↻';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--color-text-dim);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.bucket-item:hover::after {
  opacity: 0.6;
}

.bucket-item:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.bucket-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

@media (max-width: 768px) {
  .bucket-columns {
    grid-template-columns: 1fr;
  }
  .bucket-dropzone-horizontal {
    flex-direction: column;
  }
}

/* ============================================================
   TEXT INPUTS & TEXTAREAS
   ============================================================ */
.text-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  line-height: var(--leading-normal);
}

.text-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px var(--brand-cyan-dim);
}

.text-input::placeholder {
  color: var(--color-text-dim);
}

textarea.text-input {
  min-height: 100px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}

/* ============================================================
   SUBMIT / CONFIRMATION CARD
   ============================================================ */
.submit-card {
  background: linear-gradient(135deg, rgba(0, 229, 204, 0.05) 0%, rgba(0, 229, 204, 0.02) 100%);
  border: 1px solid rgba(0, 229, 204, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.submit-card .check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  font-size: 28px;
  color: var(--brand-cyan);
}

.submit-card h2 {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.submit-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   THANK YOU SCREEN
   ============================================================ */
.thank-you {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.thank-you .logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-cyan), #00b3a0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  font-size: var(--text-2xl);
  color: var(--color-text-on-accent);
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-glow);
}

.thank-you h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-tight);
}

.thank-you p {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  max-width: 480px;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-relaxed);
}

.next-steps {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.next-step-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  text-align: center;
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  transition: all var(--transition-base);
}

.next-step-card:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.next-step-card .icon {
  font-size: var(--icon-md);
  margin-bottom: var(--space-2);
}

.next-step-card h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
}

.next-step-card span {
  font-size: var(--text-xs);
  color: var(--color-text-dim);
}

/* ============================================================
   BUTTON ROW (Navigation)
   ============================================================ */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-8);
  gap: var(--space-3);
}

/* ============================================================
   REVIEW PAGE
   ============================================================ */
.review-card {
  max-width: 800px;
  margin: 0 auto;
}

.review-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.review-section {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-fast);
}

.review-section:hover {
  border-color: var(--color-border-hover);
}

.review-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.review-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.review-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand-cyan);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.review-edit-btn {
  flex-shrink: 0;
}

.review-answer {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.review-answer:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-answer:first-child {
  padding-top: 0;
}

.review-unanswered {
  opacity: 0.6;
}

.review-unanswered .review-a em {
  color: var(--color-text-dim);
  font-style: italic;
  font-size: var(--text-sm);
}

.review-q {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  line-height: var(--leading-snug);
}

.review-a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.review-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--brand-cyan-dim);
  color: var(--brand-cyan);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  margin: 2px 4px 2px 0;
  line-height: 1.4;
}

.review-tag {
  color: var(--brand-violet);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-xs);
}

.review-hint {
  color: var(--color-text-dim);
  font-size: var(--text-xs);
}

.review-likert {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.review-likert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
}

.review-likert-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.review-rank-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.review-rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.review-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-cyan-dim);
  color: var(--brand-cyan);
  font-weight: var(--font-weight-bold);
  font-size: 11px;
  flex-shrink: 0;
}

/* Review bucket styles */
.review-bucket-section {
  margin-bottom: var(--space-2);
}

.review-bucket-section:last-child {
  margin-bottom: 0;
}

.review-bucket-label {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  margin-right: var(--space-2);
}

.review-bucket-label.must {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.review-bucket-label.nice {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.review-bucket-label.not {
  background: var(--color-bg-surface);
  color: var(--color-text-dim);
}

/* ============================================================
   BADGE / PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.badge-cyan {
  background: var(--brand-cyan-dim);
  color: var(--brand-cyan);
  border: 1px solid rgba(0, 229, 204, 0.2);
}

.badge-default {
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
  border: none;
}

/* ============================================================
   TOOLTIP (simple)
   ============================================================ */
.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--color-text-dim);
}

/* ============================================================
   SCROLLABLE WRAPPER (for overflow tables)
   ============================================================ */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn var(--transition-smooth) ease forwards;
}

.animate-slide-up {
  animation: slideUp var(--transition-slow) ease forwards;
}

/* Pulse dot (hero badge) */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  animation: pulse 2s ease infinite;
}

/* ============================================================
   SKIP LINK (Accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--brand-cyan);
  color: var(--color-text-on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ============================================================
   RESPONSIVE: Component adjustments
   ============================================================ */
@media (max-width: 768px) {
  .option-grid {
    grid-template-columns: 1fr;
  }

  .theme-toggle-option {
    padding: 5px 10px;
    font-size: 11px;
  }

  .theme-toggle-option .toggle-label {
    display: none;
  }

  .spectrum-endpoint-labels {
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .spectrum-endpoint {
    max-width: none;
    text-align: center !important;
  }

  .spectrum-seg-labels {
    display: none;  /* Hide detailed labels on mobile */
  }

  .spectrum-numbers {
    padding: 0 14px;
  }

  .likert-table th:first-child,
  .likert-table td:first-child {
    min-width: 130px;
    font-size: var(--text-xs);
  }

  .likert-table th {
    font-size: 10px;
  }

  .ranking-list .rank-num {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .btn-row {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .btn-row .btn {
    width: 100%;
  }

  .next-steps {
    flex-direction: column;
    align-items: center;
  }

  .next-step-card {
    max-width: 100%;
    width: 100%;
  }

  .review-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .review-edit-btn {
    align-self: flex-end;
  }

  .review-likert-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    flex-direction: column;
    padding: 2px;
    border-radius: var(--radius-md);
  }

  .theme-toggle-option {
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: center;
  }

  .submit-card {
    padding: var(--space-6);
  }

  .thank-you {
    padding: var(--space-10) var(--space-4);
  }

  .option-row {
    padding: var(--space-3) var(--space-3);
    font-size: var(--text-xs);
    min-height: 44px; /* Minimum touch target */
    touch-action: manipulation; /* Eliminate 300ms tap delay */
  }

  .option-row input[type="radio"],
  .option-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    touch-action: manipulation;
  }

  .ranking-item {
    padding: var(--space-3) var(--space-3);
    font-size: var(--text-xs);
    min-height: 44px; /* Minimum touch target */
    touch-action: manipulation;
  }

  .bucket-item {
    padding: var(--space-3) var(--space-3);
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Ensure text inputs are easy to tap on mobile */
  .text-input {
    font-size: 16px; /* Prevent iOS zoom on focus */
    padding: var(--space-3) var(--space-4);
  }
}
