/* CivicLearn Panamá — entrenadores especiales (mapa, himno y juramento, respuestas escritas, oral) */
.tr-intro { font-size: 15px; line-height: 1.6; color: var(--text-mid); margin: 0 0 16px; text-align: left; }
.tr-small { font-size: 13px; line-height: 1.5; color: var(--text-mid); margin: 10px 0; text-align: left; }
.tr-label { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-mid); margin: 0 0 8px; text-align: left; }
.tr-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; text-align: left; }
.tr-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }

/* mode list */
.tr-modes { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 4px; }
.tr-mode {
  text-align: left; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; color: var(--text); cursor: pointer; width: 100%;
}
.tr-mode:hover { border-color: var(--accent); }
.tr-mode-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tr-mode-name { font-size: 15px; font-weight: 600; }
.tr-mode-best { flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.tr-mode-desc { font-size: 13px; line-height: 1.45; color: var(--text-mid); margin-top: 3px; }

/* segmented choice */
.tr-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.tr-seg-btn {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-mid); cursor: pointer;
}
.tr-seg-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* question head + feedback */
.tr-qhead { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.tr-count { font-size: 12.5px; font-weight: 700; color: var(--text-mid); background: var(--surface-alt); padding: 4px 10px; border-radius: 999px; }
.tr-prompt { text-align: left; }
.tr-feedback { min-height: 22px; margin: 12px 0; font-size: 14.5px; line-height: 1.5; text-align: left; }
.tr-feedback.ok { color: #166534; }
.tr-feedback.bad { color: var(--wrong); }
.tr-next { width: 100%; }

/* map */
.tr-map { margin: 6px 0 2px; background: #eaf4fb; border-radius: 12px; padding: 6px; }
.tr-map svg { display: block; width: 100%; height: auto; }
.tr-map path { fill: #f4efe4; stroke: #8a8a8a; stroke-width: 0.9; cursor: pointer; transition: fill .15s; }
.tr-map path:hover { fill: #e2ecea; }
.tr-map.explore path.co-unit { fill: #f6ecd2; }
.tr-map path.sa-ctx { fill: #e4e4e4; stroke: #b5b5b5; cursor: default; pointer-events: none; }
.tr-map .co-inset { cursor: pointer; }
.tr-map .co-inset rect { fill: #dcecf7; stroke: #9aa9b5; stroke-width: 1.2; stroke-dasharray: 5 4; }
.tr-map .co-inset text { font: 600 22px system-ui, sans-serif; fill: #55606a; }
/* natural regions (explore, "Colorear por regiones") */
.tr-map path.co-unit.r-andina, .tr-legend .sw.r-andina { fill: #e9c98b; background: #e9c98b; }
.tr-map path.co-unit.r-caribe, .tr-legend .sw.r-caribe { fill: #9fd3e6; background: #9fd3e6; }
.tr-map path.co-unit.r-pacifica, .tr-legend .sw.r-pacifica { fill: #a9d8a7; background: #a9d8a7; }
.tr-map path.co-unit.r-orinoquia, .tr-legend .sw.r-orinoquia { fill: #f3e08a; background: #f3e08a; }
.tr-map path.co-unit.r-amazonia, .tr-legend .sw.r-amazonia { fill: #6fbf8e; background: #6fbf8e; }
.tr-legend-reg { flex-wrap: wrap; gap: 10px 16px; }
.tr-label-gap { margin-top: 26px; }
/* pick-one buttons (regions drill) */
.tr-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0 0; }
.tr-opt { padding: 11px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tr-opt:hover:not(:disabled) { border-color: var(--accent); }
.tr-opt:disabled { cursor: default; }
.tr-opt.ok { border-color: #166534; background: #dcfce7; color: #166534; }
.tr-opt.bad { border-color: #991b1b; background: #fee2e2; color: #991b1b; }
.tr-map path.hl { fill: #f2b84b !important; stroke: #7a5200; stroke-width: 1.6; }
.tr-map path.ok { fill: #86d4a2 !important; stroke: #166534; stroke-width: 1.4; }
.tr-map path.bad { fill: #f3a3a3 !important; stroke: #991b1b; stroke-width: 1.4; }
.tr-map-credit { font-size: 11px; color: var(--text-muted); text-align: right; margin: 0 0 6px; }
.tr-map-info { min-height: 62px; text-align: left; margin: 8px 0; }
.tr-map-name { font-size: 18px; font-weight: 700; }
.tr-map-kind { font-size: 14px; color: var(--text-mid); margin-top: 2px; }
.tr-map-note { font-size: 13px; color: var(--text-mid); margin-top: 6px; line-height: 1.5; }
.tr-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-mid); }
.tr-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; border: 1px solid #8a8a8a; }

/* typed answer */
.tr-answer { display: flex; gap: 8px; margin: 12px 0 0; }
.tr-input {
  flex: 1; min-width: 0; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px;
  font: inherit; font-size: 16px; background: var(--surface); color: var(--text);
}
.tr-input:focus, .tr-textarea:focus, .tr-gap:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-mid); }

/* poem / text */
.tr-poem { text-align: left; font-size: 17px; line-height: 1.9; margin: 0 0 8px; }
.tr-poem-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); margin: 14px 0 2px; }
.tr-poem-head:first-child { margin-top: 0; }
.tr-gap {
  font: inherit; font-size: 16px; padding: 1px 6px; margin: 2px 0; border: 0; border-bottom: 2px solid var(--accent);
  background: var(--accent-soft); border-radius: 6px 6px 0 0; color: var(--text); max-width: 11em;
}
.tr-gap.ok { border-bottom-color: var(--correct); background: var(--correct-bg); color: #166534; }
.tr-gap.bad { border-bottom-color: var(--wrong); background: var(--wrong-bg); color: var(--wrong); }

/* ordering */
.tr-built { min-height: 40px; text-align: left; margin: 0 0 12px; padding: 8px 12px; border: 1.5px dashed var(--border); border-radius: 12px; }
.tr-built-line { font-size: 16px; line-height: 1.7; }
.tr-chips { display: flex; flex-direction: column; gap: 8px; }
.tr-chip {
  text-align: left; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; font-size: 15.5px; color: var(--text); cursor: pointer;
}
.tr-chip:hover { border-color: var(--accent); }
.tr-chip.shake { animation: trShake .35s; border-color: var(--wrong); }
@keyframes trShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* write from memory */
.tr-textarea {
  display: block; width: 100%; box-sizing: border-box; resize: vertical; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface);
  font: inherit; font-size: 16px; line-height: 1.7; color: var(--text); margin: 0 0 14px;
}
.tr-diff { text-align: left; font-size: 16px; line-height: 1.9; margin: 0 0 6px; padding: 12px 14px; background: var(--surface-alt); border-radius: 12px; }
.tr-diff .w.ok { color: #166534; }
.tr-diff .w.slip { color: var(--orange); text-decoration: underline dotted; }
.tr-diff .w.miss { color: var(--wrong); background: var(--wrong-bg); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* result */
.tr-result { text-align: left; }
.tr-score { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; }
.tr-score.good { color: var(--correct); }
.tr-score.mid { color: var(--orange); }
.tr-score.low { color: var(--wrong); }
.tr-misses { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-misses li { padding: 10px 12px; border: 1.5px solid var(--border); border-left: 4px solid var(--wrong); border-radius: 10px; }
.tr-miss-q { display: block; font-size: 14px; font-weight: 600; }
.tr-miss-a { display: block; font-size: 13.5px; color: var(--text-mid); margin-top: 2px; }

@media (max-width: 600px) {
  .tr-poem { font-size: 16px; }
  .tr-answer { flex-direction: column; }
}

/* ── respuestas escritas y pareo ── */
.tr-qhead { gap: 8px; align-items: center; }
.tr-exit { order: -1; margin-right: auto; padding: 5px 12px; font-size: 12.5px; }
.tr-src { font-size: 12px; color: var(--text-mid); margin: -4px 0 12px; text-align: left; }
.tr-listform { display: flex; flex-direction: column; gap: 8px; }
.tr-listrow { display: flex; align-items: center; gap: 8px; }
.tr-listnum { width: 22px; flex: none; font-weight: 700; color: var(--text-mid); text-align: right; }
.tr-input.ok { border-color: var(--correct); background: var(--correct-bg); color: #166534; }
.tr-input.bad { border-color: var(--wrong); background: var(--wrong-bg); color: var(--wrong); }
.tr-listform .tr-row { margin-top: 6px; }
.tr-pareo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 0; }
.tr-pcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-phead { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-mid); text-align: left; }
.tr-pitem {
  text-align: left; padding: 10px 12px; min-height: 48px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; font-size: 14.5px; line-height: 1.35; color: var(--text); cursor: pointer;
  overflow-wrap: anywhere;
}
.tr-pitem:hover:not(:disabled) { border-color: var(--accent); }
.tr-pitem.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-mid); }
.tr-pitem.ok, .tr-pitem:disabled.ok { border-color: var(--correct); background: var(--correct-bg); color: #166534; cursor: default; opacity: .75; }
.tr-pitem.shake { animation: trShake .35s; border-color: var(--wrong); }
@media (max-width: 600px) {
  .tr-pareo { gap: 8px; }
  .tr-pitem { font-size: 13.5px; padding: 9px 10px; }
}

/* ── práctica oral ── */
.tr-oral-listen { margin: 0 0 14px; }
.tr-oral-heard { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-alt); font-size: 15px; text-align: left; }
.tr-oral-self { align-items: center; }
.tr-oral-model { text-align: left; }
.tr-oral-model:not(:empty) { margin: 4px 0 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; }
.tr-oral-text { font-size: 16px; line-height: 1.5; margin: 2px 0 0; }
.tr-oral-model .tr-row { margin-top: 10px; }
.tr-listmatch { margin: -4px 0 2px 30px; font-size: 12.5px; color: #166534; text-align: left; }

/* the button styles (display:flex) overrode the hidden attribute: hidden always wins on trainer pages */
main [hidden] { display: none !important; }

/* ── castellano ── */
.tr-mode.active { border-color: var(--accent); }
.cs-test { border-color: var(--accent); background: var(--accent-soft); margin: 0 0 6px; }
.tr-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tr-key {
  min-width: 40px; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-alt);
  font: inherit; font-size: 17px; font-weight: 600; color: var(--text); cursor: pointer;
}
.tr-key:hover { border-color: var(--accent); }
.cs-gap { display: inline-block; min-width: 3.5em; padding: 0 6px; border-bottom: 2px solid var(--accent); background: var(--accent-soft); border-radius: 6px 6px 0 0; text-align: center; }
.cs-gap.ok { border-bottom-color: var(--correct); background: var(--correct-bg); color: #166534; }
.cs-gap.bad { border-bottom-color: var(--wrong); background: var(--wrong-bg); color: var(--wrong); }
.cs-hint { margin: 2px 0 0; }
.cs-verdict { font-weight: 600; margin: 0 0 8px; }
.cs-note { font-size: 13.5px; color: var(--text-mid); }
.tr-feedback .ce-explain { margin: 0; }
.cs-opts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cs-opts .tr-opt { font-size: 14.5px; text-align: left; line-height: 1.35; }
@media (max-width: 600px) { .tr-key { min-width: 36px; padding: 7px 8px; } }
