:root {
  --azul: #00539b; --ink: #1d2340; --muted: #5d647d; --line: #dde1ee;
  --bg: #f5f7fb; --ok: #1d9e75; --rojo: #e5384f; --banda: #dfe3ee;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.top { background: var(--azul); color: #fff; padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.brand { font-weight: 600; }
.bar { height: 5px; background: rgba(255,255,255,.28); border-radius: 3px; overflow: hidden; }
#barfill { height: 100%; width: 0; background: #fff; transition: width .4s; }
main { max-width: 760px; margin: 24px auto 60px; padding: 0 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; }
.card.wide { max-width: 860px; margin: 0 auto; }
h1 { font-size: 24px; margin: 0 0 10px; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 16px; margin: 20px 0 6px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 14px; }
.btn {
  font: inherit; font-weight: 600; color: #fff; background: var(--azul); border: 0;
  border-radius: 9px; padding: 10px 20px; cursor: pointer; margin-top: 16px;
}
.btn:hover { background: #004683; }
.btn:disabled { background: #aab3c8; cursor: not-allowed; }
.btn.sec { background: #fff; color: var(--azul); border: 1px solid var(--azul); }
.opt { display: block; margin: 6px 0; cursor: pointer; }
.opt input { margin-right: 8px; }
.q { margin: 16px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.q:last-of-type { border-bottom: 0; }
.err { color: var(--rojo); font-weight: 600; margin-top: 10px; min-height: 1.2em; }
.scale { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.scale label { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 14px; text-align: center; }
.scale input { margin-right: 4px; }
.scale7 label { min-width: 46px; }
.hint7 { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); max-width: 400px; }
.canvaswrap { position: relative; }
canvas.trial { width: 100%; height: auto; display: block; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; cursor: none; touch-action: none; }
.status { min-height: 26px; margin-top: 10px; font-size: 15px; color: var(--muted); }
.fb { margin-top: 12px; padding: 14px 18px; border-left: 4px solid var(--azul); background: #f0f5fb; border-radius: 8px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.optcard { font: inherit; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; }
.optcard canvas { width: 100%; height: auto; display: block; background: #fafbfe; border-radius: 6px; }
.optcard b { display: block; margin-top: 8px; }
.optcard[aria-pressed="true"] { border-color: var(--azul); background: #f0f5fb; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; margin-top: 8px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; }
table.t th { background: #f2f4fa; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f2f4fa; padding: 2px 8px; border-radius: 6px; }
@media (max-width: 640px) { .options { grid-template-columns: 1fr; } }

/* Retroalimentación */
.fb-ctrl { background: #f1f3f8; border-left: 4px solid #aab3c8; padding: 12px 16px; }
.fb-ctrl h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--muted); }
.fb-ctrl p { margin: 4px 0; }
.fb-ctrl .fb-note { color: var(--muted); margin-top: 8px; }
.fb-trat { background: #eaf5f0; border: 2px solid var(--ok); border-left-width: 6px; border-radius: 12px; padding: 22px 26px; margin-top: 18px; }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fb-head h3 { margin: 0; font-size: 23px; line-height: 1.25; }
.fb-check { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 20px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fb-trat .fb-data { margin: 3px 0; font-weight: 600; }
.fb-motiv { margin-top: 16px; padding-top: 14px; border-top: 1px solid #b9dccd; }
.fb-motiv p { margin: 8px 0; }
.fb-strong { font-weight: 700; font-size: 17px; }
