/* Scene 4 visual refresh, scoped to the trusted answer experience. */
body[data-scene="4"] {
  --answer-ink: #101d45;
  --answer-muted: #536184;
  --answer-line: #e0e6ef;
  --answer-blue: #075bff;
  --answer-green: #15956b;
  --answer-amber: #e88a1c;
  background: #f8f9fb;
}

body[data-scene="4"] #main {
  max-width: 1500px;
  padding: 30px clamp(20px, 3vw, 48px) 42px;
  color: var(--answer-ink);
}

body[data-scene="4"] #main::before {
  top: 0;
  right: 2%;
  left: 2%;
  height: 106px;
  margin: 0;
  border-radius: 0 0 34px 34px;
  background: linear-gradient(105deg, #eaf5ff 0%, #f5fbff 58%, rgb(248 249 251 / 0%) 100%);
}

body[data-scene="4"] .page-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}

body[data-scene="4"] .page-heading h1,
body[data-scene="4"] .page-heading .title {
  margin-bottom: 5px;
  color: var(--answer-ink);
  font-size: clamp(26px, 2.15vw, 34px);
  letter-spacing: -.85px;
}

body[data-scene="4"] .page-heading .lead {
  margin: 0;
  color: var(--answer-muted);
  font-size: 15px;
}

body[data-scene="4"] .answer-toolbar {
  position: relative;
  z-index: 1;
  min-height: 50px;
  margin-bottom: 18px;
  padding: 8px 0;
}

body[data-scene="4"] .answer-toolbar .btn {
  min-height: 38px;
  border-color: #cfd9e7;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

body[data-scene="4"] .answer-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

body[data-scene="4"] .answer-state > .answer-line-icon {
  width: 22px;
  height: 22px;
  color: var(--answer-blue);
}

body[data-scene="4"] .answer-layout {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.62fr) minmax(290px, .68fr);
  gap: 18px;
  align-items: start;
}

body[data-scene="4"] .answer-main,
body[data-scene="4"] .answer-trust {
  min-width: 0;
  gap: 18px;
}

body[data-scene="4"] .answer-main > .card,
body[data-scene="4"] .answer-trust > .card {
  margin: 0;
  border: 1px solid var(--answer-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 7px rgb(19 38 75 / 5%);
}

body[data-scene="4"] .answer-question-card,
body[data-scene="4"] .answer-card,
body[data-scene="4"] .answer-sources-card,
body[data-scene="4"] .answer-trust-card {
  padding: 20px 21px;
}

body[data-scene="4"] .answer-card-heading,
body[data-scene="4"] .answer-trust-heading,
body[data-scene="4"] .answer-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-scene="4"] .answer-card-heading > div,
body[data-scene="4"] .answer-trust-heading > div,
body[data-scene="4"] .answer-section-heading > div {
  min-width: 0;
}

body[data-scene="4"] .answer-card-heading strong,
body[data-scene="4"] .answer-trust-heading strong,
body[data-scene="4"] .answer-section-heading strong {
  display: block;
  color: var(--answer-ink);
  font-size: 16px;
}

body[data-scene="4"] .answer-card-heading .small,
body[data-scene="4"] .answer-trust-heading .small,
body[data-scene="4"] .answer-section-heading .small {
  display: block;
  margin-top: 4px;
}

body[data-scene="4"] .answer-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background: #edf3ff;
  color: var(--answer-blue);
}

body[data-scene="4"] .answer-line-icon {
  display: block;
  width: 18px;
  height: 18px;
}

body[data-scene="4"] .answer-question-card {
  gap: 14px;
}

body[data-scene="4"] .answer-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 13px 14px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--answer-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

body[data-scene="4"] .answer-question-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--answer-blue);
}

body[data-scene="4"] .answer-question-arrow .answer-line-icon {
  width: 20px;
  height: 20px;
}

body[data-scene="4"] .answer-card {
  gap: 14px;
}

body[data-scene="4"] .answer-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #15845e;
  font-weight: 700;
}

body[data-scene="4"] .answer-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #20a172;
  color: #fff;
}

body[data-scene="4"] .answer-status-icon .answer-line-icon { width: 18px; height: 18px; }

body[data-scene="4"] .answer-title {
  max-width: 780px;
  margin: 1px 0 0;
  color: var(--answer-ink);
  font-size: clamp(24px, 2.1vw, 31px);
  letter-spacing: -.7px;
  line-height: 1.22;
}

body[data-scene="4"] .answer-summary {
  max-width: 720px;
  margin: 0;
  color: #3f4e77;
  font-size: 15px;
  line-height: 1.6;
}

body[data-scene="4"] .answer-generated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--answer-muted);
  font-size: 12px;
}

body[data-scene="4"] .answer-generated .answer-line-icon { width: 16px; height: 16px; color: #6a7a9d; }
body[data-scene="4"] .answer-owner-verified { margin: 1px 0 0; }
body[data-scene="4"] .answer-key-heading { font-size: 14px; }

body[data-scene="4"] .answer-key-points {
  display: grid;
  gap: 11px;
  margin: -2px 0 0;
  padding: 0;
  list-style: none;
}

body[data-scene="4"] .answer-key-points li {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: #3f4e77;
  line-height: 1.5;
}

body[data-scene="4"] .answer-key-points li > span:first-child { color: #15956b; }
body[data-scene="4"] .answer-key-points .answer-line-icon { width: 17px; height: 17px; margin-top: 1px; }

body[data-scene="4"] .answer-source-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--answer-blue);
  font-size: 12px;
  font-weight: 700;
}

body[data-scene="4"] .answer-sources-card { gap: 15px; }
body[data-scene="4"] .answer-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
}

body[data-scene="4"] .answer-source-tile {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 144px;
  padding: 16px 13px 14px 0;
}

body[data-scene="4"] .answer-source-tile + .answer-source-tile {
  padding-left: 16px;
  border-left: 1px solid #edf0f4;
}

body[data-scene="4"] .answer-source-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

body[data-scene="4"] .answer-source-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
}

body[data-scene="4"] .answer-source-logo .answer-line-icon { width: 22px; height: 22px; }
body[data-scene="4"] .answer-source-policy { background: #fff1df; color: #d4750e; }
body[data-scene="4"] .answer-source-faq { background: #e6f0ff; color: #4d5bc8; }
body[data-scene="4"] .answer-source-process { background: #e3f4fc; color: #0874bb; }

body[data-scene="4"] .answer-source-copy { min-width: 0; }
body[data-scene="4"] .answer-source-copy strong { display: block; color: var(--answer-ink); font-size: 13px; line-height: 1.35; }
body[data-scene="4"] .answer-source-copy span { display: block; margin-top: 5px; color: var(--answer-muted); font-size: 11px; line-height: 1.45; }
body[data-scene="4"] .answer-source-tile .btn.link { align-self: flex-start; padding: 0; color: var(--answer-blue); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
body[data-scene="4"] .answer-source-note { margin: 0; }

body[data-scene="4"] .answer-trust-card { gap: 16px; }
body[data-scene="4"] .answer-trust-heading { align-items: flex-start; padding-bottom: 2px; }
body[data-scene="4"] .answer-trust-heading .answer-heading-icon { background: #edf3ff; }
body[data-scene="4"] .answer-trust-list { border-top: 1px solid #edf0f4; }
body[data-scene="4"] .answer-trust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid #edf0f4;
}

body[data-scene="4"] .answer-trust-label,
body[data-scene="4"] .answer-trust-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: #3f4e77;
  font-size: 13px;
}

body[data-scene="4"] .answer-trust-label { color: var(--answer-ink); font-weight: 600; }
body[data-scene="4"] .answer-trust-label .answer-line-icon { width: 18px; height: 18px; color: var(--answer-blue); }
body[data-scene="4"] .answer-trust-value { justify-content: flex-end; text-align: right; }
body[data-scene="4"] .answer-trust-value .btn.link { padding: 0; font-size: 13px; text-align: right; }

body[data-scene="4"] .answer-warning {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid #f2d09b;
  background: #fffaf1;
  color: #8c5308;
}

body[data-scene="4"] .answer-warning-icon { color: var(--answer-amber); }
body[data-scene="4"] .answer-warning .answer-line-icon { width: 19px; height: 19px; }
body[data-scene="4"] .answer-warning strong { display: block; font-size: 13px; line-height: 1.4; }
body[data-scene="4"] .answer-warning .btn.link { display: block; margin-top: 7px; padding: 0; color: #a25b00; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

body[data-scene="4"] .answer-trust-actions { display: grid; gap: 0; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; }
body[data-scene="4"] .answer-trust-actions > .btn { justify-content: flex-start; min-height: 43px; padding: 12px 16px; border: 0; border-radius: 0; border-bottom: 1px solid #edf0f4; color: var(--answer-blue); font-size: 13px; font-weight: 600; text-align: left; }
body[data-scene="4"] .answer-trust-actions > .btn:last-child { border-bottom: 0; }
body[data-scene="4"] .answer-trust-actions > .btn.answer-challenge-btn { border: 1px solid #e84646; border-radius: 0 0 8px 8px; color: #c92929; background: #fffafb; }

/* The challenge remains the existing modal flow, with these styles limited to its content. */
.answer-challenge-form { gap: 17px; }
.answer-challenge-intro { display: flex; align-items: flex-start; gap: 12px; }
.answer-challenge-intro p { margin: 0; color: #27385f; font-size: 15px; line-height: 1.5; }
.answer-challenge-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: #fff1de; color: #d8790b; }
.answer-challenge-icon svg { width: 20px; height: 20px; }
.answer-challenge-question { margin: 0; border: 1px solid #dce4ef; background: #f8faff; }
.answer-challenge-question p { margin-top: 7px; color: #26375e; }
.answer-challenge-form .field { margin: 0; }
.answer-challenge-form .field > span { display: block; font-weight: 700; }
.answer-challenge-form textarea { margin-top: 8px; border-color: #98baf6; box-shadow: 0 0 0 2px rgb(7 91 255 / 8%); }

@media (max-width: 1100px) {
  body[data-scene="4"] .answer-layout { grid-template-columns: minmax(0, 1.45fr) minmax(270px, .75fr); }
  body[data-scene="4"] .answer-source-grid { grid-template-columns: 1fr; }
  body[data-scene="4"] .answer-source-tile { min-height: 0; padding: 13px 0; }
  body[data-scene="4"] .answer-source-tile + .answer-source-tile { padding-left: 0; border-top: 1px solid #edf0f4; border-left: 0; }
}

@media (max-width: 820px) {
  body[data-scene="4"] .answer-layout { grid-template-columns: 1fr; }
  body[data-scene="4"] .answer-trust { display: grid; grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  body[data-scene="4"] #main { padding: 23px 14px 34px; }
  body[data-scene="4"] #main::before { right: 0; left: 0; height: 100px; border-radius: 0 0 22px 22px; }
  body[data-scene="4"] .answer-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  body[data-scene="4"] .answer-toolbar > .row { width: 100%; }
  body[data-scene="4"] .answer-toolbar > .row .btn { flex: 1; }
  body[data-scene="4"] .answer-question-card,
  body[data-scene="4"] .answer-card,
  body[data-scene="4"] .answer-sources-card,
  body[data-scene="4"] .answer-trust-card { padding: 17px 16px; }
  body[data-scene="4"] .answer-title { font-size: 23px; }
  body[data-scene="4"] .answer-summary { font-size: 14px; }
}
