/* Scorecard Studio — screen styles.
   Brand colours arrive via CSS custom properties; engine.js overrides them
   from config.brand at runtime. Mobile-first, system fonts, no CDNs. */

:root {
  --brand-primary: #166a6a;   /* teal — headings, buttons */
  --brand-accent: #d9a83c;    /* gold — answer pills */
  --brand-highlight: #f0913b; /* orange — progress/emphasis */
  --ink: #1f2a2a;
  --ink-soft: #4a5a5a;
  --paper: #ffffff;
  --paper-tint: #f4f7f7;
  --line: #dde5e5;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-tint);
}

code {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

/* ------------------------------------------------------------------ shell */

#app { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  padding: 1rem 1.25rem;
  background: var(--brand-primary);
}

.logo-text {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.site-footer {
  padding: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

h1, h2, h3 { color: var(--brand-primary); line-height: 1.25; }

/* --------------------------------------------------------------- buttons */

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 3px solid var(--brand-highlight);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-large {
  font-size: 1.15rem;
  padding: 1rem 2.2rem;
}

.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
}

/* --------------------------------------------------------------- landing */

.landing {
  text-align: center;
  padding-top: 2rem;
}

.landing-title {
  font-size: clamp(2rem, 6vw, 2.8rem);
  margin: 0 0 0.5rem;
}

.landing-tagline {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
}

.landing-headline {
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  margin: 1.5rem 0 0.75rem;
}

.landing-intro {
  max-width: 36rem;
  margin: 0.5rem auto;
  text-align: left;
}

.landing-bullets {
  max-width: 32rem;
  margin: 1.25rem auto;
  text-align: left;
  padding-left: 1.4rem;
}
.landing-bullets li { margin: 0.5rem 0; }
.landing-bullets li::marker { color: var(--brand-accent); }

.landing .btn-primary { margin-top: 1.25rem; }

.landing-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ------------------------------------------------------------------- quiz */

.quiz { padding-top: 1rem; }

.progress {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-highlight);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 1.5rem;
}

.category-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-highlight);
  text-align: center;
  margin-bottom: 0.75rem;
}

.question-text {
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  text-align: center;
  margin: 0 0 2rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 34rem;
  margin: 0 auto;
}

.option-pill {
  background: var(--brand-accent);
  color: #fff;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  width: 100%;
  line-height: 1.35;
}
.option-pill:hover { filter: brightness(1.06); box-shadow: 0 3px 12px rgba(0,0,0,0.15); }
.option-pill.selected {
  background: var(--brand-primary);
  box-shadow: inset 0 0 0 3px var(--brand-accent);
}

.text-answer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 34rem;
  margin: 0 auto;
}

.text-input {
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.text-input:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.back-link:hover { color: var(--brand-primary); text-decoration: underline; }

/* -------------------------------------------------------------- lead form */

.lead { max-width: 30rem; margin: 0 auto; padding-top: 1rem; }

.lead-title { font-size: clamp(1.5rem, 5vw, 2rem); text-align: center; }

.lead-intro { text-align: center; color: var(--ink-soft); }

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.field { display: flex; flex-direction: column; gap: 0.3rem; }

.field-label { font-weight: 600; font-size: 0.95rem; }

.field-input {
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.field-input:focus { outline: none; border-color: var(--brand-primary); }

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; }

.lead-notice {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------------------------------------------------------------- results */

.results { display: flex; flex-direction: column; gap: 1.25rem; }

.report-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
}

.section-heading {
  margin-top: 0;
  font-size: 1.4rem;
}

.sub-heading { font-size: 1.1rem; margin-bottom: 0.4rem; }

.report-cover {
  background: var(--brand-primary);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.report-cover .cover-logo {
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 1rem;
}
.report-cover .cover-title { color: #fff; margin: 0 0 0.4rem; font-size: 2rem; }
.report-cover .cover-tagline { color: rgba(255, 255, 255, 0.85); margin: 0 0 1rem; }
.report-cover .cover-name { font-size: 1.1rem; font-weight: 600; margin: 0.25rem 0; }
.report-cover .cover-date { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; margin: 0; }

.score-hero { text-align: center; }
.score-hero-label { font-size: 1.2rem; }

.score-dial {
  width: 190px;
  height: 190px;
  margin: 0.75rem auto 1rem;
  border-radius: 50%;
  border: 10px solid var(--brand-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.score-dial-pct {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1;
}
.score-dial-band {
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-highlight);
}

.score-hero-meaning { color: var(--ink-soft); max-width: 30rem; margin: 0 auto 1.25rem; }

.score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.score-card {
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand-accent);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--paper);
}
.score-card-name { font-weight: 700; color: var(--brand-primary); }
.score-card-pct { font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.score-card-band {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-highlight);
  margin-bottom: 0.35rem;
}
.score-card-summary { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }

.category-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.category-detail-score .pct {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-right: 0.5rem;
}
.category-detail-score .band {
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-highlight);
}

.great-block {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--paper-tint);
  border-left: 4px solid var(--brand-accent);
  border-radius: 8px;
}

.founder-note, .signoff { font-style: italic; color: var(--ink-soft); }

.bullet-list { padding-left: 1.3rem; }
.bullet-list li { margin: 0.4rem 0; }
.bullet-list li::marker { color: var(--brand-accent); }

.bands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.75rem;
}
.bands-table th, .bands-table td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.bands-table th { background: var(--brand-primary); color: #fff; }

.quote {
  margin: 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 5px solid var(--brand-accent);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--brand-primary);
}

.cta-link { margin-top: 1rem; }

.result-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  background: transparent;
  border: none;
}

/* ------------------------------------------------------------------ error */

.error-box {
  max-width: 34rem;
  margin: 4rem auto;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

/* ------------------------------------------------------------------ admin */

.admin-main { max-width: 72rem; }
.admin-title { font-size: 1.7rem; }
.admin-note { color: var(--ink-soft); }
.admin-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0; }
.admin-count { font-weight: 600; }

.table-scroll { overflow-x: auto; }

.leads-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--paper);
  min-width: 100%;
}
.leads-table th, .leads-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
  max-width: 22rem;
  overflow-wrap: break-word;
}
.leads-table th {
  background: var(--brand-primary);
  color: #fff;
  position: sticky;
  top: 0;
}

/* --------------------------------------------------------------- desktop */

@media (min-width: 700px) {
  body { font-size: 18px; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .report-section { padding: 2rem 2.25rem; }
}

/* ------------------------------------------------- report images & extras */

.report-cover { position: relative; overflow: hidden; }
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.report-cover .cover-content {
  position: relative;
  padding: 2.5rem 1rem;
  background: linear-gradient(rgba(16, 74, 74, 0.55), rgba(16, 74, 74, 0.35));
  border-radius: calc(var(--radius) - 4px);
}
.report-cover .cover-title,
.report-cover .cover-tagline { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
.report-cover .cover-name,
.report-cover .cover-date {
  display: inline-block;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1.6rem;
  margin: 0.3rem auto;
  font-size: 0.95rem;
}
.report-cover .cover-name { font-weight: 700; }
.report-cover p { display: block; }
.report-cover .cover-name, .report-cover .cover-date { display: table; margin-left: auto; margin-right: auto; }
.report-cover .cover-footer {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  margin: 1.25rem 0 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.section-image {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 1.25rem;
  display: block;
}

.category-banner {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: block;
}

.categories-lead {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: var(--brand-primary);
}

/* Teal feature pages (Making the Most, quote, path forward) */
.teal-page {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.teal-page .section-heading,
.teal-page .sub-heading,
.teal-page .copy,
.teal-page p,
.teal-page li { color: #fff; }
.teal-page .bullet-list li::marker,
.teal-page .numbered-list li::marker { color: var(--brand-accent); }
.teal-page .footnote { color: rgba(255, 255, 255, 0.75); }

.numbered-list { padding-left: 1.4rem; }
.numbered-list li { margin: 0.4rem 0; }

.deflist strong { color: var(--brand-accent); }

.mtm-cta {
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.strapline { font-style: italic; font-weight: 700; color: var(--brand-primary); }
.footnote { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }

.patterns-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .patterns-cols { grid-template-columns: 1fr 1fr; }
}
.patterns-col {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--paper-tint);
}

.quote-section { text-align: center; padding: 2.25rem 1.5rem; }
.quote-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 4px solid var(--brand-accent);
  margin: 0 auto 1.25rem;
  display: block;
}
.quote-section .quote {
  border-left: none;
  padding: 0;
  color: #fff;
  font-size: 1.35rem;
  max-width: 34rem;
  margin: 0 auto;
}
.quote-attribution {
  margin-top: 1rem;
  color: var(--brand-accent);
  font-weight: 600;
}

.recap-widget { text-align: center; margin-top: 1.25rem; }
.score-dial-small { width: 140px; height: 140px; border-width: 8px; }
.score-dial-small .score-dial-pct { font-size: 2.2rem; }
.recap-label { font-weight: 700; margin: 0.75rem 0 0.5rem; color: var(--brand-primary); }
.band-scale { display: flex; gap: 0.5rem; justify-content: center; }
.band-pill {
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.band-pill.active {
  background: var(--brand-highlight);
  border-color: var(--brand-highlight);
  color: #fff;
  font-weight: 700;
}

.btn-accent {
  background: var(--brand-accent);
  color: #fff;
}
.btn-accent:hover { filter: brightness(1.05); }

.teal-page .cta-link { margin-top: 1.5rem; }
.path-forward { text-align: left; }
.path-forward .section-image { max-height: 260px; }

.closing-line { text-align: center; background: transparent; border: none; }
