/* ==========================================================================
   Skin flare-up check
   Layers on spin-check.css (card, buttons, grid) and food-check.css (verdict
   banner, "what to do next" block), which this tool reuses rather than
   redefining. Only the question set and the ranked results live here.
   ========================================================================== */

/* --- Questions ----------------------------------------------------------- */

.flare-q {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.flare-q:first-child { padding-top: 4px; }
.flare-q:last-of-type { border-bottom: 0; }

.flare-q-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 4px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}

.flare-q-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: .78rem;
  font-weight: 800;
}

.flare-q-hint {
  margin: 0 0 10px 34px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted);
}

.flare-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 34px;
}

/* 44px minimum touch target, which the site's UX pass set as the floor. */
.flare-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: .94rem;
  line-height: 1.3;
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.flare-opt:hover { border-color: var(--brand); }

.flare-opt input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

/* Selected state, driven by :has so the whole pill reads as the control. */
.flare-opt:has(input:checked) {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-strong);
  font-weight: 600;
}
.flare-opt:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* The yes/no/not sure row is narrower and reads better evenly spaced. */
.flare-opts-bool .flare-opt { min-width: 96px; justify-content: center; }

/* --- Ranked results ------------------------------------------------------ */

.flare-results-title {
  margin: 26px 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  color: var(--text);
}

.flare-cause {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid #94a3b8;
  border-radius: 0 10px 10px 0;
  background: #fff;
  overflow: hidden;
}

/* Rank colouring: the top three get the site's warm accents, the tail is
   slate, so the eye lands on what matters without reading the numbers. */
.flare-rank-0 { border-left-color: #ea580c; }
.flare-rank-1 { border-left-color: #f59e0b; }
.flare-rank-2 { border-left-color: #0891b2; }

.flare-cause-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.flare-cause-head::-webkit-details-marker { display: none; }

.flare-cause-name {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: .98rem;
  color: var(--text);
}

.flare-bar {
  flex: 0 0 88px;
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.flare-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
}
.flare-rank-0 .flare-bar-fill { background: #ea580c; }
.flare-rank-1 .flare-bar-fill { background: #f59e0b; }
.flare-rank-2 .flare-bar-fill { background: #0891b2; }

.flare-pct {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: right;
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.flare-cause-body {
  padding: 4px 16px 18px;
  border-top: 1px solid var(--border);
}
.flare-cause-body p { font-size: .96rem; line-height: 1.65; }
.flare-cause-body h4 {
  margin: 16px 0 6px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.flare-headline {
  margin: 12px 0 8px;
  font-weight: 700;
  color: var(--brand-strong);
}

.flare-list { margin: 0; padding-left: 1.15rem; }
.flare-list li { margin-bottom: .4em; font-size: .94rem; line-height: 1.6; }
.flare-list li:last-child { margin-bottom: 0; }
.flare-clues li::marker { color: #94a3b8; }
.flare-actions li::marker { color: #16a34a; }

.flare-vet {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #f0f7ff;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  font-size: .93rem;
}

.flare-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--brand-strong);
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 560px) {
  .flare-q-hint, .flare-opts { margin-left: 0; }
  .flare-opts { gap: 6px; }
  .flare-opt { font-size: .9rem; padding: 0 12px; }
  .flare-bar { flex-basis: 54px; }
  .flare-cause-head { gap: 8px; padding: 10px 12px; }
  .flare-cause-name { font-size: .92rem; }
}
