/* Questionário, admin e sobre. Usa só os tokens de style.css. */
.page.wide { max-width: 980px; }
.err { color: #b3261e; font-weight: 500; margin: 12px 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #ff9a92; } }
:root[data-theme="dark"] .err { color: #ff9a92; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.actions .grow { flex: 1; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; }

/* ---------- Questionário ---------- */
.q-progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.q-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.25s; }
.q-count { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.q-card h2, .q-card .q-title { font: 700 1.35rem/1.25 var(--serif); margin: 0 0 16px; outline: none; }
.stars-row { padding: 12px 0; border-top: 1px solid var(--line); }
.stars-row:first-of-type { border-top: 0; }
.stars-row legend, .stars-row .lbl { font-weight: 600; padding: 0; margin-bottom: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.stars { display: flex; gap: 4px; }
.star { position: relative; flex: 1; max-width: 64px; }
.star input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.star span { display: grid; place-items: center; min-height: 52px; border-radius: 12px; color: var(--line); transition: transform 0.1s; }
.star svg { width: 38px; height: 38px; fill: currentColor; stroke: var(--muted); stroke-width: 1; }
.star.on span { color: var(--z); }
.star.on svg { stroke: #b8981a; }
.star input:active + span { transform: scale(0.9); }
.star input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.stars-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 2px; }
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.opt span { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 500; font-size: 1.05rem; }
.opt span::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); }
.opt input:checked + span { border-color: var(--accent); background: var(--surface-2); }
.opt input:checked + span::before { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
textarea.txt { width: 100%; min-height: 150px; resize: vertical; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; }
textarea.txt:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.q-actions { display: flex; gap: 10px; margin-top: 22px; }
.q-actions .btn { flex: 1; min-height: 52px; }
.q-actions .btn.secondary { flex: 0 0 auto; }

/* ---------- Admin ---------- */
.field { display: grid; gap: 4px; margin: 10px 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 46px; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.login { max-width: 420px; margin: 40px auto 0; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 800px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.stack > * + * { margin-top: 16px; }
.card h2 { margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.sm { padding: 8px 14px; font-size: 0.9rem; }
.btn.danger { background: transparent; color: #b3261e; border: 1px solid currentColor; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger { color: #ff9a92; } }
:root[data-theme="dark"] .btn.danger { color: #ff9a92; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; min-height: 44px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background 0.15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--m); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.total { font: 700 2.6rem/1 var(--serif); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; margin: 8px 0; font-size: 0.95rem; }
.bar { height: 16px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); min-width: 0; transition: width 0.3s; }
.bar-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.dist div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: var(--muted); }
.dist i { display: block; width: 100%; background: var(--actina); border-radius: 4px 4px 0 0; min-height: 2px; margin-bottom: 2px; }
:root[data-theme="dark"] .dist i { background: #6f93ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dist i { background: #6f93ff; } }
.dist-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr; gap: 10px; align-items: end; margin: 10px 0; font-size: 0.95rem; }
.dist-axis { display: flex; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.dist-axis span { flex: 1; text-align: center; }
.answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.answers li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.answers .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.answers .meta .btn { margin-left: auto; }
.answers p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.answers .tag { font-weight: 700; color: var(--accent-text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.qr { display: block; width: 180px; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr-wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hint-s { font-size: 0.9rem; color: var(--muted); margin: 6px 0 0; }

/* ---------- Sobre ---------- */
.about p { font-size: 1.05rem; }
.credits { display: grid; gap: 4px; }
.credits dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 10px; }
.credits dd { margin: 0; font-weight: 500; }
.howto { padding-left: 1.2rem; display: grid; gap: 8px; }
.cta { margin-top: 28px; text-align: center; }
.stars-row legend { float: left; width: 100%; }
.stars-row legend + * { clear: both; }
.stars-row { padding-top: 14px; }

.note .icon { margin-top: 2px; color: var(--muted); }
.big-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); margin-bottom: 12px; }
.big-icon .icon { width: 30px; height: 30px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-head .text-btn { background: var(--surface-2); color: var(--ink); }
