/* Exit Ready Scorecard styles.
   Brand colours and fonts are set once here, as variables. */

:root {
  --navy: #253C62;
  --navy-dark: #1B2D4A;   /* button hover only */
  --gold: #FFD347;
  --cream: #EBEAB2;
  --grey-dark: #4A4E57;
  --grey-light: #E4E3DC;
  --navy-10: #E9ECEF;
  --navy-15: #DEE2E7;
  --white: #FFFFFF;
  --border: #7E8A9D;      /* navy tint, 3:1 against white for button outlines */

  /* Rating colours: always shown with their word, never on their own */
  --strong: #3E7D5A;
  --somework: #C2570C;
  --priority: #A94442;

  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --radius: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--grey-dark);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: bold;
}
h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

/* Gold focus ring with a navy edge, so it shows on white and on navy */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--navy);
}
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.skip-link {
  position: absolute; left: 16px; top: -100px;
  background: var(--navy); color: var(--white); padding: 12px 16px; z-index: 10;
}
.skip-link:focus { top: 16px; }

[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
/* Narrow sections keep a comfortable line length but line up with the hero */
.narrow > * { max-width: 760px; }

/* ---------- Header and footer ---------- */

.site-header { border-bottom: 1px solid var(--grey-light); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
.logo { display: block; width: 170px; height: auto; }

.site-footer {
  border-top: 1px solid var(--grey-light);
  font-size: 15px;
  padding: 24px 0;
  text-align: center;
}
.site-footer p { margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--navy); color: var(--white); width: 100%; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--navy-dark); }
}

.link-button {
  background: none; border: 0; padding: 8px 0; min-height: 44px;
  font: inherit; font-size: 17px; color: var(--navy);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Landing: hero and form ---------- */

.hero { padding: 20px 0 40px; }
.hero-grid { display: grid; gap: 20px; }
.hero h1 { font-size: 32px; }
.subheading { font-size: 18px; }
/* Quick facts under the subheading: ticks that wrap onto new lines as needed */
.facts {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 16px; font-weight: 600; color: var(--navy);
}
.facts.ticks li { margin-bottom: 0; padding-left: 30px; }
.facts.ticks li::before { top: 4px; width: 8px; height: 14px; }

.form-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(37, 60, 98, 0.08);
}

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 18px;
  color: var(--grey-dark);
  background: var(--white);
}
.field input[aria-invalid="true"] { border-color: var(--priority); }
.field-error { color: var(--priority); font-size: 16px; font-weight: 600; margin: 6px 0 0; }

.checkbox-field { display: flex; gap: 12px; align-items: flex-start; }
.checkbox-field input { width: 24px; height: 24px; margin: 3px 0 0; flex: none; accent-color: var(--navy); }
.checkbox-field label { font-weight: 400; color: var(--grey-dark); font-size: 16px; margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 15px; margin: 14px 0 0; }

/* ---------- Landing: sections ---------- */

.section { padding: 48px 0; }
.section-tint { background: var(--navy-10); }

.get-grid { display: grid; gap: 32px; align-items: center; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 36px; margin-bottom: 12px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 6px;
  width: 9px; height: 16px;
  border: solid var(--navy); border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.factor-list { padding-left: 1.4em; margin: 0 0 1em; }
.factor-list li { margin-bottom: 10px; padding-left: 4px; }
.factor-list strong { color: var(--navy); }

.about { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.headshot { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex: none; }

.faq h3 { margin-top: 1.4em; }
.faq h3:first-child { margin-top: 0; }

.bottom-cta { text-align: center; background: var(--cream); }
.bottom-cta .narrow > * { margin-left: auto; margin-right: auto; }

/* Example results card */
.preview-card {
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  padding: 20px;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(37, 60, 98, 0.08);
}
.preview-tag {
  display: inline-block; margin: 0 0 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--grey-dark); background: var(--navy-10); padding: 2px 10px; border-radius: 999px;
}
.preview-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; margin-bottom: 12px; }
.preview-score .score-number { font-size: 56px; }
.preview-tier { font-family: var(--font-heading); font-size: 24px; font-weight: bold; color: var(--navy); }
.preview-rows { list-style: none; margin: 0; padding: 0; }
.preview-rows li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--grey-light); font-size: 16px;
}

/* ---------- Rating labels ---------- */

.pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.pill-strong { background: var(--strong); }
.pill-somework { background: var(--somework); }
.pill-priority { background: var(--priority); }

/* ---------- Question screens ---------- */

.quiz-wrap { max-width: 720px; padding-top: 20px; padding-bottom: 48px; }

.quiz-top {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px; margin-bottom: 16px;
}
.counter { margin: 0; font-size: 16px; font-weight: 600; color: var(--grey-dark); }
.quiz-top .counter:only-child { margin-left: auto; }

.section-label {
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--navy); margin: 0 0 8px;
}
.question { font-size: 24px; margin-bottom: 24px; }

.answers { display: grid; gap: 12px; margin: 0 0 20px; }
.answer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 64px;
  padding: 14px 18px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font: inherit; font-size: 19px; text-align: left; color: var(--grey-dark);
  cursor: pointer;
}
/* Hover only on devices with a mouse, so a tap doesn't leave the next
   question's button looking highlighted on a phone. */
@media (hover: hover) {
  .answer:hover { background: var(--navy-15); }
}
.answer[aria-pressed="true"] {
  background: var(--navy-15);
  border-color: var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.answer[aria-pressed="true"]::after {
  content: ""; flex: none;
  width: 9px; height: 17px; margin-right: 6px;
  border: solid var(--navy); border-width: 0 3px 3px 0;
  transform: rotate(45deg) translateY(-2px);
}

.helper { font-style: italic; font-size: 17px; margin: 0; }

/* Question 1 in the landing page card. Min height stops the page jumping while it loads. */
.question-card { min-height: 380px; }
.question-card .counter { margin-bottom: 12px; }
.question-card .question { font-size: 22px; }

/* Details screen */
.details-intro { font-size: 19px; margin-bottom: 20px; }

/* Optional questions */
.optional-group { border: 0; padding: 0; margin: 0 0 28px; }
.optional-group legend,
.optional-label {
  display: block; padding: 0;
  font-family: var(--font-heading); font-size: 22px; font-weight: bold; color: var(--navy);
  margin-bottom: 14px; line-height: 1.3;
}
.optional-tag {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--grey-dark);
  background: var(--navy-10); border-radius: 999px; padding: 2px 10px; margin-left: 8px;
  vertical-align: middle; white-space: nowrap;
}
.optional-group .answers { margin-bottom: 0; }
textarea { min-height: 140px; resize: vertical; margin-bottom: 24px; }

/* ---------- Results ---------- */

.results h1 { font-size: 30px; }
.results section { margin-top: 40px; }

.score-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 16px; margin: 8px 0 12px; }
.score-number { font-family: var(--font-heading); font-size: 76px; line-height: 1; font-weight: bold; color: var(--navy); }
.score-out-of { font-family: var(--font-heading); font-size: 28px; color: var(--grey-dark); margin-left: 2px; }
.tier-name { font-family: var(--font-heading); font-size: 30px; font-weight: bold; color: var(--navy); }

/* Score panel at the top of the results page */
.score-panel {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--navy);
  border-radius: 16px;
  padding: 28px 20px;
  margin: 20px 0 20px;
  text-align: center;
}
.score-ring { position: relative; width: 180px; height: 180px; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.15); stroke-width: 10; }
.ring-fill {
  fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round;
}
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-heading); line-height: 1;
}
.ring-number { font-size: 64px; font-weight: bold; color: var(--white); }
.ring-out-of { font-size: 20px; color: var(--cream); margin-top: 4px; }
.panel-tier {
  margin: 0;
  font-family: var(--font-heading); font-size: 30px; font-weight: bold; line-height: 1.2;
  color: var(--white);
}
.tier-explanation { font-size: 19px; }

/* The ring fills up when the results appear */
@media (prefers-reduced-motion: no-preference) {
  .ring-fill { animation: ring-fill 1.2s ease-out both; }
  @keyframes ring-fill { from { stroke-dashoffset: var(--ring-empty); } }
}

.factor-rows { list-style: none; padding: 0; margin: 0; }
.factor-row { padding: 18px 0; border-top: 1px solid var(--grey-light); }
.factor-row:last-child { border-bottom: 1px solid var(--grey-light); }
.factor-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.factor-name { font-weight: 700; color: var(--navy); font-size: 19px; margin: 0; }
.factor-row p { margin: 0; }

.focus-card {
  border-left: 5px solid var(--gold);
  background: var(--navy-10);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.cta-box {
  background: var(--navy-10);
  border-radius: 12px;
  padding: 24px 20px;
}
.cta-box .btn { margin-top: 4px; }

.bottom-cta-results {
  text-align: center;
  background: var(--cream);
  border-radius: 12px;
  padding: 28px 20px;
}
.email-note { font-weight: 600; color: var(--navy); margin-top: 28px; }

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  .btn-primary { width: auto; min-width: 280px; }
  .form-card .btn-primary { width: 100%; }
  .about { flex-direction: row; gap: 28px; }
  .score-panel { flex-direction: row; justify-content: flex-start; gap: 32px; padding: 28px 36px; text-align: left; }
  .panel-tier { font-size: 36px; }
  .question { font-size: 26px; }
}

@media (min-width: 900px) {
  h1, .hero h1 { font-size: 46px; }
  h2 { font-size: 32px; }
  .logo { width: 240px; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
  .subheading { font-size: 21px; }
  .form-card { padding: 28px; }
  .get-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .section { padding: 72px 0; }
  .results h1 { font-size: 36px; }
}

.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;
}
