/* Formulario de colaboración: progreso, formulario y mensajes. Todo bajo .fe para no afectar al resto. */

.fe {
    --fe-ink: #10233a;
    --fe-muted: #5a6b7e;
    --fe-line: #d5e1ee;
    --fe-primary: #0b5cad;
    --fe-primary-soft: #e8f1fb;
    --fe-ok: #067647;
    --fe-err: #b42318;
    color: var(--fe-ink);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}
.fe *, .fe *::before, .fe *::after { box-sizing: border-box; }

/* --- Progreso ------------------------------------------------------------------------------------ */
.fe-progreso { margin-bottom: 26px; }
.fe-progreso__titulo { margin: 0 0 12px; font-size: 1.05rem; }
.fe-progreso__titulo strong { font-size: 1.7rem; font-weight: 800; color: var(--fe-primary); }
.fe-progreso__faltan { color: var(--fe-muted); }

.fe-bar { position: relative; height: 14px; border-radius: 999px; background: #fff; border: 1px solid var(--fe-line); overflow: visible; }
.fe-bar > i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 0; border-radius: 999px; background: linear-gradient(90deg, #0f766e, #0b5cad); transition: width .6s ease; }
.fe-tick { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: #9fb0c3; }
.fe-tick.is-hecho { background: #0f766e; }
.fe-tick.is-siguiente { background: var(--fe-primary); }

.fe-hitos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.fe-hitos li { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border: 1px solid var(--fe-line); border-radius: 12px; background: #fff; font-size: .88rem; color: var(--fe-muted); }
.fe-hitos li b { font-size: 1.25rem; font-weight: 800; color: var(--fe-ink); }
.fe-hitos li.is-hecho { border-color: #9bd7bd; background: #effaf4; }
.fe-hitos li.is-hecho b::after { content: " ✓"; color: var(--fe-ok); }
.fe-hitos li.is-siguiente { border-color: #7db4ea; background: var(--fe-primary-soft); }
.fe-hitos li.is-siguiente b { color: var(--fe-primary); }
.fe-nota { margin: 14px 0 0; font-size: .9rem; color: var(--fe-muted); }

.fe-esp { margin-top: 14px; border: 1px solid var(--fe-line); border-radius: 12px; background: #fff; }
.fe-esp > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.fe-esp > summary::-webkit-details-marker { display: none; }
.fe-esp > summary::marker { content: ""; }
.fe-esp > summary::after { content: ""; width: 9px; height: 9px; margin: -3px 4px 0 auto; border-right: 2px solid var(--fe-primary); border-bottom: 2px solid var(--fe-primary); transform: rotate(45deg); transition: transform .2s; }
.fe-esp[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.fe-esp__resumen { color: var(--fe-muted); font-size: .86rem; font-weight: 500; }
.fe-esp ul { margin: 0; padding: 4px 16px 12px; list-style: none; display: grid; gap: 4px; }
.fe-esp li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 44px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: .92rem; }
.fe-esp li.is-actual { background: var(--fe-primary-soft); font-weight: 700; }
.fe-esp__nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-mini { display: block; height: 8px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.fe-mini i { display: block; height: 100%; border-radius: 999px; background: #9fb0c3; }
.fe-esp li.is-listo .fe-mini i { background: #0f766e; }
.fe-esp li b { text-align: right; font-variant-numeric: tabular-nums; color: var(--fe-muted); font-weight: 600; }
.fe-esp li.is-listo b { color: var(--fe-ok); }

/* --- Formulario ------------------------------------------------------------------------------------ */
.fe-form { display: grid; gap: 16px; max-width: 520px; }
.fe-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.fe-field label, .fe-field legend { display: block; margin: 0 0 5px; padding: 0; font-weight: 700; font-size: .95rem; }
.fe-field small { display: block; margin-top: 4px; color: var(--fe-muted); font-size: .85rem; }
.fe .fe-form select, .fe .fe-form input[type="text"], .fe .fe-form input[type="email"] {
    width: 100%; margin: 0; padding: 11px 13px; border: 1px solid #b9cde3; border-radius: 10px; background: #fff; color: var(--fe-ink);
    font: inherit; font-size: 1rem; box-shadow: none; max-width: 100%;
}
.fe .fe-form select:focus, .fe .fe-form input:focus { outline: 3px solid #7db4ea; outline-offset: 1px; border-color: var(--fe-primary); }
.fe-radios { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.fe-radios legend { width: 100%; }
.fe-radios label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; cursor: pointer; }
.fe .fe-check, .fe .fe-check span { font-weight: 400; }
.fe-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--fe-muted); line-height: 1.5; cursor: pointer; }
.fe-check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; }
.fe-check a { color: var(--fe-primary); }
.fe-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fe .fe-btn {
    justify-self: start; padding: 12px 26px; border: 0; border-radius: 12px; background: var(--fe-primary); color: #fff;
    font: inherit; font-weight: 750; font-size: 1rem; cursor: pointer; box-shadow: none; transition: background .15s, transform .15s;
}
.fe .fe-btn:hover { background: #083e78; transform: translateY(-1px); }
.fe .fe-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.fe-msg { margin: 0; padding: 12px 16px; border-radius: 10px; font-size: .95rem; line-height: 1.5; }
.fe-msg[hidden] { display: none; }
.fe-msg.is-ok { background: #effaf4; border: 1px solid #9bd7bd; color: #064e2f; }
.fe-msg.is-error { background: #fef1f0; border: 1px solid #f3b6b0; color: #7a1c14; }

@media (max-width: 520px) {
    .fe-esp li { grid-template-columns: minmax(0, 1fr) 60px 42px; gap: 8px; }
    .fe .fe-btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .fe * { transition: none !important; } }
