/* Team Pulse survey page. Same look as the results pages (30 Sep): navy and cool greys, Plus Jakarta Sans.
   The font is bundled with the page, so it still loads nothing from other sites (ARCHITECTURE.md). One theme, no dark mode. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/plus-jakarta-sans.woff2) format("woff2"); }
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --ground: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --ink: #0F1B2D;
  --ink-2: #33415A;
  --ink-3: #5B6980;
  --line: #DCE2EB;
  --line-soft: #EBEFF5;
  --accent: #0B3B75;
  --accent-2: #174F96;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF0F9;
  --warn: #8A5A12;
  --warn-soft: #FDF1D6;
  --shadow: rgba(15, 27, 45, 0.10);
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 16px/1.55 var(--sans); -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }


header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.top-in { max-width: 600px; margin: 0 auto; padding: 12px 16px 10px; display: grid; gap: 8px; }
.brand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.brand b { color: var(--ink); font-weight: 600; letter-spacing: 0.01em; }
@media (max-width: 480px) { .brand .long { display: none; } }
.count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 4px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s ease; }

main { max-width: 600px; margin: 0 auto; padding: 18px 16px 120px; }
.screen { display: grid; gap: 16px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 17px; margin: 0; }
.prose { display: grid; gap: 22px; }
.prose section { display: grid; gap: 8px; }
.prose p { margin: 0; max-width: 62ch; color: var(--ink); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose li { color: var(--ink-2); line-height: 1.55; padding-left: 2px; }
.prose li::marker { color: var(--accent); }
.lead { font-size: 17px; }
.signoff { margin-top: 22px; font-weight: 600; }
.ph { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 0 5px; white-space: nowrap; font-size: 0.95em; }

.qnum { font-size: 13px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.qtext { font-size: 20px; line-height: 1.4; font-weight: 600; margin: 0; text-wrap: pretty; outline: none; }
.opts { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; }
.opt { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 16px; cursor: pointer; min-height: 50px; transition: border-color .12s ease, background .12s ease; }
.opt:hover { border-color: var(--ink-3); }
.opt input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); margin: 0; flex: none; display: grid; place-items: center; background: var(--surface); }
.opt input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .12s ease; }
.opt input:checked { border-color: var(--accent); }
.opt input:checked::after { transform: scale(1); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* "Tap again to go on": shown only on the chosen answer (30 Sep). */
.opt { touch-action: manipulation; }
.opt > span:first-of-type { flex: 1; }
.opt .again { display: none; font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.opt:has(input:checked) .again { display: inline; }
.opt.going { transform: scale(.985); }
.opt input:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 14.5px; font-weight: 600; }
.field .hint { font-size: 13.5px; color: var(--ink-2); margin-top: -2px; }
textarea { width: 100%; min-height: 84px; resize: vertical; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
textarea.big { min-height: 170px; }
textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.field.compact .lab { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.field.compact label { font-size: 14px; }
.field.compact .hint { margin: 0; font-size: 13px; }
.field.compact textarea { min-height: 0; height: 46px; resize: none; transition: height .15s ease; }
.field.compact textarea:focus, .field.compact textarea.has { height: 104px; resize: vertical; }
.cbtn { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; min-height: 48px; cursor: pointer; font-size: 15px; }
.cbtn svg { flex: none; }
.cbtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sheet[hidden] { display: none; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; background: var(--surface); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px var(--shadow); padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet-in { max-width: 600px; margin: 0 auto; display: grid; gap: 10px; }
.sheet-in .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.need { font-size: 13.5px; color: var(--ink-3); margin: -4px 0 0; }
.codebox { display: grid; gap: 8px; }
.codebox input { font: 22px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); width: 100%; }
.codebox input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.err { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 9px 12px; font-size: 14.5px; }
.muted { color: var(--ink-2); font-size: 14.5px; }

.navbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bg); border-top: 1px solid var(--line-soft); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.navbar-in { max-width: 600px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.navbar .note { flex: 1; font-size: 13px; color: var(--ink-3); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 13px 22px; font-weight: 600; cursor: pointer; min-height: 48px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.linkish { background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; padding: 0; cursor: pointer; font-size: 14.5px; }

.jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.jumps button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 11px; cursor: pointer; font-variant-numeric: tabular-nums; }
.done-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Additions for the live page (no inline styles: the page's security policy forbids them) */
.bold { font-weight: 600; }
.m0 { margin: 0; }
.answer-label { font-weight: 500; }
.btn.small { padding: 9px 18px; min-height: 40px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.done-mark { color: var(--accent); }
.bar span { width: 0; }

/* A grid question: one row for each item, numbered buttons for the scale (the numbers are explained once above the rows). */
.glegend { list-style: none; margin: 0; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 14px; font-size: 13.5px; color: var(--ink-2); background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: 12px; }
.glegend b { color: var(--ink); display: inline-block; min-width: 1em; }
.grow { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.grow legend { padding: 0; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.gbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.gopt { position: relative; cursor: pointer; }
.gopt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gnum { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; transition: border-color .12s ease, background .12s ease; }
.gopt:hover .gnum { border-color: var(--ink-3); }
.gopt input:checked + .gnum { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.gopt input:focus-visible + .gnum { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.gna .gnum { font-size: 14px; }
.gsel { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Small hand-drawn pictures above the questions. Decorative only; one soft green, no colour that means good or bad. */
.doodle { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 0 6px; }
.doodle .s, .rowico .s { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.doodle .a, .rowico .a { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.doodle .f, .rowico .f { fill: var(--accent-soft); stroke: none; }
.doodle .k, .rowico .k { fill: var(--ink-2); stroke: none; }
.rowico { width: 34px; height: 34px; flex: none; }
@media (max-height: 640px) { .doodle { max-width: 180px; } }
.rlab { display: inline-flex; align-items: center; gap: 10px; }
.linkish { all: unset; cursor: pointer; color: var(--accent); font-size: 14.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkish:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* The panel that opens under the chosen answer (30 Sep). */
.inask { display: grid; gap: 8px; margin: -9px 0 0; padding: 12px 14px 14px; background: var(--surface); border: 1.5px solid var(--accent); border-top-width: 0; border-radius: 0 0 12px 12px; }
.inask .echo { margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink); }
.inask label { font-size: 14.5px; }
.inask textarea { width: 100%; font: 15px/1.45 var(--sans); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); color: var(--ink); resize: vertical; }
.inask .echo p { margin: 0; }
.inask .echo ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.45; }
/* On the grid the panel stands on its own under the rows, not joined to one answer. */
.inask.gridask { margin: 4px 0 0; border-top-width: 1px; border-radius: 12px; }
.opt:has(+ .inask) { border-radius: 12px 12px 0 0; }
@media (prefers-reduced-motion: no-preference) { .inask { animation: inask-in .18s ease-out; } @keyframes inask-in { from { opacity: 0; transform: translateY(-6px); } } }

/* ---------- Look and feel, 30 Sep: the same corporate identity as the results pages ---------- */
body { font-size: 16px; letter-spacing: -0.003em; }
header.top { border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15, 27, 45, .02); }
header.top::before { content: ""; display: block; height: 3px; background: var(--accent); }
.brand { font-size: 13px; }
.brand b { color: var(--accent); font-weight: 800; letter-spacing: 0; }
.brand .long { color: var(--ink-3); font-weight: 500; }
.count { color: var(--ink-3); font-weight: 600; font-size: 12.5px; letter-spacing: .02em; }
.bar { height: 5px; background: var(--line-soft); border-radius: 999px; }
.bar span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
h2 { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 17.5px; line-height: 1.55; color: var(--ink-2); }
.prose p { color: var(--ink-2); line-height: 1.65; }
.prose section { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.signoff { margin-top: 8px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--ink); font-weight: 700; }
.qtext { font-size: 21px; line-height: 1.38; font-weight: 700; letter-spacing: -0.012em; color: var(--ink); }
.opts { gap: 10px; }
.opt { border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; min-height: 52px; font-weight: 500; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 27, 45, .04); transition: border-color .12s ease, background .12s ease, box-shadow .12s ease; }
.opt:hover { border-color: #AFC0D8; background: var(--surface-2); }
.opt input { width: 20px; height: 20px; border: 1.5px solid #9AA8BD; }
.opt input::after { width: 10px; height: 10px; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 14px rgba(11, 59, 117, .10); font-weight: 600; }
.opt input:checked { border-color: var(--accent); border-width: 2px; }
.need { color: var(--ink-3); font-size: 13px; }
.btn { border-radius: 10px; padding: 13px 24px; font-weight: 700; letter-spacing: .005em; box-shadow: 0 1px 2px rgba(15, 27, 45, .10); transition: background .12s ease, box-shadow .12s ease; }
.btn:not(:disabled):hover { background: var(--accent-2); box-shadow: 0 6px 16px rgba(11, 59, 117, .18); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink-2); box-shadow: none; font-weight: 600; }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.navbar { border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(15, 27, 45, .05); }
textarea { border: 1px solid var(--line); border-radius: 10px; }
textarea:focus { box-shadow: 0 0 0 3px rgba(23, 79, 150, .15); }
.inask { background: var(--surface-2); border: 1px solid var(--accent); border-top-width: 0; box-shadow: 0 0 0 1px var(--accent) inset; padding: 14px 16px 16px; }
.inask .echo { color: var(--ink); font-weight: 500; }
.inask label { color: var(--ink-2); }
.inask textarea { background: var(--surface); }
.opt:has(+ .inask) { box-shadow: 0 0 0 1px var(--accent) inset; }
.glegend { border: 1px solid var(--line-soft); background: var(--surface-2); }
.gnum { border: 1px solid var(--line); font-weight: 600; }
.gopt input:checked + .gnum { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.done-mark { background: var(--accent); color: var(--accent-ink); width: 56px; height: 56px; box-shadow: 0 8px 22px rgba(11, 59, 117, .22); }
.jumps button { border: 1px solid var(--line); font-weight: 600; color: var(--accent); }
.sheet { border-top: 1px solid var(--line); }
/* On a wide screen the page sits on a soft grey ground as a white sheet; on a phone it stays full-width white. */
@media (min-width: 700px) {
  html, body { background: var(--ground); }
  header.top { background: var(--bg); }
  main { background: var(--bg); margin: 28px auto 0; padding: 32px 36px 140px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 18px 40px rgba(15, 27, 45, .06); max-width: 640px; }
  .navbar { background: var(--bg); }
  .top-in, .navbar-in { max-width: 640px; padding-inline: 36px; }
  .navbar { padding-inline: 0; }
}


/* Laptop layout (30 Sep): the drawing in its own column on the left, the question and its answers on the right.
   Only from 960px wide; below that (tablets, phones) the drawing stays above the question as before. */
.qbody { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 960px) {
  body.wide main { max-width: 980px; padding-inline: 44px; }
  body.wide .top-in, body.wide .navbar-in { max-width: 980px; padding-inline: 44px; }
  /* The panel is as tall as the question beside it, up to one screen, and stays in view while scrolling;
     the drawing sits in its exact middle, both ways. */
  .qsplit { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); column-gap: 48px; align-items: stretch; }
  .qart { position: sticky; top: 104px; align-self: stretch; max-height: calc(100vh - 240px); min-height: 220px; display: flex; align-items: center; justify-content: center; padding: 28px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 14px; }
  .qart .doodle { width: 100%; max-width: 100%; max-height: 200px; margin: 0; }
}

/* The ladder (1 Oct): the scale answers joined by one line, the radio dots on the line to the left of each
   answer; answers off the scale sit apart below an "Or" divider. One neutral colour: no answer looks better or worse. */
.opts.ladder { padding-left: 38px; }
.ladder .rungs { position: relative; display: grid; gap: 10px; }
.ladder .rungs::before { content: ""; position: absolute; left: -28px; top: 26px; bottom: 26px; width: 2px; background: var(--line); border-radius: 2px; }
.ladder .opt { position: relative; padding-left: 16px; }
.ladder .opt input { position: absolute; left: -38px; top: 50%; margin-top: -11px; width: 22px; height: 22px; z-index: 1; background: var(--bg); }
.ladder .opt:has(input:checked) input { box-shadow: 0 0 0 5px var(--accent-soft); }
.ladder .or { display: flex; align-items: center; gap: 10px; margin: 2px 0 -2px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ladder .or::before, .ladder .or::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }
.ladder .opt.off { border-style: dashed; }
.ladder .opt.off input { border-radius: 6px; }
.ladder .opt.off input::after { border-radius: 3px; }
.ladder .rungs:has(+ .inask) > .opt:last-child { border-radius: 12px 12px 0 0; box-shadow: 0 0 0 1px var(--accent) inset; }
.ladder .inask { margin-top: -9px; }
.ladder .rungs + .inask { margin-top: -1px; }
