/* THE CARD REPORT'S OWN LAYOUT (2026-10-09).

   Only the page: every card here is drawn by the game's own .pc-* rules
   in style.css. What this file does is put three of them across a sheet
   of US Letter and keep a card from being sawn in half by a page break.

   THE CARD'S REAL SIZE IS 2.5in x 3.5in -- the stock the league prints
   on. The in-game panel sizes a card to the panel; a sheet of paper has
   its own opinion, so the width here is fixed and the height is left to
   the content, which keeps the dice table legible at 3-up (about 2.4in
   of usable width per card inside a half-inch margin).
*/

:root {
  --rp-card-w: 2.45in;
  --rp-gap: 0.14in;
}

body.report-body {
  background: #fff;
  color: #17130F;
  margin: 0;
  padding: 0 0 40px;
  font-family: "Public Sans", Arial, sans-serif;
}

/* ---- the control bar, which is screen-only ---- */
.rp-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #F7F2E5;
  border-bottom: 1px solid #C9BFA8;
  font-size: 13px;
}
.rp-bar label { display: flex; gap: 6px; align-items: center; }
.rp-bar select { font: inherit; padding: 3px 6px; }
.rp-bar button {
  font: inherit;
  font-weight: 600;
  padding: 5px 14px;
  background: #7A2331;
  color: #fff;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.rp-bar button:hover { background: #8d2a3a; }
.rp-bar span { color: #5d5343; }

.rp-out { padding: 18px 16px 0; }
.rp-loading { color: #5d5343; }

/* ---- a section, its heading and the grid of cards ---- */
.rp-head { margin: 0 0 2px; font-family: "Bitter", Georgia, serif; font-size: 20px; }
.rp-sub { margin: 0 0 14px; color: #5d5343; font-size: 12.5px; }
.rp-section {
  margin: 18px 0 8px;
  font-family: "Bitter", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: #7A2331;
  border-bottom: 1px solid #C9BFA8;
  padding-bottom: 3px;
}

.rp-cards {
  display: grid;
  grid-template-columns: repeat(3, var(--rp-card-w));
  gap: var(--rp-gap);
  justify-content: start;
}
/* The game sizes .print-card to its panel (width/height 100%); on paper
   it gets the stock's own proportions instead. */
.rp-cards .print-card {
  width: var(--rp-card-w);
  height: auto;
  break-inside: avoid;
  page-break-inside: avoid;
}
.rp-cards .pc-grid { font-size: 8.4px; }
.rp-cards .pc-name { font-size: 17px; }
/* ONE LINE, EVEN WITH A NICKNAME ON IT (2026-10-10). This line used to
   hold a given name -- "Paul", "Freddie" -- and now holds that name
   plus a nickname in quotes, up to `Giancarlo "Parmigiancarlo"`. Three
   cards across is 2.3 inches each, and a name that WRAPPED would make
   its own card taller than the two beside it and knock the rest of the
   page's rows out of line, so wrapping is turned off here.
   `nowrap` is all it needs and no clipping is set, because the widest
   one on the page was MEASURED at 91px of the 215px available -- the
   name line has more than twice the room it uses. */
.rp-cards .pc-fullname { font-size: 10.5px; white-space: nowrap; }
.rp-cards .print-card .pc-bio { font-size: 8.4px; }

/* ELEVEN COLUMNS INTO 2.3 INCHES. The stat line is the one part of the
   card that cannot be allowed to shrink-to-fit: at the panel's own
   sizing the last column (OBP) ran off the right edge and printed as
   ".43". Tabular figures in a fixed layout, with the padding taken
   down, keeps every column whole -- and `table-layout: fixed` is what
   makes the browser share the width out instead of letting the wide
   columns push the last one over the edge. */
.rp-cards table.pc-stats {
  font-size: 7.6px;
  table-layout: fixed;
  width: 100%;
}
.rp-cards table.pc-stats th,
.rp-cards table.pc-stats td {
  padding: 2px 0;
  letter-spacing: -0.01em;
}

/* ---- the pitcher list ---- */
table.rp-pitchers {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
table.rp-pitchers th {
  text-align: left;
  font-weight: 700;
  border-bottom: 1.5px solid #7A2331;
  padding: 4px 6px;
  white-space: nowrap;
}
table.rp-pitchers td {
  padding: 3px 6px;
  border-bottom: 1px solid #E3DAC6;
  vertical-align: top;
}
table.rp-pitchers tr { break-inside: avoid; page-break-inside: avoid; }
table.rp-pitchers .rp-rating {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  color: #7A2331;
  white-space: nowrap;
}
table.rp-pitchers .rp-nogr { color: #8a7f6c; font-style: italic; }
/* The four per-nine rates: tabular figures, right-aligned, so a column
   of them can be read down (2026-10-10). */
table.rp-pitchers .rp-rate {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* A pitcher with no card carries UNC where his club goes. */
table.rp-pitchers .rp-unc { color: #7A2331; font-weight: 700; }
table.rp-pitchers .rp-num { color: #5d5343; }

.rp-missing { margin: 16px 0 0; font-size: 11px; color: #5d5343; }
.rp-missing li { margin: 1px 0; }

/* ---- paper ---- */
@page { size: letter; margin: 0.45in 0.4in 0.5in; }

@media print {
  .rp-bar { display: none; }
  .rp-out { padding: 0; }
  body.report-body { padding: 0; }
  /* A new club starts a new sheet -- a manager prints his own pages out
     of the league-wide run and does not want his first baseman on
     somebody else's page. */
  .rp-team { break-before: page; page-break-before: always; }
  .rp-team:first-child { break-before: auto; page-break-before: auto; }
  .rp-section { break-after: avoid; page-break-after: avoid; }
  .rp-pitchers-wrap { break-before: auto; }
}

/* A FIGURE THIS SEASON HAS NO FILE FOR. Deliberately not styled like
   rp-nogr ("no grade", a statement about the player) -- this is a
   statement about the season's setup, and the two must not be read as
   the same thing. */
.rp-withheld { color: #9a938a; font-weight: 600; }
.rp-warn {
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #b4332a;
  border-left: 3px solid #b4332a;
  border-radius: 3px;
  background: #fdf3f1;
  color: #7d241d;
  font-size: 0.86em;
  line-height: 1.4;
}
@media print {
  .rp-warn { background: #fff; }
}
