/* Wovenly — BD personal brand: forest teal + copper, Clash Display / General Sans.
   Fonts are Latin-subset WOFF2 (402 KB of raw TTF -> 74 KB). GeneralSans-Light was
   declared at weight 300 and never requested by a single rule, so it shipped in
   every build and was never fetched; it is gone.
   Mobile-first: base rules target small screens; @media (min-width: …) builds up. */

/* ── Type (self-hosted; strict CSP allows font-src 'self' only) ──── */
@font-face {
  font-family: "Clash Display"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ClashDisplay-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Clash Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ClashDisplay-Semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Clash Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ClashDisplay-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/GeneralSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/GeneralSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "General Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/GeneralSans-Semibold.woff2") format("woff2");
}

:root {
  /* BD palette. The --green-* names are kept for template compatibility; they now
     carry the BD teal (primary accent). Copper is the single "notice this" accent. */
  --green-primary: #14534C;   /* teal — headers, fills, primary */
  --green-secondary: #2A9D8F; /* teal-bright — hovers, secondary accent */
  --copper: #C2703D;          /* the one number/thing to notice */
  --gray-body: #1E2A27;       /* ink — body text */
  --gray-secondary: #8A8275;  /* stone — captions, secondary text */
  --gray-light: #DAD4C7;      /* stone-light — dividers, soft fills */
  --gray-bg: #F4EEE1;         /* cream — page background, soft card fills */
  --white: #FFFFFF;
  --answer-highlight: #E8F1EF; /* soft teal tint for answer inputs */
  --answer-border: #2A9D8F;
  --danger: #B23A2E;
  /* Text tokens. Stone (#8A8275) is 3.80:1 on white, 3.28:1 on cream and 3.30:1
     on the answer tint — below AA for body text wherever it was used AS a text
     colour, so secondary text uses --gray-muted instead. It stays in the stone
     family, so the brand still reads the same; stone remains the divider/fill
     token. --copper-text is a darker copper for the places copper is used at
     normal text size (the brand copper is 3.70:1 on white, fine for the large
     display numbers it was designed for, not for a 17px heading). */
  --gray-muted: #6E675C;    /* white 5.59 · cream 4.83 · answer-tint 4.86 */
  --copper-text: #A65526;   /* white 5.32 · cream 4.60 */
  --font-stack: "General Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Clash Display", "Space Grotesk", "General Sans", system-ui, sans-serif;
}

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

/* fieldset/legend are used purely to give each question's radio group an
   accessible name — no chrome of their own. */
fieldset { border: 0; min-width: 0; }
legend { display: block; width: 100%; padding: 0; }

/* ── Focus visibility ───────────────────────────────────────────────
   `outline: none` used to be set on a selector that also matched radios and
   checkboxes, and the box-shadow that replaced it is far too faint to find. A
   keyboard user had no idea where they were. This ring is 8.86:1 on white,
   7.66:1 on the cream page and 7.70:1 on the teal answer fill. */
:focus-visible {
  outline: 3px solid var(--green-primary);
  outline-offset: 2px;
}
/* On the teal header the teal ring would vanish — use cream there. */
.site-header :focus-visible { outline-color: var(--gray-bg); }

/* The `hidden` attribute must always win — the stepper toggles it on buttons
   (.btn sets display:inline-flex, which would otherwise override it). */
[hidden] { display: none !important; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-stack);
  color: var(--gray-body);
  background: var(--gray-bg);
  line-height: 1.6;
  overflow-x: hidden;          /* never let a stray wide child scroll the page */
}

h1, h2, h3, h4 { font-family: var(--font-head); }

img { max-width: 100%; height: auto; }

/* ── Header (slim on phones, roomier on desktop) ─────────── */

.site-header {
  background: var(--green-primary);
  color: var(--white);
  padding: .6rem .85rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.site-header .brand-lockup {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  min-width: 0;
}

.site-header .brand-logo { height: 32px; width: auto; display: block; }

.site-header .brand-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, .35);
}

.site-header .logo-text {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--white);
}

.site-header .subtitle {
  font-size: .78rem;
  color: var(--white);
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Language toggle (participant flow) — kept ≥44px tappable */
.lang-toggle {
  margin-left: auto;
  display: flex;
  gap: .2rem;
  align-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  padding: .12rem;
  flex: none;
}

.lang-toggle a {
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  padding: .5rem .6rem;
  border-radius: 4px;
  line-height: 1;
}

.lang-toggle a.active { color: var(--green-primary); background: var(--white); }
.lang-toggle a:not(.active):hover { color: var(--white); }

/* ── Layout ─────────────────────────────────────────────── */

.container {
  max-width: 900px;
  margin: 1.25rem auto;
  padding: 0 .85rem;
}

.container-narrow { max-width: 480px; }

.container-wide {
  max-width: 1200px;
  margin: 1.25rem auto;
  padding: 0 .85rem;
}

/* ── Cards / Fieldsets ───────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(30,42,39,.07);
  padding: 1.15rem;
  margin-bottom: 1.15rem;
}

.card h2 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--green-primary);
  letter-spacing: .01em;
}

/* ── Introduction / before-you-begin copy ────────────────── */

/* Wovenly mark, centred above the welcome heading on the start page */
.intro-logo { display: block; width: 76px; height: 76px; margin: .25rem auto 1.1rem; }

.intro-lead { margin-bottom: .85rem; color: var(--gray-body); }
.intro-lead:last-child { margin-bottom: 0; }

.intro-note {
  margin-top: .85rem;
  font-size: .9rem;
  color: var(--gray-muted);
}

.expect-box {
  margin-top: 1rem;
  background: var(--gray-bg);
  border-left: 4px solid var(--green-primary);
  border-radius: 8px;
  padding: .85rem 1rem;
  font-size: .92rem;
  color: var(--gray-body);
}

.disclaimer-line { margin: .25rem 0 1rem; }

/* ── Form elements ───────────────────────────────────────── */

.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-body);
  margin-bottom: .3rem;
}

label .required { color: var(--danger); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-family: var(--font-stack);
  font-size: 1rem;             /* 16px — stops iOS focus-zoom */
  color: var(--gray-body);
  background: var(--white);
  transition: border-color .15s;
}

/* Keep the soft teal glow as a nicety, but never at the cost of the outline:
   the :focus-visible rule below still paints a real ring on top of it. */
input:focus, select:focus, textarea:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(20,83,76,.15);
}

textarea { resize: vertical; min-height: 84px; }

/* Field-level validation message under a rejected input (bio form). */
.field-error {
  display: block;
  margin-top: .3rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--danger);
}
.field-error::before { content: "⚠ "; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

/* Access-code input on the start page */
.code-input {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 1.15rem;
  font-family: monospace;
}

.radio-group, .checkbox-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .3rem;
}

.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 400;
  cursor: pointer;
  min-height: 44px;
}

/* ── Assessment answer inputs ────────────────────────────── */

.answer-input {
  background: var(--answer-highlight);
  border: 1px solid var(--answer-border);
  border-radius: 4px;
  padding: .3rem .5rem;
  width: 100%;
  font-size: 1rem;
}

.answer-input:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(42,157,143,.25);
}

/* Likert scale legend (repeated near the top of each 0–5 part) */
.scale-legend {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.scale-chip {
  font-size: .72rem;
  background: var(--gray-bg);
  padding: .25rem .5rem;
  border-radius: 4px;
  color: var(--gray-body);
}

/* ══════════════════════════════════════════════════════════════════════
   Answer chips — selected state WITHOUT :has()

   The whole selected-state layer used to hang off `:has()` rules with no
   fallback. On any engine without :has() — Firefox <121, Samsung Internet <20,
   Android WebView / Chrome <105, and the in-app browsers inside WhatsApp,
   Instagram and Facebook on non-updated Android — the declaration is dropped
   whole and the chip never changes when tapped. On a ~326-item sitting that is
   a lot of answering with no confirmation.

   The chip is now a SIBLING of the input rather than its parent, so the state is
   drawn by `input:checked + .likert-chip`. An adjacent-sibling selector has
   worked in every shipping browser for two decades. No :has() anywhere.
   ══════════════════════════════════════════════════════════════════════ */

/* One question = one fieldset. No chrome; the legend carries the question text. */
.item-fieldset { border: 0; padding: 0; margin: 0; }

.likert-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 2 rows of 3 on the narrowest screens */
  gap: .4rem;
  margin-top: .4rem;
}

.likert-option {
  position: relative;      /* keeps the collapsed input anchored to its own chip */
  display: block;
  cursor: pointer;
}

/* The native control is visually collapsed — the chip itself is the target.
   Still rendered (not display:none), so it stays focusable and announceable. */
.likert-option input[type="radio"] {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.likert-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  height: 100%;
  min-height: 52px;
  background: var(--answer-highlight);
  border: 1.5px solid var(--answer-border);
  border-radius: 10px;
  padding: .45rem .3rem;
  text-align: center;
}

.likert-chip .scale-val { font-size: 1.05rem; font-weight: 700; color: var(--gray-body); line-height: 1; }
.likert-chip .scale-label { font-size: .66rem; color: var(--gray-muted); line-height: 1.15; }

.likert-option input:checked + .likert-chip {
  background: var(--green-primary);
  border-color: var(--green-primary);
}
.likert-option input:checked + .likert-chip .scale-val,
.likert-option input:checked + .likert-chip .scale-label { color: var(--white); }

/* A white inner ring plus a teal outer ring, so focus is visible on an
   unselected chip (teal ring on pale fill) AND on a selected one (white ring on
   solid teal). Both edges clear 3:1 either way round. */
.likert-option input:focus-visible + .likert-chip,
.choice-option input:focus-visible + .choice-card {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 5px var(--green-primary);
}

/* Single-choice cards + checklist — full-width tappable cards. Same
   sibling-selector mechanism, and the native control stays visible so the state
   is never carried by background colour alone. */
.choice-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  margin-top: .4rem;
}

.choice-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice-option input {
  position: absolute;
  left: .85rem;
  top: .8rem;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green-primary);
  z-index: 1;
}

.choice-card {
  display: block;
  min-height: 44px;
  background: var(--answer-highlight);
  border: 1.5px solid var(--answer-border);
  border-radius: 10px;
  padding: .7rem .85rem .7rem calc(.85rem + 20px + .6rem);
  font-size: .95rem;
}

/* Selected vs unselected used to be #D7ECE8 against #E8F1EF — 1.09:1, which is
   no difference at all on a cheap screen in daylight. Solid teal is 7.70:1. */
.choice-option input:checked + .choice-card {
  background: var(--green-primary);
  border-color: var(--green-primary);
  color: var(--white);
}
.choice-option input:checked { accent-color: var(--white); }

.choice-key { font-weight: 700; color: var(--green-primary); margin-right: .1rem; }

/* Highlight an item the stepper flagged as unanswered */
.assessment-item.unanswered {
  outline: 2px solid var(--copper);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ── Assessment section header ───────────────────────────── */

.section-header {
  background: var(--green-primary);
  color: var(--white);
  padding: .9rem 1rem;
  border-radius: 12px 12px 0 0;
}

.section-header h3 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }
.section-header .instructions { font-size: .85rem; opacity: .9; margin-top: .4rem; }
.section-header .instructions-id { font-style: italic; opacity: .75; font-size: .8rem; }

.assessment-section {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(30,42,39,.07);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.assessment-items { padding: 1rem; }

.assessment-item {
  padding: .85rem 0;
  border-bottom: 1px solid var(--gray-bg);
}
.assessment-item:last-child { border-bottom: none; }

.item-prompt {
  font-size: .95rem;
  font-weight: 500;
  color: var(--gray-body);
  margin-bottom: .35rem;
}

.item-prompt-id {
  font-size: .82rem;
  color: var(--gray-muted);
  font-style: italic;
  margin-bottom: .5rem;
}

.item-number {
  display: inline-block;
  background: var(--green-primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 3px;
  margin-right: .4rem;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .7rem 1.4rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-stack);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, opacity .15s;
}

.btn-primary { background: var(--green-primary); color: var(--white); }
.btn-primary:hover { background: var(--green-secondary); }

.btn-secondary { background: var(--gray-light); color: var(--gray-body); }
.btn-secondary:hover { background: var(--gray-secondary); color: var(--white); }

.btn-sm { min-height: 0; padding: .35rem .75rem; font-size: .8rem; }
.btn-block { width: 100%; }

/* ── Stepper: sticky progress + nav ──────────────────────── */

.assess-progress {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--gray-bg);
  padding: .6rem .85rem .5rem;
  margin: 0 -.85rem;             /* bleed to the edges over the container padding */
  box-shadow: 0 2px 6px rgba(30,42,39,.06);
}

.assess-progress-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: .35rem;
}

.assess-progress-track {
  height: 6px;
  background: var(--gray-light);
  border-radius: 999px;
  overflow: hidden;
}

.assess-progress-fill {
  height: 100%;
  width: 0;
  background: var(--copper-text);   /* 3.60:1 against the --gray-light track; the
                                       brand copper is 2.50:1 there */
  border-radius: 999px;
  transition: width .25s ease;
}

.intro-card { margin-top: 1rem; }

.step-nav {
  display: flex;
  flex-direction: column-reverse;   /* primary action on top on mobile */
  gap: .6rem;
  padding: 1rem 0 1.5rem;
}

.step-nav .btn { width: 100%; }

.step-incomplete {
  color: var(--danger);
  font-size: .85rem;
  font-weight: 600;
  margin-top: .5rem;
  text-align: center;
}

/* Visual only (aria-hidden in assess.js). The announcement travels through the
   permanently-rendered .sr-only live region instead, because a screen reader does
   not announce text written into a node that is display:none at the time. */
.step-incomplete:empty { display: none; }

/* Off-screen but always rendered and always in the accessibility tree. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Resume-from-draft banner (built by assess.js when a saved draft exists) ── */

.resume-banner {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-left: 4px solid var(--copper);
  border-radius: 10px;
  padding: .9rem 2.4rem .9rem 1rem;   /* room on the right for the dismiss × */
  margin-bottom: 1.15rem;
  box-shadow: 0 1px 4px rgba(30,42,39,.07);
}

.resume-banner p {
  margin: 0 0 .7rem;
  font-size: .95rem;
  color: var(--gray-body);
}

.resume-actions { display: flex; flex-direction: column; gap: .5rem; }
.resume-actions .btn { width: 100%; }

.resume-dismiss {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-muted);
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 8px;
}
.resume-dismiss:hover { background: var(--gray-bg); color: var(--gray-body); }

/* ── Repeatable table grids ─────────────────────────────── */

.table-grid { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table-grid th {
  background: var(--green-primary); color: var(--white);
  padding: .5rem .6rem; text-align: left; font-weight: 600;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
}
.table-grid td { padding: .35rem .4rem; border-bottom: 1px solid var(--gray-bg); }
.table-grid tr:nth-child(even) td { background: #FAF7F1; }
.table-grid input, .table-grid select { padding: .3rem .4rem; font-size: .82rem; }

/* ── Admin dashboard table (desktop surface) ─────────────── */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(30,42,39,.07);
}

.admin-table th {
  background: var(--green-primary);
  color: var(--white);
  padding: .7rem 1rem;
  text-align: left;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--gray-bg); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #EEF5F3; }

/* Let the wide admin table scroll inside its own box, never the page */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Profile detail panels ───────────────────────────────── */

.profile-section {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(30,42,39,.07);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.profile-section h3 {
  background: var(--green-primary);
  color: var(--white);
  padding: .75rem 1.25rem;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.profile-body { padding: 1.25rem; }

.dim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.dim-card {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: .75rem 1rem;
  border-left: 4px solid var(--green-primary);
}

.dim-card.tier-high { border-left-color: var(--green-primary); background: #E4EFEC; }
.dim-card.tier-mid { border-left-color: var(--gray-secondary); background: #F1EEE7; }
.dim-card.tier-low { border-left-color: var(--danger); background: #F6E7E4; }

.dim-name { font-weight: 600; font-size: .85rem; color: var(--gray-body); }
.dim-score { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--copper); }
.dim-band { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-body); margin-top: .1rem; }
.dim-meaning { font-size: .78rem; color: var(--gray-muted); margin-top: .4rem; line-height: 1.4; }
.dim-tier-badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: .1rem .4rem; border-radius: 3px; display: inline-block; margin-top: .3rem; }
.badge-tier-high { background: var(--green-primary); color: #fff; }
.badge-tier-mid { background: var(--gray-secondary); color: #fff; }
.badge-tier-low { background: var(--danger); color: #fff; }

/* ── Primary-style summary bar (admin only) ──────────────── */

.style-bar { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

.style-summary-card {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: .6rem .9rem;
  border-left: 4px solid var(--green-secondary);
  min-width: 120px;
}

.style-summary-card.primary { border-left-color: var(--green-primary); background: #E4EFEC; }
.style-summary-card.secondary { border-left-color: var(--gray-secondary); }

.style-letter { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--copper); }
.style-count { font-size: .78rem; color: var(--gray-muted); }

/* ── Alerts ──────────────────────────────────────────────── */

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .92rem; }
.alert-error { background: #F6E7E4; color: var(--danger); border-left: 4px solid var(--danger); }
.alert-success { background: #E4EFEC; color: #0F3B36; border-left: 4px solid var(--green-primary); }

/* ── Declaration / consent box ───────────────────────────── */

.declaration-box {
  background: var(--gray-bg);
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: .9rem;
  color: var(--gray-body);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ── Bio key-value display ───────────────────────────────── */

.kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem 1.5rem;
}

.kv { display: flex; flex-direction: column; padding: .3rem 0; }
.kv-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-muted); }
.kv-value { font-size: .9rem; color: var(--gray-body); }

/* ── Form actions bar ────────────────────────────────────── */

.form-actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1rem 0;
}
.form-actions .btn { width: 100%; }

/* ── Step indicator (bio page breadcrumb) ────────────────── */

.step-indicator { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--gray-muted); }
.step.active { color: var(--green-primary); font-weight: 600; }
.step.done { color: var(--gray-light); }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gray-light); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.step.active .step-num { background: var(--green-primary); }
.step-sep { color: var(--gray-light); font-size: .8rem; }

/* ── Thank you page ──────────────────────────────────────── */

.thankyou-box { text-align: center; padding: 2.5rem 1rem; }
.thankyou-box .check-icon { font-size: 3rem; color: var(--green-primary); margin-bottom: 1rem; }
.thankyou-box h1 { font-family: var(--font-head); color: var(--green-primary); font-size: 1.5rem; margin-bottom: .5rem; }

/* ── Misc ────────────────────────────────────────────────── */

.text-muted { color: var(--gray-muted); font-size: .85rem; }
.text-green { color: var(--green-primary); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.nav-links { display: flex; gap: 1rem; align-items: center; margin-left: auto; flex-wrap: wrap; }
.nav-links a { color: rgba(255,255,255,.8); font-size: .85rem; text-decoration: none; }
.nav-links a:hover { color: var(--white); }

/* ── Access-code admin ───────────────────────────────────── */

.code-value { font-family: monospace; letter-spacing: .08em; font-size: 1rem; font-weight: 700; color: var(--green-primary); }
.code-link { font-family: monospace; font-size: .72rem; color: var(--gray-muted); word-break: break-all; }
.code-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 3px; display: inline-block; white-space: nowrap; }
.code-available { background: #E4EFEC; color: #0F3B36; }
.code-inuse { background: #F1EAE1; color: #8A5A17; }
.code-usedup { background: var(--gray-bg); color: var(--gray-muted); }
.code-revoked { background: #F6E7E4; color: var(--danger); }

/* ════════════════════════════════════════════════════════════
   Larger screens build up from the mobile base.
   ════════════════════════════════════════════════════════════ */

@media (min-width: 480px) {
  .likert-row { grid-template-columns: repeat(6, 1fr); }  /* single row once there's room */
  .step-nav { flex-direction: row; justify-content: space-between; }
  .step-nav .btn { width: auto; min-width: 8rem; }
  .form-actions { flex-direction: row; justify-content: flex-end; }
  .form-actions .btn { width: auto; }
  .resume-actions { flex-direction: row; }
  .resume-actions .btn { width: auto; }
}

@media (min-width: 640px) {
  .site-header { padding: 1rem 1.5rem; gap: 1rem; }
  .site-header .brand-logo { height: 38px; }
  .site-header .logo-text { font-size: 1.25rem; }
  .site-header .subtitle { font-size: .85rem; }

  .container, .container-wide { margin: 2rem auto; padding: 0 1rem; }
  .card { padding: 1.5rem; }
  .section-header { padding: 1rem 1.5rem; }
  .assessment-items { padding: 1rem 1.5rem; }
  .assess-progress { padding: .7rem 1rem .6rem; margin: 0 -1rem; }

  .choice-options { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .dim-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .kv-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* ── Home / landing page (participant-facing) ─────────────────────────
   BD personal brand: teal + copper, Clash Display / General Sans. Full-bleed
   bands over the cream body; the copper accent marks the one thing to notice
   (the Costly Strength zone). No inline styles — CSP-safe. */

.container-mid { max-width: 660px; }
.home-section .container,
.home-hero .container { margin-top: 0; margin-bottom: 0; }
.center { text-align: center; }

.home-hero {
  background: var(--white);
  padding: clamp(2.5rem, 6vw, 4.75rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--gray-light);
}
.home-hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.home-hero-mark { display: block; margin: 0 auto 1.25rem; }
.home-hero-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.08;
  color: var(--green-primary);
  margin: 0 0 .8rem;
}
.home-hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--gray-body);
  max-width: 42ch;
  margin: 0 auto 1.9rem;
}
.home-hero-note {
  color: var(--gray-muted);
  font-size: .9rem;
  margin: .95rem 0 0;
}

.btn-lg { min-height: 50px; padding: .85rem 2.1rem; font-size: 1.1rem; }

.home-section { padding: clamp(2.25rem, 5vw, 3.75rem) 0; background: var(--white); }
.home-band-cream { background: var(--gray-bg); }
.home-h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.05rem);
  line-height: 1.15;
  color: var(--green-primary);
  margin: 0 0 .7rem;
}
.home-lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--gray-body);
  max-width: 62ch;
  margin: 0;
}
.home-lead.center { margin-left: auto; margin-right: auto; }

/* Two lenses */
.lens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}
.lens-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 14px;
  padding: 1.5rem;
}
.home-band-cream .lens-card { box-shadow: 0 1px 4px rgba(30,42,39,.06); }
.lens-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green-primary);
  padding: .28rem .7rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}
.lens-card h3 {
  font-family: var(--font-head);
  color: var(--gray-body);
  font-size: 1.18rem;
  margin: 0 0 .45rem;
}
.lens-card p { color: var(--gray-body); line-height: 1.5; margin: 0; }

/* Four zones */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.zone-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-top: 4px solid var(--green-secondary);
  border-radius: 14px;
  padding: 1.3rem;
}
.zone-card h4 {
  font-family: var(--font-head);
  font-size: 1.08rem;
  color: var(--green-primary);
  margin: 0 0 .4rem;
}
.zone-card p { color: var(--gray-body); line-height: 1.45; margin: 0; font-size: .98rem; }
.zone-costly { border-top-color: var(--copper); }
.zone-costly h4 { color: var(--copper-text); }   /* 1.08rem is not large text */

/* What you walk away with */
.get-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.get-list li {
  position: relative;
  padding: .75rem 0 .75rem 1.7rem;
  border-bottom: 1px solid var(--gray-light);
  color: var(--gray-body);
  line-height: 1.5;
}
.get-list li:last-child { border-bottom: 0; }
.get-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--copper);
}
.get-list strong { color: var(--green-primary); }

/* Closing call to action — teal band */
.home-cta-band { background: var(--green-primary); }
.home-cta-band .home-h2 { color: var(--gray-bg); }
.home-cta-band .home-lead { color: rgba(244, 238, 225, .92); }
.home-cta-band .home-hero-note { color: rgba(244, 238, 225, .72); }
.home-cta-btn { background: var(--gray-bg); color: var(--green-primary); }
.home-cta-btn:hover { background: var(--white); color: var(--green-primary); }
