.rr-question-builder__smart-assist {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(201, 156, 108, 0.18);
  background:
    radial-gradient(circle at top right, rgba(233, 171, 96, 0.08), transparent 34%),
    linear-gradient(160deg, rgba(92, 59, 39, 0.52), rgba(45, 28, 20, 0.82));
  display: grid;
  gap: 14px;
}

.rr-question-builder__smart-assist-head,
.rr-smart-form-assist__head,
.rr-smart-result-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rr-question-builder__smart-assist-head h4,
.rr-smart-form-assist__head h2,
.rr-smart-note-card__head h3 {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(1.25rem, 1.02rem + 0.7vw, 1.85rem);
  line-height: 1.16;
  text-wrap: balance;
}

.rr-question-builder__smart-assist-head p:last-child,
.rr-smart-form-assist__head p:last-child {
  margin: 6px 0 0;
  color: rgba(241, 220, 199, 0.74);
  font-size: clamp(1rem, 0.94rem + 0.2vw, 1.08rem);
  line-height: 1.5;
}

.rr-question-builder__smart-assist-grid,
.rr-smart-form-assist__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rr-question-builder__chip-row--smart {
  gap: 10px;
}

.rr-question-builder__chip--smart {
  background: rgba(255, 243, 228, 0.08);
  border-color: rgba(205, 160, 111, 0.26);
  color: rgba(255, 239, 221, 0.9);
  font-size: clamp(0.96rem, 0.92rem + 0.14vw, 1.02rem);
  line-height: 1.25;
}

.rr-question-builder__chip--smart:hover,
.rr-smart-form-assist__actions .rr-btn:hover,
.rr-smart-form-assist__actions .btn:hover {
  border-color: rgba(226, 179, 124, 0.42);
}

.rr-question-builder__smart-assist-status,
.rr-smart-form-assist__status {
  margin: 0;
  color: rgba(239, 219, 196, 0.72);
  font-size: clamp(1rem, 0.95rem + 0.18vw, 1.08rem);
  line-height: 1.5;
}

.rr-question-builder__smart-assist-status[data-state="pending"],
.rr-smart-form-assist__status[data-state="pending"] {
  color: rgba(247, 210, 159, 0.94);
}

.rr-question-builder__smart-assist-status[data-state="success"],
.rr-smart-form-assist__status[data-state="success"] {
  color: rgba(205, 231, 172, 0.94);
}

.rr-question-builder__smart-assist-status[data-state="error"],
.rr-smart-form-assist__status[data-state="error"] {
  color: #ffc2b4;
}

[data-display-mode="light"] .rr-question-builder__smart-assist {
  border-color: rgba(189, 145, 100, 0.2);
  background:
    radial-gradient(circle at top right, rgba(233, 171, 96, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.99), rgba(246, 236, 220, 0.96));
  box-shadow: 0 20px 36px rgba(145, 102, 49, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

[data-display-mode="light"] .rr-question-builder__smart-assist-head h4 {
  color: #4d2d1c;
}

[data-display-mode="light"] .rr-question-builder__smart-assist-head p:last-child {
  color: rgba(99, 71, 49, 0.8);
}

[data-display-mode="light"] .rr-question-builder__chip--smart {
  background: rgba(255, 249, 241, 0.88);
  border-color: rgba(191, 145, 100, 0.24);
  color: #6c462b;
}

[data-display-mode="light"] .rr-question-builder__chip--smart:hover {
  border-color: rgba(210, 163, 106, 0.34);
  background: rgba(255, 243, 230, 0.96);
}

[data-display-mode="light"] .rr-question-builder__smart-assist-status {
  color: rgba(100, 72, 50, 0.78);
}

[data-display-mode="light"] .rr-question-builder__smart-assist-status[data-state="pending"] {
  color: #ad6d2f;
}

[data-display-mode="light"] .rr-question-builder__smart-assist-status[data-state="success"] {
  color: #5f8040;
}

[data-display-mode="light"] .rr-question-builder__smart-assist-status[data-state="error"] {
  color: #b95549;
}

.rr-question-builder__smart-assist-results,
.rr-smart-form-assist__results,
.rr-smart-snapshot__stack {
  display: grid;
  gap: 12px;
}

.rr-smart-form-assist {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--maple-gold) 24%, var(--rr-border) 76%);
  background:
    radial-gradient(circle at top right, rgba(247, 217, 120, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(145, 168, 75, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(248, 239, 215, 0.94));
  box-shadow: var(--rr-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  display: grid;
  gap: 14px;
}

[data-display-mode="dark"] .rr-smart-form-assist {
  border-color: rgba(247, 217, 120, 0.18);
  background:
    radial-gradient(circle at top right, rgba(247, 217, 120, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(145, 168, 75, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(43, 30, 24, 0.98), rgba(57, 40, 31, 0.94));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 240, 219, 0.05);
}

.rr-smart-form-assist__eyebrow,
.rr-smart-note-card__eyebrow,
.rr-smart-snapshot__label {
  margin: 0;
  font-size: clamp(0.82rem, 0.78rem + 0.12vw, 0.92rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: color-mix(in srgb, var(--maple-orange) 56%, var(--ink) 44%);
}

.rr-smart-form-assist__badge,
.rr-smart-snapshot__badge,
.rr-smart-note-card__badge,
.rr-smart-result-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.1;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.98), rgba(247, 237, 210, 0.92));
  border: 1px solid rgba(106, 74, 45, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
  color: color-mix(in srgb, var(--deeper-leaf-green) 48%, var(--ink) 52%);
  font-size: clamp(0.9rem, 0.86rem + 0.12vw, 0.98rem);
  font-weight: 700;
}

[data-display-mode="dark"] .rr-smart-form-assist__badge,
[data-display-mode="dark"] .rr-smart-snapshot__badge,
[data-display-mode="dark"] .rr-smart-note-card__badge,
[data-display-mode="dark"] .rr-smart-result-card__badge {
  background: linear-gradient(180deg, rgba(74, 54, 40, 0.96), rgba(63, 45, 35, 0.94));
  border-color: rgba(247, 217, 120, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 240, 219, 0.06);
  color: #f4e5cf;
}

.rr-smart-form-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rr-smart-form-assist__primary-action,
.rr-question-builder__smart-assist-primary {
  display: flex;
}

.rr-smart-form-assist__primary-action .btn,
.rr-question-builder__smart-assist-primary .rr-btn {
  min-height: 52px;
  padding-inline: 1.2rem;
}

.rr-smart-result-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--maple-gold) 16%, var(--rr-border) 84%);
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.98), rgba(247, 238, 214, 0.92));
  box-shadow: var(--rr-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  display: grid;
  gap: 10px;
}

.rr-smart-result-card--applied {
  border-color: color-mix(in srgb, var(--moss-green) 34%, var(--rr-border) 66%);
  background:
    radial-gradient(circle at top right, rgba(145, 168, 75, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(244, 238, 214, 0.94));
}

[data-display-mode="dark"] .rr-smart-result-card {
  border-color: rgba(255, 232, 203, 0.1);
  background:
    linear-gradient(180deg, rgba(46, 33, 26, 0.98), rgba(57, 40, 31, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 240, 219, 0.04);
}

[data-display-mode="dark"] .rr-smart-result-card--applied {
  border-color: rgba(201, 223, 128, 0.2);
  background:
    radial-gradient(circle at top right, rgba(201, 223, 128, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(51, 36, 28, 0.98), rgba(61, 43, 33, 0.96));
}

.rr-smart-result-card h5 {
  margin: 0;
  font-size: clamp(1.08rem, 0.98rem + 0.32vw, 1.22rem);
  line-height: 1.35;
  text-wrap: balance;
}

.rr-smart-result-card p,
.rr-smart-note-card p,
.rr-smart-snapshot__body {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 0.95rem + 0.18vw, 1.08rem);
  line-height: 1.55;
}

.rr-smart-result-card__list,
.store-tips-list {
  margin: 0;
}

.rr-smart-result-card__list {
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.rr-smart-result-card__meta,
.rr-smart-result-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rr-smart-result-card__meta-row span,
.rr-smart-result-card__meta {
  color: color-mix(in srgb, var(--maple-orange) 60%, var(--ink) 40%);
  font-size: clamp(0.92rem, 0.88rem + 0.12vw, 0.98rem);
  font-weight: 600;
}

.rr-smart-result-card__note {
  font-size: clamp(0.96rem, 0.92rem + 0.14vw, 1.02rem);
}

.rr-smart-note-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--maple-gold) 22%, var(--rr-border) 78%);
  background:
    radial-gradient(circle at top right, rgba(247, 217, 120, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(248, 239, 215, 0.94));
  box-shadow: var(--rr-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 12px;
}

[data-display-mode="dark"] .rr-smart-note-card {
  border-color: rgba(247, 217, 120, 0.16);
  background:
    radial-gradient(circle at top right, rgba(247, 217, 120, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(44, 31, 24, 0.98), rgba(58, 41, 31, 0.95));
}

.rr-smart-note-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rr-smart-snapshot .rr-card__body {
  display: grid;
  gap: 14px;
}

.rr-smart-snapshot__item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--maple-gold) 14%, var(--rr-border) 86%);
  background: linear-gradient(180deg, rgba(255, 251, 243, 0.98), rgba(247, 238, 214, 0.92));
}

[data-display-mode="dark"] .rr-smart-snapshot__item {
  border-color: rgba(255, 232, 203, 0.1);
  background: linear-gradient(180deg, rgba(46, 33, 26, 0.98), rgba(57, 40, 31, 0.94));
}

.rr-smart-snapshot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rr-smart-form-assist .label,
.rr-question-builder__smart-assist .label {
  font-size: clamp(1rem, 0.95rem + 0.18vw, 1.08rem);
  line-height: 1.4;
}

.rr-smart-form-assist .rr-input,
.rr-smart-form-assist .input,
.rr-question-builder__smart-assist .rr-question-builder__input {
  font-size: clamp(1rem, 0.95rem + 0.18vw, 1.08rem);
  line-height: 1.35;
}

.rr-smart-form-assist .rr-input::placeholder,
.rr-smart-form-assist .input::placeholder,
.rr-question-builder__smart-assist .rr-question-builder__input::placeholder {
  font-size: inherit;
  opacity: 1;
}

.rr-smart-form-assist__actions .rr-btn,
.rr-smart-form-assist__actions .btn,
.rr-smart-result-card .rr-btn,
.rr-smart-result-card .btn,
.rr-smart-snapshot__actions .rr-btn {
  font-size: clamp(0.96rem, 0.92rem + 0.14vw, 1.02rem);
  line-height: 1.25;
}

.meta-pill--smart {
  border-color: color-mix(in srgb, var(--moss-green) 28%, var(--rr-border) 72%);
  background: color-mix(in srgb, var(--surface) 84%, rgba(145, 168, 75, 0.14) 16%);
  color: color-mix(in srgb, var(--deeper-leaf-green) 78%, var(--text) 22%);
}

@media (max-width: 960px) {
  .rr-question-builder__smart-assist-head,
  .rr-smart-form-assist__head,
  .rr-smart-result-card__head,
  .rr-smart-note-card__head {
    display: grid;
  }

  .rr-question-builder__smart-assist-grid,
  .rr-smart-form-assist__filters {
    grid-template-columns: 1fr;
  }

  .rr-smart-form-assist__badge,
  .rr-smart-snapshot__badge,
  .rr-smart-note-card__badge,
  .rr-smart-result-card__badge {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .rr-question-builder__smart-assist,
  .rr-smart-form-assist,
  .rr-smart-note-card {
    padding: 16px;
  }

  .rr-smart-form-assist__actions,
  .rr-smart-snapshot__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rr-smart-form-assist__primary-action .btn,
  .rr-question-builder__smart-assist-primary .rr-btn {
    width: 100%;
  }

  .rr-smart-form-assist__actions .rr-btn,
  .rr-smart-form-assist__actions .btn,
  .rr-smart-result-card .rr-btn,
  .rr-smart-result-card .btn,
  .rr-smart-snapshot__actions .rr-btn {
    width: 100%;
  }

  .rr-dashboard-card--smart-snapshot {
    order: 4;
  }

  .rr-dashboard-card--quick-actions {
    order: 5;
  }

  .rr-dashboard-card--child-snapshots {
    order: 6;
  }

  .rr-dashboard-card--family-snapshot {
    order: 7;
  }

  .rr-dashboard-card--award-points {
    order: 8;
  }

  .rr-dashboard-card--daily-tasks {
    order: 9;
  }

  .rr-dashboard-card--question-health {
    order: 10;
  }

  .rr-dashboard-card--recent-activity {
    order: 11;
  }
}
