/* Liberation Sans → MS Sans Serif, Helv, System */
@font-face { font-family: "MS Sans Serif"; src: url(fonts/liberation_sans.woff2) format("woff2"); font-weight: normal; font-style: normal; }
@font-face { font-family: "MS Sans Serif"; src: url(fonts/liberation_sans_bold.woff2) format("woff2"); font-weight: bold; font-style: normal; }
@font-face { font-family: "MS Sans Serif"; src: url(fonts/liberation_sans_italic.woff2) format("woff2"); font-weight: normal; font-style: italic; }
@font-face { font-family: "MS Sans Serif"; src: url(fonts/liberation_sans_bolditalic.woff2) format("woff2"); font-weight: bold; font-style: italic; }
@font-face { font-family: "Helv"; src: url(fonts/liberation_sans.woff2) format("woff2"); font-weight: normal; font-style: normal; }
@font-face { font-family: "Helv"; src: url(fonts/liberation_sans_bold.woff2) format("woff2"); font-weight: bold; font-style: normal; }
@font-face { font-family: "System"; src: url(fonts/liberation_sans_bold.woff2) format("woff2"); }
/* Liberation Mono → Courier */
@font-face { font-family: "Courier"; src: url(fonts/liberation_mono.woff2) format("woff2"); font-weight: normal; font-style: normal; }
@font-face { font-family: "Courier"; src: url(fonts/liberation_mono_bold.woff2) format("woff2"); font-weight: bold; font-style: normal; }
@font-face { font-family: "Courier"; src: url(fonts/liberation_mono_italic.woff2) format("woff2"); font-weight: normal; font-style: italic; }
@font-face { font-family: "Courier"; src: url(fonts/liberation_mono_bolditalic.woff2) format("woff2"); font-weight: bold; font-style: italic; }
/* Fixedsys Excelsior → Fixedsys */
@font-face { font-family: "Fixedsys"; src: url(fonts/fixedsys_excelsior.woff2) format("woff2"); }
/* Wine outline fonts (Tahoma, Symbol, Wingdings, Marlett) */
@font-face { font-family: "Tahoma"; src: url(fonts/tahoma.woff2) format("woff2"); font-weight: normal; }
@font-face { font-family: "Tahoma"; src: url(fonts/tahomabd.woff2) format("woff2"); font-weight: bold; }
@font-face { font-family: "Symbol"; src: url(fonts/symbol.woff2) format("woff2"); }
@font-face { font-family: "Wingdings"; src: url(fonts/wingding.woff2) format("woff2"); }
@font-face { font-family: "Marlett"; src: url(fonts/marlett.woff2) format("woff2"); }

html {
    overflow-y: scroll;
    scrollbar-color: #a0a0a0 #dfdfdf;
}

::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
    background-color: #c0c0c0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2' height='2'><rect width='2' height='2' fill='%23c0c0c0'/><rect width='1' height='1' fill='%23fff'/><rect x='1' y='1' width='1' height='1' fill='%23fff'/></svg>");
    background-size: 2px 2px;
}
::-webkit-scrollbar-thumb {
    background-color: #a0a0a0;
    border: 1px solid;
    border-color: #fff #000 #000 #fff;
    box-shadow: inset -1px -1px 0 #707070, inset 1px 1px 0 #c0c0c0;
}
::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border: 1px solid;
    border-color: #fff #000 #000 #fff;
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
::-webkit-scrollbar-button {
    display: block;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
}
::-webkit-scrollbar-button:start:increment,
::-webkit-scrollbar-button:end:decrement {
    display: none;
}
::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4'><path d='M0 4 L7 4 L3.5 0 Z' fill='%23000'/></svg>");
}
::-webkit-scrollbar-button:vertical:increment {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4'><path d='M0 0 L7 0 L3.5 4 Z' fill='%23000'/></svg>");
}
::-webkit-scrollbar-button:horizontal:decrement {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7'><path d='M4 0 L4 7 L0 3.5 Z' fill='%23000'/></svg>");
}
::-webkit-scrollbar-button:horizontal:increment {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='7'><path d='M0 0 L0 7 L4 3.5 Z' fill='%23000'/></svg>");
}
::-webkit-scrollbar-button:active {
    box-shadow: inset 1px 1px 0 #808080;
    border-color: #000 #fff #fff #000;
    background-position: calc(50% + 1px) calc(50% + 1px);
}
::-webkit-scrollbar-corner {
    background-color: #c0c0c0;
}

body {
    font-family: "MS Sans Serif", "Arial", sans-serif;
    font-size: 10pt;
    margin: 0;
    padding: 0;
    background: #c0c0c0;
}

#container { margin: 0 16px 16px; }

#sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #c0c0c0;
}

#app {
    padding-top: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #000;
    display: flex;
    gap: 4px;
    align-items: center;
}
#app .app-spacer { margin-left: auto; }

.hlp-header {
    background: linear-gradient(to right, #00007f, #1084d0);
    color: #fff;
    padding: 6px;
    font-size: 9pt;
    border: 1px solid #000;
    border-top: none;
}
.hlp-header-file { font-weight: bold; }
.hlp-header-page { color: #ddd; }

.hlp-toolbar {
    display: flex;
    padding: 6px;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #fff;
}
.hlp-toolbar button {
    margin-right: 4px;
    padding: 2px 8px;
}
button.hlp-toolbar-right { margin-left: auto; margin-right: 0; }

.hlp-nsr {
    padding: 6px;
    border: 1px solid #000;
    border-top: none;
    background: #fff;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

#content {
    background: #fff;
    padding: 8px;
    border: 1px solid #000;
    border-top: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.hlp-para { margin: 0; tab-size: 8; clear: both; }
.hlp-para::before { content: '\200B'; }
.hlp-table { border-collapse: collapse; }
.hlp-table td { padding: 1px 3px; vertical-align: top; }

a.hlp-link-jump, a.hlp-link-jump span { color: #008000; text-decoration: underline; cursor: pointer; }
a.hlp-link-jump:visited, a.hlp-link-jump:visited span { color: #005000; }
a.hlp-link-popup, a.hlp-link-popup span { color: #008000; text-decoration: underline dotted; cursor: pointer; }
a.hlp-link-macro, a.hlp-link-macro span { color: #008000; cursor: pointer; }

#hlp-popup {
    position: fixed;
    background: #ffffcc;
    border: 1px solid #000;
    padding: 8px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    z-index: 100;
}

.hlp-welcome {
    text-align: center;
    padding: 48px 16px;
    color: #444;
}
.hlp-welcome h1 {
    font-size: 32pt;
    color: #000;
    margin: 0 0 8px 0;
}
.hlp-welcome-icon {
    vertical-align: middle;
    margin-right: 8px;
    image-rendering: pixelated;
}
.hlp-welcome p { margin: 4px 0; }
.hlp-welcome-btn {
    margin-top: 16px;
    padding: 8px 24px;
    font-size: 12pt;
    cursor: pointer;
}
.hlp-error-msg {
    color: #c0392b;
    font-size: 10pt;
    display: none;
    align-items: center;
    gap: 6px;
}
.hlp-error-msg.shown { display: inline-flex; }
.hlp-error-msg button {
    background: transparent;
    border: 1px solid #c0392b;
    color: #c0392b;
    cursor: pointer;
    width: 18px;
    height: 18px;
    padding: 0;
    line-height: 1;
    font-size: 11pt;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hlp-topics-item {
    display: flex;
    align-items: center;
    padding: 1px 0;
}
.hlp-topics-icon {
    margin-right: 4px;
    flex-shrink: 0;
    image-rendering: pixelated;
}
.hlp-topics-item a {
    color: #008000;
    text-decoration: none;
}
.hlp-topics-item a:visited { color: #005000; }
.hlp-topics-item a:hover { text-decoration: underline; }

.hlp-index-filter-wrap {
    display: flex;
}
.hlp-index-filter {
    flex: 1;
    padding: 4px;
    font-family: inherit;
    font-size: inherit;
}
.hlp-index-clear {
    margin-left: 4px;
    padding: 2px 8px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.hlp-dragover {
    outline: 3px dashed #008000;
    outline-offset: -3px;
}

#content img { image-rendering: pixelated; }

#footer {
    text-align: center;
    padding: 8px;
    color: #808080;
    font-size: 9pt;
}

.hlp-image-placeholder {
    display: inline-block;
    background: #eee;
    border: 1px solid #999;
    padding: 2px 6px;
    font-size: 8pt;
    color: #666;
}

@media print {
    body { background: #fff; }
    #container { margin: 0; }
    #sticky { position: static; }
    #app, .hlp-header, .hlp-toolbar, #footer { display: none; }
    .hlp-nsr { border: none; padding: 0 0 8px; }
    #content { border: none; padding: 0; }
    a { color: #000; text-decoration: none; }
}
