/* body, colours */
:root{
  --primary: #2d7d9a;
  --secondary: #0f4659;
  --secondary-fg: #cfe1e7;
  --light-page: #f8f8f8;
  --light-page2: #e0e0e0;
  --light-border: #C2C2C2;
  --dark-page: #121212;
  --dark-border: #A5A5A5;
  --hrule: #900030;
  --header-height: 40px;
  --sidebar-width: max(15dvw, 150px);
  --leftcolumn-width: max(15dvw, 150px);
  --default-border: var(--light-border);
  --default-color: var(--light-page);
  --default-background: var(--light-page);
  --app-fg: Orange;
  --app-fg2: #b36200;
  --app-bg: Linen;
  --green-fg: #166883; /* actually more blue */
  --green-bg: #eef4f6;
}
body, body.light {	
	margin: 0;
	padding: 2px 8px;
}
body, body.light {	
  background: linear-gradient(var(--secondary-fg) 20px, var(--light-page) 100px, var(--light-page) 160px) no-repeat;
	color: var(--dark-page);
  --hr-color: var(--secondary);
  --hr-background: var(--secondary-fg);
  --default-border: var(--light-border);
  --default-color: var(--dark-page);
  --default-background: var(--light-page);
  --app-color: var(--app-fg);
  --app-background: var(--app-bg);
  --highlight-color: var(--green-fg);
  --highlight-background: var(--green-bg);
}
body.dark {	
  background: linear-gradient(var(--secondary) 60px, var(--dark-page) 100px, var(--dark-page) 160px)  no-repeat;
	color: var(--light-page2);
  --hr-color: var(--secondary-fg);
  --hr-background: var(--secondary);
  --default-border: var(--dark-border);
  --default-color: var(--light-page2);
  --default-background: var(--dark-page);
  --app-color: var(--app-bg);
  --app-background: var(--app-fg2);
  --highlight-color: var(--green-bg);
  --highlight-background: var(--green-fg);
}

.light {
  color: var(--dark-page);
  background-color: var(--light-page);
}
.dark {
  color: var(--light-page2);
  background-color: var(--dark-page);
}
.green {	
  color: var(--highlight-color);
}
.black {	
  color: black;
}
.primary {	
  background-color: var(--primary);
  color: var(--light-page);
}
.secondary {	
  background-color: var(--secondary);
  color: var(--light-page2);
}
.text-app {
  background-color: var(--app-color);
}
.app-bg {
  background-color: var(--app-bg);
}
.app-fg {
  color: var(--app-fg);
}
.primary-bg, .text-primary {
  background-color: var(--primary);
}
.primary-fg {
  color: var(--primary);
}
.secondary-bg, .text-secondary {
  background-color: var(--primary);
}
.secondary-fg {
  color: var(--primary);
}
.light-border-bg {
  background-color: var(--light-border);
}
.light-border-fg {
  color: var(--light-border);
}
.white-fg {
  color: white;
}
.light-grey {
	background-color: var(--default-page);
}

/* fonts, font-size, font-weight, line-height */
body, td, th, p, dl, input, li, button {
	line-height: 1.3;
	font-size: 100%;
}
* {
	font-family: Roboto, -apple-system, Avenir, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
	font-weight: 350;
}
code, kbd, pre, samp, tt, .pre, .code, xmp {
  font-size: 95%;
	font-family: Monaco,Menlo,Consolas,"Ubuntu Mono",monospace;
	tab-size: 4;
}	
dl xmp {	
  font-size: 110%;
	font-family: Monaco,Menlo,Consolas,"Ubuntu Mono",monospace;
}
big, .big {	
  font-size: 120%;
}
small, .small {	
  font-size: 85%;
}
sub, sup {
	font-size: 80%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}
sub {
	bottom: -0.25em;
}
sup {
	top: -0.5em;
}
sup > i {
	padding-left: 1px;
}
code {
	padding: 2px 4px;
	color: #c7254e;
	background-color: #f9f2f4;
	border-radius: 4px;
}
pre, .pre, xmp {
	overflow: auto;
}
.pre {
	display: block;
	white-space: pre;
}
.tight {
	margin: -0.8em auto -1.2em;
}
.footnote {	
  font-size: 90%;
	font-style: oblique;
}
b, .bold, strong {	
  font-weight: 550; 
}
.tight {
	line-height: 1.0;
}
.pre.box {
	margin: 0 0.7em 0;
	padding: 0 0.7em 0;
	background-color: var(--default-background);
	opacity: 0.95;
	border-radius: 4px;
	max-height: 340px;
	overflow: auto;
}
.box {
	border-radius: 4px;
	padding: 4px;
}
.bottom-box {
	margin-top: -1px;
	border-radius: 0px 0px 4px 4px;
	padding: 4px;
}
.top-box {
	border-radius: 4px 4px 0px 0px;
	padding: 4px;
}
.box, .bottom-box, .top-box, .pre.box {
	border: 1px solid var(--default-border);
}
.scaled-img {
	max-width: 100%;
}


/* general */
.pa-none {
  padding: 0;
}
.px-small {
  padding-left: 6px;
  padding-right: 3px;
}
.ma-none {
  margin: 0;
}
.indent {
	margin: 0px 0.6em !important;
}
.text-left {
	text-align: left;
}
.text-right {
	text-align: right;
}
.text-center {
	text-align: center;
}
.text-centre {
	text-align: center;
}
.text-justify {
	text-align: justify;
}
}
.center {	
  text-align: center;
}
.o {	
  text-decoration: overline;
}
hr {
	height: 2px;
	background-color: var(--primary);
	inset: 0;
}
.clear {
	clear:both;
}
.flex {
  display: flex;
}
.center {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.scroll {
  overflow: auto;
}
.no-scroll {
  overflow: hidden;
}
.full-width {
  width: 100%;
  padding: 0;
}
.full-height {
  height: 100%;
  min-height: 100%;
}

/* headers */
h1, .h1 {
	font-size: 150%;
	font-weight: 400;
	background-color: var(--hr-background);
	border: 3px solid var(--default-border);
	margin: 0;
	margin-top: 15px;
	padding: 2px;
	width: auto;
}
h2, .h2 {	
  font-size: 130%;
	font-weight: 500;
	background-color: var(--hr-background);
	border: 2px solid var(--default-border);
	padding: 2px;
}
h3, .h3 {	
  font-size: 120%;
	font-weight: 500;
	/*background-color: var(--light-border);*/
	border: 1px solid var(--default-border);
	padding: 2px;
}
h3.fig {	
  font-size: 110%;
	background-color: var(--light-page);
	color: var(--dark-page);
	text-align: center;
}
h4, .h4 {	
  font-size: 110%;
	font-weight: 600;
}
h2 a:link, h3 a:link, .h2 a:link, .h3 a:link {	
  text-decoration: none;
}

/* table */
table {
	border-collapse: collapse;
	border-spacing: 0;
}
td, th {	
  text-align: left;
	padding: 2px;
}
th {	
  font-weight: 600; 
}
table.eq, table.eq tr, table.eq td, table.frac, table.frac tr, table.frac td {	
  padding: 0px;
	border: 0px;
}
table.frac td {	
	text-align: center;
}
table.frac hr {	
  height: 1px;
}
.table {
	margin: 4px 4px 4px 1.4em;
	border-top: 3px solid #555;
	border-width: 3px 0;
	border-style: solid;
	border-color: #555 #bbb;
}
.table th  {
	padding: 4px 0.7em;
	border-bottom: 2px solid #555;
}
.table td  {
	padding: 1px 0.7em;
}
tr.midrule {
	padding-top: 4px;
	padding-bottom: 4px;
	border-top: 2px solid #555;
}
tr.midspace {
	height: 4px !important;
}

/* general links */
a:link, a:visited, a:active {
  color: inherit; 
  text-decoration: underline;
}
a:hover {	
  color: inherit; 
  text-decoration: underline;
}
a.external:after {
  /*padding-right: 2px;*/
  content: url(../style/open_in_new_16grey.svg);
  vertical-align: bottom;
  filter: hue-rotate(220deg) saturate(5);
  padding:0;
}
/* lists */
ul, ol, dl {
	margin: 1em 0;
}
ul ul, ol ul, ul ol, ol ol {
	margin: 0;
}
dt {
	font-weight: normal;
}
.one-column-list {
  list-style-image: none;
  list-style-type: none;
  margin: 0;
  padding: 0 3px 0 6px;
}
.column-list li {
	float: left;
	width: 140px;
}
.column-list {
	list-style-image: none;
	list-style-type: none;
	margin: 0;
	padding: 0;
	padding-left: 1em;
}
.column-list .newline {
	clear: both;
}
.column-list-wide li {
	width: 200px;
}


/* highlighted sections */
.highlight {
  border-left: 6px solid var(--hr-color);
  border-radius: 4px;
  padding: 3px 6px 3px 6px;
  background: var(--highlight-background);
}
.highlight-app {
  border-left: 6px solid var(--app-color);
  border-radius: 4px;
  padding: 3px 6px 3px 6px;
  background: var(--app-background);
}

/* main page grid layout */
.page {
  display: grid;
  grid-template-rows: var(--header-height) calc(100dvh - var(--header-height));  /* height limitation on second row */
  grid-template-columns: var(--sidebar-width) auto;
  grid-template-areas: "sidehdr header" 
                       "sidebar content";
}
.header {
  grid-area: header;
  overflow: hidden;
  padding: 0px 8px; /* tb lr */
  align-content: center; 
}
.sidebar {
  grid-area: sidebar;
  overflow: hidden;
  padding: 0;
}
.sidehdr {
  grid-area: sidehdr;
  overflow: hidden;
  padding: 0;
}
.content {
  grid-area: content;
  overflow: hidden;
  padding: 0;
}
iframe {
	/*height: calc(100dvh - var(--header-height));*/
	height: 100%;
	width: 100%;
	padding: 0;
  border: 0;
}
.sidebar a {	
  text-decoration: none;
}
.sidebar table {	
  width: 100%;
}
.sidebar table td, .sidebar .one-column-list li {	
  padding: 3px 0px;
  border-bottom: 1px solid var(--primary);
}
.indent-list li:nth-child(n + 2) {	
  padding-left: 6px !important;
}
.tight-list td, .tight-list li {	
  padding: 0px 1px !important;
  font-size: 85%;
}
.plain-button {
  border: none;
  padding: 0 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  height: 32px;
  line-height: 30px;
  margin: 0;
  cursor: pointer;
}
.link-button {
  background-color: inherit;
  color: inherit;
  border: none;
  cursor: pointer;
  padding: 0;
}
.link {
  text-decoration: underline;  
}
.link-button:hover {
  backdrop-filter: invert(15%); 
}
.primary-hover:hover {
  background-color: var(--primary);
}
.a-button {
  background-color: var(--light-border);
  color: black;
  border: solid 2px var(--dark-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 4px;
  text-decoration: none !important;  
  font-weight: 700;
}
.download {
  background-color: orange;
  color: white;
}
.a-button:hover {
  background-color: var(--light-page2);
}
.two-column {
  display: grid;
  grid-template-rows: calc(100dvh - var(--header-height));
  grid-template-columns: var(--leftcolumn-width) auto;
  grid-template-areas: "leftcolumn rightcolumn";
}
.leftcolumn {
  grid-area: leftcolumn;
  overflow: auto;
  padding: 0;
}
.rightcolumn {
  grid-area: rightcolumn;
  overflow: auto;
  padding: 0;
}
.one-column {
  display: grid;
  grid-template-rows: calc(100dvh - var(--header-height));
  grid-template-columns: auto;
  grid-template-areas: "leftcolumn";
}

/* search box */
.az-search {
  position: sticky; 
  top: 0;
  height: 28px;
  width: 100%;
  background-color: var(--primary);
  color: white;
}
.search-box  {
  position: relative; 
  height: 24px;
  background-color: var(--primary);
  color: white;
  width: calc(100% - 20px);
  text-align: left;
  font-size: 12pt;
  border: none;
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
  -webkit-transition: border 0.3s;
  transition: border 0.3s;
}
.search-clear {
  height: 16px;
  width: 16px;
  font-size: 14px;
  background-color: var(--primary);
  color: white;
  outline: none;
  border: none;
  margin-right: 4px;
  /*display: none;*/
}
.search-clear:hover {
  background-color: #C0C0C0;
}
input#search-box:focus {
  outline: none;
  border-bottom: 2px solid var(--app);
  margin-bottom: -2px;
}
input#search-box::placeholder {
  color: #dcdcdc;
  opacity: 1;
}
input#search-box:focus::placeholder {
  font-size: 8pt;   
}
.az-index {
  overflow-x: hidden;
  overflow-y: auto;
}
.az-index .letter {
  width: auto;
  padding: 0px;
  background-color: var(--default-border);
  text-align: center;
  color: var(--secondary);
  font-size: 110%;
}
