@font-face {
    font-family: "PixelFont";
    src: url("https://cdn.jsdelivr.net/gh/iamrekreats/fonts@master/ProggyClean.ttf") format("truetype");
    font-display: swap;
}

:root {
    --bg-deepest: #241530;
    --bg-base: #2a1830;
    --bg-panel: #3e2347;
    --bg-hover: #4a3560;
    --bg-header: #453055;
    --bg-border: #5d3a6f;
    --accent: #9b6eb3;
    --accent-light: #b282c1;
    --accent-bright: #c99ed4;
    --accent-link: #a67bb8;
    --text: #c4b4d0;
    --text-dim: #8a7a96;
    --text-faint: #6a5d78;
    --shadow: #120a18;
}

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

body,
html {
    min-height: 100%;
    margin: 0;
    background-color: var(--bg-base);
    color: var(--text);
}

.page_bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(155, 110, 179, 0.28), transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(62, 35, 71, 0.95), transparent),
        radial-gradient(ellipse 40% 35% at 100% 80%, rgba(42, 24, 48, 0.9), transparent),
        var(--bg-base);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 40px;
    gap: 18px;
}

a {
    color: #a67bb8;
}

.outline {
    background-color: #241530;
    padding: 1px;
}

.inline {
    background-color: #5d3a6f;
    padding: 1px;
}

.light_contrast {
    background-color: #4a3560;
    padding: 8px 12px;
}

.dark_contrast {
    background-color: #3e2347;
    padding: 10px 12px;
}

.pixel_shadow {
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000,
        -1px 0 0 #000,
        1px 0 0 #000;
}

.rich_text {
    font-family: "PixelFont", "Courier New", monospace;
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
    text-rendering: optimizeLegibility;
    color: var(--text);
}

.rich_text.pixel_shadow,
.rich_text h1,
.rich_text h2,
.rich_text h3,
.rich_text p,
.rich_text li,
.rich_text code,
.rich_text .page_title,
.rich_text .page_subtitle,
.rich_text .section_intro,
.rich_text .breadcrumb {
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000,
        -1px 0 0 #000,
        1px 0 0 #000;
}

.rich_text h1,
.rich_text h2,
.rich_text h3 {
    margin: 0 0 10px;
    color: #ddd0e8;
    font-size: 15px;
    font-weight: normal;
}

.rich_text p {
    margin: 0 0 10px;
}

.rich_text code {
    color: var(--accent-light);
    background: #241530;
    padding: 1px 4px;
}

.rich_text ul {
    margin: 0 0 12px;
    padding-left: 18px;
}

.rich_text li {
    margin-bottom: 6px;
}

.site_header {
    width: min(1120px, 100%);
}

.header_frame {
    width: 100%;
}

.header_inner {
    background: linear-gradient(180deg, var(--bg-header) 0%, var(--bg-panel) 100%);
    padding: 18px 20px;
}

.header_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 16px;
}

.header_brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.header_logo {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(18, 10, 24, 0.5);
}

.header_titles {
    min-width: 0;
}

.brand_line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.site_header .brand {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: var(--accent-light);
    letter-spacing: 0.03em;
    font-weight: normal;
}

.header_pill {
    display: inline-block;
    font-family: "PixelFont", monospace;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: #241530;
    border: 1px solid #5d3a6f;
    padding: 4px 8px;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.site_header .tagline {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.header_meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.meta_chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #241530;
    border: 1px solid #5d3a6f;
    padding: 8px 12px;
    min-width: 72px;
}

.meta_label {
    font-family: "PixelFont", monospace;
    font-size: 9px;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.meta_value {
    font-family: "PixelFont", monospace;
    font-size: 16px;
    line-height: 1.3;
    color: var(--accent-light);
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.meta_chip code.meta_value {
    background: transparent;
    padding: 0;
}

.header_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.header_actions .inline .pixel_btn {
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .header_row {
        flex-direction: column;
        align-items: stretch;
    }

    .header_brand {
        justify-content: center;
        text-align: center;
    }

    .brand_line {
        justify-content: center;
    }

    .header_meta {
        justify-content: center;
    }

    .header_actions {
        width: 100%;
        justify-content: center;
    }
}

.site_footer {
    width: min(1120px, 100%);
    text-align: center;
    font-family: "PixelFont", monospace;
    font-size: 11px;
    color: #4a4a4a;
    letter-spacing: 0.04em;
}

.footer_dot {
    margin: 0 8px;
    color: #5d3a6f;
}

.shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 860px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .nav_panel {
        position: static !important;
    }

    .nav_scroll {
        max-height: none !important;
    }
}

.nav_panel {
    position: sticky;
    top: 20px;
}

.nav_panel .panel_inner {
    padding: 12px;
}

.nav_scroll {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #5d3a6f #241530;
}

.nav_scroll::-webkit-scrollbar {
    width: 6px;
}

.nav_scroll::-webkit-scrollbar-thumb {
    background: #5d3a6f;
}

.search_wrap {
    margin-bottom: 12px;
}

.search_input {
    display: block;
    width: 100%;
    border: none;
    outline: none;
    background: #241530;
    color: #ddd0e8;
    font-family: "PixelFont", monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 10px;
}

.nav_item {
    margin-bottom: 6px;
}

.nav_item:last-child {
    margin-bottom: 0;
}

.nav_link {
    display: block;
    width: 100%;
    border: none;
    margin: 0;
    padding: 9px 12px;
    cursor: pointer;
    text-align: left;
    background: #3e2347;
    color: var(--text-dim);
    font-family: "PixelFont", monospace;
    font-size: 14px;
    line-height: 1.5;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.nav_link:hover {
    background-color: #4a3560;
    color: #d8d8d8;
}

.nav_link.active {
    background-color: #4a3560;
    color: var(--accent-light);
    box-shadow: inset 3px 0 0 #9b6eb3;
}

.nav_home_box {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #5d3a6f;
}

.nav_group {
    margin-bottom: 10px;
}

.nav_group:last-child {
    margin-bottom: 0;
}

.nav_group_label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    margin: 0 0 6px;
    padding: 4px 2px;
    cursor: pointer;
    background: transparent;
    color: var(--accent);
    font-family: "PixelFont", monospace;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.nav_group_label:hover {
    color: var(--accent-light);
}

.nav_group_label::after {
    content: "−";
    color: var(--text-faint);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.nav_group:not(.open) .nav_group_label::after {
    content: "+";
}

.nav_group_list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav_group:not(.open) .nav_group_list {
    display: none;
}

.nav_group_list .nav_link {
    font-size: 13px;
    padding: 8px 10px 8px 14px;
}

.content_panel {
    min-height: 560px;
}

.content_panel .panel_inner {
    padding: 20px 22px;
    min-height: 560px;
}

.breadcrumb {
    font-size: 12px;
    color: #6a6a6a;
    margin-bottom: 14px;
}

.crumb_category {
    color: #a67bb8;
}

.crumb_sep {
    margin: 0 6px;
    color: #3a3a3a;
}

.crumb_page {
    color: var(--text-dim);
}

.page_header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #5d3a6f;
}

.page_title {
    margin: 0;
    font-size: 20px;
    color: var(--accent-light);
    font-weight: normal;
    line-height: 1.4;
}

.page_subtitle {
    margin: 8px 0 0;
    color: #9a8aa8;
    font-size: 13px;
    line-height: 1.5;
}

.section_intro {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 18px !important;
    line-height: 1.6;
}

.section_body > p:last-child,
.section_body > ul:last-child {
    margin-bottom: 0;
}

.command_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.command_card {
    display: block;
    width: 100%;
    border: none;
    margin: 0;
    padding: 1px;
    background: #5d3a6f;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.command_card:hover .command_inner {
    background: #3e2347;
}

.command_card:hover .command_name {
    color: var(--accent-light);
}

.command_card:hover .command_hint {
    color: #a67bb8;
}

.command_card:focus-visible {
    outline: 1px solid #9b6eb3;
    outline-offset: 2px;
}

.command_hint {
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-faint);
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.command_card > .outline > .command_inner {
    background: #241530;
    padding: 12px 14px;
    min-height: 100%;
}

.command_card.hidden {
    display: none;
}

.command_top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.command_top .command_name {
    margin-bottom: 0;
}

.command_usage_row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.command_usage_row code {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    word-break: break-word;
    color: var(--accent-light);
    background: #3e2347;
    padding: 4px 8px;
}

.copy_btn {
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-family: "PixelFont", monospace;
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-dim);
    background: #3e2347;
    padding: 5px 8px;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.copy_btn:hover {
    color: var(--accent-light);
    background: #4a3560;
}

.copy_btn.copied {
    color: #7dcea0;
    background: #0f1a12;
}

.perm_badge {
    display: inline-block;
    font-family: "PixelFont", monospace;
    font-size: 10px;
    line-height: 1.4;
    padding: 4px 8px;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.perm_none {
    color: var(--text-dim);
    background: #3e2347;
}

.perm_mod {
    color: var(--accent-light);
    background: #3d2a50;
}

.perm_manage {
    color: #c4a8d8;
    background: #352545;
}

.perm_admin {
    color: var(--accent-bright);
    background: #4a3058;
}

.perm_owner {
    color: #d4b8e8;
    background: #4a3848;
}

.perm_booster {
    color: var(--accent-light);
    background: #3a2848;
}

.perm_default {
    color: #b8a8c8;
    background: #3e2347;
}

.detail_title_row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.detail_title_row .page_title {
    margin: 0;
}

.detail_usage_row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.detail_usage_code {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--accent-light);
    background: #241530;
    padding: 8px 12px;
    word-break: break-word;
}

.perm_detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.detail_perm_desc {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
}

.example_row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.example_row code {
    flex: 1;
    min-width: 0;
}

.detail_examples {
    padding-left: 0 !important;
}

.detail_examples .example_row {
    margin-bottom: 10px;
}

.detail_examples .example_row:last-child {
    margin-bottom: 0;
}


.command_desc {
    color: #9a8aa8;
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.55;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.command_name {
    color: var(--accent-light);
    font-size: 14px;
    line-height: 1.4;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.category_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.category_card {
    padding: 1px;
    background: #5d3a6f;
    display: flex;
    flex-direction: column;
}

.category_card > .outline {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category_card > .outline > .category_inner {
    background: #241530;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category_card_head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.category_card_title {
    margin: 0;
    font-size: 15px;
    color: var(--accent-light);
    font-weight: normal;
    line-height: 1.4;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.category_card_meta {
    font-size: 10px;
    color: var(--text-faint);
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.category_card_desc {
    margin: 0;
    font-size: 12px;
    color: #9a8aa8;
    line-height: 1.55;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.category_card_links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home_link {
    border: none;
    cursor: pointer;
    font-family: "PixelFont", monospace;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-dim);
    background: #3e2347;
    padding: 5px 9px;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.home_link:hover {
    color: var(--accent-light);
    background: #4a3560;
}

.category_card_cta {
    border: none;
    cursor: pointer;
    margin-top: auto;
    font-family: "PixelFont", monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #ddd0e8;
    padding: 10px 12px;
    background: #3e2347;
    text-align: center;
    width: 100%;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.category_card_cta:hover {
    background: #4a3560;
    color: var(--accent-light);
}

.search_group_title {
    margin: 20px 0 10px;
    font-size: 11px;
    color: var(--accent);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.search_group_title:first-of-type {
    margin-top: 0;
}

.search_open {
    border: none;
    cursor: pointer;
    margin-top: 8px;
    padding: 0;
    background: transparent;
    font-family: "PixelFont", monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #a67bb8;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.search_open:hover {
    color: var(--accent-light);
}

.button_container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

button.pixel_btn {
    display: block;
    width: 100%;
    border: none;
    margin: 0;
    padding: 12px 20px;
    cursor: pointer;
    text-align: center;
    background: #3e2347;
    color: #ddd0e8;
    font-family: "PixelFont", monospace;
    font-size: 14px;
    line-height: 1.5;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

button.pixel_btn:hover {
    background-color: #4a3560;
    color: var(--accent-light);
}

.hidden {
    display: none !important;
}

.back_btn {
    border: none;
    cursor: pointer;
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    font-family: "PixelFont", monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #a67bb8;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.back_btn:hover {
    color: var(--accent-light);
}

.detail_usage {
    margin-top: 10px;
}

.detail_usage code {
    font-size: 14px;
    color: var(--accent-light);
    background: #241530;
    padding: 6px 10px;
    display: inline-block;
}

.detail_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 700px) {
    .detail_grid {
        grid-template-columns: 1fr;
    }
}

.detail_block {
    padding: 1px;
    background: #5d3a6f;
}

.detail_block > .outline > .detail_inner,
.detail_block_wide > .detail_inner {
    background: #241530;
    padding: 14px 16px;
}

.detail_block {
    display: flex;
    flex-direction: column;
}

.detail_block_wide {
    grid-column: 1 / -1;
    padding: 1px;
    background: #5d3a6f;
}

.detail_block_wide .detail_inner {
    background: #241530;
    padding: 14px 16px;
}

.detail_heading {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: normal;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.detail_perm {
    margin: 0;
    color: #ddd0e8;
    font-size: 14px;
}

.detail_hint {
    margin: 0 0 10px;
    color: #9a8aa8;
    font-size: 12px;
}

.detail_empty {
    margin: 0;
    color: #9a8aa8;
    font-size: 13px;
}

.detail_list {
    margin: 0;
    padding-left: 18px;
}

.detail_list li {
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
}

.detail_examples li {
    color: #b8a8c8;
}

.detail_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.detail_table th,
.detail_table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #5d3a6f;
    vertical-align: top;
}

.detail_table th {
    color: #9a8aa8;
    font-weight: normal;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail_table td {
    color: var(--text);
}

.detail_table td code {
    color: var(--accent-light);
    background: #3e2347;
    padding: 2px 5px;
}

.related_links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related_link {
    border: none;
    cursor: pointer;
    font-family: "PixelFont", monospace;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-dim);
    background: #3e2347;
    padding: 6px 10px;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.related_link:hover {
    color: var(--accent-light);
    background: #4a3560;
}

.detail_block .detail_inner {
    background: #241530;
    padding: 14px 16px;
    height: 100%;
}

.detail_block:not(.detail_block_wide) {
    background: #5d3a6f;
    padding: 1px;
}

.detail_block:not(.detail_block_wide) > .detail_inner {
    min-height: 80px;
}

