/**
 * --------------------------------------------------------------------
 * docmd : the zero-config documentation engine.
 *
 * @package     @docmd/core (and ecosystem)
 * @website     https://docmd.io
 * @repository  https://github.com/docmd-io/docmd
 * @license     MIT
 * @copyright   Copyright (c) 2025-present docmd.io
 *
 * [docmd-source] - Please do not remove this header.
 * --------------------------------------------------------------------
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Colors - Light */
    --bg-color: #ffffff;
    --text-color: #3f3f46;
    --text-muted: #71717a;
    --text-heading: #09090b;
    --link-color: #068ad5;
    --link-color-hover: #0b76b3;
    --border-color: #e4e4e7;

    /* UI Structure */
    --border-color-codeblock: #0a0a0a17;
    --border-color-hover: #dedee0;
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-border: #e4e4e7;
    --sidebar-bg: #fafafa;
    --sidebar-text: #52525b;
    --sidebar-link-active-bg: #0c8ad51a;
    --sidebar-link-active-text: #18181b;

    /* Code Colors */
    --code-bg: #ffffff;
    --code-text: #27272a;

    /* Accents */
    --sponsor-red: #f43f5e;
    --sponsor-red-hover: #e11d48;

    /* Typography */
    --font-family-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "JetBrains Mono", SFMono-Regular, Consolas, Menlo, monospace;
    --font-size-base: 16px;
    --line-height-relaxed: 1.625;

    /* Border Radius & Shadows */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --shadow-sm: 0 2px 5px -3px #00000026;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* Sizing */
    --ui-element-size: 32px;
    --sidebar-width: 260px;
    --menubar-h: 52px;
    --header-h: 54px;

    /* Scrollbar */
    --scrollbar-thumb: #e4e4e7;
    --scrollbar-thumb-hover: #a1a1aa;

    /* Content Area */
    --content-area-bg: transparent;
    --content-area-radius: 0;
    --content-area-shadow: none;
    --content-area-border: none;

    /* Sidebar Groups */
    --sidebar-group-bg: #3352660d;
    --sidebar-group-border: transparent;
    color-scheme: light;
}

:root[data-theme=dark] {
    --bg-color: #111111;
    --text-color: #cacaca;
    --text-muted: #71717a;
    --text-heading: #fafafa;
    --link-color: #068ad5;
    --border-color: #27272a;
    --border-color-codeblock: #fafafa17;
    --header-bg: rgb(26 26 26 / 68%);
    --header-border: #27272a;
    --sidebar-bg: #161616;
    --sidebar-text: #d1d1d1;
    --sidebar-link-active-bg: #18181b;
    --sidebar-link-active-text: #ffffff;
    --code-bg: #1b1b1d;
    --code-text: #e4e4e7;
    --sponsor-red: #e11d48;
    --sponsor-red-hover: #be123c;
    --scrollbar-thumb: #27272a;
    --scrollbar-thumb-hover: #52525b;
    color-scheme: dark;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-thumb:active {
    background-color: var(--text-color) !important;
}

.sidebar::-webkit-scrollbar-thumb,
.toc-list::-webkit-scrollbar-thumb,
.docmd-search-results::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb,
.table-wrapper::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 10px;
}

.sidebar:hover::-webkit-scrollbar-thumb,
.toc-list:hover::-webkit-scrollbar-thumb,
.docmd-search-results:hover::-webkit-scrollbar-thumb,
pre:hover::-webkit-scrollbar-thumb,
.table-wrapper:hover::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
}

.sidebar,
.toc-list,
.docmd-search-results,
pre,
.table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    transition: scrollbar-color 0.2s ease;
}

.sidebar:hover,
.toc-list:hover,
.docmd-search-results:hover,
pre:hover,
.table-wrapper:hover {
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 10px;
}

body {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    line-height: var(--line-height-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code,
pre {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    background-color: var(--code-bg);
    border-radius: var(--radius-md);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-sans);
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.25;
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-top: 0;
}

h2 {
    font-size: 1.875rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-2);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-color-hover);
    text-decoration: underline;
}

a:any-link {
    text-decoration: none;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--bg-color);
    color: var(--link-color);
    padding: 8px;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: visible;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 100;
    transition: transform 0.3s ease, visibility 0.3s ease;
}

.sidebar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    padding: var(--space-2);
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0
}

.sidebar nav li a,
.sidebar nav li .nav-label {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.4;
}

.sidebar nav li.nav-group {
    border-radius: 6px;
    background-color: var(--sidebar-group-bg);
    border: 1px solid var(--sidebar-group-border);
}

.sidebar nav li.collapsible {
    cursor: pointer;
}

.sidebar nav li>a.active {
    color: var(--link-color);
    font-weight: 600;
    background-color: var(--sidebar-link-active-bg);
}

.sidebar nav li.active-parent>a {
    color: var(--link-color);
    font-weight: 600;
    background-color: transparent;
}

.sidebar nav li.active-parent>a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background-color: var(--border-color);
    opacity: 1;
}

.sidebar nav li .nav-label {
    color: var(--text-color);
    font-weight: 600;
}

.sidebar nav .submenu {
    display: none;
    padding-left: .25em;
    border-left: 1px solid var(--link-color);
    margin-left: .85em;
}

.sidebar nav li[aria-expanded="true"]>.submenu,
.sidebar nav li.expanded>.submenu {
    display: block !important;
}

.collapse-icon {
    transition: transform 0.2s ease;
}

.sidebar nav li[aria-expanded="true"]>a .collapse-icon,
.sidebar nav li.expanded>a .collapse-icon,
.sidebar nav li[aria-expanded="true"]>.nav-label .collapse-icon,
.sidebar nav li.expanded>.nav-label .collapse-icon {
    transform: rotate(90deg);
}

.collapse-icon-wrapper {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

span.collapse-icon-wrapper .collapse-icon {
    margin: 0;
    vertical-align: 0;
    height: 1.5em;
}

.copy-code-button:hover,
.docmd-tabs-nav-item:hover,
.sidebar nav li a.active,
.sidebar nav li a:hover,
.theme-toggle-button:hover {
    background-color: var(--sidebar-link-active-bg);
}

.sidebar nav li a.active {
    font-weight: 600;
    color: var(--link-color)
}

.copy-code-button:hover,
.code-wrapper:hover>.copy-code-button {
    opacity: .8;
}

.sidebar-toggle-button {
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: left 0.3s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    z-index: 200;
}

.sidebar-toggle-button:hover {
    color: var(--text-color);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
}

.sidebar-toggle-button .lucide-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: currentColor;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .sidebar-toggle-button .lucide-icon {
    transform: rotate(180deg);
}

body.sidebar-collapsible .sidebar-toggle-button {
    display: inline-flex;
}

body.sidebar-collapsed .sidebar-toggle-button {
    justify-content: right;
    padding: 0;
}

body.sidebar-collapsible .header-titles-wrapper {
    transition: margin-left 0.3s ease;
}

.docmd-container.steps-reset .docmd-container.steps-reset ol.steps-list>li.step-item::before,
.docmd-container.steps-reset ol.steps-list>li.step-item::before,
.docmd-container.steps-reset ol.steps-list[start]>li.step-item::before {
    content: counter(list-counter) ".";
    font-weight: 700;
    margin-right: .5em;
    color: var(--accent-color, #007acc)
}

.docmd-tab-pane.active,
.logo-link img,
.logo-link img.logo-light,
.tab-panel.active,
.theme-toggle-button .icon-sun,
html[data-theme=dark] .logo-link img.logo-dark,
html[data-theme=dark] .theme-toggle-button .icon-moon,
img {
    display: block
}

.docmd-heading {
    position: relative;
    display: flex;
    align-items: center;
    scroll-margin-top: calc(var(--sticky-top-offset) + var(--space-8));
}

.heading-anchor {
    position: absolute;
    left: calc(-1 * var(--space-8));
    width: var(--space-6);
    height: var(--space-6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.heading-anchor svg {
    width: 1.1em;
    height: 1.1em;
}

.docmd-heading:hover .heading-anchor,
.heading-anchor:focus {
    opacity: 1;
}

.heading-anchor:hover {
    color: var(--link-color);
}

.toc-level-2 {
    margin-left: 0;
}

.main-content-wrapper {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.header-left,
.header-right,
.page-header {
    align-items: center;
    display: flex
}

.page-header {
    justify-content: space-between;
    padding: var(--space-3);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: var(--header-top-offset);
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    gap: 0.5rem
}

@media (min-width: 769px) {
    body.sidebar-collapsible .page-header {
        z-index: 150;
    }
}

.header-titles-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.docmd-breadcrumbs {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    display: block;
}

.docmd-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.docmd-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.docmd-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.docmd-breadcrumbs a:hover {
    color: var(--link-color);
}

.docmd-breadcrumbs .breadcrumb-separator {
    margin-left: 0.25rem;
    opacity: 0.5;
    display: inline-flex;
    align-items: center;
}

.docmd-breadcrumbs .breadcrumb-separator .lucide-icon {
    width: 0.8em;
    height: 0.8em;
}

.docmd-breadcrumbs .active {
    color: var(--text-color);
    font-weight: 500;
}

.page-header .header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.header-left {
    gap: var(--space-4);
    margin-left: 1rem
}

.header-right {
    gap: var(--space-2);
    margin-right: 1rem;
}

:root {
    --menubar-h: 52px;
    --header-h: 54px;

    --fixed-top-offset: 0px;
    --header-top-offset: 0px;
    --sticky-top-offset: 0px;

    --menubar-bg: var(--bg-color);
    --menubar-border: var(--border-color);
    --menubar-text: var(--text-color);
    --menubar-link-hover-bg: var(--sidebar-link-active-bg);
}

body.has-menubar-top {
    --fixed-top-offset: var(--menubar-h);
    --header-top-offset: var(--menubar-h);
    --sticky-top-offset: var(--menubar-h);
    padding-top: var(--menubar-h);
}

body:not(.no-header) {
    --sticky-top-offset: var(--header-h);
}

body.has-menubar-top:not(.no-header) {
    --sticky-top-offset: calc(var(--menubar-h) + var(--header-h));
}

body.has-menubar-header {
    --header-top-offset: var(--menubar-h);
    --sticky-top-offset: var(--menubar-h);
}

body.has-menubar-header:not(.no-header) {
    --sticky-top-offset: calc(var(--menubar-h) + var(--header-h));
}

html {
    scroll-padding-top: calc(var(--sticky-top-offset) + 1.5rem);
}

.docmd-menubar {
    z-index: 200;
    height: var(--menubar-h);
    background-color: var(--menubar-bg);
    border-bottom: 1px solid var(--menubar-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
    box-sizing: border-box;
}

.menubar-options {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--menubar-border);
    display: flex;
    align-items: center;
}

body.has-menubar-top .docmd-menubar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

body.has-menubar-header .docmd-menubar {
    position: sticky;
    top: 0;
    z-index: 250;
}

.menubar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--space-6);
    gap: var(--space-4);
}

.menubar-left,
.menubar-right {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

.menubar-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

.menubar-brand:hover {
    opacity: 0.8;
    text-decoration: none;
}

.menubar-brand-text {
    white-space: nowrap;
}

.menubar-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--menubar-text);
    text-decoration: none;
    white-space: nowrap;
}

.menubar-link:hover {
    background-color: var(--menubar-link-hover-bg);
    color: var(--text-heading);
    text-decoration: none;
}

.menubar-icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.menubar-ext-icon {
    width: 0.75em;
    height: 0.75em;
    opacity: 0.6;
    flex-shrink: 0;
}

.menubar-dropdown {
    position: relative;
}

.menubar-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--menubar-text);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.menubar-dropdown-toggle:hover {
    background-color: var(--menubar-link-hover-bg);
    color: var(--text-heading);
}

.menubar-chevron {
    width: 0.85em;
    height: 0.85em;
    opacity: 0.7;
}

.menubar-dropdown:hover .menubar-chevron,
.menubar-dropdown:focus-within .menubar-chevron {
    transform: rotate(180deg);
}

.menubar-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
}

.menubar-dropdown-menu.menubar-dropdown-right {
    left: auto;
    right: 0;
}

.menubar-dropdown:hover .menubar-dropdown-menu,
.menubar-dropdown:focus-within .menubar-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menubar-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
}

.menubar-dropdown-menu li a:hover {
    background-color: var(--sidebar-link-active-bg);
    color: var(--text-heading);
}

.sidebar {
    top: var(--fixed-top-offset);
    height: calc(100vh - var(--fixed-top-offset));
}

.toc-sidebar {
    position: sticky;
    top: calc(var(--sticky-top-offset) + 2rem);
    width: 240px;
    flex-shrink: 0;
    margin: 1rem 0;
}

.docmd-options-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.docmd-options-menu .theme-toggle-button,
.docmd-options-menu .sponsor-link-button,
.docmd-options-menu .docmd-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--ui-element-size);
    padding: 0;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.docmd-options-menu .theme-toggle-button,
.docmd-options-menu .sponsor-link-button {
    width: var(--ui-element-size);
}

.docmd-options-menu .sponsor-link-button {
    color: var(--sponsor-red);
    border-color: var(--border-color);
}

.docmd-options-menu .sponsor-link-button:hover {
    background-color: var(--sponsor-red);
    color: white;
    border-color: var(--sponsor-red);
}

.docmd-options-menu .docmd-search-trigger {
    width: auto;
    padding: 0 0.75rem;
    gap: 0.5rem;
    background-color: var(--sidebar-bg);
}

.docmd-options-menu button:hover:not(.sponsor-link-button) {
    background-color: var(--sidebar-link-active-bg);
    color: var(--text-heading);
    border-color: var(--border-color-hover);
}

.docmd-search-trigger .search-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.docmd-search-trigger .search-keys {
    display: flex;
    gap: 0.25rem;
}

.docmd-kbd {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family-mono);
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

.docmd-options-menu .lucide-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.sidebar-options-wrapper {
    padding: .25rem 0;
}

.sidebar-options-wrapper.mt-auto {
    margin-top: auto;
    padding: .5rem 0 0;
    border-top: 1px solid var(--border-color);
}

.sidebar-top-group,
.sidebar-bottom-group.mt-auto {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem;
    position: relative;
}

.sidebar-top-group:empty {
    display: none;
}

.sidebar-bottom-group.mt-auto {
    margin-top: auto;
}

.sidebar-bottom-group:empty {
    display: none;
}

.docmd-version-dropdown,
.docmd-language-switcher,
.docmd-project-switcher {
    width: auto;
    position: relative;
}

.docmd-language-switcher {
    margin-top: 0;
}

.docmd-embed {
    margin: 1.5rem auto;
    border-radius: var(--docmd-radius-lg, 12px);
    max-width: 100%;
    display: block;
}

iframe.docmd-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none !important;
}

iframe.docmd-embed[data-short="true"] {
    aspect-ratio: 9 / 16;
    max-width: 400px;
}

blockquote.docmd-embed {
    width: 100%;
    border: none !important;
    display: flex;
    justify-content: center;
}

.docmd-embed-fallback {
    margin: 1.5rem 0;
    display: flex;
}

/* Shared Pill Toggle */
.version-dropdown-toggle,
.language-switcher-toggle,
.project-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 1.75rem;
    padding: 0 0.65rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-heading);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.version-dropdown-toggle:hover,
.language-switcher-toggle:hover,
.project-switcher-toggle:hover {
    border-color: var(--text-muted);
}

/* Shared Dropdown Menu */
.version-dropdown-menu,
.language-switcher-menu,
.project-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    min-width: max-content;
    max-width: calc(var(--sidebar-width, 260px) - 1.5rem);
    margin: 0;
    padding: 0.35rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    list-style: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.docmd-version-dropdown.open .version-dropdown-menu,
.docmd-language-switcher.open .language-switcher-menu,
.docmd-project-switcher.open .project-switcher-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Shared Dropdown Items */
.version-dropdown-item,
.language-switcher-item,
.project-switcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    color: var(--text-color);
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    margin: 0.25em;
}

.version-dropdown-item,
.language-switcher-item {
    white-space: nowrap;
}

.project-switcher-item {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.version-dropdown-item:hover,
.language-switcher-item:hover,
.project-switcher-item:hover {
    background-color: var(--sidebar-link-active-bg);
    color: var(--text-heading);
    text-decoration: none;
}

.version-dropdown-item.active,
.language-switcher-item.active,
.project-switcher-item.active {
    font-weight: 600;
    color: var(--link-color);
    background-color: var(--sidebar-link-active-bg);
}

.version-check,
.language-check {
    width: 1rem;
    height: 1rem;
}

.version-chevron,
.language-chevron {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.2s ease;
}

.docmd-version-dropdown.open .version-chevron,
.docmd-language-switcher.open .language-chevron {
    transform: rotate(180deg);
}

/* Sidebar bottom overrides */
.sidebar-bottom-group .version-dropdown-menu,
.sidebar-bottom-group .language-switcher-menu,
.sidebar-bottom-group .project-switcher-menu {
    top: auto;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(5px);
}

.sidebar-bottom-group .docmd-version-dropdown.open .version-dropdown-menu,
.sidebar-bottom-group .docmd-language-switcher.open .language-switcher-menu,
.sidebar-bottom-group .docmd-project-switcher.open .project-switcher-menu {
    transform: translateX(-50%) translateY(0);
}

.sidebar-bottom-group .version-dropdown-toggle .version-chevron,
.sidebar-bottom-group .language-switcher-toggle .language-chevron,
.sidebar-bottom-group .project-switcher-toggle .project-chevron {
    transform: rotate(180deg);
}

/* Version latest badge */
.version-latest-badge {
    font-size: 0.6rem;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    background-color: var(--link-color);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: 0.15rem;
}

/* Language Switcher specifics */
.language-icon {
    width: 0.8rem;
    height: 0.8rem;
    flex-shrink: 0;
}

.language-label {
    text-align: left;
}

/* Language label visibility is controlled by template compact mode */

.language-switcher-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.language-unavailable-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background-color: var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Language Compact Mode (Options Menu) */
.language-compact {
    width: auto;
    margin-top: 0;
}

.language-compact .language-switcher-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ui-element-size);
    height: var(--ui-element-size);
    padding: 0;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.language-compact .language-switcher-toggle:hover {
    background-color: var(--sidebar-link-active-bg);
    color: var(--text-heading);
    border-color: var(--border-color-hover);
}

.language-compact .language-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.language-compact .language-switcher-menu {
    min-width: 140px;
    left: auto;
    right: 0;
    transform: translateY(-5px);
}

.language-compact.open .language-switcher-menu {
    transform: translateY(0);
}

.options-menu-language {
    position: relative;
    display: inline-flex;
}

.card .card-title {
    border-bottom: 1px solid var(--border-color)
}

.content-theme-cover {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.content-area {
    padding: 1rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
}

pre {
    color: var(--code-text);
    padding: var(--space-4);
    overflow-x: auto;
    position: relative;
    margin: var(--space-6) 0;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color-codeblock);
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    white-space: pre;
    line-height: 1.5;
    font-size: .85em;
}

.docmd-code-block-wrapper {
    margin: var(--space-6) 0;
    border: 1px solid var(--border-color-codeblock);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--code-bg);
}

.docmd-code-block-wrapper pre {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.docmd-code-block-header {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background-color: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid var(--border-color-codeblock);
}

:root[data-theme=dark] .docmd-code-block-header {
    background-color: rgba(255, 255, 255, 0.04);
}

.docmd-code-block-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--font-family-sans);
}



pre code {
    background-color: transparent;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
    border: none;
}

.table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: var(--space-6) 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

th {
    text-align: left;
    font-weight: 600;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--sidebar-bg);
    color: var(--text-heading);
    white-space: nowrap;
}

td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--sidebar-link-active-bg);
}

.sidebar-header {
    flex-shrink: 0;
    text-align: center;
    padding: .5rem
}

.sidebar-header h1 {
    display: inline-block;
    font-size: 1.5em;
    margin: 0;
    padding: 0
}

.logo-link img {
    max-height: 2.5rem;
    width: auto;
    margin: 0 auto
}

.docmd-tab-pane,
.logo-link img.logo-dark,
.tab-panel,
.theme-toggle-button .icon-moon,
html[data-theme=dark] .logo-link img.logo-light,
html[data-theme=dark] .theme-toggle-button .icon-sun {
    display: none
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
}

.sidebar-nav li.collapsible>.nav-label:hover {
    background-color: var(--sidebar-link-active-bg);
}

.sidebar-nav .lucide-icon {
    width: 1em;
    height: 1em;
    margin-right: .5em;
    vertical-align: -.15em;
    stroke-width: 2
}

.sidebar-nav .nav-external-icon {
    width: 1em;
    height: 1.5em;
    float: right;
    margin-left: auto;
    opacity: .5;
    display: inline-flex
}

.next-page,
.prev-page,
.step::before {
    color: var(--link-color);
    display: flex
}

.callout .callout-content> :first-child,
.card .card-content> :first-child,
.docmd-container> :first-child,
.step-content> :first-child,
.step-title {
    margin-top: 0;
}

.theme-toggle-button .lucide-icon {
    width: 1.2em;
    height: 1.2em
}

.docmd-container {
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;

}

.callout {
    border: 1px solid transparent;
    background-color: var(--code-bg);
}

.callout-title {
    font-weight: 700;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.callout-info {
    border: 1px solid #3498db;
    background-color: rgba(52, 152, 219, 0.08);
}

.callout-warning {
    border: 1px solid #f39c12;
    background-color: rgba(243, 156, 18, 0.08);
}

.callout-success,
.callout-tip {
    border: 1px solid #2ecc7178;
    background-color: rgba(46, 204, 113, 0.08);
}

.callout-danger {
    border: 1px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.card {
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card .card-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-6)) var(--space-4);
    padding: var(--space-3) var(--space-6);
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
}

.docmd-container.steps {
    position: relative;
    padding-left: 3rem;
    border: medium;
    background: 0 0;
    box-shadow: none
}

.docmd-container.steps::before {
    content: "";
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 2.5rem;
    width: 2px;
    background-color: var(--border-color)
}

.step {
    position: relative;
    padding-bottom: 1.5rem
}

.step:last-child {
    padding-bottom: 0
}

.step::before {
    content: attr(data-step);
    position: absolute;
    left: -3rem;
    top: .1rem;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    z-index: 1
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: .5rem
}

.docmd-container.steps-reset {
    counter-reset: step-counter 0
}

.docmd-container.steps-reset ol.steps-list {
    counter-reset: list-counter 0;
    list-style: none
}

.docmd-container.steps-reset ol.steps-list>li.step-item {
    counter-increment: list-counter 1;
    position: relative;
    padding-left: 0;
    margin-bottom: 2.5rem
}

.docmd-container.steps-reset ol.steps-list>li.step-item::before {
    font-size: 2rem
}

.docmd-container.steps-reset .docmd-container.steps-reset ol.steps-list,
.docmd-container.steps-reset ol.steps-list[start] {
    counter-reset: list-counter 0
}

.docmd-container.steps-reset .docmd-container.steps-reset ol.steps-list>li.step-item,
.docmd-container.steps-reset ol.steps-list[start]>li.step-item {
    counter-increment: list-counter 1
}

.docmd-container.steps-reset ol:not(.steps-list)::before,
.docmd-container.steps-reset ol:not(.steps-list)>li::before,
.docmd-container.steps-reset ul::before,
.docmd-container.steps-reset ul>li::before {
    width: .75rem;
    height: .75rem;
    left: -1.5rem;
    top: .5rem;
    content: "" !important
}

.mermaid {
    margin: var(--space-6) 0;
    text-align: center;
}

.docmd-mermaid-container {
    position: relative;
    /* Anchor for controls */
    margin: var(--space-6) 0;
    padding: var(--space-6) var(--space-4);
    border: 1px solid var(--border-color-codeblock);
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: var(--bg-color);
}

.mermaid-wrapper {
    position: relative;
    overflow: hidden;
    /* Hide scrollbars, we use drag-to-pan */
    cursor: grab;
}

.mermaid-wrapper:active {
    cursor: grabbing;
}

.mermaid-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mermaid-wrapper:hover .mermaid-controls,
.mermaid-wrapper.mermaid-fullscreen .mermaid-controls {
    opacity: 1;
}

.mermaid-wrapper.mermaid-fullscreen {
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: none;
}

.docmd-mermaid-container svg {
    max-width: none;
    /* Let SVG size itself, wrapper will scroll */
    display: block;
    margin: 0 auto;
}



.mermaid-error {
    color: #e74c3c;
    padding: 1rem;
    margin: 0;
    background-color: #e74c3c12;
    border-left-width: 4px;
    border-left-style: solid;
    border-left-color: #e74c3c;
    border-radius: 4px;
    font-size: .9rem
}

pre.mermaid {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: medium;
    display: none
}

.docmd-container.collapsible {
    padding: 0;
    background-color: var(--card-bg, var(--bg-color));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: border-color .2s
}

.docmd-container.collapsible[open] {
    border-color: var(--link-color)
}

.collapsible-summary {
    list-style: none;
    padding: .75rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    background-color: var(--sidebar-bg);
    transition: background-color .2s
}

.collapsible-summary:hover {
    background-color: var(--sidebar-link-active-bg)
}

.collapsible-summary::-webkit-details-marker {
    display: none
}

.collapsible-arrow svg {
    width: 1.2em;
    height: 1.2em;
    transition: transform .2s;
    opacity: .7
}

details[open]>.collapsible-summary .collapsible-arrow svg {
    transform: rotate(180deg)
}

.collapsible-content {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color)
}

.docmd-container.changelog-timeline {
    border: medium;
    background: 0 0;
    padding: 0;
    margin-top: 2rem;
    box-shadow: none
}

.changelog-entry {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative
}

.changelog-meta {
    text-align: right;
    padding-top: .5rem
}

.changelog-date {
    display: inline-block;
    background-color: var(--sidebar-bg);
    color: var(--accent-color, var(--link-color));
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
    font-family: var(--font-family-mono)
}

.changelog-body {
    border-left: 1px solid var(--border-color);
    padding-left: 2.5rem;
    padding-bottom: .5rem;
}

.changelog-body> :first-child {
    margin-top: 0
}

:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px
}

:focus:not(:focus-visible) {
    outline: none !important;
}

.sidebar nav li a:focus-visible {
    background-color: var(--sidebar-link-active-bg);
    outline: 2px solid var(--link-color);
    outline-offset: -2px
}

.theme-toggle-button:focus-visible {
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px var(--link-color)
}

.page-footer,
.page-navigation {
    border-top: 1px solid var(--border-color)
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem
}

.next-page,
.prev-page {
    align-items: center;
    text-decoration: none;
    padding: .75rem;
    border-radius: 6px;
    transition: background-color .2s;
    width: 48%;
    max-width: 48%
}

.next-page:hover,
.prev-page:hover {
    background-color: #0000000d;
    text-decoration: none
}

:root[data-theme=dark] .next-page:hover,
:root[data-theme=dark] .prev-page:hover {
    background-color: #ffffff0d
}

.prev-page {
    justify-content: flex-start
}

.next-page {
    justify-content: flex-end;
    text-align: right
}

.next-page-placeholder,
.prev-page-placeholder {
    width: 48%
}

.next-page span,
.prev-page span {
    display: flex;
    flex-direction: column
}

.next-page small,
.prev-page small {
    font-size: .8rem;
    opacity: .8;
    margin-bottom: .25rem
}

.next-page strong,
.prev-page strong {
    font-weight: 500
}

.page-nav-icon {
    width: 1.2rem;
    height: 1.2rem
}

.prev-page .page-nav-icon {
    margin-right: .75rem
}

.next-page .page-nav-icon {
    margin-left: .75rem
}

.content-layout {
    display: flex;
    gap: 2rem;
    width: 100%;
    align-items: flex-start
}

.main-content {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
}

.toc-container {
    margin: 0;
    padding: 0;
    border: medium;
    background-color: transparent
}

.docmd-container figure img,
.toc-title {
    margin-bottom: .5rem
}

.toc-list {
    scrollbar-width: thin;
    list-style: none;
    padding: .5em .25em;
    margin: 0;
    overflow-y: auto
}

.toc-item {
    margin-bottom: .25rem;
    line-height: 1.4
}

.toc-link {
    display: block;
    padding: .25rem 1rem;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.toc-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface)
}

.toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background-color: var(--primary-light)
}

.toc-level-3 {
    padding-left: 2rem
}

.toc-level-4 {
    padding-left: 3rem
}

:root[data-theme="dark"] .toc-link.active {
    background-color: rgba(59, 130, 246, 0.1)
}

.toc-title {
    font-size: .85em;
    display: contents;
    text-transform: uppercase;
    margin: 0;
    cursor: pointer;
    border-bottom-width: 0;
    border-bottom-style: none;
    border-bottom-color: currentcolor;
    padding-bottom: 0
}

.docmd-tabs,
img {
    margin: 1.5rem 0
}

img {
    max-width: 100%;
    height: auto
}

img.align-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem
}

img.align-center {
    margin-left: auto;
    margin-right: auto
}

img.align-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem
}

img.size-small {
    max-width: 300px
}

img.size-medium {
    max-width: 500px
}

img.size-large {
    max-width: 800px
}

img.with-border {
    border: 1px solid var(--image-border-color);
    padding: 4px
}

img.with-shadow {
    box-shadow: var(--image-shadow)
}

.docmd-container figure {
    margin: 2rem 0
}

.docmd-container figcaption {
    font-size: .9rem;
    color: var(--image-caption-text);
    text-align: center;
    padding: .5rem;
    background-color: var(--image-caption-bg);
    border-radius: 0 0 4px 4px
}

.docmd-container .image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0
}

.docmd-container .image-gallery figure {
    margin: 0
}

.docmd-container .clear-float::after {
    content: "";
    display: table;
    clear: both
}

.docmd-tabs {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: #0000000d 0 1px 3px
}

.docmd-tabs-nav {
    display: flex;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    overflow: auto hidden
}

.docmd-tabs-nav-item {
    padding: .75rem 1.25rem;
    cursor: pointer;
    border-bottom-width: 3px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
    margin-bottom: -1px;
    font-weight: 500;
    color: var(--sidebar-text);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px
}

.tab-icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    stroke-width: 2px
}

.docmd-tabs-nav-item.active {
    color: var(--link-color);
    border-bottom-color: var(--link-color);
    background-color: var(--bg-color)
}

.docmd-tabs-content {
    padding: 1.5rem
}

.tabs-container {
    margin: 1rem 0;
    border: 1px solid #e1e5e9;
    border-radius: .375rem
}

.tab-navigation {
    display: flex;
    background-color: #f8f9fa;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e1e5e9;
    border-radius: .375rem .375rem 0 0
}

.tab-button {
    padding: .75rem 1rem;
    border-width: medium medium 2px;
    border-style: none none solid;
    border-color: currentcolor currentcolor transparent;
    border-image: none;
    background: 0 0;
    cursor: pointer;
    transition: .2s
}

.tab-button:hover {
    background-color: #e9ecef
}

.tab-button.active {
    border-bottom-color: #007bff;
    background-color: #fff
}

.tab-content {
    padding: 1rem
}

.docmd-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--lightbox-bg);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column
}

.copy-code-button svg {
    width: 1rem;
    height: 1rem
}

.docmd-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center
}

.docmd-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    margin: 0 auto;
    box-shadow: #0000004d 0 0 20px
}

.docmd-lightbox-caption {
    color: var(--lightbox-text);
    padding: 1rem;
    font-size: 1rem;
    max-width: 100%
}

.docmd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--lightbox-text);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000
}

.docmd-lightbox-close:hover {
    color: #ddd
}

a.docmd-button {
    color: #fff;
    text-decoration: none
}

.docmd-container .image-gallery img,
img.lightbox {
    cursor: zoom-in
}

.docmd-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: .6rem 1.2rem;
    margin: .5rem;
    border-radius: 6px;
    background-color: var(--link-color);
    font-weight: 500;
    transition: background-color .2s, transform .2s;
    border: medium;
    cursor: pointer
}

.docmd-button:hover {
    text-decoration: none;
    filter: brightness(110%);
    transform: translateY(-1px);
}

.docmd-button .button-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: middle;
}

.docmd-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15em 0.5em;
    border-radius: 9999px;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid var(--docmd-border);
    background-color: var(--docmd-surface);
    color: var(--docmd-text);
    vertical-align: middle;
    margin: 0 0.2em;
    transition: all 0.2s;
    /* User-defined colors via style attribute if color is passed */
}

a.docmd-tag-link .docmd-tag:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.docmd-tag .tag-icon {
    display: inline-block;
    margin-right: 5px;
}

.callout-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.callout-icon-heading,
.card-icon-heading,
.collapsible-icon-heading {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    vertical-align: middle;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.copy-code-button {
    position: absolute;
    top: .75rem;
    right: .75rem;
    padding: .5rem;
    background-color: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease-in-out, background-color .2s;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto
}

.copy-code-button.copied {
    color: #10b981;
    opacity: 1
}

hr {
    border-top: 1px solid var(--border-color);
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    margin: 1em;
}

.edit-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-light);
    text-decoration: none;
}

.edit-link:hover {
    color: var(--link-color)
}

.edit-link svg {
    width: 1em;
    height: 1em
}

.docmd-search-modal {
    position: fixed;
    inset: 0;
    background-color: #00000080;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh
}

.docmd-search-box {
    width: 100%;
    max-width: 600px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: .2s ease-out searchSlideIn
}

@keyframes searchSlideIn {
    0% {
        opacity: 0;
        transform: scale(.98) translateY(10px)
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

.docmd-search-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem
}

.docmd-search-header svg {
    color: var(--link-color)
}

#docmd-search-input {
    flex: 1 1 0;
    border: medium;
    background: 0 0;
    font-size: 1.1rem;
    color: var(--text-color);
    outline: currentcolor
}

.docmd-search-close {
    background: 0 0;
    border: 0;
    cursor: pointer;
    padding: 0;
    display: flex;
    font-size: 1.25em
}

.docmd-search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: .5rem
}

.search-result-item {
    display: block;
    padding: .75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 2px;
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: transparent
}

.search-result-item.selected,
.search-result-item:focus,
.search-result-item:hover {
    background-color: var(--sidebar-bg);
    border-left-color: var(--link-color);
    text-decoration: none;
    cursor: pointer
}

.search-result-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .2rem;
    color: var(--link-color)
}

.search-result-version {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1.4;
}

.search-result-preview {
    font-size: .8rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.search-error,
.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted, #666)
}

.search-error,
.search-initial,
.search-no-results {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted, #666);
    font-size: .95rem
}

.search-result-preview mark {
    background-color: #ffeb3b66;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px
}

:root[data-theme=dark] .search-result-preview mark {
    background-color: #ffeb3b40;
    color: #fff
}

.docmd-search-footer {
    padding: .75rem 1.5rem;
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    font-size: .75rem;
    color: var(--text-muted, #888);
    display: flex;
    gap: 1rem;
    justify-content: flex-end
}

.sidebar-menu-button {
    font-size: 1.5em
}

.mobile-view {
    display: none;
    cursor: pointer
}

.float-left {
    float: left
}

.float-right {
    float: right
}

.footer-complete {
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem;
    margin-top: auto;
}

.footer-complete-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
}

.footer-brand {
    flex: 1 1 300px;
    max-width: 400px;
    text-align: left;
}

.footer-brand .logo-link {
    display: block;
    overflow: hidden;
    margin: 0 0 1rem 0;
    width: fit-content;
}

.footer-brand .logo-link img {
    max-height: 28px;
    width: auto;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    justify-content: flex-end;
    flex: 2 1 auto;
}

.footer-column {
    min-width: 140px;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 0.75rem;
    opacity: 0.9;
}

.footer-column-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-column ul a:hover {
    color: var(--link-color);
}

.footer-complete-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-footer {
    text-align: center;
    padding: 20px 30px;
    margin-top: auto;
    font-size: .9em;
    color: var(--text-color);
    background-color: var(--sidebar-bg)
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    width: 100%
}

.user-footer {
    text-align: left
}

.branding-footer {
    text-align: right;
    opacity: .9;
    font-weight: 500
}

.branding-footer svg {
    color: #fb3a3a
}

.branding-footer a,
.page-footer a {
    color: var(--link-color);
    text-decoration: none
}

.page-footer-actions {
    margin-top: 1.5rem;
    padding: 1.5rem .5em .75em;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    font-size: .875rem
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

@media (max-width: 1024px) {
    .content-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 0
    }

    .toc-sidebar {
        width: 100%;
        max-height: initial;
        position: static
    }

    .toc-container {
        background-color: var(--sidebar-bg);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        height: 2.25em;
        overflow: hidden
    }

    .toc-container .toc-title {
        padding: .5rem 1rem;
        display: block
    }

    .toc-container .mobile-view {
        display: inline-flex;
        padding: .15rem 0
    }

    .mobile-expanded {
        height: auto !important;
        overflow: auto
    }

    .toc-container.mobile-expanded .toc-list {
        height: auto;
        max-height: auto
    }

    .toc-menu-button svg {
        transition: transform .3s
    }

    .toc-container.mobile-expanded .toc-menu-button svg {
        transform: rotate(180deg)
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column
    }

    .sidebar {
        width: 100%;
        height: 3rem;
        position: relative;
        top: 0;
        border-right-width: medium;
        border-right-style: none;
        border-right-color: currentcolor;
        border-bottom: 1px solid var(--border-color);
        z-index: 100
    }

    .sidebar-header {
        border-bottom-width: 0;
        border-bottom-style: none;
        border-bottom-color: currentcolor;
        padding-bottom: 0;
        margin-bottom: 0;
        text-align: left;
        box-shadow: none;
    }

    .sidebar-menu-button {
        font-size: 1.5em
    }

    .sidebar #theme-toggle-button,
    .sidebar-nav,
    .sidebar-top-group,
    .sidebar-bottom-group {
        max-height: 0;
        display: none;
        opacity: 0;
        transition: max-height .3s ease-out, opacity .3s ease-out, margin .3s;
        margin-top: 0
    }

    .sidebar.mobile-expanded #theme-toggle-button,
    .sidebar.mobile-expanded .sidebar-nav {
        max-height: initial;
        opacity: 1;
        display: block
    }



    .sidebar.mobile-expanded .sidebar-top-group,
    .sidebar.mobile-expanded .sidebar-bottom-group {
        max-height: initial;
        opacity: 1;
        display: flex
    }

    .sidebar-toggle-button {
        display: none !important
    }

    .logo-link img {
        float: left
    }

    .mobile-view {
        display: inline-flex;
        padding: 4px
    }

    .main-content-wrapper {
        margin-left: 0
    }

    .page-navigation {
        flex-direction: column;
        gap: 1rem
    }

    .next-page,
    .next-page-placeholder,
    .prev-page,
    .prev-page-placeholder {
        width: 100%;
        max-width: 100%
    }

    img.align-left,
    img.align-right {
        float: none;
        margin-left: auto;
        margin-right: auto
    }

    .docmd-container .image-gallery {
        grid-template-columns: 1fr
    }

    .docmd-search-modal {
        padding-top: 0;
        background-color: var(--bg-color);
        align-items: flex-start
    }

    .docmd-search-box {
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        border: medium;
        box-shadow: none
    }

    .docmd-search-header {
        padding: 1rem
    }

    #docmd-search-input {
        font-size: 1rem
    }

    .docmd-search-footer {
        display: none
    }

    .docmd-search-results {
        max-height: none;
        flex: 1 1 0
    }

    .changelog-entry {
        grid-template-columns: 1fr;
        gap: 1rem
    }

    .changelog-meta {
        text-align: left;
        padding-top: 0
    }

    .changelog-body {
        border-left: 2px solid var(--border-color);
        padding-left: 1.5rem;
        margin-left: .5rem
    }

    /* Make menubar sticky at the top of the viewport on mobile */
    body.has-menubar-top .docmd-menubar,
    body.has-menubar-header .docmd-menubar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        box-shadow: none;
        z-index: 250 !important;
    }

    /* Disable page-header stickiness on mobile when menubar is enabled */
    body.has-menubar-top .page-header,
    body.has-menubar-header .page-header {
        position: relative !important;
        top: auto !important;
    }

    .heading-anchor {
        position: static;
        margin-right: var(--space-2);
        opacity: 1;
        color: var(--border-color);
    }

    .content-area {
        padding: var(--space-4);
    }

    .docmd-breadcrumbs {
        display: none;
    }

    .docmd-menubar {
        padding: 0;
    }

    .menubar-brand-text {
        display: none;
    }

    .menubar-inner {
        padding: 0 var(--space-3);
        gap: var(--space-2);
    }

    .menubar-link,
    .menubar-dropdown-toggle {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }

    .header-left,
    .header-right {
        margin-left: 0;
        margin-right: 0;
    }

    .search-keys,
    .search-label {
        display: none
    }

    .footer-complete-top {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
        flex: 1;
    }

    .footer-brand .logo-link {
        margin: 0 auto
    }

    .footer-columns {
        justify-content: center;
        gap: 2rem;
        width: 100%;
    }

    .footer-column {
        width: 100%;
    }

    .footer-complete-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-content,
    .page-navigation {
        flex-direction: column;
        gap: 1rem
    }

    .branding-footer,
    .user-footer {
        text-align: center
    }
}

.sidebar nav li {
    margin: .25em;
}

.callout-content p {
    margin: 0;
}

.edit-link:hover {
    text-decoration: underline;
}

code {
    padding: .15em .5em;
}

.docmd-container.grids {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin: var(--space-4) 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    padding: 0;

}

.docmd-container.grid-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
    background: transparent;
    padding: var(--space-1);
    border: 0;
    box-shadow: none;
    margin-bottom: 0;

}

ul.contains-task-list {
    list-style: none !important;
    padding-left: 0.5em;
}

ul.contains-task-list>li::marker {
    content: none !important;
    display: none !important;
}

.task-list-item-checkbox {
    margin-top: .25em;
}

/**
 * Hero Container (2.0)
 * Handles basic, split, and slider layouts.
 */
.docmd-hero {
    position: relative;
    width: 100%;
    margin: var(--space-12) 0;
    padding: var(--space-12) 0;
    display: flex;
    flex-direction: column;
}

.docmd-hero.hero-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--link-color) 0%, transparent 70%);
    opacity: 0.08;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

/* Default / Banner Layout */
.docmd-hero.hero-banner {
    text-align: center;
    align-items: center;
}

.docmd-hero.hero-banner .hero-content {
    max-width: 800px;
}

/* Split Layout */
.docmd-hero.hero-split {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-12);
    text-align: left;
}

.docmd-hero.hero-split .hero-content {
    flex: 1 1 0;
    min-width: 0;
}

.docmd-hero.hero-split .hero-side {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Slider Layout */
.docmd-hero.hero-slider {
    overflow: hidden;
    position: relative;
}

.hero-slider-track {
    display: flex;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.hero-slider-track::-webkit-scrollbar {
    display: none;
}

.hero-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: var(--space-8) var(--space-4);
    box-sizing: border-box;
    text-align: center;
}

.hero-slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.hero-slider-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.hero-slider-btn:hover {
    background: var(--link-color);
    border-color: var(--link-color);
    color: #fff;
}

.hero-slider-dots {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}

.hero-slider-dot.active {
    background: var(--link-color);
    transform: scale(1.3);
}

/* Typography & Elements */
.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -0.05em;
    margin-bottom: var(--space-4);
}

.hero-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: var(--space-6);
}

.hero-side img,
.hero-side video,
.hero-side .docmd-embed {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 960px) {
    .docmd-hero.hero-split {
        flex-direction: column;
        text-align: center;
        gap: var(--space-8);
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

/* Workspace Switcher */
.project-icon {
    width: 0.9rem;
    height: 0.9rem;
    color: var(--link-color);
}

.project-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chevron {
    width: 0.75rem;
    height: 0.75rem;
    opacity: 0.5;
}

.project-prefix {
    font-size: 0.75rem;
    opacity: 0.5;
    line-height: 1em
}

.project-check {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
}

/* Compact mode (for options menu) */
.project-compact .project-switcher-toggle {
    padding: 0.4rem;
    width: auto;
    background: transparent !important;
    border: none !important;
}

.project-compact .project-switcher-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    width: 200px;
}

.project-compact.open .project-switcher-menu {
    transform: translateX(-50%) translateY(0);
}

.options-menu-project-switcher {
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
        visibility: hidden;
    }

    body.sidebar-collapsed .main-content-wrapper {
        margin-left: 0;
    }
}