/* Colours taken from the old Allrounder template style "ALLROUNDER-j1.6 - Default". */
:root {
  --body-bg: #10427a;
  --wrapper-bg: #efefef;
  --head-bg: #a2cdfd;
  --head-border: #93bae6;
  --content-bg: #f9f9f9;
  --article-bg: #ffffff;
  --article-border: #e9e9e9;
  --text: #555555;
  --title: #484848;
  --link: #10427a;
  --module-bg: #f9f9f9;
  --module-border: #dddddd;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0;
  padding: 0 0 20px;
  background: var(--body-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
a { color: var(--link); }
a:hover { color: #000; }
img { max-width: 100%; height: auto; }

#wrapper, #foot {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--wrapper-bg);
}
#wrapper { padding: 10px 10px 0; }

/* Header */
#header {
  position: relative;
  height: 160px;
  background: var(--head-bg);
  border: 1px solid var(--head-border);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}
#banner { position: absolute; left: 20px; top: 0; }
#slider { display: block; width: 160px; height: 160px; object-fit: cover; transition: opacity 1s; }
#headerlogo { position: absolute; left: 265px; top: 0; }
#headerlogo img { display: block; max-width: none; }
#unilogo { position: absolute; right: 50px; top: 0; }
#unilogo img { display: block; }

/* Columns */
#container {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  align-items: flex-start;
}
#leftcol { flex: 0 0 19%; min-width: 180px; }
#maincontent {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--article-bg);
  border: 1px solid var(--article-border);
  padding: 15px 20px;
  overflow-x: auto;
}

/* Module boxes (left navigation + in-page anchor menus) */
.module {
  background: var(--module-bg);
  border: 1px solid var(--module-border);
  border-radius: 6px;
  margin-bottom: 15px;
}
.module h3 {
  margin: 0;
  padding: 6px 12px;
  background: var(--head-bg);
  color: var(--link);
  font-size: 1.1rem;
  border-radius: 6px 6px 0 0;
}
.module ul { list-style: none; margin: 0; padding: 6px 0; }
.module li a {
  display: block;
  padding: 4px 12px;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}
.module li:last-child > a { border-bottom: 0; }
.module li a:hover { color: #000; background: #fff; }
.module li.active > a { font-weight: bold; }
.module li ul { padding: 0 0 0 14px; }
.module li ul a { font-size: .95em; }
.inline-menu { float: right; width: 220px; margin: 0 0 15px 20px; }

/* Content */
h1, h2, h3 { color: var(--title); line-height: 1.25; }
h1 { font-size: 1.6rem; margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: .3em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
table { border-collapse: collapse; }
td, th { vertical-align: top; padding: 2px 8px 2px 0; }
#maincontent table:not([data-border="0"]) td,
#maincontent table:not([data-border="0"]) th { border: 1px solid #ddd; padding: 3px 6px; }
.article-list { padding-left: 1.2em; }
.article-list li { margin: .3em 0; }
.blog .item { border-bottom: 1px solid #eee; margin-bottom: 1.5em; }
.blog .item:last-child { border-bottom: 0; }
pre { overflow-x: auto; background: #f5f5f5; padding: 8px; }

/* Footer */
#foot {
  background: var(--head-bg);
  color: var(--link);
  border-radius: 0 0 6px 6px;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }

/* Small screens: stack columns, scale header */
@media (max-width: 800px) {
  #wrapper { padding: 8px 8px 0; }
  #header { height: auto; display: flex; align-items: center; justify-content: space-between; }
  #banner, #unilogo { display: none; }
  #headerlogo { position: static; }
  #headerlogo img { max-width: 100%; height: auto; }
  #container { flex-direction: column; }
  #leftcol { flex-basis: auto; width: 100%; }
  #maincontent { width: 100%; padding: 12px; }
  .inline-menu { float: none; width: auto; margin: 0 0 15px; }
  #maincontent table[style*="float"] { float: none !important; }
}

/* pandoc gives header-less HTML tables an empty header row */
thead:not(:has(th:not(:empty))) { display: none; }

@media (max-width: 800px) {
  /* content first, navigation below it on phones */
  #maincontent { order: 1; }
  #leftcol { order: 2; }
}
