/* base.css: css intended (as defaults at least) for the entire scoresheet.com site; @@@ Mir
	please add google fonts, etc., and tune this whole file! */


/* ----------- Typography ----------- */

@import url('https://fonts.googleapis.com/css2?family=Bakbak+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geologica:wght,CRSV@100..900,0&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caladea:ital,wght@0,700;1,700&display=swap');

.caladea-bold {
  font-family: "Caladea", serif;
  font-weight: 700;
  font-style: normal;
}
blockquote, .caladea-bold-italic {
  font-family: "Caladea", serif;
  font-weight: 700;
  font-style: italic;
}

html			{ -webkit-text-size-adjust: 100%; }	/* recommended for iOS */

body			{ font-family: Geologica, Verdana, Arial, Helvetica, sans-serif }

h1, h2, h3, h4, h5, h6
				{ font-family: "Bakbak One", Impact, sans-serif }

footer			{ font-size: 90% }


/* ----------- Layout ----------- */

[hidden]		{ display: none }	/* ensure for (very) old browsers */

/* Allow edge-to-edge background[-color] areas, but limit e.g. text line lengths. */
body			{ margin: 0 }
body > *		{ padding: 0 max(8px, calc(50% - 500px)) }
body > :where(dir, menu, ol, ul)
				{ padding-left: calc(max(8px, calc(50% - 500px)) + 40px) }
body > :where(.wide)
				{ padding: 0 8px }
header			{ padding: 4px 4vw 4px 2vw; }
footer			{ padding: 0 }
/* Apparently padding doesn't work for <table>s (in e.g. Chrome 152), so wrap a top-level (child
	of <body>) non-centered <table> in a <div>, for wide screens. */
body > table	{ padding: 0; margin-left: auto; margin-right: auto }

nav, .box		{ display: flex; flex-wrap: wrap; flex-wrap: balance; align-items: start }
header > nav	{ align-items: center; gap: 8vw; justify-content: space-around }
@media (width >= 400px) {	/* or use a hamburger menu on narrow screens, or vertical logo ? */
	header > nav	{ flex-wrap: nowrap }
}
header div.box	{ gap: 0.5em 2em }
footer nav		{ justify-content: space-evenly }

nav ul			{ list-style: none; padding: 0; margin: 1em }
nav a			{ white-space: nowrap }
header nav a	{ text-decoration: none }
header .sb-logo	{ height: 3.75em }
header nav > a > img
				{ display: block }	/* avoid extra font descent space */

table.ruled		{ border-collapse: collapse }	/* often use margins also, e.g. for centering */
.ruled > :is(thead, tbody, tfoot)
				{ border: double }
.ruled > * > tr > :is(th, td)
				{ border: solid thin; padding: 0.2em 0.3em; min-width: 1.5em }

table.join-align > tbody > tr > td:first-child
				{ text-align: right }
table.join-align > tbody > tr > td:first-child + td
				{ text-align: left }


/* ----------- Colors and Backgrounds ----------- */

:root {	/* logo colors, with tints t1 to t3 (lightest); can see oklch.com */
	--sb-green:		#007A48;	/* oklch(0.51  0.1221 156.66) */
	--sb-blue:		#0072BC;	/* oklch(0.538 0.1433 247.55) */
	--sb-red:		#A72428;	/* oklch(0.479 0.167   24.9 ) */
	--sb-tan:		#F0EBE1;	/* oklch(0.94  0.0144  84.6 ) */
	--sb-tan-t3:	#F6F4EE;	/* oklch(0.967 0.0082  91.5 ) */
}

h1, .sb-green	{ color: var(--sb-green) }
.sb-blue		{ color: var(--sb-blue) }	/* @@@ use for links? and what colors for h3-h6, th,
												etc.? */
h2, .sb-red		{ color: var(--sb-red) }
body, .bg-sb-tan-t3
				{ background-color: var(--sb-tan-t3) }

header			{ box-shadow: 0px 2px 8px 0px rgba(54, 54, 54, 0.4) }
footer			{ background-color: lightgray }

.error			{ color: red; font-weight: bold }
