
@font-face {
    font-family: 'C059';
    src: url('../fonts/C059-Roman.woff2') format('woff2'),
         url('../fonts/C059-Roman.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --accent:       #78a0c4;
    --accent-soft:  #a7c4de;
    --accent-dim:   #4e7ba6;
    --dark:         #282c34;
    --dark-border:  #3a4756;
    --dark-border-hover: #4a505c;
    --dark-text-muted:   #8f96a3;
    --bg:           #f5f5f5;
    --white:        #ffffff;
    --text:         #333;
    --text-muted:   #666;
    --text-light:   #999;
    --border:       #ddd;
    --danger:       #c0392b;
    --low:          #2980b9;
    --font:         'C059', Georgia, 'Times New Roman', serif;
    --font-mono:    'Courier New', Courier, monospace;

    --overlay-bg:     rgba(40, 44, 52, .90); 
    --overlay-blur:   blur(22px) saturate(1.4);
    --scrim:        rgba(40, 44, 52, .40);  
    --radius:       2px;

    --link:         #2F73A6; 
    --link-hover:   #5599CC; 
    --link-active:  #2F73A6; 
    --link-d:       #74BEEC;  
    --link-d-hover: #A6D6F5;  

    --nav-rest:     #e6e8ec;  
    --nav-hover:    #A6D6F5; 
    --nav-active:   #74BEEC; 
    --select-ring:  #74BEEC; 

    --link-bracket: var(--link);
    --link-label:   var(--link);

    --log-ok-fg:   #2f7d5b;  --log-ok-bd:   #c9e3d5;  --log-ok-bg:   #eff7f2;
    --log-err-fg:  #b23b34;  --log-err-bd:  #ecccc8;  --log-err-bg:  #fbf1f0;
    --log-info-fg: #37658c;  --log-info-bd: #cfe0ee;  --log-info-bg: #eef4f9;

    --label-fg:      #9aa3af;
    --label-fg-dark: #8f96a3;
}

* { box-sizing: border-box; }

html {
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    padding: 55px 0 50px 44px;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}


h1, h2 {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text);
}

h3, h4, h5, h6 { font-weight: normal; }

h1 { font-size: 2.5rem; text-align: left; }
h2 { font-size: 2rem; text-align: left; }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

.bd-link {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: inherit;
    color: var(--link-label);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color .12s ease;
}

.bd-link::before { content: '[ '; color: var(--link-bracket); }
.bd-link::after  { content: ' ]'; color: var(--link-bracket); }

.bd-link:hover,
.bd-link:hover::before,
.bd-link:hover::after { color: var(--link-hover); }

.bd-link--danger,
.bd-link--danger::before,
.bd-link--danger::after { color: var(--text-light); }
.bd-link--danger:hover,
.bd-link--danger:hover::before,
.bd-link--danger:hover::after { color: var(--danger); }

.overlay .bd-link,
.overlay .bd-link::before,
.overlay .bd-link::after,
.switcher-panel .bd-link,
.switcher-panel .bd-link::before,
.switcher-panel .bd-link::after { color: var(--link-d); }
.overlay .bd-link:hover,
.overlay .bd-link:hover::before,
.overlay .bd-link:hover::after,
.switcher-panel .bd-link:hover,
.switcher-panel .bd-link:hover::before,
.switcher-panel .bd-link:hover::after { color: var(--link-d-hover); }

.bd-link--quiet { color: var(--text-light); }
.bd-link--quiet::before,
.bd-link--quiet::after { content: none; }
.bd-link--quiet:hover { color: var(--text); }
.overlay .bd-link--quiet { color: var(--label-fg-dark); }
.overlay .bd-link--quiet:hover { color: #e6e8ec; }

.glyph {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: inherit;
    line-height: 1;
    color: var(--label-fg);
    cursor: pointer;
    transition: color .12s ease;
}
.glyph:hover        { color: var(--link); }
.glyph--danger:hover { color: var(--log-err-fg); }

.bd-icon {
    height: 1.25em;
    width: 1.25em;
    display: inline-block;
    vertical-align: -0.25em;
}

.bd-icon svg { height: 100%; width: 100%; display: block; }

.bd-icon--ok      { color: var(--low); }
.bd-icon--pending { color: var(--text-muted); }
.bd-icon--alert   { color: var(--danger); }

.bd-icon-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color .12s ease;
}

.bd-icon-btn:hover { color: var(--accent); }
.bd-icon-btn--danger:hover { color: var(--danger); }

[data-field], .bd-field {
    border: 1px dashed transparent;
    padding: 0 2px;
}

.bd-field-editing {
    border-color: #bbb;
    background: var(--white);
}

.bd-field-input {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    display: block;
    outline: none;
}

textarea.bd-field-input { resize: vertical; }

.bd-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bd-choice {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .12s ease;
}

.bd-choice::before { content: '[ '; }
.bd-choice::after  { content: ' ]'; }

.bd-choice:hover { color: var(--accent); }
.bd-choice.selected { color: var(--accent); }

.bd-dropdown { position: relative; display: inline-block; }

.bd-dropdown__btn {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: border-color .12s ease;
}

.bd-dropdown__btn:hover,
.bd-dropdown.open .bd-dropdown__btn { border-color: var(--accent); }

.bd-dropdown__btn::after {
    content: '▾';
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
}

.bd-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0 0 2px 2px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    z-index: 200;
    max-height: 260px;
    overflow-y: auto;
    padding: 0.4rem 0;
}

.bd-dropdown.open .bd-dropdown__panel { display: block; }

.bd-dropdown__opt {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.3rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
}

.bd-dropdown__opt:hover { color: var(--accent); }

.bd-dropdown__opt::before {
    content: '[ ]';
    white-space: pre;
    color: var(--text-muted);
}
.bd-dropdown__opt.selected { color: var(--accent); }
.bd-dropdown__opt.selected::before { content: '[✓]'; color: var(--accent); }

.bd-dropdown:not([data-multi]) .bd-dropdown__opt::before { content: '   '; }
.bd-dropdown:not([data-multi]) .bd-dropdown__opt.selected::before { content: ' ✓ '; color: var(--accent); }

.bd-check-group { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.bd-check { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-family: var(--font-mono); }
.bd-check__input { cursor: pointer; margin: 0; flex-shrink: 0; }
.bd-check--disabled { opacity: 0.45; cursor: default; }
.bd-check--disabled .bd-check__input { cursor: default; }
.bd-check__empty { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.bd-check--other .bd-check__label { font-style: italic; }

.bd-table-check { width: 28px; text-align: center; }
.bd-table-del   { width: 34px; text-align: center; }

.bd-table-check input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

td.bd-cell-editable { padding-top: 0; padding-bottom: 0; }

.bd-cell-input {
    font: inherit;
    color: inherit;
    background: var(--white);
    border: 1px dashed #bbb;
    border-radius: 0;
    padding: 1px 4px;
    margin: -2px 0;
    width: 100%;
    outline: none;
}

.bd-hint {
    border-bottom: 1px dotted #999;
    cursor: help;
}

.bd-tooltip {
    position: fixed;
    max-width: 320px;
    background: rgba(40, 44, 52, .92);
    -webkit-backdrop-filter: var(--overlay-blur);
    backdrop-filter: var(--overlay-blur);
    border: 1px solid var(--dark-border);
    border-radius: 0 0 2px 2px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: #e6e8ec;
    padding: 7px 10px;
    z-index: 1200;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bd-link, .bd-choice, .bd-icon-btn, .bd-dropdown__btn { transition: none; }
}

main {
    padding: 0 1rem;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 0 10px;
    background-color: var(--dark);
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.topic {
    margin-bottom: 2rem;
    background-color: #f5f5f5;
}

.topic[id],
.subtopic[id] { scroll-margin-top: calc(54px + var(--notice-height, 0px) + 6px); }

.footer-content { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0; }
.footer-column   { display: flex; justify-content: center; }
.social-links    { display: flex; align-items: center; }

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.social-link,
.has-popover {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 10px 0px;
}

.icon-fa {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    color: white;
    transition: color 0.3s ease;
    vertical-align: middle;
    display: inline-block;
}

.social-link:hover .icon-fa,
.has-popover:hover .icon-fa { color: var(--accent); }

.has-popover { position: relative; }

.popover-text {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.popover-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.has-popover:hover .popover-text { visibility: visible; opacity: 1; bottom: 130%; }

#notification-host {
    position: fixed;
    bottom: 58px;
    right: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
    pointer-events: none;
    max-width: min(520px, calc(100vw - 16px));
}

.notif {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    background: var(--dark);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 6px 10px;
    border-left: 3px solid var(--accent);
    pointer-events: auto;
    word-break: break-word;
}

.notif--error { border-left-color: var(--danger); }

.notif-text { flex: 1; }

.notif-btn {
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    opacity: 0.65;
}

.notif-btn:hover { opacity: 1; color: var(--accent); }

input[type="checkbox"] { accent-color: var(--accent); }

body.shell {
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

body.shell { --rail-width: 320px; }

.shell-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: var(--dark);
    border-bottom: 1px solid var(--dark-border);
    border-radius: 0;
    display: grid;
    grid-template-columns: 1fr var(--rail-width);
    align-items: stretch;
    z-index: 1000;
    min-height: 54px;
}

.shell-header > nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding: 0 24px;
}

.shell-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 54px;
}

.shell-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.shell-nav-link {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--nav-rest);
    text-decoration: none;
    white-space: nowrap;
    transition: color .12s ease;
}

.shell-nav-link:hover  { color: var(--nav-hover); }
.shell-nav-link.active { color: var(--nav-active); } 

.shell-nav-caret { margin-left: 3px; font-size: 11px; }
.shell-nav-caret::before { content: '▾'; }  
.shell-nav-item:hover        .shell-nav-caret::before,
.shell-nav-item:focus-within .shell-nav-caret::before,
.shell-nav-item.open         .shell-nav-caret::before { content: '▴'; }

.shell-nav-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: max-content;
    background: var(--dark);
    border: 1px solid var(--dark-border);
    border-top: none;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    z-index: 1001;
}

.shell-nav-item:hover .shell-nav-drop,
.shell-nav-item:focus-within .shell-nav-drop,
.shell-nav-item.open .shell-nav-drop { display: block; }

.shell-nav-drop li {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--nav-rest);
    padding: 9px 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .12s ease;
}

.shell-nav-drop li:hover     { color: var(--nav-hover); }
.shell-nav-drop li.selected  { color: var(--nav-active); }

.shell-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 54px;
    padding: 0 24px;
    border-left: 1px solid var(--dark-border);
}

.switcher-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.switcher-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: .5;
    transition: opacity .12s ease;
}

.switcher-item:hover,
.switcher-item.is-current { opacity: 1; }

.switcher-item .ring {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid transparent;  
}

.switcher-item.is-current .ring { border-color: var(--select-ring); }

.switcher-trigger {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.switcher-trigger:hover { opacity: .8; }

.shell-icon {
    display: inline-block;
    flex-shrink: 0;
    color: #f5f5f5;
}

.shell-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.switcher-caret {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--dark-text-muted);
    line-height: 1;
}

body.shell-narrow .shell-header   { grid-template-columns: 1fr auto; }
body.shell-narrow .shell-switcher { border-left: none; padding: 0 18px; }
body.shell-narrow .switcher-icons   { display: none; }
body.shell-narrow .switcher-trigger { display: flex; }

.switcher-panel {
    position: fixed;
    background: var(--overlay-bg);
    -webkit-backdrop-filter: var(--overlay-blur);
    backdrop-filter: var(--overlay-blur);
    border: 1px solid var(--dark-border);
    border-top: none;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    padding: 14px 16px 16px;
    min-width: 210px;
    max-width: 290px;
    z-index: 1001;
    user-select: none;
    animation: overlay-in .14s ease-out;
}

.switcher-panel__app {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: #f5f5f5;
}

.switcher-panel__app-desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-text-muted);
    margin-top: 2px;
}

.feature-group { margin-top: 11px; }

.feature-group__label {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #e6e8ec;
}

.feature-group__items {
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--dark-text-muted);
    margin-top: 2px;
    padding-left: 13px;
}

.switcher-panel__auth {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--dark-border);
    user-select: auto;
}

.shell-notices {
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    z-index: 950;
}

.shell-notice {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent-dim);
    background: #edf3f9;
    border-bottom: 1px solid #d3e2ef;
    text-align: center;
}

.shell-notice--danger {
    color: var(--danger);
    background: #fdf4f3;
    border-bottom-color: #e8c4bf;
}

.shell-notice-dismiss {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: inherit;
    opacity: .7;
    cursor: pointer;
    white-space: nowrap;
}

.shell-notice-dismiss:hover { opacity: 1; }

.overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(40, 44, 52, .25);
    z-index: 1100;
}

.overlay-backdrop--modal { background: rgba(40, 44, 52, .35); }

.overlay {
    position: fixed;
    background: var(--overlay-bg);
    -webkit-backdrop-filter: var(--overlay-blur);
    backdrop-filter: var(--overlay-blur);
    border: 1px solid var(--dark-border);
    border-radius: 0 0 2px 2px;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 74px);
    z-index: 1101;
}

.overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.overlay__title {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dark-text-muted);
}

.overlay__close {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-text-muted);
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.overlay__close:hover { color: #f5f5f5; }

.overlay__body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.overlay__footer {
    display: flex;
    justify-content: flex-end;
    gap: 22px;
    padding: 12px 16px;
    border-top: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.overlay--popover {
    width: 520px;
    max-width: calc(100vw - 24px);
    animation: overlay-in .14s ease-out;
}

.overlay--modal {
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    max-width: calc(100vw - 32px);
    animation: overlay-in-modal .14s ease-out;
}

.overlay--drawer {
    top: 54px;
    right: 0;
    bottom: 0;
    width: 330px;
    max-width: calc(100vw - 24px);
    max-height: none;
    border-right: none;
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    animation: overlay-in-drawer .14s ease-out;
}

@keyframes overlay-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes overlay-in-modal {
    from { opacity: 0; transform: translate(-50%, -6px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes overlay-in-drawer {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.overlay-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dark-text-muted);
    margin-bottom: 5px;
}

.overlay select {
    width: 100%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--dark-border-hover);
    border-radius: var(--radius);
    color: #f5f5f5;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 7px 9px;
}

.overlay-btn {
    background: none;
    border: none;
    padding: 2px 0;
    font-family: var(--font-mono);
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .12s ease;
}

.overlay-btn--ghost { color: #8f96a3; }
.overlay-btn--ghost:hover { color: #e6e8ec; }

.overlay-btn--primary { color: var(--link-d); } 
.overlay-btn--primary:hover { color: var(--link-d-hover); }

.overlay-btn--danger { border-color: var(--danger); color: var(--danger); }
.overlay-btn--danger:hover { background: var(--danger); color: var(--bg); }

.launcher-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.launcher-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    text-decoration: none;
    cursor: pointer;
}

.launcher-tile:hover {
    background: rgba(255, 255, 255, .09);
    border-color: var(--dark-border-hover);
}

.launcher-tile.is-current {
    border-color: var(--accent);
    background: rgba(125, 122, 255, .13);
}


.launcher-tile-name {
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: #f5f5f5;
    display: block;
}

.launcher-tile.is-current .launcher-tile-name { color: var(--accent-soft); }

.launcher-tile-desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-text-muted);
    display: block;
    margin-top: 2px;
}

.launcher-system {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 4px 0;
    border-top: 1px dashed var(--dark-border);
    text-decoration: none;
    cursor: pointer;
}

.launcher-system__link:hover .launcher-tile-name { color: var(--accent-soft); }


.launcher-system-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.launcher-system {
    display: block;
    padding: 12px 4px 0;
}

.launcher-system__link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

.launcher-session {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--dark-border);
}

.launcher-session__label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dark-text-muted);
}

.launcher-auth {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.launcher-auth button {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--link-d);
    cursor: pointer;
    transition: color .12s ease;
}

.launcher-auth button:hover { color: var(--link-d-hover); }

.shell-main {
    display: flex;
    align-items: stretch;
    margin-top: calc(54px + var(--notice-height, 0px));
    height: calc(100vh - 104px - var(--notice-height, 0px));
    overflow: hidden;
}

.shell-content {
    width: min(var(--content-width, 1100px), 100%);
    flex-shrink: 1;
    padding: 38px 40px;
    height: 100%;
    overflow-y: auto;
    direction: rtl;
}

.shell-content > * {
    direction: ltr;
}

.shell-content main {
    height: 100%;
}

.shell-rail {
    width: var(--rail-width);
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.rail-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--label-fg);
    margin-bottom: 10px;
}

.rail-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 28px;
}

.rail-btn {
    background: none;
    border: none;
    padding: 2px 0;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--link-label);
    text-align: left;
    cursor: pointer;
    transition: color .12s ease;
}

.rail-btn::before { content: '[ '; color: var(--link-bracket); }
.rail-btn::after  { content: ' ]'; color: var(--link-bracket); }

.rail-btn:hover,
.rail-btn:hover::before,
.rail-btn:hover::after { color: var(--link-hover); }

.rail-btn--danger { color: var(--text-light); }
.rail-btn--danger::before,
.rail-btn--danger::after { color: var(--text-light); }
.rail-btn--danger:hover,
.rail-btn--danger:hover::before,
.rail-btn--danger:hover::after { color: var(--danger); }

.rail-section { margin-bottom: 28px; }

.rail-msgs {
    min-height: 84px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-card {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    border: 1px solid;
    border-radius: 0;
    padding: 8px 10px;
    animation: msg-in .18s ease-out;
    word-break: break-word;
}

.msg-card-text { flex: 1; }

.msg-card-dismiss {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: inherit;
    opacity: .55;
    cursor: pointer;
}

.msg-card-dismiss:hover { opacity: 1; }
.msg-card--ok    { color: var(--log-ok-fg);   border-color: var(--log-ok-bd);   background: var(--log-ok-bg); }
.msg-card--error { color: var(--log-err-fg);  border-color: var(--log-err-bd);  background: var(--log-err-bg); }
.msg-card--info  { color: var(--log-info-fg); border-color: var(--log-info-bd); background: var(--log-info-bg); }
.msg-card > span:first-child { font-weight: 700; }

@keyframes msg-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rail-spacer { flex: 1; }

.rail-hint {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: 14px;
    font-family: var(--font);
    font-style: italic;
    font-size: 13.5px;
    color: var(--text-muted);
}

.rail-hint:empty { display: none; }

body.shell-narrow .shell-rail { display: none; }

.rail-tab {
    display: none;
    position: fixed;
    right: 0;
    top: calc(78px + var(--notice-height, 0px));
    writing-mode: vertical-rl;
    background: var(--dark);
    color: #f5f5f5;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 12px 6px;
    cursor: pointer;
    z-index: 990;
}

body.shell-narrow .rail-tab { display: block; }

.rail-tab.flash { animation: rail-tab-flash .6s ease-out; }

@keyframes rail-tab-flash {
    0%   { background: var(--accent); }
    100% { background: var(--dark); }
}

.shell-edge-fade {
    display: none;
    position: fixed;
    top: 54px;
    right: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(to left, rgba(0, 0, 0, .07), transparent);
    pointer-events: none;
    z-index: 980;
}

body.shell-narrow .shell-edge-fade { display: block; }

.overlay--drawer .rail-label { color: var(--dark-text-muted); }

.overlay--drawer .rail-btn,
.overlay--drawer .rail-btn::before,
.overlay--drawer .rail-btn::after { color: var(--link-d); }
.overlay--drawer .rail-btn:hover,
.overlay--drawer .rail-btn:hover::before,
.overlay--drawer .rail-btn:hover::after { color: var(--link-d-hover); }

.overlay--drawer .rail-btn--danger,
.overlay--drawer .rail-btn--danger::before,
.overlay--drawer .rail-btn--danger::after { color: var(--dark-text-muted); }
.overlay--drawer .rail-btn--danger:hover,
.overlay--drawer .rail-btn--danger:hover::before,
.overlay--drawer .rail-btn--danger:hover::after { color: #e07b6e; }

.overlay--drawer .rail-msgs {
    border-top: 1px solid var(--dark-border);
    padding-top: 16px;
    margin-top: 4px;
}

.overlay--drawer .rail-section {
    border-top: 1px solid var(--dark-border);
    padding-top: 16px;
}

.overlay--drawer .rail-hint {
    border-top-color: var(--dark-border);
    color: var(--dark-text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .overlay, .msg-card, .rail-tab.flash { animation: none !important; }
    .shell-nav-link, .shell-nav-drop li, .rail-btn, .overlay-btn { transition: none; }
}

.drop-admin {
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.action-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--dark);
    text-decoration: none;
    padding: 0;
    cursor: pointer;
}
.action-btn:hover          { color: var(--accent); }
.action-btn--danger:hover  { color: var(--danger); }

.btn-primary {
    background: var(--dark);
    color: #fff;
    border: none;
    padding: 0.4rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 0.04em;
}
.btn-primary:hover    { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
}
.btn-secondary:hover { border-color: var(--text-muted); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.3rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
}
.btn-ghost:hover { color: var(--text); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 0.2rem 0.5rem; font-size: 0.72rem; }

.filter-dropdown { position: relative; display: inline-block; }

.filter-btn {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    position: relative;
    line-height: 1.4;
    transition: border-color .12s ease;
}

.filter-btn:hover { border-color: var(--accent); }

.filter-btn::after {
    content: '▾';
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-btn.open { border-color: var(--accent); }

.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0 0 2px 2px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    z-index: 200;
    max-height: 260px;
    overflow-y: auto;
    padding: 0.4rem 0;
}

.filter-panel.open { display: block; }

.filter-option {
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
}

.filter-option:hover,
.filter-option.selected { color: var(--accent); }

.drop-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.drop-header h2 { text-align: left; }

.drop-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.drop-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.03em;
    margin: 0 0 1rem;
}

.rich-body { line-height: 1.8; }
.rich-body p   { margin-bottom: 1.2rem; }
.rich-body h1  { margin-top: 3rem;   margin-bottom: 0.75rem; }
.rich-body h2  { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.rich-body h3  { margin-top: 2rem;   margin-bottom: 0.5rem; }

.rich-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg);
    padding: 0.1em 0.3em;
}

.rich-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: #555;
    font-style: italic;
    margin: 1.5rem 0;
}

.rich-body ol, .rich-body ul { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.rich-body li { margin-bottom: 0.3rem; }

.rich-body figure { margin: 2rem 0; }
.rich-body figure img    { max-width: 100%; height: auto; display: block; cursor: zoom-in; }
.rich-body figure video  { max-width: 100%; height: auto; display: block; }
.rich-body figure pre.ql-syntax {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}
.rich-body figure figcaption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.5rem;
    font-style: italic;
}
.rich-body figure figcaption a { color: var(--accent); text-decoration: none; }
.rich-body figure figcaption a:hover { text-decoration: underline; }

body.lightbox-open { overflow: hidden; }

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
}
#lightbox.open { display: flex; align-items: center; justify-content: center; }

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    font-family: var(--font-mono);
}

.lightbox-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 92vw;
    cursor: default;
}

.lightbox-nav {
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 0.2rem 0.7rem;
    line-height: 1;
    flex-shrink: 0;
    font-family: var(--font-mono);
}
.lightbox-nav:hover  { background: rgba(255,255,255,0.1); }
.lightbox-nav.hidden { visibility: hidden; }

.lightbox-center { text-align: center; }

#lightbox-image {
    max-width: 80vw;
    max-height: 82vh;
    object-fit: contain;
    display: block;
}

#lightbox-caption {
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-top: 0.6rem;
    font-style: italic;
}

.form-row input:not([type="checkbox"]),
.form-row select,
.admin-form-row input:not([type="checkbox"]),
.admin-form-row select {
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.form-row select,
.admin-form-row select {
    padding-right: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23666' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 8px 5px;
    cursor: pointer;
}

.form-row input:focus,
.form-row select:focus,
.admin-form-row input:focus,
.admin-form-row select:focus {
    outline: none;
    border-bottom-color: var(--dark);
}

.loading-msg {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-light);
}

.back-link {
    display: inline-block;
    margin: 1rem 0;
    font-size: 0.9rem;
}

pre {
    font-family: var(--font-mono);
    background-color: #fafafa;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    overflow-x: auto;
    width: 100%;
}

pre code {
    font-family: inherit;
    display: block;
    padding: 1rem;
}

.references { margin-top: 2rem; }

.references p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 2em;
    text-indent: -2em;
}

.field {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.18));
    border-radius: 10px;
    background: var(--input-bg, rgba(0, 0, 0, 0.02));
    color: inherit;
    font-family: inherit;
}
.field:focus { outline: 2px solid var(--accent, #4c7dff); outline-offset: 1px; }

.field-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius, 6px);
}
.field-row .btn-secondary { flex: 1; }

.field-label { font-weight: 600; min-width: 8rem; }

@media (prefers-color-scheme: dark) {
    .field { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.14); }
}
