/* Eleonora Help: the user manual's window (help/index.html). Light and dark follow Eleonora's own
   switch (it sets what the window takes the system's mode to be). */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --side: #f5f6f8;
  --text: #1d1f23;
  --muted: #5d636d;
  --line: #dde1e6;
  --accent: #1a5fb4;
  --mark: #fff1a8;
  --note: #eef4fc;
  --warn: #fff4e5;
  --code: #f1f3f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1d20;
    --side: #232529;
    --text: #e6e7ea;
    --muted: #a3a8b1;
    --line: #363a40;
    --accent: #7fb0ff;
    --mark: #5c4d00;
    --note: #1e2a3a;
    --warn: #3a2c16;
    --code: #2a2d32;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
#bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--side);
}
#home { font-weight: 600; text-decoration: none; color: var(--text); white-space: nowrap; }
#q {
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
#menu-btn { display: none; border: 0; background: none; font-size: 20px; color: var(--text); cursor: pointer; }
#wrap { flex: 1; display: flex; min-height: 0; }
#toc {
  width: 280px;
  flex: none;
  overflow-y: auto;
  padding: 12px 0 24px;
  border-right: 1px solid var(--line);
  background: var(--side);
  font-size: 14px;
}
#toc .part { margin: 14px 16px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
#toc a { display: block; padding: 3px 16px 3px 24px; color: var(--text); text-decoration: none; }
#toc a:hover { background: var(--line); }
#toc a.here { color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 var(--accent); }
#page { flex: 1; overflow-y: auto; padding: 24px 40px 64px; outline: none; }
#page > * { max-width: 820px; }
h1 { font-size: 26px; margin: 0 0 12px; }
h2 { font-size: 19px; margin: 28px 0 8px; }
h2 .when { font-size: 14px; font-weight: 400; color: var(--muted, #667); }
h3 { font-size: 16px; margin: 20px 0 6px; }
p, li { margin: 6px 0; }
ul, ol { padding-left: 22px; }
kbd {
  font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--code);
  white-space: nowrap;
}
code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code); padding: 1px 4px; border-radius: 4px; }
pre { background: var(--code); padding: 10px 12px; border-radius: 6px; overflow-x: auto; }
pre code { padding: 0; background: none; }
table { border-collapse: collapse; margin: 10px 0; width: 100%; }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--side); }
.ui { font-weight: 600; }
.note, .warn { padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.note { background: var(--note); }
.warn { background: var(--warn); }
.see { color: var(--muted); font-size: 14px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
mark { background: var(--mark); color: inherit; }
.hit { margin: 0 0 18px; }
.hit a { font-weight: 600; }
.hit p { margin: 2px 0; color: var(--muted); font-size: 14px; }
.index-letter { margin-top: 18px; }
.index-list { columns: 2 260px; padding: 0; list-style: none; }
ul.columns { columns: 2 300px; }
ul.columns li { break-inside: avoid; }
.index-list li { break-inside: avoid; }
.loading { color: var(--muted); }
@media (max-width: 760px) {
  #menu-btn { display: block; }
  #toc { position: absolute; top: 49px; bottom: 0; left: 0; z-index: 5; display: none; box-shadow: 4px 0 12px rgba(0,0,0,.2); }
  body.toc-open #toc { display: block; }
  #page { padding: 16px; }
  #q { max-width: none; }
}
@media print {
  #bar, #toc, .pager { display: none; }
  #page { overflow: visible; }
}

/* accessibility (as the main window's base.css) */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }
:where(a, button, input, [tabindex]):focus-visible { outline: 2px solid #1a5fd0; outline-offset: 2px; }
#page:focus-visible { outline: 2px solid #1a5fd0; outline-offset: -2px; }
@media (prefers-color-scheme: dark) { :where(a, button, input, [tabindex]):focus-visible, #page:focus-visible { outline-color: #7fb0ff; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { #toc a.here { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
