/* --- jemdoc+MathJax 기본 스타일 --- */
body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: #fff;
  color: #222;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #003366;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

a {
  color: #1a4d8f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95em;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
}

th {
  background-color: #f9f9f9;
  font-weight: bold;
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #ccc;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

tbody tr:last-child td {
  border-bottom: none;
}

caption {
  caption-side: bottom;
  text-align: left;
  padding: 10px 0;
  font-size: 0.9em;
  color: #666;
}

pre {
  background: #f4f4f4;
  border: 1px solid #e0e0e0;
  padding: 1em;
  border-radius: 4px;
  font-family: 'Fira Mono', 'Consolas', monospace;
  white-space: pre;
  overflow-x: auto;
}

code {
  background: #f4f4f4;
  border: 1px solid #e0e0e0;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 95%;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

nav {
  background: #e6e6e6;
  padding: 1em;
  margin-bottom: 2em;
}

img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

footer {
  color: #888;
  font-size: 0.9em;
  text-align: center;
  margin-top: 2em;
  padding: 1em 0;
  border-top: 1px solid #eee;
}

/* 기타 jemdoc 스타일 요소는 필요에 따라 추가 */
/* --- jemdoc+MathJax 레이아웃 및 사이드바 스타일 --- */
.container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

#layout-menu {
  width: 220px;
  background: #f5f5f5;
  border-right: 1px solid #e0e0e0;
  padding: 2em 1em 2em 1.5em;
  min-height: 100vh;
}

#layout-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#layout-menu li {
  margin-bottom: 0.5em;
}

.menu-section {
  margin-bottom: 1.5em;
}

.menu-title {
  font-weight: bold;
  font-size: 1.08em;
  margin-bottom: 0.2em;
  margin-top: 1em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

.menu-section ul {
  list-style: none;
  padding-left: 0;
  margin: 0.3em 0 0.5em 0;
}

.menu-section li {
  margin-bottom: 0.3em;
}

#layout-menu a {
  color: #1a4d8f;
  text-decoration: none;
}

#layout-menu a:hover {
  text-decoration: underline;
}

.main-content {
  flex: 1;
  padding: 2em 2.5em 2em 2.5em;
  min-width: 0;
  background: #fff;
}

@media (max-width: 800px) {
  .container {
    flex-direction: column;
  }

  #layout-menu {
    width: 100%;
    min-height: unset;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1em;
  }

  .main-content {
    padding: 1em;
  }
}