:root {
  --fg: #1d2330;
  --muted: #667085;
  --line: #d0d5dd;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #2b59c3;
  --accent-soft: #e6edfb;
  --ok: #1a7f4b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
main { max-width: 640px; margin: 0 auto; padding: 16px 14px 48px; }
h1 { font-size: 1.45rem; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; margin: 18px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: .92rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }

button {
  font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); padding: 12px 14px; min-height: 48px;
}
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); width: 100%; font-weight: 600; }
button.play { flex: 1; font-weight: 600; }
button.play.done::after { content: " ✓"; color: var(--ok); }
button.play.playing { background: var(--accent-soft); border-color: var(--accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 2px; }
.progress > div { height: 100%; background: var(--accent); }

.question { padding: 10px 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: none; }
.question .title { font-weight: 600; }
.question .hint { color: var(--muted); font-size: .88rem; }
/* three equal columns, so "same" is as easy to hit as the two sides */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.seg button { padding: 10px 8px; font-size: .95rem; line-height: 1.25; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.questions.locked { opacity: .45; pointer-events: none; }
/* the two parts of the questions: sound of the voice, then impression of the person */
.block-head { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.block-head.first { margin-top: 4px; padding-top: 0; border-top: none; }
.block-head .title { font-weight: 700; font-size: .85rem; text-transform: uppercase;
                     letter-spacing: .04em; color: var(--accent); }
.block-head .hint { color: var(--muted); font-size: .88rem; }
.block-head + .question { border-top: none; }

label.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
label.opt input { width: 20px; height: 20px; margin: 0; }
/* free text under one choice of the profile ("other" language, hearing problems) */
.opt-text { margin: -2px 0 8px 32px; }
.opt-text[hidden] { display: none; }
select, textarea, input[type=text] { font: inherit; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { min-height: 70px; }
.choices2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices2 button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.choices3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.notice { background: #fff6e5; border: 1px solid #f2c46d; border-radius: 10px; padding: 10px 12px; }

/* language switch, top right */
#lang { max-width: 640px; margin: 0 auto; padding: 10px 14px 0; display: flex; justify-content: flex-end; gap: 6px; }
#lang button { min-height: 36px; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
#lang button.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* end page: main button first, full width */
.stack { display: grid; gap: 8px; margin: 14px 0; }

/* thank-you page */
.card h2 { margin-top: 0; }
.ok { color: var(--ok); font-weight: 600; }
.inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 8px 0; }
.share { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
a.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg);
  text-decoration: none; font-weight: 600; }
input[type=email] { font: inherit; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* icons */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: .4em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.r { margin: 0 0 0 .4em; }
.ic .fill { fill: currentColor; stroke: none; }
h1 .ic, h2 .ic { color: var(--accent); }

/* sharing: one logo per service */
/* six services: two rows of three */
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 6px; margin: 12px 0; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0;
  background: none; border: none; min-height: 0; color: var(--fg); text-decoration: none;
  font-size: .78rem; font-weight: 400; cursor: pointer; }
.logo svg { width: 48px; height: 48px; transition: transform .1s; }
.logo:hover svg, .logo:active svg { transform: scale(1.08); }

/* admin mode (?admin=<key>): purple bar fixed at the bottom */
body.admin main { padding-bottom: 96px; }
#admin { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; justify-content: center;
  align-items: center; padding: 10px 8px; background: rgba(122, 43, 195, .14); backdrop-filter: blur(4px); z-index: 10; }
#admin .tag { color: #7a2bc3; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
#admin button { background: #7a2bc3; color: #fff; border-color: #7a2bc3; font-weight: 700;
  padding: 8px 10px; min-height: 44px; font-size: .9rem; display: flex; align-items: center; }
#admin button .ic { margin-right: .3em; }
#admin #adminNew .ic { margin: 0; }

/* previous / next */
.nav { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin: 14px 0; }
.nav button.primary { width: auto; }


/* paragraph for AI agents (app.js, TRACES): out of sight but in the page and its text */
.ai-note { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* GDPR notice on the consent page, folded by default */
.gdpr summary { font-weight: 600; cursor: pointer; }
.gdpr[open] summary { margin-bottom: 8px; }
.gdpr p, .gdpr li { font-size: .92rem; }
.gdpr ul { padding-left: 20px; margin: 4px 0 8px; }
