:root {
  --ink: #1d2430;
  --muted: #5d6778;
  --line: #e3e7ee;
  --soft: #f5f7fa;
  --brand: #e2365b;
  --brand-ink: #ffffff;
  --ok: #2f9e5c;
  --err: #c8323a;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Apple SD Gothic Neo", "Malgun Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }

.stripe { height: 5px; background: linear-gradient(90deg, #e2365b 0 25%, #f4b331 25% 50%, #3ea35d 50% 75%, #3c8fd6 75%); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 600px; margin: 0 auto; padding: 12px 16px 8px; }
.logo { display: block; height: 40px; width: auto; }
.langs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.langs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 13px; cursor: pointer; color: var(--muted); }
.langs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.progress { width: 100%; max-width: 600px; margin: 0 auto; height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }

main { flex: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 16px; }
.card { animation: in .25s ease; }
.card.center { text-align: center; padding-top: 32px; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .progress > div { transition: none; } }

h1 { font-size: 24px; line-height: 1.3; margin: 4px 0 12px; }
h2.q { font-size: 19px; line-height: 1.4; margin: 8px 0 18px; font-weight: 650; }
p { line-height: 1.55; margin: 0 0 12px; }
.eyebrow { color: var(--brand); font-weight: 650; letter-spacing: .02em; margin-bottom: 4px; }
.fine { color: var(--muted); font-size: 14px; }
.big svg { width: 64px; height: 64px; margin: 0 auto 8px; display: block; }

/* lựa chọn dạng danh sách */
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; min-height: 52px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.opt svg { width: 30px; height: 30px; flex: none; }
.opt:hover { border-color: #c5ccd8; }
.opt.on { border-color: var(--brand); background: #fff3f5; }
.opt.check i { width: 22px; height: 22px; flex: none; border: 2px solid #b9c1cd; border-radius: 6px; position: relative; }
.opt.check.on i { background: var(--brand); border-color: var(--brand); }
.opt.check.on i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.opt.plain { padding-left: 16px; }

/* mặt cười */
.f-bg { fill: color-mix(in srgb, var(--fc) 16%, #fff); stroke: color-mix(in srgb, var(--fc) 45%, #fff); stroke-width: 1; }
.f-eye { fill: color-mix(in srgb, var(--fc) 70%, #555); }
.f-mouth { fill: none; stroke: color-mix(in srgb, var(--fc) 70%, #555); stroke-width: 1.6; stroke-linecap: round; }
.opt svg .f-bg, .big svg .f-bg { fill: var(--fc); stroke: none; }
.opt svg .f-eye, .big svg .f-eye { fill: #fff; }
.opt svg .f-mouth, .big svg .f-mouth { stroke: #fff; }

.matrix { display: grid; gap: 10px; }
.mrow { padding: 12px 12px 6px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.mrow.miss { border-color: var(--err); background: #fff6f6; }
.mlabel { font-weight: 550; line-height: 1.4; margin-bottom: 10px; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.face { border: 0; background: none; padding: 4px 0; cursor: pointer; border-radius: 10px; display: flex; justify-content: center; }
.face svg { width: 42px; height: 42px; transition: transform .12s; }
.face:hover svg { transform: scale(1.06); }
.face.on svg { transform: scale(1.12); }
.face.on .f-bg { fill: var(--fc); stroke: none; }
.face.on .f-eye { fill: #fff; }
.face.on .f-mouth { stroke: #fff; }
.mval { text-align: center; font-size: 13px; color: var(--muted); min-height: 20px; margin-top: 2px; }

/* NPS 0–10 */
.nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.nps .n { min-height: 46px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; padding: 0; }
.nps .n.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.ends { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 8px; }
@media (max-width: 400px) {
  .nps { grid-template-columns: repeat(6, 1fr); }
}

/* ô nhập */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 550; }
textarea, input:not(.hp), select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; font-size: 16px; }
textarea { resize: vertical; min-height: 64px; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.err { color: var(--err); font-weight: 550; margin: 14px 0 0; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 650; text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); min-width: 140px; }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: none; color: var(--muted); padding: 0 8px; }
.card.center .btn { margin-top: 8px; }
:focus-visible { outline: 3px solid #3c8fd6; outline-offset: 2px; }

.spin { width: 36px; height: 36px; margin: 0 auto 14px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 28px; }
.foot a { color: var(--muted); }
