/*=== Rejola AI homepage (index1.php) ===============

Loaded after home.css; only styles the AI-specific pieces.

1.ask box & match results
2.stack states
3.clickable problems
4.before / after compare
5.estimator
6.case files & industry switch
7.testimonial highlights & insights
8.assistant
9.responsive & reduced motion

==================================================*/

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The theme sets every button to width: 100% */
.rj-ask__try button,
.rj-match__reset,
.rj-industry__chips button,
.rj-assist__launch {
  width: auto;
}

/*---------- 1. ask box & match results ----------*/

.rj-ask {
  max-width: 560px;
  margin: -12px 0 28px;
}

.rj-js .rj-ask {
  opacity: 0;
}

.loaded .rj-ask {
  animation: rjRise 1s var(--rj-ease) 0.85s both;
}

.rj-ask__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--rj-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rj-indigo);
}

.rj-ask__dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--rj-indigo);
  box-shadow: 0 0 0 4px rgba(53, 52, 255, 0.15);
}

.rj-ask__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--rj-indigo);
  animation: rjPing 2.4s var(--rj-ease) infinite;
}

@keyframes rjPing {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(2.2); opacity: 0; }
}

.rj-ask__field {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--rj-line-strong);
  border-radius: var(--rj-radius);
  box-shadow: 0 24px 50px -30px rgba(53, 52, 255, 0.55);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.rj-ask__field:focus-within {
  border-color: var(--rj-indigo);
  box-shadow: 0 0 0 4px rgba(53, 52, 255, 0.12), 0 24px 50px -30px rgba(53, 52, 255, 0.55);
}

.rj-ask__field textarea {
  flex: 1;
  min-height: 64px;
  resize: none;
  border: 0 !important;
  outline: 0;
  background: transparent;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--rj-text);
  box-shadow: none !important;
}

.rj-ask__go,
.rj-assist__form button {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--rj-indigo);
  color: #fff;
  transition: background-color 0.3s;
}

.rj-ask__go:hover,
.rj-assist__form button:hover {
  background: var(--rj-indigo-600);
}

.rj-ask__go svg,
.rj-assist__form button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.4s var(--rj-ease);
}

.rj-ask__go:hover svg {
  transform: translateX(3px);
}

.rj-ask.is-busy .rj-ask__go svg {
  animation: rjNudge 0.8s ease-in-out infinite alternate;
}

@keyframes rjNudge {
  to { transform: translateX(5px); }
}

.rj-ask__try {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.rj-ask__try button {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--rj-muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rj-line);
  border-radius: var(--rj-radius);
  transition: color 0.25s, border-color 0.25s;
}

.rj-ask__try button:hover {
  color: var(--rj-indigo);
  border-color: rgba(53, 52, 255, 0.4);
}

.rj-ask__result {
  position: relative;
  margin-top: 14px;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid rgba(53, 52, 255, 0.25);
  border-radius: var(--rj-radius);
  box-shadow: 0 30px 60px -40px rgba(12, 13, 42, 0.5);
  animation: rjRise 0.6s var(--rj-ease) both;
}

.rj-match__badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  font-family: var(--rj-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--rj-radius);
  color: #fff;
  background: var(--rj-indigo);
}

.rj-match__badge--local {
  color: var(--rj-indigo);
  background: var(--rj-indigo-50);
}

.rj-match__reply {
  margin: 0 0 14px !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: var(--rj-text) !important;
}

.rj-match__loading {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--rj-muted) !important;
  animation: rjFadeIn 1s ease-in-out infinite alternate;
}

.rj-match__caps,
.rj-fix__caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.rj-match__caps span,
.rj-fix__caps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  color: #fff;
  background: var(--rj-ink);
  border-radius: var(--rj-radius);
}

.rj-match__caps em,
.rj-fix__caps em {
  font-family: var(--rj-mono);
  font-style: normal;
  font-size: 10px;
  color: var(--rj-indigo-300);
}

.rj-match__services,
.rj-fix__services {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rj-match__services a,
.rj-fix__services a {
  display: inline-block;
  padding: 6px 10px;
  font-family: var(--rj-mono);
  font-size: 11px;
  color: var(--rj-indigo);
  border: 1px solid rgba(53, 52, 255, 0.3);
  border-radius: var(--rj-radius);
  transition: background-color 0.25s, color 0.25s;
}

.rj-match__services a:hover,
.rj-fix__services a:hover {
  background: var(--rj-indigo);
  color: #fff;
}

.rj-match__story {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--rj-text);
}

.rj-match__story small,
.rj-fix__story small {
  display: block;
  font-family: var(--rj-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rj-muted);
}

.rj-match__story:hover {
  color: var(--rj-indigo);
}

.rj-match__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-medium);
  font-size: 14px;
  color: var(--rj-indigo);
}

.rj-match__cta::after {
  content: "→";
  transition: transform 0.3s var(--rj-ease);
}

.rj-match__cta:hover::after {
  transform: translateX(4px);
}

.rj-match__reset {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--rj-muted);
  background: none;
  border: 1px solid var(--rj-line);
  border-radius: var(--rj-radius);
}

/*---------- 2. stack states ----------*/

/* Secondary capabilities matched alongside the active layer */
.rj-stack__layer.is-match .rj-stack__face {
  border-color: rgba(53, 52, 255, 0.7);
  background:
    linear-gradient(rgba(53, 52, 255, 0.1) 1px, transparent 1px) 0 0 / 100% 26px,
    linear-gradient(135deg, #f0f0ff, #dedeff);
  box-shadow: 0 0 40px rgba(53, 52, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.rj-stack__layer.is-match .rj-stack__face b {
  color: var(--rj-indigo);
}

/* While the AI is matching, the layers scan */
.rj-system.is-thinking .rj-stack__layer .rj-stack__face {
  animation: rjScan 1.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.12s);
}

@keyframes rjScan {
  0%, 100% { border-color: rgba(53, 52, 255, 0.32); }
  50% { border-color: rgba(53, 52, 255, 1); box-shadow: 0 0 30px rgba(53, 52, 255, 0.4); }
}

/*---------- 3. clickable problems ----------*/

.rj-problems--ai .rj-problems__list li {
  display: block;
  padding: 0;
}

.rj-problems--ai .rj-problems__list li::before,
.rj-problems--ai .rj-problems__list li::after {
  content: none;
}

.rj-problems--ai .rj-problems__list li:hover {
  padding-left: 0;
}

.rj-problems__toggle {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 28px;
  width: 100%;
  padding: 26px 56px 26px 0;
  text-align: left;
  background: none;
  border: 0;
  font-family: var(--font-medium);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--rj-text);
  transition: color 0.3s, padding 0.5s var(--rj-ease);
}

.rj-problems__toggle::before {
  content: counter(problem, decimal-leading-zero);
  flex-shrink: 0;
  width: 28px;
  font-family: var(--rj-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--rj-indigo);
}

.rj-problems__toggle::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--rj-mono);
  font-size: 22px;
  color: var(--rj-indigo);
  transition: transform 0.4s var(--rj-ease);
}

.rj-problems__toggle:hover,
.rj-problems--ai li.is-open .rj-problems__toggle {
  color: var(--rj-indigo);
}

.rj-problems__toggle:hover {
  padding-left: 12px;
}

.rj-problems--ai li.is-open .rj-problems__toggle::after {
  transform: translateY(-50%) rotate(45deg);
}

.rj-fix {
  padding: 0 0 28px 56px;
  animation: rjRise 0.5s var(--rj-ease) both;
}

.rj-fix__story {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--rj-line-strong);
  border-radius: var(--rj-radius);
  font-size: 15px;
  color: var(--rj-text);
  transition: border-color 0.3s;
}

.rj-fix__story img {
  width: 64px;
  height: 48px;
  object-fit: cover;
}

.rj-fix__story:hover {
  border-color: var(--rj-indigo);
  color: var(--rj-indigo);
}

/*---------- 4. before / after compare ----------*/

.rj-compare {
  --pos: 50%;
  margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.rj-compare__stage {
  position: relative;
  aspect-ratio: 2 / 1;
  border: 1px solid var(--rj-line-dark);
  border-radius: var(--rj-radius);
  overflow: hidden;
  user-select: none;
}

.rj-compare__pane {
  position: absolute;
  inset: 0;
}

.rj-compare__pane--after {
  background:
    radial-gradient(closest-side, rgba(53, 52, 255, 0.4), transparent),
    linear-gradient(160deg, #11124a, #070822);
}

.rj-compare__pane--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #2a1418, #120a10);
}

.rj-sheet {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 22%;
  aspect-ratio: 4 / 3;
  transform: rotate(var(--r));
  background:
    linear-gradient(rgba(61, 170, 74, 0.35) 1px, transparent 1px) 0 0 / 100% 14%,
    linear-gradient(90deg, rgba(61, 170, 74, 0.35) 1px, transparent 1px) 0 0 / 22% 100%,
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(61, 170, 74, 0.5);
}

.rj-tangle,
.rj-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rj-tangle path {
  fill: none;
  stroke: rgba(232, 51, 62, 0.65);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  animation: rjDash 14s linear infinite;
}

@keyframes rjDash {
  to { stroke-dashoffset: -240; }
}

.rj-pain,
.rj-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  max-width: 44%;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  border-radius: var(--rj-radius);
}

.rj-pain {
  color: #ffd9dc;
  background: rgba(232, 51, 62, 0.16);
  border: 1px solid rgba(232, 51, 62, 0.5);
}

.rj-flow__line {
  fill: none;
  stroke: rgba(143, 142, 255, 0.6);
  stroke-width: 2;
}

.rj-flow__pulse {
  fill: #fff;
  filter: drop-shadow(0 0 6px #8f8eff);
}

.rj-node {
  color: #fff;
  background: rgba(30, 31, 80, 0.9);
  border: 1px solid rgba(143, 142, 255, 0.55);
  white-space: nowrap;
}

.rj-node--hub {
  padding: 12px 18px;
  font-family: var(--font-medium);
  font-size: 15px;
  background: var(--rj-indigo);
  border-color: transparent;
  box-shadow: 0 0 40px rgba(53, 52, 255, 0.8);
}

.rj-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
}

.rj-compare__handle::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--rj-ink);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.rj-compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.rj-compare__range:focus-visible + .rj-compare__handle,
.rj-compare__stage:focus-within .rj-compare__handle::after {
  outline: 2px solid var(--rj-indigo-300);
  outline-offset: 3px;
}

.rj-compare__quote {
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--rj-indigo);
}

.rj-compare__quote p {
  margin: 0 0 18px;
  font-size: 19px !important;
  line-height: 1.6 !important;
  color: rgba(234, 235, 255, 0.86) !important;
}

.rj-compare__quote cite {
  font-style: normal;
  font-family: var(--rj-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--rj-indigo-300);
}

/*---------- 5. estimator ----------*/

.rj-estimate {
  background: var(--rj-paper);
}

.rj-estimate__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 80px;
  align-items: center;
}

.rj-estimate__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  background: #fff;
  border: 1px solid var(--rj-line-strong);
  border-radius: var(--rj-radius);
  box-shadow: 0 40px 80px -50px rgba(12, 13, 42, 0.45);
}

.rj-estimate__fields {
  display: grid;
  gap: 26px;
  padding: 36px;
}

.rj-range span,
.rj-estimate__cost label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--rj-text);
}

.rj-range output {
  font-family: var(--rj-mono);
  color: var(--rj-indigo);
}

.rj-range input[type="range"] {
  width: 100%;
  accent-color: var(--rj-indigo);
}

.rj-estimate__cost > div {
  display: flex;
  gap: 8px;
}

.rj-estimate__cost select,
.rj-estimate__cost input {
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
  border: 1px solid var(--rj-line-strong) !important;
  border-radius: var(--rj-radius) !important;
  background: #fff;
}

.rj-estimate__cost select {
  flex: 0 0 auto;
  width: auto;
}

.rj-estimate__cost input {
  flex: 1;
  min-width: 0;
}

.rj-estimate__result {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px;
  color: #fff;
  background:
    radial-gradient(360px 260px at 100% 0%, rgba(53, 52, 255, 0.6), transparent 70%),
    var(--rj-ink);
}

.rj-estimate__result strong {
  display: block;
  font-family: var(--font-medium);
  font-weight: 400;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.rj-estimate__result span {
  font-family: var(--rj-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rj-indigo-300);
}

.rj-estimate__note {
  margin: auto 0 0 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: rgba(226, 228, 255, 0.6) !important;
}

.rj-estimate__result .rts-btn {
  max-width: 100%;
}

/*---------- 6. case files & industry switch ----------*/

.rj-stories__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.rj-stories--ai .rj-stories__head .title {
  margin-bottom: 0;
}

.rj-industry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rj-industry__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rj-industry__chips button {
  padding: 8px 12px;
  font-size: 13px;
  color: rgba(226, 228, 255, 0.8);
  background: transparent;
  border: 1px solid var(--rj-line-dark);
  border-radius: var(--rj-radius);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.rj-industry__chips button:hover {
  border-color: rgba(143, 142, 255, 0.6);
}

.rj-industry__chips button.is-on {
  color: var(--rj-ink);
  background: #fff;
  border-color: #fff;
}

.rj-industry__more select {
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--rj-line-dark);
  border-radius: var(--rj-radius);
}

.rj-industry__more option {
  color: var(--rj-text);
}

.rj-industry__link {
  display: inline-block;
  margin: -16px 0 28px;
  font-family: var(--rj-mono);
  font-size: 13px;
  color: var(--rj-indigo-300);
}

.rj-industry__link:hover {
  color: #fff;
}

.rj-cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.rj-case {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rj-line-dark);
  border-radius: var(--rj-radius);
  overflow: hidden;
  transition: border-color 0.4s, opacity 0.4s, transform 0.5s var(--rj-ease);
}

.rj-case:hover {
  border-color: rgba(143, 142, 255, 0.55);
  transform: translateY(-4px);
}

.rj-case__media {
  display: block;
  overflow: hidden;
}

.rj-case__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 1.2s var(--rj-ease);
}

.rj-case:hover .rj-case__media img {
  transform: scale(1.06);
}

.rj-case__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
}

.rj-case__title {
  margin: 0 36px 14px 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.rj-case__title a {
  color: #fff;
}

.rj-case__steps {
  display: grid;
  gap: 12px;
  margin: 0;
}

.rj-case__steps dt {
  margin-bottom: 3px;
  font-family: var(--rj-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rj-indigo-300);
}

.rj-case__steps dd {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(226, 228, 255, 0.72);
}

.rj-case__more {
  position: absolute;
  top: 20px;
  right: 18px;
}

.rj-case__more img {
  width: 20px;
  filter: brightness(0) invert(1);
  transition: transform 0.4s var(--rj-ease);
}

.rj-case:hover .rj-case__more img {
  transform: translate(3px, -3px);
}

.rj-cases.is-filtered .rj-case {
  opacity: 0.32;
}

.rj-cases.is-filtered .rj-case.is-match {
  order: -1;
  opacity: 1;
  border-color: rgba(143, 142, 255, 0.7);
}

/*---------- 7. testimonial highlights & insights ----------*/

.rj-voices mark {
  color: inherit;
  padding: 0 2px;
  background: linear-gradient(transparent 58%, rgba(53, 52, 255, 0.2) 58%);
}

.rj-home--ai .rj-insights .thumbnail {
  display: block;
  overflow: hidden;
}

/*---------- 8. assistant ----------*/

.rj-assist {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1001;
}

.rj-assist__launch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 20px;
  font-family: var(--font-medium);
  font-size: 15px;
  color: #fff;
  background: var(--rj-ink);
  border: 1px solid rgba(143, 142, 255, 0.4);
  border-radius: 999px;
  box-shadow: 0 16px 40px -12px rgba(53, 52, 255, 0.7);
  transition: transform 0.4s var(--rj-ease), background-color 0.3s;
}

.rj-assist__launch:hover {
  transform: translateY(-2px);
  background: var(--rj-indigo);
}

.rj-assist__launch .rj-ask__dot {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.rj-assist__launch .rj-ask__dot::after {
  border-color: #fff;
}

.rj-assist.is-open .rj-assist__launch {
  display: none;
}

.rj-assist__panel {
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--rj-line-strong);
  border-radius: var(--rj-radius);
  box-shadow: 0 40px 100px -30px rgba(12, 13, 42, 0.55);
  overflow: hidden;
  animation: rjRise 0.45s var(--rj-ease) both;
}

.rj-assist__panel[hidden] {
  display: none;
}

.rj-assist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: #fff;
  background:
    radial-gradient(240px 120px at 100% 0%, rgba(53, 52, 255, 0.7), transparent 70%),
    var(--rj-ink);
}

.rj-assist__head strong {
  font-family: var(--font-medium);
  font-weight: 400;
  font-size: 16px;
}

.rj-assist__close {
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
}

.rj-assist__log {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--rj-paper);
}

.rj-msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: var(--rj-radius);
  font-size: 14px;
  line-height: 1.55;
}

.rj-msg p {
  margin: 0 0 8px;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.rj-msg p:last-child {
  margin-bottom: 0;
}

.rj-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--rj-line);
}

.rj-msg--me {
  align-self: flex-end;
  color: #fff;
  background: var(--rj-indigo);
}

.rj-msg--me p {
  color: #fff !important;
}

.rj-msg .rj-match__reply {
  margin-bottom: 10px !important;
  font-size: 14px !important;
}

.rj-assist__form {
  display: flex;
  border-top: 1px solid var(--rj-line);
}

.rj-assist__form input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  font-size: 15px;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
}

.rj-assist__form button {
  width: 54px;
}

.rj-assist__fine {
  margin: 0 !important;
  padding: 8px 16px 10px;
  font-size: 11px !important;
  line-height: 1.4 !important;
  color: var(--rj-muted) !important;
  background: #fff;
}

/*---------- 9. responsive & reduced motion ----------*/

@media (max-width: 1199px) {
  .rj-cases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rj-estimate__grid {
    gap: 48px;
  }
}

@media (max-width: 991px) {
  .rj-compare,
  .rj-estimate__grid {
    grid-template-columns: 1fr;
  }

  .rj-compare {
    margin-top: 64px;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .rj-ask {
    margin-top: -8px;
  }

  .rj-fix {
    padding-left: 0;
  }

  .rj-compare__stage {
    aspect-ratio: 4 / 3;
  }

  .rj-pain,
  .rj-node {
    font-size: 10px;
    padding: 6px 8px;
  }

  .rj-node {
    white-space: normal;
  }

  .rj-estimate__card {
    grid-template-columns: 1fr;
  }

  .rj-estimate__fields,
  .rj-estimate__result {
    padding: 26px 22px;
  }

  .rj-cases {
    grid-template-columns: 1fr;
  }

  .rj-assist {
    left: 16px;
    bottom: 16px;
  }

  .rj-assist__launch {
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rj-js .rj-ask {
    opacity: 1;
  }

  .loaded .rj-ask,
  .rj-ask__dot::after,
  .rj-tangle path,
  .rj-system.is-thinking .rj-stack__layer .rj-stack__face,
  .rj-ask__result,
  .rj-fix,
  .rj-assist__panel {
    animation: none !important;
  }
}

/* Examples step aside once there is a result */
.rj-ask.has-result .rj-ask__try {
  display: none;
}

/* Links inside an open problem are not part of the numbered list */
.rj-problems--ai .rj-fix li {
  counter-increment: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
