/* qe-libs.org shared theme.
 *
 * Deployed to the site root as /theme.css by the `pages` job (.gitlab-ci.yml)
 * and linked by every sub page (cran/, py/, npm/, mcp/, conan/, julia/).
 * scripts/landing.py inlines the tokens below into the root index.html, so
 * the landing page and the sub pages share one palette, light and dark.
 */
:root {
  --bg: #ffffff; --fg: #1f2328; --muted: #59636e; --faint: #818b98;
  --line: #d1d9e0; --card: #ffffff; --code: #f6f8fa; --link: #0969da;
  --dev-bg: #fff8c5; --dev-fg: #6b4e00; --rel-bg: #dafbe1; --rel-fg: #1a7f37;
  --r: #276dc3; --py: #3572a5; --jl: #9558b2; --js: #cb3837; --cpp: #00599c; --mcp: #57606a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --fg: #e6edf3; --muted: #9198a1; --faint: #6e7681;
    --line: #30363d; --card: #151b23; --code: #1f2630; --link: #4493f8;
    --dev-bg: #3a2f00; --dev-fg: #f2cc60; --rel-bg: #0f3d1f; --rel-fg: #56d364;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --fg: #e6edf3; --muted: #9198a1; --faint: #6e7681;
  --line: #30363d; --card: #151b23; --code: #1f2630; --link: #4493f8;
  --dev-bg: #3a2f00; --dev-fg: #f2cc60; --rel-bg: #0f3d1f; --rel-fg: #56d364;
  color-scheme: dark;
}
/* -- end tokens (landing.py inlines everything above this line) -- */

* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 960px; padding: 2.5em 16px 2em;
       background: var(--bg); color: var(--fg);
       font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0.2em 0 0.2em; font-size: 1.9em; letter-spacing: -0.01em; }
h2 { margin-top: 1.8em; font-size: 1.3em; padding-bottom: 0.25em; border-bottom: 1px solid var(--line); }
small, .muted, .updated { color: var(--faint); }
.updated { font-size: 0.85em; margin-top: 2em; }
.sub, .meta, .facts, .note, .summary { color: var(--muted); }
.sub { margin-top: 0; }
.meta, .facts { font-size: 0.9em; }
.note { font-size: 0.85em; }
.summary { font-size: 1.1em; margin: 0.3em 0; }
.crumbs { font-size: 0.85em; color: var(--faint); }
.label { margin: 1em 0 0.3em; font-size: 0.85em; font-weight: 600; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); }
img { max-width: 100%; }

code, pre { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: var(--code); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 6px;
      padding: 0.7em 0.9em; overflow-x: auto; white-space: pre-wrap; position: relative; }
pre code { background: none; padding: 0; }
blockquote { border-left: 3px solid var(--line); margin: 0; padding-left: 1em; color: var(--muted); }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin-top: 1.2em; }
th, td { text-align: left; padding: 0.45em 0.8em; border-bottom: 1px solid var(--line);
         font-size: 0.9em; vertical-align: top; }
th { background: var(--code); font-weight: 600; }
th small { font-weight: normal; }
td code { white-space: nowrap; }

.badge { display: inline-block; font: 11.5px/1.4 ui-monospace, monospace;
         padding: 0.1em 0.45em; border-radius: 4px; white-space: nowrap;
         background: var(--link); color: #fff; }
.badge.rel { background: var(--rel-bg); color: var(--rel-fg); }
.badge.dev { background: var(--dev-bg); color: var(--dev-fg); }
.legend { display: flex; gap: 2em; flex-wrap: wrap; margin-top: 0.8em;
          font-size: 0.85em; color: var(--muted); }

.install, .renamed { background: var(--card); border: 1px solid var(--line);
                     border-radius: 10px; padding: 1em 1.2em; margin: 1em 0; }
.renamed { background: var(--dev-bg); color: var(--dev-fg); border-color: transparent; }
.download { display: inline-block; background: var(--link); color: #fff;
            font-weight: 600; padding: 0.55em 1.1em; border-radius: 6px; margin-top: 0.4em; }
.download:hover { filter: brightness(1.1); text-decoration: none; }
.copy-btn { position: absolute; top: 6px; right: 6px; font: 11px/1 sans-serif;
            border: 1px solid var(--line); background: var(--card); color: var(--muted);
            border-radius: 5px; padding: 4px 7px; cursor: pointer; }

details { margin-top: 2em; }
summary { cursor: pointer; font-weight: 600; }
footer { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--line);
         font-size: 0.85em; color: var(--faint); }
