/* Goyande house palette and type. Deep Navy, Agent Teal, Steel and Paper, set in
   Manrope, per the brand definition at github.com/gravesie/goyande-design.

   Written by hand and kept small on purpose: this application serves one flow to a
   prospect and has no theming to do. */

:root {
  --navy: #102A4C;
  --navy-light: #244570;
  --teal: #10B981;
  --teal-dark: #0D9668;
  --steel: #475569;
  --paper: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --font: 'Manrope', system-ui, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

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

.shell {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Masthead: a light surface with a brand rule beneath it rather than a navy bar, so the
   wordmark keeps its own colour and the page stays calm. */
.masthead {
  background: var(--surface);
  border-bottom: 3px solid var(--teal);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.wordmark {
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.wordmark-dot { color: var(--teal); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h1.question { font-size: 1.45rem; margin-bottom: 1.5rem; }

.lede { margin: 0 0 1rem; }

.meta {
  color: var(--steel);
  font-size: 0.95rem;
  margin: 1.25rem 0 0;
}

.area {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 0.5rem;
}

/* Progress */

.progress { margin-bottom: 1.75rem; }

.progress-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--steel);
  margin: 0 0 0.5rem;
}

/* A progress element rather than a filled div, because the content-security policy
   forbids inline styles and a style attribute carrying the width would be dropped.
   Styling one needs the vendor pseudo-elements: the bar is the track, the value is the
   fill, and Firefox names only the second. */

progress.progress-track {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  color: var(--teal);
}

progress.progress-track::-webkit-progress-bar {
  background: var(--border);
  border-radius: 999px;
}

progress.progress-track::-webkit-progress-value {
  background: var(--teal);
  border-radius: 999px;
}

progress.progress-track::-moz-progress-bar {
  background: var(--teal);
  border-radius: 999px;
}

/* Options: one click answers the question and moves on, so each option is its own
   submit button rather than a radio with a separate Next. */

.options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
}

.option {
  font: inherit;
  text-align: left;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
}

.option:hover,
.option:focus-visible {
  border-color: var(--teal);
  background: #F0FDF7;
}

.option-chosen {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

/* Buttons and links */

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--surface);
  background: var(--navy);
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  margin-top: 1.5rem;
  cursor: pointer;
  text-decoration: none;
}

.button:hover { background: var(--navy-light); }

a { color: var(--teal-dark); }

.back {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--steel);
  text-decoration: none;
}

.back:hover { text-decoration: underline; }

/* The context screen: the survey's unscored fields, then the free-text box */

.context-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.25rem;
}

.context-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--steel);
}

.context-field select,
.context-field input[type="text"] {
  width: 100%;
  font: inherit;
  color: var(--navy);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
}

.context-field select:focus-visible,
.context-field input:focus-visible { outline: 2px solid var(--teal); border-color: var(--teal); }

.free-text textarea {
  width: 100%;
  font: inherit;
  color: var(--navy);
  padding: 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  resize: vertical;
}

.free-text textarea:focus-visible { outline: 2px solid var(--teal); border-color: var(--teal); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The capture and profile forms */

.capture {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.capture label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--steel);
}

.capture label + input { margin-bottom: 0.75rem; }

.capture input[type="text"],
.capture input[type="email"] {
  width: 100%;
  font: inherit;
  color: var(--navy);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.capture input:focus-visible { outline: 2px solid var(--teal); border-color: var(--teal); }

.capture .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.5rem;
  color: var(--navy);
  font-weight: 400;
}

.capture .checkbox input { margin-top: 0.25rem; }

.capture .button { align-self: flex-start; }

/* The honeypot. Hidden by this class rather than by a style attribute, because the
   content-security policy forbids inline styles and drops one without saying so, which
   would put the field in front of every respondent. display:none rather than moving it
   off screen, on purpose: this one is meant to be invisible to everything human, and a
   screen reader should not read it out either. */

.trap { display: none; }

/* Small print and form messages */

.small {
  color: var(--steel);
  font-size: 0.85rem;
  margin: 1rem 0 0;
}

.disclaimer { font-size: 0.8rem; }

.form-error,
.form-note {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.form-error {
  color: #7F1D1D;
  background: #FEF2F2;
  border: 1px solid #FECACA;
}

.form-note {
  color: var(--teal-dark);
  background: #F0FDF7;
  border: 1px solid #A7F3D0;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.5rem;
}

/* The report page. The report's own headings are h2, under the page's one h1. */

.report h2:first-of-type { margin-top: 1.25rem; }

.report ul { padding-left: 1.3rem; }

.report li { margin-bottom: 0.4rem; }

.report hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0 1rem;
}

.report .button { margin-top: 0.5rem; }

/* Footer */

.footer {
  color: var(--steel);
  font-size: 0.85rem;
  margin: 2.5rem auto 3rem;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .card { padding: 1.35rem; }
  h1 { font-size: 1.4rem; }
  h1.question { font-size: 1.25rem; }
}
