/* ============================================================
   AA — week 13 animation styles (anim-w13.js). Theme tokens only.
   ============================================================ */
.w13 .seg { flex-wrap: wrap; max-width: 100%; }
.w13 .anim-table { min-width: 0; }
.w13 .anim-table td { white-space: nowrap; }
.w13-sub { margin-top: 1rem; }

/* Task 1 tiles */
.w13-tiles { position: relative; height: 70px; margin: .4rem auto 0; max-width: 440px; }
.w13-tile { position: absolute; top: 12px; height: 48px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.5rem; color: var(--heading);
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: 10px;
  transition: left .45s cubic-bezier(.5,.1,.3,1.2), transform .25s ease, border-color .2s, background .2s; }
.w13-tile.cmp { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-10px); }
.w13-tile.ok { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-10px); }
.w13-tile.swp { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-10px); }
.w13-tile.fin { border-color: var(--green); color: var(--green); }
.w13-log { font-family: var(--font-mono); font-size: .72rem; margin: .5rem 0 .8rem; padding-left: 1.2rem; line-height: 1.7; list-style: none; }
.w13-log li::before { content: "✎ "; color: var(--muted); }
.w13-you { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .4rem; }
.anim .w13 input[type=number], .w13 .anim-opts input[type=number] { width: 7.5rem; }

/* Task 3 bars */
.w13-vb { height: 150px; }
.w13-vb .vb { transition: height .15s ease, background .15s; }

/* Task 4 toggles */
.anim button.w13-tog { border-color: var(--border-strong); }
.anim button.w13-tog::before { content: ""; display: inline-block; width: .7rem; height: .25rem; border-radius: 2px; margin-right: .4rem; vertical-align: middle; background: var(--w13c); }
.anim button.w13-tog[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.w13-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; }

/* Task 5 cards */
.w13-hand { position: relative; height: 46px; margin-top: .2rem; }
.w13-hand .w13-card { position: absolute; top: 0; width: calc(12.5% - 6px); margin-left: 3px; transition: left .35s ease; }
.w13-slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.w13-card { height: 40px; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: .9rem; color: var(--heading);
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-soft); transition: background .2s, border-color .2s, opacity .2s; }
.w13-card.lift { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 4px 0 var(--accent-soft); }
.w13-card.gap { border-style: dashed; background: transparent; }
.w13-card.sorted { border-color: var(--green); }
.w13-card.bad { border-color: var(--red); background: var(--red-soft); }
.w13-card.good { border-color: var(--green); background: var(--green-soft); }
.w13-card.gold { border-color: var(--accent); background: var(--accent-soft); }
.w13-card.fin { border-color: var(--green); color: var(--green); }
.w13-per { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-top: .6rem; min-height: 1.2em; overflow-wrap: anywhere; }
.w13-per b { color: var(--heading); }

/* Task 6 people */
.w13-people { position: relative; max-width: 460px; }
.w13-pc { position: absolute; left: 0; right: 0; height: 36px; display: flex; align-items: center; gap: .6rem; padding: 0 .6rem;
  border: 1px solid var(--border-strong); border-left: 4px solid var(--w13c); border-radius: 8px; background: var(--bg-soft);
  font-family: var(--font-mono); font-size: .76rem; transition: top .6s cubic-bezier(.5,.1,.3,1.1), box-shadow .2s; }
.w13-pc.sw { box-shadow: 0 0 0 2px var(--accent); }
.w13-badge { font-size: .64rem; color: var(--bg); background: var(--w13c); border-radius: 4px; padding: .05rem .3rem; }
.w13-pc .nm { color: var(--heading); min-width: 3.6rem; }
.w13-pc .gr { color: var(--w13c); font-weight: 700; }
.w13-pc .ky { margin-left: auto; color: var(--muted); font-size: .66rem; }
.w13-verdict { font-family: var(--font-mono); font-size: .72rem; margin-top: .7rem; line-height: 1.8; }
.w13-verdict .ok { color: var(--green); }
.w13-verdict .no { color: var(--red); }

@media (max-width: 560px) {
  .w13 .anim-table { font-size: .64rem; }
  .w13 .anim-table th, .w13 .anim-table td { padding: .3rem .25rem; }
  .w13-slots { gap: 3px; }
  .w13-hand .w13-card { width: calc(12.5% - 3px); margin-left: 1px; }
  .w13-card { font-size: .78rem; }
}
.w13-words td:nth-child(3) { white-space: normal; text-align: left; }
.w13-words th:nth-child(3) { text-align: left; }
@media (max-width: 560px) {
  .w13-words th:nth-child(3), .w13-words td:nth-child(3) { display: none; }
  .w13-words td:last-child { white-space: normal; }
}
.w13 .anim-table th { white-space: normal; }
.w13-mr { display: none; }
@media (max-width: 560px) {
  .w13-dbl th:nth-child(3), .w13-dbl td:nth-child(3), .w13-dbl th:nth-child(5), .w13-dbl td:nth-child(5) { display: none; }
  .w13-mr { display: block; font-size: .95em; }
  .w13-pct th:nth-child(4), .w13-pct td:nth-child(4) { display: none; }
}
.w13-verdict .nm { color: var(--blue); }
