/* ============================================================
   NovusConfido — Growth Assessment
   page-growth-assessment.php · requires tokens.css and home.css

   WHY THIS IS A SEPARATE FILE. CLAUDE.md says new CSS is appended
   to the existing files. This is a deliberate exception, recorded
   in functions.php too: home.css is already 72KB and loads on
   every coded page, and everything below is used by exactly one
   page. Loading it everywhere would cost every other page for
   nothing.

   EVERY SELECTOR IS SCOPED TO .nc-assess, except the three
   .nc-js state-machine rules, which are scoped to .nc-js AND
   .nc-assess together. Nothing here can reach another page.

   Tokens only. No hex values anywhere. The raw pixel values are
   listed at the foot of this file with the reason for each.

   Reuses, rather than restates:
   - the choice rows, inputs and submit button from site.css
   - .section, .wrap, .reading, .hero, .overline, .mask, .rv,
     .arch__list and the global :focus-visible ring from home.css
   ============================================================ */


/* ------------------------------------------------------------
   1 · THE THREE STATES

   The page ships as a plain document: all fifteen questions, all
   forty-five answers and all seven result texts are in the HTML
   on first load. The one-line script in the template's <head>
   adds .nc-js to the document element before the body is parsed,
   and these rules then fold it down to one screen at a time from
   the first paint — no flash, no layout shift.

   With scripting off, .nc-js is never added, none of this
   applies, and the whole thing stays readable as a document.

   The start screen and question 1 carry .is-on in the HTML, so
   the opening state is correct before any script has run.
   ------------------------------------------------------------ */

.nc-js .nc-assess .as__screen{display:none}
.nc-js .nc-assess .as__screen.is-on{display:block}

.nc-js .nc-assess .as__q{display:none}
.nc-js .nc-assess .as__q.is-on{display:block}

.nc-js .nc-assess .as__res{display:none}
.nc-js .nc-assess .as__res.is-on{display:block}


/* ------------------------------------------------------------
   1b · THE GAP UNDER THE HEADLINE

   .hero and .section both carry 96px of vertical padding, which is
   right where a hero holds an overline, a heading, a paragraph and a
   button row. This one holds an overline and an h1 and nothing else,
   because the h1 is persistent and only the panel beneath it changes.
   Two lots of 96px under a two-line heading is 192px of nothing, and
   the headline stops reading as the introduction to the questions.

   Halved on both sides of the boundary, from tokens: 48 + 48 = 96,
   against 96 + 96 = 192.

   THE BACKGROUND CHANGE STAYS. That boundary marks the fixed heading
   apart from the panel that switches underneath it, which is worth
   keeping — only the distance was wrong.

   BOTH SELECTORS ARE .nc-assess-SCOPED. .hero and .section are shared
   with all four other pages and none of them moves.

   Only padding-top and padding-bottom are touched. The space above the
   overline, and the space above the footer, are both left alone —
   neither was the problem.
   ------------------------------------------------------------ */

.nc-assess .hero{padding-bottom:var(--s-xl)}
.nc-assess .section--surface{padding-top:var(--s-xl)}

/* Below 768px home.css takes .section to 64px, but .hero keeps its 96px
   — so the gap there is 96 + 64 = 160. Halved to 32 + 48 = 80, the same
   proportion as the desktop change. */
@media(max-width:767px){
  .nc-assess .hero{padding-bottom:var(--s-lg)}
  .nc-assess .section--surface{padding-top:var(--s-xl)}
}


/* ------------------------------------------------------------
   2 · PARAGRAPH RHYTHM

   home.css sets p{margin:0} globally, so every page states its
   own. Same value and same technique as .nc-about .reading.
   ------------------------------------------------------------ */

.nc-assess .as p + p{margin-top:var(--s-md)}

/* The bold lead-in above "Three things to look at" and "What to
   do next". Three classes so it beats the p + p rule above, which
   is (0,2,2) — the same trick .nc-wib and .nc-about already use.
   Weight 600, not the browser's 700: every other emphasis on this
   site is 600, and DESIGN.md allows two weights in a view. */
.nc-assess .as .as__lead{
  margin-top:var(--s-lg);
  font-weight:600;
  color:var(--c-dark);
}

.nc-assess .as__intro{color:var(--c-dark)}

/* Caption in Light, for the two small-print lines. */
.nc-assess .as__note{
  margin-top:var(--s-sm);
  font-size:var(--t-caption);
  color:var(--c-light);
  line-height:1.5;
}


/* ------------------------------------------------------------
   3 · BUTTONS

   Astra styles bare <button> site-wide. Every button on the rest
   of this site is an <a>, so .btn has never had to survive that.
   These three do: Start, Next and Back all perform an action
   rather than going anywhere, so each one is a real <button>.

   That means the standing remedy from CLAUDE.md and DESIGN.md —
   all:unset plus explicit !important resets — exactly as
   .arch__item and .nc-form button[type="submit"] already do. It
   duplicates .btn's values on purpose: .btn was written for an
   <a> and cannot be reused here, because all:unset would wipe
   whatever it set.

   THE SEND BUTTON IS NOT IN THIS FAMILY. It is a bare
   <button type="submit"> inside .nc-form, so it picks up the
   treatment in site.css that the Contact form already proves.

   all:unset also wipes the outline, which would take the global
   :focus-visible ring with it — that rule is only (0,1,0) and
   loses to these. So the ring is restated below. Never remove it.
   ------------------------------------------------------------ */

.nc-assess .as__btn{
  all:unset;
  box-sizing:border-box !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-family:var(--font) !important;
  font-size:var(--t-body) !important;
  font-weight:600 !important;
  line-height:1.2 !important;
  text-align:center !important;
  padding:16px 30px !important;
  border-radius:var(--r-button) !important;
  border:2px solid transparent !important;
  transition:background-color var(--dur) var(--ease),
             color var(--dur) var(--ease),
             transform var(--dur) var(--ease),
             box-shadow var(--dur) var(--ease);
}

/* The display above is !important, which beats the browser's own
   [hidden]{display:none} — so Back stayed on screen at question 1
   even with the attribute set. Restated at the same weight.
   Any element in this file given display:...!important needs this. */
.nc-assess .as__btn[hidden]{display:none !important}

/* Restated, or all:unset above takes the site-wide ring with it. */
.nc-assess .as__btn:focus-visible{
  outline:3px solid var(--c-blue) !important;
  outline-offset:3px !important;
}

/* ---- Primary ---- */

.nc-assess .as__btn--primary{
  background-color:var(--c-blue) !important;
  color:var(--c-white) !important;
  box-shadow:var(--sh-blue) !important;
}

/* Colour restated on hover AND focus. Astra prints an inline
   a:hover, a:focus{color:...} rule site-wide; these are <button>
   elements rather than <a>, so that particular rule cannot reach
   them, but Astra's own button rules can. Stated on both states
   regardless, because the cost is two lines and the bug it
   prevents has already happened twice on this site. */
.nc-assess .as__btn--primary:hover,
.nc-assess .as__btn--primary:focus,
.nc-assess .as__btn--primary:focus-visible{
  background-color:var(--c-blue-dark) !important;
  color:var(--c-white) !important;
  transform:translateY(-2px) scale(1.02);
  box-shadow:var(--sh-blue-hover) !important;
}

/* ---- Ghost, for Back ----
   DESIGN.md's Ghost button: no border or fill, text turns blue on
   hover. Tertiary actions only, which is what going back is. */

.nc-assess .as__btn--ghost{
  background-color:transparent !important;
  color:var(--c-light) !important;
}
.nc-assess .as__btn--ghost:hover,
.nc-assess .as__btn--ghost:focus,
.nc-assess .as__btn--ghost:focus-visible{
  background-color:transparent !important;
  color:var(--c-blue) !important;
}

/* ---- Disabled ----
   NEW COMPONENT STATE, added to DESIGN.md with this build. Next
   is disabled until an answer is chosen, and DESIGN.md had no
   disabled button state to follow.

   Modelled on DESIGN.md's disabled INPUT, which is the only
   disabled state the document already defines: Surface fill,
   Light text, no border change. --c-light on --c-surface measures
   4.8:1, which passes AA for normal text. No shadow, because
   elevation on this site means "interactive", and it is not. */

.nc-assess .as__btn:disabled,
.nc-assess .as__btn[disabled]{
  background-color:var(--c-surface) !important;
  color:var(--c-light) !important;
  box-shadow:none !important;
  cursor:not-allowed;
  transform:none !important;
}


/* ------------------------------------------------------------
   4 · THE QUESTIONS

   The choice rows themselves are NOT styled here. site.css
   already renders a label containing a radio as DESIGN.md's
   Choice rows component — 1px border, 12px radius, 14x16px
   padding, white fill, 8px gap, blue at 40% on hover, Blue Wash
   with a full blue border when selected, native input kept and
   tinted with accent-color. That file loads on every page, so
   the template only has to put .nc-form on the form.

   What is here is the furniture around them.
   ------------------------------------------------------------ */

/* Astra and the browser both style fieldset and legend. Neither
   should show: the border is the choice rows' job and the legend
   is the question, not a box caption. */
.nc-assess .as__fs{
  border:0;
  margin:0;
  padding:0;
  min-width:0;
}

/* The question. Body Large at weight 600 in Inter — NOT the
   display face and NOT a heading. DESIGN.md keeps Satoshi for
   headings only, and a <legend> is not a heading; the page's one
   h1 sits above it in the hero. Largest thing in the panel, which
   is correct: it is the only thing being asked. */
.nc-assess .as__legend{
  display:block;
  width:100%;
  padding:0;
  margin-bottom:var(--s-md);
  font-size:var(--t-body-lg);
  font-weight:600;
  line-height:1.4;
  color:var(--c-dark);
}

/* Focus lands here when the question changes, so a screen reader
   announces the new question. It is reached by script, never by
   Tab, so it takes no visible ring at rest — but :focus-visible
   still applies if a browser decides to show one. */
.nc-assess .as__legend:focus{outline:none}

/* The progress line, above each question.
   Sentence case, exactly as the copy file writes it. Not folded
   into .chap or .overline: both uppercase their text, and
   "Question 4 of 15" is not written in capitals. */
.nc-assess .as__count{
  margin-bottom:var(--s-xs);
  font-size:var(--t-caption);
  font-weight:600;
  color:var(--c-light);
  font-variant-numeric:tabular-nums;
}

/* Answers at Body, not the Small that .nc-form label sets. On the
   Contact form the options are secondary to the questions above
   them; here they are the whole of the content. */
.nc-assess .as__form label span{
  font-size:var(--t-body);
  line-height:1.5;
}

/* Only matters with scripting off, where all fifteen show at once. */
.nc-assess .as__q + .as__q{margin-top:var(--s-xl)}

.nc-assess .as__nav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--s-sm);
  margin-top:var(--s-xl);
}


/* ------------------------------------------------------------
   5 · THE RESULT

   DESIGN.md's Progress and results component: one horizontal bar
   per section, 8px tall, 999px radius, Border track, blue fill.
   The lowest section's bar is full blue; the other four sit at
   30% opacity.

   NO RED, NO TICKS, NO CROSSES, NO PERCENTAGES. A blocked section
   is a finding, not a failure. The only red on this page is the
   invalid-email message further down, which is a genuine error.

   Colour never carries the meaning on its own: every bar prints
   its section's plain question and its score as text, so the
   result reads correctly in greyscale and to a screen reader.
   ------------------------------------------------------------ */

.nc-assess .as__h2{margin-bottom:var(--s-md)}

/* The negative side margins absorb the row padding below, so the bar
   labels sit on the same left edge as the paragraphs above and below
   them. Same technique, and the same reason, as .nc-about .about-list.

   16px of padding PLUS the row's 1px border, or the labels land a
   pixel to the right of every paragraph on the page. Measured, not
   assumed — the first attempt was 1px out.

   At 390px this leaves 7px inside .wrap's 24px, so nothing overflows. */
.nc-assess .as__bars{
  list-style:none;
  margin:var(--s-xl) calc((var(--s-sm) + 1px) * -1) 0;
  padding:0;
}

/* Every row is a box; only the marked one shows its edges. Exactly how
   .stack__row and .stack__row--hit work on the homepage — a transparent
   border at rest keeps all five rows the same height and alignment, so
   marking one moves nothing. */
.nc-assess .as__bar{
  padding:14px 16px;
  border:1px solid transparent;
  border-radius:var(--r-card);
}
.nc-assess .as__bar + .as__bar{margin-top:var(--s-xs)}

/* THE MARKER. The site's existing "this is the one" treatment: Blue Wash
   behind the row, full-strength blue border — the same pair that
   .nc-form label:has(input:checked) and .stack__row--hit already use.

   It goes on the ROW, not the fill, because the fill cannot carry it: a
   section that scores 0 has a zero-width bar, so the one thing the
   result points at would be the one thing invisible. The row marker
   works at every score from 0 to 6, which is the point of it. */
.nc-assess .as__bar.is-low{
  background-color:var(--c-blue-wash);
  border-color:var(--c-blue);
}

/* THE MARKED ROW'S SCORE CARRIES THE ACCENT COLOUR.

   The row marker above carries the meaning, but Blue Wash is a tint and
   a 1px border is a hairline, so neither puts full-strength blue on the
   screen. The fill was doing that job — and it cannot when the marked
   section scores 0, because a zero-width fill paints nothing. At that
   point every visible fill on the page is one of the four sitting at
   30%, and the result has no anchor colour anywhere on it.

   BOTH THE LABEL AND THE SCORE CARRY IT. The score alone was too weak
   to do the job: it is a two-word number at Caption size sitting in the
   quietest corner of the row, with five full-width bars immediately
   below it. Even at 30% opacity those bars are physically far larger,
   so the eye still went to them first — the accent was present but
   doing no work.

   The label is the largest, darkest text in the group, and the only
   element that can hold an accent at the scale the bars operate at.
   The score keeps it too: it is the number the reader is being pointed
   at, and it sits beside the blue border.

   Weight and size are NOT changed on either — only colour. The other
   four rows' labels stay --c-dark and their scores stay --c-light.

   THE FILL OPACITIES ARE NOT TOUCHED — full on the marked bar, .3 on
   the other four, exactly as DESIGN.md says. That rule is right. It
   just cannot show itself at a score of zero, so this stands in. */
.nc-assess .as__bar.is-low .as__bar-label,
.nc-assess .as__bar.is-low .as__bar-score{
  color:var(--c-blue);
}
.nc-assess .as__bar.is-low .as__bar-score{
  font-weight:600;
}

.nc-assess .as__bar-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:var(--s-sm);
  margin-bottom:var(--s-xs);
}
.nc-assess .as__bar-label{
  font-size:var(--t-small);
  font-weight:600;
  color:var(--c-dark);
  line-height:1.4;
}
.nc-assess .as__bar-score{
  font-size:var(--t-caption);
  font-weight:600;
  color:var(--c-light);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.nc-assess .as__bar-track{
  display:block;
  height:var(--s-xs);
  background-color:var(--c-border);
  border-radius:var(--r-pill);
  overflow:hidden;
}
.nc-assess .as__bar-fill{
  display:block;
  height:100%;
  width:0;
  background-color:var(--c-blue);
  border-radius:var(--r-pill);
  opacity:.3;
  transition:width var(--dur-slow) var(--ease);
}
.nc-assess .as__bar.is-low .as__bar-fill{opacity:1}

.nc-assess .as__res{margin-top:var(--s-2xl)}
.nc-assess .as__res h3{margin-bottom:var(--s-md)}


/* ------------------------------------------------------------
   6 · THE OPTIONAL EMAIL OFFER

   Separated from the result by a rule rather than by a section of
   its own, the same way .form-alt closes the Contact form. The
   result stays on the page whether or not this is used.
   ------------------------------------------------------------ */

.nc-assess .as__offer{
  margin-top:var(--s-2xl);
  padding-top:var(--s-xl);
  border-top:1px solid var(--c-border);
}
.nc-assess .as__offer h4{margin-bottom:var(--s-md)}

.nc-assess .as__offer-form{margin-top:var(--s-lg)}

/* Capped in characters rather than pixels. An email address is
   about thirty characters, and a full 700px field invites the
   thought that a paragraph is wanted. */
.nc-assess .as__offer-form input[type="email"]{max-width:32ch}

/* DESIGN.md: form field spacing 16px. site.css sets none between a field
   and the button below it, because Fluent Forms supplies its own wrapper
   margins and this form has none. */
.nc-assess .as__offer-form button[type="submit"]{margin-top:var(--s-sm)}

/* DESIGN.md's Inputs error state. THE ONLY RED ON THIS PAGE.
   A malformed address is a real error; a low score is not, and
   never takes this treatment. */
.nc-assess .as__error{
  margin-top:var(--s-xs);
  font-size:var(--t-small);
  color:var(--c-error);
  line-height:1.4;
}
.nc-assess .as__offer-form.is-error input[type="email"]{
  border-color:var(--c-error);
}

/* Honeypot. Off-screen rather than display:none, out of the tab
   order, and hidden from assistive technology by the template's
   aria-hidden. No person can reach it. */
.nc-assess .as__hp{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* The send button is disabled for the length of the request, so it
   cannot be fired twice. site.css styles it but defines no disabled
   state, so it takes the same one the .as__btn family uses. */
.nc-assess .as__offer-form button[type="submit"]:disabled{
  background-color:var(--c-surface) !important;
  color:var(--c-light) !important;
  box-shadow:none !important;
  cursor:not-allowed;
  transform:none !important;
}

.nc-assess .as__sent,
.nc-assess .as__fail{margin-top:var(--s-lg)}
.nc-assess .as__sent h4,
.nc-assess .as__fail h4{margin-bottom:var(--s-md)}

/* Colour stated again on hover and focus, or Astra's inline
   a:hover, a:focus rule takes these to dark blue. Astra's rule
   carries no !important, so specificity alone is enough. */
.nc-assess .as__tlink{
  font-weight:600;
  color:var(--c-blue);
  text-decoration:underline;
}
.nc-assess .as__tlink:hover,
.nc-assess .as__tlink:focus{color:var(--c-blue-dark)}

/* DESIGN.md: every mailto: carries white-space:nowrap so an
   address never breaks across two lines and reads as two. */
.nc-assess .as__fail a{
  font-weight:600;
  color:var(--c-blue);
  text-decoration:underline;
  white-space:nowrap;
}
.nc-assess .as__fail a:hover,
.nc-assess .as__fail a:focus{color:var(--c-blue-dark)}

/* "Answer them again" — quiet, as the copy file asks. Underlined
   at rest, so colour is not the only thing marking it as a link. */
.nc-assess .as__again-row{margin-top:var(--s-xl)}
.nc-assess .as__again{
  font-size:var(--t-small);
  font-weight:600;
  color:var(--c-light);
  text-decoration:underline;
}
.nc-assess .as__again:hover,
.nc-assess .as__again:focus{color:var(--c-blue)}


/* ------------------------------------------------------------
   7 · MOTION

   Two moves, both of which direct attention and nothing else:
   the question fades as it changes, and the bars grow from zero
   over 700ms on first display. No sliding.

   site.css already cancels animation and shortens every
   transition under prefers-reduced-motion with !important. The
   block below states the same intent locally so it is visible in
   this file, and cancels the button lift, which is a transform
   rather than an animation. assessment.js also checks the media
   query itself and sets each bar to its final width in one step,
   so nothing depends on CSS alone.
   ------------------------------------------------------------ */

@keyframes nc-as-fade{
  from{opacity:0}
  to{opacity:1}
}
.nc-js .nc-assess .as__q.is-on{animation:nc-as-fade var(--dur) var(--ease)}

@media (prefers-reduced-motion:reduce){
  .nc-js .nc-assess .as__q.is-on{animation:none}
  .nc-assess .as__bar-fill{transition:none}
  .nc-assess .as__btn:hover,
  .nc-assess .as__btn:focus,
  .nc-assess .as__btn:focus-visible{transform:none}
}


/* ------------------------------------------------------------
   8 · RAW PIXEL VALUES IN THIS FILE, AND WHY

   Everything else comes from nc-assets/tokens.css.

   16px 30px   button padding. DESIGN.md states this figure for
               buttons and there is no token for it. home.css's
               .btn and site.css's submit button both use the same
               two numbers; a third value here would be worse.

   2px         button border width, transparent, so a bordered and
               an unbordered button are the same height. Copied
               from .btn for that reason.

   translateY(-2px)  DESIGN.md's button hover: lift 2px, scale
               1.02. Its own stated figure.

   3px         focus ring width and offset, restated from
               home.css's global :focus-visible because all:unset
               would otherwise remove it.

   767px       the mobile breakpoint, in a media query rather than a
               declaration. home.css already breaks at 767px; a second
               breakpoint would put the two files out of step.

   14px 16px   the marked result row's padding, matching a choice row
               exactly. DESIGN.md states this pair for Choice rows and
               site.css already writes the same two numbers; a third
               value here would put the two components out of step.

   1px         border widths. DESIGN.md states 1px throughout.

   -9999px, 1px  the honeypot, moved off-screen. Not a design
               value: it means "far enough away to never be seen".

   .3          the non-lowest bars' opacity. DESIGN.md's figure.

   32ch, 17ch etc are character units, not pixels, and follow the
   caps already used in home.css.
   ------------------------------------------------------------ */
