/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--c-ink);
}
.screen-intro :focus-visible, .hero :focus-visible, .cta :focus-visible, .site-header :focus-visible {
  box-shadow: none;
}

main:focus { outline: none; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--c-yellow); color: var(--c-ink);
  padding: 12px 16px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

:root { --gutter: clamp(16px, 5vw, 88px); }

.wrap {
  width: 100%;
  max-width: calc(1224px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--narrow { max-width: calc(852px + 2 * var(--gutter)); }

/* ==========================================================================
   Type helpers
   ========================================================================== */

.display, .intro__headline, .question__text, .hero__headline, .section-title,
.report__headline, .cta__headline, .gap__title, .fix__headline, .stats strong,
.score__number, .btn {
  font-family: var(--font-display);
  font-stretch: var(--font-display-stretch);
  font-weight: 800;
}

.tag {
  display: inline-block;
  background: var(--c-yellow);
  color: var(--c-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  line-height: 1.4;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
}
.eyebrow--yellow { color: var(--c-yellow); }

.link-strong {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: text-decoration-color var(--dur-fast);
}
.link-strong:hover { text-decoration-color: var(--c-yellow); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header { background: var(--c-ink); color: var(--c-white); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 72px;
}
.screen-intro .site-header { background: transparent; }
.screen-intro .site-header__inner { min-height: 96px; }

@media (max-width: 480px) {
  .site-header__label { font-size: 0.625rem; letter-spacing: 0.12em; }
  .logo__word { font-size: 1.5rem; }
}

.logo {
  text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
}
.logo__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo__dot { color: var(--c-yellow); }

.site-header__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e6e6e6;
  text-align: right;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  --btn-shadow: var(--c-ink);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border: var(--border) solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast);
}

.btn--primary {
  background: var(--c-yellow);
  border-color: var(--c-yellow);
  box-shadow: 6px 6px 0 var(--btn-shadow);
}
.screen-intro .btn--primary, .cta .btn--primary { --btn-shadow: var(--c-white); }
.btn--primary:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--btn-shadow); }
.btn--primary:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--btn-shadow); }

.btn--lg { min-height: 64px; padding: 18px 38px; font-size: 1.1875rem; }

.btn--dark {
  background: var(--c-ink); color: var(--c-white);
  box-shadow: 0 0 0 var(--c-yellow);
}
.btn--dark:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--c-yellow); }
.btn--dark:active { transform: none; box-shadow: none; }
.btn--dark[aria-busy="true"] { cursor: progress; opacity: 0.85; }

.btn--block { width: 100%; }

/* Answer buttons */
.btn--answer {
  min-height: 72px;
  font-size: 1.3125rem;
  box-shadow: 0 0 0 var(--c-ink);
}
.btn--answer:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--c-ink); }
.btn--answer:active, .btn--answer.is-pressing { transform: translate(0, 0); box-shadow: 0 0 0 var(--c-ink); }
.btn--answer.is-selected { background: var(--c-yellow); }
.btn--answer.is-pressing { animation: press 280ms var(--ease-snap); }

@keyframes press {
  0% { transform: scale(1); }
  40% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  position: relative;
  background: var(--c-white);
  color: var(--c-ink);
}
.card--shadow-yellow { box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--c-yellow); }
.card--shadow-black { box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--c-ink); }

/* ==========================================================================
   Intro
   ========================================================================== */

.screen-intro { background: var(--c-ink); color: var(--c-white); }

.intro {
  display: grid;
  gap: 56px;
  padding-top: clamp(32px, 8vh, 110px);
  padding-bottom: 80px;
  align-items: center;
}
@media (min-width: 960px) {
  .intro { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 72px; }
}

.intro__headline {
  margin: 28px 0 28px;
  font-size: clamp(2.6rem, 6.2vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-wrap: balance;
}
.intro__subhead {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.55;
  color: #ececec;
  max-width: 36em;
}

.intro__start {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px;
  margin-top: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}
.intro__reassurance { color: #d6d6d6; font-size: 1rem; }

.stats { display: flex; flex-wrap: wrap; gap: 16px 36px; margin-top: 24px; }
.stats li { display: flex; flex-direction: column; }
.stats strong { color: var(--c-yellow); font-size: 2.25rem; line-height: 1.1; font-weight: 900; }
.stats span { color: #d6d6d6; font-size: 0.9375rem; }

.intro__card { padding: 36px 36px 28px; }
.checklist { display: grid; gap: 18px; }
.checklist li {
  position: relative;
  padding-left: 40px;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute; left: 4px; top: 5px;
  width: 16px; height: 9px;
  border-left: 2.5px solid var(--c-ink);
  border-bottom: 2.5px solid var(--c-ink);
  transform: rotate(-45deg);
}
.intro__card-footer {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted); font-size: 0.9375rem;
}

/* ==========================================================================
   Question
   ========================================================================== */

.question { padding-top: 44px; padding-bottom: 72px; }

.progress { margin-bottom: 40px; }
.progress__meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.progress__label {
  font-family: var(--font-display); font-weight: 800;
  font-size: 0.9375rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.progress__time { font-weight: 600; color: var(--c-muted); font-size: 0.9375rem; }
.progress__label, .progress__time { white-space: nowrap; }

@media (max-width: 639px) {
  :root { --shadow-offset: 8px; }
  .question { padding-top: 28px; }
  .progress { margin-bottom: 28px; }
  .progress__label, .progress__time { font-size: 0.8125rem; }
  .question__text { margin-bottom: 24px; }
  .btn--answer { min-height: 60px; }
  .why { margin-top: 24px; padding: 16px 18px; font-size: 0.9375rem; }
  .question__footer { margin-top: 28px; }
  .intro { padding-top: 24px; }
}

.progress__bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.progress__seg {
  position: relative;
  height: 8px;
  background: var(--c-line);
  overflow: hidden;
}
.progress__seg::after {
  content: "";
  position: absolute; inset: 0;
  transform-origin: left;
  transform: scaleX(0);
}
.progress__seg.is-done::after { background: var(--c-ink); transform: scaleX(1); }
.progress__seg.is-current::after { background: var(--c-yellow); transform: scaleX(1); }
.js .progress__seg.is-current::after { animation: seg-fill 520ms var(--ease-out) 120ms both; }

@keyframes seg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.question__card { padding: clamp(28px, 5vw, 52px); }

.question__text {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin-bottom: 36px;
  text-wrap: balance;
}

.answers { display: grid; gap: 14px; }
@media (min-width: 640px) { .answers { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

.why {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 36px;
  padding: 22px 26px;
  background: var(--c-panel);
  font-size: 1rem;
}
.why__icon { flex: none; margin-top: 1px; }

.question__footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 24px; margin-top: 40px;
}
.question__footer .link-strong { display: inline-flex; align-items: center; min-height: 44px; }
.question__privacy { color: var(--c-muted); font-size: 0.9375rem; }

/* ==========================================================================
   Results: hero
   ========================================================================== */

.hero { background: var(--c-ink); color: var(--c-white); padding: 40px 0 64px; }
.hero__inner { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; padding-top: 12px; }
}

.score__number {
  display: flex; align-items: baseline;
  line-height: 0.85;
  font-weight: 900;
  letter-spacing: -0.05em;
}
.score__value { font-size: clamp(6rem, 14vw, 8.5rem); font-variant-numeric: tabular-nums; }
.score__total { font-size: clamp(2.5rem, 5vw, 3.5rem); color: #9a9a9a; letter-spacing: -0.02em; }

.score__bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 28px; max-width: 306px; }
.score__seg { height: 10px; background: var(--c-score-off); }
.score__seg.is-on { background: var(--c-yellow); }

.hero__headline {
  margin: 20px 0 16px;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-wrap: balance;
}
.hero__supporting { font-size: 1.1875rem; color: #ececec; max-width: 40em; }

.tally { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 24px; color: #e2e2e2; }
.tally strong { font-family: var(--font-display); font-size: 1.375rem; color: var(--c-white); margin-right: 4px; }

/* ==========================================================================
   Results: body
   ========================================================================== */

.results {
  display: grid;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 96px;
  grid-template-areas: "main" "side" "cta";
}
@media (min-width: 960px) {
  .results {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    grid-template-areas: "main side" "cta side";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
  }
  .results__side { position: sticky; top: 24px; align-self: start; }
}
.results__main { grid-area: main; display: grid; gap: 40px; align-content: start; }
.results__side { grid-area: side; }
.results__cta { grid-area: cta; }

.gap {
  display: flex; gap: 20px;
  padding: 26px 30px;
  border: var(--border) solid var(--c-ink);
  background: var(--c-white);
}
.gap__icon { flex: none; margin-top: 2px; }
.gap__title { font-size: 1.625rem; letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.15; }

.section-title { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.03em; font-weight: 900; margin-bottom: 28px; }

.fix-list { display: grid; gap: 18px; }
.fix { background: var(--c-white); padding: 28px 30px 30px; }
.fix__meta { display: flex; align-items: center; gap: 14px; color: var(--c-muted); font-size: 0.9375rem; margin-bottom: 10px; }
.fix__headline { font-size: 1.3125rem; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 8px; font-stretch: 100%; }
.fix__body { line-height: 1.65; }

.badge {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; line-height: 1.4;
}
.badge--no { background: var(--c-yellow); color: var(--c-ink); }
.badge--dont_know { background: var(--c-ink); color: var(--c-white); }
.badge--yes { background: var(--c-line); color: var(--c-ink); }

.more-fixes { margin-top: 22px; }
.more-fixes summary {
  display: inline-flex; align-items: center; min-height: 44px;
  list-style: none;
}
.more-fixes summary::-webkit-details-marker { display: none; }
.more-fixes__hide, .more-fixes[open] .more-fixes__show { display: none; }
.more-fixes[open] .more-fixes__hide { display: inline; }
.more-fixes__body { padding-top: 18px; overflow: hidden; }
.more-fixes__body .fix { animation: none; }

.cta {
  display: grid; gap: 28px; align-items: center;
  background: var(--c-ink); color: var(--c-white);
  padding: clamp(28px, 5vw, 44px);
}
.results__cta { container-type: inline-size; }
@container (min-width: 600px) { .cta { grid-template-columns: minmax(0, 1fr) auto; gap: 36px; } }
.cta .eyebrow { margin-bottom: 10px; }
.cta__headline { font-size: clamp(1.625rem, 3vw, 2.125rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 900; margin-bottom: 16px; }
.cta__body { color: #e6e6e6; }
.cta__btn { justify-self: start; }

.restart { margin-top: 28px; font-size: 0.9375rem; color: var(--c-muted); }
.restart a { display: inline-flex; min-height: 44px; align-items: center; }

/* ==========================================================================
   Report form
   ========================================================================== */

.report { padding: 36px 36px 28px; scroll-margin-top: 24px; }
.report:focus { outline: none; }
.report__headline { font-size: 1.75rem; letter-spacing: -0.025em; font-weight: 900; margin-bottom: 12px; }
.report__intro { color: #333; margin-bottom: 24px; font-size: 1rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="url"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--c-ink);
  border-radius: 0;
  background: var(--c-white);
  font-size: 1.0625rem; /* ≥16px stops iOS zooming */
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus-visible { outline: none; box-shadow: 5px 5px 0 var(--c-yellow); transform: translate(-2px, -2px); }
.field.has-error input { border-color: var(--c-error); }
.field__error { color: var(--c-error); font-size: 0.9375rem; font-weight: 600; margin-top: 6px; }
.field__error:empty, .form-error:empty { display: none; }
.form-error { color: var(--c-error); font-weight: 600; margin-bottom: 16px; }

.field--check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; margin: 22px 0; }
.field--check label { font-weight: 400; font-size: 0.9375rem; color: #333; margin: 0; padding-top: 2px; }
.field--check .field__error { grid-column: 2; margin: 0; }
.field--check input {
  width: 24px; height: 24px; margin: 0;
  accent-color: var(--c-ink);
  cursor: pointer;
}
/* Enlarge the tap area of the checkbox without changing its look */
.field--check { position: relative; }
.field--check label { cursor: pointer; min-height: 28px; }

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

.report__boss { text-align: center; margin-top: 22px; display: grid; gap: 2px; justify-items: center; }
.report__boss .link-strong { display: inline-flex; align-items: center; min-height: 44px; }
.report__boss-hint { font-size: 0.8125rem; color: var(--c-muted); }
.report__reassurance {
  text-align: center; color: var(--c-muted); font-size: 0.9375rem;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--c-line);
}

.report-sent { text-align: center; padding: 8px 0 4px; }
.report-sent__tick { margin: 0 auto 18px; color: var(--c-ink); }
.report-sent__tick circle { stroke-dasharray: 151; stroke-dashoffset: 0; }
.report-sent__tick path { stroke-dasharray: 40; stroke-dashoffset: 0; }
.js .report-sent.is-new .report-sent__tick circle { animation: draw-circle 600ms var(--ease-out) both; }
.js .report-sent.is-new .report-sent__tick path { animation: draw-tick 380ms var(--ease-out) 480ms both; }
.report-sent p { color: #333; }

@keyframes draw-circle { from { stroke-dashoffset: 151; } }
@keyframes draw-tick { from { stroke-dashoffset: 40; } }

/* ==========================================================================
   Not found
   ========================================================================== */

.not-found { padding-top: 72px; padding-bottom: 96px; display: grid; gap: 20px; justify-items: start; }

/* ==========================================================================
   Motion
   All entrance motion is gated on .js so a no-JS visitor sees everything.
   ========================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  0% { opacity: 0; transform: translateX(40px); box-shadow: 0 0 0 var(--c-yellow); }
  60% { opacity: 1; transform: none; box-shadow: 0 0 0 var(--c-yellow); }
  100% { opacity: 1; transform: none; box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--c-yellow); }
}
@keyframes seg-on {
  0% { background: var(--c-score-off); transform: scaleY(1); }
  50% { transform: scaleY(1.8); }
  100% { background: var(--c-yellow); transform: scaleY(1); }
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.8) rotate(-6deg); }
  70% { opacity: 1; transform: scale(0.94) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}

.js .anim-in {
  animation: rise var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}
.js .anim-card { animation: card-in 900ms var(--ease-out) 260ms both; }

/* Results hero choreography: segments fill, then the band stamps in. */
.js .score__seg.is-on {
  animation: seg-on 360ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}
.js .hero .tag--stamp {
  animation: stamp 520ms var(--ease-snap) both;
  animation-delay: calc(var(--score, 0) * 90ms + 420ms);
}
.js .hero .anim-in { animation-delay: calc(var(--score, 0) * 90ms + 560ms + var(--i, 0) * 90ms); }

/* Scroll reveals */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Page-swap overlay shown briefly before results */
.calculating {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--c-ink); color: var(--c-white);
  font-family: var(--font-display); font-stretch: var(--font-display-stretch);
  font-weight: 800; font-size: 1.375rem;
}
.calculating__bar { width: 220px; height: 8px; background: var(--c-score-off); overflow: hidden; }
.calculating__bar span {
  display: block; height: 100%; background: var(--c-yellow);
  transform-origin: left; animation: seg-fill 700ms var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
