/* Neighborhood Tech Fix, the circuit repair game (/play/tech-fix/). Built from Muse's "Circuit Repair Mission"
   mockup: cream and pale sky, navy ink, pill buttons with hard offset shadows. Uses the site's cabinet (.cab), paper
   (.px) and chunky buttons from site.css. All art is Canva felt stickers (img/techfix/) and the cast cut-outs.
   No blend modes anywhere (iPad Safari paints them gray). */
.tf-hero .ph-art img{width:min(280px,60vw)}
.tf-hero .phero-hills{z-index:0}
#tf-play .torn{padding-top:clamp(60px,7vw,90px);padding-bottom:clamp(170px,16vw,210px)}
.tf-cab{--ink:#1E2B5B;--soft:#EFEAFB;--dash:#B9B3D9;--purple:#7E6BE6;--coral:#F2685E;--mintd:#3E9B6E;--board:#FFFDF6}
.tf-cab .cab-top{gap:8px 18px}
.tf-earned{font-size:16px;letter-spacing:.5px}.tf-earned b{font-size:clamp(24px,2.6vw,30px);color:var(--yellow);letter-spacing:0;margin-left:6px}
.tf-togs{display:flex;gap:8px}
.tf-foot{text-align:center;margin-top:22px;font-family:var(--display);font-weight:800;font-size:19px}

/* the screen */
.tf-screen{background-color:var(--paper);border-radius:18px;color:var(--navy);padding:clamp(14px,2.2vw,26px)}
.tf-h{font-family:var(--display);font-weight:800;font-size:clamp(24px,2.6vw,32px);line-height:1.1}
.tf-h-ic{height:1.4em;width:auto;vertical-align:-.3em;margin-right:8px}
.tf-sub{font-size:18px;line-height:1.4;font-weight:700;margin:4px 0 14px;color:#3F4670}

/* job cards */
.tf-jobs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.tf-job{font:inherit;text-align:left;color:var(--navy);background-color:#fff;border:3px solid var(--navy);border-radius:20px;padding:14px 16px;
  box-shadow:0 6px 0 var(--navy2),0 12px 12px rgba(40,30,20,.18);display:flex;flex-direction:column;gap:6px;cursor:pointer;transition:transform .1s ease}
@media (hover:hover){.tf-job:hover{transform:translateY(-3px)}}
.tf-job:active{transform:translateY(4px);box-shadow:0 2px 0 var(--navy2)}
.tf-job.now{outline:5px solid var(--yellow);outline-offset:3px}
.tf-job.done{background-color:#F3FAF4}
.tf-job-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tf-lvl{font-family:var(--display);font-weight:800;font-size:14px;letter-spacing:.6px;text-transform:uppercase;padding:2px 12px;border-radius:999px;border:2px solid var(--navy)}
.tf-lvl.l1{background-color:#9FDDB8}.tf-lvl.l2{background-color:var(--yellow)}.tf-lvl.l3{background-color:#F7A39C}
.tf-repeat{font-family:var(--display);font-weight:800;font-size:13px;color:var(--purple);background-color:var(--soft);border-radius:999px;padding:1px 10px}
.tf-fixed{font-family:var(--display);font-weight:800;font-size:15px;color:var(--good)}
.tf-job-mid{display:flex;align-items:flex-end;gap:6px;height:84px}
/* round faces (the Reinvention Lab's crops of the cast cut-outs) and the whole cut-out on the "Fixed!" card */
.tf-face{width:72px;height:72px;object-fit:cover;flex:none;border-radius:50%;background-color:var(--sky);border:3px solid var(--navy)}
.tf-body{height:150px;width:auto;flex:none;filter:drop-shadow(0 6px 5px rgba(40,30,20,.22))}
.tf-dev{height:78px;width:auto;max-width:90px;object-fit:contain;filter:drop-shadow(0 4px 3px rgba(40,30,20,.2))}
.tf-job b{font-family:var(--display);font-size:22px;line-height:1.1}
.tf-dev-name{font-weight:800;color:#4A5378;font-size:15px}
.tf-job-ask{font-weight:700;font-size:16px;line-height:1.3}
.tf-focus{margin-top:auto;font-size:14px;font-weight:800;background-color:var(--soft);border-radius:12px;padding:6px 10px;line-height:1.25}

/* the workbench */
.tf-bench{margin-top:26px;background-color:#fff;border:3px solid var(--navy);border-radius:22px;overflow:hidden;box-shadow:0 6px 0 var(--navy2),0 14px 14px rgba(40,30,20,.18);scroll-margin-top:90px}
.tf-bench-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 16px;background-color:var(--soft);border-bottom:3px solid var(--navy)}
.tf-bench-head .tf-face{width:64px;height:64px}
.tf-who-box{flex:1 1 260px;min-width:0}
.tf-who{font-family:var(--display);font-weight:800;font-size:clamp(20px,2vw,25px);line-height:1.1}
.tf-ask{font-weight:700;color:#3F4670;font-size:16px;line-height:1.3}
.tf-chips{display:flex;flex-wrap:wrap;gap:8px}
.tf-chips li{background-color:#fff;border:2px solid var(--navy);border-radius:999px;padding:3px 12px;font-weight:800;font-size:15px;white-space:nowrap}
.tf-chips b{font-family:var(--display);font-size:17px;margin-left:3px}
.tf-work{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(290px,1fr);align-items:start}
.tf-board-zone{position:relative;background-color:var(--board);background-image:radial-gradient(rgba(30,43,91,.08) 1.6px,transparent 2px);background-size:24px 24px;padding:8px;border-right:3px solid var(--navy);min-height:100%;overflow:hidden}
.tf-side{display:flex;flex-direction:column;gap:12px;padding:14px 16px 16px}

/* the board (SVG) */
.tf-svg{display:block;width:100%;height:auto;font-family:Nunito,system-ui,sans-serif}
.tf-svg .seg{stroke:var(--dash);stroke-width:7;stroke-linecap:round;stroke-dasharray:3 12}
.tf-svg .seg.on{stroke:var(--navy);stroke-dasharray:none}
.tf-svg .seg.live{stroke:#FFC929;filter:drop-shadow(0 0 5px rgba(255,201,41,.95))}
.tf-svg .seg.branch{stroke:var(--purple);stroke-width:6;stroke-dasharray:2 11}
.tf-svg .joint{fill:var(--purple)}
.tf-svg .lbl{font-weight:900;font-size:17px;fill:#5E6488}
.tf-svg .lbl.purple{fill:var(--purple)}
.tf-svg .tag rect{fill:var(--paper);stroke:#D9CFB8;stroke-width:2}
.tf-svg .spot{cursor:pointer;outline:none}
.tf-svg .spot .hit{fill:transparent;stroke:none}   /* a bigger tap area than the dashed spot, for small fingers */
.tf-svg .spot .socket{fill:#fff;stroke:var(--dash);stroke-width:3;stroke-dasharray:8 7;transition:stroke .15s}
.tf-svg .spot.filled .socket{stroke:var(--navy);stroke-width:2.5;stroke-dasharray:none}
.tf-svg .spot.fixed{cursor:default}
.tf-svg .spot.fixed .socket{stroke:#D9CFB8;fill:#FFFDF6}
@media (hover:hover){.tf-svg .spot:not(.fixed):hover .socket{stroke:var(--purple);stroke-width:4}}
.tf-svg .spot:focus-visible .socket{stroke:var(--purple);stroke-width:5;stroke-dasharray:none}
.tf-svg .spot.pulse .socket{stroke:var(--coral);stroke-width:6;stroke-dasharray:none;animation:tfpulse .7s ease-in-out infinite alternate}
.tf-svg .plus{stroke:var(--dash);stroke-width:6;stroke-linecap:round}
.tf-svg .scrap.got{transform-box:fill-box;transform-origin:50% 100%;animation:tfgulp .5s ease-out}
@keyframes tfgulp{40%{transform:scale(1.15,.9)}70%{transform:scale(.95,1.06)}}
.tf-svg .dev image,.tf-svg .spot image{transition:filter .3s}
.tf-svg .dev.glow image,.tf-svg .spot.glow image{filter:drop-shadow(0 0 14px rgba(255,214,60,.95)) drop-shadow(0 0 30px rgba(255,214,60,.6))}
.tf-svg .end{fill:var(--purple)}
.tf-svg.hot .bat{animation:tfhot .35s ease-in-out infinite alternate}
.tf-svg.hot .bat image{filter:drop-shadow(0 0 10px rgba(242,80,40,.95)) drop-shadow(0 0 22px rgba(242,104,94,.8))}
@keyframes tfhot{to{transform:translateX(2px)}}
@keyframes tfpulse{from{opacity:1}to{opacity:.4}}

/* the hand, the tray, Noodle's note and the buttons */
.tf-hand{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:8px 12px;border:3px solid var(--navy);border-radius:14px;background-color:var(--yellow);font-weight:800;font-size:16px;line-height:1.3}
.tf-hand[hidden]{display:none}
.tf-tray-label{font-family:var(--display);font-weight:800;font-size:15px;letter-spacing:.4px;color:#4A5378;margin-bottom:8px}
.tf-parts{display:flex;flex-wrap:wrap;gap:10px}
.tf-part{font:inherit;display:inline-flex;align-items:center;gap:8px;min-height:56px;padding:6px 16px 6px 8px;background-color:#fff;color:var(--navy);border:3px solid var(--navy);border-radius:999px;
  box-shadow:0 4px 0 var(--navy2);font-family:var(--display);font-weight:800;font-size:17px;cursor:pointer}
.tf-part img{height:38px;width:auto;max-width:76px;object-fit:contain}
.tf-part:active{transform:translateY(3px);box-shadow:0 1px 0 var(--navy2)}
.tf-part.sel{background-color:var(--yellow);transform:translateY(-2px);box-shadow:0 6px 0 var(--navy2)}
.tf-tray-empty{font-weight:800;color:#4A5378}
.tf-msg{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;background-color:var(--soft);border:2px dashed var(--dash);min-height:76px}
.tf-msg img{width:58px;height:auto;flex:none}
.tf-msg p{font-weight:800;font-size:17px;line-height:1.35}
.tf-msg.good{background-color:#E2F6EA;border:2px solid var(--mintd);color:#14532D}
.tf-pop{animation:tfpop .3s ease-out}
@keyframes tfpop{from{transform:scale(.97);opacity:.6}}
.tf-actions{display:flex;flex-wrap:wrap;gap:12px}
.tf-actions .chunk{font-size:19px;padding:8px 18px}
.tf-actions .tf-test{flex:1 1 100%;font-size:clamp(21px,2vw,24px)}

/* a fixed light */
.tf-success{margin:0 16px 18px;border:3px solid var(--navy);border-radius:20px;background-color:var(--cream);padding:18px 20px;box-shadow:0 5px 0 var(--navy2)}
.tf-success[hidden]{display:none}
.tf-win-top{display:flex;align-items:center;gap:14px}

.tf-success h3{font-family:var(--display);font-weight:800;font-size:clamp(23px,2.4vw,30px);line-height:1.1}
.tf-stars{display:flex;gap:4px;margin:6px 0 2px}
.tf-stars img{width:34px;height:34px}
.tf-stars img.off{opacity:.22}
.tf-review{font-weight:800;font-size:17px}
.tf-pay{margin:12px 0;display:grid;gap:5px;font-weight:800;font-size:17px;max-width:520px}
.tf-pay p{display:flex;justify-content:space-between;gap:14px;border-bottom:2px dotted var(--dash);padding-bottom:4px}
.tf-pay .total{border-bottom:0;font-family:var(--display);font-size:22px}
.tf-pay .total span:last-child{display:inline-flex;align-items:center;gap:6px}
.tf-pay .total img{height:30px;width:auto}
.tf-quote{background-color:#fff;border:3px solid var(--navy);border-radius:16px;padding:12px 16px;font-weight:800;font-size:18px;line-height:1.35;margin:12px 0;max-width:640px}
.tf-quote cite{display:block;margin-top:5px;font-style:normal;font-size:15px;color:#4A5378}
.tf-rep{display:inline-flex;align-items:center;gap:8px;background-color:var(--lilac);border:3px solid var(--navy);border-radius:999px;padding:4px 16px 4px 6px;font-family:var(--display);font-weight:800;font-size:17px;box-shadow:0 3px 0 var(--navy2)}
.tf-rep img{height:38px;width:auto}
.tf-win-btns{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
.tf-conf{position:absolute;top:6%;width:11px;height:15px;border-radius:3px;pointer-events:none;animation:tffall 1.3s ease-in forwards;z-index:5}
@keyframes tffall{to{transform:translateY(260px) rotate(320deg);opacity:0}}

/* the report card */
.tf-report{margin-top:26px;background-color:#fff;border:3px solid var(--navy);border-radius:22px;padding:18px 20px;box-shadow:0 6px 0 var(--navy2);scroll-margin-top:90px}
.tf-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.tf-stats p{background-color:var(--soft);border:2px solid var(--navy);border-radius:16px;padding:10px;text-align:center;display:flex;flex-direction:column;gap:2px}
.tf-stats b{font-family:var(--display);font-size:clamp(26px,2.6vw,32px);line-height:1.1}
.tf-stats span{font-weight:800;font-size:13px;letter-spacing:.4px;text-transform:uppercase;color:#4A5378}
.tf-rows{margin-top:14px;display:grid;gap:6px}
.tf-rows p{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;font-weight:800;font-size:16px;border-bottom:2px dotted var(--dash);padding-bottom:6px}
.tf-rows .dim{color:#6B7190}
.tf-alldone{margin-top:12px;font-family:var(--display);font-weight:800;font-size:22px;color:var(--good)}
.tf-alldone[hidden]{display:none}
.tf-takeaway{margin-top:14px;background-color:var(--yellow);border:3px solid var(--navy);border-radius:16px;padding:12px 16px;font-weight:800;font-size:17px;line-height:1.35;box-shadow:0 4px 0 var(--navy2)}

/* levels (three tabs above the job cards) */
.tf-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.tf-lvtab{font:inherit;display:flex;flex-direction:column;align-items:flex-start;gap:0;text-align:left;color:var(--navy);background-color:var(--paper);border:3px solid var(--navy);border-radius:16px;padding:8px 14px;box-shadow:0 4px 0 var(--navy2);cursor:pointer}
.tf-lvtab b{font-family:var(--display);font-size:20px;line-height:1.1}
.tf-lvtab span{font-weight:800;font-size:15px}
.tf-lvtab small{font-weight:800;font-size:13px;color:#4A5378}
.tf-lvtab.now{background-color:var(--yellow);transform:translateY(-2px);box-shadow:0 6px 0 var(--navy2)}
.tf-lvtab.locked{background-color:#E9E4D6;color:#5E6488;border-style:dashed;box-shadow:none}
.tf-lvtab:active{transform:translateY(3px);box-shadow:0 1px 0 var(--navy2)}

/* the clock, the "done by" time and the early tip */
#tf-time span{font-weight:700;color:#4A5378;margin-left:4px}
#tf-time.over{background-color:#FFE7E2}
#tf-time.over span{text-decoration:line-through}
.tf-chips .tf-early-chip{display:inline-flex;align-items:center;gap:6px;background-color:#E2F6EA;border-color:var(--mintd);color:#14532D}
.tf-chips .tf-early-chip[hidden]{display:none}
.tf-early-chip img{height:24px;width:auto}
.tf-pay .tip span:first-child{display:inline-flex;align-items:center;gap:6px;color:#14532D}
.tf-pay .tip img{height:26px;width:auto}
.tf-early{font-weight:800;font-size:16px;color:#14532D;background-color:#E2F6EA;border-radius:12px;padding:8px 12px;max-width:640px}
.tf-unlock{margin-top:12px;font-family:var(--display);font-weight:800;font-size:22px;color:var(--red)}
.tf-rows .lv{border-bottom:0;padding:8px 0 0;font-family:var(--display);font-size:18px;color:var(--purple)}

/* iPad and smaller: the board on top, the tray and buttons under it */
@media (max-width:1000px){
  .tf-work{grid-template-columns:minmax(0,1fr)}
  .tf-board-zone{border-right:0;border-bottom:3px solid var(--navy)}
}
@media (max-width:760px){
  .tf-jobs{grid-template-columns:minmax(0,1fr);gap:12px}
  .tf-job{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"mid top" "mid who" "mid dev" "ask ask" "focus focus";column-gap:12px;row-gap:3px}
  .tf-job-top{grid-area:top}.tf-job-mid{grid-area:mid;height:auto;align-self:center}.tf-job b{grid-area:who}.tf-dev-name{grid-area:dev}.tf-job-ask{grid-area:ask}.tf-focus{grid-area:focus}
  .tf-job-mid .tf-face{width:58px;height:58px}.tf-job-mid .tf-dev{height:58px}
  .tf-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tf-levels{gap:6px}.tf-lvtab{padding:6px 8px}.tf-lvtab b{font-size:17px}.tf-lvtab span{font-size:13px;line-height:1.15}
  .tf-success{margin:0 10px 14px;padding:14px}
}
@media (max-width:560px){
  .tf-cab{padding:8px}
  .tf-screen{padding:10px 8px}
  .tf-board-zone{padding:0}
  .tf-side{padding:12px 10px 14px}
  .tf-body{height:112px}
}
@media (prefers-reduced-motion:reduce){.tf-svg .spot.pulse .socket,.tf-conf,.tf-pop{animation:none}}
