/* FINAL CSS — Checkbox hack (no JS). Button always works. */

body {
  background: #f2f2f2;
  font-family: Georgia, serif;
  color: #333;
  margin: 0;
  padding-bottom: 1.2em;
  line-height: 1.6;
}

#layout-content {
  padding: 0.6em 1.6em 1.2em;
  background: #fff;
  max-width: 1080px;
  margin: 0 auto;
}

#toptitle {
  text-align: center;
  padding-top: 0.5em;
}

#toptitle span {
  display: inline-block;
  font-size: 1.8em;
  max-width: 100%;
}

/* Center the photo */
#toptitle + p img {
  display: block;
  margin: 2em auto;
  width: 10em;           /* you can adjust or keep your inline style */
}

/* Center the title/affiliation paragraph that follows the photo */
#toptitle + p + p {
  text-align: center;
  margin-top: 0.6em;
  line-height: 1.6em;
}

h1, h2, h3, h4 {
  color: #022b6d;
  margin-top: 1.1em;
  margin-bottom: 0.3em;
  padding-bottom: 0.18em;
  line-height: 1.6;
  border-bottom: 0px solid #ccc;
  scroll-margin-top: 1.6em;
}

h1 {
  font-size: 1.6em;
  border-bottom: 2px solid #022b6d;
}

h2 {
  font-size: 1.25em;
  padding-top: 0.5em;
  color: #022b6d;
}

h3 {
  font-size: 1.1em;
  border-bottom: none;
}

p {
  margin: 0.3em 0 0.8em;
  line-height: 1.6;
}

ul, ol {
  margin: 0.3em 0 0.85em;
  padding-left: 1.6em;
}

li {
  line-height: 0em;
  margin-bottom: -0.2em;
}

a {
  color: #0D5EAF;
  text-decoration: none;
}

a:hover {
  color: #022b6d;
  text-decoration: underline;
}

#top-menu {
  display: none !important;
}

/* HAMBURGER BUTTON */
.mobile-nav {
  display: block;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1002;
}

#hamburger-btn {
  font-size: 22px;
  background: #f2f2f2;
  border: 1px solid #ccc;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  color: #022b6d;
  user-select: none;
}

@media (min-width: 769px) {
  #hamburger-btn::after {
    content: " Menu";
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 768px) {
  #hamburger-btn::after {
    content: "";
  }
  #hamburger-btn {
    font-size: 26px;
    padding: 7px 13px;
  }
}

/* HIDDEN CHECKBOX (for reliable toggle, no JS) */
.menu-toggle {
  display: none;
}

/* THE DRAWER MENU */
#layout-menu {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #f6f6f6;
  border-right: 1px solid #ddd;
  padding: 70px 1em 1em 1em;
  z-index: 1001;
  overflow-y: auto;
  box-shadow: 3px 0 12px rgba(0,0,0,0.13);
}

/* Show drawer when checkbox is checked */
.menu-toggle:checked ~ #layout-menu {
  display: block !important;
}

#layout-menu a {
  display: block;
  padding: 7px 12px;
  color: #0D5EAF;
  font-size: 0.95em;
  border-radius: 4px;
  margin-bottom: 2px;
}

#layout-menu a:hover {
  background: #e8e8e8;
  text-decoration: none;
}

#layout-content {
  padding-left: 1em;
  padding-right: 1em;
}

@media (min-width: 769px) {
  #layout-content {
    padding-top: 0.8em;
  }
}

@media (max-width: 768px) {
  #layout-content {
    padding-top: 3.6em;
  }
}

img {
  border: 1px;
  max-width: 100%;
  height: auto;
}

strong { font-weight: bold; }
em { font-style: italic; }

pre, tt {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: #f7f7f7;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  padding: 0.7em;
  overflow-x: auto;
}

table {
  border: 0px solid #ccc;
  border-collapse: collapse;
  margin: 1em 0;
}

td, th {
  padding: 5px 8px;
  border: 0px solid #ddd;
  text-align: left;
}

@media print {
  .mobile-nav, #layout-menu, #top-menu {
    display: none !important;
  }
  body { font-size: 10.5pt; color: #000; }
  h1, h2, h3 { color: #000; border-bottom: 0px solid #000; }
  a { color: #000; text-decoration: underline; }
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

  @media (max-width: 700px) {
    table.mobile-stack,
    table.mobile-stack tr,
    table.mobile-stack td {
      display: block;
      width: 100% !important;
    }

    table.mobile-stack td {
      padding-bottom: 12px;
    }

    table.mobile-stack img {
      width: 160px !important;
      max-width: 100%;
    }
  }
