/* The creator's screens. Carried over from mockup/screens_mockup.html, which the researcher
   signed off on 2026-10-28. */
[hidden] { display: none !important; }   /* classes that set display would otherwise win */
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; color: #222; background: #f4f5f7; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
a { color: #1d4ed8; }
.muted { color: #6b7280; }
.small { font-size: 13px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ---- Chrome ---- */
.apphead { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 12px 24px; display: flex; align-items: center; gap: 10px; }
.apphead .logo { font-weight: 700; color: #ba0c2f; text-decoration: none; }
.apphead .who { margin-left: auto; font-size: 13px; color: #6b7280; }
main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 60px; }
.narrow { max-width: 900px; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card.empty { text-align: center; padding: 40px 20px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.head-row { align-items: center; margin-bottom: 16px; }
.grow { flex: 1 1 0; min-width: 0; }

.btn { display: inline-block; border: 1px solid #d1d5db; background: #fff; color: #111; border-radius: 7px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn.primary { background: #ba0c2f; border-color: #ba0c2f; color: #fff; }
.btn.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: #1d4ed8; padding: 4px 6px; }
.btn.small { font-size: 13px; padding: 4px 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.chip.draft { background: #e5e7eb; color: #374151; }
.chip.fielded { background: #dcfce7; color: #166534; }
.chip.closed { background: #fee2e2; color: #991b1b; }
.chip.template { background: #ede9fe; color: #5b21b6; }
.chip.shared { background: #dbeafe; color: #1e40af; }
.chip.private { background: #e5e7eb; color: #374151; }
.section-head { margin: 28px 0 4px; }
.menu-head { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 2px; }

.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.flash.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.flash.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }

/* ---- Forms ---- */
label.field, span.field { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
.hint { font-size: 12.5px; color: #6b7280; margin-top: 3px; }
input[type=text], select, textarea { width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff; }
textarea { resize: vertical; min-height: 64px; }
.below { margin-top: 6px; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: #f3f4f6; color: #4b5563; }
.switch { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin: 14px 0 4px; cursor: pointer; }
.switch input { width: 16px; height: 16px; }
.save-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* "Next" sits in the same place on every step page: bottom right, under a rule. */
.step-next { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

/* ---- Dashboard ---- */
.table-card { padding: 6px 10px; }
table.surveys { width: 100%; border-collapse: collapse; }
table.surveys th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
table.surveys td { padding: 12px 10px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
table.surveys tr:last-child td { border-bottom: 0; }
table.surveys td.num { font-size: 18px; font-weight: 700; }
table.surveys td.num .small { font-weight: 400; }
.sname { display: flex; align-items: center; gap: 10px; font-weight: 600; color: inherit; text-decoration: none; }
.sname img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.actions form { display: inline; }
dialog { border: 0; border-radius: 12px; padding: 22px 24px; width: min(460px, 92vw); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(17,24,39,.45); }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---- Editor bar ---- */
.editorbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 10px 24px; }
.editorbar .inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar-icon { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.editorbar .title { font-weight: 700; font-size: 16px; }
.editorbar .btn { white-space: nowrap; }
.bar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.stepper { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1150px) { .step { padding: 6px 8px; font-size: 13px; } }
.step { border-radius: 7px; padding: 6px 11px; font-size: 13.5px; background: #f3f4f6; color: #374151; text-decoration: none; }
.step.active { background: #ba0c2f; color: #fff; }
.step.disabled { color: #9ca3af; cursor: not-allowed; }

/* ---- Settings: interviewer preview and icon picker ---- */
.preview { width: 160px; flex: none; text-align: center; }
.preview img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.bubble { text-align: left; max-width: 100%; padding: 8px 11px; border-radius: 14px; margin: 8px 0 0; font-size: 13px; }
.bubble.ai { background: #f3f4f6; border-bottom-left-radius: 4px; }
.bubble .who { display: block; font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 2px; }
/* About two and a half rows show at once, so the cut-off row says "scroll for more" (researcher). */
.icons { display: flex; flex-wrap: wrap; gap: 8px; max-height: 178px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; background: #fcfcfd; }
.icon-choice { position: relative; border: 2px solid transparent; border-radius: 12px; padding: 4px; cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.icon-choice img { width: 48px; height: 48px; display: block; border-radius: 50%; object-fit: cover; }
.icon-choice:has(input:checked) { border-color: #ba0c2f; }
.icon-choice:has(input:focus-visible) { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.upload-row { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-row .hint { margin: 0; }

/* ---- Shared by the Questions and Start & end screens ---- */
h3 { font-size: 15px; margin: 0 0 6px; }
hr { border: 0; border-top: 1px solid #eee; margin: 10px 0; }
.normal { font-weight: 400; }
.nowrap { white-space: nowrap; }
.hint.flush { margin: 0 0 6px; }
.row.center { align-items: center; }
.chip.ai { background: #ede9fe; color: #5b21b6; }
.locked { background: #f3f4f6; border: 1px dashed #cbd5e1; border-radius: 7px; padding: 9px 11px; font-size: 13px; color: #4b5563; }
.ready-list { margin: 0 0 6px; padding-left: 18px; font-size: 13.5px; color: #92400e; }
.ready-list li { margin-bottom: 3px; }
.ok-text { color: #166534; margin: 0 0 6px; }
.btn.wide { display: block; width: 100%; text-align: center; margin-top: 10px; }

/* ---- Questions ---- */
.sidebar { width: 290px; flex: none; }
.sticky { position: sticky; top: 16px; }
.estimate .big { font-size: 22px; font-weight: 700; }
.save-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.block { border: 1px solid #d1d5db; border-radius: 10px; background: #fff; margin-bottom: 16px; }
.block-head { background: #f9fafb; border-bottom: 1px solid #e5e7eb; border-radius: 10px 10px 0 0; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.block-head .bnum { font-weight: 700; white-space: nowrap; }
.block-head input.bname { flex: 1 1 auto; min-width: 120px; font-weight: 700; border-color: transparent; background: transparent; }
.block-head input.bname:hover, .block-head input.bname:focus { border-color: #d1d5db; background: #fff; }
.block-body { padding: 12px 14px; }
.tools { display: flex; gap: 0; flex: none; }
.tools .btn { padding: 3px 7px; }
.q { border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 10px; background: #fff; }
.q.open { border-color: #ba0c2f; box-shadow: 0 0 0 2px rgba(186,12,47,.08); }
.q-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.q-head:focus-visible { outline: 2px solid #1d4ed8; outline-offset: -2px; border-radius: 8px; }
.q-num { font-weight: 700; color: #6b7280; min-width: 30px; }
.q-sum { flex: 1 1 auto; min-width: 0; }
.q-type { font-size: 12px; color: #6b7280; }
.q-text { font-weight: 600; overflow-wrap: anywhere; }
.q-text.muted { font-weight: 400; font-style: italic; }
.q-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.q-body { border-top: 1px solid #f0f1f3; padding: 4px 14px 14px 52px; }
.q.instr { background: #f9fafb; }
.q.instr .q-text { font-weight: 400; font-style: italic; }
.type-col { width: 190px; flex: none; }
.num-col { width: 80px; flex: none; }
.opts .opt { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; }
.opts .opt::before { content: ""; width: 13px; height: 13px; border: 1.5px solid #9ca3af; border-radius: 50%; flex: none; }
.opts.multi .opt::before { border-radius: 3px; }
.fu { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 4px 14px 12px; margin-top: 12px; }
.fu > .switch { color: #5b21b6; }
.scripted { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.scripted input { flex: 1; }
select.short { width: 90px; }
.menu { position: relative; display: inline-block; }
.menu .pop { position: absolute; top: 100%; left: 0; z-index: 5; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 6px; min-width: 210px; }
.menu .pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 9px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer; }
.menu .pop button:hover, .menu .pop button:focus-visible { background: #f3f4f6; }

/* ---- Start & end screens: the consent form's rich text box ---- */
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; border: 1px solid #d1d5db; border-bottom: 0; border-radius: 7px 7px 0 0; background: #f9fafb; padding: 4px; }
.rt-toolbar button { border: 0; background: transparent; border-radius: 5px; padding: 4px 9px; font: inherit; font-size: 13.5px; cursor: pointer; }
.rt-toolbar button:hover { background: #e5e7eb; }
.rt-toolbar .sep { width: 1px; height: 18px; background: #d1d5db; margin: 0 4px; }
.rt-editor { border: 1px solid #d1d5db; border-radius: 0 0 7px 7px; background: #fff; padding: 10px 14px; min-height: 220px; max-height: 480px; overflow-y: auto; font-size: 14px; }
.rt-editor.locked-editor { border-radius: 7px; background: #f3f4f6; color: #4b5563; }
.rt-editor:focus { outline: 2px solid rgba(186,12,47,.25); }
.rt-editor:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.rt-editor h3 { font-size: 15px; margin: 12px 0 2px; }
.rt-editor h4 { font-size: 14px; margin: 10px 0 2px; }
.rt-editor p { margin: 0 0 8px; }
input.code-input { width: 220px; font-family: Consolas, "Cascadia Mono", monospace; }

/* ---- Prompts ---- */
.flush-h { margin: 0; }
p.flush { margin: 4px 0 0; }
.build-box { text-align: right; }
.build-box .hint { min-height: 1.2em; }
.chip.ok { background: #dcfce7; color: #166534; }
.chip.warn { background: #fef3c7; color: #92400e; }
.chip.plain { background: #e5e7eb; color: #374151; }
.flash.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; margin: 8px 0; }
.plist { width: 230px; flex: none; }
.plist button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 9px 11px; margin-bottom: 6px; font: inherit; font-size: 14px; cursor: pointer; }
.plist button.active { border-color: #ba0c2f; background: #fff5f6; }
/* Two lines of the question, then its status underneath. */
.plist .pname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.plist .chip { flex: none; }
.part { border-left: 4px solid #c4b5fd; padding-left: 12px; margin-bottom: 18px; }
.part.fixed { border-left-color: #cbd5e1; }
.part details summary { cursor: pointer; margin-bottom: 6px; }
.part-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.part-head h3 { margin: 0; }
.spacer { margin-left: auto; }
pre.prompt-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; margin: 0; }
textarea.code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; min-height: 170px; }
.notes { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13.5px; }
.notes.warn-notes { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.notes ul { margin: 6px 0 0; padding-left: 18px; }
.notes li { margin-bottom: 4px; }
.try-q { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.try-opt { display: block; font-size: 14px; margin: 3px 0; cursor: pointer; }
.try-scale { display: flex; flex-wrap: wrap; gap: 4px; }
.try-point { display: flex; flex-direction: column; align-items: center; font-size: 13px; cursor: pointer; }
.try-ends { display: flex; justify-content: space-between; gap: 8px; }
.chatbox { display: flex; flex-direction: column; margin-top: 4px; }
.chatbox .bubble { max-width: 92%; font-size: 14px; margin: 6px 0 0; }
.bubble.me { background: #ba0c2f; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.typing { color: #6b7280; }
.chatbox .turn.ai { display: flex; align-items: flex-end; gap: 6px; max-width: 96%; margin: 6px 0 0; }
.chatbox .turn.ai .bubble { margin: 0; max-width: none; }
.turn .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.composer { display: flex; gap: 6px; margin-top: 8px; }
.try-end { margin: 8px 0 0; }

/* Accounts */
form.inline { display: inline; }
button.linkish { background: none; border: 0; padding: 0; font: inherit; color: #1d4ed8; cursor: pointer; }
button.linkish:hover { text-decoration: underline; }
.auth-card { max-width: 420px; margin: 40px auto; }
.auth-card .btn.wide { margin-top: 18px; }
input[type=password] { width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff; }
.shown-password { border-color: #bbf7d0; background: #f0fdf4; }
.code-show { font-family: Consolas, "Cascadia Mono", monospace; font-size: 22px; letter-spacing: .06em; padding: 8px 0; user-select: all; }

/* Field */
input[type=number], input[type=date] { width: 100%; font: inherit; font-size: 14px; padding: 6px 9px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff; }
.checklist div { display: flex; gap: 9px; align-items: baseline; font-size: 14px; margin: 7px 0; }
.mark { font-weight: 700; width: 14px; flex: none; text-align: center; }
.mark.ok { color: #16a34a; }
.mark.warn { color: #d97706; }
.bad-text { color: #991b1b; font-size: 15px; margin: 4px 0 6px; }
.warn-card { border-color: #fde68a; background: #fffbeb; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-family: Consolas, "Cascadia Mono", monospace; }
table.figures { border-collapse: collapse; margin: 16px 0; font-size: 14px; }
table.figures th { text-align: left; font-weight: 600; padding: 4px 18px 4px 0; color: #4b5563; }
table.figures td { padding: 4px 0; }

/* Dashboard: New from template */
.menu-wrap { position: relative; }
details.menu summary { list-style: none; cursor: pointer; }
details.menu summary::-webkit-details-marker { display: none; }
.menu-wrap .pop { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.1); padding: 6px; width: 400px; max-width: 90vw; }
details.menu[open] + .pop { display: block; }
.menu-wrap .pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.menu-wrap .pop button img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.menu-wrap .pop button:hover { background: #f3f4f6; }
.menu-wrap .menu-item { display: flex; align-items: center; gap: 6px; }
.menu-wrap .menu-item a { flex: none; padding: 0 8px; }
.closed-why { margin-top: 2px; }

/* Results: one bar per answer, one hue (a single series), the count in text ink at the bar's end */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.result h3 { margin-bottom: 4px; }
.result-text { margin: 0 0 4px; }
table.bars { border-collapse: collapse; width: 100%; margin: 10px 0 4px; font-size: 14px; }
table.bars th { text-align: left; font-weight: 400; color: #374151; padding: 3px 14px 3px 0; width: 32%; vertical-align: middle; }
table.bars td { padding: 3px 0; display: flex; align-items: center; gap: 8px; }
.bar { display: inline-block; flex: none; height: 20px; background: #2a78d6; border-radius: 0 4px 4px 0; }
.bar-value { white-space: nowrap; color: #222; }
details.answers { margin-top: 10px; }
details.answers summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.answer-list { list-style: none; padding: 0; margin: 8px 0 0; }
.answer-list li { border-top: 1px solid #f0f1f3; padding: 8px 0; font-size: 14px; }
.answer-said { margin: 2px 0; }
.turn { margin: 2px 0 0 14px; color: #374151; }
.turn.ai { color: #6b7280; }
.who-label { font-weight: 600; }
.categories { border-top: 1px solid #f0f1f3; margin-top: 12px; padding-top: 10px; }
.categories h4 { margin: 0 0 4px; font-size: 14px; }
details.edit-categories { margin-top: 8px; }
details.edit-categories > summary { cursor: pointer; font-size: 14px; color: #1d4ed8; display: inline-block; }
details.edit-categories > summary.btn { color: #111; }
.category-form { margin-top: 10px; }
.one-or-several { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.one-or-several legend { width: 100%; margin-bottom: 4px; }
.category-row, .category-heads { display: grid; grid-template-columns: 2fr 3fr; gap: 8px; margin-bottom: 6px; }
.category-heads { margin-bottom: 2px; }
.category-heads .field { margin: 0; }
.remove-categories { margin-top: 4px; }
.label-form, .draft-form { margin: 8px 0; gap: 10px; }
/* Results: AI respondents (synthetic.py) */
.synthetic-form { margin: 8px 0; gap: 10px; }
.synthetic-form input[type=number] { width: 80px; }
.synthetic-form .hint { flex: 1 1 260px; margin: 0; }
#synthetic .label-progress + form { margin-top: 6px; }
.draft-note .small { margin-top: 4px; }
.draft-note form { margin-top: 4px; }
.label-progress { font-size: 14px; color: #1e3a8a; }
.chip.label { background: #e0ecfb; color: #1e3a8a; margin-left: 6px; }
.chip.stale { background: #f3f4f6; color: #6b7280; margin-left: 6px; }
.chip.added { background: #fef3c7; color: #92400e; margin-left: 4px; font-size: 11px; }
.as-they-come { border: 0; padding: 0; margin: 12px 0 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.as-they-come legend { margin-bottom: 4px; }
