/* A Senha Impossível — game styles on top of the Lab shell (Plotter Index).
   Accent: security red #ef4444. Dark-first (lab default), light supported. */

/* Override the Lab's shared --accent (purple) so the "?" help button + modal
   (both styled via var(--accent) in lab.css) pick up this toy's own color. */
:root { --accent: #ef4444; }

.senha-intro { text-align: center; margin: 0 auto 1.6rem; max-width: 720px; }
.senha-intro__title { font-family: 'Poppins', sans-serif; font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 .45rem; }
.senha-intro__lead { color: var(--text-muted, #94a3b8); font-size: 1.02rem; margin: 0; }

/* ---- game frame internals ---- */
#senha-mount { text-align: left; }
.senha-nojs { color: var(--text-muted, #94a3b8); padding: 1rem; }

.si-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.si-progress { font: 600 .82rem ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted, #94a3b8); }
.si-progress b { color: #ef4444; }
.si-top-actions { display: flex; gap: .45rem; }

.si-btn { display: inline-flex; align-items: center; gap: .38rem; cursor: pointer; border-radius: 999px;
  font: 600 .8rem 'Inter', sans-serif; padding: .42rem .85rem; border: 1px solid rgba(148,163,184,.25);
  background: transparent; color: inherit; transition: border-color .15s, background .15s; }
.si-btn:hover { border-color: #ef4444; }
.si-btn--primary { background: #ef4444; border-color: #ef4444; color: #fff; }
.si-btn--primary:hover { background: #dc2626; }
.si-btn--ghost { opacity: .85; }

/* week strip: the daily challenge (target + word) */
.si-week { margin: 0 0 .9rem; border: 1px dashed rgba(148,163,184,.3); border-radius: 10px; padding: .55rem .8rem; }
.si-week__days { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .3rem; }
.si-week__day { font: 700 .68rem ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted, #94a3b8); border: 1px solid rgba(148,163,184,.25); border-radius: 6px; padding: .18rem .5rem; }
.si-week__day.is-today { color: #fff; background: #ef4444; border-color: #ef4444; }
.si-week__info { margin: 0; font: 600 .72rem ui-monospace, monospace; letter-spacing: .06em;
  color: var(--text-muted, #94a3b8); }
.si-week__info b { color: #ef4444; }

.si-inputwrap { position: sticky; top: 66px; z-index: 5; }
.si-input { width: 100%; box-sizing: border-box; resize: none; overflow: hidden;
  font: 500 1.05rem/1.5 ui-monospace, 'Cascadia Code', monospace;
  color: inherit; background: var(--surface, #0b1120); border: 2px solid rgba(239,68,68,.5);
  border-radius: 12px; padding: .8rem .95rem; outline: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.si-input:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18), 0 6px 24px rgba(0,0,0,.25); }
[data-theme="light"] .si-input { background: #fff; box-shadow: 0 6px 24px rgba(15,23,42,.08); }

.si-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin: .55rem 0 1rem; }
.si-badge { font: 600 .74rem ui-monospace, monospace; letter-spacing: .05em; color: var(--text-muted, #94a3b8);
  border: 1px solid rgba(148,163,184,.22); border-radius: 999px; padding: .22rem .6rem; }
.si-badge.is-ok { color: #34d399; border-color: rgba(52,211,153,.4); }

.si-alert { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem;
  font: 700 .82rem ui-monospace, monospace; letter-spacing: .06em;
  color: #fecaca; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.45);
  border-radius: 10px; padding: .6rem .85rem; animation: si-blink 1s steps(2) 4; }
[data-theme="light"] .si-alert { color: #b91c1c; }
@keyframes si-blink { 50% { border-color: #ef4444; background: rgba(239,68,68,.24); } }

/* ---- rule cards ---- */
.si-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.si-rule { border: 1px solid rgba(148,163,184,.18); border-left-width: 4px; border-radius: 10px;
  padding: .65rem .85rem .7rem; background: color-mix(in srgb, currentColor 2%, transparent);
  animation: si-in .3s ease both; }
.si-rule.is-fail { border-left-color: #ef4444; }
.si-rule.is-pass { border-left-color: #34d399; opacity: .62; }
@keyframes si-in { from { opacity: 0; transform: translateY(-4px); } }

.si-rule__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .18rem; }
.si-rule__num { font: 700 .68rem ui-monospace, monospace; letter-spacing: .14em; color: var(--text-muted, #94a3b8); }
.si-rule__icon i { font-size: 1.02rem; vertical-align: middle; }
.si-rule.is-fail .si-rule__icon { color: #ef4444; }
.si-rule.is-pass .si-rule__icon { color: #34d399; }
.si-rule__text { margin: 0; font-size: .95rem; line-height: 1.5; }
.si-rule__text b { color: #ef4444; font-weight: 700; }
.si-rule.is-pass .si-rule__text b { color: inherit; }

.si-rule__hintbtn { background: none; border: none; cursor: pointer; padding: 0; margin-top: .3rem;
  font: 600 .78rem 'Inter', sans-serif; color: var(--text-muted, #94a3b8); text-decoration: underline dotted; }
.si-rule__hintbtn:hover { color: #ef4444; }
.si-rule__hint { margin: .35rem 0 0; font-size: .85rem; color: var(--text-muted, #94a3b8);
  border-left: 2px solid rgba(148,163,184,.3); padding-left: .6rem; }

/* ---- victory ---- */
.si-victory { margin-top: 1.2rem; text-align: center; border: 1px solid rgba(52,211,153,.4);
  border-radius: 14px; padding: 1.6rem 1.2rem; background: rgba(52,211,153,.06); animation: si-in .45s ease both; }
.si-victory__stamp { font: 700 .7rem ui-monospace, monospace; letter-spacing: .18em; color: #34d399; margin-bottom: .4rem; }
.si-victory__title { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 .3rem; }
.si-victory__sub { color: var(--text-muted, #94a3b8); margin: 0 0 .9rem; }
.si-victory__stats { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem;
  font: 500 .9rem ui-monospace, monospace; color: var(--text-muted, #94a3b8); }
.si-victory__stats b { color: #34d399; }
.si-victory__actions { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
.si-victory__real { margin: 1rem 0 0; font-size: .85rem; color: var(--text-muted, #94a3b8); }
.si-victory__real a { color: #34d399; }

/* ---- edu section ---- */
.senha-edu { max-width: 720px; margin: 2.2rem auto 0; text-align: center; }
.senha-edu__title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.15rem; margin: 0 0 .4rem; }
.senha-edu__text { color: var(--text-muted, #94a3b8); font-size: .95rem; margin: 0 0 .9rem; }
.senha-edu__links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.senha-edu__links a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem;
  color: #ef4444; text-decoration: none; }
.senha-edu__links a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .si-inputwrap { top: 58px; }
  .si-top { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .si-rule, .si-victory, .si-alert { animation: none !important; }
}
