/* 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;
}



        .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%;
}

/* ===== TOP NAV BAR ===== */
#site-topnav {
  background: rgb(30, 58, 138);
  color: white;
  padding: 0;
  margin: 0 -30px 20px -30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.topnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  flex-wrap: wrap;
  gap: 8px;
}
.topnav-brand {
  color: white !important;
  font-weight: bold;
  font-size: 1.15rem;
  text-decoration: none;
  margin: 0;
  padding: 0;
}
.topnav-brand:hover { opacity: 0.85; }
.topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topnav-link {
  color: rgba(255,255,255,0.9) !important;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
}
.topnav-link:hover { color: white !important; text-decoration: underline; }
.topnav-toggle {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.2s;
}
.topnav-toggle:hover { background: rgba(255,255,255,0.25); }

/* ===== PREV / NEXT NAV ===== */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin: 40px 30px 30px;
  padding: 0;
}
.pn-link {
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgb(59, 130, 246);
  color: white !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, transform 0.15s;
}
.pn-link:hover { background: rgb(37, 99, 235); transform: translateY(-2px); }
.pn-prev { text-align: left; }
.pn-next { text-align: right; }
.pn-home { flex: 0 0 auto; text-align: center; justify-content: center; font-weight: bold; }
.pn-placeholder { visibility: hidden; }
.pn-arrow { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.pn-title { font-weight: bold; font-size: 1rem; }
.prev-next-top {
  margin: 10px 30px 20px;
}
.prev-next-top .pn-link {
  padding: 10px 16px;
}
.prev-next-top .pn-title {
  font-size: 0.9rem;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] body {
  background-color: rgb(15, 23, 42);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  background-color: rgb(30, 58, 138);
  color: rgb(219, 234, 254);
}
[data-theme="dark"] strong { color: rgb(241, 245, 249); }
[data-theme="dark"] a { color: rgb(96, 165, 250); }
[data-theme="dark"] code, [data-theme="dark"] pre {
  background-color: rgb(30, 41, 59);
  color: rgb(74, 222, 128);
}
[data-theme="dark"] blockquote {
  background-color: rgb(30, 41, 59);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] table, [data-theme="dark"] td,
[data-theme="dark"] tr, [data-theme="dark"] th {
  border-color: rgb(71, 85, 105);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] .mermaid_container,
[data-theme="dark"] .mermaid-diagram,
[data-theme="dark"] .mermaid {
  background-color: rgb(30, 41, 59);
  border-color: rgb(71, 85, 105);
}
[data-theme="dark"] .example-box {
  background: rgb(23, 37, 58);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] .analogy-box {
  background: rgb(30, 30, 20);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] .practice-box {
  background: rgb(15, 35, 20);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] .comment-block {
  background: rgb(30, 41, 59);
  color: rgb(203, 213, 225);
}
[data-theme="dark"] #site-topnav {
  background: rgb(15, 23, 42);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] .pn-link {
  background: rgb(30, 58, 138);
}
[data-theme="dark"] .pn-link:hover {
  background: rgb(37, 99, 235);
}
