::-moz-selection { /* Code for Firefox */
  color: black;
  background: yellow;
}

::selection {
  color: black;
  background: yellow;
}


* {
	padding: 0;
	margin: 0;
}

html, body {
	height: 100%;
}

body {
	-webkit-text-size-adjust: 100%;
 	-webkit-font-smoothing: none; 
	letter-spacing: 0.01em;
	overflow: hidden;
	font-family: "IBM Plex Mono";
		word-break: keep-all;
}
i{
	font-weight: 600;
}
ul {
	list-style: none;
}

a:link, a:visited, a:hover {
	color: #FF00BF;
	text-decoration: none;
	word-break: break-all;
}

img{
	image-rendering:pixelated;
}
	figcaption{
	font-size: 10px; background-color: black; color: rgb(226,242,232);
	font-style: italic;
	}

/* COLORS */
/* default */
body, footer.control, .buttons-wrap {
	background-color: azure;
}

.border, .screen-outer {
	background-color: rgb(215,214,204);
}



.button.selected {
	background-color: rgb(225,217,208);
}

@media (hover: hover) { 
	.button:not(.null):hover {
		background-color: rgb(225,217,208);
	}
}

.button.null {
	color: rgb(195,194,184);
	text-shadow: -1px -1px 0px rgb(232,227,220);
	-webkit-font-smoothing: antialiased;
}

.screen-outer::-webkit-scrollbar-thumb {
	background-color: rgb(175,174,164);
}

.screen, header.local {
	background-color: rgb(226,242,232);
	color: rgb(43,46,45);
}

.audio{
	border:none !important;
	font-weight: 600;
	line-height: 2.0;
	text-decoration: overline;
	position: relative; text-align: center; left: 50%; transform: translateX(-50%); margin-top: 12px;
}

.index .screen, .index header.local {
	background-color: rgb(226,238,219);
}

.screen section header p, sup, span.footnote, .menu {
	background-color: white;
}

span.highlight {
	background-color: white;
}

button{
	cursor: pointer;
}
/* black and white */
.bw .screen, .bw header.local {
	background-color: rgb(245,245,245);
}


.bw span.highlight {
	background-color: rgb(255,255,60);
}



/* evening */
.evening .screen, .evening header.local {
	background-color: rgb(43,46,45);
	color: rgb(226,242,232);
	-webkit-font-smoothing: antialiased;
}

.evening header.local {
	border-bottom: 1px solid rgb(226,242,232);
}

.evening .screen section header p, .evening sup, .evening span.footnote {
	background-color: rgb(226,242,232);
	color: rgb(43,46,45);
}

.evening sup:hover {
	background-color: transparent;
	color: rgb(226,242,232);
}

.evening span.highlight {
	color: rgb(43,46,45);
	background-color: rgb(226,242,232);
}


.nav-item {
  font-size: 1em; /* the text size */
}

.nav-item .logo {
  width: 1em;
  height: 1em;
  vertical-align: middle; /* optional: aligns better with text */
}


/* STRUCTURE */
header.global {
	border-top: 1px solid rgb(200,200,200);
	text-shadow: -0.5px -0.5px 0px rgb(200,200,200);
	color: rgb(53,56,55);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	font-family: "IBM Plex Mono";
	font-weight: bold;
	font-size: 12px;
	text-align: center;
	letter-spacing: 0.04em;
	z-index: 20;
}

header.global .title {
	background-color: rgb(220,220,220);
	border-bottom: 1px solid rgb(200,200,200);
	display: grid;
	grid-template-columns: repeat(18, 1fr);
}

header.global a.title:hover {
	background-color: rgb(200,200,200);
	border-bottom: 1px solid rgb(180,180,180);
}

header.global .title p {
	grid-column: 3 / 17;
	height: 15px;
	padding: 4px 3px 2px 3px;
}

.border-wrap {
	display: grid;
	grid-template-columns: repeat(18, 1fr);
}

header.global .border-wrap {
	border-top: 1px solid rgb(120,120,120);
}

.border {
	grid-column: 3 / 17;
	display: flex;
	justify-content: space-between;
}

.border.top {
	border-bottom: 3px double rgb(120,120,120);
}

.border.bottom {
	border-top: 3px double rgb(120,120,120);
}

.border img.ornament {
	border-left: 3px double rgb(120,120,120);
	border-right: 3px double rgb(120,120,120);
	width: 17px;
	height: 17px;
	padding: 2px;
}

footer.control {
	border-bottom: 3px double rgb(120,120,120);
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
}

.buttons-wrap {
	border-top: 3px double rgb(120,120,120);
	height: 37px;
	display: grid;
	grid-template-columns: repeat(18, 1fr);
}

.buttons-row {
	border-left: 3px double rgb(120,120,120);
	border-right: 3px double rgb(120,120,120);
	grid-column: 3 / 17;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	padding: 0 22px;
}

.buttons-row .blank {
	border-left: 1px solid rgb(120,120,120);
	border-right: 1px solid rgb(120,120,120);
	grid-column: 1 / 5;
}

.button {
	grid-column: span 1;
	padding: 14px 14px 12px 14px;
	line-height: 11px;
	letter-spacing: 0.02em;
	text-align: center;
	border-left: 1px solid rgb(120,120,120);
	cursor: pointer;
	user-select: none;
}

.button:last-child {
	border-right: 1px solid rgb(120,120,120);
}

/* SCREEN */
main.screen-wrap {
	margin-top: 46px;
	height: calc(100% - 11px);
	display: grid;
	grid-template-columns: repeat(18, 1fr);
}

.sub-sections {
	border-top: 1px double rgb(120,120,120);
	grid-column: 1 / 3;
	margin-top: -1px;
}

.sub-sections li {
	border-bottom: 1px solid rgb(120,120,120);
	list-style: none;
	padding: 7px;
	cursor: pointer;
}

.sub-sections li.selected, .sub-sections li:hover {
	background-repeat: no-repeat;
	background-image: linear-gradient(rgb(255,99,0), rgb(255,99,0));
	background-size: 1px 100%;
}
/* SCREEN OUTER - allow horizontal scroll */
.screen-outer {
    border-left: 3px double rgb(120,120,120);
    padding-left: 21px;
    grid-column: 3 / 17;
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* adjust number of columns if needed */
    grid-gap: 21px;
    overflow-x: auto;   /* horizontal scroll enabled */
    overflow-y: scroll; /* vertical scroll stays */
}

.home .screen-outer {
    border-right: 3px double rgb(120,120,120);
    padding-right: 21px;
    overflow-x: auto;   /* allow horizontal scroll here too */
    overflow-y: scroll;
}

.screen-outer::-webkit-scrollbar {
    width: 24px;       /* vertical scrollbar width */
    height: 12px;      /* horizontal scrollbar height */
}

.screen-outer::-webkit-scrollbar-track {
    border-right: 3px double rgb(120,120,120);
}

.screen-outer::-webkit-scrollbar-thumb {
    border-left: 1px solid transparent;
    border-right: 4px solid transparent;
    border-top: 3px double rgb(120,120,120);
    border-bottom: 3px double rgb(120,120,120);
    background-clip: content-box;
}

.screen {
	border-left: 3px double rgb(120,120,120);
	border-right: 3px double rgb(120,120,120);
	padding: 21px;
	grid-column: 1 / 11;
}

.home .screen {
	display: grid;
	grid-template-rows: 1fr auto;
	justify-items: start;
}

.screen menu a {
	display: block;
	cursor: pointer;
}

.screen menu a:before {
	content: 'â–’ ';
}

.screen menu a:hover:before, .screen menu a.selected:before {
	content: 'â–“ ';
}

.screen .floater {
	width: 150px;
	margin: 0 auto;
	position: fixed;
}

.home .about {
	display: none;
	background-color: white;
	border: 1px solid rgb(120,120,120);
	position: fixed;
	top: 50%;
	left: 50%;
	padding: 0 12px;
	margin: -200px 0 0 -148px;
	width: 296px;
	overflow-y: hidden;
	box-shadow: -2px 2px 0px rgb(160,160,160);
	z-index: 10;
}

.home .about p {
	padding-bottom: 12px;
}

.home .about p:first-child {
	padding-top: 12px;
}

.home .about p:last-child {
	padding-bottom: 12px;
}

.home .about #close {
	text-align: right;
}

.home .about #close p {
	cursor: pointer;
	display: inline-block;
}

.home .about #close p:hover {
	color: rgb(255,99,0);
}

header.local {
	border-bottom: 1px solid rgb(120,120,120);
	padding: 15px 0 12px 0;
	position: fixed;
	top: 48px;
	width: calc(((100vw/18)*14) - 97px);
	display: flex;
	justify-content: space-between;
	z-index: 5;
}

header.local > div {
	flex: 1;
}

header.local .chapter-title {
	flex: 3;
	text-align: left;
	width: 100%;
}

header.local .next {
	text-align: right;
}

header.local a:hover {
	color: rgb(145,145,145);
}
.banner{
	width: 100%; 
	max-width: 700px;
	position: relative; left: 50%; transform: translateX(-50%);
margin-top: 120px;
}
.screen #content {
/*	margin-top: 150px;*/
	margin-bottom: 180px;
	z-index: 1;
	min-height: calc(100vh - 211px);
}
.outline{
	font-weight: bold;
	font-size: 18px;
	margin-bottom: 15px;
}
.screen #content p {
	padding-bottom: 15px;
}

.screen #content p:last-child {
	padding-bottom: 0;
}

.screen section:not(:last-child) {
	padding-bottom: 30px;
}

.screen section:not(:last-child):nth-child(odd)::after {
	content: '';
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	position: relative;
	display: inline-block;
	width: 100%;
    height: 12px;
    margin-top: 28px;
}

.screen section:not(:last-child):nth-child(even)::after {
	content: '';
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	position: relative;
	display: inline-block;
	width: 100%;
    height: 12px;
    margin-top: 28px;
}

.screen section header {
	padding-bottom: 15px;
	text-align: center;
}

.screen section header p {
	display: inline-block;
	padding: 0 3px;
}

sup {
	margin-left: 3px;
    line-height: 0;
    vertical-align: 5px;
    cursor: pointer;
}

.font-sml sup, .font-sml .fragment-tag, .font-sml .generate span.sup {
	vertical-align: 3px;
}

.font-lrg sup, .font-lrg .fragment-tag, .font-lrg .generate span.sup {
	vertical-align: 8px;
}

sup:hover {
	background-color: transparent;
}

span.footnote {
	border: 1px solid rgb(120,120,120);
	position: absolute;	
	max-width: 200px;
	padding: 12px;
	margin: 23px 0 0 0;
	opacity: 0;
	z-index: -1;
}

.index .screen #content {
	margin: 58px 0 0 0;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-gap: 21px;
}

.index .screen #content .column {
	padding-left: 21px;
	border-left: 1px solid rgb(120,120,120);
}

.index .screen #content .column:first-child {
	padding-left: 0;
	border-left: none;
}

.index .screen #content .conditional-1a {
	padding-top: 21px;
}

.index .screen #content .conditional-1b {
	display: none;
}

.index .screen #content p {
	text-indent: -1em;
	margin-left: 1em;
}

.index .screen #content .class-id p {
	text-indent: 0;
	margin-left: 0;
}

.index .screen #content .class-id {
/* 	text-align: center; */
}

.index .screen #content .class-id:not(:first-child) {
	padding-top: 21px;
}

.index .screen #content .class-id p {
	background-color: white;
	display: inline-block;
}

.index .screen #content p {
	padding-bottom: 0;
}


.about a:link, .credits .screen a:link {
	border-bottom: 1px solid;
}

.about a:hover, .credits .screen a:hover {
	border-bottom: none;
}

.credits .screen #content {
	margin: 58px 0 0 0;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
}

.credits .screen #content .column {
	grid-column: span 4;
}

.credits .screen #content .column:not(:first-child) {
	grid-column: span 2;
	padding-left: 21px;
}

.credits .screen #content .column:first-child p {
	padding-right: 21px;
}

.credits .screen #content .column header p {
	display: inline-block;
	background-color: white;
	padding-right: 0 !important;
	margin-bottom: 15px;
}

.inline-columns {
	columns: 4 192px;
	column-gap: 42px;
	column-fill: auto;
	column-rule: 1px solid rgb(120,120,120);
}

.inline-columns p {
	padding-bottom: 0 !important;
	text-indent: -1em;
	margin-left: 1em;
}

article.indent {
	margin-left: 31px;
	padding-bottom: 15px;
}

article.indent:last-child {
	padding-bottom: 0;
}

p.numeral {
	float: left;
	line-height: inherit !important;
}

.generate {
	margin-bottom: -21px;
}

.screen section.generate header {
	text-align: left;
}

.screen section.generate header p:hover {
	background-color: rgb(255,99,0);
	cursor: pointer;
	user-select: none;
}

.generate span.sup {
	text-transform: uppercase;
	margin: 0 3px 0 2px;
}

.fragment-tag, .generate span.sup {
	opacity: 0;
	font-family: "IBM Plex Mono";
	font-size: 12px;
	vertical-align: 5px;
	padding-bottom: 5px;
	line-height: 0;
	cursor: default;
}

.fragment-tag:hover, .generate span.sup:hover {
	color: rgb(255,99,0);
	opacity: 1;
}

.pop-up-wrap {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 42px;
	display: grid;
	grid-template-columns: repeat(18, 1fr);
	pointer-events: none;
}

.pop-up {
	grid-column: 3 / 17;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	padding: 0 25px;
}

#contents.menu {
	display: none;
	grid-column: 1 / 3;
	pointer-events: auto;
}

#settings.menu {
	display: none;
	grid-column: 2 / 4;
	pointer-events: auto;
}

.menu {
	border-top: 1px solid rgb(120,120,120);
	border-left: 1px solid rgb(120,120,120);
	border-right: 1px solid rgb(120,120,120);
	padding: 18px 21px 21px 21px;
	margin-right: -1px;
}

.menu .item {
	border-bottom: 1px solid rgb(120,120,120);
	padding: 7px 0;
}

.menu .item:first-child {
	padding: 3px 0 7px 0;
}

.menu .item a:hover, .menu .item.selected {
	color: rgb(145,145,145);
	-webkit-font-smoothing: antialiased;
} 

.menu .item:last-child {
	border-bottom: none;
	padding: 7px 0 0 0;
}

.menu header {
	border-bottom: 1px solid rgb(120,120,120);
	padding: 3px 0;
	margin-bottom: 7px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.menu .option:hover {
	cursor: pointer;
	color: rgb(145,145,145);
}

.menu .option:before {
	content: 'â—‹ '
}

.menu .selected.option:before {
	content: 'â€¢ '
}

#settings .group:not(:last-child) {
	padding-bottom: 17px;
}

.size-button-wrap {
	padding-top: 7px;
	display: flex;
}

.size-button {
	border: 1px solid rgb(120,120,120);
	width: 42px;
	height: 42px;	
	margin-right: 21px; 
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 21px;
	cursor: pointer;
}

.size-button:not(.selected):hover {
	border: 2px solid rgb(120,120,120);
	margin: -1px 20px -1px -1px;
}

.size-button.selected {
	border: 2px solid rgb(120,120,120);
}

#font-sml.size-button {
	height: 36px;
	padding-top: 6px;
}

#c.size-button {
	font-size: 20px;
}

#font-lrg.size-button {
	font-size: 24px;
}

.font-med{
	font-family: "IBM Plex Mono", Times, sans-serif;
	font-size: 13px;
	font-weight: 400;
	text-align: left;
	width: 48%;
}

/*@media screen and (max-width: 1296px) {
	.index .screen #content {
		grid-gap: 21px 0;
		grid-template-columns: repeat(2, 1fr);
	}
	
	.index .screen #content .column {
		padding-left: 21px;
		border-left: 1px solid rgb(120,120,120);
	}
	
	.index .screen #content .column:nth-child(odd) {
		padding-left: 0;
		border-left: none;
	}
	
	.index .screen #content .conditional-1a {
		display: none;
	}
	
	.index .screen #content .conditional-1b {
		display: block;
	}
}*/

@media screen and (max-width: 768px) {
	body {
	 /*   height: calc(100vh - 147px);
	    width: 100vw;
	    overflow-x: hidden;*/
	    word-break: break-all;
	}
	.screen{
		padding: 10px;
	}
	.screen #content{
/*		margin-top: 140px;*/
	}
	.font-med{
		width: 49%;
	}
	.audio{
		font-size: 10px;
	}
	.header.local{
		width: 80vw;
	}
	.main.screen-wrap{
		grid-template-columns: repeat(1,1fr);
	}
    .screen-outer {
        grid-column: 2 / 18;
        padding-right: 21px;
        border: none;
        overflow-x: auto;   /* horizontal scroll stays enabled */
        overflow-y: scroll;
    }

    .screen-outer::-webkit-scrollbar {
        width: 0px;  /* hide scrollbar if desired on small screens */
        height: 0px;
    }
	.border{
		grid-column: 2 / 18;
	}
	.buttons-row{
		grid-column: 2 / 18;
	}
	header.local{
		
		position: fixed;
		left: 50%;
		transform: translateX(-50%);
	}


/*	.font-med{
		font-size: 0.8em;
	}

	body:not(.home) {
		overflow-y: auto;
	}
	
	main.screen-wrap {
		height: auto;
	}
	
	.sub-sections {
		display: none;
	}


	.screen-outer {
		padding-right: 21px;
		border: none;
		grid-column: 1 / 19;
		overflow-x: hidden;
	}
	
	.home .screen-outer {
		border-right: none;
	}
	
	.screen-outer::-webkit-scrollbar {
	    width: 0px;
	}
	
	header.global {
		width: 100vw;	
	}
	
	header.global .title p {
		border: none;
		grid-column: 1 / 19;
	}
	
	.border {
		grid-column: 1 / 19;
	}
	
	.border img.ornament.left {
		border-left: none;
	}
	
	.border img.ornament.right {
		border-right: none;
	}
	
	header.local {
		width: calc(100vw - 84px);
	}
	
	.screen-wrap {
		min-height: 100%;
	}
	
	.home .screen-wrap {
		min-height: auto;
	}
	
	.screen #content {
		padding-bottom: 101px;
		min-height: calc(100vh - 247px);
	}
	
	.screen #content p {
	
	}
	
	footer.control {
		width: 100vw;
		height: 98px;
	}
	
	.buttons-row {
		background-color: rgb(120,120,120);
		border: none;
		grid-column: 1 / 19;
		padding: 0;
		grid-gap: 1px;
	}
	
	.pop-up-wrap {
		bottom: 77px;
	}
	
	.pop-up {
		grid-column: 1 / 19;
		padding: 0;
	}
	
	.menu {
	    margin-left: -1px;
	}
		
	#contents.menu {
		grid-column: 1 / 5;
	}
	
	#settings.menu {
		grid-column: 1 / 5;
		margin-left: -1px;
	}
	
	.home footer.control {
		height: 21px;
	}
	
	.home main.screen-wrap {
		height: calc(100vh - 67px);
	}
	
	.frame-wrap {
		height: calc(100vh - 289px);
	}
	
	.index .screen #content {
		grid-template-columns: repeat(1, 1fr);
	}
	
	.index .screen #content .column:not(:first-child) {
		padding-left: 0;
		border-left: none;
	}
	
	.credits .screen #content {
		display: block;
	}
	
	.credits .screen #content .column:not(:first-child) {
		margin-top: 42px;
		padding-left: 0;
	}
	
	.credits .screen #content .column:first-child p {
		padding-right: 0;
	}


	*/
}