/**
 * Business Health Scorecard (scorecard.html). One feature, one file, same
 * pattern as bea.css / clients.css. No inline styles anywhere: the CSP
 * forbids them, so bar widths are set from scorecard.js through the CSSOM.
 */

.form.sc-form { display: flex; flex-direction: column; gap: 24px; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }

.sc-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sc-block h2 { font-size: 1.125rem; }
.sc-block__sub { color: var(--text-muted); font-size: 0.9375rem; margin-top: -14px; }

.sc-q { border: 0; padding: 0; margin: 0; min-width: 0; }
.sc-q[hidden] { display: none; }
.sc-q legend {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  padding: 0;
  margin-bottom: 10px;
}
.sc-q__no { color: var(--royal); margin-right: 6px; }

.sc-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sc-opt { position: relative; display: block; }
.sc-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sc-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 6px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid var(--border-str);
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sc-opt:hover span { border-color: var(--royal); }
.sc-opt input:checked + span { background: var(--royal); border-color: var(--royal); color: #fff; }
.sc-opt input:focus-visible + span { outline: 3px solid rgba(22, 87, 206, 0.35); outline-offset: 2px; }

.sc-figs .field[hidden] { display: none; }
.sc-toggle { margin-top: -4px; }

.sc-progress { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--text-muted); font-weight: 600; }
.sc-progress__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--bg-tint); overflow: hidden; }
.sc-progress__bar span { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--royal), var(--cyan)); transition: width 0.25s ease; }

.sc-consent { display: flex; flex-direction: column; gap: 12px; }

/* ---- hero: copy on the left, "What you get" on the right ---- */
.sc-hero { align-items: center; gap: 48px; }
.sc-hero h1 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); max-width: 14ch; }
.sc-hero .card { padding: 28px; gap: 18px; }
.sc-hero .stack > .lede { max-width: 52ch; }
.page-hero.section--alt:has(.sc-hero) { padding: 56px 0 52px; }
@media (max-width: 700px) {
  .sc-hero__card { display: none; }
  .page-hero.section--alt:has(.sc-hero) { padding: 36px 0 28px; }
}

/* ---- tabbed info box (JS adds .is-tabs; without JS both panels show) ---- */
.sc-tabs { padding: 20px 24px 24px; gap: 16px; }
.sc-tabs__list { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--bg-tint); }
.sc-tabs__list[hidden] { display: none; }
.sc-tabs__list button {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 10px 12px; border-radius: 9px;
  font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.sc-tabs__list button:hover { color: var(--text); }
.sc-tabs__list button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 26, 60, 0.12); }
.sc-tabs__list button:focus-visible { outline: 3px solid rgba(22, 87, 206, 0.35); outline-offset: 1px; }
.sc-tabs__panel { display: flex; flex-direction: column; gap: 14px; }
.sc-tabs .dot-list li { font-size: 0.875rem; }
.sc-tabs.is-tabs .sc-tabs__panel[hidden] { display: none; }
.sc-tabs.is-tabs .sc-tabs__panel > h2 { display: none; }

/* ---- step-by-step wizard (JS adds .is-wizard; without JS every step shows) ---- */
.sc-step[hidden], .sc-wizard-head[hidden], .sc-nav[hidden] { display: none; }
.sc-step h2:focus { outline: none; }
.is-wizard .sc-step { animation: sc-step-in 0.28s ease both; }
/* Land just below the sticky site header when a step change scrolls the page. */
.sc-wizard-head { scroll-margin-top: 96px; }
.sc-nav { display: flex; justify-content: space-between; gap: 12px; }
.sc-nav .btn { min-width: 120px; }
.sc-q--missing { border-left: 3px solid #D0533C; padding-left: 12px; }
.sc-q--missing legend { color: #8A2B18; }
@keyframes sc-step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---- result ---- */
.sc-result[hidden] { display: none; }
.sc-result__inner { max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.sc-result h1:focus { outline: none; }

.sc-overall { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.sc-overall__num { font-family: "Sora", system-ui, sans-serif; font-size: 4.5rem; line-height: 1; font-weight: 700; color: var(--navy-ink); }
.sc-overall__num small { font-size: 1.25rem; font-weight: 600; color: var(--text-soft); margin-left: 4px; }
.sc-overall__copy { display: flex; flex-direction: column; gap: 10px; flex: 1 1 260px; }

.sc-badge { align-self: flex-start; display: inline-block; padding: 6px 14px; border-radius: 99px; font-size: 0.875rem; font-weight: 700; }
.sc-badge[data-band="healthy"] { background: #E6F6F1; color: #12574A; }
.sc-badge[data-band="developing"] { background: #FFF4DD; color: #7A5200; }
.sc-badge[data-band="attention"] { background: #FCF1EE; color: #8A2B18; }

.sc-cats { display: flex; flex-direction: column; gap: 16px; }
.sc-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.sc-cat__label { font-weight: 600; color: var(--text); }
.sc-cat__score { font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-bar { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: var(--bg-tint); overflow: hidden; }
.sc-bar span { display: block; width: 0; height: 100%; border-radius: 99px; transition: width 0.7s ease; }
.sc-bar[data-band="healthy"] span { background: #1FA383; }
.sc-bar[data-band="developing"] span { background: #E0A526; }
.sc-bar[data-band="attention"] span { background: #D0533C; }

.sc-actions { display: flex; flex-direction: column; gap: 14px; padding-left: 22px; }
.sc-actions li { color: var(--text-body); line-height: 1.55; }
.sc-actions strong { color: var(--text); }

.sc-sent { font-size: 0.9375rem; }
.sc-cta { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .sc-block { padding: 18px; gap: 18px; }
  /* Keep all four answers on one row so a step fits a phone screen. */
  .sc-opts { gap: 6px; }
  .sc-opt span { min-height: 42px; padding: 8px 2px; font-size: 0.75rem; }
  .sc-q legend { font-size: 0.875rem; margin-bottom: 8px; }
  .sc-overall__num { font-size: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .is-wizard .sc-step { animation: none; }
  .sc-opt span, .sc-progress__bar span, .sc-bar span, .sc-tabs__list button { transition: none; }
}
