/* Fonts */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Literata:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:lang(ko-Latn), :lang(zh-Latn), :lang(ja-jp-Latn), :lang(zh-yue-Latn) {font-family: inherit;}

/* Serif font for body text */
.serif, BODY, AREA, IMG, DIV.Comment, MAIN ARTICLE { font-family: Literata, Georgia, FreeSerif, serif; font-variant-ligatures: none;}

/* Bold Sans-serif font for labels, captions, etc. */
 #mainsubmit,
 #menubar
 #submitmove,
 #tribar,
 BUTTON,
 CAPTION,
 DIV#board FOOTER,
 DIV#board HEADER,
 DIV.commentgroup>HEADER,
 DIV.forms LEGEND,
DT, 
FIGCAPTION,
INPUT[type=submit],
 LABEL,
 NAV,
 TABLE.menu TR TD,
 TH,
.blackbox HEADER,
.tag
 {font-family: "Noto Sans", "Segoe UI", sans-serif; font-weight: bold; line-height: 1.1em;}

/* Use Noto Sans for foreign characters, because it supports most or all of unicode. */

.sans, .sans-serif, :lang(ko), :lang(zh), :lang(ja), :lang(ja-jp) {font-family: "Noto Sans", "Segoe UI", Verdana, sans-serif;}
  
/* Monospace font for headings, text input, etc. */
.mono, .blackbox, INPUT[type=text], TEXTAREA, SELECT, .subtitle, DIV.forms FORM DFN, BUTTON, CODE, DIV.forms FORM>SPAN, KBD { font-family: "Courier Prime", "Courier 10 Pitch", "Courier New", Courier, Caecilia, FreeMono, monospace; }

DIV.Comment {line-height: 115%;}
H1, H2, H3, H4, H5, H6 {line-height: 1.1em; margin: 1em 0 0.5em 0; font-family: "Noto Sans", "Segoe UI", Verdana, sans-serif; clear: both;}
ARTICLE>H1 {font-size: 2.25em; text-align: center; margin: 1em auto 0.5em auto;}
ARTICLE>H2, ARTICLE SECTION>H2 {font-size: 2em; border-bottom: 3px solid black; padding-bottom: .3em; width: 100%}
ARTICLE>H3, ARTICLE SECTION>H3 {font-size: 1.8125em;}
ARTICLE>H4, ARTICLE SECTION>H4 {font-size: 1.625em; font-style: italic;}
ARTICLE>H5, ARTICLE SECTION>H5 {font-size: 1.3125em; weight: 500; }
ARTICLE>H6, ARTICLE SECTION>H6 {font-size: 1.125em; weight: 500; font-style: italic;}

DT {font-size: 1.25em;}
LI {line-height: 115%;}
BODY {
	background-color: #fffff0;
	padding-left: 0.25in;
	padding-right: 0.25in;
	max-width: 100%;
	text-rendering: geometricPrecision;
}

/* Links */

A:link {
	color: blue;
}

A:visited {
	color: #083194;
}

A.term {
        color: blue;
        font-style: normal;
        text-decoration: none;
}

A:visited.term {
        color: blue;
        font-style: normal;
        text-decoration: none;
}


A.download {
	font-style: "Courier Prime", monospace;
}

A:link.extern {
        font-style: normal;
        font-family: "Noto Sans", sans-serif;
}

A:visited.extern {
        color: #524a18;
        font-style: normal;
        font-weight: 400;
        font-family: "Noto Sans", sans-serif;
}

A:hover {
	color:darkred;
}

/* Classes */

SPAN.author {
	font-style: italic;
}

SPAN.editor {
	font-style: italic;
}

SPAN.date {
	font-style: italic;
}

DIV.menu, .fineprint, SPAN.navlink, SPAN.rateit, SPAN.shortcomment, SPAN.longcomment {
	font-family: "Noto Sans", "arial", "helvetica", "sans-serif";
	font-size: smaller;
}

DIV.Comment {border: 2px darkkhaki solid; background-color: beige; padding: 1ex; clear: both; overflow-y: hidden; clear: both; column-count: 1; display: flow-root;}
DIV.Comment BLOCKQUOTE { border-left: olive solid thick; margin-left: 1em; padding-left: 1ex;}
DIV.Comment HEADER {display: flex; justify-content: space-between; background-color: beige; margin: 0px; padding: 0 1em;}
DIV.Comment DIV {padding: 0 1em; margin: 0; background-color: beige;}
DIV.Comment FOOTER {display: flex; justify-content: flex-end; background-color: beige; margin: 0px; padding: 0 1em;}

DIV.comments {background-color: darkkhaki; width: 100%; margin-bottom: 1em;}
DIV.piece FIGURE, FIGURE.piece {float: left; display: table-cell; margin-right: 1ex; text-align:center; border-width: 0px; vertical-align: top;}
DIV.piece FIGURE FIGCAPTION, FIGURE.piece FIGCAPTION {background-color: darkkhaki; text-align:center; font-weight: bold; display: table-caption; caption-side: bottom; text-decoration: none; width:100%;}
DIV.piece P {display: table-cell; padding-top: 1em;}
DIV.piece {clear: both; float: none;}

DIV.container {display: inline-block; flex-flow: row wrap; max-width: 100%;}
DIV.container DIV.blackbox {flex-grow: 1;}

.fineprint {
	font-family: "Noto Sans", "arial", "helvetica", "sans-serif";
	font-size: smaller;
}

SPAN.navfolder {
	font-family: "Noto Sans", "arial", "helvetica", "sans-serif";
	font-size: smaller;
}

SPAN.navlink {
	font-family: "Noto Sans", "arial", "helvetica", "sans-serif";
	font-size: smaller;
}

SPAN.rateit {
	font-weight: bold;
	color: green;
}

SPAN.shortcomment {
        font-size: 80%;
}

SPAN.longcomment {
        font-size: 70%;
}

SPAN.fixedfont {
        font-family: "Courier Prime", "fixed";
}

SPAN.ratingtitle {
	font-size: larger;
}

SPAN.obsolete {
	text-decoration: line-through;
}

TABLE.legend {font-size: initial; line-height: initial; clear: right;}
TABLE.legend TR TD {vertical-align: top; padding: 0px; margin: 0px;}
TABLE.legend TR TD H4 {margin: 0px; padding: 0px;}
TABLE.legend TR TD UL LI {margin-left: -20px; padding-left: 0px;}

ASIDE.middle, MAIN {max-width: 100%; margin-left: auto; margin-right: auto;}
ASIDE.leftcol, ASIDE.rightcol {display: none;}
ASIDE.rightcol {font-size: initial; line-height: initial;}

.mobile { display: inline-block; }

.tag, .tag:link, .tag:visited {background-color: beige; border: thin olive solid; padding: 0 .5ex; font-weight: bold; text-decoration: none;}
.tag::before {content: '#'}
.deletetag {color: red; text-decoration: none;}

.okay {background-color: #303030; color: #B1FB17; display: table;}
.okay::before {content: "\002713\00a0"; font-weight: bold; display: table-cell; width: 2rem;}

.error {background-color: #303030; color: #F62217; display: table;}
.error::before {content: "\2297\00a0"; display: table-cell; width: 2rem;}

.warning {background-color: #303030; color: #FDFD17; display: table;}
.warning::before {content: "\0026A0\00a0"; display: table-cell; width: 2rem;}

.alertbox {margin: 1em; padding: 1em;}
.alertbox::before {font-size: 2em;}

.notice {background-color: #303030; color: plum; display: table;}
.notice::before {content: "\1f4cc\00a0"; display: table-cell; width: 2rem;}

.point {background-color: #303030; color: beige; display: table;}
.point::before {content: "\261E"; font-size: 150%; display: table-cell; width: 2rem;}

.blackbox {background-color: #303030; color: beige; padding: 1ex; width: 100%;}
.blackbox>HEADER {background-color: beige; color: black; font-weight: bold;}
.blackbox A:link, .okay A:link, .error A:link, .warning A:link, .notice A.link {color: #BDEDFF;}
.blackbox A:visited, .okay A:visited, .error A:visited, .warning A:visited, .notice A.link {color: #FFBDED;}
.blackbox BUTTON {color: blue; font-weight: bold;}
.blackbox P {margin: 0; padding: 0;}

/* Tags */

q {
  quotes: "“" "”" "‘" "’";
}
q:before {
    content: open-quote;
}
q:after {
    content: close-quote;
}

MAIN ARTICLE {float: none; overflow-x: auto; overflow-y: hidden; max-width: 100%; line-height: 130%;}
I, EM {font-family: inherit; font-style: italic;}
MAIN ARTICLE BLOCKQUOTE {line-height: 1.1em;}

FIGURE {float: left; border: 0px #FFFFF0 solid;}
FIGCAPTION {background-color: darkkhaki; text-align:center; text-decoration:smallcaps; font-weight: bold; }

IMG {max-width: 98%; height:auto;}

BLOCKQUOTE { margin-left: 1em; padding-left: 1ex; line-height: 1.1em; font-size: 87.5%;}

/* Responsive by screen size or output type*/

@media only screen and (max-width: 480px) {
	IMG {max-width: 98%;}
}
@media screen {
	ASIDE a[href^='http']:not( [href*='chessvariants.com'] ):not( [href*='chessvariants.org'] ):after {content:url('');}
	MAIN>A[href^='http']:not( [href*='chessvariants.com'] ):not( [href*='chessvariants.org'] ):after {content:url('http://play.chessvariants.com/img/icon_external.gif');}
	ASIDE {display: block-inline;}
}

@media screen and (min-width: 600px) {
	/* MAIN ARTICLE {font-size: 18px;} */
}
@media screen and (orientation: portrait) {
	BODY {max-width: 98vw; margin: 1vw; padding: 0;}
}	
@media screen and (orientation: landscape) and (min-width: 961px) {
	BODY {max-width: 98vw; margin: 0 1vw; padding: 0;}
	ASIDE.middle, MAIN, BODY>HEADER {margin: 0; padding: 0;}
	/* MAIN ARTICLE {font-size: 18px;} */
}
@media only screen and (orientation: landscape) and (min-width: 1241px) {
	ASIDE.middle, MAIN { max-width: 960px; max-width: calc(100% - 200px); margin-left: 1ex; margin-right: auto; overflow-x: auto;}
	ASIDE.rightcol { float:right; max-width:160px; text-align:right; display: inline-block; padding-top: 1ex;}
	.mobile { display: none; }
}
@media only screen and (orientation: landscape) and (min-width: 1331px) {
	ASIDE.middle, MAIN { max-width: 960px; max-width: calc(100% - 340px); margin-left: auto; margin-right: 1ex; overflow-x: auto;}
	ASIDE.leftcol { float:left; max-width: 300px; text-align:left; min-height:600px; height:600px; width: 300px; display: block; visibility: visible; padding-top: 1ex;}
	ASIDE.rightcol {display: none;}
}
@media only screen and (orientation: landscape) and (min-width: 1536px) {
	ASIDE.middle, MAIN { max-width: 960px; max-width: calc(100% - 600px); margin-left: 345px; margin-right: 330px; display:block; z-index:500000;}
	ASIDE.rightcol { float:right; max-width:300px; width: 300px; text-align:right; display: inline-block; padding-top: 1ex;}
}


@media print {
	.noprint {display: none}
	ASIDE, HEADER, FOOTER, NAV {display: none;}
	MAIN ARTICLE {width: 100%; font-size: 12pt;}
}

@viewport {
	width: device-width;
	zoom: 1;
}
