:root{
  --c-arrow: #8A9DA8;
  --c-backtop-bg: #E7E8E6;

  --c-menu-link: rgb(240,240,240);
  --c-menu-link-hover: rgb(160,160,160);

  --c-layout-menu-current: #022b6d;
  --c-layout-menu-link: #022b8d;
  
  --c-gray: gray;

  --c-border-silver: silver;

  --c-syntax-pycommand: #000070;
  --c-syntax-statement: #008800;
  --c-syntax-builtin: #000088;
  --c-syntax-special: #990000;
  --c-syntax-operator: #880000;
  --c-syntax-error: #aa0000;

  --c-black: black;
  
 /* Backgrounds */
  --c-white: #FFFFFB;
  --c-layout-menu-bg: #f7faf9;
  --c-layout-menu-td-bg: #f7faf9;

  /* Header / menu / shadow */
  --c-menu-bg: #0D652D;          /* royal emerald header/menu */
  --c-container-shadow: #0a4520; /* emerald-tinted shadow */

  /* Text */
  --c-text: #009020;             /* dimmer emerald for body text */
  --c-muted: #7aa49b;

  /* Links */
  --c-link: #119100;             /* lively emerald (same as prev text) */
  --c-layout-menu-link: #119100;
  --c-layout-menu-current: #119100; /* darker emerald for active */
  --c-border-aaa: #119100;       /* heading underline matches link color */

  /* Accents */
  --c-blocktitle: #00B87A;       /* teal-emerald for block titles */

  /* Dividers & borders */
  --c-border-ddd: #dbe7e3;
  --c-black: #0c3019;            /* deep forest emerald for borders */

  /* Info / code blocks */
  --c-infobg: #f4fffb;
  --c-codebg: #f5f7f6;

  /* Footer */
  --c-border-c0: #98a8a3;
  --c-footer-link: #00A930;

  /* Misc */
  --c-thumb-border: #dbe7e3;

}

/* Default css file for jemdoc. */

/* Arrow */
.arrow {
    border: 9px solid transparent;
    border-bottom-color: var(--c-arrow);
    width: 0px;
    height: 0px;
    top:0px
}

.stick {
    width: 8px;
    height: 14px;
    border-radius: 1px;
    background-color: var(--c-arrow);
    top:15px;
}

#back_top div {
    position: absolute;
    margin: auto;
    right: 0px;
    left: 0px;
}

#back_top {
    background-color: var(--c-backtop-bg);
    height: 40px;
    width: 40px;
    border-radius: 3px;
    display: block;
    cursor: pointer;
    position: fixed;
    right: 30px;
    bottom: 25px;
    display: none;
}

/* Menu */
.menu {
	/* background-color: #527bbd; */
	background-color: var(--c-menu-bg);
    left: 0;
    top: 0;
    width: 100%;
	padding: 12px 0px;
	text-align: center;
	position: fixed;
	z-index: 100;
	width: 100%
}

.menu a {
	font-size: 110%;
	/*font-weight: bolder;*/
	padding: 0.25ex 1.5ex;
	color: var(--c-menu-link);
	text-decoration: none;
	transition: .2s;
}

.menu a:link {
	color: var(--c-menu-link);
	/*color: #9e9e9e;*/
}

.menu a:visited {
	color: var(--c-menu-link);
	/*color: #9e9e9e;*/
}

.menu a:hover, .menu a:active {
    color: var(--c-menu-link-hover);
    /*color: #ffffff;*/
	text-decoration: none;
}

/* container */

.container {
	width: 980px;
	min-height: 1000px;
	max-height: 999999px; /* prevents font boosting */
	margin: 56px auto 20px; /* top right bottom left */
	box-shadow: 0 0 7px var(--c-container-shadow); /*527bbd;*/
	text-align: left;
	background: var(--c-white);
	padding: 14px 14px 14px 14px; /* top right bottom left */
	z-index: 1;
}

a.anchor {
	display: block; 
	position: relative; 
	top: -38px; 
	visibility: hidden;
}


/* From jemdoc */

table#tlayout {
    border: none;
    border-collapse: separate;
    background: var(--c-white);
}

@font-face {
  font-family: myFont;
  src: local("Palatino Linotype");
  unicode-range: U+30-39;
}

body {
 background: var(--c-white);
 font-family: myFont, Georgia;
 padding-bottom: 8px;
 margin: 0;
}

#layout-menu {
	background: var(--c-layout-menu-bg);
	border: 1px solid var(--c-border-ddd);
	padding-top: 0.5em;
	padding-left: 8px;
	padding-right: 8px;
	font-size: 1.0em;
	width: auto;
	white-space: nowrap;
    text-align: left;
    vertical-align: top;
}

#layout-menu td {
	background: var(--c-layout-menu-td-bg);
    vertical-align: top;
}

#layout-content {
	padding-top: 0.0em;
	padding-left: 1.0em;
	padding-right: 1.0em;
    border: none;
    background: var(--c-white);
    text-align: left;
    vertical-align: top;
}

#layout-menu a {
	line-height: 1.5em;
	margin-left: 0.5em;
}

tt {
    background: #ffffdd;
}

pre, tt {
	font-size: 90%;
	font-family: monaco, monospace;
}

a, a > tt {
	color: var(--c-link);
	text-decoration: none;
}

a:hover {
	border-bottom: 1px var(--c-gray) dotted;
}

#layout-menu a.current:link, #layout-menu a.current:visited {
	color: var(--c-layout-menu-current);
	border-bottom: 1px var(--c-gray) solid;
}
#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
	/* color: #527bbd; */
	color: var(--c-layout-menu-link);
	text-decoration: none;
}
#layout-menu a:hover {
	text-decoration: none;
}

div.menu-category {
	border-bottom: 1px solid var(--c-gray);
	margin-top: 0.8em;
	padding-top: 0.2em;
	padding-bottom: 0.1em;
	font-weight: bold;
}

div.menu-item {
	padding-left: 16px;
	text-indent: -16px;
}

div#toptitle {
	padding-bottom: 0.2em;
	margin-bottom: 1.5em;
	border-bottom: 3px double var(--c-gray);
}

/* Reduce space if we begin the page with a title. */
div#toptitle + h2, div#toptitle + h3 {
	margin-top: -0.7em;
}

div#subtitle {
	margin-top: 0.0em;
	margin-bottom: 0.0em;
	padding-top: 0em;
	padding-bottom: 0.1em;
}

em {
	font-style: italic;
}

strong {
	font-weight: bold;
}


h1, h2, h3 {
	/* color: #527bbd; */
	color: var(--c-menu-bg);	
	margin-top: 0.7em;
	margin-bottom: 0.3em;
	padding-bottom: 0.2em;
	line-height: 1.0;
	padding-top: 0.5em;
	border-bottom: 1px solid var(--c-border-aaa);
}

h1 {
	font-size: 165%;
}

h2 {
	padding-top: 0.8em;
	font-size: 125%;
}

h2 + h3 {
    padding-top: 0.2em;
}

h3 {
	font-size: 110%;
	border-bottom: none;
}

p {
	width: 100%;
	margin-top: 0.0em;
	margin-bottom: 0.8em;
	padding: 0;
	line-height: 1.3;	
}

pre {
	padding: 0;
	margin: 0;
}

div#footer {
	font-size: small;
	border-top: 1px solid var(--c-border-c0);
	padding-top: 0.1em;
	margin-top: 4.0em;
	color: var(--c-border-c0);
}

div#footer a {
	color: var(--c-footer-link);
}

div#footer-text {
	float: left;
	padding-bottom: 8px;
}

ul, ol, dl {
	margin-top: 0.2em;
	padding-top: 0.2em;
	margin-bottom: 0.8em;
}

dt {
	margin-top: 0.5em;
	margin-bottom: 0;
}

dl {
	margin-left: 20px;
}

dd {
	color: var(--c-text);
}

dd > *:first-child {
	margin-top: 0;
}

ul {
	list-style-position: outside;
	list-style-type: square;
}

p + ul, p + ol {
	margin-top: -0.5em;
}

li {
	margin: 0.3em
}

ol {
	list-style-position: outside;
	list-style-type: decimal;
}

li p, dd p {
	margin-bottom: 0.3em;
}


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

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

p + div.codeblock {
	margin-top: -0.6em;
}

div.codeblock, div.infoblock {
	margin-right: 0%;
	margin-top: 1.2em;
	margin-bottom: 1.3em;
}

div.blocktitle {
	font-weight: bold;
	color: var(--c-blocktitle);
	margin-top: 1.2em;
	margin-bottom: 0.1em;
}

div.blockcontent {
	border: 1px solid var(--c-border-silver);
	padding: 0.3em 0.5em;
}

div.infoblock > div.blockcontent {
	background: var(--c-infobg);
}

div.blockcontent p + ul, div.blockcontent p + ol {
	margin-top: 0.4em;
}

div.infoblock p {
	margin-bottom: 0em;
}

div.infoblock li p, div.infoblock dd p {
	margin-bottom: 0.5em;
}

div.infoblock p + p {
	margin-top: 0.8em;
}

div.codeblock > div.blockcontent {
	background: var(--c-codebg);
}

span.pycommand {
	color: var(--c-syntax-pycommand);
}

span.statement {
	color: var(--c-syntax-statement);
}
span.builtin {
	color: var(--c-syntax-builtin);
}
span.special {
	color: var(--c-syntax-special);
}
span.operator {
	color: var(--c-syntax-operator);
}
span.error {
	color: var(--c-syntax-error);
}
span.comment, span.comment > *, span.string, span.string > * {
	color: var(--c-muted);
}

@media print {
	#layout-menu { display: none; }
}

#fwtitle {
	margin: 2px;
}

#fwtitle #toptitle {
	padding-left: 0.5em;
	margin-bottom: 0.5em;
}

#layout-content h1:first-child, #layout-content h2:first-child, #layout-content h3:first-child {
	margin-top: -0.7em;
}

div#toptitle h1, #layout-content div#toptitle h1 {
	margin-bottom: 0.0em;
	padding-bottom: 0.1em;
	padding-top: 0;
	margin-top: 0.5em;
	border-bottom: none;
}

img.eq {
	padding: 0;
	padding-left: 0.1em;
	padding-right: 0.1em;
	margin: 0;
}

img.eqwl {
	padding-left: 2em;
	padding-top: 0.6em;
	padding-bottom: 0.2em;
	margin: 0;
}

img.proj_thumb {
	width: 180px;
	border: 1px solid;
	border-color: var(--c-thumb-border);
	padding: 1px;
}

table {
    border: 2px solid var(--c-black);
    border-collapse: collapse;
}

td {
    padding: 2px;
    padding-left: 0.5em;
    padding-right: 0.5em;
    text-align: center;
    border: 1px solid var(--c-gray);
}

table + table {
    margin-top: 1em;
}

tr.heading {
    font-weight: bold;
    border-bottom: 2px solid var(--c-black);
}

img {
    border: none;
}

table.imgtable, table.imgtable td {
    border: none;
    text-align: left;
}


/* Publication */
p.pub_title {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 4px;
}

p.pub_author{
	font-size: 14px	
}

p.pub_link{
	font-size: 14px	
}

/* Connections grid */
.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  width: 100%;
  padding: 6px 0;
}

/* Individual connection link */
.connection {
  display: block;
  text-align: center;
  padding: 10px 2px;
  /* no explicit color here → uses global a { color: rgb(0,0,255); } */
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none;
  border: none;
  border-radius: 0;
  transition: text-decoration .15s ease;
}

/* Hover / focus: underline like a normal link, no dotted border */
.connection:hover,
.connection:focus {
  text-decoration: underline;
  background: none;
  box-shadow: none;
  transform: none;
  outline: none;
  border-bottom: none; /* override global a:hover dotted underline */
}

/* Keep visited links the same blue as normal */
.connection:visited {
  color: var(--c-link);
  text-decoration: none;
}

/* Optional: active state stays blue too */
.connection:active {
  color: var(--c-link);
}

