/* ThemeBend — Tools (calculators + quizzes) shared styling.
   Brand-coded with --rb-colors-primary; mobile-first; minimal vendor prefixes. */

.rb-tool {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  font-family: var(--rb-sans, "Lato", system-ui, sans-serif);
  color: var(--rb-colors-ink, #2d1810);
}
.rb-tool__eyebrow {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rb-colors-primary, #2d6a4f);
  margin: 0 0 12px;
}
.rb-tool__title {
  font-family: var(--rb-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--rb-colors-primary, #2d6a4f);
}
.rb-tool__lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 0 0 32px;
  max-width: 600px;
}
.rb-tool__card {
  background: var(--rb-colors-surface-alt, #faf7f2);
  border: 1px solid var(--rb-colors-neutral-200, #e8e8e8);
  border-radius: 14px;
  padding: 28px 24px;
  margin: 0 0 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

/* form rows */
.rb-tool__field { margin: 0 0 20px; }
.rb-tool__label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 0 0 8px;
}
.rb-tool__select,
.rb-tool__input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--rb-colors-ink, #2d1810);
  background: #fff;
  border: 2px solid var(--rb-colors-neutral-300, #d6d3d1);
  border-radius: 8px;
  transition: border-color .15s;
}
.rb-tool__select:focus,
.rb-tool__input:focus {
  outline: 0;
  border-color: var(--rb-colors-primary, #2d6a4f);
}

/* button */
.rb-tool__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--rb-sans, system-ui, sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rb-colors-primary, #2d6a4f);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.rb-tool__btn:hover {
  background: var(--rb-colors-primary-hover, #1b4332);
  transform: translateY(-1px);
}

/* result panel */
.rb-tool__result {
  display: none;
  background: #fff;
  border: 2px solid var(--rb-colors-primary, #2d6a4f);
  border-radius: 14px;
  padding: 32px 28px;
  margin: 24px 0 0;
  text-align: center;
}
.rb-tool__result.is-visible { display: block; }
.rb-tool__result-eyebrow {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rb-colors-primary, #2d6a4f);
  margin: 0 0 8px;
}
.rb-tool__result-headline {
  font-family: var(--rb-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--rb-colors-ink, #2d1810);
}
.rb-tool__result-sub {
  font-size: 1.05rem;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 0 0 16px;
}
.rb-tool__result-detail {
  text-align: left;
  background: var(--rb-colors-surface-alt, #faf7f2);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: .92rem;
  line-height: 1.6;
  margin: 16px 0 0;
}

/* lab note inline */
.rb-tool__lab-note {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--rb-colors-accent-band, #fff8f0);
  border-left: 3px solid var(--rb-colors-primary, #2d6a4f);
  border-radius: 4px;
  font-size: .9rem;
  line-height: 1.5;
}
.rb-tool__lab-note strong {
  display: block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rb-colors-primary, #2d6a4f);
  margin: 0 0 6px;
}

/* ─── Quiz-specific ─────────────────────────────────────────── */
.rb-quiz__progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 24px;
  font-size: .82rem;
  color: var(--rb-colors-neutral-600, #6b6b6b);
}
.rb-quiz__progress-bar {
  flex: 1;
  height: 4px;
  background: var(--rb-colors-neutral-200, #e8e8e8);
  border-radius: 2px;
  margin: 0 12px;
  overflow: hidden;
}
.rb-quiz__progress-fill {
  height: 100%;
  background: var(--rb-colors-primary, #2d6a4f);
  width: 0%;
  transition: width .25s;
}
.rb-quiz__question {
  font-family: var(--rb-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 20px;
  color: var(--rb-colors-ink, #2d1810);
}
.rb-quiz__options { display: grid; gap: 10px; }
.rb-quiz__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--rb-colors-ink, #2d1810);
  background: #fff;
  border: 2px solid var(--rb-colors-neutral-300, #d6d3d1);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rb-quiz__option:hover {
  border-color: var(--rb-colors-primary, #2d6a4f);
  background: var(--rb-colors-accent-band, #fff8f0);
}

.rb-quiz__result-card {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.rb-quiz__result-pill {
  display: inline-block;
  padding: 6px 14px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  margin: 0 0 16px;
}

/* ─── Tools hub (landing) ───────────────────────────────────── */
.rb-tools-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0 0;
}
.rb-tools-hub__card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--rb-colors-neutral-200, #e8e8e8);
  border-radius: 14px;
  text-decoration: none;
  color: var(--rb-colors-ink, #2d1810);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.rb-tools-hub__card:hover {
  transform: translateY(-3px);
  border-color: var(--rb-colors-primary, #2d6a4f);
  box-shadow: 0 8px 22px rgba(0,0,0,.07);
}
.rb-tools-hub__card-icon {
  font-size: 2rem;
  margin: 0 0 12px;
}
.rb-tools-hub__card-title {
  font-family: var(--rb-serif, "Playfair Display", Georgia, serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--rb-colors-primary, #2d6a4f);
}
.rb-tools-hub__card-desc {
  font-size: .92rem;
  line-height: 1.5;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 0;
}

/* ─── Lab Notes block (article inline) ──────────────────────── */
.rb-lab-notes {
  margin: 32px 0;
  padding: 24px 26px;
  background: var(--rb-colors-accent-band, #fff8f0);
  border-left: 4px solid var(--rb-colors-primary, #2d6a4f);
  border-radius: 0 12px 12px 0;
  position: relative;
}
.rb-lab-notes__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rb-colors-primary, #2d6a4f);
  margin: 0 0 14px;
}
.rb-lab-notes__icon { font-size: 1rem; line-height: 1; }
.rb-lab-notes__title {
  font-family: var(--rb-serif, "Playfair Display", Georgia, serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--rb-colors-ink, #2d1810);
}
.rb-lab-notes__intro {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 0 0 14px;
}
.rb-lab-notes__list {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: .93rem;
  line-height: 1.6;
  color: var(--rb-colors-ink, #2d1810);
}
.rb-lab-notes__list li {
  margin: 0 0 8px;
}
.rb-lab-notes__list li strong {
  font-weight: 700;
  color: var(--rb-colors-primary, #2d6a4f);
}

/* v3.2.36 — generic engine hooks (calculator + quiz) */
.rb-tool__intro { margin-bottom: 24px; }
.rb-tool__result-unit {
  font-size: .5em;
  color: var(--rb-colors-neutral-600, #6b6b6b);
  margin-left: 4px;
}
.rb-tool__result-final {
  color: var(--rb-colors-primary, #2d6a4f);
  font-weight: 700;
}
.rb-tool__error {
  color: var(--rb-colors-danger, #b91c1c);
  padding: 16px;
  text-align: center;
}
.rb-quiz__intro-headline {
  font-family: var(--rb-fonts-display, Georgia, serif);
  font-size: 1.85rem;
  margin: 0 0 12px;
}
.rb-quiz__result-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rb-colors-neutral-700, #44403c);
  margin: 16px 0;
}
.rb-quiz__result-recommend {
  display: block;
  margin-bottom: 8px;
  color: var(--rb-colors-primary, #2d6a4f);
}

/* v3.2.37 — provenance badge (calculator credibility surface) */
.rb-tool__provenance {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--rb-colors-neutral-300, #d6d3d1);
  font-size: .85rem;
  color: var(--rb-colors-neutral-700, #44403c);
}
.rb-tool__provenance-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
}
.rb-tool__provenance-badge--verified {
  background: var(--rb-colors-success, #059669);
  color: #fff;
}
.rb-tool__provenance-badge--consensus {
  background: var(--rb-colors-accent-band, #fff8f0);
  color: var(--rb-colors-ink, #2d1810);
  border: 1px solid var(--rb-colors-accent-band-border, #f3e3c8);
}
.rb-tool__provenance-link {
  margin-left: 6px;
  font-size: .78rem;
  color: var(--rb-colors-primary, #2d6a4f);
  text-decoration: underline;
}
.rb-tool__methodology-link {
  display: inline-block;
  margin-top: 12px;
  font-size: .9rem;
  color: var(--rb-colors-primary, #2d6a4f);
  font-weight: 600;
  text-decoration: underline;
}

/* v3.2.38 — quiz top-3 breakdown (proves the quiz is dynamic) */
.rb-quiz__breakdown {
  margin-top: 28px;
  padding: 18px;
  background: var(--rb-colors-surface-alt, #faf7f2);
  border-radius: var(--rb-radii-md, 8px);
  border: 1px solid var(--rb-colors-neutral-300, #d6d3d1);
}
.rb-quiz__breakdown-eyebrow {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rb-colors-neutral-700, #44403c);
}
.rb-quiz__breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rb-quiz__breakdown-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: .9rem;
}
.rb-quiz__breakdown-row.is-winner {
  font-weight: 700;
}
.rb-quiz__breakdown-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-quiz__breakdown-bar {
  display: block;
  height: 8px;
  background: var(--rb-colors-neutral-300, #d6d3d1);
  border-radius: 999px;
  overflow: hidden;
}
.rb-quiz__breakdown-fill {
  display: block;
  height: 100%;
  background: var(--rb-colors-primary, #2d6a4f);
  transition: width .4s ease;
}
.rb-quiz__breakdown-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: .82rem;
  color: var(--rb-colors-neutral-700, #44403c);
}
.rb-quiz__breakdown-foot {
  margin: 12px 0 0;
  font-size: .78rem;
  color: var(--rb-colors-neutral-700, #44403c);
}
.rb-quiz__breakdown-foot a {
  color: var(--rb-colors-primary, #2d6a4f);
  text-decoration: underline;
}
@media (max-width: 540px) {
  .rb-quiz__breakdown-row {
    grid-template-columns: 1fr 50px;
    grid-template-areas: "label score" "bar bar";
  }
  .rb-quiz__breakdown-label { grid-area: label; }
  .rb-quiz__breakdown-score { grid-area: score; }
  .rb-quiz__breakdown-bar   { grid-area: bar; }
}
