/* =============================================== +\
|             GLOBAL UI & TYPOGRAPHY                |
|    core look and feel of the site, in all pages   |
\* =============================================== */

/* Imports the 'Architects Daughter', 'Roboto', and 'Share Tech Mono' fonts from Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Roboto:wght@300;400;500;700&family=Share+Tech+Mono&display=swap');

/* Defines a local font 'Dejavu Sans Mono' for code blocks. */
@font-face {
    font-family: "Dejavu Sans Mono";
    src: url("/assets/fonts/DejaVuSansMono.ttf") format("truetype");
}

/* Base styles for the entire page. */
body {
    background-color: #1b201d;  /* Dark slate background for a consistent, professional theme. */
    color: #e2dfd1 !important;  /* A soft, off-white for readability on the dark background. */
    font-family: 'Roboto', sans-serif; /* Sets the default font for all text. */
    margin: 0; /* Removes default browser margin. */
}


/* Provides consistent padding for the main content area. */
main {
    padding-left: 6px !important;  /* Creates compact spacing from the left edge or sidebar. */
    padding-right: 6px !important; /* Creates compact spacing from the right edge. */
    padding-top: 5px; /* Adds a little space at the top. */
}


/* Utility class for larger, highlighted text sections. */
.lead {
    font-family: 'Roboto', sans-serif;
    border-left: 3px solid #8f00b3;
    padding-left: 20px;
    font-style: italic;
}


/* Enables smooth scrolling when navigating to an anchor link (e.g., #section). */
html {
    scroll-behavior: smooth;
}


/* repair the scroll bounce and layout shifting on mobile when using anchor links */
html, body {
    /* Prevents the 'pull-to-refresh' bounce and layout shifting */
    overscroll-behavior-y: none; 
    /* Ensures the body takes up exactly the viewport height without shifting */
    height: 100%;
    overflow-x: hidden;
}


/*
 * OFFSETS FOR STICKY HEADER
 * These rules prevent content from being hidden behind the sticky header when jumping to an anchor link.
 * The `scroll-margin-top` property adds space above the element when it's scrolled to.
 */
[id], h1, h2, h3, h4, h5, section, .card-slate {
    scroll-margin-top: 100px !important; /* Value should be roughly the height of the sticky header. */
}


/*
 * STICKY HEADER
 * This section styles the main header container that stays at the top of the viewport during scroll.
 */
#dynamic-header {
    position: sticky;     /* Makes the header stay at the top. */
    top: 0;               /* Pins it to the very top of the viewport. */
    z-index: 1020;        /* Ensures it stays above most page content. */
    background-color: black; /* Matches the main container background. */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 2px;
    padding-bottom: 0 !important;
    min-height: 85px; /* Reserves a minimum height for the header area. */
}


/* Resets spacing for rows inside the sticky header to prevent unwanted gaps. */
#dynamic-header .row {
    margin: 0 !important;
    padding: 0 !important;
    --bs-gutter-y: 0px !important; /* Removes vertical gutter spacing for Bootstrap rows. */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hard reset for column padding within the header to ensure alignment. */
#dynamic-header .col,
#dynamic-header .col-auto {
    padding-left: 0 !important;
}


/* Defines a max-width for the main content container and centers it. */
.container {
    background-color: black;
    max-width: 1020px;
    margin: 0 auto; /* Centers the container horizontally. */
}


/* Remove the forced padding on fluid containers used for full-width elements. */
.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* Utility class to center text. */
.center {
    text-align: center;
}


/* Overrides Bootstrap's default secondary text and alert colors to match the site's theme. */
.text-secondary, .alert-secondary {
    color: #e2dfd1 !important;
    font-family: 'Roboto', sans-serif;
}


/*
 * TYPOGRAPHY
 * Defines styles for headings, paragraphs, and links.
 */

/* Base styles for all heading levels. */
h1, h2, h3, h4, h5 {
    font-family: 'Roboto', sans-serif;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}


/* Specific styles for each heading level. */
h1 { color: #8f00b3; font-size: 1.4rem; padding-top: 0.3rem; }

 /* Main page title - purple */
h2 { color: #cc6600; font-size: 1.3rem; padding-top: 0.2rem; }

 /* Section title - orange */
h3 { color: #2cba77; font-size: 1.2rem; font-weight: 600; }

   /* Sub-section title - green */
h4 { color: #bb5ede; font-size: 1.1rem; font-weight: 500; }

 /* Sub-sub section title - purple (lighter than h1, deeper than h5) */
h5 { color: rgb(232, 157, 251); font-size: 1rem; font-weight: 500; }

 /* Minor heading - light purple */

/* Default font size for common text elements. */
p, div, tr, th, td {
    font-size: 1rem;
}

/* Link styling. */
a {
    text-decoration: none; /* Removes the default underline. */
    transition: color 0.3s; /* Smooth color transition on hover. */
    color: rgb(77, 210, 247); /* Default link color - cyan. */
}


a:hover {
    color: hotpink; /* Changes color on hover. */
    text-decoration: underline; /* Adds underline on hover for clarity. */
}


a:active {
    color: purple; /* Color when a link is being clicked. */
}



/* Styles images with rounded corners. */
img {
    border-radius: 5px;
}

/* ==========================================================================
   5. INTERACTIVE ELEMENTS
   - Buttons, links, and other interactive components.
   ========================================================================== */

/* Overrides Bootstrap's primary button style. */
.btn-primary {
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    color: white;
    padding: 10px 20px;
    transition: 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: rgba(247, 0, 255, 0.6); /* Purple/pink on hover. */
    border-color: white;
}



/* Horizontal rule color. */
hr {
    color: rgb(136, 46, 204); /* Sage Purple */
}



/* Special text color utility. */
.highlight-discord {
    color: #fc7f18; /* Sage Orange */
    font-weight: bold;
}



/* ==========================================================================
   6. HEADER & NAVIGATION
   - Styles for the site header, main navigation, and breadcrumbs.
   ========================================================================== */

.site-header {
    background: transparent;
    padding-top: 15px;
    padding-bottom: 10px;
    padding-left: 0px;
}



/* Main navigation link container. */
.nav-links {
    display: flex; /* Aligns nav items in a row. */
    gap: 25px; /* Space between nav items. */
    list-style: none; /* Removes bullet points. */
    margin: 0;
    padding: 0; /* Critical for right-alignment. */
}



/* Individual navigation links. */
.nav-links a {
    font-family: 'Share Tech Mono', monospace;
    color: #888; /* Muted color for unselected links. */
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}



.nav-links li {
    position: relative;
}



.nav-link-btn {
    font-family: 'Share Tech Mono', monospace;
    color: #888;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}



.nav-link-btn:hover,
.nav-link-btn:focus-visible {
    color: #fc7f18;
}



.nav-dropdown .dropdown-menu-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 8px 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #0a0a0a;
    z-index: 200;
}



.nav-dropdown .dropdown-menu-links li {
    margin: 0;
    padding: 0;
}



.nav-dropdown .dropdown-menu-links a {
    display: block;
    text-transform: none;
    padding: 4px 0;
}



.nav-dropdown:hover .dropdown-menu-links,
.nav-dropdown:focus-within .dropdown-menu-links {
    display: block;
}



.nav-links a:hover {
    color: #fc7f18; /* Sage Orange on hover. */
}



/* Breadcrumb navigation bar (e.g., Home > Engineering > Concepts). */
.breadcrumb-nav {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #444; /* Very subtle text color. */
    padding-top: 2px;
    padding-bottom: 2px;
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-top: 1px solid rgb(136, 46, 204);
    border-bottom: 1px solid rgb(136, 46, 204);
}



.breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}



.breadcrumb-row .breadcrumb-nav {
    flex: 1 1 auto;
    min-width: 0;
}



.hero-visibility-toggle {
    appearance: none;
    border: 1px solid rgba(111, 143, 129, 0.75);
    background: linear-gradient(130deg, #13251b 0%, #1f352a 60%, #2d1a40 100%);
    color: #d9eadf;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}



.hero-visibility-toggle:hover {
    border-color: #b8dcc8;
    color: #ffffff;
}



.hero-visibility-toggle:disabled,
.hero-visibility-toggle[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.45;
    border-color: rgba(111, 143, 129, 0.35);
    color: #90a59b;
}



.hero-visibility-toggle:disabled:hover,
.hero-visibility-toggle[aria-disabled="true"]:hover {
    border-color: rgba(111, 143, 129, 0.35);
    color: #90a59b;
}



.hero-visibility-toggle:focus-visible {
    outline: 2px solid #b58be0;
    outline-offset: 1px;
}



.hero-visibility-toggle i {
    font-size: 0.68rem;
}



.hero-blackboard.is-collapsed {
    display: none !important;
}



.breadcrumb-nav a { color: #666; }


.breadcrumb-nav .sep { color: #333; }

 /* Separator character (e.g., '>'). */
.breadcrumb-nav .current { color: #fc7f18; }

 /* Color for the current page. */
.breadcrumb-nav i {
    margin-right: 5px;
    vertical-align: middle;
}


.breadcrumb-nav a,
.breadcrumb-nav span {
    display: inline-block;
    vertical-align: middle;
}


/* Hamburger menu for mobile. Initially hidden on larger screens. */
.hamburger {
    display: none;
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
}


/* Mobile navigation styles. */
@media (max-width: 640px) {
    /* Hides the desktop nav links and shows the hamburger icon. */
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        right: 20px;
        background: #0a0a0a;
        border: 1px solid #333;
        flex-direction: column;
        width: 180px;
        padding: 10px;
        z-index: 100;
    }

    .nav-link-btn {
        text-align: left;
        width: 100%;
    }

    .nav-dropdown .dropdown-menu-links {
        position: static;
        border: 0;
        border-left: 2px solid #333;
        border-radius: 0;
        min-width: 0;
        margin-top: 6px;
        margin-left: 6px;
        padding: 4px 0 4px 10px;
        background: transparent;
    }

    .nav-dropdown:hover .dropdown-menu-links,
    .nav-dropdown:focus-within .dropdown-menu-links {
        display: block;
    }

    /* When active, the mobile nav menu is shown. */
    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border: 1px solid #4f7b69;
        border-radius: 8px;
        background: linear-gradient(130deg, #12231a 0%, #23362d 60%, #2c1940 100%);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
        cursor: pointer;
    }

    .hamburger:hover {
        border-color: #b8dcc8;
    }

    .hamburger:focus-visible {
        outline: 2px solid #b58be0;
        outline-offset: 2px;
    }

    /* The three lines of the hamburger icon. */
    .hamburger span {
        width: 20px;
        height: 2px;
        background: #d9eadf;
    }
}

#study-sidebar hr {
    margin: 6px 0 8px 0;
}



@media (max-width: 991px) {
    .side-bar { display: none; }


    .side-bar.active {
    display: block;
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.95);
    }


}

/* Custom Scrollbar for the sidebar (WebKit browsers like Chrome/Safari). */
.sidebar-content::-webkit-scrollbar { width: 4px; }


.sidebar-content::-webkit-scrollbar-track { background: transparent; }


.sidebar-content::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }


.sidebar-content::-webkit-scrollbar-thumb:hover { background: #8f00b3; }

 /* Purple hover on scrollbar. */

/* Sidebar back control: white Bootstrap icon on transparent background for dark theme. */
html[data-bs-theme="dark"] .sidebar-content #home-link {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    line-height: 1;
    box-shadow: none !important;
}



html[data-bs-theme="dark"] .sidebar-content #home-link:hover,
html[data-bs-theme="dark"] .sidebar-content #home-link:focus {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}



html[data-bs-theme="dark"] .sidebar-content #home-link i {
    color: currentColor;
}



/* Simple static navigation tree: no sidebar progress bar. */
.sidebar-content .progress {
    display: none !important;
}

#main-content { order: 2; }

/* --- DESKTOP: STICKY SIDEBAR --- */
@media (min-width: 992px) {
    #main-content {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* --- MOBILE: SLIDE-OUT OVERLAY --- */
@media (max-width: 991px) {
    /* Adds padding to the bottom of the main content to prevent it from being hidden by the mobile sidebar toggle button. */
    main, .content-area {
        padding-bottom: 80px !important;
    }
}

.home-hero-note {
    border: 1px solid #3a3a3a;
    background: linear-gradient(180deg, #111111 0%, #0b0b0b 100%);
}

.csp-filter-shell {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #2f2f2f;
    background: linear-gradient(180deg, #0f0f0f 0%, #090909 100%);
}

.csp-filter-header {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
}

.csp-filter-control {
    width: min(100%, 340px);
}

.csp-card-actions {
    margin-top: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.csp-card-actions .btn {
    align-self: auto;
    margin-left: auto;
}

.csp-progress-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 31px;
}

.csp-progress-text {
    font-family: "Share Tech Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    color: #bdbdbd;
}


.csp-progress-toggle {
    width: 38px;
    height: 22px;
    border: 1px solid #3b3b3b;
    border-radius: 999px;
    background: #101010;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.csp-progress-toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #767676;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.csp-progress-toggle.is-in-progress {
    background: #4f3f11;
    border-color: #d2aa3a;
}



.csp-progress-toggle.is-completed {
    background: #1f5f35;
    border-color: #39b46a;
}



.csp-progress-toggle.is-in-progress::after {
    transform: translateX(8px);
    background: #fff4d2;
}



.csp-progress-toggle.is-completed::after {
    transform: translateX(16px);
    background: #ebfff2;
}



.csp-progress-toggle:focus-visible {
    outline: 2px solid rgba(57, 180, 106, 0.65);
    outline-offset: 2px;
}



.csp-card-favorite {
    border-color: rgba(122, 220, 196, 0.75);
    box-shadow: 0 0 0 1px rgba(122, 220, 196, 0.32);
}



.csp-favorite-check-wrap {
    margin: 0;
    position: absolute;
    top: 0.88rem;
    right: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d6d6d6;
    font-size: 0.83rem;
}



.csp-favorite-check-wrap .form-check-input {
    margin-top: 0;
}



.csp-favorite-check-wrap .form-check-label {
    font-family: "Share Tech Mono", monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}



#csp-roadmap-cards.csp-favorites-mode {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}



#csp-roadmap-cards.csp-favorites-mode .home-lane {
    display: contents;
}



#csp-roadmap-cards.csp-favorites-mode .home-lane-title {
    display: none;
}



#csp-roadmap-cards.csp-hide-lane-titles .home-lane-title {
    display: none;
}



#csp-roadmap-cards.csp-favorites-mode .home-lane-grid {
    display: contents;
}


@media (max-width: 992px) {
    .home-lane-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #csp-roadmap-cards.csp-favorites-mode {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .csp-filter-control {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .home-lane-grid {
        grid-template-columns: 1fr;
    }



    #csp-roadmap-cards.csp-favorites-mode {
        grid-template-columns: 1fr;
    }



    .csp-favorite-check-wrap {
        top: 0.65rem;
        right: 0.75rem;
        font-size: 0.76rem;
    }



    .csp-card-actions {
        flex-wrap: wrap;
        row-gap: 0.55rem;
    }



    .csp-card-actions .btn {
        margin-left: 0;
    }


}

/* ==========================================================================
   10. FIRST PAGE NAVIGATION
   - Quick-access actions for manifesto and account entry.
   ========================================================================== */

.first-page-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}



.first-page-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    min-width: 180px;
    padding: 0.75rem 1.4rem;
    color: #f2f2f2;
    background: linear-gradient(120deg, #10211a 0%, #173326 55%, #311341 100%);
    border: 2px solid #5f7d70;
    border-radius: 999px;
    clip-path: none;
    font-family: "Share Tech Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    overflow: visible;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}



.first-page-nav-btn::before {
    display: none;
}



.first-page-nav-btn:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: #c7e4d5;
    box-shadow: inset 0 0 0 1px rgba(178, 227, 203, 0.2), 0 10px 24px rgba(17, 41, 32, 0.45);
    text-decoration: none;
}



.first-page-nav-btn.disabled,
.first-page-nav-btn[aria-disabled="true"],
.first-page-nav-btn:disabled {
    color: #9fa5ab;
    border-color: #6b6f74;
    background: linear-gradient(120deg, #1c1f22 0%, #22272b 55%, #2a2f35 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: none;
    cursor: not-allowed;
    pointer-events: none;
}



.first-page-nav-btn.disabled:hover,
.first-page-nav-btn[aria-disabled="true"]:hover,
.first-page-nav-btn:disabled:hover,
.first-page-nav-btn.disabled:focus,
.first-page-nav-btn[aria-disabled="true"]:focus,
.first-page-nav-btn:disabled:focus,
.first-page-nav-btn.disabled:focus-visible,
.first-page-nav-btn[aria-disabled="true"]:focus-visible,
.first-page-nav-btn:disabled:focus-visible {
    color: #9fa5ab;
    border-color: #6b6f74;
    background: linear-gradient(120deg, #1c1f22 0%, #22272b 55%, #2a2f35 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: none;
    text-decoration: none;
    outline: none;
}



.first-page-nav-btn i {
    font-size: 1rem;
}



.first-page-nav-btn-manifesto {
    border-color: inherit;
    background: inherit;
}



.first-page-nav-btn-register {
    border-color: inherit;
    background: inherit;
}



.first-page-nav-btn-login {
    border-color: inherit;
    background: inherit;
}



/* Top segmented nav under blackboard sections. */
.exotic-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    align-items: stretch;
    width: 100%;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
}



.exotic-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0.24rem 0.45rem;
    border-top: 1px solid #708b80;
    border-bottom: 1px solid #708b80;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    color: #f2f2f2;
    background: linear-gradient(120deg, #101d18 0%, #173326 58%, #1d1d1d 100%);
    font-family: "Share Tech Mono", monospace;
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    transition: border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}



.exotic-button i {
    font-size: 0.86rem;
}



.exotic-button + .exotic-button {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}



.exotic-button:hover {
    color: #ffffff;
    border-top-color: #d5ece1;
    border-bottom-color: #d5ece1;
    background: linear-gradient(120deg, #162b22 0%, #214638 58%, #252525 100%);
    text-decoration: none;
}



.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}



.action-buttons .first-page-nav-btn,
.action-buttons .action-button {
    border-radius: 999px;
    width: auto;
    min-width: 180px;
    align-self: center;
}



@media (max-width: 768px) {
    .first-page-nav {
        flex-direction: column;
    }



    .first-page-nav-btn {
        width: min(100%, 340px);
    }



    .card-slate.p-4 {
        padding: 1rem !important;
    }



    #roadmap-profile-form .input-group .btn,
    #roadmap-login-form .input-group .btn,
    #roadmap-register-form .input-group .btn,
    #roadmap-reset-form .input-group .btn {
        min-width: 44px;
    }



    .exotic-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }



    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }



    .action-buttons .first-page-nav-btn,
    .action-buttons .action-button {
        min-width: 0;
        width: min(100%, 340px);
    }


}

@media (min-width: 992px) {
    .action-buttons .first-page-nav-btn,
    .action-buttons .action-button {
        padding-left: 2rem;
        padding-right: 2rem;
    }


}

/* Community landing page: action row + pager controls. */
.community-page .entry-actions {
    margin: 1.25rem 0;
}



.community-page .entry-actions .first-page-nav,
.community-page .entry-actions .exotic-buttons {
    margin-bottom: 0;
}



.community-page .members-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}



.community-page .members-pager-btn {
    min-width: 160px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border: 2px solid;
    clip-path: none;
    overflow: visible;
    transition: transform 0.2s ease, opacity 0.2s ease;
}



.community-page .members-pager-btn::before {
    display: none;
}



.community-page .members-pager-btn:hover {
    transform: translateY(-1px);
}



.community-page .members-pager-btn:disabled {
    opacity: 0.45;
    transform: none;
    cursor: not-allowed;
}



@media (max-width: 767px) {
    .community-page .members-pager {
        gap: 0.6rem;
    }



    .community-page .members-pager-btn {
        min-width: 0;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }


}

.first-page-cards {
    margin-top: 4px;
}



.first-page-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}



.first-page-card-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}



.first-page-card-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e8e8e8;
    background: rgba(255, 255, 255, 0.03);
}



.first-page-card-icon i {
    font-size: 1.1rem;
}



.first-page-card-title {
    margin: 0;
}



.first-page-card-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    padding: 9px 14px;
    color: #f8f8f8;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.25px;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}



.first-page-card-btn:hover {
    transform: translateY(-2px);
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-decoration: none;
}



/* Styles for individual cards within the step grid. */
.step-card {
    align-items: flex-start !important;
    text-align: left !important;
    padding: 10px !important;
}



/* Large number for the step indicator. */
.step-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    color: rgb(136, 46, 204); /* Sage Purple */
    line-height: 1;
    margin-bottom: 10px;
}



/* Layout for metadata at the top of a card (e.g., star rating, badges). */
.card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}



/* Star rating display. */
.star-rating {
    font-size: 0.7rem;
    cursor: help;
    white-space: nowrap;
}


.stars-on { color: #fd7e14; }

 /* Orange for filled stars. */
.stars-off { color: #444; }

  /* Gray for empty stars. */

/* Hint badges with a help cursor. */
.badge-hint {
    cursor: help;
    font-size: 0.7rem;
    padding: 0.4em 0.7em;
}



/*
 * BOOK & RESOURCE STYLES
 * Cards specifically for displaying book recommendations.
 */
.book-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease;
}



.book-card:hover {
    transform: translateY(-5px); /* Lifts the card on hover. */
    border-color: rgb(136, 46, 204); /* Adds a purple glow on hover. */
}



.book-card img {
    max-width: 200px; /* Constrains book cover size. */
    margin-bottom: 10px;
    border-radius: 2px; /* Book covers shouldn't have rounded corners. */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Adds depth to the book cover. */
}



.book-card button {
    margin-top: 10px;
}



/* Styling for a resource link, often associated with a book. */
.book-resource {
    background: #111;
    border: 1px solid #333;
    border-left: 4px solid rgb(136, 46, 204); /* Purple accent line. */
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}



/* Adjusts video container for mobile. */
@media screen and (max-width: 768px) {
    .responsive-video-container {
        max-width: 90vw;
        padding-bottom: 56%;
    }

    #main-img {
        width: 100%;
    }

}

/* Footer styling. */
.footer {
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
    background-color: black;
    color: rgba(255, 255, 255, 0.784);
    width: 100%;
    border-top: 1px solid #800568;
}



.footer.copyright p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Compact legal text: used by the shared footer, the roadmap and topic
   templates and the community pages for the copyright line. Without this
   rule the class is a no-op and the copyright renders at full body size. */
.x-small {
    font-size: 0.75rem;
    line-height: 1.45;
}


.btn-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;      /* Ensures a square shape */
    height: 50px;     /* Minimum recommended size for mobile */
    background-color: #f8f9fa; /* Light gray background */
    border: 1px solid #dee2e6;
    border-radius: 8px; /* Slight rounding for a modern look */
    color: #333;
    font-size: 1.5rem; /* Larger icon size */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}


.btn-square:hover {
    background-color: #e9ecef;
    color: #000;
}


/* Optional: Add active state for mobile feedback */
.btn-square:active {
    transform: scale(0.95);
}