/* V53–V54 — Quest experience: honest claim review and legible eligibility. */
.v53-quest-action {
  border: 1px solid rgba(70, 49, 37, 0.12);
  background: linear-gradient(150deg, rgba(255, 250, 241, 0.98), rgba(242, 229, 207, 0.88));
  box-shadow: 0 14px 30px rgba(47, 31, 22, 0.08);
}

.v53-quest-confirmation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(29, 75, 55, 0.2);
  border-radius: 18px;
  background: #e6f5c5;
  color: #173c2c;
}

.v53-quest-confirmation > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #1d4b37;
  color: #fffaf1;
  font-size: 1.2rem;
  font-weight: 800;
}

.v53-quest-confirmation p,
.v53-quest-confirmation strong,
.v53-quest-confirmation small { display: block; margin: 0; }
.v53-quest-confirmation strong { margin: 2px 0 4px; font-size: 1rem; line-height: 1.2; }
.v53-quest-confirmation small { color: #365c4a; font-size: 0.72rem; line-height: 1.4; }

.v53-quest-review {
  position: relative;
  overflow: hidden;
  margin: 14px 16px;
  padding: 20px;
  border: 1px solid rgba(197, 255, 89, 0.34);
  border-radius: 24px;
  background: radial-gradient(circle at 95% 0, rgba(197, 255, 89, 0.16), transparent 34%), #17120f;
  color: #fffaf1;
  box-shadow: 0 18px 34px rgba(45, 27, 18, 0.18);
}

.v53-quest-review-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 15px;
  background: #c5ff59;
  color: #17120f;
  font-size: 1.15rem;
  transform: rotate(-5deg);
}

.v53-quest-review .eyebrow { color: #d7eea2; }
.v53-quest-review h2 { margin: 4px 0 16px; color: #fffaf1; font-size: clamp(1.45rem, 6.6vw, 1.8rem); line-height: 1.05; letter-spacing: -0.045em; }
.v53-quest-review dl { display: grid; gap: 0; margin: 0; }
.v53-quest-review dl > div { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 250, 241, 0.14); }
.v53-quest-review dt { color: #bdb2aa; font-size: 0.72rem; }
.v53-quest-review dd { margin: 0; color: #fffaf1; font-size: 0.8rem; font-weight: 750; text-align: right; }
.v53-quest-review > p:not(.eyebrow) { margin: 16px 0; color: #d7cec7; font-size: 0.78rem; line-height: 1.55; }
.v53-quest-review > p strong { color: #fffaf1; }
.v53-quest-review-actions { display: grid; gap: 8px; }
.v53-quest-review-actions .button { min-height: 48px; }

@media (max-width: 340px) {
  .v53-quest-review { padding: 18px 16px; }
  .v53-quest-review dl > div { grid-template-columns: 1fr; gap: 3px; }
  .v53-quest-review dd { text-align: left; }
}

@media (forced-colors: active) {
  .v53-quest-review,
  .v53-quest-confirmation,
  .v53-quest-confirmation > span { border: 1px solid CanvasText; }
  .member-view-quest .v29-quest-intro > div > .eyebrow,
  .member-view-quest .v29-quest-journey header > div > .eyebrow,
  .member-view-quest .v29-quest-journey h2,
  .member-view-quest .v29-quest-summary,
  .member-view-quest .v29-quest-milestones strong,
  .member-view-quest .v29-quest-milestones small { color: CanvasText !important; }
  .member-view-quest .v29-quest-intro > div > .eyebrow,
  .member-view-quest .v29-quest-journey header > div > .eyebrow { background: Canvas !important; }
  .v53-quest-review .button {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    forced-color-adjust: auto;
  }
  .v53-quest-action .button {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) { .v53-quest-review-mark { transform: none; } }

.v54-quest-guide {
  margin: 14px 16px;
  padding: 18px;
  border: 1px solid rgba(70, 49, 37, 0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 0, rgba(214, 137, 67, 0.12), transparent 34%),
    linear-gradient(150deg, rgba(255, 252, 246, 0.98), rgba(244, 234, 218, 0.9));
  box-shadow: 0 14px 32px rgba(47, 31, 22, 0.07);
}

.v54-quest-guide > header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.v54-quest-guide-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: #1d4b37;
  color: #e6f5c5;
  font-size: 1rem;
  transform: rotate(-4deg);
}

.v54-quest-guide .eyebrow,
.v54-quest-guide h2 { margin: 0; }
.v54-quest-guide .eyebrow { color: #765542; font-size: 0.66rem; }
.v54-quest-guide h2 { margin-top: 3px; color: #211a16; font-size: clamp(1.08rem, 5vw, 1.32rem); line-height: 1.18; letter-spacing: -0.035em; }

.v54-quest-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 16px 0 12px;
  border: 1px solid rgba(70, 49, 37, 0.12);
  border-radius: 16px;
  background: rgba(70, 49, 37, 0.12);
}

.v54-quest-facts > div {
  min-width: 0;
  padding: 11px 9px;
  background: rgba(255, 252, 246, 0.94);
}

.v54-quest-facts small,
.v54-quest-facts strong { display: block; margin: 0; overflow-wrap: anywhere; }
.v54-quest-facts small { color: #765f52; font-size: 0.62rem; line-height: 1.25; }
.v54-quest-facts strong { margin-top: 5px; color: #211a16; font-size: 0.72rem; line-height: 1.3; }

.v54-quest-rules { border-top: 1px solid rgba(70, 49, 37, 0.13); }

.v54-quest-rules > summary {
  position: relative;
  display: grid;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) 24px;
  min-height: 52px;
  padding: 12px 0;
  align-items: center;
  color: #211a16;
  cursor: pointer;
  list-style: none;
}

.v54-quest-rules > summary::-webkit-details-marker { display: none; }
.v54-quest-rules > summary > span:first-child { min-width: 0; overflow-wrap: anywhere; font-size: 0.82rem; font-weight: 800; line-height: 1.25; }
.v54-quest-rules > summary > small { grid-column: 1; min-width: 0; margin-top: 2px; overflow-wrap: anywhere; color: #765f52; font-size: 0.66rem; line-height: 1.3; }
.v54-quest-rules-chevron { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; color: #5b4032; transition: transform 160ms ease; }
.v54-quest-rules[open] .v54-quest-rules-chevron { transform: rotate(180deg); }

.v54-quest-rules-grid { display: grid; gap: 10px; padding-top: 4px; }
.v54-quest-rules-grid > section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.82);
}

.v54-rule-state { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; }
.v54-rule-state.counted { background: #dcefd0; color: #1d4b37; }
.v54-rule-state.excluded { background: #f4ded1; color: #773c28; }
.v54-quest-rules-grid h3 { margin: 1px 0 7px; color: #211a16; font-size: 0.8rem; line-height: 1.2; }
.v54-quest-rules-grid ul { display: grid; gap: 6px; margin: 0; padding-left: 16px; }
.v54-quest-rules-grid li { color: #5e4c42; font-size: 0.7rem; line-height: 1.4; }
.v54-quest-boundary { margin: 12px 0 2px; padding-left: 12px; border-left: 2px solid #c56d3b; color: #6a5346; font-size: 0.69rem; line-height: 1.45; }

@media (min-width: 370px) {
  .v54-quest-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 340px) {
  .v54-quest-guide { padding: 16px 14px; }
  .v54-quest-facts { grid-template-columns: 1fr; }
  .v54-quest-facts > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px; align-items: baseline; }
  .v54-quest-facts strong { margin-top: 0; text-align: right; }
}

@media (forced-colors: active) {
  .v54-quest-guide,
  .v54-quest-facts,
  .v54-quest-rules,
  .v54-quest-rules-grid > section,
  .v54-rule-state { border: 1px solid CanvasText; }
  .v54-quest-guide-mark,
  .v54-rule-state { background: Canvas; color: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  .v54-quest-guide-mark { transform: none; }
  .v54-quest-rules-chevron { transition: none; }
}
