body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    background-color: #f8f9fa;
    color: #202122;
}
        
a {
  color: #2A4B8D;
  text-decoration: none;
}

a:hover {
  color: #215abc;
  text-decoration: underline;
}

.left-links {
  line-height: 2;
}

    .infobox a {
    color: inherit;
    text-decoration: underline;
}

    .button {
      text-decoration: none;
    }

#header {
    display: flex;
    align-items: center;
}

.header-image {
    width: 40px;
    height: 40px;
    margin-right: 5px;
}

.image-container {
    float: right;
    margin-right: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    max-width: 300px;
    width: 30%;
    margin: 10px;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}
        
.caption {
    width: 100%;
    font-size: 0.9em;
    text-align: left;
    color: #555;
    padding-top: 5px;
    word-wrap: break-word;
    white-space: normal;
}

#toc-container {
    top: 80px;
    left: 20px;
    width: 250px;
    background-color: #f9f9f9;
    border: 1px solid #c8ccd1;
    padding: 10px;
    font-size: 14px;
}

#toc-container h2 {
    margin-top: 0;
    font-size: 16px;
    color: #2a4b8d;
    text-align: center;
}

#toc-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin: 5px 0;
}

.toc-item a {
    text-decoration: none;
    color: #006699;
    font-size: 14px;
}

.toc-item a:hover {
    text-decoration: underline;
    color: #215abc;
}

.toc-item.toc-h3 {
    margin-left: 15px;
    font-size: 13px;
}

@media (max-width: 768px) {
    #toc-container {
        width: 95%;
        margin-bottom: 20px;
    }
}

.button {
    padding: 10px 20px;
    background-color: #2a4b8d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.button:hover {
    background-color: #1f3a6d;
}

::selection {
    color: white;
    background-color: #2a4b8d;
}


.disclaimer {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-left: 10px solid #fcd404;
    padding: 4px;
    padding-right: 5px;
    background-color: #fff8d2;
    width: fit-content;
    margin-bottom: 10px;
}

.disclaimer a {
color:inherit;
}

.disclaimer img {
    width: 50px;
    height: 50px;
    margin-right: 1em;
    margin-left: 10px;
}

.disclaimer p {
    margin: 0;
    font-size: 1em;
    color: inherit;
}

.badges {
    display: flex;
    gap: 10px;
    top: 100px;
    right: 30px;
    justify-content: flex-end;
    position: absolute;
    overflow: hidden;
}

.badges a {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: absolute;
}

.badges img {
    width: 100%;
    height: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.badges img:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.badges a {
    position: relative;
}

.category-box {
    border: 3px solid #CDDEFF;
    padding: 3px;
    display: flex;
    align-items: center;
    background: #F5F8FF;
    padding-bottom: 0px;
    padding-top: 0px;
    color: inherit;
}

.dark-mode .category-box {
    border-color: #30363d;
    background: #161b22;
    color: #c9d1d9;
}

.graduation-mode .category-box {
    border-color: #fa79a8;
    background: linear-gradient(135deg, #ffeaf3, #fa79a8);
    color: #383a3e;
}
    
    .category-box img {
        width: 30px;
        height: auto;
        margin-right: 2px;
    }
    
#topbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(90deg, #2a4b8d, #1d2e4f);
  color: white;
  padding: 10px 0;
  line-height: 2;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 99999;
}

.topbar-scroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 20px;
}

.topbar-scroll::-webkit-scrollbar {
  display: none;
}

.topbar-scroll a {
  flex: 0 0 auto;
  margin-right: 20px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-fade {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50px;
  background: linear-gradient(to left, #1d2e4f, transparent);
  pointer-events: none;
}

.left-links a {
    color: white;
    margin-right: 15px;
    text-decoration: none;
    font-size: 14px;
}

.search-bar input {
    padding: 5px;
    font-size: 14px;
}

#sidebar {
    width: 175px;
    background-color: #f0f0f0;
    padding: 20px;
    box-sizing: border-box;
    position: fixed;
    border-right: 1px solid #c8ccd1;
    height: calc(100% - 50px);
    margin-top: 50px;
    z-index: 2;
    overflow-y: auto;
}


#logo {
    text-align: center;
    margin-bottom: 20px;
}

#logo img {
    max-width: 300px;
    margin-bottom: 10px;
}

#logo p {
    font-size: 14px;
    color: #2a4b8d;
    margin: 0;
}

.portal {
    margin-top: 20px;
}

.portal h3 {
    margin-top: 0;
    font-size: 16px;
    color: #2a4b8d;
}

.portal ul {
    list-style-type: none;
    padding: 0;
}

.portal ul li {
    margin-bottom: 5px;
}

.portal ul li a {
    text-decoration: none;
    color: #006699;
    font-size: 14px;
}

#content {
    margin-left: 175px;
    margin-top: 50px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: calc(100% - 175px);
}

#header {
    padding: 5px;
    border-bottom: 1px solid #c8ccd1;
}

#firstHeading {
    margin: 3px;
    font-size: 24px;
    color: #2a4b8d;
}

#bodyContent {
    margin-top: 20px;
}

blockquote {
    margin: 1em 0;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-left: 5px solid #2a4b8d;
    font-style: italic;
    color: #202122;
    max-width: 100%;
    display: inline-block;
    line-height: 1.6;
}

blockquote p {
    margin: 0;
}

blockquote cite {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #6c757d;
}

h2, h3 {
    color: #2a4b8d;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 18px;
}

#siteSub {
    font-size: 14px;
    color: #555;
}

@media (max-width: 600px) {
    #siteSub {
    font-size: 14px;
    color: #555;
    display: inline-block;
    margin-right: 10px;
}
}

#contentSub {
    font-size: 12px;
    color: #888;
    line-height: 1px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    #contentSub {
        line-height: 1.4;
    }
}

#footer {
    margin-top: 20px;
    font-size: 14px;
    color: #888;
    padding-top: 10px;
    text-align: center;
}

#footer a {
    color: #006699;
    text-decoration: none;
    margin: 0 5px;
}

#sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2a4b8d;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1001;
}

#sidebar-toggle img {
    width: 70%;
    height: auto;
    margin: 15%;
}

@media (max-width: 768px) {
    #sidebar {
        display: none;
    }

    #sidebar.open {
    display: block
}

    #content {
        margin-left: 0;
        width: 100%;
    }

    #sidebar-toggle {
        display: block;
    }
}

/* infobox */ 
.infobox {
    float: right;
    margin: 0 0 20px 20px;
    border: 1px solid #c8ccd1;
    background-color: #f8f9fa;
    padding: 10px;
    width: 300px;
}

.infobox table {
    width: 100%;
    border-collapse: collapse;
}

.infobox th {
    text-align: center;
    background-color: #2a4b8d;
    color: white;
    padding: 2px;
    font-size: 16px;
}

.infobox td {
    padding: 8px;
    font-size: 14px;
    border-bottom: 1px solid #e5e6e7;
    color: #202122;
}

.infobox tr:last-child td {
    border: none;
}

.infobox td:first-child {
    font-weight: bold;
    color: #2a4b8d;
}

.infobox img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto 10px;
    padding-top: 5px;
    display: block;
}

.infobox figcaption {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

/*part of a series on:*/


    #series-section {
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: 1px solid #c8ccd1;
    font-size: 14px;
    color: #026699;
}

#series-section h3 {
    margin: 0;
    font-size: 16px;
    color: #2a4b8d;
}

#series-links {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

#series-links a {
    color: #006699;
    text-decoration: none;
}

#series-links a:hover {
    color: #215abc;
    text-decoration: underline;
}