/*
 * Minimal stylesheet for distribution HTML (Sphinx ``basic`` theme).
 * No layout chrome beyond typography and links — suitable for lynx/elinks
 * (CSS ignored) and graphical browsers. Light / dark via prefers-color-scheme.
 *
 * Accent: #f15a24 (zsh-ish orange); dark mode uses a lighter valuation.
 */

:root {
  --zsh-fg: #1a1a1a;
  --zsh-bg: #fafafa;
  --zsh-muted: #555;
  --zsh-border: #ccc;
  --zsh-accent: #f15a24;
  --zsh-accent-visited: #c44a1c;
  --zsh-code-bg: #f0f0f0;
  --zsh-pre-bg: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --zsh-fg: #e8e8e8;
    --zsh-bg: #1c1c1c;
    --zsh-muted: #aaa;
    --zsh-border: #444;
    --zsh-accent: #ff7a4d; /* lighter valuation of #f15a24 */
    --zsh-accent-visited: #f15a24;
    --zsh-code-bg: #2a2a2a;
    --zsh-pre-bg: #252525;
  }
}

html {
  color-scheme: light dark;
}

body {
  margin: 1.5em auto;
  padding: 0 1em 2em;
  max-width: 50em;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--zsh-fg);
  background: var(--zsh-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: bold;
  line-height: 1.25;
  color: var(--zsh-fg);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; margin-top: 1.5em; }
h3 { font-size: 1.15rem; }

a {
  color: var(--zsh-accent);
}

a:visited {
  color: var(--zsh-accent-visited);
}

a:hover, a:focus {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid var(--zsh-border);
}

code, tt, kbd, samp,
.literal .pre {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 0.9em;
}

code,
tt,
span.pre {
  background: var(--zsh-code-bg);
  padding: 0.05em 0.25em;
}

pre,
div.highlight,
div.parsed-literal,
pre.literal-block {
  background: var(--zsh-pre-bg);
  border: 1px solid var(--zsh-border);
  padding: 0.75em 1em;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}

pre a,
div.parsed-literal a {
  /* keep accent links readable inside examples */
  color: var(--zsh-accent);
}

div.related,
div.footer {
  font-size: 0.85rem;
  color: var(--zsh-muted);
  margin-top: 2em;
}

div.related ul {
  padding: 0;
  list-style: none;
}

div.related li {
  display: inline;
  margin-right: 1em;
}

table.docutils {
  border-collapse: collapse;
  margin: 1em 0;
}

table.docutils th,
table.docutils td {
  border: 1px solid var(--zsh-border);
  padding: 0.3em 0.6em;
}

/* Metavariables (:var: / <var>) — italic; inherit color */
var {
  font-style: italic;
  font-family: inherit;
}

/* Hide Sphinx's headerless sidebar husk when nosidebar is set but
   related/footer remain. */
div.sphinxsidebar {
  display: none;
}

div.document {
  width: auto;
  margin: 0;
}

div.bodywrapper {
  margin: 0;
}

div.body {
  max-width: none;
  padding: 0;
}
