/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table, td, tr,th {
 border: 1px solid #333333;
  border-spacing: 0;
 padding: 5px;
 text-align: center;
}
sup {font-size: x-small;
vertical-align: super;}
sub {font-size: x-small;
vertical-align: sub;}
body {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  font-size: medium;
  line-height: 110%;
  background-color: rgb(248, 250, 252);
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 30px;
  color: rgb(51, 65, 85);
}

/* Header stays full width */
header {
  width: 100%;
  margin-bottom: 2rem;
}

h1,
h2,
h3, h4 {
  font-weight: bolder;
  background-color: rgb(59, 130, 246);
  color: white;
  margin: 1rem;
  padding: 1rem;
  line-height: 120%;
}

strong {font-weight: bold;color: rgb(17, 24, 39);}

h1 {
  font-size: 2rem;
  text-align: center;
  border-bottom-width: 10px #333333 solid;
  line-height: 120%;
}

h2 {
  font-size: x-large;
  margin-left: 20px;
  margin-right: 20px;
}

/* Multi-column grid layout */
main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Make each RPG system a card */
.rpg-system {
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(226, 232, 240);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  break-inside: avoid;
}

/* Adjust heading styles for cards */
.rpg-system h3 {
  font-size: large;
  margin: 0 0 0.5rem 0;
  border-radius: 6px;
}

.rpg-system p {
  margin: 0.5rem 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Compact list styling */
.rpg-system ul {
  margin: 0;
  padding: 0;
}

.rpg-system ul li {
  margin: 0;
  padding: 0.25rem 0;
  list-style-type: none;
  border-bottom: 1px solid rgb(241, 245, 249);
}

.rpg-system ul li:last-child {
  border-bottom: none;
}

.rpg-system ul li a {
  color: rgb(59, 130, 246);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.rpg-system ul li a:hover {
  color: rgb(37, 99, 235);
  text-decoration: underline;
}

h4 {margin-left: 35px;
margin-right: 35px;}

h5 {margin-left: 35px;}

table {
  margin-left: 45px;
}

/* Default paragraph styling for non-card content */
section > p {
  margin-top: 10px;
  margin-left: 45px;
  margin-bottom: 5px;
  margin-right: 40px;
}

h1 code {
  margin-left: 0px;
  margin-right: 0px;
}

p code {
  margin-left: 0px;
  margin-right: 0px;
}

pre code {
  margin-left: 0px;
  margin-right: 0px;
}
h4 code { margin-left: 0px; margin-right: 0px;}
h2 code { margin-left: 0px; margin-right: 0px;}
h3 code { margin-left: 0px; margin-right: 0px;}
li code { margin-left: 0px; margin-right: 0px;}
code, pre {
  
  margin-top: 15px;
  margin-left: 40px;
  margin-right: 40px;
  font-family: "Courier New", Courier, monospace;
  background-color: rgb(248, 250, 252);
  color: rgb(34, 139, 34);

  padding-top: 5px;
  padding-left: 2px;
  line-height: 150%;

}

p code {
 margin-right: 0;
}

footer {
  text-align: left;
}
ol li {
  padding-top: 10px;
  list-style-type:decimal ;
}

a {color: rgb(59, 130, 246);}
ul li {
  list-style-type: disc;
}
dl, ol, ul, li {
  margin-left: 45px;
  padding-top: 5px;
}

ul li ul li {
  margin-left: 0px;
}

dd
{
 margin-left: 25px;
 padding-bottom: 10px;

}
img {background-color: white;
width:100%}

div img {width:45%;
text-align: center;}

.center {text-align: center;}

blockquote {margin-left: 150px;
margin-right: 140px;
background-color: rgb(226, 232, 240);
color: rgb(51, 65, 85);
padding: 12px;}

footer {padding-bottom: 20px;}

#sm-logo {width: 15%;
height: 15%;}

pre {

  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
}

h3 a { color: white;}

.code-comment {
    color: #0891b2;
    font-style: italic;
}
.comment-block {

    border-left: 4px solid #1890ff;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

/* Updated mermaid styling for light mode and centering */
.mermaid_container, .mermaid-diagram, .mermaid {
    margin: 25px auto;
    padding: 20px;
    background-color: rgb(255, 255, 255);
    color: rgb(51, 65, 85);
    border: 1px solid rgb(226, 232, 240);
    border-radius: 8px;
    max-width: 90%;
    text-align: center;
    display: block;
}

/* Style for SVG elements within mermaid diagrams */
.mermaid svg {
    margin: 0 auto;
    display: block;
}

/* Light theme for mermaid diagram elements */
.mermaid .node rect, 
.mermaid .node circle, 
.mermaid .node ellipse, 
.mermaid .node polygon, 
.mermaid .node path {
    fill: rgb(248, 250, 252);
    stroke: rgb(148, 163, 184);
}

.mermaid .edgePath .path {
    stroke: rgb(71, 85, 105);
}

.mermaid .label {
    color: rgb(51, 65, 85);
    fill: rgb(51, 65, 85);
}

.mermaid .cluster rect {
    fill: rgb(241, 245, 249);
    stroke: rgb(148, 163, 184);
}

/* Ensure text labels are visible in light mode */
.mermaid .label text, 
.mermaid text {
    fill: #1f2937 !important;
}

/* Specific styling for mindmap and flowchart text */
.mermaid .flowchart-label text,
.mermaid .mindmap-node text,
.mermaid .mindmap-node .nodeText,
.mermaid .nodeLabel {
    fill: #1f2937 !important;
    color: #1f2937 !important;
}

svg {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* For SVG elements within containers */
.svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
table {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse; /* Optional: removes double borders */
}

/* For responsive tables that might need a container */
.table-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .rpg-system {
    margin: 0.5rem 0;
  }
  
  body {
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (min-width: 1200px) {
  main {
    grid-template-columns: repeat(3, 1fr);
  }
}
