/* HR Health Check screens. Built on the Find Your Fit tokens and stylesheet (tokens.css, site.css).
   Calm editorial layout: thin lines, alternating bands, no boxes, shadows or icons. */

:root {
  /* The three result colours (approved). Used only as thin rules, always with the colour name written beside them. */
  --c-green: #4F7352;
  --c-yellow: #A07A1A;
  --c-red: #A8483B;
  --line: rgba(26, 36, 30, .3);
  --band-tint: color-mix(in srgb, var(--sage-1) 46%, var(--oat));
  --curve-gold: #9B7933;   /* the curve's gold on light bands (the gold of the sample curve); on Forest the curve uses Mustard */
}

/* The page behind the bands */
body { background: var(--oat); }

/* ---------- Intro ---------- */

/* ---------- Question screens ---------- */
.stage { background: var(--oat); padding: 72px 24px 96px; }
.qwrap { max-width: 720px; margin: 0 auto; }
.q-title { margin-top: 36px; }
.q-sub { margin-bottom: 28px; }

/* Answers are ruled rows, not boxes */
.opts { display: flex; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); }
.stage .opt {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  padding: 20px 6px;
  align-items: center;
}
.stage .opt:hover { background: var(--band-tint); }
.stage .opt:has(input:checked) { background: var(--band-tint); border: 0; border-top: 1px solid var(--line); padding: 20px 6px; }
.stage .opt-label { font-family: var(--font-web-body); font-size: 17px; line-height: 1.5; font-weight: 400; }
.stage .opt:has(input:checked) .opt-label { font-weight: 700; }
.stage .opt:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* One statement: the statement, then Yes, Partly, No side by side. No rules between statements: each one is a group, separated by space only.
   (A border on a fieldset runs around its legend and leaves a stray line beside the text, so a statement never has a border.) */
.stmt { border: 0; margin: 0 0 48px; padding: 0; min-width: 0; }
.stmt:last-of-type { margin-bottom: 0; }
.stmt-text { padding: 0; margin: 0 0 14px; font-family: var(--font-web-heading); font-size: 23px; line-height: 1.4; color: var(--text); }
.scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; max-width: 480px; }
.stage .scale .opt { min-width: 0; border: 0; padding: 12px 14px; gap: 12px; }
.stage .scale .opt:has(input:checked) { border: 0; padding: 12px 14px; }
.stage .scale .opt-label { font-size: 16px; }

.q-meta { margin-bottom: 14px; }
.q-nav { margin-top: 40px; }
.q-error { font-size: 14px; }

/* ---------- Result ---------- */
/* THE CURVE RULE: a curve underlines the key phrase of a heading for emphasis, sitting clear below any letter tails. It is never a divider or a footer line,
   and never goes under every heading. The only curves are the intro hero ("people strategy"), the key phrase in each intro band heading, and the phrase after
   the colour dot in the overall result heading. Sections are separated by space only.
   The brand brush-stroke curve (assets/brand/curve.svg, traced from Caitlyn's sample: the ONE curve, only ever scaled uniformly) is drawn as a mask so it takes a colour.
   Every curve is gold: #9B7933 on light bands, Mustard #C9A862 only on the Forest hero. Never any other colour.
   Its thickness follows the heading's font size (--cw-h) and its length follows the phrase; the end details keep their size (curveFor in js/curves.js). Never flipped or turned. Decoration only: a pseudo-element, so it is never read out.
   Position: app.js placeCurves() sets --cw-top so the curve's top edge is 0.15 x the font size below the lowest point of the phrase, tails included. */
.curve-word::after {
  background: var(--curve-gold);
  -webkit-mask: var(--cw-mask, var(--curve-img)) no-repeat center / 100% 100%;
  mask: var(--cw-mask, var(--curve-img)) no-repeat center / 100% 100%;
  aspect-ratio: var(--curve-ar);   /* only the fallback, before app.js sets --cw-h */
  height: var(--cw-h, auto);
}

/* The result colour is a small solid dot (14px) placed right before the colour name, which is always written in Forest text. */
.dot { display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.dot--green { background: var(--c-green); }
.dot--yellow { background: var(--c-yellow); }
.dot--red { background: var(--c-red); }

/* 1. Overall (oat) */
.res-overall { background: var(--oat); padding: 88px 36px 96px; }
.res-h1 { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin: 4px 0 26px; font-family: var(--font-web-heading); font-weight: 400; font-size: 56px; line-height: 1.12; color: var(--text); }
.res-h1 .dot { margin: 2px 0 0 2px; }
.res-h1:focus { outline: none; }

/* 2. The six areas (light sage) */
.res-areas { background: var(--band-tint); padding: 88px 36px 96px; }
.area-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; border-bottom: 1px solid var(--line); }
.area-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 10px 48px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line); }
.area-name { margin: 0 0 6px; font-family: var(--font-web-heading); font-weight: 400; font-size: 30px; line-height: 1.2; color: var(--text); }
.area-colour { display: flex; align-items: center; gap: 10px; margin: 0; }
.area-colour-text { font-size: 11px; line-height: 1.4; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--text); }
.area-text { margin: 0; font-family: var(--font-web-heading); font-size: 19px; line-height: 1.6; color: var(--text); }

/* 3. "What this means for your business" (oat): a lead line, then one paragraph and one link per service. No rules, no curves. */
.res-start-band { background: var(--oat); padding: 88px 36px 96px; }
.biz-h2 { margin: 0 0 22px; font-family: var(--font-web-heading); font-weight: 400; font-size: 36px; line-height: 1.2; color: var(--text); }
.biz-lead { margin: 0 0 44px; font-family: var(--font-web-heading); font-size: 21px; line-height: 1.6; color: var(--text); }
.biz-item + .biz-item { margin-top: 44px; }
.biz-text { margin: 0; font-family: var(--font-web-heading); font-size: 21px; line-height: 1.6; color: var(--text); }
.start-link { margin: 22px 0 0; font-size: 16px; font-weight: 700; }
.start-link a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.start-link a:hover { text-decoration-thickness: 2px; }

/* 4. Buttons (sage; .res-close comes from site.css) */
.res-close { background: var(--sage-1); }

/* ---------- Small screens ---------- */
@media (max-width: 940px) {
  .res-overall, .res-areas, .res-start-band { padding: 64px 24px 72px; }
  .res-h1 { font-size: 44px; }
  .area-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 599px) {
  .stage { padding: 48px 20px 72px; }
  .stmt-text { font-size: 21px; }
  .stmt { margin-bottom: 40px; }
  .stage .scale { gap: 2px; }
  .stage .scale .opt, .stage .scale .opt:has(input:checked) { padding: 12px 8px; gap: 8px; }
  .res-h1 { font-size: 36px; }
  .area-name { font-size: 26px; }
  .biz-h2 { font-size: 29px; }
  .biz-lead, .biz-text { font-size: 19px; }
  .q-nav .btn { padding-left: 20px; padding-right: 20px; }
}

/* The curve under one word of a heading. The same for every heading: it spans the word, starts at the word's left edge, and sits a set
   fraction of the type size below it (the word's own line-height is fixed in em, so the distance is the same in proportion). */
.cw-base { display: inline-block; width: 0; height: 0; }
.curve-word { position: relative; display: inline-block; line-height: 1.12; }
.curve-word::after {
  content: ""; position: absolute; left: 0; top: var(--cw-top, calc(100% + .2em)); width: 100%;
  background: var(--mustard); pointer-events: none;
}

/* Curves under a key word in the intro bands: gold on the light bands (Oat, Sage tint, Sage), Mustard only on the Forest hero. */
.band:not(.on-dark) .curve-word::after { background: var(--curve-gold); }

/* The intro heading sits on two lines on desktop and tablet: a wider box, same type size. A phone may wrap onto more lines. */
.intro-hero .hero-inner { max-width: 960px; }
#intro .hero-h1 { max-width: 900px; }

@media (max-width: 940px) { .area-head { margin-bottom: 10px; } }

/* ---------- Intro: extra bands. Order and colours: hero Forest, why Oat, areas Sage, example Sage tint, how Sage, close Oat, footer Forest. ---------- */
.intro-why { background: var(--oat); padding: 88px 36px 96px; }
.intro-help { background: var(--sage-1); }
.intro-how { background: var(--sage-1); }
.intro-how .step-num { box-shadow: 0 0 0 5px var(--sage-1), 0 0 0 7px var(--mustard); }
.intro-example { background: var(--band-tint); padding: 88px 36px 96px; }
.intro-help .help-list, .intro-help .help-row { border-color: rgba(26, 36, 30, .3); }

.why-text { max-width: 60ch; margin: 36px auto 0; text-align: center; font-size: 21px; line-height: 1.7; color: var(--text); text-wrap: pretty; }

/* The example is a sample: a dashed card, nothing clickable. */
.example-card { max-width: 760px; margin: 48px auto 0; padding: 30px 40px 34px; border: 2px dashed rgba(26, 36, 30, .35); border-radius: 4px; background: color-mix(in srgb, var(--cream) 55%, transparent); pointer-events: none; user-select: none; }
.example-label { margin: 0 0 18px; font-size: 12px; line-height: 1.4; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--text-muted); text-align: center; }
.example-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.example-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.example-name { font-family: var(--font-web-heading); font-size: 24px; line-height: 1.2; color: var(--text); }
.example-colour { display: flex; align-items: center; gap: 10px; }
.example-key { margin: 22px 0 0; text-align: center; font-size: 16px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 940px) { .intro-why, .intro-example { padding: 64px 24px 72px; } }
@media (max-width: 599px) {
  .intro-why, .intro-example { padding: 52px 24px 60px; }
  .why-text { font-size: 18px; margin-top: 24px; }
  .example-card { padding: 22px 18px 26px; margin-top: 32px; }
  .example-row { grid-template-columns: minmax(0, 1fr); padding: 14px 0; }
  .example-name { font-size: 22px; }
}

/* ALL body text on the intro page is one style: the hero description (Open Sans, light weight, 18px, line height 1.75). Headings keep their own style. */
#intro .why-text, #intro .help-text, #intro .step p, #intro .example-key {
  font-family: var(--font-web-body); font-weight: 300; font-size: 18px; line-height: 1.75; color: var(--text);
}

/* With "What you get" gone, the closing band follows "How it works" (Sage), so it is Oat to keep neighbouring bands different. Footer Forest follows. */
.intro-close { background: var(--oat); }
