/* "[Tu IA] atento" (20-11): un solo switch en tres lugares.
 * Biblioteca (al pie del menú, "lado"), Contenido a escala (tarjeta arriba de la cola) y la revisión /v (fila al lado del contador, 22-11).
 * Lo cargan app.html, escala.html y v.html; app-atento.js lo agrega solo si una página se lo olvida. */
.at-caja { position: relative; }
.at-sw { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; transition: background .15s; }
.at-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.at-sw[aria-checked="true"] { background: var(--green); }   /* 23-11 · Emi: prendido = verde, como en el iPhone */
.at-sw[aria-checked="true"]::after { transform: translateX(16px); }
.at-sw[disabled] { opacity: .5; cursor: default; }
.at-ind { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--mono); color: var(--ink-mute); white-space: nowrap; }
.at-led { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.at-ind.vivo { color: #157a3e; }
.at-ind.vivo .at-led { background: var(--green); animation: at-latido 1.6s ease-out infinite; }
@keyframes at-latido { 0% { box-shadow: 0 0 0 0 rgba(34, 165, 90, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 165, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .at-ind.vivo .at-led { animation: none; } }
/* 23-11 · prendido pero la compu no avisó en los últimos 45 s (dormida, o el ayudante haciendo otra cosa): igual verde, sin latir */
.at-ind.on { color: #157a3e; }
.at-ind.on .at-led { background: var(--green); }
/* 21-11 · "trabajando en lo que pediste" (dorado, hasta que vuelve a escuchar) e "Ir al chat" */
.at-ind.trab { color: #92400E; }
.at-ind.trab .at-led { background: #D97706; animation: at-trab 1.6s ease-out infinite; }
@keyframes at-trab { 0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(217, 119, 6, 0); } }
@media (prefers-reduced-motion: reduce) { .at-ind.trab .at-led { animation: none; } }
.irchat { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.irchat:hover { text-decoration: underline; text-underline-offset: 3px; }
.at-card .irchat { margin-top: 8px; }
.at-card { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; }
.at-t { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.at-t h2 { margin: 0; font: 400 26px/1 var(--serif); letter-spacing: -.01em; }
.at-sub { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; max-width: 62ch; }
.at-card.off .at-sub { color: var(--ink-mute); }
.at-der { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.at-tip { position: absolute; z-index: 40; top: calc(100% + 14px); right: 0; width: 280px; max-width: calc(100vw - 48px); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); padding: 26px 26px 22px; display: grid; gap: 14px; animation: popin .2s ease-out; }
.at-tip::before { content: ""; position: absolute; top: -7px; right: 30px; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); box-shadow: -1px -1px 0 var(--line); }
.at-tip h3 { margin: 0; font: 400 24px/1.1 var(--serif); }
.at-tip p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.at-tip-pie { display: flex; justify-content: flex-end; margin-top: 6px; }
.at-lado { margin: 0 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; display: grid; gap: 9px; justify-items: start; }
.at-lado .at-r { display: flex; align-items: center; gap: 10px; justify-content: space-between; width: 100%; }
.at-nom { font-size: 13.5px; font-weight: 500; }
@media (max-width: 860px) {
  .at-card { grid-template-columns: minmax(0, 1fr); }
  .at-der { justify-content: flex-start; }
  .at-tip { right: auto; left: 0; }
  .at-tip::before { right: auto; left: 30px; }
}
/* 22-11 · revisión /v: a la derecha del contador de tiempo, debajo del video (Emi: "por qué no lo pondrías acá?") */
/* Tarjeta chica, del mismo estilo que "Para la IA": nombre y estado a la izquierda, switch a la derecha */
.at-fila { display: flex; align-items: center; gap: 16px; width: 100%; box-sizing: border-box; padding: 13px 14px 13px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(21, 20, 18, .04); text-align: left; }
.at-fila .at-txt { display: grid; gap: 5px; min-width: 0; flex: 1; }
.at-fila .at-nom { font: 600 14px/1.2 var(--sans); color: var(--ink); }
.at-fila .at-ind { font: 400 12.5px/1.3 var(--sans); white-space: normal; }
.at-fila .at-sw { margin-left: auto; }
/* 23-11 · lo que va haciendo la IA en la compu, paso a paso, y dónde quedó (Emi: "¿dónde es que Claude edita ese video?") */
.at-prog { margin-top: 10px; display: grid; gap: 5px; justify-items: start; }
.at-paso { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.at-prog .at-led { background: #D97706; animation: at-trab 1.6s ease-out infinite; }
.at-prog.listo .at-paso::before { content: "✓"; color: #157a3e; font-weight: 600; }
.at-prog.fallo .at-paso { color: #9a3412; }
.at-prog.listo .at-led, .at-prog.fallo .at-led { display: none; }
.at-meta { font-size: 13px; color: var(--ink-mute); overflow-wrap: anywhere; }
.at-pasos { font-size: 13px; color: var(--ink-soft); }
.at-pasos summary { cursor: pointer; color: var(--ink-mute); }
.at-pasos ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 3px; }
@media (prefers-reduced-motion: reduce) { .at-prog .at-led { animation: none; } }
/* 23-11 · «Ver en Claude Code» (chat nuevo que lee lo que hizo Claude atento), avisos por tanda y Windows */
.at-cc svg.i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.at-fila .at-cc { margin-top: 2px; font-size: 12.5px; }
.at-av { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 10px; padding: 0; border: 0; background: none; font: 600 13px/1.3 var(--sans); color: var(--brand); cursor: pointer; text-align: left; }
.at-av:hover { text-decoration: underline; text-underline-offset: 3px; }
.at-lado .at-av { margin-top: 0; font-size: 12.5px; }
.at-av svg.i, .at-av-nota svg.i { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.at-av-nota { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--ink-mute); }
.at-av-nota.on { color: #157a3e; }
.at-win { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); max-width: 62ch; }
.at-win b { font-weight: 600; color: var(--ink); }
/* 23-11 · «Revisar → · Mostrar en Finder» en la tarjeta */
.at-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
button.at-finder { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand); cursor: pointer; }
