html {
    interpolate-size: allow-keywords;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
}

#site_title{font-size:40px;}
#site_title #regmark{font-size:20px;vertical-align:top;}
.logo a {
    display: inline-block;
    vertical-align: middle;
	text-decoration:none;
	color:#007BFF;
	
}
.logo a:hover {
	color:#0056b3;
	
}

/* Flex layout splits sidebar and page contents */
.site-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

aside {
    flex: 1;
    min-width: 240px;
    max-width: 300px;
}

main {
    flex: 3;
}

.sidebar-box {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.sidebar-box details {
    margin-bottom: 12px;
    overflow: hidden;
}

/* Base style for clickable header */
.sidebar-box summary {
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    outline: none;
}

/* Rotate the native browser triangle smoothly when opened */
.sidebar-box summary::-webkit-details-marker,
.sidebar-box summary::marker {
    transition: transform 0.25s ease;
}

.sidebar-box details[open] > summary::-webkit-details-marker,
.sidebar-box details[open] > summary::marker {
    transform: rotate(90deg);
}

.sidebar-box summary:hover {
    color: #007BFF;
}

/* Smooth expansion – only the direct child ul of each details */
.sidebar-box details > ul {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0 10px 0;

    height: 0;
    opacity: 0;
    overflow: hidden;          /* clips content while animating */
    transition: height 0.3s ease, opacity 0.2s ease;
}

/* Expand only when *this* details is open */
.sidebar-box details[open] > ul {
    height: auto;
    opacity: 1;
}

/* Smooth starting entry timeline fallback */
@starting-style {
    .sidebar-box details[open] > ul {
        height: 0;
        opacity: 0;
    }
}

.sidebar-box li {
    margin-bottom: 6px;
}

.sidebar-box a {
    text-decoration: none;
    color: #444;
}

.sidebar-box a:hover {
    text-decoration: underline;
    color: #007BFF;
}

.sidebar-box input[type="text"]{
	width:70%;
}
.sidebar-box input[type="submit"]{
	width:20%;
}

.active-section > summary {
    color: #333;
}

.active-page {
    font-weight: bold;
    color: #007BFF !important;
}

/* Breadcrumb Trail Styles */
.breadcrumb-trail {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.breadcrumb-trail a {
    color: #007BFF;
    text-decoration: none;
}

.breadcrumb-trail a:hover {
    text-decoration: underline;
}

.current-crumb {
    color: #333;
    font-weight: 500;
}

/* Next / Previous Pagination Layout */
.page-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Button style rules for navigation links */
.nav-btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: #ffffff;
    color: #007BFF;
    border: 1px solid #007BFF;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #007BFF;
    color: #ffffff;
}

/* Handle layout constraints if only one button is rendered */
.prev-btn {
    margin-right: auto;
}

.next-btn {
    margin-left: auto;
}

/* Style the very first list item (Section Overview) inside each accordion dropdown */
.sidebar-box ul li:first-child {
    border-bottom: 1px solid #e2e2e2;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

/* Ensure subsequent page spacing remains proportional */
.sidebar-box ul li:first-child a {
    color: #555;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}


/* Table of Contents Wrapper */
.toc-container {
    background-color: #fcfcfc;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.toc-container h2 {
    font-size: 1.35rem;
    color: #222;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    padding-bottom: 4px;
}

/* Styled Ordered Layout Lists */
.toc-list {
    margin: 0;
    padding-left: 20px;
}

.toc-list li {
    margin-bottom: 18px; /* Increased margin to separate snippets nicely */
    font-size: 1.05rem;
    color: #666;
}

/* Link Anchors */
.toc-link {
    color: #007BFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.toc-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Snippet Subtext Styling */
.toc-snippet {
    margin: 4px 0 0 0;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.4;
}

/* Recent Articles Container Box */
.recent-articles-container {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-top: 35px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
}

.recent-articles-container h2 {
    font-size: 1.45rem;
    color: #111;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #007BFF;
    display: inline-block;
    padding-bottom: 6px;
}

/* Feed Listing Reset rules */
.recent-articles-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.recent-articles-list li {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Eliminate bottom borders on the final item */
.recent-articles-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Small Publish Date Timestamp Badge */
.recent-article-date {
    display: block;
    font-size: 0.82rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Anchors styles */
.recent-article-link {
    color: #007BFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.15rem;
    transition: color 0.15s ease;
}

.recent-article-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Content description sub-text spacing */
.recent-article-snippet {
    margin: 6px 0 0 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.45;
}


.articleContentWrapper p{line-height: 24px;}
.articleContentWrapper ol li {
  margin-bottom: 8px; /* Adjust this value for more or less space */
}

/* Optional: Remove margin from the very last item to prevent extra bottom spacing */
.articleContentWrapper ol li:last-child {
  margin-bottom: 0;
}

.inlineImg{margin:2em 1em;}




/* Hide the structural mobile checkbox control by default on desktop */
.menu-toggle-input, .menu-button-label {
    display: none;
}

/* ======================================================================
   RESPONSIVE MOBILE BREAKPOINT (768px and down)
   ====================================================================== */
@media screen and (max-width: 768px) {
    /* 1. Stack the Master Grid Layout into a single row */
	.logo img {
        width: 160px;       /* Shrinks the desktop width layout bounds down to a clean 160px */
        height: auto;       /* Prevents your logo from squishing or distorting */
    }
	
    .site-layout {
        flex-direction: column;
        gap: 20px;
        margin-top: 15px;
        padding: 0 10px;
    }

    /* 2. Show the hamburger toggle trigger button in header bar */
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-button-label {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1001;
    }

    /* Three lines making up the hamburger icon shape */
    .menu-button-label span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #413f3f;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* 3. Turn the Sidebar into a modern slide-out drawer panel */
    .sidebar-canvas {
        position: fixed;
        top: 0;
        left: -320px; /* Completely hidden offscreen by default */
        width: 280px;
        height: 100vh;
        background-color: #f4f4f4;
        z-index: 1000;
        padding: 80px 20px 20px 20px;
        box-sizing: border-box;
        border-right: 1px solid #2d2d2d;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto; /* Allow scrolling if accordion has many open items */
    }

    /* Force the inner sidebar container box to occupy full available width flat */
    .sidebar-box {
        max-width: 100%;
        border: none;
        background: transparent;
        padding: 0;
    }

    /* 4. Increase Interactive Tap Target Sizes (Prevents fat-finger misclicks) */
    .sidebar-box summary, .sidebar-box a {
        padding: 12px 10px; /* Expand physical clickable padding canvas */
        display: block;
        font-size: 1.05rem;
    }
    
    .sidebar-box ul li:first-child {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* 5. INTERACTIVE TOGGLE STATE ENGINE (Pure CSS Magic) */
    /* When the checkbox is ticked by tapping the label, slide the side-box out */
    .menu-toggle-input:checked ~ .site-layout .sidebar-canvas {
        left: 0;
    }

    /* Transform the hamburger icon lines into an 'X' close indicator when menu opens */
    .menu-toggle-input:checked ~ header .menu-button-label span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle-input:checked ~ header .menu-button-label span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle-input:checked ~ header .menu-button-label span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 6. Content Panels adjustments */
    main {
        flex: unset;
        width: 100%;
        box-sizing: border-box;
    }

    .toc-container, .recent-articles-container {
        padding: 15px;
    }

    /* Ensure the inline canvas results form splits into a spacious stack on narrow phones */
    .search-form-inline {
        flex-direction: column; /* Stacks input on top, button on bottom */
        width: 100%;
    }
    
    .search-form-inline input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-form-inline button {
        width: 100%; /* Spans the full viewport width elegantly on mobile tap states */
    }
	
	/* Create the structural backdrop dark overlay engine */
    .site-layout::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black tint */
        backdrop-filter: blur(4px);          /* Clean glass modern blur blur frost */
        -webkit-backdrop-filter: blur(4px);   /* Safari rendering safety block */
        z-index: 999;                        /* Sits right below the sidebar drawer canvas */
        
        /* Hidden by default */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    /* PURE CSS MAGIC TOGGLE: Fade the backdrop mask in when the hidden checkbox is ticked */
    .menu-toggle-input:checked ~ .site-layout::after {
        opacity: 1;
        pointer-events: auto; /* Intercepts taps so clicking the dark space shuts the menu */
    }
	
}