/* hardballrules.com home, concept "The Scorecard" (design redo, 2026-10-13; plans/design-redo-2026-10.md).
   The page is a fan's pencil scorecard: header block, a 9-inning scoring grid, a lineup card, scorer's notes.
   Built by tools/web/build_home.py for EN + ES. */
:root {
  --desk: #E9E2D3; --card: #FBF7EE; --rule: #C9BFA9; --grid: #DCD3C0; --ink: #142638; --pencil: #4A4F55;
  --red: #B83A32; --gold: #E7B85A; --muted: #5E646B;
  --type: "Courier Prime", ui-monospace, monospace; --serif: "Libre Caslon Text", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 17px/1.6 var(--serif); }
a { color: var(--red); }
.hand { font-family: var(--hand); color: var(--pencil); }
.type { font-family: var(--type); }
.cap { font: 700 12px/1.3 var(--type); letter-spacing: .08em; text-transform: uppercase; }

#es-offer { background: var(--gold); color: var(--ink); padding: 9px 16px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; font: 700 15px var(--type); }
#es-offer a { color: var(--ink); }
#es-offer button { background: none; border: 0; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }

/* The sheet */
.sheet { max-width: 1120px; margin: 28px auto 40px; background: var(--card); border: 2px solid var(--ink);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px rgba(20, 38, 56, .14);
  background-image: linear-gradient(var(--card), var(--card)), repeating-linear-gradient(0deg, transparent 0 31px, rgba(201, 191, 169, .35) 31px 32px); }
.band { border-bottom: 2px solid var(--ink); padding: 22px 28px; }
.band:last-child { border-bottom: 0; }

/* Masthead / nav */
.mast { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 28px; border-bottom: 2px solid var(--ink); }
.mast .brand { font: 700 22px/1 var(--serif); color: var(--ink); text-decoration: none; margin-right: auto; letter-spacing: .02em; }
.mast .brand span { color: var(--red); }
.mast a.nav { font: 700 14px var(--type); color: var(--ink); text-decoration: none; text-transform: uppercase; }
.mast a.nav:hover { color: var(--red); text-decoration: underline; }
.stamp { display: inline-block; font: 700 15px/1 var(--type); text-transform: uppercase; letter-spacing: .08em; color: var(--card); background: var(--red);
  border: 2px solid var(--ink); padding: 12px 18px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.stamp:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.stamp.big { font-size: 18px; padding: 16px 24px; }
.stamp.ghost { background: var(--card); color: var(--ink); }

/* Header block: scorecard fields + the title */
.header { display: grid; grid-template-columns: 1fr 1.6fr; border-bottom: 2px solid var(--ink); }
.fields { border-right: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.hr-box { grid-column: 1 / -1; padding: 14px; text-align: center; }
.hr-box svg { width: 70%; max-width: 230px; height: auto; }
.hr-box .hand { display: block; font-size: 26px; color: var(--red); }
.field { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); padding: 10px 14px; min-height: 64px; }
.field:nth-child(2n) { border-right: 0; }
.field .cap { color: var(--muted); font-size: 11px; }
.field .hand { display: block; font-size: 24px; line-height: 1.1; margin-top: 2px; }
.title { padding: 26px 30px; }
.title h1 { font: 700 clamp(34px, 5vw, 58px)/1.02 var(--serif); margin: 6px 0 10px; }
.title .tag { font-size: 34px; color: var(--red); transform: rotate(-2deg); display: inline-block; margin: 0 0 12px; }
.title .lede { margin: 0 0 20px; max-width: 640px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.note { font-size: 15px; color: var(--muted); margin: 14px 0 0; }

/* Signature: the scoring grid */
.sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 14px; }
h2 { font: 700 clamp(26px, 3.4vw, 36px)/1.1 var(--serif); margin: 0; }
.sec-h .hand { font-size: 24px; }
.grid { display: grid; grid-template-columns: 120px repeat(9, 1fr) repeat(3, 56px); border: 2px solid var(--ink); }
.grid > div { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.grid .h { background: var(--ink); color: var(--card); text-align: center; padding: 6px 2px; }
.grid .who { padding: 10px; display: flex; flex-direction: column; justify-content: center; border-right: 2px solid var(--ink); }
.grid .who .hand { font-size: 26px; color: var(--ink); }
.ab { padding: 6px 4px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ab svg { width: 100%; max-width: 70px; height: auto; }
.ab .mark { font: 700 22px/1 var(--hand); color: var(--red); }
.ab .why { font: 400 11px/1.25 var(--type); color: var(--muted); }
.tot { display: flex; align-items: center; justify-content: center; font: 700 30px/1 var(--hand); color: var(--ink); background: rgba(231, 184, 90, .14); }
.legend { margin: 12px 0 0; font: 400 14px/1.6 var(--type); color: var(--muted); }
.legend b { color: var(--ink); }
.notes { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: n; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 28px; }
.notes li { counter-increment: n; border-bottom: 1px solid var(--rule); padding: 8px 0 8px 34px; position: relative; }
.notes li::before { content: counter(n); position: absolute; left: 0; top: 4px; font: 700 26px/1 var(--hand); color: var(--red); }
.notes strong { font-family: var(--type); }

/* Lineup card */
.lineup { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); }
.lineup th, .lineup td { border-bottom: 1px solid var(--grid); padding: 10px 12px; text-align: left; vertical-align: top; }
.lineup th { background: var(--ink); color: var(--card); font: 700 12px var(--type); letter-spacing: .08em; text-transform: uppercase; }
.lineup td.no { font: 700 30px/1 var(--hand); color: var(--red); width: 54px; text-align: center; border-right: 1px solid var(--grid); }
.lineup td.mode { font: 700 18px/1.2 var(--serif); width: 30%; }
.lineup td.pos { font: 400 13px/1.4 var(--type); color: var(--muted); width: 22%; border-left: 1px solid var(--grid); }

/* Box score totals + rule areas */
.totals { display: grid; grid-template-columns: repeat(6, 1fr); border: 2px solid var(--ink); }
.totals div { border-right: 1px solid var(--grid); padding: 10px; text-align: center; }
.totals div:last-child { border-right: 0; }
.totals b { display: block; font: 700 40px/1 var(--hand); color: var(--red); }
.totals span { font: 400 12px/1.3 var(--type); text-transform: uppercase; color: var(--muted); }
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); margin: 16px 0 0; padding: 0; list-style: none; }
.areas li { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 12px; font: 700 15px/1.3 var(--serif); }
.areas li .cap { display: block; color: var(--red); margin-bottom: 4px; }
.areas-p { margin: 14px 0 0; font-size: 16px; }

/* FAQ as scorer's notes */
.faq details { border-bottom: 1px solid var(--rule); padding: 10px 0; }
.faq summary { font: 700 16px/1.4 var(--type); cursor: pointer; }
.faq details p { margin: 8px 0 4px 18px; }

.close { text-align: center; padding: 34px 20px; }
.close .tag { font-size: 38px; color: var(--red); margin: 0 0 6px; }
.close p { max-width: 560px; margin: 0 auto 18px; }

footer { max-width: 1120px; margin: 0 auto 40px; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 10px 20px; font: 400 13px/1.6 var(--type); color: var(--muted); }
footer a { color: var(--ink); }
footer .op { margin-right: auto; }

@media (max-width: 900px) {
  .header { grid-template-columns: 1fr; }
  .fields { border-right: 0; border-bottom: 2px solid var(--ink); order: 2; }
  .title { order: 1; padding: 20px 18px; }
  .band { padding: 18px 16px; }
  .mast { padding: 10px 16px; }
  .mast a.nav.opt { display: none; }
  /* Scoring grid: three innings per row */
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .h.inn, .grid .h.who-h { display: none; }
  .grid .who { grid-column: 1 / -1; border-right: 0; border-bottom: 2px solid var(--ink); flex-direction: row; gap: 10px; align-items: baseline; }
  .grid .h.tot-h { display: block; }
  .ab::before { content: attr(data-inn); font: 700 11px var(--type); color: var(--muted); }
  .grid > * { order: 1; } .grid .who { order: 0; } .grid .h.tot-h { order: 2; } .grid .tot { order: 3; }
  .totals { grid-template-columns: repeat(3, 1fr); }
  .totals div:nth-child(3n) { border-right: 0; }
  .areas { grid-template-columns: repeat(2, 1fr); }
  /* Lineup card on phones: number on the left, mode name over its description (no mid-word breaks) */
  .lineup .pos, .lineup thead { display: none; }
  .lineup tr { display: grid; grid-template-columns: 40px 1fr; border-bottom: 1px solid var(--grid); }
  .lineup td { border: 0; padding: 4px 8px; }
  .lineup td.no { grid-row: span 2; width: auto; font-size: 26px; padding-top: 10px; }
  .lineup td.mode { width: auto; padding-top: 10px; }
  .lineup td:nth-child(3) { padding-bottom: 10px; }
  .hr-box { display: none; }
}
@media (max-width: 430px) {
  .sheet { margin: 12px 8px 24px; }
  .mast .brand { font-size: 19px; }
  .stamp { padding: 10px 14px; font-size: 14px; }
  .mast .stamp { padding: 7px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
