/* Public AI Readiness Survey — brand lane.
   Load after /static/fwf-design-system/fwf-tokens/tokens.css.
   Expects data-theme="light" on html/body, and data-theme="dark" on .survey-header.
   Wonder Unit paths here override the tokens.css ./fonts/ copies that 404 in fwf-apps. */

@font-face {
  font-family: 'Wonder Unit Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/WonderUnitSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Wonder Unit Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/WonderUnitSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Wonder Unit Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/WonderUnitSans-Semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'Wonder Unit Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/WonderUnitSans-Bold.woff2') format('woff2');
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body-size);
  font-weight: var(--t-body-weight);
  line-height: var(--t-body-lh);
  color: var(--ink);
  background-color: var(--surface-subtle);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: var(--accent-calm);
  text-decoration: underline;
}

a:hover {
  color: var(--accent-calm-hover);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Step headings take focus so screen readers land on the new question; they aren't controls. */
[data-step-title]:focus,
[data-step-title]:focus-visible,
[role="alert"]:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Skip + SR */

.skip-link,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus-visible {
  position: fixed;
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 5;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  font-weight: 700;
  line-height: var(--t-body-sm-lh);
  text-decoration: none;
  box-shadow: var(--focus-ring);
}

/* Shell */

/* One page composition in both themes: the brand surface gradient under a warm
   corner glow. Dark on the cover (navy ramp, the fwf-web layout), light on the
   questions (white to pale sky, a faint glow), so the handover changes the
   lighting rather than the page. */
.survey-shell {
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--surface-subtle);
  background-image: var(--ambient-glow), var(--surface-gradient);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.survey-shell[data-theme="dark"] {
  background-color: var(--surface);
}

/* Second tone of the heading: the pale sky tint, so it reads as a shift in the
   same voice rather than a second colour competing with the white. */
.survey-header h1 .title-accent {
  color: var(--fwf-sky60);
}

.survey-header {
  padding: var(--s-5) var(--page-pad) var(--s-6);
}

/* Cover hero: logo and motif share a slim brand row at the same scale as the step header,
   so the headline and lede carry the weight and nothing jumps size after Get started. */
.survey-header.survey-header--full[data-theme="dark"] {
  padding-block: var(--s-5) var(--s-6);
  background-color: transparent;
}

.survey-header[data-theme="dark"] {
  /* Line the header content up with the 48rem survey column below it. */
  padding-inline: max(var(--page-pad), calc((100% - 48rem) / 2 + var(--page-pad)));
  background-color: var(--surface);
  background-image: url('/static/fwf-design-system/signatures/motif-formation.svg');
  background-repeat: no-repeat;
  background-position: right max(var(--page-pad), calc((100% - 48rem) / 2 + var(--page-pad))) top calc(var(--s-5) - 0.375rem);
  background-size: auto 3rem;
  color: var(--ink);
}

.survey-header h1,
.survey-header > p:not(.eyebrow) {
  width: min(100%, 48rem);
}

.survey-logo-link {
  display: inline-block;
  margin: 0 0 var(--s-7);
  border-radius: 0.25rem;
}

.survey-logo {
  display: block;
  height: 1.75rem;
  width: auto;
  margin: 0;
}

/* Marketing-page header device: sky eyebrow, matching the fwf-web page pattern. */
.survey-header[data-theme="dark"] .eyebrow {
  color: var(--accent-calm);
}

.survey-header h1 {
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-sans);
  font-size: var(--t-h1-size);
  font-weight: var(--t-h1-weight);
  line-height: var(--t-h1-lh);
  letter-spacing: var(--t-h1-tracking);
  color: var(--ink);
}

.survey-header > p:not(.eyebrow) {
  margin: var(--s-4) 0 0;
  max-width: 36rem;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  font-weight: var(--t-body-weight);
  line-height: 1.5;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* Logistics note under the lede: body size, secondary ink, so it reads as a plain line. */
.survey-header > p.tagline-note {
  margin-top: var(--s-3);
  font-size: var(--t-body-size);
  line-height: var(--t-body-lh);
}

/* Compact header on question steps: the cover carries the full hero, every step after
   it keeps the logo and a short title so the question sits near the top of the viewport. */

/* Question steps keep the header on the light page: no band, dark-ink logo, lined up
   with the 48rem question column. */
/* Compact header: logo left, page title centred on its own, a spacer on the right so the
   title sits on the true centre line rather than beside the logo. */
.survey-header.survey-header--compact {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-5) var(--s-4);
  padding-inline: max(var(--page-pad), calc((100% - 48rem) / 2 + var(--page-pad)));
  background: transparent;
}

.survey-header--compact .survey-logo-link {
  margin: 0;
}

.survey-header--compact .survey-logo {
  height: 1.75rem;
  margin: 0;
}

.survey-header--compact .survey-logo-link {
  justify-self: start;
}

.survey-header.survey-header--compact > .survey-header-title {
  margin: 0;
  width: auto;
  justify-self: center;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

@media (max-width: 40rem) {
  .survey-header.survey-header--compact {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.survey-main {
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: var(--s-5) var(--page-pad) var(--s-8);
}

.survey-main:has(.profile-page) {
  width: min(100%, 60rem);
}

/* The public profile stays on the same column as the header and questions. */
.survey-main:has(.profile-card--public) {
  width: min(100%, 48rem);
}

/* Type roles */

.eyebrow {
  margin: 0 0 var(--s-3);
  font-family: var(--font-sans);
  font-size: var(--t-eyebrow-size);
  font-weight: var(--t-eyebrow-weight);
  line-height: var(--t-eyebrow-lh);
  letter-spacing: var(--t-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--ink);
}

.question-title {
  margin: 0 0 var(--s-3);
  font-family: var(--font-sans);
  font-size: var(--t-h3-size);
  font-weight: var(--t-h3-weight);
  line-height: var(--t-h3-lh);
  color: var(--ink);
}

.hint {
  margin: 0 0 var(--s-5);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  font-weight: var(--t-body-weight);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-secondary);
}

.copy-block {
  display: grid;
  gap: var(--s-4);
  color: var(--ink-secondary);
}

.copy-block p {
  margin: 0;
}

.copy-block b {
  color: var(--ink);
  font-weight: 700;
}

/* Public cover reads as an open marketing section, not a card: no surface chrome,
   spacing and type carry the structure. */
.cover-panel {
  padding-block: 0 var(--s-5);
}

/* What to expect: the design system's proof row. Mono numbers in ink, labels in
   secondary ink, one hairline above. Three facts the eye can take in before reading. */
.cover-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-6);
  padding: 0;
  list-style: none;
}

.cover-fact-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cover-fact-label {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-secondary);
  text-wrap: balance;
}

/* Consent: the design system's choice control. A visually hidden native input keeps
   keyboard and screen-reader behaviour; the drawn box takes the calm accent when
   checked, with the tick in the paired on-calm ink. No card around it. */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin-top: var(--s-5);
  cursor: pointer;
  color: var(--ink-secondary);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.check > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.check .box {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.0625rem;
  border: 1px solid var(--ink-subtle);
  border-radius: var(--r-xs);
  background: var(--surface-raised);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.check .box::after {
  content: '';
  width: 0.3rem;
  height: 0.6rem;
  margin-bottom: 2px;
  border: solid var(--accent-calm-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease);
}

.check:hover .box {
  border-color: var(--ink);
}

.check > input:checked + .box {
  background: var(--accent-calm);
  border-color: var(--accent-calm);
}

.check > input:checked + .box::after {
  transform: rotate(45deg) scale(1);
}

.check > input:focus-visible + .box {
  box-shadow: var(--focus-ring);
}

.check:has(> input:checked) {
  color: var(--ink);
}

.cover-panel .actions {
  margin-top: var(--s-5);
}

/* Hero CTA: the one pill on the page. Neutral solid, so it stays ink on navy, and it
   lights up sky on hover per the locked hero-button spec in the design system. */
.survey-shell .primary-btn--hero {
  min-height: var(--tap);
  padding: 0.8125rem var(--s-6);
  border-radius: var(--r-pill);
  font-size: var(--t-body-size);
  line-height: 1;
  transition:
    transform var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.survey-shell .primary-btn--hero:hover:not(:disabled) {
  background: var(--fwf-sky20);
  color: var(--fwf-navy);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.34), 0 0 38px rgb(var(--fwf-sky-rgb) / 0.55);
}

.survey-shell .primary-btn--hero:active:not(:disabled) {
  background: var(--fwf-sky20);
  color: var(--fwf-navy);
  transform: translateY(1px) scale(0.965);
  box-shadow: inset 0 4px 12px rgb(var(--fwf-navy-rgb) / 0.4), inset 0 1px 2px rgb(var(--fwf-navy-rgb) / 0.3);
}

.survey-shell .primary-btn--hero:focus-visible {
  border-radius: var(--r-pill);
}

/* Public cover hierarchy: one lead carries the story, one support line carries the
   reward, and a fine-print line above consent carries privacy and honesty. */
.cover-lead {
  max-width: 40rem;
  margin: 0 0 var(--s-4);
  font-family: var(--font-sans);
  font-size: var(--t-h3-size);
  font-weight: var(--t-h3-weight);
  line-height: var(--t-h3-lh);
  color: var(--ink);
  text-wrap: pretty;
}

.cover-support {
  max-width: 40rem;
  margin: 0 0 var(--s-4);
  color: var(--ink-secondary);
}

.cover-fine {
  max-width: 40rem;
  margin: var(--s-4) 0 0;
  color: var(--ink-secondary);
}

.cover-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-4);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.cover-links details {
  flex-basis: 100%;
}

/* The disclosure is a control, not a link: secondary ink, no underline, a chevron
   that turns when open. Only the privacy link stays sky. */
.cover-links summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  width: fit-content;
  color: var(--ink-secondary);
  cursor: pointer;
  list-style: none;
}

.cover-links summary::-webkit-details-marker {
  display: none;
}

.cover-links summary::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease);
}

.cover-links details[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.cover-links summary:hover {
  color: var(--ink);
}

.cover-links details p {
  max-width: 60ch;
  margin: var(--s-2) 0 0;
  color: var(--ink-secondary);
}

.cover-links a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.label {
  font-family: var(--font-body);
  font-size: var(--t-label-size);
  font-weight: var(--t-label-weight);
  line-height: var(--t-label-lh);
  color: var(--ink-secondary);
}

.meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-data-size);
  font-weight: var(--t-data-weight);
  line-height: var(--t-data-lh);
  color: var(--ink-subtle);
}

/* Surfaces */

/* Question steps sit open on the page, like the cover: the answer options carry the
   only outlines. The profile card keeps its surface. */
.panel {
  padding: 0;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
}

/* Arriving from the cover: the first step fades up once so the change of lighting
   reads as a transition, not a cut. */
.survey-main.is-arriving #survey-stage,
.survey-main.is-arriving #survey-progress-slot {
  animation: survey-arrive var(--dur-slow) var(--ease) both;
}

@keyframes survey-arrive {
  from {
    opacity: 0;
    transform: translateY(var(--s-2));
  }
}

.field-stack,
.option-list {
  display: grid;
  gap: var(--s-3);
}

/* Journey: one segment per section (about you, questions, last one), sized by step count.
   Ink structure, not yellow. Fill animates on transform so it never touches layout. */

.journey {
  margin: 0 0 var(--s-4);
}

.journey-label {
  margin: 0 0 var(--s-2);
  font-family: var(--font-body);
  font-size: var(--t-label-size);
  font-weight: var(--t-label-weight);
  line-height: var(--t-label-lh);
  color: var(--ink-secondary);
}

.journey-track {
  display: flex;
  gap: var(--s-1);
}

.journey-segment {
  flex-basis: 0;
  height: var(--s-1);
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}

.journey-segment i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
  transition: transform var(--dur-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fields */

.text-field,
.select-field,
.text-area {
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}

.text-field::placeholder,
.select-field::placeholder,
.text-area::placeholder {
  color: var(--ink-subtle);
}

.text-area {
  min-height: 8rem;
  resize: vertical;
  line-height: var(--t-body-lh);
}

.text-field:hover,
.select-field:hover,
.text-area:hover {
  border-color: var(--line-subtle);
}

.text-field:focus,
.text-field:focus-visible,
.select-field:focus,
.select-field:focus-visible,
.text-area:focus,
.text-area:focus-visible {
  outline: none;
  border-color: var(--focus-input);
  box-shadow: inset 0 0 0 1px var(--focus-input);
}

/* Likert / choice */

.option {
  display: grid;
  grid-template-columns: var(--icon-lg) 1fr;
  gap: var(--s-3);
  align-items: center;
  min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--t-body-size);
  font-weight: var(--t-body-weight);
  line-height: var(--t-body-lh);
}

.option input {
  width: var(--icon-md);
  height: var(--icon-md);
  margin: 0;
  accent-color: var(--ink);
}

.option b {
  display: block;
  margin-bottom: var(--s-1);
  color: var(--ink);
  font-weight: 700;
}

.option-button {
  width: 100%;
  cursor: pointer;
}

.option-button:hover {
  border-color: var(--ink);
  background: var(--surface-subtle);
}

.option-button:focus-visible,
.option:focus-visible {
  border-radius: var(--r-md);
  box-shadow: var(--focus-ring);
}

.option-button:has(.option-key) {
  grid-template-columns: var(--icon-lg) 1fr auto;
}

.option-key {
  min-width: var(--icon-md);
  padding: 0 var(--s-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: var(--t-label-size);
  line-height: var(--t-label-lh);
  text-align: center;
  color: var(--ink-subtle);
}

.option.is-selected .option-key {
  border-color: var(--ink);
  color: var(--ink);
}

/* Key hints only where a keyboard is likely. */
@media (hover: none), (pointer: coarse), (max-width: 37.49em) {
  .option-key,
  .kbd-hint {
    display: none;
  }

  .option-button:has(.option-key) {
    grid-template-columns: var(--icon-lg) 1fr;
  }
}

.consent-option {
  margin-top: var(--s-5);
  background: var(--surface-subtle);
}

.consent-option span {
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.cover-panel .status {
  margin: var(--s-5) 0 0;
}

.option-dot {
  width: var(--icon-md);
  height: var(--icon-md);
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.option.is-selected,
.option:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface-subtle);
}

.option.is-selected .option-dot {
  border-color: var(--accent-mark);
  background: var(--accent-mark);
}

/* NPS */

.nps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
}

.nps-grid .option,
.nps-option {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nps-option.is-selected {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

.nps-anchors {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-2);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-subtle);
}

/* Actions */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-top: var(--s-5);
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--s-5);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  font-weight: 700;
  line-height: var(--t-body-sm-lh);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

.primary-btn {
  background: var(--ink);
  color: var(--surface);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible {
  border-radius: var(--r-sm);
  box-shadow: var(--focus-ring);
}

.secondary-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.secondary-btn:hover:not(:disabled) {
  background: var(--surface-subtle);
}

/* Status — orange is warning only, outline first, never a fill behind text */

.status {
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.status.error {
  border-color: var(--accent-urgent);
  background: var(--surface);
  color: var(--accent-urgent);
}

/* Loading */

.loading-dots {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  padding: var(--s-7) 0 var(--s-5);
}

.loading-dots span {
  width: var(--s-3);
  height: var(--s-3);
  border-radius: 50%;
  background: var(--ink);
  animation: survey-pulse var(--dur-slow) var(--ease) infinite alternate;
}

.loading-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes survey-pulse {
  from {
    transform: translateY(var(--s-1));
    opacity: 0.45;
  }
  to {
    transform: translateY(calc(var(--s-1) * -1));
    opacity: 1;
  }
}

/* Profile */

.profile-page {
  max-width: 60rem;
  margin: 0 auto;
}

.profile-top {
  display: grid;
  gap: var(--s-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-5);
}

.profile-page h1,
.profile-card h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-h1-size);
  font-weight: var(--t-h1-weight);
  line-height: var(--t-h1-lh);
  letter-spacing: var(--t-h1-tracking);
  color: var(--ink);
}

.headline {
  margin: 0 0 var(--s-6);
  font-family: var(--font-sans);
  font-size: var(--t-h2-size);
  font-weight: var(--t-h2-weight);
  line-height: var(--t-h2-lh);
  letter-spacing: var(--t-h2-tracking);
  color: var(--ink);
}

.factor-list {
  display: grid;
  gap: var(--s-4);
  margin: var(--s-5) 0 var(--s-6);
}

.factor-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  align-items: center;
}

.factor-row b {
  color: var(--ink);
}

.factor-row > b {
  font-family: var(--font-mono);
  font-size: var(--t-data-size);
  font-weight: var(--t-data-weight);
  line-height: var(--t-data-lh);
}

.factor-row small {
  display: block;
  margin-top: var(--s-1);
  color: var(--ink-subtle);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.factor-track {
  height: var(--s-3);
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--surface-muted);
}

.factor-track span {
  display: block;
  width: calc(var(--score) * 20%);
  height: 100%;
  background: var(--ink);
}

.section-rule {
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  margin-top: var(--s-6);
}

.insight-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.insight-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  padding: var(--s-4);
}

.insight-item b {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
}

.insight-item p {
  margin: var(--s-2) 0;
  color: var(--ink-secondary);
}

.insight-item small {
  color: var(--ink-subtle);
  line-height: var(--t-body-sm-lh);
}

.prompt-block {
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  margin-top: var(--s-5);
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-label-size);
  font-weight: var(--t-label-weight);
  line-height: var(--t-label-lh);
}

.prompt-head span:last-child {
  font-family: var(--font-mono);
  font-size: var(--t-data-size);
  font-weight: var(--t-data-weight);
  line-height: var(--t-data-lh);
}

.prompt-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-top: var(--s-4);
}

.prompt-columns h4 {
  margin: 0 0 var(--s-2);
  font-family: var(--font-sans);
  font-size: var(--t-h3-size);
  font-weight: var(--t-h3-weight);
  line-height: var(--t-h3-lh);
  color: var(--ink);
}

.prompt-columns p,
.profile-card p {
  color: var(--ink-secondary);
  line-height: var(--t-body-lh);
}

.leadership-note {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  background: var(--surface);
}

.leadership-note::before {
  content: '';
  display: block;
  width: var(--s-2);
  height: var(--s-2);
  margin-bottom: var(--s-3);
  border-radius: 50%;
  background: var(--accent-mark);
}

.leadership-note p:last-child {
  margin: var(--s-2) 0 0;
}

.footer-note {
  color: var(--ink-subtle);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.followup-panel {
  margin-top: var(--s-8);
}

/* Public profile */

/* The profile sits open on the light page like the questions: no card, the section
   rules and type carry the structure. */
.profile-card.profile-card--public {
  display: grid;
  gap: var(--s-7);
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-card .profile-intro .profile-headline {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1.75rem, 1.45rem + 1.2vw, 2.375rem);
  line-height: 1.15;
  text-wrap: balance;
}

/* Kicker takes the brand eyebrow, the same device that opens the cover. */
/* The kicker is the design-system eyebrow. Re-assert the token bundle here because
   .profile-card p sets body colour and line-height on every paragraph in the card. */
.profile-card p.profile-kicker {
  margin: 0 0 var(--s-3);
  font-size: var(--t-eyebrow-size);
  line-height: var(--t-eyebrow-lh);
  color: var(--ink);
}

.profile-card--public .profile-summary {
  max-width: 40rem;
  margin: var(--s-4) 0 0;
  color: var(--ink-secondary);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.profile-h2 {
  margin: 0 0 var(--s-2);
  font-family: var(--font-sans);
  font-size: var(--t-h2-size);
  font-weight: var(--t-h2-weight);
  line-height: var(--t-h2-lh);
  color: var(--ink);
}

.profile-note {
  max-width: 40rem;
  margin: 0 0 var(--s-5);
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
}

.profile-section {
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
}

/* Scores: open rows separated by rules, not boxed cards. */

.score-list {
  display: grid;
}

.score-row {
  display: grid;
  gap: var(--s-2);
  padding-block: var(--s-4);
}

.score-row:first-child {
  padding-top: 0;
}

.score-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
}

.score-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.profile-card .score-value {
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
}

.score-value {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* Band follows the FWFA Badge (label) recipe: outline only, no fill, micro uppercase.
   Neutral bands take the soft outline; positive bands carry status green on the border.
   The label stays ink because green text on white fails contrast. */
.score-band {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: transparent;
  font-size: var(--t-eyebrow-size);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.is-positive .score-band {
  border-color: var(--status-low-fill);
  color: var(--ink);
}

.is-positive .score-track span {
  background: var(--status-low-fill);
}

.profile-card .score-description {
  margin: 0;
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-subtle);
}

/* Track shows the 1 to 5 scale as five equal steps behind the fill. */
.score-track {
  position: relative;
  height: 0.625rem;
  margin-block: var(--s-1);
  overflow: hidden;
  border-radius: var(--r-pill);
  background:
    linear-gradient(90deg, transparent calc(20% - 1px), var(--surface) calc(20% - 1px), var(--surface) 20%, transparent 20%) 0 0 / 100% 100%,
    linear-gradient(90deg, transparent calc(40% - 1px), var(--surface) calc(40% - 1px), var(--surface) 40%, transparent 40%) 0 0 / 100% 100%,
    linear-gradient(90deg, transparent calc(60% - 1px), var(--surface) calc(60% - 1px), var(--surface) 60%, transparent 60%) 0 0 / 100% 100%,
    linear-gradient(90deg, transparent calc(80% - 1px), var(--surface) calc(80% - 1px), var(--surface) 80%, transparent 80%) 0 0 / 100% 100%,
    var(--surface-muted);
}

.score-track span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(var(--score, 0));
  transform-origin: left center;
}

.is-entering .score-track span {
  animation: score-grow 900ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 90ms + 150ms);
}

@keyframes score-grow {
  from {
    transform: scaleX(0);
  }
}

.profile-card .score-reading {
  max-width: 40rem;
  margin: var(--s-1) 0 0;
  color: var(--ink);
}

.profile-card .score-watch {
  max-width: 40rem;
  margin: 0;
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-secondary);
}

/* Three things to try: a real sequence, so numbered. */

.step-list {
  display: grid;
  gap: var(--s-6);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}

/* Step index follows the design system's process-stage mark: large mono numeral with a
   hairline tick, stepping down the ink ramp. Order is carried by number, not hue. */
.step-number {
  display: block;
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.step-number::after {
  content: '';
  display: block;
  width: 1.75rem;
  height: 2px;
  margin-top: var(--s-2);
  border-radius: var(--r-pill);
  background: currentColor;
}

.step-item:nth-child(2) .step-number {
  color: var(--ink-secondary);
}

.step-item:nth-child(n + 3) .step-number {
  color: var(--ink-subtle);
}

.step-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.profile-card .step-meta {
  margin: var(--s-1) 0 0;
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-subtle);
}

.step-columns {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-4);
}

.step-columns h4 {
  margin: 0 0 var(--s-1);
  font-family: var(--font-body);
  font-size: var(--t-body-sm-size);
  font-weight: 700;
  line-height: var(--t-body-sm-lh);
  color: var(--ink);
}

.profile-card .step-columns p {
  margin: 0;
}

/* Shareable leadership note */

/* The takeaway echoes the cover: same navy ramp and warm corner glow, so the page
   ends where it started. */
.share-band {
  margin-top: var(--s-8);
  padding: var(--s-6) var(--s-5);
  border-radius: var(--r-md);
  background-color: var(--surface);
  background-image: var(--ambient-glow), var(--surface-gradient);
  background-repeat: no-repeat;
  color: var(--ink);
}

/* Save as PDF is the quiet second action beside the hero pill: text, not a second shape. */
.share-band .secondary-btn {
  border: 0;
  padding-inline: var(--s-3);
  color: var(--ink-secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}

.share-band .secondary-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--ink);
  text-decoration-color: currentColor;
}

.share-band .profile-h2 {
  margin-bottom: var(--s-4);
}

.share-note {
  max-width: 40rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.share-note-rest {
  max-width: 40rem;
  margin: var(--s-3) 0 0;
  color: var(--ink);
  text-wrap: pretty;
}

.share-starter {
  max-width: 40rem;
  margin: var(--s-4) 0 0;
  color: var(--ink-secondary);
}

.share-band .actions {
  margin-top: var(--s-5);
}

.share-footer {
  margin: var(--s-5) 0 0;
  font-size: var(--t-body-sm-size);
  line-height: var(--t-body-sm-lh);
  color: var(--ink-subtle);
}

.followup-panel .option {
  margin-top: var(--s-4);
}

.followup-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--s-3);
}

.followup-form .field-stack {
  flex: 1 1 16rem;
}

.followup-form .primary-btn {
  min-height: var(--tap);
}

/* Breakpoints — 37.5em = 600px, 48em = 768px */

@media (min-width: 37.5em) {
  .primary-btn,
  .secondary-btn {
    min-height: 0;
    padding: var(--s-3) var(--s-5);
  }

  .nps-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .factor-row {
    grid-template-columns: minmax(8rem, 11rem) 1fr auto;
    gap: var(--s-4);
  }

  .profile-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--s-5);
  }

  .insight-list,
  .prompt-columns,
  .step-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 48em) {
  .profile-card {
    padding: var(--s-6);
  }

  .share-band {
    padding: var(--s-7);
  }

  .nps-grid {
    grid-template-columns: repeat(11, minmax(0, 1fr));
  }
}

@media (max-width: 37.49em) {
  .survey-header--full[data-theme="dark"] {
    padding-block-end: var(--s-5);
  }

  .cover-facts {
    gap: var(--s-4) var(--s-3);
    margin-bottom: var(--s-5);
  }

  .survey-header--full .survey-logo-link {
    margin-bottom: var(--s-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-segment i,
  .primary-btn,
  .secondary-btn,
  .check .box,
  .check .box::after,
  .survey-main.is-arriving #survey-stage,
  .survey-main.is-arriving #survey-progress-slot,
  .loading-dots span {
    transition: none;
    animation: none;
  }

  .primary-btn:hover:not(:disabled),
  .survey-shell .primary-btn--hero:active:not(:disabled) {
    transform: none;
  }

  .score-track span {
    animation: none;
  }
}

@media print {
  body,
  .survey-shell,
  .survey-main {
    background: var(--surface);
  }

  .survey-header,
  .journey,
  .actions,
  .skip-link,
  .followup-panel {
    display: none !important;
  }

  .survey-shell,
  .survey-main {
    display: block;
    min-height: 0;
    width: 100%;
    padding: 0;
  }

  .profile-page {
    padding: 0;
    max-width: none;
  }

  .profile-card,
  .panel {
    border: 0;
    padding: 0;
  }

  .score-track span {
    animation: none;
  }

  .share-band {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    break-inside: avoid;
  }

  .step-item,
  .score-row {
    break-inside: avoid;
  }

  .score-band,
  .score-track {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
