:root
{
    --linearbg: linear-gradient(to right, rgba(0,200,0,0), rgba(255,150,0,1));
}

h2.mainheading { 
    color: crimson; 
    background-image: var(--linearbg);
}


h4 { 
	font-size: large;
	font-style: italic;
	color: green; 
	padding-top: 1.5em;
}


p.example{
	font-weight: bold;
	font-size: large;
	color: darkcyan;
	border-top: 1px dashed red;
	padding-top: 0.5em;
}



pre.codeoutput {
	border: 1px dashed;
	background-color: rgb(244, 250, 250);
	position: relative; 
	padding-top: 1.5em; 
	font-size: 1.1em;
	line-height: 1.25em;
}

pre.codeoutput::before {
	content: "Output";
	position: absolute;
	top: 0;
	left: 0.25em;
	transform: translateY(-50%);
	background-color: rgb(230, 250, 250); /* Match background */
	padding: 0 0.4em;
	font-weight: bold;
	font-size: 1.2em;
	border: 1px dashed red;
	border-radius: 0.25em;
}


pre code.hljs 
{
	tab-size: 4;
	-moz-tab-size: 4;
	-o-tab-size: 4;
}



div.links{
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1em;
}


fieldset h4:first-of-type{
	padding-top: 0.1em;
}
		
fieldset > p{
	font-size: large;
}

legend.format{
	background-color: azure;
	border-radius: 1em;
	font-size: large;
	font-weight: bold;
	padding: 1em;
}


iframe{
	width:40%;
	aspect-ratio: 1.75;
}



@media only screen and (max-width:1200px) 
{
	iframe{
		width: 60%;
		aspect-ratio: 1.75;
	}
}

@media only screen and (max-width:900px) 
{
	iframe{
		width: 90%;
		aspect-ratio: 1.75;
	}
}




/************************   COUNTERS  **********************************/


/*provides headings such as 1) 1.1).. */
h2.head_l2 
{
	counter-increment: counter_h2;
	counter-reset: counter_h3;
	padding-top: 12px;
	padding-bottom: 12px;
}

h3.head_l3 
{
	counter-increment: counter_h3;
	counter-reset: counter_h4;
}

h4.head_l4 { counter-increment: counter_h4;}

h2.head_l2::before { content: counter(counter_h2)") "; }
h3.head_l3::before { content: counter(counter_h2)"."counter(counter_h3)") "; }
h4.head_l4::before { content: counter(counter_h2)"."counter(counter_h3)"."counter(counter_h4)") ";}

h2.head_l2_reset { counter-reset:level1; }



/********************/

figure 
{
	border: 1px #cccccc solid;
	padding: 4px;
	margin: auto;
}

figcaption 
{
	font-style: italic;
	padding: 2px;
	text-align: left;
}

figcaption::before {font-weight: bold;}


.figure {counter-increment: figures;}
.figure figcaption::before { content: 'Fig. ' counter(figures) ': '; }
.figure.reset{counter-reset: figures;}



/********************/

		
table caption 
{
	font-style: italic;
	padding: 2px;
	padding-top: 10px;
	text-align: left;
}

table caption::before {font-weight: bold;}


.table {counter-increment: tables;}
.table caption::before { content: 'Table ' counter(tables) ': '; }
.table.reset{counter-reset: tables;}



/********************/


p.heading1 { counter-reset: level2; }

p.heading2 
{
	counter-reset: level3;
	margin-left: 20px;
}

p.heading3 
{
	counter-increment: level3;
	margin-left: 40px;
}

p.heading1::before 
{
	counter-increment: level1;
	font-weight:bold;   
	content: counter(level1)") ";
}

p.heading2::before 
{
	counter-increment: level2;
	font-weight:bold;
	content: counter(level1)"."counter(level2)") ";
}

p.heading3::before 
{
	font-weight:bold;
	content: counter(level1)"."counter(level2)"."counter(level3)") ";
}

p.reset { counter-reset:level1 level2; }