/* Tax Leak Scorecard — shared styles for every scorecard under /scorecard/.
   Matches the original scorecard's look: IBM Plex Sans body, Playfair Display
   headings, navy + Oaks green. Colors come from --primary / --accent, which
   engine.js sets from the scorecard's config file. */

/* Fonts are self-hosted (fonts/) — the site's security policy blocks
   third-party font hosts, and no visitor's IP address is sent to Google just
   to load a page. Both are Google Fonts' latin subsets; IBM Plex Sans is a
   variable font covering weights 400–700. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/scorecard/fonts/ibm-plex-sans-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/scorecard/fonts/playfair-display-latin.woff2) format('woff2');
}

:root { --primary: #01305C; --accent: #557d33; }

/* Reset */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: #F5F6F8;
  color: #1B2B3A;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; background: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: inherit; }
svg { display: block; }
.font-display { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .animate-fade-in { animation: 0.2s ease-out both fadeIn; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media (hover: none) {
  button:active, a:active { opacity: 0.92 !important; transform: scale(0.98) !important; }
}

/* ---- Page frame ---- */
#scorecard-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(32px, 5vh, 60px) 16px 48px;
  background: #F5F6F8;
}
#scorecard-root[data-step="welcome"] { padding-top: clamp(48px, 8vh, 100px); }
#scorecard-root[data-step="results"],
#scorecard-root[data-step="resultsTeaser"],
#scorecard-root[data-step="resultsFull"] { padding-top: clamp(16px, 2vh, 28px); padding-bottom: 24px; }
#scorecard-root.in-frame { min-height: auto; }

.sc-header { text-align: center; margin-bottom: 24px; }
.sc-header .sc-eyebrow {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 6px;
}
.sc-header h1 { font-size: clamp(24px, 3.5vw, 30px); font-weight: 700; color: var(--primary); line-height: 1.2; }

.sc-progress { width: 100%; max-width: 840px; margin-bottom: 20px; }
.sc-progress-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.sc-progress-step { font-size: 13px; font-weight: 600; color: var(--primary); letter-spacing: 0.01em; white-space: nowrap; }
.sc-progress-label { font-size: 13px; font-weight: 500; color: #5F6773; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-progress-track { width: 100%; height: 4px; background: #E3E6EB; border-radius: 2px; overflow: hidden; }
.sc-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.sc-card {
  width: 100%; max-width: 840px; background: #FFFFFF; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}
#scorecard-root[data-step="results"] .sc-card,
#scorecard-root[data-step="resultsTeaser"] .sc-card,
#scorecard-root[data-step="resultsFull"] .sc-card { border-radius: 16px; }
.sc-card-pad { padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px); }

.sc-powered { margin-top: 24px; font-size: 13px; color: #5F6773; text-align: center; letter-spacing: 0.02em; }

/* ---- Welcome ---- */
.sc-hero {
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 91%, transparent) 100%);
  padding: clamp(44px, 6vw, 72px) clamp(28px, 5vw, 64px); text-align: center;
}
/* A light tint of the accent: the accent itself is too dark to read on the
   dark --primary header (about 2:1). */
.sc-hero-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: color-mix(in srgb, var(--accent) 50%, #FFFFFF); margin-bottom: 14px; }
.sc-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; color: #FFFFFF; line-height: 1.15; letter-spacing: -0.01em; }
.sc-hero-rule { height: 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, transparent)); }
.sc-welcome-body {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 5vw, 64px) clamp(44px, 5vw, 72px);
}
.sc-welcome-desc { font-size: clamp(19px, 2.8vw, 22px); line-height: 1.6; font-weight: 400; color: #3D4A5C; max-width: 520px; margin-bottom: 24px; }
.sc-welcome-note {
  max-width: 520px; padding: 14px 20px; margin-bottom: 36px; border-radius: 8px; text-align: left;
  background: color-mix(in srgb, var(--accent) 7%, transparent); border-left: 3px solid var(--accent);
}
.sc-welcome-note p { font-size: 14px; line-height: 1.5; color: #3D4A5C; }
.sc-welcome-note strong { color: var(--primary); }
.sc-btn-primary {
  display: block; width: 100%; max-width: 380px; min-height: 56px; padding: 16px 40px;
  font-size: 18px; font-weight: 700; color: #FFFFFF; background: var(--accent); border: none; border-radius: 8px;
}
.sc-time {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; padding: 6px 14px;
  border-radius: 20px; background: #F0F2F5; font-size: 13px; color: #5F6773; font-weight: 500;
}

/* ---- Contact form ---- */
.sc-contact { max-width: 540px; margin: 0 auto; }
.sc-contact h2 { font-size: clamp(26px, 3.5vw, 32px); font-weight: 700; color: #1B2B3A; margin-bottom: 8px; line-height: 1.2; }
.sc-contact-lead { font-size: 16px; color: #5F6773; margin-bottom: 36px; line-height: 1.55; }
.sc-form { display: flex; flex-direction: column; gap: 22px; }
.sc-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.sc-form-row > .sc-field { flex: 1 1 200px; min-width: 0; }
.sc-field label { display: block; font-size: 14px; font-weight: 600; color: #3D4A5C; margin-bottom: 7px; letter-spacing: 0.01em; }
.sc-field input {
  width: 100%; min-height: 52px; padding: 14px 16px; font-size: 16px; color: #1B2B3A;
  background: #F4F5F8; border: 1.5px solid #CDD2DA; border-radius: 8px; outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.sc-field input::placeholder { color: #9AA3B0; }
.sc-field input:focus { border-color: var(--accent); background: #FFFFFF; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent); }
.sc-field.has-error input { border-color: #E53E3E; background: #FFF5F5; box-shadow: none; }
.sc-field-error { display: none; margin-top: 6px; font-size: 13px; color: #E53E3E; font-weight: 500; }
.sc-field.has-error .sc-field-error { display: block; }
.sc-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sc-btn-continue {
  display: block; width: 100%; min-height: 54px; padding: 15px 32px; margin-top: 8px;
  font-size: 17px; font-weight: 700; color: #FFFFFF; background: var(--accent); border: none; border-radius: 8px;
}

/* ---- Question pages ---- */
.sc-section { max-width: 680px; margin: 0 auto; }
.sc-section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; padding-bottom: 18px; border-bottom: 1px solid #ECEEF2; }
.sc-section-bar { width: 4px; height: 28px; border-radius: 2px; background: var(--primary); flex-shrink: 0; }
.sc-section-head h2 { font-size: clamp(22px, 3vw, 26px); font-weight: 700; color: #1B2B3A; line-height: 1.2; }
.sc-questions { display: flex; flex-direction: column; gap: 36px; }
.sc-q h2 { font-size: clamp(17px, 2.2vw, 19px); font-weight: 600; color: #1B2B3A; line-height: 1.5; margin-bottom: 16px; }
.sc-options { display: flex; flex-direction: column; gap: 10px; }
.sc-opt {
  display: flex; align-items: center; min-height: 56px; width: 100%; padding: 14px 18px; text-align: left;
  border-radius: 10px; border: 1.5px solid #E3E6EB; background: #FAFBFC; outline: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.sc-opt:hover { border-color: #C9CFD8; }
.sc-opt[aria-checked="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, transparent); }
.sc-opt-letter {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; min-width: 30px;
  border-radius: 8px; font-size: 13px; font-weight: 700; margin-right: 14px; background: #E8ECF0; color: #5F6773;
  transition: all 0.18s ease; letter-spacing: 0.02em;
}
.sc-opt[aria-checked="true"] .sc-opt-letter { background: var(--primary); color: #FFFFFF; }
.sc-opt-text { font-size: 15px; line-height: 1.5; font-weight: 400; color: #3D4A5C; transition: all 0.18s ease; }
.sc-opt[aria-checked="true"] .sc-opt-text { font-weight: 600; color: #1B2B3A; }
.sc-opt-check { margin-left: auto; min-width: 20px; flex-shrink: 0; }
.sc-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 44px; padding-top: 24px; border-top: 1px solid #ECEEF2; gap: 16px; }
.sc-btn-back {
  display: block; min-height: 48px; padding: 12px 24px; font-size: 15px; font-weight: 600; color: #5F6773;
  background: transparent; border: 1.5px solid #DDE1E8; border-radius: 8px;
}
.sc-btn-next {
  display: block; min-height: 54px; padding: 15px 36px; font-size: 17px; font-weight: 700; color: #FFFFFF;
  background: var(--accent); border: none; border-radius: 8px;
}
.sc-btn-next:disabled { background: #C5CAD3; cursor: not-allowed; opacity: 0.6; }
.sc-nav-hint { margin-top: 10px; font-size: 13px; color: #5F6773; text-align: right; font-weight: 500; }

/* ---- Results ---- */
.sc-results-hero {
  background: linear-gradient(145deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 88%, transparent) 100%);
  padding: clamp(24px, 3vw, 36px) clamp(24px, 4vw, 48px);
  display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); flex-wrap: wrap; justify-content: center;
}
.sc-ring { position: relative; flex-shrink: 0; }
.sc-ring svg { transform: rotate(-90deg); }
.sc-ring-progress { transition: stroke 0.3s ease; }
.sc-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sc-ring-number { font-weight: 700; color: #FFFFFF; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-ring-outof { color: rgba(255,255,255,0.75); font-weight: 500; margin-top: 6px; letter-spacing: 0.04em; }
.sc-results-text { flex: 1 1 240px; min-width: 0; text-align: left; }
.sc-results-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.sc-tier-pill { display: inline-block; padding: 5px 18px; border-radius: 999px; margin-bottom: 12px; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.sc-tier-message { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.85); max-width: 380px; }

.sc-breakdown { padding: clamp(20px, 3vw, 28px) clamp(24px, 4vw, 48px); }
.sc-breakdown h2 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #5F6773; margin-bottom: 14px; }
.sc-breakdown-list { display: flex; flex-direction: column; gap: 8px; }
.sc-cat { padding: 8px 10px; border-radius: 6px; border-left: 3px solid; transition: background-color 0.3s ease; }
.sc-cat.is-weak { background: #FEF2F2; }
.sc-cat-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.sc-cat-title { font-size: 14px; font-weight: 500; color: #1B2B3A; line-height: 1.3; flex: 1; padding-right: 12px; }
.sc-cat-badge { font-size: 12px; font-weight: 600; white-space: nowrap; padding: 1px 6px; border-radius: 4px; }
.sc-cat-track { width: 100%; height: 4px; background: #ECEEF2; border-radius: 3px; overflow: hidden; }
.sc-cat-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease-out; }

.sc-scale-wrap { padding: 0 clamp(24px, 4vw, 48px) clamp(20px, 3vw, 28px); }
.sc-scale { border-top: 1px solid #ECEEF2; padding-top: clamp(20px, 2.5vw, 26px); }
.sc-scale h3 { font-size: clamp(17px, 2.2vw, 20px); font-weight: 700; color: #1B2B3A; margin: 0 0 4px; line-height: 1.25; }
.sc-scale-lead { font-size: 14px; line-height: 1.5; color: #5F6773; margin: 0 0 16px; }
.sc-scale-lead strong { color: #1B2B3A; }
.sc-scale-list { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; }
.sc-tier-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 13px 16px; border-radius: 10px;
  background: #FAFBFC; border: 1px solid #ECEEF2;
}
.sc-tier-range { flex-shrink: 0; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #5F6773; min-width: 76px; }
.sc-tier-label { flex-shrink: 0; font-size: 14px; font-weight: 700; color: #4A5561; }
.sc-tier-summary { flex: 1 1 180px; min-width: 0; font-size: 13.5px; line-height: 1.45; color: #5F6773; }
.sc-tier-you { flex-shrink: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.sc-tier-row.is-active .sc-tier-summary { color: #38424E; }

.sc-cta {
  padding: clamp(16px, 2vw, 24px) clamp(24px, 4vw, 48px) clamp(24px, 3vw, 32px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #FAFBFC; border-top: 1px solid #ECEEF2; border-radius: 0 0 16px 16px;
}
.sc-cta h3 { font-size: clamp(18px, 2.5vw, 22px); font-weight: 700; color: #1B2B3A; margin-bottom: 6px; line-height: 1.25; }
.sc-cta p { font-size: 14px; line-height: 1.5; color: #5F6773; max-width: 440px; margin-bottom: 18px; }
.sc-cta a {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 54px;
  padding: 15px 36px; font-size: 17px; font-weight: 700; color: #FFFFFF; background: var(--primary); border-radius: 8px;
}
.sc-cta-sent { margin-top: 12px; font-size: 12px; color: #5F6773; line-height: 1.4; }
.sc-disclaimer { margin-top: 10px; font-size: 13px; color: #5F6773; line-height: 1.4; max-width: 440px; }

/* ---- Partial reveal: the "unlock the full report" prompt on the teaser ---- */
.sc-unlock {
  margin: 0 clamp(24px, 4vw, 48px) clamp(24px, 3vw, 32px);
  padding: clamp(18px, 2.5vw, 24px);
  border-radius: 12px;
  background: #FAFBFC;
  border: 1px solid #ECEEF2;
  text-align: center;
}
.sc-unlock-text { font-size: 14px; font-weight: 600; color: #3D4A5C; margin-bottom: 14px; }
.sc-btn-outline {
  display: block; width: 100%; max-width: 380px; margin: 0 auto; min-height: 50px; padding: 13px 32px;
  font-size: 15px; font-weight: 700; color: var(--primary); background: transparent;
  border: 1.5px solid var(--primary); border-radius: 8px;
}

/* ---- Email form standard: visible required / optional marks, privacy line ---- */
.sc-req-note { font-size: 13px; color: #5F6773; margin-bottom: -8px; }
.sc-req { color: #B42318; font-weight: 700; }
.sc-optional { font-weight: 400; color: #5F6773; }
.sc-submit { display: flex; flex-direction: column; gap: 10px; }
.sc-privacy { font-size: 13px; color: #5F6773; text-align: center; line-height: 1.45; }

/* Read by screen readers, not shown. */
.sc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
