/* NIDO MARK 17.2 · cuestionario progresivo, calendario Liquid Glass, ayuda contextual y componentes compartidos.
   Paleta NIDO (2.4 §4.3). Interfaz clara. El efecto de vidrio nunca reduce la legibilidad: sin backdrop-filter la superficie es opaca. */
:root { --nido-teal: #71D7E3; --nido-mint: #8CCFC1; --nido-coral: #F28C7A; --nido-yellow: #F4C95D; --nido-warm-white: #F8F7F3; --nido-ink: #24343A; --nido-purple: #8F82C4;
  --n172-borde: rgba(36, 52, 58, .14); --n172-sombra: 0 12px 32px rgba(36, 52, 58, .08); --n172-radio: 18px; }
.n172-wiz { background: var(--nido-warm-white); border-radius: 24px; padding: clamp(16px, 4vw, 28px); max-width: 760px; margin: 0 auto; }
.n172-estado { padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--n172-borde); }
.n172-estado.ok { border-color: var(--nido-mint); } .n172-estado.warn { border-color: var(--nido-yellow); } .n172-estado.err { border-color: var(--nido-coral); }
.n172-estado:empty { display: none; }
.n172-prog { height: 8px; background: rgba(36, 52, 58, .08); border-radius: 99px; overflow: hidden; margin: 10px 0 12px; }
.n172-prog span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--nido-mint), var(--nido-teal)); border-radius: 99px; transition: width .4s ease; }
.n172-nav { width: 0; min-width: 100%; display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.n172-nav-b { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--n172-borde); background: #fff; color: var(--nido-ink); border-radius: 99px; padding: 6px 12px 6px 6px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 36px; }
.n172-nav-b .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(36, 52, 58, .07); font-weight: 700; font-size: .8rem; }
.n172-nav-b.is-act { border-color: var(--nido-teal); box-shadow: 0 0 0 3px rgba(113, 215, 227, .35); font-weight: 700; }
.n172-nav-b.is-ok .n { background: var(--nido-mint); }
.n172-nav-b:disabled { opacity: .55; cursor: default; }
.n172-cuerpo { min-height: 220px; padding: 8px 0 4px; }
.n172-sec { text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.n172-q { margin: 0 0 22px; }
.n172-q-t { font-size: clamp(1.1rem, 3.6vw, 1.35rem); font-weight: 700; color: var(--nido-ink); margin: 0 0 6px; line-height: 1.3; display: block; }
.n172-q-d { margin: 0 0 10px; max-width: 60ch; }
.n172-sel, .n172-cal-btn, .n172-md-btn { min-height: 48px; font-size: 1rem; width: 100%; max-width: 420px; }
/* segmentados y casillas: grandes para tocar; lo elegido se marca con borde, fondo y ✓ (no solo color) */
.n172-seg, .n172-cas { display: flex; flex-wrap: wrap; gap: 8px; }
.n172-sg, .n172-ca { position: relative; }
.n172-sg input, .n172-ca input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.n172-sg span, .n172-ca span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--n172-borde); border-radius: 14px; background: #fff; cursor: pointer; font-size: .98rem; }
.n172-sg input:checked + span, .n172-ca input:checked + span { border-color: var(--nido-teal); background: rgba(113, 215, 227, .18); font-weight: 600; }
.n172-sg input:checked + span::before, .n172-ca input:checked + span::before { content: '✓'; font-weight: 700; }
.n172-sg input:focus-visible + span, .n172-ca input:focus-visible + span { outline: 3px solid var(--nido-ink); outline-offset: 2px; }
.n172-ord { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; max-width: 520px; }
.n172-ord li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--n172-borde); }
.n172-ord li.is-primera { border: 2px solid var(--nido-yellow); background: rgba(244, 201, 93, .14); }
/* desplegable con casillas + resumen en etiquetas */
.n172-md { position: relative; max-width: 520px; }
.n172-md-btn { display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; }
.n172-md-l { position: absolute; z-index: 30; left: 0; right: 0; margin-top: 6px; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--n172-borde); border-radius: 16px; box-shadow: var(--n172-sombra); padding: 6px; }
.n172-md-o { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.n172-md-o:hover, .n172-md-o:focus-within { background: rgba(113, 215, 227, .14); }
.n172-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.n172-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 99px; background: rgba(140, 207, 193, .25); font-size: .88rem; }
.n172-chip-x { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
/* ayuda «?» */
.n172-ayuda-w { position: relative; display: inline-block; flex: none; }
.n172-ayuda { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--nido-ink); background: #fff; color: var(--nido-ink); font-weight: 700; cursor: pointer; line-height: 1; }
.n172-ayuda:focus-visible { outline: 3px solid var(--nido-teal); outline-offset: 2px; }
.n172-ayuda-pop { position: absolute; z-index: 40; top: 34px; left: -8px; width: min(300px, 80vw); background: #fff; color: var(--nido-ink); border: 1px solid var(--n172-borde); border-radius: 14px; box-shadow: var(--n172-sombra); padding: 10px 12px; font-size: .92rem; line-height: 1.4; }
/* calendario Liquid Glass */
.n172-cal-w { position: relative; max-width: 420px; }
.n172-cal-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; }
.n172-cal { position: absolute; z-index: 35; top: 54px; left: 0; width: min(340px, calc(100vw - 32px)); padding: 14px; color: var(--nido-ink);
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .85); border-radius: 24px;
  box-shadow: 0 12px 32px rgba(36, 52, 58, .12), inset 0 1px rgba(255, 255, 255, .8); animation: n172-in .18s ease-out; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .n172-cal { background: #fff; } }
.n172-cal-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.n172-cal-sel { font: inherit; font-weight: 600; border: 1px solid var(--n172-borde); border-radius: 10px; padding: 6px 8px; background: rgba(255, 255, 255, .9); color: var(--nido-ink); min-height: 36px; }
.n172-cal-nav { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--n172-borde); background: rgba(255, 255, 255, .9); font-size: 1.2rem; cursor: pointer; color: var(--nido-ink); }
.n172-cal-nav:disabled { opacity: .35; cursor: default; }
.n172-cal-sem, .n172-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.n172-cal-sem span { font-size: .78rem; font-weight: 700; opacity: .7; padding: 4px 0; }
.n172-cal-d { min-height: 38px; border: 0; border-radius: 12px; background: transparent; font: inherit; cursor: pointer; color: var(--nido-ink); }
.n172-cal-d:hover:not(:disabled) { background: rgba(113, 215, 227, .25); }
.n172-cal-d.is-hoy { box-shadow: inset 0 0 0 1.5px var(--nido-mint); }
.n172-cal-d.is-sel { background: var(--nido-teal); color: var(--nido-ink); font-weight: 700; }
.n172-cal-d:disabled { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.n172-cal-d:focus-visible, .n172-cal-sel:focus-visible, .n172-cal-nav:focus-visible { outline: 3px solid var(--nido-ink); outline-offset: 1px; }
.n172-cal-pie { margin-top: 10px; }
@keyframes n172-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* resumen final */
.n172-res-g { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 10px 0 16px; }
.n172-res { padding: 14px; border-radius: 16px; background: #fff; }
.n172-res h3 { font-size: 1rem; }
.n172-pie { margin-top: 12px; gap: 10px; flex-wrap: wrap; }
.n172-pie .btn { min-height: 48px; }
.linklike { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
/* insignias del plan (procedencia docente, estado de ejecución) */
.n172-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; border: 1px solid var(--n172-borde); background: #fff; }
.n172-badge.docente { border-color: var(--nido-purple); color: #4b3f86; background: rgba(143, 130, 196, .12); }
.n172-badge.curso { border-color: var(--nido-teal); }
@media (max-width: 560px) { .n172-wiz { border-radius: 18px; } .n172-pie { position: sticky; bottom: 0; background: var(--nido-warm-white); padding: 10px 0; } .n172-pie .btn { flex: 1; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .n172-prog span, .n172-cal { transition: none; animation: none; } }
/* vista previa de la actividad (2.5): portada del adulto en un marco aislado, solo lectura */
.n172-portada-w { width: 100%; overflow: hidden; border: 1px solid var(--n172-borde); border-radius: 12px; background: #fff; }
.n172-portada { display: block; width: 816px; height: 1054px; border: 0; transform-origin: 0 0; background: #fff; }
.n172-ej { margin: 10px 0 6px; font-weight: 600; }
.n172-gracias { font-size: 1.1rem; font-weight: 600; padding: 12px 0; }
.n172-obs .n172-seg, .n172-obs .n172-cas { gap: 6px; }
/* 2.10 · acceso por rol en la cabecera: «Mi espacio docente» en morado NIDO, minimalista y con el texto visible.
   Anula la regla de MARK 17 que ocultaba el texto por debajo de 1440 px; solo se compacta el relleno. En ≤ 860 px el botón
   sale de la barra y queda en el menú con su texto completo (como ya hacía MARK 17). */
.btn-espdoc { background: rgba(143, 130, 196, .12); color: #463A80; border: 1.5px solid var(--nido-purple); }
.btn-espdoc:hover { background: rgba(143, 130, 196, .22); color: #3A2F6E; }
.btn-espdoc svg { color: var(--nido-purple); }
.btn-espdoc:focus-visible { outline: 3px solid var(--nido-purple); outline-offset: 2px; }
@media (max-width: 1440px) { .hdr-actions .acct-rol .btn span { display: inline; } .hdr-actions .acct-rol .btn { padding-inline: 12px; white-space: nowrap; } }
@media (max-width: 1180px) { .hdr-actions .acct-rol .btn { padding-inline: 9px; font-size: .84rem; } }
