﻿@font-face {
	font-family: 'dejavu_sans';
	src: url('fonts/dejavusans-webfont.eot');
	src: url('fonts/dejavusans-webfont.eot?#iefix') format('embedded-opentype'),
	 local('DejaVuSans'),
		 url('fonts/dejavusans-webfont.woff2') format('woff2'),
		 url('fonts/dejavusans-webfont.woff') format('woff'),
		 url('fonts/dejavusans-webfont.ttf') format('truetype'),
		 url('fonts/dejavusans-webfont.svg#dejavu_sansbook') format('svg');
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family:'dejavu_sans';
	src:url('fonts/dejavusans-bold-webfont.eot');
	src:url('fonts/dejavusans-bold-webfont.eot?#iefix') format('embedded-opentype'),
	 local('DejaVuSans-Bold'),
		 url('fonts/dejavusans-bold-webfont.woff2') format('woff2'),
		 url('fonts/dejavusans-bold-webfont.woff') format('woff'),
		 url('fonts/dejavusans-bold-webfont.ttf') format('truetype'),
		 url('fonts/dejavusans-bold-webfont.svg#dejavu_sansbold') format('svg');
	font-weight:700;
	font-style:normal;
}

@font-face {
	font-family:'dejavu_sans';
	src:url('fonts/dejavusans-oblique-webfont.eot');
	src:url('fonts/dejavusans-oblique-webfont.eot?#iefix') format('embedded-opentype'),
	 local('DejaVuSans-Oblique'),
		 url('fonts/dejavusans-oblique-webfont.woff2') format('woff2'),
		 url('fonts/dejavusans-oblique-webfont.woff') format('woff'),
		 url('fonts/dejavusans-oblique-webfont.ttf') format('truetype'),
		 url('fonts/dejavusans-oblique-webfont.svg#dejavu_sansoblique') format('svg');
	font-weight:400;
	font-style:italic;
}

/*@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;800&display=swap');*/
/*@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap');*/



/* Text styles */

:root {
	/* --turquoise: #00C8DC; */
	--turquoise: #33D4D1;
	--turquoise2: #33D4D1;
	--blue: #5E90FF;
	--blue1: #4d88ff;
	--blue2: #0039ff;
	--blue3: #7CA8E6;
	--bluelink: #1563ff;
	--bluelinkvisited: #84b2f9;
	--gray: #D1D1D1;
	--gray2: #7f7f7f;
	--gray3: #aaaaaa;
	--darkgray: #6f737b;
	--darkgray2: #8F8F8F;
	--lightgray: #d9d9d9;
	--lightgray1: #F2F2F2;
	--lightgray2: #e1e1e1;
	--lightgray3: #eaeaea;
	--yellow: #ECF65C;
	--yellow2: #FFE66D;
	--purple: #857ee8;
	--orange: #ff8000;
	--transparent: rgba(255, 255, 255, 0);
}

button {
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
}

body {
	background-color: white;
}

body, td, th, input, form button, textarea, .tooltip:hover:after {
	font-family: "Rubik", "dejavu_sans", "Lucida Grande", sans-serif;
	line-height: 1.4;
	font-size: 1rem;
	font-weight: 400;
	-webkit-text-size-adjust: 100%;
}

strong {
	font-weight: 500;
}

a {
	color: var(--bluelink);
	text-decoration: none;
  /* -webkit-transition: .2s;
  -moz-transition: .2s;
  -o-transition: .2s;
  transition: .2s; */
  /* border-bottom: 1px solid transparent; */;
}

a:visited {
	color: var(--bluelinkvisited);
}

a:hover, a:active, a:focus, nav a:hover, nav a:active {
	color: var(--turquoise) !important;
	text-decoration: underline !important;
	outline: 0;
}

h1 {
	margin: 2rem 0 1.2rem;
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--darkgray);
}

h1:first-child {
	margin-top: 0;
}

h2 {
	font-weight: 500;;
	font-size: 1.1rem;
	margin: 1rem 0 0;
}

h3 {
	font-weight: 500;
	font-size: 1rem;
	margin: 1rem 0 0;
}

h4 {
	font-weight: 500;
	font-size: 1rem;
	margin: 1rem 0 0;
}

.hw, .hl {
	font-weight: 700;
	font-style: normal;
}

em {
	font-style: italic;
}

.gray {
	color: var(--gray2);
}

sup, sub {
	vertical-align: 0;
	position: relative;
	font-size: .7em;
}

sup {
	bottom: .4em;
}

sub {
	top: .4em;
}

.sc {
	font-size: .85em;
	text-transform: uppercase;
}

.sc:after {
	content: "\00200B";
	visibility: hidden;
	font-size: 11px;
}

/*.vert span {position:absolute;}*/
/*.vert span span  {
  display:inline-block;
  position:relative;
  -moz-transform:rotate(-90deg);
  -webkit-transform:rotate(-90deg);
  -o-transform:rotate(-90deg);
  -o-transform-origin:top left;
  right:50%;
  bottom:8px;}*/

.white-space {
	white-space: pre-wrap;
}

.stress {
	text-decoration: underline;
}

.norm, .for th {
	color: black;
	font-weight: 400;
}

.for, .th-for th, div.txt, .hw {
	color: var(--orange);
	font-family: dejavu_sans;
	font-size: .95em;
}

.phonetic {
	font-family: dejavu_sans;
	font-size: .94em;
}


/* Basic layout */

body {
	margin: 0;
	padding: 40px 60px 20px;
}

main {
	margin: 20px 0;
}


/* Header */

nav > ul {
	position: relative;
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	font-size: 1.2rem;
	color: var(--darkgray);
	align-items: baseline;
	font-weight: 500;
	padding-bottom: 1rem;
}

header nav::after {
	content: "";
	position: absolute;
	width: calc(100% - 120px);
	border-bottom: 3px solid var(--blue);
	z-index: 4;
}


.site-name {
	font-weight: 500;
	flex-grow: 1;
}

.site-name span {
	color: var(--turquoise);
}

nav a {
	color: var(--darkgray) !important;
}

.active {
	color: var(--turquoise) !important;
}

.active > a {
	color: var(--turquoise) !important;
}

nav i {
	margin-left: .3em;
	position: relative;
	top: .1em;
}

*:not(li) > a[href*="//"]:not([href*="jsrgev.net"])::after {
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	content: "\f35d";
	margin-left: 0.3rem;
	font-size: .75em;
	position: relative;
	top: -0.1em;
}

nav > ul > li {
	position: relative;
	z-index: 2;
}

nav > ul > li.expanded {
	z-index: 1;
}

.expandable button::after {
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	content: "\f078";
	margin-left: 0.3em;
	position: relative;
	top: 0.1rem;
}

.expandable:hover button::after, .expandable:active button::after, .expandable button:focus::after {
	color: var(--turquoise);
}

.expanded button::after {
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	content: "\f077";
	margin-left: 0.3em;
	position: relative;
	top: 0rem;
}

.clicky-menu .submenu {
	list-style-type: none;
	margin: 0;
	position: absolute;
	top: 0;
    right: -0.6rem !important;
	left: auto;
	padding: 2.25em 0 0;
	/* border-left: 3px solid var(--blue); */
	border-right: 3px solid var(--turquoise);
	border-bottom: 3px solid var(--turquoise);
	text-align: right;
	z-index: 1;
	background: 
	linear-gradient(180deg, #ffffffd6, var(--transparent))
	/* linear-gradient(180deg, #ffffffd6, red) */
	,
	 linear-gradient(90deg, #ffffffd6, #f2f2f2d6)
	 ;
	backdrop-filter: blur(2px);
}

.clicky-menu .submenu li:first-child {
	/* border-top: 3px solid var(--blue); */
	padding-top: 1rem;
}

.clicky-menu .submenu li {
	padding: .5rem 1rem 0;
	border-left: 3px solid var(--turquoise);
}

nav button {
	outline: 0;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	font-family: inherit;
	position: relative;
	z-index: 2;
}

.breadcrumbs {
	margin: 1rem 0 1rem;
}

.breadcrumbs span:first-child {
	white-space: pre-wrap;
}

.breadcrumbs span:last-child {
	font-weight: 500;
	color: var(--darkgray);
	font-size: 1.2rem;
	white-space: nowrap;
}


/* Footer */

footer {
	border-top: 3px solid var(--blue);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: .5em 15px;
	/* flex-direction: row-reverse; */
	color: var(--darkgray);
	padding-top: 1rem;
	flex-wrap: wrap;
	/* text-align: center; */
}

footer span:first-child {
	margin-left: auto;
}

footer span:last-child, header h1:last-child {
	margin-right: auto;
}


/* Social Media */


ul.social-media {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	height: calc(1.65rem * 5);
	flex-wrap: wrap;
	gap: .3rem;
}

.social-media i, svg {
	width: 1rem;
	margin-right: 1rem;
}

svg {
	display: inline;
	height: 1rem;
	position: relative;
	top: .2rem;
}

a path:last-child {
	fill: var(--bluelink);
}

a:visited path:last-child {
	fill: var(--bluelinkvisited);
}

a:hover path:last-child, a:hover path:last-child {
	fill: var(--turquoise);
}



/* Grid layouts */

.box-grid {
	display: grid;
	gap: 22px;
	justify-content: space-between;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	grid-auto-flow: dense;
}

.box-grid > div {
	margin: 0;
	box-sizing: border-box;
	padding: 10px;
	border-style: solid;
	border-width: 3px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.box-grid > div > * {
	margin-top: 0;
	margin-bottom: 0;
}

.box-grid .title {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.box-grid ul {
	list-style-type: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .2rem;
}

.box-grid .links {
	margin-top: auto;
}

.blockquote {
	margin-left: 1rem;
}

figure {
	margin: 0;
}

figure img {
	display: block;
	margin: auto;
	border: 1px solid black;
	box-sizing: border-box;
}

.panoramic-2 {
	grid-column: span 2;
}

.panoramic-3 {
	grid-column: span 3;
}

figcaption {
	text-align: center;
	margin-top: 1rem;
}


/* Dictionaries */

.dictionary .toc, .texts .toc {
	padding: 1rem 0;
	border: 3px solid var(--turquoise);
	padding: .5rem 1rem;
	background-color: var(--lightgray1);
}

.dictionary .toc ul, .texts .toc ul {
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	padding: 0;
	margin: 0;
	gap: 0.25rem 1rem;
}

.dictionary > div, .texts > div {
	border-bottom: 3px solid turquoise;
}

.dictionary > div:last-child, .texts > div:last-child {
	border-bottom: none;
}

.terms, .entries {
	column-gap: 40px;
}

.texts > div:not(:last-child, .toc) {
	padding-bottom: 1rem;
}

.entries {
	padding-bottom: 1rem;
	columns: 266px 2;
}

.terms {
	columns: 226px 2;
	padding: 0 40px;
	list-style-type: none;
}

.terms li, .entries p {
	break-inside: avoid;
	column-span: all;
}

.entries p:last-child {
	padding-bottom: 0;
}

li:nth-last-child(n + 11), li:nth-last-child(n + 11) ~ li, .entries p:nth-last-child(n + 5), .entries p:nth-last-child(n + 5) ~ p {
	column-span: none;
}

.texts h1 {
	margin: 1rem 0;
}

.dictionary h1 {
	margin: 1rem 0;
	column-span: all;
}

.terms li>span:first-child {
	float: left;
}

.terms li>span:last-child {
	display: block;
	margin-left: 4rem;
}

.entries h1 + p {
	margin-top: 0;
}


.double {
	display: grid;
	margin: 1rem 40px 1rem;
	gap: 1rem 40px;
	grid-template-columns: 1fr 1fr;
}



/* Grammar pages */

.grammar {
	display: flex;
	position: relative;
	border: 3px solid var(--turquoise);
	margin-bottom: 0;
	height: 90vh;
}

.grammar > div {
	overflow: scroll;
}

.grammar .toc {
	background-color: var(--lightgray1);
	border-right: 3px solid var(--turquoise);
	width: 15rem;
}

.grammar ~ footer {
	border: 0;
}

.contents {
	flex: 1;
}

.toc > div {
	padding: 1rem;
}

.contents > div {
	padding: 0 1rem;
}





/* Text glossing */

div.line, div.phrase, div.txt {
	float: left;
}

div.line {
	clear: both;
	margin-top: 1em;
}

/* .double + div.line {
	margin-top: 0;
} */

div.phrase + div.phrase {
	margin-left: 40px;
}

div.txt {
	margin-right: 1em;
}

div.txt>span {
	display: block;
}

div.txt>span:last-child {
	color: black;
}

.txt + p {
	margin: 0;
	clear: both;
}

.double h4 {
	margin: 0;
}



/* Tables */

table {
	border-spacing: 0;
	border-collapse: collapse;
}

table.third {
	width: 33%;
}

table.half {
	width: 50%;
}

table.tt {
	width: 66%;
}

table.full {
	width: 100%;
}

.np, table.np td {
	padding: 0;
}

td, th {
	border: 1px solid;
	padding: 1px 5px;
}

.nb td, .nb {
	border: 0;
}

td.nb, th.nb {
	background-color: white !important;
}

th {
	font-weight: 400;
	text-align: left;
}

.top td {
	vertical-align: top;
}

.mid {
	vertical-align: middle;
}

.ctr td, .ctr th, .th-ctr th, .ctr {
	text-align: center;
}

.ctr td.left {
	text-align: left;
}

table.for {
	white-space: nowrap;
}


/* Border and background colors */

main.white div, .box-grid .title {
	border-color: white;
}

body.blue div, .border-blue {
	border-color: var(--blue3);
}

body.turquoise div, .border-turquoise {
	border-color: var(--turquoise2);
}

.yellow, .yellow div, .border-yellow {
	border-color: var(--yellow2) !important;
}

.border-gray {
	border-color: var(--lightgray);
}

/* .toc,  */
/* .chapter,  */
th {
	background-color: var(--lightgray1);
}

.bg-gray {
	background-color: var(--lightgray2);
}

table * {
	border-color: var(--gray3);
}




/* Grammar sections */

.chapter {
	text-align: center;
}

.grammar h1 {
	margin: 1rem 0;
}

div.chapter, div.section, div.subsection, div.unnumbered-section {
	border-bottom: 3px solid var(--turquoise);
	margin: 0;
}

.section:last-child, .sub:last-child {
	border-bottom: none;
}

.grammar h1:before {
	content: counter(h1) " ";
}

.chapter {
	counter-increment: h1;
	counter-reset: h2;
}

.grammar h2:before {
	content: counter(h1) "." counter(h2) " ";
}

.section {
	counter-increment: h2;
	counter-reset: h3;
}

.grammar h3:before {
	content: counter(h1) "." counter(h2) "." counter(h3) " ";
}

.subsection {
	counter-increment: h3;
}


/* Table of Contents */

.toc ol {
	margin: 0;
	padding: 0;
	counter-reset: item;
}

.toc ol li {
	display: block;
	margin: 0;
}

.toc ol li:before {
	content: counters(item,  ".") " ";
	counter-increment: item;
}

/* .toc > div > ol > li + li {
	margin-top: 1.12em;
} */

.toc > div > ol > li + li {
	margin-top: 1.12em;
}

.toc ol, .entries p {
	text-indent: -1.2em;
	margin-left: 1.2em;
	text-indent: -.85em;
	margin-left: .85em;
}

ol ol {
	list-style-type: lower-alpha;
}


/* Tooltip */

.tooltip {
	position: relative;
}

.tooltip:hover:after {
	background: rgba(255,255,255,.97);
	border: 2px solid var(--yellow2);
	border-radius: 15px;
	bottom: calc(100% + 1rem);
	left: 1.5rem;
	color: black;
	content: attr(tooltip);
	padding: 5px;
	position: absolute;
	z-index: 98;
	font-family: dejavu_sans;
	font-size: .95em;
}

blockquote .tooltip:hover:after {
	width: 18rem;
}

.tooltip:hover:before {
	border: solid;
	border-color: var(--yellow2) var(--transparent);
	border-width: 9px 9px 0 3px;
	bottom: calc(100% + 1rem - 9px);
	content: "";
	left: 2.5rem;
	position: absolute;
	z-index: 99;
}

h3.tooltip:hover:after {
	white-space: nowrap;
}

/* blockquote .tooltip:hover:after {
	width: 200px;
} */


/* Clearfix */

main>div:not(.box-grid):after, blockquote:after {
	content: "";
	display: table;
	clear: both;
}


/* Contact form */

form.contact {
	margin: auto;
	max-width: 45rem;
	border: 3px solid var(--blue);
	padding: 1rem;
	border-radius: 10px;
	box-sizing: border-box;
	box-shadow: 2px 2px 0px var(--gray);
}

form.contact div {
	position: relative;
}

.contact label {
	position: absolute;
	top: .3rem;
	color: var(--darkgray2);
	line-height: 1.2;
}

.contact input, .contact textarea {
	width: 100%;
	padding: .3rem .5rem;
	background-color: #fefefe;
	box-sizing: border-box;
	border: 0;
	border-radius: 0;
	outline: 0;
}

.contact input {
	padding-left: 5rem;
	margin-bottom: 1rem;
	line-height: 1.2;
	border-bottom: 2px solid var(--blue);
}

.contact textarea {
	min-height: 4rem;
	margin-bottom: 1rem;
	resize: vertical;
	border: 2px solid var(--blue);
}

input:hover, textarea:hover, input:focus, textarea:focus {
	border-color: var(--yellow);
}

form.contact button, #form-message {
	padding: .3rem;
	box-sizing: border-box;
	outline: 0;
	font-weight: 500;
	text-align: center;
}

form.contact button {
	background: var(--lightgray1);
	border-radius: 10px;
	width: 10rem;
	display: block;
	margin: auto;
	color: var(--bluelink);
	border: 2px solid var(--blue);
	box-shadow: 2px 2px 0px var(--gray), -2px -2px 0px white;
}

form.contact button:hover, form.contact button:focus {
	color: var(--turquoise);
	/* border-color: var(--yellow); */
}

form.contact button:active {
	background-color: var(--lightgray3);
	box-shadow: inset 3px 3px 5px var(--gray), inset -3px -3px 5px #ffffffba;
}

button:disabled, button:disabled:hover {
	border: 2px solid var(--gray3);
	color: var(--gray3);
}

::placeholder {
 /* Chrome, Firefox, Opera, Safari 10.1+ */
	color: var(--darkgray2);
	opacity: 1;
 /* Firefox */;
}

:-ms-input-placeholder {
 /* Internet Explorer 10-11 */
	color: var(--darkgray2);
}

::-ms-input-placeholder {
 /* Microsoft Edge */
	color: var(--darkgray2);
}




/* Media Queries */

/* width at which grid switches to 2 items per row */
@media all and (max-width: 1003px) {
	.panoramic-3 {
		grid-column: span 2;
	}
}

@media all and (max-width: 909px) {
	.double > *:nth-of-type(odd) {
		order: -1;
	}

	.double {
		grid-template-columns: 1fr;
	}
}


@media all and (max-width:799px) {
	body {
		padding: 20px;
	}

	header nav::after {
		content: "";
		position: absolute;
		width: calc(100% - 40px);
		border-bottom: 3px solid var(--blue);
		z-index: 4;
	}

	blockquote {
		margin-left: 10px;
	}

	.grammar {
		height: auto;
		flex-direction: column;
	}

	.grammar > .toc {
		width: 100%;
		border-right: none;
		border-bottom: 3px solid var(--turquoise);
	}

	div.toc > div {
		columns: 10rem 2;
		column-gap: 40px;
	}

}

/* width at which grid switches to 1 item per row */
@media all and (max-width:621px) {

	.panoramic-2, .panoramic-3 {
		grid-column: span 1;
	}

}


@media all and (max-width: 510px) {

	nav li {
		flex-basis: 100%;
	}

	.clicky-menu .submenu {
		position: relative;
		display: none;
		padding: 0;
		border: 0;
		right: 0 !important;
		background: var(--transparent);
	}

	.expanded .submenu {
		display: block;
	}

	.clicky-menu .submenu li:first-child {
		border-top: none;
		padding-top: .5rem;
	}

	.clicky-menu .submenu li {
		padding: 0 0 0 1rem;
		border-left: 3px solid var(--turquoise);
		text-align: left;
		padding-top: .5rem;
	}

	ul.social-media {
		height: unset;
	}
}




