html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky navbar */
}

/* === LAYOUT & CONTENT STYLES === */
body {
    background-color: #ffffff;
}

.docs-layout {
    display: flex;
    flex-direction: row;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.docs-sidebar {
    position: sticky;
    top: 80px; /* Adjusted for navbar height */
    width: 256px;
    height: calc(100vh - 120px);
    flex-shrink: 0;
    overflow-y: auto;
    padding-right: 1.5rem;
}

.docs-sidebar nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    color: #4b5563;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.docs-sidebar nav a:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* This is the class for the main section link highlight */
.active-section-link {
    background-color: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

/* This is for the specific subsection link */
.active-subsection-link {
    color: #4338ca;
    font-weight: 600;
}


.sub-list {
    padding-left: 12px;
    margin-left: 8px;
    border-left: 1px solid #e5e7eb;
    overflow: hidden;
    max-height: 1000px; /* Should be large enough to not clip content */
    transition: max-height 0.4s ease-in-out;
}

.sub-list.collapsed { max-height: 0; }

.collapse-icon {
    transition: transform 0.3s ease;
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

a[aria-expanded="false"] .collapse-icon { transform: rotate(-90deg); }

/* Main Content Typography */
main {
    flex-grow: 1;
    min-width: 0;
}

main article h1 { font-size: 2.25rem; font-weight: 800; color: #111827; }
main article .lead { font-size: 1.125rem; color: #4b5563; margin-top: 0.5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 1.5rem; }
main article h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin-top: 2.5rem; margin-bottom: 1rem; }
main article h3 { font-size: 1.25rem; font-weight: 600; color: #1f2937; margin-top: 2rem; margin-bottom: 0.75rem; }
main article h4 { font-size: 1.1rem; font-weight: 600; color: #374151; margin-top: 1.5rem; margin-bottom: 0.5rem; }
main article p { font-size: 1rem; line-height: 1.75rem; color: #374151; margin-bottom: 1rem; }
main article pre { background-color: #1f2937; color: #d1d5db; padding: 1rem; margin: 1.25rem 0 1.5rem; border-radius: 0.5rem; overflow-x: auto; font-size: 0.875rem; }

/* === STANDARDIZED CALLOUT BLOCKS === */
.callout {
    padding: 1rem;
    margin: 1.25rem 0;
    border-radius: 0.5rem;
    border-left-width: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}
.callout-header svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.callout p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Note Style (Blue) */
.callout-note { background-color: #eff6ff; border-color: #3b82f6; }
.callout-note .callout-header { color: #1e40af; }
.callout-note p { color: #1c3d8e; }

/* Caution Style (Yellow) */
.callout-caution { background-color: #fefce8; border-color: #f59e0b; }
.callout-caution .callout-header { color: #854d0e; }
.callout-caution p { color: #85560e; }

/* Trivia Style (Green) */
.callout-trivia { background-color: #f0fdf4; border-color: #22c55e; }
.callout-trivia .callout-header { color: #15803d; }
.callout-trivia p { color: #166534; }

/* Troubleshooting Style (Red) */
.callout-troubleshooting { background-color: #fef2f2; border-color: #ef4444; }
.callout-troubleshooting .callout-header { color: #991b1b; }
.callout-troubleshooting p { color: #b91c1c; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .docs-sidebar { display: none; }
}

.image-credit-wrapper {
    text-align: center; /* centers the image and credit */
    margin: 1.5rem 0;
}

.image-credit-wrapper img {
    max-width: 600px;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto; /* centers the image */
}

.image-credit {
    font-size: 0.8rem;
    color: #64748b; /* matches your light text color */
    margin: 0.5rem auto 0; /* top margin + center horizontally */
    max-width: 600px; /* reduce width */
    text-align: center; /* center text inside the box */
}

.image-credit a {
    color: #7a40d1; /* primary color for links */
    text-decoration: underline;
}

.table-wrapper {
  overflow-x: auto; /* horizontal scroll on small screens */
  margin: 2rem 0;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th,
.custom-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  vertical-align: top;
}

.custom-table th {
  background-color: #f3f4f6;
  color: var(--primary-color);
  font-weight: 600;
}

.custom-table td {
  color: var(--text-dark);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .custom-table th,
  .custom-table td {
    padding: 0.5rem;
  }
}


    #progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #b859dd, #7a40d1);
  width: 0%;
  z-index: 2000;
}

    /* Underline effect for links in the article */
/* Background highlight effect for links in the article */
main article a {
    color: #b859dd; /* Makes links stand out with the theme color */
    font-weight: 500;
    text-decoration: none;
    background-color: transparent; /* Start with no background */
    padding: 2px 6px; /* Adds space around the text for the background */
    margin: -2px -6px; /* Prevents padding from affecting line spacing */
    border-radius: 6px; /* Gives the background rounded corners */
    transition: all 0.2s ease-in-out;
}

main article a:hover,
main article a:focus {
    background-color: #eef2ff; /* The same light purple as the active sidebar link */
    color: #7a40d1; /* A slightly darker purple for better contrast on hover */
}

    /* Custom Scrollbar for Webkit browsers (Chrome, Safari) */
.docs-sidebar::-webkit-scrollbar {
    width: 8px;
}
.docs-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Code Block Styling */
main article pre {
    position: relative; /* Needed for the copy button */
    padding-top: 2.5rem; /* Make space for header */
}

.code-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #374151; /* A slightly lighter shade */
    color: #9ca3af;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.copy-button {
    background-color: transparent;
    color: #9ca3af;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-button:hover {
    background-color: #4b5563;
    color: #e5e7eb;
}


*, ::before, ::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::after,::before{--tw-content:''}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.mt-4{margin-top:1rem}.w-full{width:100%}.space-y-1 > :not([hidden]) ~ :not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.25rem * var(--tw-space-y-reverse))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}@media (min-width: 1024px){.lg\:pl-8{padding-left:2rem}}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  margin: 0;
}

body {
    overflow-x: hidden; /* Prevents horizontal scrollbars */
    overflow-y: visible; /* Allows vertical scrolling and lets sticky work */
}



.equation {
  font-family: 'Times New Roman', serif;
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.dfrac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.4rem;
}

.dfrac .num {
  border-bottom: 1px solid #000;
  padding: 0 0.2rem;
}

.dfrac .den {
  padding: 0 0.2rem;
  margin-top: 0.2rem;
}

.bar {
  display: none;
}

.equation-note {
  font-family: 'Times New Roman', serif;
  font-size: 1rem;
  text-align: center;
  margin-top: -0.5rem;
  color: #444;
}

.equation {
        font-family: 'Times New Roman', serif;
        font-size: 1.5rem; /* Slightly larger for better readability */
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 2rem 0;
    }

    .dfrac {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        margin: 0 0.4rem;
        position: relative;
        top: -0.2em; /* Vertically align fraction with the rest of the equation */
    }

    .dfrac .num {
        border-bottom: 2px solid #000;
        padding: 0 0.3rem;
    }

    .dfrac .den {
        padding: 0 0.3rem;
        margin-top: 0.2rem;
    }
    
    /* Italicize variables, which is standard practice */
    .equation i {
        font-style: italic;
    }

    /* Styles for subscript and superscript */
    .equation sub, .equation sup {
        font-size: 0.8em;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
    }
    .equation sub {
        bottom: -0.25em;
    }
    .equation sup {
        top: -0.5em;
    }
    
    .equation-note {
        font-family: 'Times New Roman', serif;
        font-size: 1.1rem;
        text-align: center;
        margin-top: -1rem;
        color: #444;
    }





ul.animate-on-scroll {
  list-style-type: none;              /* Remove default bullets */
  padding-left: 0;
  margin: 1rem 0;
  font-family: 'Inter', sans-serif;   /* Optional: match your site font */
  color: #333;
}

ul.animate-on-scroll li {
  position: relative;
  padding-left: 1.8rem;               /* Space for custom bullet */
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

ul.animate-on-scroll li::before {
  content: "•";                       /* Custom bullet */
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  color: #7c3aed;                     /* iGEM purple / your theme color */
  font-weight: bold;
}

ul.animate-on-scroll li:last-child {
  margin-bottom: 0;
}







.content-section-accordion {
    padding: 5rem 0;
    border-bottom: 1px solid #d1d5db; /* light gray */
}

.content-section-accordion h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #7c3aed; /* purple */
    text-align: center;
    margin: 0 0 2rem 0;
}

/* Generic animation class */
.animate-on-scroll-accordion {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll-accordion.is-visible {
    opacity: 1;
    transform: translateY(0);
}




/* --- Accordion / Expandable List --- */
        .accordion-container {
            max-width: 900px;
            margin: auto 0;
        }

        .accordion-item {
            background: #ffffff;
            border: 1px solid #d1d5db;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
            overflow: hidden;
            height: auto;
        }

        .accordion-header {
            width: 100%;
            text-align: left;
            background: #f9fafb;
            border: none;
            padding: 1rem 1.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #d1d5db;
        }
        .accordion-item:last-child {
             border-bottom: 1px solid #d1d5db;
        }
        .accordion-item.active .accordion-header {
            border-bottom-color: transparent;
        }


        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease-out, padding 0.4s ease-out;
            padding: 0 1.5rem;
        }

        .accordion-content p {
            margin: 0 0 1rem 0;
            color: #333333;
        }

        /* This is the key rule that opens the accordion */
        .accordion-item.active .accordion-content {
            padding: 1.5rem;
        }

        /* Animates the '+' icon */
        .accordion-icon {
            transition: transform 0.3s ease-out;
            font-size: 1.5rem;
            font-weight: 300;
        }
        .accordion-item.active .accordion-icon {
            transform: rotate(45deg);
        }

/* This is the key rule that opens the accordion */
.accordion-item.active .accordion-content {
    /* The max-height will now be set by JavaScript */
    padding: 1.5rem;
}


/* --- ADD THESE NEW STYLES FOR INTEGRALS --- */

.integral-group {
    display: inline-flex;
    align-items: center;
    vertical-align: middle; /* Aligns the integral with the surrounding text */
    margin: 0 0.2rem;
}

.integral-symbol {
    font-size: 2.5em; /* Makes the integral sign tall */
    line-height: 0;
}

.integral-limits {
    display: flex;
    flex-direction: column;
    font-size: 0.7em;
    margin-left: -0.8em; /* Pulls the limits left, closer to the symbol */
    margin-right: 0.2em; /* Adds space before the function */
    text-align: left;
}

.integral-limits sup,
.integral-limits sub {
    line-height: 1.1; /* Adjusts vertical spacing between limits */
}

.integral-integrand {
    margin-left: 0.1em; /* Small space after the integral */
}

