/* ═══════════════════════════════════════════════════════════════════════
   AE Commission Tool — Contribution Scorecard styles.
   ───────────────────────────────────────────────────────────────────────
   Loaded AFTER ae-brand.css and commission.css. Reuses the AE brand tokens
   declared in commission.css (--ae-purple, --ae-orange, etc.) and adds a
   small on-brand accent set for the scorecard surface only. Light theme,
   bold big numbers, colour, animation.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* On-brand accent set, scoped to the scorecard's vocabulary. */
  --sc-purple: var(--ae-purple, #5F51D5);
  --sc-purple-deep: #4338b8;
  --sc-orange: var(--ae-orange, #FF5233);
  --sc-teal: #0d9488;
  --sc-green: #16a34a;
  --sc-ink: #1d1d24;
  --sc-soft: #6a6a72;
  --sc-line: #e6e6ee;
  --sc-card: #ffffff;
  --sc-grad: linear-gradient(135deg, var(--sc-purple) 0%, var(--sc-purple-deep) 60%, #2f2a7a 100%);
}

/* ── Tab strip ─────────────────────────────────────────────────── */
.sc-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 22px;
  padding: 5px;
  background: #eeeef4;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sc-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sc-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.sc-tab:hover { color: var(--sc-ink); }
.sc-tab.active {
  color: #fff;
  background: var(--sc-grad);
  box-shadow: 0 4px 12px rgba(95, 81, 213, 0.32);
}
.sc-tab:focus-visible { outline: 2px solid var(--sc-purple); outline-offset: 2px; }

/* ── Panels + coming-soon empty state ──────────────────────────── */
.sc-panel { margin: 0 0 8px; }
.sc-coming-soon {
  text-align: center;
  padding: 80px 28px;
  background: var(--sc-card);
  border: 1px dashed var(--sc-line);
  border-radius: 16px;
  color: var(--sc-soft);
}
.sc-coming-soon-q {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--sc-ink);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.sc-coming-soon-msg { font-size: 1rem; }

/* ── Reveal-on-scroll ──────────────────────────────────────────── */
.sc-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.sc-reveal.in { opacity: 1; transform: none; }

/* Shared big-number style. */
.sc-num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* EST badge — honesty marker on every estimated value. */
.sc-est {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 5px;
  background: #fff0eb;
  color: var(--sc-orange);
  border: 1px solid #ffd9cd;
  text-transform: uppercase;
}

/* ── Section rhythm ────────────────────────────────────────────── */
.sc-section { margin: 0 0 40px; }
.sc-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-ink);
  margin: 0 0 4px;
}
.sc-sub { color: var(--sc-soft); margin: 0 0 18px; max-width: 70ch; font-size: 0.95rem; }

/* ── Hero ──────────────────────────────────────────────────────── */
.sc-hero {
  background: var(--sc-grad);
  color: #fff;
  border-radius: 18px;
  padding: 44px 40px;
  margin-bottom: 26px;
  box-shadow: 0 18px 40px rgba(67, 56, 184, 0.28);
  position: relative;
  overflow: hidden;
}
.sc-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,82,51,0.55) 0%, rgba(255,82,51,0) 70%);
  pointer-events: none;
}
.sc-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
  margin-bottom: 14px;
}
.sc-headline {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  max-width: none;
}
.sc-who { font-size: 1rem; color: rgba(255,255,255,0.9); font-weight: 500; }

/* ── Big stat banner ───────────────────────────────────────────── */
.sc-banner-caption {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sc-soft);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sc-cumulative {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--sc-purple);
  background: #efedfb;
  padding: 2px 9px;
  border-radius: 999px;
}
.sc-banner-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.sc-banner-stat {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: var(--ae-shadow-sm, 0 1px 2px rgba(20,20,30,0.04));
}
.sc-banner-stat:nth-child(5n+1) .sc-banner-value { color: var(--sc-purple); }
.sc-banner-stat:nth-child(5n+2) .sc-banner-value { color: var(--sc-orange); }
.sc-banner-stat:nth-child(5n+3) .sc-banner-value { color: var(--sc-teal); }
.sc-banner-stat:nth-child(5n+4) .sc-banner-value { color: var(--sc-purple-deep); }
.sc-banner-stat:nth-child(5n+5) .sc-banner-value { color: var(--sc-green); }
.sc-banner-value {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--sc-purple);
}
.sc-banner-label { margin-top: 8px; font-weight: 600; color: var(--sc-ink); font-size: 0.92rem; }
.sc-banner-src { margin-top: 4px; font-size: 0.72rem; color: var(--sc-soft); }

/* ── "What got built" bars ─────────────────────────────────────── */
.sc-bars { display: flex; flex-direction: column; gap: 12px; }
.sc-bar-row {
  display: grid;
  grid-template-columns: 220px 1fr 92px;
  align-items: center;
  gap: 16px;
}
.sc-bar-name { font-weight: 600; color: var(--sc-ink); font-size: 0.92rem; }
.sc-bar-track {
  background: #eeeef4;
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}
.sc-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sc-purple) 0%, #7d72e3 100%);
  transition: width 1.3s cubic-bezier(.2,.8,.2,1);
}
.sc-section.in .sc-bar-fill { width: var(--pct); }
.sc-bar-loc { text-align: right; font-weight: 700; color: var(--sc-ink); font-variant-numeric: tabular-nums; }
.sc-bars-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sc-line);
}
.sc-bars-total-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--sc-soft); }
.sc-bars-total-value { font-size: 1.4rem; font-weight: 800; color: var(--sc-purple); }

/* ── Guardian Mesh ─────────────────────────────────────────────── */
.sc-mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.sc-mesh-card {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}
.sc-mesh-card-value { font-size: 2rem; font-weight: 800; color: var(--sc-purple); line-height: 1; }
.sc-mesh-card-label { margin-top: 8px; color: var(--sc-soft); font-size: 0.85rem; }

.sc-mesh-ring-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 16px;
  padding: 26px 28px;
}
.sc-ring { position: relative; flex-shrink: 0; width: 140px; height: 140px; }
.sc-ring svg { transform: rotate(-90deg); }
.sc-ring-bg { fill: none; stroke: #eeeef4; stroke-width: 12; }
.sc-ring-fg {
  fill: none;
  stroke: var(--sc-orange);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dashoffset: var(--ring-from);
  transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1);
}
.sc-section.in .sc-ring-fg { stroke-dashoffset: var(--ring-to); }
.sc-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--sc-ink);
}
.sc-ring-num { font-size: 2.4rem; line-height: 1; }
.sc-ring-of { font-size: 1.3rem; color: var(--sc-soft); }
.sc-ring-side { min-width: 0; }
.sc-ring-callout { font-size: 1.15rem; font-weight: 700; color: var(--sc-ink); }
.sc-ring-note { margin-top: 6px; color: var(--sc-soft); font-size: 0.9rem; }
.sc-mesh-names { margin: 10px 0 0; padding-left: 18px; color: var(--sc-ink); font-weight: 600; }

/* Q1 reseller logo chips — uniform height, self-hosted PNGs centered in
   white pills so disparate logo shapes/colors read consistently. */
.sc-mesh-logos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.sc-mesh-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: 12px;
  box-shadow: var(--ae-shadow-sm, 0 1px 2px rgba(20,20,30,0.04));
}
.sc-mesh-logo img { max-height: 30px; max-width: 130px; width: auto; object-fit: contain; display: block; }

/* Pipeline / discussions tiers within the Guardian Mesh section. */
.sc-tier { margin-top: 24px; }
.sc-tier-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sc-ink);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.sc-tier-note {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--sc-soft);
}
/* The pipeline logo wall uses slightly larger chips than the ring's. */
.sc-mesh-logos-wall .sc-mesh-logo { height: 64px; padding: 0 22px; }
.sc-mesh-logos-wall .sc-mesh-logo img { max-height: 34px; max-width: 150px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #f3f3f8;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sc-ink);
}

/* ── Tool tiles ────────────────────────────────────────────────── */
.sc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.sc-tile {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 18px 20px;
  border-left: 4px solid var(--sc-purple);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.sc-tile:hover { transform: translateY(-3px); box-shadow: var(--ae-shadow-md, 0 6px 16px rgba(20,20,30,0.08)); }
.sc-tile:nth-child(3n+2) { border-left-color: var(--sc-orange); }
.sc-tile:nth-child(3n+3) { border-left-color: var(--sc-teal); }
.sc-tile-name { font-weight: 700; color: var(--sc-ink); margin-bottom: 4px; }
.sc-tile-desc { color: var(--sc-soft); font-size: 0.88rem; }

/* ── Economics ─────────────────────────────────────────────────── */
.sc-econ-hero {
  background: linear-gradient(135deg, #fff7f4 0%, #fdeee9 100%);
  border: 1px solid #ffd9cd;
  border-radius: 16px;
  padding: 30px 32px;
  margin-bottom: 16px;
}
.sc-econ-hero-value {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--sc-orange);
  line-height: 1;
}
.sc-econ-hero-label { margin-top: 8px; font-weight: 700; font-size: 1.05rem; color: var(--sc-ink); }
.sc-econ-hero-basis { margin-top: 8px; color: var(--sc-soft); font-size: 0.86rem; max-width: 70ch; }
.sc-econ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.sc-econ-card {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 20px;
}
.sc-econ-card-value { font-size: 1.9rem; font-weight: 800; color: var(--sc-purple); line-height: 1; }
.sc-econ-card-label { margin-top: 8px; font-weight: 600; color: var(--sc-ink); font-size: 0.9rem; }
.sc-econ-card-sub { margin-top: 2px; color: var(--sc-soft); font-size: 0.78rem; }

/* ── The ask ───────────────────────────────────────────────────── */
.sc-ask {
  background: var(--sc-grad);
  color: #fff;
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(67, 56, 184, 0.3);
  position: relative;
  overflow: hidden;
}
.sc-ask::after {
  content: "";
  position: absolute;
  left: -60px; bottom: -90px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,82,51,0.5) 0%, rgba(255,82,51,0) 70%);
  pointer-events: none;
}
.sc-ask-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
}
.sc-ask-amount {
  font-size: clamp(3rem, 9vw, 5rem);
  font-weight: 800;
  line-height: 1;
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
}
.sc-ask-title { font-size: 1.25rem; font-weight: 700; }
.sc-ask-math { margin-top: 10px; color: rgba(255,255,255,0.88); font-size: 0.95rem; }

/* ── Footnote ──────────────────────────────────────────────────── */
.sc-footnote {
  color: var(--sc-soft);
  font-size: 0.8rem;
  border-top: 1px solid var(--sc-line);
  padding-top: 16px;
  margin-top: 8px;
}
.sc-footnote .sc-est { margin: 0 2px; }

/* ── Hero subhead (business framing under the headline) ────────── */
.sc-subhead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.4;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  margin: 0 0 16px;
  max-width: 46ch;
}

/* Dark eyebrow variant for section labels on the light background. */
.sc-eyebrow-dark {
  color: var(--sc-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── The bottom line ───────────────────────────────────────────── */
.sc-bl-hero {
  background: linear-gradient(135deg, #fff7f4 0%, #fdeee9 100%);
  border: 1px solid #ffd9cd;
  border-radius: 18px;
  padding: 36px 36px;
  margin-bottom: 16px;
}
.sc-bl-hero-value {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--sc-orange);
  line-height: 1;
  letter-spacing: -0.03em;
}
.sc-bl-hero-label { margin-top: 10px; font-weight: 700; font-size: 1.2rem; color: var(--sc-ink); }
.sc-bl-hero-basis { margin-top: 8px; color: var(--sc-soft); font-size: 0.92rem; max-width: 70ch; }
.sc-bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.sc-bl-stat {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: var(--ae-shadow-sm, 0 1px 2px rgba(20,20,30,0.04));
}
.sc-bl-stat:nth-child(3n+1) .sc-bl-stat-value { color: var(--sc-purple); }
.sc-bl-stat:nth-child(3n+2) .sc-bl-stat-value { color: var(--sc-green); }
.sc-bl-stat:nth-child(3n+3) .sc-bl-stat-value { color: var(--sc-purple-deep); }
.sc-bl-stat-value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; color: var(--sc-purple); }
.sc-bl-stat-label { margin-top: 10px; font-weight: 700; color: var(--sc-ink); font-size: 1rem; }
.sc-bl-stat-sub { margin-top: 4px; color: var(--sc-soft); font-size: 0.84rem; }

/* Bottom-up breakdown table backing the cost-avoided figure. */
.sc-bd-card {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 10px 22px 18px;
  margin-bottom: 16px;
}
.sc-bd { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.sc-bd th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sc-soft);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--sc-line);
}
.sc-bd td { padding: 12px 0; border-bottom: 1px solid var(--sc-line); color: var(--sc-ink); vertical-align: top; }
.sc-bd td:first-child { padding-right: 24px; max-width: 560px; }
.sc-bd-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.sc-bd tfoot td {
  border-bottom: none;
  border-top: 2px solid var(--sc-border-strong, #cfcfd6);
  font-weight: 800;
  color: var(--sc-purple-deep);
  padding-top: 14px;
}
.sc-bd tfoot td:first-child { text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; color: var(--sc-soft); }
.sc-bd-note { margin-top: 12px; color: var(--sc-soft); font-size: 0.8rem; }

/* ── How Matt helped the people who drive revenue ──────────────── */
.sc-aud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.sc-aud {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 16px;
  padding: 24px 26px;
  border-top: 4px solid var(--sc-purple);
}
.sc-aud[data-aud="1"] { border-top-color: var(--sc-orange); }
.sc-aud[data-aud="2"] { border-top-color: var(--sc-teal); }
.sc-aud[data-aud="3"] { border-top-color: var(--sc-green); }
.sc-aud[data-aud="4"] { border-top-color: var(--sc-purple-deep); }
.sc-aud-head { margin-bottom: 14px; }
.sc-aud-who { font-size: 1.2rem; font-weight: 800; color: var(--sc-ink); letter-spacing: -0.01em; }
.sc-aud-outcome { margin-top: 2px; color: var(--sc-purple); font-weight: 600; font-size: 0.95rem; }
.sc-aud[data-aud="1"] .sc-aud-outcome { color: var(--sc-orange); }
.sc-aud[data-aud="2"] .sc-aud-outcome { color: var(--sc-teal); }
.sc-aud[data-aud="3"] .sc-aud-outcome { color: var(--sc-green); }
.sc-aud[data-aud="4"] .sc-aud-outcome { color: var(--sc-purple-deep); }
.sc-aud-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sc-aud-tool { display: flex; flex-direction: column; gap: 1px; padding-left: 16px; position: relative; }
.sc-aud-tool::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sc-purple);
}
.sc-aud[data-aud="1"] .sc-aud-tool::before { background: var(--sc-orange); }
.sc-aud[data-aud="2"] .sc-aud-tool::before { background: var(--sc-teal); }
.sc-aud[data-aud="3"] .sc-aud-tool::before { background: var(--sc-green); }
.sc-aud[data-aud="4"] .sc-aud-tool::before { background: var(--sc-purple-deep); }
.sc-aud-tool-name { font-weight: 700; color: var(--sc-ink); font-size: 0.95rem; }
.sc-aud-tool-benefit { color: var(--sc-soft); font-size: 0.9rem; }

/* ── The scope (de-emphasized credibility section) ─────────────── */
.sc-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.sc-scope-stat {
  background: #f3f3f8;
  border: 1px solid var(--sc-line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.sc-scope-stat-value { font-size: 1.7rem; font-weight: 800; color: var(--sc-purple-deep); line-height: 1; }
.sc-scope-stat-label { margin-top: 6px; color: var(--sc-soft); font-size: 0.8rem; }
.sc-scope-bars-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sc-soft);
  margin-bottom: 12px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sc-banner-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .sc-hero { padding: 32px 24px; }
  .sc-banner-grid { grid-template-columns: repeat(2, 1fr); }
  .sc-bar-row { grid-template-columns: 1fr; gap: 6px; }
  .sc-bar-loc { text-align: left; }
  .sc-mesh-ring-wrap { flex-direction: column; text-align: center; align-items: center; }
  .sc-mesh-names { text-align: left; }
  .sc-ask { padding: 30px 22px; }
}

/* ── Reduced motion — no transitions, final state held. JS also snaps
      count-ups and adds .in immediately so bars/ring render complete. ── */
@media (prefers-reduced-motion: reduce) {
  .sc-reveal { opacity: 1; transform: none; transition: none; }
  .sc-bar-fill,
  .sc-ring-fg { transition: none; }
  .sc-tile { transition: none; }
}
