/* QUIPU: the case screen (tables, editor, result grid), the run progress pips, the result list and the result splash.
   Laptop first: from 1000 px wide the case screen is exactly one viewport tall and never scrolls the page; the tables and the result grid scroll
   INSIDE their own boxes when they are large. Plain boxes with a straight border (not slanted slabs) so tables and code never sit in a skewed edge.
   Text is 16 px or more. */

/* ---- case screen ---- */
#s-call{--hd:60px}
#s-call .hd .t h2{font-size:clamp(28px,3vw,42px)}
#s-call .hd .t{padding:6px 26px}
.pz{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 28px;align-items:stretch;margin-top:2px;min-width:0;flex:1 1 auto;min-height:0}
.pz[hidden]{display:none}
.pz-l,.pz-r{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}
.pz-box,.rv-box{border:3px solid var(--white);background:var(--black);padding:10px 18px 12px;display:flex;flex-direction:column;gap:8px;min-width:0}
.pz-h{font-size:22px;line-height:1.1;color:var(--hue);margin:0}
.pz-q{font-size:22px;font-weight:700;line-height:1.22;margin:0}
.pz-tables{display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:12px;min-height:0;flex:1 1 140px;overflow:auto;padding-right:2px}
.pz-tbl{border:3px solid var(--white);background:var(--black);padding:6px 12px 8px;display:flex;flex-direction:column;gap:6px;min-width:0;flex:0 1 auto;max-width:100%;overflow-x:auto}
.pz-tn{font-family:var(--f-disp);font-size:20px;letter-spacing:.03em;text-transform:uppercase;color:var(--hue);line-height:1.1}
.pz-t{border-collapse:collapse;width:100%;font-family:var(--f-mono);font-size:16px;line-height:1.15}
.pz-t th,.pz-t td{border:1px solid var(--w45);padding:1px 8px;text-align:left;white-space:nowrap;vertical-align:top}
.pz-t th{background:var(--hue);color:var(--black);font-weight:700}
.pz-t .nl{color:var(--w70);font-style:italic}
.pz-more,.pz-keys,.pz-att,.pz-status{font-size:16px;color:var(--w70);margin:0}
.pz-code{font-family:var(--f-mono);font-size:16px;line-height:1.3;white-space:pre-wrap;overflow-wrap:anywhere;border:3px solid var(--white);padding:10px 14px;background:var(--k60);margin:0;max-height:34vh;overflow:auto}
.pz-box .pz-code{border-width:2px}
.pz-in-box{display:flex;flex-direction:column;gap:6px;min-height:0;flex:none}
#pzWrite{flex:1 1 220px}
.pz-lab{display:block;font-weight:700;font-size:18px}
.pz-ed,.pz-in{width:100%;display:block;font-family:var(--f-mono);font-size:17px;line-height:1.45;color:var(--white);background:var(--black);border:3px solid var(--white);padding:10px 14px;border-radius:0;tab-size:2}
.pz-ed{flex:1 1 auto;min-height:110px;resize:none}
.pz-in{max-width:320px}
.pz-ed:focus-visible,.pz-in:focus-visible{outline:3px solid var(--hue);box-shadow:none}
.pz-row{display:flex;gap:14px 20px;flex-wrap:wrap;align-items:center;flex:none}
.pz-att{color:var(--white);font-weight:700}
.pz-ask{display:inline-flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.pz-ask[hidden]{display:none}
.pz-status{color:var(--white);min-height:1.4em;flex:none}
.pz-status.bad{font-weight:700}
.pz-res{flex:1 1 90px;min-height:0;overflow:auto}
.pz-res .pz-t{margin:0}
.pz-res:empty{display:none}

/* run progress */
.pips{list-style:none;margin:0;padding:0;display:flex;gap:8px;align-items:center}
.pips li{width:30px;height:16px;border:3px solid var(--white);background:var(--black);transform:skewX(-14deg)}
.pips li.hit{background:var(--hue);border-color:var(--hue)}
.pips li.miss{background:var(--white);border-color:var(--white)}
.pips li.cur{border-color:var(--hue);box-shadow:0 0 0 3px var(--black),0 0 0 6px var(--white)}

/* result list (calling card) */
.rv-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:10px;max-width:1100px}
.rv-list li{border:3px solid var(--white);background:var(--black);padding:10px 18px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 16px;align-items:start}
.rv-list .rv-st{font-family:var(--f-disp);font-size:22px;letter-spacing:.03em;text-transform:uppercase;padding:2px 12px;border:3px solid var(--white);grid-row:span 2;align-self:start}
.rv-list li.hit .rv-st{background:var(--hue);color:var(--black);border-color:var(--hue)}
.rv-list .rv-t{font-weight:700;font-size:19px}
.rv-list .rv-i{font-size:17px;color:var(--w70)}
.rv-list .rv-m{font-family:var(--f-mono);font-size:16px;white-space:pre-wrap;overflow-wrap:anywhere;grid-column:2}

/* ---- result splash: one per answered case ---- */
.splash{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:25}
.splash[hidden]{display:none}
.splash::before{content:"";position:absolute;inset:0;background:rgba(10,10,10,.62)}
.sp-burst{position:absolute;width:min(78vh,860px);aspect-ratio:1;left:50%;top:50%;translate:-50% -50%;overflow:visible}
.sp-burst .bu{fill:var(--hue);stroke:var(--white);stroke-width:1.4;vector-effect:non-scaling-stroke}
.splash[data-tone="miss"] .sp-burst .bu{fill:var(--white);stroke:var(--hue)}
.sp-slab{position:relative;z-index:2}
.sp-in{transform:skewX(-14deg);background:var(--hue);color:var(--black);border:6px solid var(--white);padding:14px 64px 10px;box-shadow:16px 16px 0 var(--black),16px 16px 0 3px var(--white)}
.splash[data-tone="miss"] .sp-in{background:var(--black);color:var(--white);border-color:var(--hue);box-shadow:16px 16px 0 var(--hue)}
.sp-word{display:block;font-size:clamp(64px,11vw,150px);letter-spacing:.04em;transform:skewX(14deg)}
.sp-frag{position:absolute;left:50%;top:50%;width:46px;height:20px;margin:-10px 0 0 -23px;z-index:1;clip-path:polygon(0 0,100% 18%,84% 100%,10% 82%)}
.sp-frag.a{background:var(--hue)}
.sp-frag.b{background:var(--white)}
.sp-frag.f1{width:30px;height:30px;margin:-15px 0 0 -15px}
.sp-frag.f2{width:64px;height:14px;margin:-7px 0 0 -32px}
.splash[data-tone="miss"] .sp-frag.a{background:var(--w45)}

@media (max-width:1000px){
  .pz{grid-template-columns:minmax(0,1fr);flex:none}
  .pz-tables{overflow:visible;flex:none}
  .pz-res,.pz-code{max-height:none}
}
@media (max-width:700px){
  .pz-box,.rv-box,.pz-tbl{padding:10px 12px}
  .pz-q{font-size:20px}
  .pz-t th,.pz-t td{padding:2px 5px}
  .sp-in{padding:10px 30px 6px}
}
/* from 1000 px wide: exactly one viewport tall, no page scroll (the shell bar is 56 px) */
@media (min-width:1001px){
  #s-call{height:calc(100vh - var(--bar-h, 59px));height:calc(100dvh - var(--bar-h, 59px));min-height:0;overflow:hidden;padding-top:16px;padding-bottom:16px;gap:12px}
}
