:root {
--color-primary: #004064;   /* dark navy – nav, headings, footer */
--color-accent:  #0175BE;   /* blue – selected nav, search input  */
--color-hover:   #8EB7E5;   /* light blue – hover states          */
--color-sidebar: #99CCFF;   /* pale blue – sidebar background     */
--font-main: 'Trebuchet MS', Helvetica, sans-serif;
--font-ui:   Arial, Helvetica, sans-serif;
}

html {
margin: 0;
padding: 0;
border: 0;
outline: 0;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: var(--font-main);
}

#maincontainer {
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: 0;
position: relative;
display: grid;
grid-template-columns: 200px 1fr;
grid-template-areas:
    "header header"
    "aside  main"
    "footer footer";
background: linear-gradient(to right, var(--color-sidebar) 200px, transparent 200px);
}

/* Prevent grid items from expanding their column beyond the track size */
#maincontainer > * {
min-width: 0;
}

#topsection {
grid-area: header;
padding-left: 200px;
}

#header-top {
display: flex;
align-items: stretch;
}

#sitelogo {
position: absolute;
top: 0;
left: 0;
width: 200px;
display: block;
z-index: 5;
}

#menus {
background-color: white;
}

#search_form {
float: right;
margin-top: 15px;
margin-right: 14px;
}

#search_form input[type="text"] {
width: 100px;
border: none;
background-color: var(--color-accent);
font-size: 0.7rem;
color: #C1C1C1;
text-align: right;
vertical-align: middle;
}

#search_form input[type="text"]::placeholder {
color: #C1C1C1;
}

#search_form button[type="submit"] {
background: transparent;
border: none;
color: white;
cursor: pointer;
font-size: 14px;
padding: 0;
vertical-align: middle;
line-height: 1;
}

#search_form button[type="submit"]:hover {
color: var(--color-hover);
}

#blackline {
background-color: black;
color: #5B5653;
font: bold 0.85rem Century Gothic, Arial, Verdana, sans-serif;
letter-spacing: -1px;
padding-bottom: 1px;
overflow: hidden;
width: 100%;
position: relative;
top: -1px;
cursor: default;
white-space: nowrap;
}

#contentwrapper {
grid-area: main;
}

#contentcolumn {
padding-bottom: 45px;
font-size: 1.0rem;
line-height: 1.4em;
position: relative;
}

#contentcolumn p,
#contentcolumn ul li {
margin-top: 10px;
margin-bottom: 10px;
}

#contentcolumn h1 {
line-height: 1.5em;
margin-top: -4px;
color: var(--color-primary);
font-weight: normal;
}

#contentcolumn h2 {
line-height: 1.5em;
color: var(--color-primary);
font-weight: normal;
margin-top: 30px;
margin-bottom: 0;
}

#contentcolumn h3 {
line-height: 1.5em;
color: var(--color-primary);
font-weight: normal;
margin-top: 30px;
margin-bottom: 0;
}

#leftcolumn {
grid-area: aside;
align-self: stretch;
background-color: var(--color-sidebar);
padding-top: 55px;
padding-bottom: 20px;
}

#leftcolumn h1 {
font-size: 1.15rem;
line-height: 1.5em;
color: var(--color-primary);
text-align: center;
font-weight: normal;
}

#footer {
grid-area: footer;
background-color: var(--color-primary);
color: #FFF;
text-align: center;
padding: 5px 0 4px 0;
margin: 0;
line-height: 1.2em;
font-size: 0.7rem;
font-family: var(--font-ui);
}

#footer a {
color: white;
}

.innertube {
margin: 10px;
margin-top: 0;
padding-left: 10px;
}

.news_item {
margin-top: 10px;
font-size: 0.8em;
line-height: 1.2em;
padding-left: 4px;
padding-right: 4px;
}

.news_item .news_date {
color: var(--color-primary);
text-align: right;
}

.pre, pre {
border-style: dotted;
border-width: 1px;
margin: 0.5em 1em;
padding: 0.5em 1em;
line-height: 1.4em;
font-family: Courier, monospace;
}

.right {
text-align: right;
padding-right: 20px;
}

.top {
vertical-align: top;
}

table.data {
border-collapse: collapse;
table-layout: fixed;
margin-left: auto;
margin-right: auto;
}

table.data tr th {
border: 1px solid black;
text-align: center;
padding: 5px;
}

table.data tr td {
border: 1px solid black;
text-align: right;
padding: 2px;
}

#clients_table tr td {
padding-top: 10px;
padding-bottom: 10px;
}

.contact_input {
width: 80%;
}

.address_table {
margin-left: 1em;
}

p.warning {
color: red;
text-align: center;
border-width: 1px;
border-style: dotted;
padding: 0.5em;
width: 66%;
margin-left: auto;
margin-right: auto;
font-size: smaller;
}

#toc {
float: right;
margin-left: 1em;
margin-right: -1em;
padding-left: 0.5em;
padding-right: 0.5em;
border: 1px dotted blue;
}

#toc ul {
line-height: 0.9em;
}

#disqus_thread {
border-top: 1px dotted black;
margin-top: 20px;
padding-top: 20px;
}

/* ===============================================
   RESPONSIVE DESIGN - MOBILE ADAPTATIONS
   =============================================== */

/* Tablet and smaller screens */
@media screen and (max-width: 900px) {
#topsection {
padding-left: 10px;
}

#search_form {
margin-right: 10px;
}

}

/* Mobile screens - stack layout vertically */
@media screen and (max-width: 768px) {
body {
font-size: 14px;
}

#maincontainer {
grid-template-columns: 1fr;
grid-template-areas: "header" "main" "footer";
background: none;
}

/* Hide logo and left column on mobile - news accessible via menu */
#sitelogo,
#leftcolumn {
display: none;
}

#contentcolumn {
padding-left: 10px;
padding-right: 10px;
}

#topsection {
padding: 0;
min-height: 45px;
overflow: visible;
position: sticky;
top: 0;
z-index: 100;
}

#menus {
min-height: 45px;
padding-bottom: 5px;
overflow: visible;
position: relative;
}

#search_form {
float: none;
margin: 0;
}

#blackline {
font-size: 0.7rem;
padding: 5px;
word-spacing: 0.3em;
}

.innertube {
margin: 10px 5px;
padding-left: 5px;
}

#contentcolumn p,
#contentcolumn ul li {
font-size: 1em;
}

#contentcolumn h1 {
font-size: 1.5em;
margin-top: 10px;
}

#contentcolumn h2 {
font-size: 1.3em;
margin-top: 20px;
}

#contentcolumn h3 {
font-size: 1.1em;
margin-top: 15px;
}

.pre, pre {
margin: 0.5em 0;
padding: 0.5em;
font-size: 0.9em;
overflow-x: auto;
}

table.data {
font-size: 0.9em;
overflow-x: auto;
display: block;
}

.contact_input {
width: 100%;
}

.address_table {
margin-left: 0;
}

#clients_table tr,
.partners_table tr {
display: flex;
flex-direction: column;
}

#clients_table td,
.partners_table td {
display: block;
}

#clients_table td.right,
.partners_table td.right {
text-align: center;
padding-right: 0;
}

p.warning {
width: 90%;
}

#toc {
float: none;
margin: 1em auto;
width: 90%;
}

.news_item {
font-size: 1em;
}
}

/* Very small mobile screens */
@media screen and (max-width: 480px) {
body {
font-size: 13px;
overflow-x: hidden;
}

#contentcolumn {
font-size: 0.85rem;
padding-left: 5px;
padding-right: 5px;
}

.innertube {
margin: 5px;
padding-left: 5px;
}

#blackline {
font-size: 0.6rem;
padding: 3px;
word-spacing: 0.4em;
}

table.data {
font-size: 0.8em;
}
}
