/* print.css — reproduces the approved paper stat sheet, auto-filled.
   On screen #printRoot is hidden; @media print hides the app and shows the sheets. */

#printRoot{ display:none; }

@media screen{
  /* keep it out of the way entirely until printing */
  #printRoot{ display:none !important; }
}

@media print{
  @page{ size:Letter landscape; margin:0.3in; }
  #app, #tabbar, #appbar, #toast{ display:none !important; }
  html,body{ background:#fff !important; }
  #printRoot{ display:block !important; }
  .sheet{ break-after:page; }
  .sheet:last-child{ break-after:auto; }
}

/* ---- sheet (mirrors coach-match-tracker.html) ---- */
#printRoot{
  --blue:#2563eb; --blue-t:#eef3ff; --orange:#ea580c; --orange-t:#fff2e8;
  --purple:#7c3aed; --purple-t:#f4effd; --green:#15803d; --green-t:#ecf7ef;
  --slate:#334155; --slate-t:#eef1f5; --ink:#1f1f1f; --alert:#dc2626; --alert-t:#fde3e3;
  --line:rgba(0,0,0,.10); --row-h:29px; --cell-h:22px;
  --avg-fill:#cfe0ff; --avg-line:#8fb0ef; --eff-fill:#ffe2cc; --eff-line:#f0b483;
  font-family:'Helvetica Neue',Arial,sans-serif; color:#1a1a1a;
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
}
#printRoot *{ box-sizing:border-box; margin:0; padding:0; }
.sheet{ width:10.4in; height:7.9in; margin:0 auto 18px; background:#fff; display:flex; flex-direction:column; overflow:hidden; }

.sheet .zhd{ display:flex; justify-content:space-between; align-items:baseline; padding:3px 8px; color:#fff; font-size:10px; font-weight:800; letter-spacing:.04em; }
.sheet .zhd .h{ font-size:8px; font-weight:600; opacity:.9; }
.sheet .ch{ display:flex; font-size:7.5px; font-weight:700; color:#555; padding:2px 8px; border-bottom:1px solid rgba(0,0,0,.18); text-transform:uppercase; letter-spacing:.03em; }
.sheet .row{ display:flex; align-items:center; padding:0 8px; border-bottom:1px solid var(--line); height:var(--row-h); }
.sheet .row:last-child{ border-bottom:none; }
.sheet .nm{ flex:0 0 92px; font-size:10.5px; } .sheet .nm b{ font-weight:800; }
.sheet .nm s{ text-decoration:none; font-size:7.5px; color:#777; margin-left:3px; }
.sheet .strip{ flex:1; display:flex; height:var(--cell-h); border:1px solid rgba(0,0,0,.16); border-radius:3px; background:#fff; margin-right:3px; }
.sheet .strip i{ flex:1; border-right:1px dotted rgba(0,0,0,.22); font-style:normal; font-size:11px; font-weight:700; text-align:center; line-height:var(--cell-h); }
.sheet .strip i:last-child{ border-right:none; }
.sheet .b{ flex:0 0 28px; height:var(--cell-h); border:1px solid rgba(0,0,0,.18); border-radius:3px; margin-left:3px; background:#fff; text-align:center; font-size:11px; font-weight:800; line-height:var(--cell-h); }
.sheet .b.avg{ background:var(--avg-fill); border-color:var(--avg-line); }
.sheet .b.eff{ background:var(--eff-fill); border-color:var(--eff-line); flex:0 0 34px; }
.sheet .t{ flex:1; height:var(--cell-h); border:1px solid rgba(0,0,0,.14); border-radius:3px; margin-left:3px; background:#fff; text-align:center; font-size:11px; font-weight:700; line-height:var(--cell-h); }
.sheet .alert{ background:var(--alert-t) !important; border-color:#e8a3a3 !important; color:var(--alert); }

.sheet .z-rec .zhd{background:var(--blue);}   .sheet .z-rec{background:var(--blue-t);}
.sheet .z-att .zhd{background:var(--orange);} .sheet .z-att{background:var(--orange-t);}
.sheet .z-srv .zhd{background:var(--purple);} .sheet .z-srv{background:var(--purple-t);}
.sheet .z-def .zhd{background:var(--green);}  .sheet .z-def{background:var(--green-t);}
.sheet .z-opp .zhd{background:var(--slate);}  .sheet .z-opp{background:var(--slate-t);}
.sheet .z-scout .zhd{background:#111;}        .sheet .z-scout{background:#f6f6f6;}
.sheet .z-note .zhd{background:#555;}         .sheet .z-note{background:#fafafa;}
.sheet .rule{ flex:1 1 auto; background:repeating-linear-gradient(#fafafa,#fafafa 23px,#e6e6e6 24px); }
.sheet #attRows .row, .sheet #defRows .row{ flex:1 1 0; height:auto; min-height:0; }

.sheet .shd{ background:#fff; color:#1a1a1a; display:flex; align-items:stretch; flex:0 0 auto; border-bottom:2px solid var(--ink); }
.sheet .shd .ttl{ background:var(--ink); color:#fff; padding:6px 12px; white-space:nowrap; }
.sheet .shd .ttl b{ font-size:15px; letter-spacing:.02em; display:block; }
.sheet .shd .ttl span{ font-size:7.5px; letter-spacing:.14em; color:#bbb; }
.sheet .shd .fld{ flex:1; padding:5px 9px; border-right:1px solid #d8d5cd; }
.sheet .shd .fld:last-child{ border-right:none; }
.sheet .shd .fld .lab{ font-size:7.5px; letter-spacing:.1em; color:#666; }
.sheet .shd .fld .ln{ border-bottom:1px solid #9a9a9a; min-height:14px; margin-top:5px; font-size:12px; font-weight:800; color:#1a1a1a; }

.sheet .rot{ display:flex; background:#fff; color:#1a1a1a; align-items:stretch; flex:0 0 auto; border-bottom:1px solid var(--line); }
.sheet .rot .rlab{ font-size:8.5px; font-weight:800; letter-spacing:.07em; padding:6px 9px; background:var(--ink); color:#fff; display:flex; align-items:center; }
.sheet .rot .rc{ flex:1; border-right:1px solid #d8d5cd; padding:4px 8px; font-size:8.5px; font-weight:700; color:#555; text-align:center; }
.sheet .rot .rc b{ display:block; font-size:13px; color:#1a1a1a; }
.sheet .rot .rh{ font-size:7.5px; color:#999; padding:0 9px; display:flex; align-items:center; }

.sheet .body{ flex:1 1 auto; display:grid; grid-template-columns:1fr 1fr 1fr; }
.sheet .body > .col{ border-right:1px solid rgba(0,0,0,.12); display:flex; flex-direction:column; }
.sheet .body > .col:last-child{ border-right:none; }

.sheet .foot{ flex:0 0 auto; display:flex; justify-content:space-between; align-items:center; padding:5px 10px; border-top:2px solid var(--ink); font-size:9px; color:#444; gap:14px; }
.sheet .foot .key b{ color:#222; } .sheet .foot .legend{ display:flex; gap:12px; flex-wrap:wrap; }
.sheet .foot .legend span{ display:inline-flex; align-items:center; gap:4px; }
.sheet .foot .legend i{ width:10px; height:10px; border-radius:2px; display:inline-block; }
