/* Global variables. */
:root {
  /* Set sans-serif & mono fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;
  --border-width: 1px;

  /* Default (light) theme */
  --bg: #fff;
  --accent-bg: #F5F7FF;
  --header-bg: #5BA1AD;
  --stats-table-header-bg: #78DCFF;
  --stats-table-totals-bg: #AEEAFF;
  --linescore-header-bg: #B4C6E7;
  --text: #212121;
  --text-light: #585858;
  --border: #898EA4;
  --accent: #0d47a1;
  --accent-hover: #1266e2;
  --accent-text: var(--bg);
  --code: #d81b60;
  --preformatted: #444;
  --marked: #ffdd33;
  --disabled: #efefef;
}

/* global font settings */
html {
  font-family: var(--sans-font);
  scroll-behavior: smooth;
}


/* Make the body a nice central block 
  grid-template-columns controls the width of the page
  font-size: 1.15rem;
 */
body {
  line-height: 1.5;
  display: grid;
  grid-template-columns: 1fr min(65rem, 90%) 1fr;
  margin: 0;
}
body > * {
  grid-column: 2;
}

/* Format headers */
h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

h4 {
  font-size: 1.1rem;
}

h5 {
  font-size: 1.15rem;
}

h6 {
  font-size: 0.96rem;
}

p {
  margin: 0.8rem 0;
}

div.ws p {
  margin: 0.8rem 0;
  font-size: 0.85rem;
}


/* Make the header bg full width, but the content inline with body */
header {
  background-color: var(--header-bg);
  border-bottom: var(--border-width) solid var(--border);
/*  text-align: center; */
  padding: 0.5rem 0.5rem 1.0rem 0.5rem;
  grid-column: 1 / -1;
}

header h1 {
  max-width: 1200px;
  margin: 1rem auto;
}

header h2 {
  font-size: 2.4rem;
  margin: 1.3rem;
}

header h3 {
  font-size: 2.2rem;
  margin: 1.3rem;
}

header p {
  font-size: 0.85rem;
  margin: 0.5rem;
}


footer {
  margin-top: 2rem;
  padding: 1rem 1rem 1rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  border-top: var(--border-width) solid var(--border);
  background-color: var(--accent-bg);
}

/* Format links & buttons */
a,
a:visited {
  color: var(--accent);
}

a:hover {
  text-decoration: none;
}

button,
.button,
a.button, /* extra specificity to override a */
input[type="submit"],
input[type="reset"],
input[type="button"] {
  border: var(--border-width) solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 0.5em;
  text-decoration: none;
  line-height: normal;
}

.button[aria-disabled="true"], 
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
  cursor: not-allowed;
  background-color: var(--disabled);
  border-color: var(--disabled);
  color: var(--text-light);
}

input[type="range"] {
  padding: 0;
}

/* Format tables */
table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

table.noborder {
  border: 0px hidden var(--border);
  /*border-collapse: collapse;
  margin: 1.5rem 0;*/
}

table.simplestat,
table.stats {
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.linescore {
  border-collapse: collapse;
  font-size: 0.85rem;
}


/* table rows */
tr:nth-child(even) {
  /* Set every other cell slightly darker. Improves readability. */
  background-color: var(--accent-bg);
}

tr.nostripe {
  background-color: var(--bg);
}

table.stats tr :nth-child(1),
table.stats tr :nth-child(2) {
  text-align: left;
}

/*  leaving the striping in for the stats tables
table.stats tr {
  background-color: var(--bg);
}
*/

table.linescore tr {
  background-color: var(--bg);
}

table.linescore tr :nth-last-child() {
  text-align: left;
}

table.linescore tr :nth-child(1) {
  width: 80px;
  text-align: left;
}

table.linescore tr :nth-child(4),
table.linescore tr :nth-child(7),
table.linescore tr :nth-child(10) {
  border-right: double;
}


/* table cells */
td {
  border: var(--border-width) solid var(--border);
  text-align: start;
  padding: 0.3rem;
}
th {
  background-color: var(--accent-bg);
  font-weight: bold;
}

td.noborder, th.noborder {
  border: 0px hidden var(--border);
  text-align: start;
  padding: 0.15rem 0.5rem;
}	

table.standings td {
  padding: 0.1em 0.4em;
  text-align: right;
}

table.simplestat td {
  padding: 0.1em 0.4em;
  text-align: right;
}

table.simplestat th, 
table.standings th {
  background-color: var(--stats-table-header-bg);
  padding: 0.1em 0.4em;
  text-align: center;
}

table.stats th {
  background-color: var(--stats-table-header-bg);
  font-weight: bold;
  padding: 0.1em 0.25em;
  text-align: center;
}

table.linescore th {
  background-color: var(--linescore-header-bg);
  font-weight: bold;
  padding: 0.1em 0.25em;
  text-align: center;
}

table.stats td {
  padding: 0.1em 0.4em;
  text-align: right;
}

table.stats td {
  padding: 0.1em 0.25em;
  text-align: right;
}

table.leaders {
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.leaders tr {
  background-color: var(--bg);
}

table.leaders td {
  padding: 0.1em 0.4em;
}

table.standings tr :nth-child(2) {
  text-align: left;
}

table.stats tr.totals td {
  background-color: var(--stats-table-totals-bg);
  font-weight: bold;
  padding: 0.1em 0.25em;
}

table caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

