/* 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: 30px;
  margin-right: 40px;
  margin-bottom: 30px;
  color: rgb(51, 65, 85);
}
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;
}

h3 {
  font-size: large;
  margin-left: 30px;
  margin-right: 30px;
}

h4 {margin-left: 35px;
margin-right: 35px;}

h5 {margin-left: 35px;}

table {
  margin-left: 45px;
}
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%;
}

/* ========= DARK MODE ========= */
html.dark body {
  background-color: #0f172a;
  color: #cbd5e1;
}
html.dark h1, html.dark h2, html.dark h3, html.dark h4 {
  background-color: #1e3a5f;
  color: #e2e8f0;
}
html.dark strong { color: #f1f5f9; }
html.dark a { color: #60a5fa; }
html.dark h3 a { color: #e2e8f0; }
html.dark code, html.dark pre {
  background-color: #1e293b;
  color: #4ade80;
}
html.dark blockquote {
  background-color: #1e293b;
  color: #cbd5e1;
}
html.dark table, html.dark td, html.dark tr, html.dark th {
  border-color: #475569;
  color: #cbd5e1;
}
html.dark .mermaid_container, html.dark .mermaid-diagram, html.dark .mermaid {
  background-color: #1e293b;
  border-color: #475569;
}
html.dark .mermaid .label text, html.dark .mermaid text {
  fill: #e2e8f0 !important;
}
html.dark .mermaid .node rect, html.dark .mermaid .node circle,
html.dark .mermaid .node ellipse, html.dark .mermaid .node polygon {
  fill: #334155; stroke: #64748b;
}
html.dark .mermaid .edgePath .path { stroke: #94a3b8; }
html.dark .comment-block { border-left-color: #3b82f6; }

/* ========= SITE NAVBAR ========= */
.site-nav {
  background: #1e3a5f;
  padding: 0.5rem 1rem;
  position: sticky; top: 0; z-index: 1000;
}
.site-nav-inner {
  max-width: 1200px; margin: auto;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.nav-link {
  color: #e2e8f0 !important; text-decoration: none; font-weight: bold; font-size: 0.95rem;
}
.nav-link:hover { color: #fbbf24 !important; }
.nav-btn {
  margin-left: auto; background: none; border: 1px solid #94a3b8;
  color: #e2e8f0; padding: 0.3rem 0.7rem; border-radius: 6px;
  cursor: pointer; font-size: 0.85rem;
}
.nav-btn:hover { background: #334155; }

/* ========= PREV / NEXT NAV ========= */
.page-nav {
  margin: 2rem 1rem 1rem; padding: 1rem 0;
  border-top: 2px solid #cbd5e1;
}
html.dark .page-nav { border-top-color: #475569; }
.page-nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}
.page-nav-link {
  text-decoration: none; font-weight: bold; font-size: 0.95rem;
  color: #3b82f6;
}
.page-nav-link:hover { text-decoration: underline; }
.page-nav-link.prev { text-align: left; }
.page-nav-link.next { text-align: right; }
html.dark .page-nav-link { color: #60a5fa; }
