/* Help window layout (index.htm) */
:root {
  --blue: #3F69BE;
  --blue-dark: #2c4f96;
  --blue-light: #e8eef9;
  --border: #c9d3e6;
  --text: #1f2933;
  --muted: #5b6573;
  --side-width: 320px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--text);
  font: 13px/1.4 Arial, Helvetica, sans-serif;
}
button { font: inherit; }

/* Top bar */
.hl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--blue);
  color: #fff;
  flex: none;
}
.hl-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 17px; font-weight: bold; white-space: nowrap; }
.hl-brand img { width: 30px; height: 30px; }
.hl-menu { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 0 4px; }
.hl-search { margin-left: auto; flex: 0 1 320px; min-width: 0; }
.hl-search input {
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
}

/* Sidebar + content */
.hl-main { display: flex; flex: 1; min-height: 0; }
.hl-side {
  width: var(--side-width);
  flex: none;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #f7f9fc;
  min-height: 0;
}
.hl-tabs { display: flex; border-bottom: 1px solid var(--border); flex: none; }
.hl-tabs button {
  flex: 1;
  padding: 8px 4px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  cursor: pointer;
}
.hl-tabs button.hl-on { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: bold; }
.hl-panel { flex: 1; overflow: auto; padding: 8px 4px 16px; }
.hl-panel[hidden] { display: none; }

.hl-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hl-toolbar { display: flex; gap: 6px; padding: 5px 12px; border-bottom: 1px solid var(--border); flex: none; }
.hl-toolbar button {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
  color: var(--blue-dark);
  cursor: pointer;
}
.hl-toolbar button:disabled { color: #aab; cursor: default; }
.hl-spacer { flex: 1; }
#topic { flex: 1; width: 100%; border: 0; }

/* Contents tree */
.hl-tree, .hl-tree ul { list-style: none; margin: 0; padding: 0; }
.hl-tree ul { padding-left: 14px; }
.hl-tree li > ul { display: none; }
.hl-tree li.hl-open > ul { display: block; }
.hl-node {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.hl-node:hover { background: var(--blue-light); }
.hl-node.hl-current { background: var(--blue); color: #fff; }
.hl-twisty { flex: none; width: 12px; color: var(--muted); }
.hl-current .hl-twisty { color: #fff; }

/* Index, glossary, search results */
.hl-filter { width: calc(100% - 8px); margin: 0 4px 8px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 3px; }
.hl-key { padding: 3px 6px; cursor: pointer; border-radius: 3px; }
.hl-key:hover { background: var(--blue-light); }
.hl-key.hl-sub { padding-left: 20px; }
.hl-key-pages { margin: 0 0 4px 20px; }
.hl-key-pages a, .hl-result a { display: block; padding: 2px 6px; color: var(--blue-dark); text-decoration: none; }
.hl-key-pages a:hover, .hl-result a:hover { text-decoration: underline; }
.hl-term { padding: 4px 6px; cursor: pointer; font-weight: bold; color: var(--blue-dark); }
.hl-def { padding: 0 6px 8px 14px; color: var(--text); }
.hl-result { padding: 4px 2px 8px; border-bottom: 1px solid #eef1f6; }
.hl-result a { font-weight: bold; padding-left: 4px; }
.hl-snippet { padding: 2px 4px 0; color: var(--muted); }
.hl-snippet mark { background: #fff2a8; color: inherit; }
.hl-note { padding: 6px; color: var(--muted); }

/* Phones and narrow windows: the sidebar slides over the topic */
@media (max-width: 760px) {
  .hl-menu { display: block; }
  .hl-top { padding: 6px 10px; gap: 8px; }
  .hl-brand span { display: none; }
  .hl-side {
    position: fixed;
    top: 48px;
    bottom: 0;
    left: 0;
    width: min(var(--side-width), 88vw);
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
  }
  body.hl-side-open .hl-side { transform: none; }
  .hl-toolbar { padding: 5px 10px; }
}
