/* Team Pulse survey page. System fonts only: the page loads nothing from other sites (ARCHITECTURE.md). */
:root {
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #1B2320;
  --ink-2: #4F5A56;
  --ink-3: #7A8480;
  --line: #D8DDD9;
  --line-soft: #E7EAE7;
  --accent: #1D5C55;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3EEEB;
  --warn: #8A5A12;
  --warn-soft: #F5EAD6;
      --shadow: rgba(27, 35, 32, 0.08);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121715; --surface: #1A201E; --ink: #E6EBE8; --ink-2: #AAB4B0; --ink-3: #77827D;
    --line: #2C3431; --line-soft: #232A27; --accent: #7FC1B6; --accent-ink: #0F1614; --accent-soft: #1E2D2A;
    --warn: #E2B26A; --warn-soft: #2E2518; --shadow: rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121715; --surface: #1A201E; --ink: #E6EBE8; --ink-2: #AAB4B0; --ink-3: #77827D;
  --line: #2C3431; --line-soft: #232A27; --accent: #7FC1B6; --accent-ink: #0F1614; --accent-soft: #1E2D2A;
  --warn: #E2B26A; --warn-soft: #2E2518; --shadow: rgba(0, 0, 0, 0.35);
}

* { 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; }
.lead { font-size: 17px; }
.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); }
.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; }
