/* The Personalized Horse Evaluation Checklist — layers on styles.css + quiz.css */

.cl-main { padding: 40px 24px 80px; position: relative; overflow: hidden; }
#cl-root { width: 100%; max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }

.cl-card { background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 38px 34px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.cl-intro { text-align: center; }
.cl-note-box { margin: 18px auto 24px; max-width: 30rem; background: var(--teal-wash); color: var(--teal-dark);
  border-radius: 12px; padding: 14px 18px; font-weight: 600; font-size: 0.94rem; }

.cl-profile-known { display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--paper-2); border: 1px dashed var(--line); border-radius: 14px; padding: 18px; margin: 20px auto 26px; max-width: 26rem; }
.cl-profile-known__label { font-family: var(--font-body); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cl-profile-known strong { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.cl-linkbtn { background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-weight: 600;
  font-size: 0.82rem; color: var(--teal); text-decoration: underline; margin-top: 4px; }
.cl-linkbtn:hover { color: var(--pink); }

/* "What kind of horse are you looking for?" picker */
.cl-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin: 24px 0 18px; }
.cl-pick { display: flex; flex-direction: column; gap: 5px; background: #fff; border: 2px solid var(--line);
  border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: all 0.16s var(--ease); }
.cl-pick:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cl-pick strong { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); line-height: 1.2; }
.cl-pick span { font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
.cl-pick.is-on { border-color: var(--pink); background: var(--pink-wash); }

@media (max-width: 620px) { .cl-picks { grid-template-columns: 1fr; } }

/* Evaluation header */
.cl-eval__head { text-align: center; margin-bottom: 18px; }
.cl-horse-name { font-family: var(--font-display); font-weight: 900; color: var(--ink);
  font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.cl-forwho { font-family: var(--font-script); font-size: 1.3rem; color: var(--teal-dark); margin-top: 2px; }

/* ---------- Red flag meter (sticky) ---------- */
.cl-meter { position: sticky; top: 72px; z-index: 15; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.cl-meter__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.cl-meter__label { font-family: var(--font-body); font-weight: 800; font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cl-meter__verdict { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; }
.cl-meter__bar { height: 10px; background: var(--paper-3); border-radius: 999px; overflow: hidden; }
.cl-meter__bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.35s var(--ease), background 0.35s var(--ease); }
.cl-meter__stats { margin-top: 8px; font-size: 0.76rem; color: var(--muted); }

.cl-meter.is-ok    .cl-meter__verdict { color: var(--teal-dark); }
.cl-meter.is-ok    .cl-meter__bar span { background: var(--teal); }
.cl-meter.is-low   .cl-meter__verdict { color: var(--gold); }
.cl-meter.is-low   .cl-meter__bar span { background: var(--gold); }
.cl-meter.is-mid   .cl-meter__verdict { color: var(--coral-dark); }
.cl-meter.is-mid   .cl-meter__bar span { background: var(--coral); }
.cl-meter.is-high  .cl-meter__verdict { color: var(--pink-dark); }
.cl-meter.is-high  .cl-meter__bar span { background: var(--pink); }

/* ---------- Sections + items ---------- */
.cl-section { margin-bottom: 34px; }
.cl-section__title { font-family: var(--font-display); font-weight: 900; color: var(--ink);
  font-size: 1.5rem; letter-spacing: -0.01em; }
.cl-section__sub { color: var(--ink-soft); font-size: 0.95rem; margin: 6px 0 18px; }
.cl-section--profile .cl-section__title { color: var(--teal-dark); }

.cl-item { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.cl-item.is-good    { border-left-color: var(--teal); }
.cl-item.is-concern { border-left-color: var(--gold); background: #fffdf7; }
.cl-item.is-flag    { border-left-color: var(--pink); background: var(--pink-wash); }

.cl-item__q p { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: var(--ink); line-height: 1.45; }
.cl-crit { display: inline-block; margin-bottom: 6px; background: var(--pink); color: #fff;
  font-family: var(--font-body); font-weight: 800; font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }

.cl-why-toggle { margin-top: 9px; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; color: var(--teal); }
.cl-why-toggle::after { content: " +"; }
.cl-why-toggle.is-open::after { content: " –"; }
.cl-why-toggle:hover { color: var(--pink); }
.cl-why { margin-top: 10px; padding: 13px 15px; background: var(--teal-wash); border-radius: 10px;
  font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); }

.cl-rate { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.cl-rate__btn { flex: 1; min-width: 104px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 12px; cursor: pointer; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem;
  color: var(--muted); transition: all 0.15s var(--ease); }
.cl-rate__btn:hover { border-color: var(--ink-soft); color: var(--ink); }
/* scale items */
.cl-rate__btn[data-r="good"].is-on    { background: var(--teal);  border-color: var(--teal);  color: #fff; }
.cl-rate__btn[data-r="concern"].is-on { background: var(--gold);  border-color: var(--gold);  color: var(--ink); }
.cl-rate__btn[data-r="flag"].is-on    { background: var(--pink);  border-color: var(--pink);  color: #fff; }
/* yes/no items: colour depends on whether the answer is the bad one */
.cl-rate--yesno { max-width: 320px; }
.cl-rate--yesno .cl-rate__btn.is-on          { background: var(--teal); border-color: var(--teal); color: #fff; }
.cl-rate--yesno .cl-rate__btn.is-on.is-bad   { background: var(--pink); border-color: var(--pink); color: #fff; }
.cl-rate--yesno .cl-rate__btn.is-on.is-warn  { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.cl-finish { text-align: center; margin-top: 30px; }

/* ---------- Summary ---------- */
.cl-card--verdict { text-align: center; border-top: 5px solid var(--teal); }
.cl-card--verdict.is-low  { border-top-color: var(--gold); }
.cl-card--verdict.is-mid  { border-top-color: var(--coral); }
.cl-card--verdict.is-high { border-top-color: var(--pink); }

.cl-bigmeter { max-width: 30rem; margin: 16px auto 20px; }
.cl-bigmeter__label { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; margin-bottom: 10px; }
.cl-bigmeter.is-ok   .cl-bigmeter__label { color: var(--teal-dark); }
.cl-bigmeter.is-low  .cl-bigmeter__label { color: var(--gold); }
.cl-bigmeter.is-mid  .cl-bigmeter__label { color: var(--coral-dark); }
.cl-bigmeter.is-high .cl-bigmeter__label { color: var(--pink-dark); }
.cl-bigmeter.is-ok   .cl-meter__bar span { background: var(--teal); }
.cl-bigmeter.is-low  .cl-meter__bar span { background: var(--gold); }
.cl-bigmeter.is-mid  .cl-meter__bar span { background: var(--coral); }
.cl-bigmeter.is-high .cl-meter__bar span { background: var(--pink); }
.cl-bigmeter__stats { display: block; margin-top: 9px; font-size: 0.8rem; color: var(--muted); }
.cl-verdict-copy { max-width: 40rem; margin: 0 auto; color: var(--body); font-size: 1rem; line-height: 1.6; }

/* ---------- Blueprint steps ---------- */
.cl-clean { display: flex; align-items: center; gap: 12px; background: var(--teal-wash); border-color: transparent; }
.cl-clean svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--teal); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cl-clean p { margin: 0; color: var(--teal-dark); font-weight: 600; }

.cl-blueprint { margin-bottom: 24px; }
.cl-step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.cl-step--danger { border-top: 5px solid var(--pink); background: var(--pink-wash); }
.cl-step--teal { border-top: 5px solid var(--teal); }

.cl-step__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.cl-step__n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.cl-step--danger .cl-step__n { background: var(--pink); }
.cl-step--teal .cl-step__n { background: var(--teal); }
.cl-step__head h3 { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.24rem; line-height: 1.2; }
.cl-step__head p { margin: 4px 0 0; font-size: 0.9rem; color: var(--ink-soft); }

.cl-step__list { display: flex; flex-direction: column; gap: 14px; }
.cl-step__list li { border-left: 3px solid var(--line); padding-left: 14px; }
.cl-step--danger .cl-step__list li { border-left-color: var(--pink); }
.cl-step--teal .cl-step__list li { border-left-color: var(--teal); }
.cl-step__ctx { display: block; font-size: 0.8rem; line-height: 1.4; color: var(--muted); margin-bottom: 3px; }
.cl-step__list strong { display: block; color: var(--ink); font-weight: 600; font-size: 0.97rem; line-height: 1.5; }
.cl-step__list .cl-crit { margin-bottom: 5px; }

.cl-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.cl-help { text-align: center; background: var(--teal-wash); border-radius: 16px; padding: 24px; }
.cl-help p { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); margin-bottom: 14px; }
.cl-summary > .q-back { display: block; margin: 22px auto 0; }

/* ---------- The four stages ---------- */

/* Intro: show them the shape of the thing before they start. */
.cl-flowpeek { list-style: none; margin: 26px 0 30px; padding: 0; text-align: left; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cl-flowpeek li { background: #fff; padding: 14px 16px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.cl-flowpeek span { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-wash); color: var(--teal-deep); font-weight: 700; font-size: 0.85rem; }
.cl-flowpeek strong { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1rem; }
.cl-flowpeek em { font-style: normal; color: var(--muted); font-size: 0.85rem; }

/* Progress rail across the top of every stage + gate. */
.cl-stagebar { list-style: none; display: flex; gap: 6px; margin: 0 0 22px; padding: 0; }
.cl-stagebar li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding-top: 4px; }
.cl-stagebar li::before { content: ""; position: absolute; top: 18px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.cl-stagebar li:first-child::before { display: none; }
.cl-stagebar li.is-done::before, .cl-stagebar li.is-now::before { background: var(--teal); }
.cl-stagebar__n { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.cl-stagebar li.is-done .cl-stagebar__n { background: var(--teal); border-color: var(--teal); color: #fff; }
.cl-stagebar li.is-now .cl-stagebar__n { background: var(--pink); border-color: var(--pink); color: #fff; }
.cl-stagebar__t { font-size: 0.7rem; line-height: 1.25; text-align: center; color: var(--muted); letter-spacing: 0.02em; }
.cl-stagebar li.is-now .cl-stagebar__t { color: var(--ink); font-weight: 700; }

/* The gate: one decision, stated plainly. */
.cl-gate { text-align: left; }
.cl-gate__q { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--muted); margin: 6px 0 20px; }
.cl-gate__h { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.85rem, 4.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); margin: 26px 0 12px; }
.cl-gate.is-high .cl-gate__h { color: var(--pink-dark); }
.cl-gate.is-mid .cl-gate__h { color: var(--coral-dark); }
.cl-gate.is-ok .cl-gate__h { color: var(--teal-deep); }
.cl-gate__p { font-size: 1.03rem; line-height: 1.65; color: var(--body); max-width: 54ch; }
.cl-gate__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 30px 0 4px; }
.cl-gate > .q-back { margin-top: 18px; }

.cl-stage-sub { font-family: var(--font-body); font-size: 0.98rem; line-height: 1.6; color: var(--body); max-width: 56ch; margin: 10px auto 4px; }

/* ---------- Setup: branches the tool, never scored ---------- */
.cl-setup { border: 0; padding: 0; margin: 26px 0 0; text-align: left; }
.cl-setup legend { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink); padding: 0; }
.cl-setup__help { font-size: 0.86rem; color: var(--muted); line-height: 1.55; margin: 6px 0 0; }
.cl-setup__err { color: var(--pink-dark); font-size: 0.9rem; font-weight: 600; margin-top: 18px; }

.cl-opts { display: grid; gap: 8px; margin-top: 12px; }
.cl-opt { text-align: left; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font-family: var(--font-body); font-size: 0.93rem; line-height: 1.4; cursor: pointer; transition: border-color .15s, background .15s; }
.cl-opt:hover { border-color: var(--teal); }
.cl-opt.is-on { border-color: var(--teal); background: var(--teal-wash); font-weight: 600; }
.cl-opt.is-on.is-bad { border-color: var(--pink); background: var(--pink-wash-2); }
.cl-opt.is-on.is-warn { border-color: var(--gold); background: #fdf6e6; }
.cl-opt:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cl-opts--item { margin-top: 14px; }

.cl-item__note { font-size: 0.82rem; color: var(--teal-deep); font-weight: 600; margin-top: 6px; }
.cl-item.is-info { border-left-color: var(--blue); }

.cl-subhead { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--teal-deep); text-align: left;
  letter-spacing: 0.02em; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- "checks": tick every vice they admit to ---------- */
.cl-item--checks { text-align: left; }
.cl-checks { margin-top: 16px; display: grid; gap: 20px; }
.cl-checkgroup__t { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.cl-checkgroup__n { font-size: 0.82rem; line-height: 1.5; color: var(--muted); margin: 3px 0 10px; }
.cl-checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px; }
.cl-check { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; min-height: 44px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
  font-family: var(--font-body); font-size: 0.86rem; line-height: 1.35; transition: border-color .14s, background .14s; }
.cl-check:hover { border-color: var(--muted); }
.cl-check:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cl-check__box { flex: none; width: 19px; height: 19px; border-radius: 5px; border: 1.5px solid var(--line);
  background: #fff; display: grid; place-items: center; }
.cl-check__box svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3.2; opacity: 0; }
.cl-check.is-on .cl-check__box svg { opacity: 1; }
.cl-check.is-on { font-weight: 600; }
.cl-check.is-on.is-stop { border-color: var(--ink); background: #f4f6f8; }
.cl-check.is-on.is-stop .cl-check__box { background: var(--ink); border-color: var(--ink); }
.cl-check.is-on.is-flag { border-color: var(--pink); background: var(--pink-wash-2); }
.cl-check.is-on.is-flag .cl-check__box { background: var(--pink); border-color: var(--pink); }
.cl-check.is-on.is-concern { border-color: var(--gold); background: #fdf6e6; }
.cl-check.is-on.is-concern .cl-check__box { background: var(--gold); border-color: var(--gold); }
.cl-check.is-on.is-good { border-color: var(--teal); background: var(--teal-wash); }
.cl-check.is-on.is-good .cl-check__box { background: var(--teal); border-color: var(--teal); }
.cl-check--none { margin-top: 2px; width: 100%; }
.cl-check--none.is-on { border-color: var(--teal); background: var(--teal-wash); }
.cl-check--none.is-on .cl-check__box { background: var(--teal); border-color: var(--teal); }

/* ---------- "Before you get on": live, mid-visit ---------- */
.cl-checkpoint { text-align: left; margin: 4px 0 30px; padding: 22px 24px; border-radius: 16px;
  border: 1.5px solid var(--line); background: #fff; border-left-width: 5px; }
.cl-checkpoint[hidden] { display: none; }
.cl-checkpoint__eyebrow { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cl-checkpoint h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2.8vw, 1.6rem); color: var(--ink); margin: 6px 0 8px; }
.cl-checkpoint p { font-size: 0.92rem; line-height: 1.6; color: var(--body); max-width: 58ch; }
.cl-checkpoint__stats { display: block; margin-top: 10px; font-size: 0.76rem; color: var(--muted); }
.cl-checkpoint.is-ok { border-left-color: var(--teal); }
.cl-checkpoint.is-low { border-left-color: var(--gold); }
.cl-checkpoint.is-mid { border-left-color: var(--coral); }
.cl-checkpoint.is-mid h3 { color: var(--coral-dark); }
.cl-checkpoint.is-high { border-left-color: var(--pink); background: var(--pink-wash); }
.cl-checkpoint.is-high h3 { color: var(--pink-dark); }

/* ---------- The Red Flag Decoder ---------- */
.cl-decoder .cl-dec { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.cl-dec__phrase { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 15px; background: none; border: 0; cursor: pointer; }
.cl-dec__tick { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; background: #fff; }
.cl-dec__tick svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; opacity: 0; }
.cl-dec__text { flex: 1; font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--ink); font-size: 0.98rem; line-height: 1.35; }
.cl-dec__level { flex: none; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.cl-dec__level--red { background: var(--pink-wash-2); color: var(--pink-dark); }
.cl-dec__level--yellow { background: #fdf3e0; color: #8a6412; }
.cl-dec__level--green { background: var(--teal-wash); color: var(--teal-deep); }
.cl-dec__body { display: none; padding: 0 15px 15px 49px; }
.cl-dec__body p { font-size: 0.88rem; line-height: 1.6; color: var(--body); margin-bottom: 8px; }
.cl-dec__body strong { color: var(--ink); }
.cl-dec.is-on { border-color: var(--ink); }
.cl-dec.is-on .cl-dec__body { display: block; }
.cl-dec.is-on .cl-dec__tick { background: var(--teal); border-color: var(--teal); }
.cl-dec.is-on .cl-dec__tick svg { opacity: 1; }
.cl-dec.is-on.is-red { border-color: var(--pink); }
.cl-dec.is-on.is-red .cl-dec__tick { background: var(--pink); border-color: var(--pink); }
.cl-dec.is-on.is-yellow .cl-dec__tick { background: var(--gold); border-color: var(--gold); }

/* ---------- Would Sarah walk away? ---------- */
.cl-walk { margin-top: 26px; }
.cl-walk__q { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--muted); }
.cl-walk__a { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 4.2vw, 2.4rem); line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); margin: 6px 0 14px; }
.cl-card--verdict.is-high .cl-walk__a { color: var(--pink-dark); }
.cl-card--verdict.is-mid .cl-walk__a { color: var(--coral-dark); }
.cl-card--verdict.is-ok .cl-walk__a { color: var(--teal-deep); }

/* ---------- Green / yellow / red columns ---------- */
.cl-flags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; text-align: left; }
.cl-flags__col h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: 12px; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cl-dot--red { background: var(--pink); }
.cl-dot--yellow { background: var(--gold); }
.cl-dot--green { background: var(--teal); }
.cl-flags__list { list-style: none; display: grid; gap: 8px; }
.cl-flags__list li { font-size: 0.85rem; line-height: 1.5; color: var(--body); padding-left: 12px; border-left: 2px solid var(--line); }
.cl-flags__list.is-red li { border-left-color: var(--pink); }
.cl-flags__list.is-yellow li { border-left-color: var(--gold); }
.cl-flags__list.is-green li { border-left-color: var(--teal); }
/* Two tiers of severity, and they must not look alike. */
.cl-crit.cl-stop { background: var(--ink); color: #fff; }
.cl-step--warn { border-top: 5px solid var(--gold); background: #fffdf7; }
.cl-step--warn .cl-step__n { background: var(--gold); color: var(--ink); }
.cl-step--warn .cl-step__list li { border-left-color: var(--gold); }
/* A mismatch is not a deal breaker, so it must not wear the deal-breaker colour. */
.cl-step--warn .cl-crit { background: var(--gold); color: var(--ink); }

.cl-flags__ans { display: block; margin-top: 3px; color: var(--muted); font-style: italic; }
.cl-flags__empty { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* ---------- The upsell ---------- */
.cl-upsell { text-align: left; border: 1.5px solid var(--pink); }
.cl-upsell h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.8vw, 1.7rem); color: var(--ink); margin: 6px 0 10px; letter-spacing: -0.01em; }
.cl-upsell p { font-size: 0.98rem; line-height: 1.65; color: var(--body); max-width: 56ch; margin-bottom: 20px; }

.cl-stopped { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--gold); background: #fff; font-size: 0.9rem; line-height: 1.6; color: var(--body); }

.cl-finish { display: flex; flex-direction: column; align-items: center; gap: 12px; }

@media (max-width: 620px) {
  .cl-card { padding: 28px 20px; }
  .cl-meter { top: 66px; }
  .cl-rate__btn { min-width: 0; font-size: 0.76rem; padding: 9px 8px; }
  .cl-stagebar__t { font-size: 0.6rem; }
  .cl-stagebar__n { width: 24px; height: 24px; font-size: 0.72rem; }
  .cl-stagebar li::before { top: 16px; }
  .cl-gate__actions .btn { width: 100%; }
  .cl-flags { grid-template-columns: 1fr; gap: 22px; }
  .cl-dec__phrase { flex-wrap: wrap; }
  .cl-dec__level { margin-left: 34px; }
  .cl-dec__body { padding-left: 15px; }
}

/* ---------- "Print it. Take it with you." ---------- */
.cl-steps { list-style: none; text-align: left; margin: 32px 0 6px; padding: 0; display: grid; gap: 4px; }
.cl-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding: 0 0 26px; position: relative; }
/* the rail that ties the three steps together */
.cl-steps li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line); }
.cl-steps li:last-child { padding-bottom: 0; }
.cl-steps li:last-child::before { display: none; }
.cl-steps__n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-wash); color: var(--teal-deep); font-weight: 800; font-size: 0.92rem; }
.cl-steps li:first-child .cl-steps__n { background: var(--pink); color: #fff; }
.cl-steps strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; color: var(--ink); margin-top: 4px; }
.cl-steps p { font-size: 0.89rem; line-height: 1.6; color: var(--body); margin: 6px 0 0; max-width: 52ch; }
.cl-steps .btn { margin-top: 14px; }
.cl-ready__done { margin-top: 12px !important; padding: 10px 13px; border-left: 3px solid var(--teal);
  background: var(--teal-wash); font-size: 0.84rem !important; color: var(--teal-deep) !important; font-weight: 600; }
.cl-ready > .cl-linkbtn { margin-top: 26px; }

.sh-hint { font-size: 0.84rem; color: var(--muted); max-width: 30ch; line-height: 1.5; text-align: left; }

/* ---------- The barn sheet ---------- */
.cl-sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 40px 44px 34px;
  text-align: left; color: var(--ink); box-shadow: var(--shadow-sm); }
.sh-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 30px; }

.sh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 22px; }
.sh-head strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.04em; }
.sh-head > div > span { font-size: 0.78rem; color: var(--muted); }
.sh-fields { display: grid; gap: 5px; min-width: 250px; }
.sh-fields label { display: grid; grid-template-columns: 92px 1fr; align-items: end; gap: 8px; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.sh-fill { border-bottom: 1px solid var(--ink); min-height: 17px; font-family: var(--font-body); font-size: 0.88rem;
  letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 500; }

.sh-stop { border: 2px solid var(--pink); border-radius: 10px; padding: 18px 20px; margin-bottom: 22px; background: var(--pink-wash); }
.sh-stop h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--pink-dark); }
.sh-stop > p { font-size: 0.83rem; color: var(--body); margin: 4px 0 12px; }
.sh-stop ul { list-style: none; display: grid; gap: 7px; }
.sh-stop li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.88rem; line-height: 1.45; }

/* ---------- The barn sheet HERO: the per-profile flag list ---------- */
.sh-flags { margin-bottom: 22px; }
.sh-flags > h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; color: var(--ink); letter-spacing: -0.01em; }
.sh-flags__goal { font-family: var(--font-script); font-size: 1.35rem; color: var(--teal-deep); line-height: 1.1; margin-top: 2px; }
.sh-flags__note { font-size: 0.82rem; line-height: 1.5; color: var(--body); background: #fffdf7; border-left: 3px solid var(--gold);
  padding: 9px 13px; border-radius: 0 6px 6px 0; margin-top: 12px; }
.sh-fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.sh-fcol { border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 15px; border-top-width: 4px; }
.sh-fcol h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.sh-fcol ul { list-style: none; display: grid; gap: 9px; }
.sh-fcol li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; line-height: 1.35; }
.sh-fcol--red { border-top-color: var(--pink); }
.sh-fcol--red h4 { color: var(--pink-dark); }
.sh-fcol--yellow { border-top-color: var(--gold); }
.sh-fcol--yellow h4 { color: #8a6412; }
.sh-fcol--green { border-top-color: var(--teal); }
.sh-fcol--green h4 { color: var(--teal-deep); }
.sh-tag { font-style: normal; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--pink-dark); white-space: nowrap; }

/* a single red walk-away line, in place of the old universal box */
.sh-walkline { color: var(--pink-dark); font-weight: 700; font-size: 0.92rem; line-height: 1.5;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

.sh-vetline { display: flex; gap: 9px; align-items: flex-start; font-size: 0.86rem; line-height: 1.45; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.sh-vetline--warn { color: var(--coral-dark); }

.sh-facts { margin-bottom: 26px; }
.sh-facts h3 { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--muted); margin-bottom: 8px; }
.sh-facts ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; }
.sh-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8rem; padding-bottom: 3px; border-bottom: 1px dotted var(--line); }
.sh-facts strong { font-weight: 500; color: var(--muted); }
.sh-facts span { font-weight: 700; text-align: right; }

.sh-stage { margin-top: 32px; }
.sh-stage > h2 { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; color: var(--ink); padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.sh-stage > h2 span { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 0.85rem; }
.sh-sub { font-size: 0.83rem; color: var(--muted); margin: 8px 0 16px; line-height: 1.5; }
.sh-h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--teal-deep);
  margin: 26px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }

.sh-list { list-style: none; }
.sh-item { padding: 12px 0 10px; border-bottom: 1px dotted var(--line); break-inside: avoid; page-break-inside: avoid; }
.sh-q { display: flex; gap: 10px; align-items: flex-start; }
.sh-n { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted);
  display: grid; place-items: center; font-size: 0.66rem; font-weight: 700; margin-top: 1px; }
.sh-q p { font-size: 0.92rem; line-height: 1.4; font-weight: 500; }
.sh-badge { display: inline-block; margin-top: 5px; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); padding: 2px 7px; border-radius: 999px; }
.sh-badge--stop { color: var(--pink-dark); border-color: var(--pink); }
.sh-want { font-size: 0.76rem; color: var(--teal-deep); font-weight: 600; margin: 7px 0 0 30px; }

.sh-box { flex: none; width: 14px; height: 14px; border: 1.4px solid var(--ink); border-radius: 3px; display: inline-block; }
.sh-boxes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 0 30px; }
.sh-boxes label { display: flex; gap: 7px; align-items: center; font-size: 0.83rem; line-height: 1.35; }
.sh-boxes--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-left: 0; }
.sh-boxes--grid label { align-items: flex-start; }
.sh-boxes--grid .sh-box { margin-top: 2px; }
.sh-boxes label.is-stop span { font-weight: 700; }
.sh-tag--crit { color: #8a6412 !important; }
.sh-tag { font-style: normal; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pink-dark); white-space: nowrap; }
.sh-vicegroup { margin: 12px 0 0 30px; }
.sh-vicegroup h5 { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--ink); margin-bottom: 5px; }

.sh-lines { display: grid; gap: 11px; margin: 11px 0 2px 30px; }
.sh-lines span { display: block; border-bottom: 1px solid #e8ebef; height: 1px; }

.sh-gate { border-left: 4px solid var(--pink); background: var(--pink-wash); padding: 12px 16px; margin: 22px 0 4px;
  font-size: 0.86rem; line-height: 1.55; border-radius: 0 8px 8px 0; }
.sh-gate strong { color: var(--pink-dark); }

.sh-decoder { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.76rem; }
.sh-decoder th { text-align: left; font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1.5px solid var(--ink); padding: 0 8px 5px 0; }
.sh-decoder td { vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px dotted var(--line); line-height: 1.4; }
.sh-decoder td:first-child { width: 20px; }
.sh-decoder tr.is-red td:nth-child(2) { color: var(--pink-dark); font-weight: 600; }
.sh-decoder tr.is-green td:nth-child(2) { color: var(--teal-deep); }
.sh-decoder em { font-family: var(--font-display); }

.sh-plain { list-style: none; display: grid; gap: 8px; margin-top: 10px; }
.sh-plain li { font-size: 0.88rem; line-height: 1.45; display: flex; gap: 9px; align-items: flex-start; }
.sh-plain .sh-box { margin-top: 3px; }
.sh-warn { border-left: 4px solid var(--gold); padding: 10px 14px; background: #fffdf7; font-size: 0.86rem; line-height: 1.55; margin-top: 10px; }

.sh-ruled { display: grid; gap: 22px; margin-top: 18px; }
.sh-ruled span { border-bottom: 1px solid #e2e6ea; }
.sh-foot { margin-top: 34px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.68rem; color: var(--muted); text-align: center; }

@media (max-width: 720px) {
  .cl-sheet { padding: 26px 20px; }
  .sh-actions { flex-direction: column; align-items: stretch; }
  .sh-hint { text-align: center; max-width: none; }
  .sh-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .sh-facts ul { grid-template-columns: 1fr; }
  .sh-fgrid { grid-template-columns: 1fr; }
  .sh-decoder thead { display: none; }
  .sh-decoder, .sh-decoder tbody, .sh-decoder tr, .sh-decoder td { display: block; width: 100%; }
  .sh-decoder tr { padding: 10px 0; border-bottom: 1px dotted var(--line); }
  .sh-decoder td { border: 0; padding: 2px 0; }
  .sh-decoder td:first-child { display: none; }
}

/* The printed masthead only exists on paper. */
.cl-printhead { display: none; }

/* ---------- Print: this is the artifact they carry to the barn ---------- */
@page { margin: 15mm 14mm 16mm; }

@media print {
  /* Browsers strip backgrounds by default, which is what turned the meter,
     the badges, and the colour-coded steps into grey mush. */
  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .quiz-top, .cl-actions, .cl-help, .q-back, .wc,
  .cl-stagebar, .cl-flowpeek, .cl-finish, .cl-linkbtn, .i-arrow, .sh-actions { display: none !important; }

  /* ---- the barn sheet ---- */
  .cl-sheet { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  /* Not :first-of-type — .sh-stop and .sh-facts are <section>s too, so the
     first stage would match nothing and get pushed onto its own page. */
  .sh-stage { margin-top: 0; }
  .sh-stage ~ .sh-stage { break-before: page; page-break-before: always; }
  .sh-stop, .sh-item, .sh-vicegroup, .sh-gate, .sh-decoder tr,
  .sh-flags, .sh-fcol { break-inside: avoid; page-break-inside: avoid; }
  /* the hero and the universal strip ride on page 1 with the phone stage */
  .sh-flags { margin-bottom: 14px; }
  .sh-flags > h2 { font-size: 15pt; }
  .sh-flags__goal { font-size: 15pt; }
  .sh-fgrid { gap: 8px; }
  .sh-fcol { padding: 9px 10px; }
  .sh-fcol li { font-size: 8.5pt; }
  .sh-walkline { font-size: 9pt; }
  .sh-vetline { font-size: 9pt; }
  .sh-head { margin-bottom: 14px; }
  .sh-head strong { font-size: 12pt; }
  .sh-stage > h2 { font-size: 15pt; }
  .sh-q p { font-size: 9.5pt; }
  .sh-boxes label, .sh-plain li, .sh-stop li { font-size: 9pt; }
  .sh-decoder { font-size: 7.6pt; }
  .sh-lines { gap: 13px; }
  .sh-lines span { border-bottom: 0.6pt solid #b9c0c8; }
  .sh-ruled span { border-bottom: 0.6pt solid #b9c0c8; }
  .sh-box { border-width: 0.8pt; width: 11px; height: 11px; }
  .sh-foot { position: running(foot); font-size: 7pt; }

  html, body { background: #fff !important; font-size: 10.5pt; }
  .quiz, .container { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  #cl-root { max-width: none; }

  .cl-printhead {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
    border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 18px;
  }
  .cl-printhead div { display: flex; flex-direction: column; }
  .cl-printhead div:last-child { text-align: right; }
  .cl-printhead strong { font-family: var(--font-display); font-size: 13pt; letter-spacing: 0.04em; color: var(--ink); }
  .cl-printhead span { font-size: 8.5pt; color: var(--muted); line-height: 1.5; }

  /* Cards become sections on a page, not floating objects. */
  .cl-card, .cl-step {
    box-shadow: none !important; border-radius: 6px; padding: 14px 16px; margin: 0 0 12px;
    border: 1px solid #d8dde3; break-inside: avoid; page-break-inside: avoid;
  }
  .cl-card--verdict { border: 1.5px solid var(--ink); }
  .cl-step--danger { border-top: 3px solid var(--pink); }
  .cl-step--warn { border-top: 3px solid var(--gold); }
  .cl-step--teal { border-top: 3px solid var(--teal); }

  .cl-horse-name { font-size: 20pt !important; margin: 2px 0 8px; }
  .q-eyebrow { font-size: 7.5pt !important; }
  .cl-walk { margin-top: 12px; }
  .cl-walk__q { font-size: 9.5pt !important; }
  .cl-walk__a { font-size: 16pt !important; margin: 2px 0 8px; }
  .cl-verdict-copy { font-size: 9.5pt !important; line-height: 1.5 !important; max-width: none; }

  .cl-bigmeter { margin: 8px 0; }
  .cl-bigmeter__label { font-size: 11pt !important; }
  .cl-meter__bar { height: 8px !important; border: 0.5pt solid #c9ced5; }
  .cl-bigmeter__stats { font-size: 8pt !important; }

  /* Three columns of flags fit a page beautifully. Keep them. */
  .cl-flags { gap: 16px; }
  .cl-flags__col h3 { font-size: 10pt; margin-bottom: 6px; }
  .cl-flags__list li { font-size: 8.5pt; line-height: 1.4; }

  .cl-blueprint { margin-top: 4px; }
  .cl-step__head { margin-bottom: 8px; }
  .cl-step__n { width: 22px !important; height: 22px !important; font-size: 9pt !important; }
  .cl-step h3 { font-size: 12pt !important; }
  .cl-step__head p { font-size: 8.5pt !important; }
  .cl-step__list li { font-size: 9.5pt; line-height: 1.45; padding-left: 10px; margin-bottom: 7px; break-inside: avoid; }
  .cl-step__ctx { font-size: 8pt !important; }
  .cl-crit { font-size: 6.5pt !important; padding: 2px 6px !important; }

  /* The upsell prints as a quiet footer note, not a billboard. */
  .cl-upsell { border: 1px solid var(--pink) !important; break-inside: avoid; }
  .cl-upsell h3 { font-size: 11pt !important; }
  .cl-upsell p { font-size: 8.5pt !important; margin-bottom: 6px; }
  .cl-upsell .btn { border: 0; padding: 0; background: none !important; color: var(--pink-dark) !important;
    font-size: 9pt; font-weight: 700; }

  .cl-stopped { font-size: 8.5pt; }
}
