/*tw0-0wt*/
/* set base colours */
:root { --color_main: #eeeeee; --color_contrast: #2a2a2a; --color_highlight: #fafafa; --color_text: #444444;}

@font-face{
    font-family: 'Courier New';
    src: url('/cour.ttf') format('truetype'),
}

html, body{
    position: relative;
}

html, body, div, form, p, pre, hr, span, tr, th, td, img {
	font-family: 'Courier New', monospace, monospace;
    padding: 0;
    border: 0;
}

form, p, pre, hr, span, tr, th, td, img {
	margin-top: 0;
    margin-bottom: 0;
}

body{
    top: 0px;
    display: table-cell;
    background-color: var(--color_contrast);
    color: var(--color_text);
    font-size: 16px;
    border: double;
    font-smooth: antialiased;
    -webkit-font-smoothing: antialiased;
}


h1, h2, h3, h4, h5, h6 {
	font-family: 'Courier New', monospace, monospace;
	margin-top: 0;
    margin-bottom: 0;
	vertical-align: middle;
    color: #111111;
    border-bottom: 1px solid #CCCCCC;
}

h1 {
    font-size: 4em;
}
h2 {
    font-size: 3em;
}
h3 {
    font-size: 2em;
}
h4 {
    font-size: 1.5em;
}

hr {
    height: 2px;
    background: #1d5;
    border: 0;
}

strong {
    font-weight: bold;
}

code {
    font-size: 16px;
}
/* pages share these styles */
div#container { position: relative; 
            max-width: 95%; 
            margin-left: auto; 
            margin-right: auto; 
            margin-bottom: 0.5em; 
            padding-bottom: 1em;}
div#container div.contact_icon img { position: absolute; bottom: 0px; right: 1em;}

div#navbar { top:0; position: sticky; background: var(--color_main); font-family:mssans; font-size: 11px; text-align: left; padding-top: 0.2em; border:1px solid var(--color_contrast); }
div.title { padding-left: 0.5em; vertical-align: middle; height: 2em; display:inline-block; background-color:var(--color_highlight); padding-right: 1em; border: 1px solid var(--color_contrast); overflow: hidden;}
div.title span { text-align:right; height: 1.2em; line-height: 0.8em; text-overflow:ellipsis;}
div#navmenu { text-align: left; padding-left: 1em; margin-bottom: 0.3em; overflow: hidden;}
div.navmenu-item
{
	margin-left: 0.1em;
	display:inline-block;
	position: relative;
	min-width: 4em;
	overflow: hidden;
	border: 1px solid var(--color_contrast);
	vertical-align:middle;
	text-overflow: ellipsis;
	white-space:nowrap;
}
div.navmenu-item span a
{
	text-decoration: none;
	display:block;
	margin: auto;
	text-align:center;
	height: 2em;
	padding-left: 0.5em;
	padding-right: 0.5em;
}
div.navmenu-item:before
{
	content:" ";
	position: absolute;
	z-index:-1;
	top: 0px;
	left: 0px;
	bottom: 0px;
	right: 0px;
	background-color: var(--color_main);
	border-top: 2px solid var(--color_highlight);
	border-left: 2px solid var(--color_highlight);
	border-bottom: 2px solid var(--color_shadow);
	border-right: 2px solid var(--color_shadow);
}
div.navmenu-item a
{
	color:black;
}

/* page submenu */
div#page_menu {  text-decoration: none; 
border-left: 1px solid var(--color_contrast); 
border-right: 1px solid var(--color_contrast); 
border-bottom: 1px solid var(--color_contrast); 
text-align: right;
}

/* edit button */
span.edit_button {  }

div#content 
{
	/* setting display to grid and max-height to 80vh is the magic
	   recipe for getting a scrollbar to appear in the page_content area */
	display:grid;
	max-height: 80vh;
	overflow-y: auto;
	background: var(--color_main);
	border-left: 1px solid var(--color_contrast);
	border-right: 1px solid var(--color_contrast);
    border-bottom: 1px solid var(--color_contrast);
}
/* for some reason, safari needs to have visited link colours forced */
div#content a:visited { color: #333333 !important; }


/* pages */
div.page_content
{
	display: block;
	max-height: 80%;
	border: 0.3em solid var(--color_main);
	padding: 0.5em;
	overflow-x: hidden;
	overflow-y: auto;
}

div.subtitle { font-size:4em; font-smooth: antialiased; -webkit-font-smoothing: antialiased; }
div.subtitle2 { font-size: 2em; font-smooth: antialiased; -webkit-font-smoothing: antialiased; }

div.page {
	display: block;
	border: 0.3em solid var(--color_main);
}

div#page_menu { text-align:right; }

div.page_title { font-weight: bold;}
div.page_body { padding: 0.5em; }

/* page headers */
div.page_header { padding: 0.5em; }
div.page_date { }
div.page_time { }
div.page_author {}

/* links */
a:link {color: var(--color_contrast); text-decoration: none; }
div.page a, div.page_content a { color: var(--color_main);}
a:visited { color: var(--color_contrast); text-decoration: none; }
a:hover { color: var(--color_highlight); text-decoration: none; }
div.page a:hover, div.page_content a:hover { color: var(--color_highlight);}

/* errors */
div.error { text-align: center; background-color:var(--color_main); color: var(--color_contrast);}
div.error span a { color: var(--color_highlight2); }
div.error span a:hover { color: var(--color_highlight2); }
div.error span a:visited { color: var(--color_highlight2); }

/* footer */
div.footer { clear: both; font-size: small; text-align: right; color: var(--color_text);}
div.footer a { color: var(--color_text);}

/* code */
code { color:var(--color_highlight);}

/* pre */
pre { white-space:pre-wrap; }

/* input */
textarea { width: 100%; min-height: 15em; }

/* buttons */
span.edit_button { text-align: right; color: var(--color_contrast); background-color: var(--color_main); }
button, span.button
{
  /* restyle form buttons to look like text */
  align-items: normal;
  border: none;
  box-sizing: content-box;
  color: var(--color_contrast); 
  background-color: var(--color_main);
  cursor: pointer;
  display: inline;
  font: inherit;
  height: auto;
  padding: 0;
  perspective-origin: 0 0;
  text-align: start;
  text-decoration: underline;
  transform-origin: 0 0;
  width: auto;
  appearance: none;
  -moz-appearance: none;
  -webkit-logical-height: 1em; /* Chrome ignores auto, so we have to use this hack to set the correct height  */
  -webkit-logical-width: auto; /* Chrome ignores auto, but here for completeness */
}
span.button a, span.edit_button a:visited { color: var(--color_contrast); }
span.edit_button:hover { color: var(--color_highlight);}
span.button a:hover { color: var(--color_contrast); background-color: var(--color_highlight); }
button:hover { background-color: var(--color_highlight);}
