/* On Training — Python Básico (complementa /assets/primeiros-passos/pp.css) */
.py-ide { position: absolute; inset: 22px 12px 26px 22px; border-radius: 16px; overflow: hidden; background: #0f172a; color: #e2e8f0; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); display: flex; flex-direction: column; font-family: Consolas, "Courier New", monospace; }
.py-ide-t { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; background: #1e293b; color: #cbd5e1; font: 700 .8rem Inter, sans-serif; }
.py-ide-t i { margin-left: auto; letter-spacing: .6rem; font-style: normal; opacity: .7; }
.py-ide pre { margin: 0; padding: .9rem 1rem; font: 500 .86rem/1.65 Consolas, "Courier New", monospace; white-space: pre; overflow: hidden; }
.py-ide .k { color: #f472b6; } .py-ide .s { color: #fcd34d; } .py-ide .n { color: #7dd3fc; } .py-ide .c { color: #64748b; font-style: italic; } .py-ide .f { color: #86efac; }
.py-ide-o { margin-top: auto; padding: .7rem 1rem; background: #020617; border-top: 1px solid #1e293b; font: 500 .82rem/1.5 Consolas, monospace; color: #86efac; }
.pp-float code { font: 700 .8rem Consolas, monospace; color: #1d4ed8; }

/* sala: páginas de conteúdo */
.py-code { display: block; margin: .9rem 0 0; padding: 1rem 1.1rem; border-radius: 14px; background: #0f172a; color: #e2e8f0; font: 500 .92rem/1.65 Consolas, "Courier New", monospace; overflow: auto; tab-size: 4; white-space: pre; }
.py-when { display: flex; gap: .8rem; margin-top: 1.2rem; padding: 1rem 1.1rem; border-radius: 14px; background: #eff6ff; border: 1px solid #bfdbfe; }
.py-when .ms { color: #1d4ed8; flex: none; }
.py-when p { margin: .2rem 0 0; }
.py-h3 { margin: 1.4rem 0 .5rem; font: 800 1.02rem Manrope, Inter, sans-serif; color: #0f2438; }
.py-keys { display: grid; gap: .6rem; margin: .6rem 0 0; }
.py-keys > div { padding: .75rem .95rem; border: 1px solid #dbe6ee; border-radius: 12px; background: #fff; }
.py-keys dt { font: 700 .92rem Consolas, monospace; color: #1d4ed8; }
.py-keys dd { margin: .2rem 0 0; color: #334a5e; }
.py-exs { display: grid; gap: 1rem; margin-top: .6rem; }
.py-ex { border: 1px solid #dbe6ee; border-radius: 14px; background: #fff; overflow: hidden; }
.py-ex .py-code { margin: 0; border-radius: 0; }
.py-exo { padding: .7rem 1.1rem; background: #020617; color: #86efac; font: 500 .88rem/1.55 Consolas, monospace; white-space: pre-wrap; border-top: 1px solid #1e293b; }
.py-exo b { display: block; margin-bottom: .2rem; font: 700 .68rem Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.py-exw { padding: .75rem 1.1rem; color: #334a5e; }
.py-pits { display: grid; gap: .7rem; margin-top: .8rem; }
.py-pit { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; }
.py-pit .ms { color: #c2410c; flex: none; }
.py-pit p { margin: .2rem 0 0; color: #5b3a1a; }
.py-pit pre { margin: .55rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 500 .84rem/1.55 Consolas, monospace; overflow: auto; }
.py-xl { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; margin: 1rem 0; border: 1px solid #dbe6ee; border-radius: 14px; background: #fff; flex-wrap: wrap; }
.py-xlic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #1d4ed8; }
.py-steps { margin: .8rem 0 0; padding-left: 1.2rem; color: #334a5e; }
.py-steps li { margin: .35rem 0; }
.py-note { display: flex; gap: .5rem; margin-top: 1rem; padding: .7rem .9rem; border-radius: 12px; background: #f1f5f9; color: #334a5e; font-size: .9em; }
.py-chip-code { font: 700 .95em Consolas, "Courier New", monospace; color: #1d4ed8; background: #eff6ff; padding: .05rem .35rem; border-radius: 5px; }

/* laboratório */
.pyl { border: 1px solid #dbe6ee; border-radius: 16px; background: #f8fbfd; padding: .9rem; }
.pyl-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: space-between; }
.pyl-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.pyl-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border: 1px solid #cdd9e3; border-radius: 999px; background: #fff; color: #334a5e; font: 700 .82rem Inter, sans-serif; cursor: pointer; }
.pyl-tab i { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #e2e8f0; font-style: normal; font-size: .75rem; }
.pyl-tab .ms { font-size: 1.15rem; color: #16a34a; }
.pyl-tab.is-on { background: #0b2545; border-color: #0b2545; color: #fff; }
.pyl-tab.is-on i { background: #f4b400; color: #0b2545; }
.pyl-tab.is-on .ms { color: #86efac; }
.pyl-eng { padding: .25rem .65rem; border-radius: 999px; font: 600 .75rem Inter, sans-serif; background: #fff7ed; color: #9a3412; max-width: 100%; }
.pyl-eng.is-ready, .pyl-eng.is-running { background: #e7f8ef; color: #0d5c33; }
.pyl-eng.is-failed { background: #fee2e2; color: #991b1b; }
.pyl-goal { margin-top: .9rem; }
.pyl-goal h4 { margin: 0; font: 800 1.05rem Manrope, Inter, sans-serif; color: #0f2438; }
.pyl-goal h4 em { margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: #e7f8ef; color: #0d5c33; font: 700 .7rem Inter, sans-serif; font-style: normal; }
.pyl-goaltx { margin-top: .4rem; color: #334a5e; line-height: 1.6; }
.pyl-goaltx p { margin: .3rem 0; }
.pyl-goaltx code { font: 700 .9em Consolas, monospace; background: #eff6ff; color: #1d4ed8; padding: .05rem .3rem; border-radius: 4px; }
.pyl-ed { display: flex; margin-top: .8rem; border-radius: 12px; overflow: hidden; background: #0f172a; border: 1px solid #1e293b; }
.pyl-gut, .pyl-ta { margin: 0; padding: .8rem 0; font: 500 .92rem/1.65 Consolas, "Courier New", monospace; }
.pyl-ed { position: relative; height: clamp(180px, 34vh, 300px); }
.pyl-gut { flex: none; width: 2.6rem; padding-right: .6rem; text-align: right; color: #475569; user-select: none; background: #0b1222; overflow: hidden; will-change: transform; box-sizing: border-box; height: max-content; min-height: 100%; }
.pyl-ta { flex: 1; min-width: 0; padding-left: .8rem; padding-right: .8rem; border: 0; outline: none; resize: none; background: transparent; color: #e2e8f0; caret-color: #fcd34d; white-space: pre; overflow: auto; tab-size: 4; box-sizing: border-box; }
.pyl-ed:focus-within { outline: 2px solid #2a8cf0; outline-offset: 1px; }
.pyl-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.pyl-bar .pp-btn { padding: .55rem 1rem; }
.pyl-lnk { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .6rem; border: 0; background: transparent; color: #1d4ed8; font: 700 .85rem Inter, sans-serif; cursor: pointer; border-radius: 8px; }
.pyl-lnk:hover { background: #eaf2fb; }
.pyl-hints { display: grid; gap: .5rem; }
.pyl-hint { display: flex; gap: .55rem; margin: .6rem 0 0; padding: .65rem .85rem; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #5b4510; }
.pyl-hint .ms { color: #b45309; flex: none; }
.pyl-sol { margin-top: .6rem; padding: .7rem .85rem; border-radius: 12px; background: #eef2ff; border: 1px solid #c7d2fe; }
.pyl-sol p { margin: 0 0 .4rem; font-weight: 700; color: #312e81; }
.pyl-sol pre { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 500 .86rem/1.55 Consolas, monospace; overflow: auto; }
.pyl-lab { display: flex; align-items: center; gap: .35rem; margin: 1rem 0 .35rem; font: 700 .72rem Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #52667a; }
.pyl-lab .ms { font-size: 1.1rem; }
.pyl-out { margin: 0; min-height: 3.2rem; max-height: 14rem; padding: .8rem 1rem; border-radius: 12px; background: #020617; color: #86efac; font: 500 .88rem/1.55 Consolas, monospace; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.pyl-out.is-err { color: #fca5a5; }
.pyl-hinterr { display: flex; gap: .55rem; margin-top: .7rem; padding: .7rem .9rem; border-radius: 12px; background: #fff4e5; color: #7a4100; }
.pyl-hinterr .ms { flex: none; }
.pyl-cl { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.pyl-cl li { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; color: #334a5e; }
.pyl-cl li.is-ok { background: #e7f8ef; border-color: #b7e8cc; color: #0d5c33; }
.pyl-cl li.is-ok .ms { color: #16a34a; }
.pyl-cl li.is-no .ms { color: #94a3b8; }
.pyl-tip { margin: .8rem 0 0; font-size: .8rem; color: #64748b; }
.pyl-done { display: flex; align-items: center; gap: .55rem; margin-top: .8rem; padding: .75rem .95rem; border-radius: 12px; background: #e7f8ef; color: #0d5c33; font-weight: 700; }
.pyl-done[hidden] { display: none; }
@media (max-width: 640px) {
  .pyl { padding: .7rem; }
  .pyl-ed { height: clamp(200px, 42vh, 320px); }
  .pyl-ta, .pyl-gut { font-size: .86rem; }
  .pyl-bar .pp-btn { flex: 1 1 auto; justify-content: center; }
  .py-ide { inset: 18px 4px 22px 10px; }
}
.pps-q legend { white-space: pre-wrap; }
.pp-art .pp-f2 { top: 60%; }
@media (max-width: 1020px) { .py-ide { inset: 14px 0 20px 0; } }
@media (max-width: 680px) { .py-ide pre { font-size: .74rem; padding: .7rem .8rem; } .py-ide-o { font-size: .74rem; } }
.pps-main, .pps-art, .pyl, .pyl-body, .pyl-ed { min-width: 0; max-width: 100%; }
.pyl-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
/* sala em telas estreitas: a grade da sala não pode crescer além da tela por causa da barra de ferramentas */
.pps { grid-template-columns: minmax(0, 1fr); }
.pps-top { min-width: 0; }
@media (max-width: 680px) { .pps-tools { flex-wrap: wrap; justify-content: flex-end; min-width: 0; } .pps-top { flex-wrap: wrap; } }

/* Design de Relatórios: modelos de texto e blocos antes/depois */
.py-code.st-model { font: 500 .95rem/1.7 Inter, system-ui, sans-serif; white-space: pre-wrap; background: #eef2ff; color: #1e1b4b; border: 1px solid #c7d2fe; }
.st-before { border-left: 4px solid #94a3b8; }
.st-after { border-left: 4px solid #4338ca; background: #eef2ff; }
.st-bad { border-left: 4px solid #dc2626; background: #fef2f2; margin-top: .6rem; }
