body {
    font-family: 'Inter', sans-serif;
}

/* Fallback for Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Style for the copy-to-clipboard button */
.copy-btn-abs {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #4A5568; /* gray-700 */
    color: #E2E8F0; /* gray-300 */
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.code-block-wrapper:hover .copy-btn-abs {
    opacity: 1;
}

.copy-btn-abs:hover {
    background-color: #2D3748; /* gray-800 */
}

/* Glossy and vibrant design with updated gradient */

/* Gradient background for header */
header {
    background: #022042; /* Dark blue */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header a {
    color: #ffffff; /* White links */
    text-decoration: none;
    font-weight: bold;
    /* Prevent font-size or transform changes when link states change */
    transition: color 0.2s ease;
    transform: none !important;
    font-size: inherit !important;
}

/* Removed scaling and vibrant effects for RocPerf header
   Only apply non-color hover behavior to top-level nav items (not dropdown items)
   Top-level nav links are direct children of the main flex container inside the nav. */
header nav > div > a:hover,
header nav > div > a:focus,
header nav > div > a:active,
header nav > div > button:hover,
header nav > div > button:focus,
header nav > div > button:active,
header nav > div > .group > a:hover,
header nav > div > .group > a:focus,
header nav > div > .group > a:active,
.nav-active,
.nav-active a {
    font-weight: bold !important; /* ensure it remains bold */
    transform: none !important; /* remove any accidental scaling */
    font-size: inherit !important; /* prevent font-size changes */
    color: #ff8800 !important; /* contrasting gold on hover */
    transition: color 0.18s ease; /* smooth color transition */
}

/* Red hover only for dropdown menu items (the dropdown panel uses .absolute inside .group) */
header .group .absolute a:hover,
header .group .absolute a:focus,
header .group .absolute a:active {
    color: #fa0000; /* Red on dropdown hover */
}

/* Mobile menu: make the text contrast on hover as well (instead of gray background alone) */
#mobile-menu a:hover,
#mobile-menu a:focus,
#mobile-menu a:active {
    color: #ff8800 !important;
}

/* Glassy / translucent active/nav focus style
   - Use a more specific selector so it overrides Tailwind utilities
   - Backdrop filter for frosted glass (may require browser support)
   - Subtle border and inner-shadow for glossy look */
header .nav-active,
header a:focus,
header a:active {
    background: rgba(255, 255, 255, 0.06); /* slight translucent white */
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 12px rgba(2,32,66,0.25);
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem; /* small padding so it looks like a pill */
    color: #ffffff !important; /* ensure text stays readable */
}

/* If Tailwind utility still applies a bg color, prefer this rule using !important on background */
header .nav-active,
header a:focus,
header a:active {
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Stronger overrides for Tailwind utilities and aria-current markers
   Target elements that may have `bg-blue-600` or `aria-current="page"` */
header [aria-current="page"],
header .bg-blue-600,
header a.bg-blue-600,
header button.bg-blue-600,
#mobile-menu .bg-blue-600,
header a[aria-current="page"],
header button[aria-current="page"] {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(6px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(120%) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 12px rgba(2,32,66,0.25) !important;
    border-radius: 0.5rem !important;
    padding: 0.35rem 0.75rem !important;
    color: #ffffff !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Ensure the dropdown/home button's svg icon keeps proper contrast */
header [aria-current="page"] svg {
    stroke: #ffffff !important;
}

/* Ensure mobile menu links also remain bold when active */
.mobile-nav a,
.mobile-nav a:active,
.mobile-nav a:focus {
    font-weight: bold !important;
    transform: none !important;
    font-size: inherit !important;
}

/* Hero section */
.hero {
    /* background: linear-gradient(135deg, #3b82f6, #f97316); /* Blue to Orange */
    /* color: #ffffff; */
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); */

    background: linear-gradient(135deg, #FF9933, #FFFFFF, #138808);
    
    /* Note: You may need to adjust the text color. 
    The original 'color: #ffffff;' (white) will be difficult 
    to read against the white middle of this new gradient.
    You might try a dark color like #333333.
    */
    color: #333333; /* Changed from #ffffff for better readability */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero button {
    background: linear-gradient(90deg, #ef4444, #f97316); /* Red to Orange */
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

/* Section cards */
section {
    padding: 4rem 0;
}

section .card {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

section .card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #022042;
    color: #ffffff;
    padding: 1rem 0;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
}
/* --- Compact Code Narrative Styles --- */

.cn-wrapper {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Inter', system-ui, sans-serif;
    /* FIX 1: Add margin so it doesn't overlap the diagram above */
    margin-top: 60px; 
    padding: 40px 0;
    position: relative;
    z-index: 1; /* Ensure it sits on its own layer */
}

/* 1. Make the main container wider so everything fits comfortably */
.cn-container {
    display: flex;
    max-width: 1300px; /* <-- INCREASED from 1000px */
    margin: 0 auto;
    gap: 60px; /* Increased gap for better separation */
    align-items: flex-start;
}

/* 2. Give the code window more share of the screen */
.cn-sticky-col {
    width: 60%;
    height: 100vh; /* Must be full height for centering to work */
    position: sticky;
    top: 0;
    
    /* Center the code window vertically */
    display: flex;
    align-items: center; 
    justify-content: center;
}

/* 3. Reduce the text column slightly to balance it out */
.cn-scroll-col {
    width: 35%; /* <-- DECREASED from 45% */
    padding-top: 0; 
}

.cn-code-window {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    /* --- CHANGE THIS --- */
    max-height: 80vh; 
    overflow-y: auto; /* Allows scrolling if code is too long */
    overflow-x: hidden;
    
    /* Optional: Smooth scrolling for the container */
    scroll-behavior: smooth; 
}

/* Hide the scrollbar for a cleaner look (works on Chrome/Safari/Edge) */
.cn-code-window::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.cn-window-header {
    background: #0d1117;
    padding: 8px 12px;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cn-dot { width: 8px; height: 8px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.cn-filename { margin-left: 8px; font-size: 11px; color: #8b949e; font-family: monospace; }

.cn-code-window pre {
    margin: 0;
    padding: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 14px; /* Slightly smaller font */
    line-height: 1.0;
    overflow-x: auto;
}

/* Animation Logic */
.cn-line {
    display: block;
    opacity: 0.75; 
    transition: all 0.3s ease;
    padding: 0 8px;
    border-radius: 1px;
}

.cn-line.active {
    opacity: 1;
    background: rgba(56, 139, 253, 0.1);
    border-left: 2px solid #58a6ff;
    font-weight: 600;
}

/* Syntax Colors */
.kwd { color: #ff7b72; }
.fun { color: #d2a8ff; }
.str { color: #a5d6ff; }
.typ { color: #79c0ff; }
.com { color: #8b949e; font-style: italic; }

.cn-step {
    /* Reduce scroll distance between steps */
    min-height: 40vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.2;
    transition: opacity 0.3s;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 1px solid transparent; /* Guide line */
}

.cn-step.active {
    opacity: 1;
    border-left: 1px solid #58a6ff; /* Visual cue for active text */
}

.cn-step h3 { color: #58a6ff; margin: 0 0 8px 0; font-size: 1.1rem; }
.cn-step p { line-height: 1.5; color: #c9d1d9; margin: 0; font-size: 0.95rem; }

.cn-spacer { height: 10vh; }

/* Mobile Fix */
@media (max-width: 768px) {
    .cn-container { flex-direction: column-reverse; }
    .cn-sticky-col { position: relative; top: 0; width: 100%; margin-bottom: 20px; }
    .cn-scroll-col { width: 100%; }
    .cn-step { min-height: auto; margin-bottom: 30px; opacity: 1; border: none;}
}

/* --- Boundary Condition Library Styles --- */

/* Container spacing */
.bc-library-container {
    padding: 20px 0;
    max-width: 100%;
}

/* Intro Box Styling */
.bc-intro-box {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff; /* OpenFOAM Blue */
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 1rem;
    color: #333;
}

/* Table Layout */
.bc-table-responsive {
    overflow-x: auto; /* Scroll on mobile */
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bc-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    min-width: 700px; /* Ensures code blocks have room */
}

.bc-table th {
    background-color: #2c3e50;
    color: #ffffff;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
}

.bc-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top; /* Aligns text to top */
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Column Specifics */
.bc-name {
    font-family: monospace;
    font-weight: 700;
    color: #d35400; /* Orange highlight */
    width: 15%;
}
.bc-desc { width: 25%; }
.bc-fields { 
    width: 15%; 
    font-style: italic; 
    color: #666; 
}
.bc-usage { width: 45%; }

/* OpenFOAM Code Block Styling */
.foam-code-wrapper {
    position: relative;
    background-color: #1e1e1e;
    border-radius: 6px;
}

pre.foam-code {
    margin: 0;
    padding: 15px;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre;
}

/* Syntax Highlighting helpers */
.f-key { color: #9cdcfe; } /* Light Blue */
.f-val { color: #ce9178; } /* Light Orange/Red */

/* Copy Button */
.bc-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 3px 8px;
    font-size: 0.7rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bc-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.bc-table tbody tr {
    transition: background-color 0.2s ease;
}

.bc-table tbody tr:hover {
    background-color: #f8fbff; /* Very light blue tint on hover */
}

.bc-copy-btn {
    /* Update your existing .bc-copy-btn with these tweaks */
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.bc-copy-btn:hover {
    opacity: 1;
    background-color: #d35400; /* Matches your orange text on hover! */
    border-color: #d35400;
}

/* --- Utility Card Section Styles --- */

.util-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; /* Light gray border */
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.util-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #bfdbfe; /* Slight blue border on hover */
}

/* Header area of the card */
.util-header {
    background-color: #f8fbff; /* Very light blue background */
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.util-title {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50; /* Dark Blue */
    margin: 0;
}

/* The small pill/tag (e.g., Pre-processing) */
.util-tag {
    background-color: #e2e8f0;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Body of the card */
.util-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.util-desc {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Command Box Container */
.util-command-box {
    margin-top: auto; /* Pushes this to bottom of card */
}

.util-cmd-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Layout */
.tutorial-section {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}
.row-split {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.description { flex: 1; min-width: 300px; }
.media-container { flex: 1; text-align: center; min-width: 300px; }
.media-container img { max-width: 100%; border: 1px solid #ddd; border-radius: 4px; }
.caption { font-size: 0.9em; color: #666; margin-top: 5px; }

/* Tables */
.bc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.95em;
}
.bc-table th, .bc-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}
.bc-table th { background-color: #f4f4f4; font-weight: 600; }

/* Buttons */
.github-link-container { margin-top: 20px; text-align: center; }
.btn-github {
    display: inline-block;
    padding: 10px 20px;
    background-color: #24292e; /* GitHub Black */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-github:hover { background-color: #444; }

.bc-table thead th {
    background-color: #2c3e50 !important; /* Forces the Dark Blue background */
    color: #ffffff !important;             /* Forces White text */
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: none;                   /* Removes conflicting borders */
}

/* =========================================
   UPDATED ACCORDION STYLES (Rich Header)
   ========================================= */

   /* =========================================
   COMPLETE TUTORIAL ACCORDION STYLES
   (Paste this into your main CSS file)
   ========================================= */

/* 1. Main Page Wrapper */
.tutorial-page-wrapper {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    padding: 40px 20px;
    line-height: 1.6;
    color: #333;
    max-width: 1100px;
    margin: 0 auto; /* Centers the content */
}

/* 2. The "Rich" Accordion Button */
.tutorial-page-wrapper .accordion {
    background-color: #ffffff;
    color: #2c3e50;
    cursor: pointer;
    padding: 15px 25px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 12px; /* Space between items */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e1e4e8;
    
    /* Flexbox Layout for Title/Desc + Image */
    display: flex;
    align-items: center; 
    justify-content: space-between; 
    gap: 20px;
}

/* Hover and Active States */
.tutorial-page-wrapper .active, 
.tutorial-page-wrapper .accordion:hover {
    background-color: #f8fbff; /* Very light blue */
    border-color: #bee3f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Text Group inside Button */
.tutorial-page-wrapper .acc-text-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tutorial-page-wrapper .acc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.tutorial-page-wrapper .acc-desc {
    font-size: 0.95rem;
    color: #718096;
    font-weight: 400;
    line-height: 1.4;
}

/* Thumbnail Image inside Button */
.tutorial-page-wrapper .acc-thumb {
    /* Adjust these values to make the image larger */
    height: 160px;       /* Increased height */
    width: 220px;        /* Increased width */
    
    object-fit: cover; /* Keeps image from distorting */
    border-radius: 6px;
    border: 1px solid #edf2f7;
    background-color: #eee;
}

/* Specific styling for the ALICE regression GIF to avoid clashes with other GIF rules */
.tutorial-page-wrapper .gif-regression {
    width: 950px; /* wide banner-style thumbnail */
    height: 150px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #edf2f7;
    background-color: #eee;
    flex: 0 0 auto; /* keep fixed size inside flex container */
}

.tutorial-page-wrapper .gif-regression .gif-regression-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Plus/Minus Icon */
.tutorial-page-wrapper .accordion:after {
    content: '\002B'; /* Plus sign */
    font-size: 1.8rem;
    color: #a0aec0;
    font-weight: 400;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.tutorial-page-wrapper .active:after {
    content: "\2212"; /* Minus sign */
    color: #3182ce;
}

/* 3. The Sliding Panel (Hidden Content) */
.tutorial-page-wrapper .panel {
    padding: 0 30px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-radius: 0 0 8px 8px;
    margin-top: -10px; /* Pull up to attach to button */
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    border-left: 1px solid #e1e4e8;
    border-right: 1px solid #e1e4e8;
    border-bottom: 1px solid #e1e4e8;
}

/* 4. Internal Content Styling */
.tutorial-page-wrapper .tutorial-content {
    padding: 30px 10px;
}

.tutorial-page-wrapper h3 {
    color: #2d3748;
    margin-top: 10px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Split Layout (Description Left, Schematic Right) */
.tutorial-page-wrapper .row-split {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.tutorial-page-wrapper .description {
    flex: 3;
    min-width: 300px;
}

.tutorial-page-wrapper .media-container {
    flex: 2;
    min-width: 700px;
    text-align: center;
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.tutorial-page-wrapper .schematic-img,
.tutorial-page-wrapper .result-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.tutorial-page-wrapper .caption {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 10px;
    font-style: italic;
}

/* Tables */
.tutorial-page-wrapper .bc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
}

.tutorial-page-wrapper .bc-table th {
    background-color: #edf2f7;
    color: #2d3748;
    text-align: center;
    padding: 12px 15px;
    font-weight: 600;
}

.tutorial-page-wrapper .bc-table td {
    padding: 12px 5px;
    border-bottom: 1px solid #e2e8f0;
}

/* Results Section */
.tutorial-page-wrapper .results-container {
    margin-top: 30px;
    text-align: center;
}

.tutorial-page-wrapper .results-container p {
    text-align: left;
    margin-bottom: 15px;
}

/* GitHub Button */
.tutorial-page-wrapper .github-link-container {
    margin-top: 40px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px dashed #cbd5e0;
}

.tutorial-page-wrapper .btn-github {
    display: inline-block;
    background-color: #24292e;
    color: #fff;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tutorial-page-wrapper .btn-github:hover {
    background-color: #444;
    transform: translateY(-2px);
}

/* Main container for this specific section */
.tutorial-page-wrapper .run-sim-guide {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 850px; /* Limits width for better readability */
  color: #333;
  line-height: 1.6;
}

/* Headings specific to this section */
.tutorial-page-wrapper .run-sim-guide h3 {
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 10px;
  margin-bottom: 25px;
  color: #2c3e50; /* Dark blue/grey */
  font-size: 1.5rem;
}

/* Individual Instruction Steps */
.tutorial-page-wrapper .run-sim-guide .sim-step {
  margin-bottom: 25px;
}

.tutorial-page-wrapper .run-sim-guide .step-label {
  display: block;
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 8px;
  color: #444;
}

/* Code Blocks */
.tutorial-page-wrapper .run-sim-guide .cmd-block {
  background-color: #f6f8fa; /* Light grey background */
  border: 1px solid #d1d5db;
  border-left: 4px solid #0366d6; /* Blue accent on left */
  border-radius: 4px;
  padding: 12px 15px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  color: #24292e;
  display: block;
  margin: 10px 0;
  white-space: pre-wrap; /* Keeps formatting on small screens */
  overflow-x: auto; /* Adds scrollbar if text is too long */
}

/* The "Info/Tip" Box at the bottom */
.tutorial-page-wrapper .run-sim-guide .tip-box {
  background-color: #e3f2fd; /* Very light blue */
  border: 1px solid #bbdefb;
  border-radius: 6px;
  padding: 15px 20px;
  font-size: 0.95em;
  margin-top: 35px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tutorial-page-wrapper .run-sim-guide .tip-box strong {
  color: #0d47a1; /* Dark blue text for emphasis */
}
/* style.css */

/* --- GLOBAL LAYOUT --- */
/* Allow the body to scroll normally */
body {
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- SECTION 1: THEORETICAL FRAMEWORK (Full Width) --- */
/* This ensures your existing framework section looks correct */
.framework-section {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 10;
}

/* --- SECTION 2: DOCS LAYOUT (Split View) --- */
#docs-container {
    display: flex;
    width: 100%;
    position: relative;
    background-color: white;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    /* Constrain to match framework-section width */
    max-width: 80rem; /* 7xl = 80rem */
    margin-left: auto;
    margin-right: auto;
}

/* --- LEFT SIDEBAR (Sticky) --- */
#docs-container .docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    
    /* STICKY: Sticks to top after scrolling past framework */
    position: -webkit-sticky;
    position: sticky;
    top: 64px; /* Below header */
    height: fit-content;
    max-height: calc(100vh - 64px);
    overflow-y: auto; /* Scrollable internal menu only */
    
    background-color: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 1.5rem 1rem;
    z-index: 20;
    align-self: flex-start;
}

/* --- RIGHT CONTENT AREA (Normal flow) --- */
#docs-container .docs-content {
    flex-grow: 1;
    padding: 2rem 1.5rem;
    /* No fixed height or overflow - uses body scroll */
    max-width: 100%;
}

/* Adjust nested container padding */
#docs-container .docs-content .container {
    padding-left: 0;
    padding-right: 0;
}

/* --- NAVIGATION STYLES (Unchanged) --- */
#docs-container .nav-tree { list-style: none; padding: 0; margin: 0; }
#docs-container .nav-item { margin-bottom: 0.25rem; }

#docs-container .nav-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.75rem; color: #4b5563; text-decoration: none;
    border-radius: 0.375rem; font-size: 0.95rem; font-weight: 500;
    cursor: pointer; transition: background-color 0.2s;
}

#docs-container .nav-link:hover { background-color: #e5e7eb; color: #111827; }
#docs-container .nav-link.active,
#docs-container a.nav-sub-link.active { background-color: #eff6ff; color: #2563eb; font-weight: 600; }

#docs-container .nav-sub {
    list-style: none; padding-left: 1.25rem; margin-top: 0.25rem;
    display: none; border-left: 1px solid #e5e7eb;
}
#docs-container .nav-sub-link {
    display: block; padding: 0.4rem 0.75rem;
    font-size: 0.9rem; color: #6b7280; text-decoration: none;
}
#docs-container .nav-sub-link:hover { color: #2563eb; }

/* Chevron */
#docs-container .chevron { transition: transform 0.2s; width: 16px; height: 16px; opacity: 0.5; }
#docs-container .nav-item.open > .nav-link .chevron { transform: rotate(90deg); }
#docs-container .nav-item.open > .nav-sub { display: block; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    #docs-container {
        flex-direction: column;
        height: auto;
    }
    #docs-container .docs-sidebar {
        position: fixed; 
        top: 64px; 
        left: 0; 
        height: auto;
        max-height: calc(100vh - 64px);
        transform: translateX(-100%); 
        z-index: 50; 
        width: 80%;
        background: white; 
        transition: transform 0.3s;
        box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    }
    #docs-container .docs-sidebar.show { 
        transform: translateX(0); 
    }
    #docs-container .docs-content { 
        margin-left: 0;
        padding: 1.5rem;
        height: auto;
        overflow: visible;
    }
}

.styled-table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #e6eef6;
  box-shadow: 0 4px 10px rgba(2,6,23,0.04);
  font-family: inherit;
  margin-top: 0.75rem;
}
.styled-table th, .styled-table td {
  border: 1px solid #eef4fb;
  padding: 12px 14px;
  text-align: center;
}
.styled-table thead th {
  background: linear-gradient(180deg,#fbfdff,#ffffff);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.styled-table thead .sub-header {
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0b1220;
}
.styled-table tbody tr:nth-child(even) {background: #fbfdff}

/* Container alignment to match your site header */
.cfd-drag-section-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* The Accordion Box */
.drag-model-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.drag-model-accordion[open] {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* The Clickable Header */
.accordion-header {
    list-style: none;
    padding: 18px 25px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: #002b5c; /* Matching your RocPerf header blue */
    border-left: 6px solid #002b5c;
}

.accordion-header::-webkit-details-marker { display: none; }

.accordion-header:hover { background: #f1f5f9; }

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.drag-model-accordion[open] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Expanded Content Area */
.accordion-content {
    padding: 30px 25px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

/* Flexbox Layout for Code and Info */
.model-flex-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Code Card Styling */
.code-card {
    flex: 1.5;
    min-width: 450px;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    background: #334155;
    color: #e2e8f0;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-family: monospace;
}

.code-content {
    margin: 0;
    padding: 20px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #f8fafc;
    overflow-x: auto;
}

/* Syntax Highlighting Colors */
.cpp-type { color: #818cf8; }
.cpp-func { color: #2dd4bf; }
.cpp-key  { color: #fb7185; }
.cpp-var  { color: #38bdf8; }
.cpp-num  { color: #fbbf24; }

/* Right Column: Info Cards */
.details-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.badge.blue { background: #dbeafe; color: #1e40af; }
.badge.green { background: #dcfce7; color: #166534; }

.formula-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

/* Table Styling */
.table-section { margin-top: 20px; }
.table-title { margin-bottom: 15px; font-size: 1.4rem; color: #334155; }

.styled-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.styled-table th {
    background-color: #002b5c;
    color: white;
    text-align: left;
    padding: 15px;
}

.styled-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.styled-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e11d48;
}

/* Scroll margin for anchor links to account for sticky header */
[id] {
    scroll-margin-top: 80px;
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .model-flex-row { flex-direction: column; }
    .code-card { min-width: 100%; }
    
    [id] {
        scroll-margin-top: 60px;
    }
}

.ktgf-model-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
  }
  .ktgf-model-table th, .ktgf-model-table td {
    border: 1px solid #e1e4e8;
    padding: 10px 15px;
    text-align: left;
  }
  .ktgf-model-table th {
    background-color: #f6f8fa;
    color: #24292e;
    font-weight: 600;
  }
  .ktgf-model-table tr:nth-child(even) {
    background-color: #ffffff;
  }
  .ktgf-model-table tr:hover {
    background-color: #f1f8ff;
  }
  .ktgf-model-table strong {
    color: #0366d6;
  }
  .ktgf-model-table a {
    color: #0366d6;
    text-decoration: none;
  }
  .ktgf-model-table a:hover {
    text-decoration: underline;
  }
  .ktgf-model-table .ref-list {
    font-size: 12.5px;
    color: #586069;
  }