/* ============================================================================
   Convert · Clinic Revenue Leak Scorecard
   Built on the homepage's tokens and brand layer (scrollcraft.css + convert.css)
   so it reads as the same site: paper ground, Geist, mono labels, square edges,
   the green top rule that marks evidence. Nothing animates in: a scorecard is a
   form, and every question and button is on screen at first paint.
   ========================================================================== */

.scorecard-page { background: var(--paper); }
/* Steps, errors and buttons are shown and hidden with the [hidden] attribute. Classes
   like .btn set a display value of their own, which would otherwise beat it. */
.scorecard-page [hidden] { display: none !important; }

.sc-main { padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.sc-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* ---------------------------------------------------------------- intro -- */
.sc-intro { position: sticky; top: calc(var(--nav-h) + 2rem); }
.sc-intro .eyebrow { margin-bottom: 18px; }
.sc-title { font-size: clamp(34px, 4.4vw, 62px); line-height: 1; letter-spacing: -0.035em; margin-bottom: 24px; }
.sc-intro .accent-bar { margin-bottom: 24px; }
.sc-lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--muted); margin: 0 0 28px; max-width: 46ch; text-wrap: pretty; }
.sc-promise { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--hair); display: grid; gap: 14px; }
.sc-promise li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.sc-promise .k { font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sc-promise .v { font-size: 15px; font-weight: 500; }
.sc-privacy { margin: 24px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 44ch; }
.sc-privacy b { color: var(--ink); font-weight: 600; }
.sc-optional { text-transform: none; letter-spacing: 0; font-family: var(--sc-font-text); }

/* ----------------------------------------------------------------- card -- */
.sc-card {
  background: var(--paper-pure);
  border: 1px solid var(--hair); border-top: 4px solid var(--green);
  box-shadow: var(--lift);
  padding: clamp(1.35rem, 3vw, 2.5rem);
  min-width: 0;
}
.sc-noscript { margin: 0; font-size: 16px; line-height: 1.55; }
.sc-noscript a { text-decoration: underline; }

.sc-progress { margin-bottom: clamp(1.25rem, 2.6vw, 2rem); }
.sc-progress__label {
  margin: 0 0 10px; font-family: var(--sc-font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.sc-progress__track { height: 4px; background: var(--green-tint); overflow: hidden; }
.sc-progress__track span {
  display: block; height: 100%; width: 100%; background: var(--green);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  transition: transform 260ms var(--sc-ease-out);
}

.sc-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.sc-q {
  display: block; padding: 0; margin-bottom: 20px;
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.18; letter-spacing: -0.022em;
  text-wrap: balance;
}
/* Focus is moved onto each new question for keyboard and screen-reader users. The
   legend is not a control, so it gets no ring of its own. */
.sc-q:focus { outline: none; }
.sc-hint { margin: -8px 0 20px; font-size: 14px; color: var(--muted); }

.sc-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 10px; }
.sc-option {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--hair-firm);
  font-size: 16px; line-height: 1.35; cursor: pointer;
  transition: border-color 140ms linear, background 140ms linear;
}
.sc-option:hover { border-color: var(--ink); }
.sc-option input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 18px; height: 18px; margin: 0;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-content: center; background: var(--paper-pure);
}
.sc-option input::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); transform: scale(0); transition: transform 120ms var(--sc-ease-out);
}
.sc-option input:checked::before { transform: scale(1); }
.sc-option:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.sc-option input:focus-visible { outline: none; }
.sc-option:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

.sc-err { margin: 10px 0 0; font-size: 13px; color: #A1271B; }
.sc-form-err { margin: 6px 0 0; font-size: 14px; color: #A1271B; }

.sc-lead .field input, .sc-lead .field select { color: var(--ink); }
.sc-lead .field select {
  cursor: pointer; padding-right: 22px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%230A0A0A' stroke-width='1.5'/></svg>") no-repeat right 2px center;
}
.sc-lead .field input:focus-visible, .sc-lead .field select:focus-visible {
  outline: none; border-bottom: 2px solid var(--green); padding-bottom: 7px;
}
.sc-lead [aria-invalid="true"] { border-bottom-color: #A1271B; }
.sc-consent { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.sc-consent a { text-decoration: underline; }

.sc-actions { display: flex; align-items: center; gap: 12px; margin-top: clamp(1.5rem, 3vw, 2rem); }
.sc-actions #sc-next { margin-left: auto; }
.sc-actions .btn:disabled { opacity: 0.7; cursor: progress; }
.sc-actions .btn:focus-visible, .sc-result .btn:focus-visible, .sc-retake:focus-visible { outline-offset: 3px; }

/* --------------------------------------------------------------- result -- */
/* The result is scrolled to on arrival; keep its top clear of the sticky nav. */
.sc-result { scroll-margin-top: calc(var(--nav-h) + 20px); }
.sc-result .eyebrow { margin-bottom: 14px; }
.sc-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.sc-score__n { font-size: clamp(72px, 9vw, 112px); line-height: 0.86; font-weight: 600; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.sc-score__of { font-size: clamp(22px, 2.4vw, 30px); color: var(--muted); font-weight: 500; margin-left: -8px; }
.sc-band {
  align-self: center; padding: 6px 12px; border: 1px solid var(--ink);
  font-family: var(--sc-font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.sc-result__headline { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 12px; }
.sc-result__headline:focus { outline: none; }
.sc-result__why { margin: 0 0 20px; font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 58ch; }
.sc-sub--first { margin-top: 18px; }
.sc-how { margin: 0; font-size: 16px; line-height: 1.55; max-width: 58ch; }
.sc-secondary { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-firm); }
.sc-secondary li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.sc-secondary .nm { font-size: 15px; font-weight: 600; }
.sc-secondary .n { font-family: var(--sc-font-mono); font-size: 12px; font-variant-numeric: tabular-nums; align-self: center; }
.sc-secondary .d { grid-column: 1 / -1; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sc-secondary .none { display: block; color: var(--muted); font-size: 14px; }
.sc-option input[type="checkbox"] { border-radius: 3px; }
.sc-option input[type="checkbox"]::before { border-radius: 1px; width: 10px; height: 10px; }
.sc-hint--multi { margin: -12px 0 16px; }

.sc-download { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 clamp(1.5rem, 3vw, 2rem); }
.sc-download .btn:disabled { opacity: 0.7; cursor: progress; }
.sc-download__status { margin: 0; font-size: 13px; color: var(--muted); }
.sc-download__status:empty { display: none; }

.sc-systems { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-firm); }
.sc-sys {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr) 4.5rem; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--hair);
}
.sc-sys__name { font-size: 14px; font-weight: 500; }
.sc-sys__track { height: 12px; background: rgba(10,10,10,0.05); position: relative; }
.sc-sys__track span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--green); opacity: 0.55; }
.sc-sys__n { font-family: var(--sc-font-mono); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.sc-sys.is-primary .sc-sys__name { font-weight: 700; }
.sc-sys.is-primary .sc-sys__name::after {
  content: "Biggest leak"; display: block; margin-top: 3px;
  font-family: var(--sc-font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green);
}
.sc-sys.is-primary .sc-sys__track span { background: var(--ink); opacity: 1; }
.sc-untracked { margin: 16px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

.sc-sub {
  margin: clamp(1.75rem, 3.4vw, 2.5rem) 0 12px;
  font-family: var(--sc-font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.sc-fixes { margin: 0; padding: 0; list-style: none; counter-reset: fix; }
.sc-fixes li {
  counter-increment: fix; position: relative;
  padding: 12px 0 12px 44px; border-bottom: 1px solid var(--hair); font-size: 16px; line-height: 1.45;
}
.sc-fixes li::before {
  content: counter(fix, decimal-leading-zero); position: absolute; left: 0; top: 13px;
  font-family: var(--sc-font-mono); font-size: 12px; color: var(--green);
}

/* The one dark block on the page: the next step, set like the hero's receipt. */
.sc-next {
  margin-top: clamp(1.75rem, 3.4vw, 2.5rem);
  background: var(--plate); color: #F4F2ED;
  border-top: 4px solid var(--green-lift);
  padding: clamp(1.35rem, 3vw, 2.25rem);
}
.sc-next__title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 10px; }
.sc-next__title + .sc-next__cta { margin-top: 12px; }
.sc-next__cta { background: var(--green-lift); color: #08170F; border-color: var(--green-lift); }
.sc-next__cta:hover { background: #F4F2ED; border-color: #F4F2ED; color: var(--plate); }
.sc-next__cta:focus-visible { outline-color: #F4F2ED; }
.sc-next__note { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: #A9C4B6; max-width: 52ch; }

.sc-method { margin-top: 22px; border-top: 1px solid var(--hair); padding-top: 14px; }
.sc-method summary {
  cursor: pointer; font-family: var(--sc-font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.sc-method summary:hover { color: var(--ink); }
.sc-method p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 12px 0 0; max-width: 64ch; }
.sc-method b { color: var(--ink); font-weight: 600; }

.sc-retake {
  margin-top: 18px; padding: 6px 0; background: none; border: 0;
  font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.sc-retake:hover { color: var(--green); }

.sc-footer { padding-bottom: 28px; }
.sc-footer .footer-bottom { margin-top: 0; }

/* --------------------------------------------------------------- narrow -- */
@media (max-width: 940px) {
  .sc-layout { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .sc-intro { position: static; }
  .sc-promise { display: none; }
  /* Once there is a result, the intro has done its job: keep the card in view. */
  .sc-intro.is-done .sc-lede, .sc-intro.is-done .sc-privacy { display: none; }
}
@media (max-width: 560px) {
  .sc-sys { grid-template-columns: minmax(0, 1fr) 3.75rem; row-gap: 6px; }
  .sc-sys__name { grid-column: 1 / -1; }
  .sc-sys__track { grid-column: 1; }
  .sc-actions .btn { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-progress__track span, .sc-option, .sc-option input::before { transition: none; }
}
