/* NamLab appearance system: light / dark / system.
   Semantic color tokens are shared by Blog, Papers, Series and research tools. */
:root {
  color-scheme: light;
  --site-bg: #ffffff;
  --site-text: #333332;
  --site-muted: #626b69;
  --site-surface: #ffffff;
  --site-elevated: #ffffff;
  --site-subtle: #f8f9f8;
  --site-sidebar: #f1f1f1;
  --site-border: #d9dfe4;
  --site-input-border: #bfc9c5;
  --site-link: #0b1fef;
  --site-visited: #2986cc;
  --site-hover: #ee0000;
  --site-focus: #2563eb;
  --site-code-bg: #efefef;
  --site-code-text: #333332;
  --site-quote-bg: #dcedf6;
  --site-quote-border: #76b9dc;
  --site-danger: #b42318;
  --site-danger-bg: #fff0ee;
  --site-info-bg: #edf5ff;
  --site-info-border: #9fc2e7;
  --site-info-text: #214b7c;
  --papers-link: #24756e;
  --papers-link-hover: #174f49;
  --papers-accent: #2b746d;
  --papers-accent-hover: #1f5e58;
  --on-action: #ffffff;
  --tool-bg: #f4f7fb;
  --tool-action: #155bd7;
  --tool-action-hover: #104aac;
  --tool-link: #235aa4;
  --tool-muted: #60738c;
  --tool-eyebrow: #36659c;
  --tool-card-bg: #f6f9fd;
  --tool-select-bg: #eaf2ff;
  --tool-soft-bg: #eff5ff;
  --tool-focus: #87b3ff;
  --tool-heading: #1c56a6;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --site-bg: #101720;
  --site-text: #e5edf6;
  --site-muted: #a5b2c2;
  --site-surface: #182432;
  --site-elevated: #1d2a39;
  --site-subtle: #202f40;
  --site-sidebar: #1a2837;
  --site-border: #3a4a5d;
  --site-input-border: #62738a;
  --site-link: #9abfff;
  --site-visited: #b3c7fb;
  --site-hover: #ffd08b;
  --site-focus: #9cc7ff;
  --site-code-bg: #1b2735;
  --site-code-text: #e5edf6;
  --site-quote-bg: #172f43;
  --site-quote-border: #6cadcf;
  --site-danger: #ffafa7;
  --site-danger-bg: #482b30;
  --site-info-bg: #203956;
  --site-info-border: #567ea4;
  --site-info-text: #d1e8ff;
  --papers-link: #8ad5ca;
  --papers-link-hover: #c9f5ec;
  --papers-accent: #2b786f;
  --papers-accent-hover: #368e84;
  --on-action: #ffffff;
  --tool-bg: #141e2a;
  --tool-action: #356fda;
  --tool-action-hover: #4b83e9;
  --tool-link: #a5c8ff;
  --tool-muted: #a9b9d0;
  --tool-eyebrow: #a8cafa;
  --tool-card-bg: #1b2b40;
  --tool-select-bg: #243c59;
  --tool-soft-bg: #223853;
  --tool-focus: #aacbff;
  --tool-heading: #adcfff;
}
html { background: var(--site-bg); }
body { background: var(--site-bg); color: var(--site-text); }
body, .page, .post, .article-author-side, .footer-wrap { color: var(--site-text); }
a { color: var(--site-link); }
a:visited { color: var(--site-visited); }
a:hover, a:focus-visible { color: var(--site-hover); }
hr { border-top-color: var(--site-border); border-bottom-color: var(--site-bg); }
.top-navigation li { border-bottom-color: var(--site-border); }
.rightside { background-color: var(--site-sidebar); color: var(--site-text); }
.article-author-side p, .meta, .entry-date { color: var(--site-muted); }
.nav .navtoggle { background: var(--site-text); color: var(--site-bg); }
.navicon-lines, .navicon-lines::before, .navicon-lines::after { background-color: currentColor; }
blockquote { border-left-color: var(--site-border); }
blockquote:not(.unstyled) { background-color: var(--site-quote-bg); }
pre.highlight, .highlight, .CodeRay, pre:not(.highlight) {
  background-color: var(--site-code-bg);
  color: var(--site-code-text);
}
:not(pre) > code { background-color: var(--site-code-bg); color: var(--site-code-text); }
.CodeRay .line-numbers, .CodeRay .no { background: var(--site-subtle); color: var(--site-muted); }
th, td { border-color: var(--site-border); }
:where(button, input, select, textarea):focus-visible, a:focus-visible {
  outline: 2px solid var(--site-focus);
  outline-offset: 2px;
}
mjx-container { color: inherit; }
html[data-theme="dark"] .highlight .c,
html[data-theme="dark"] .highlight .cm,
html[data-theme="dark"] .highlight .c1,
html[data-theme="dark"] .highlight .cp,
html[data-theme="dark"] .highlight .cs { color: #9aacbf; }
html[data-theme="dark"] .highlight .k,
html[data-theme="dark"] .highlight .kd,
html[data-theme="dark"] .highlight .kn,
html[data-theme="dark"] .highlight .kp,
html[data-theme="dark"] .highlight .kr,
html[data-theme="dark"] .highlight .kt { color: #d4b4ff; }
html[data-theme="dark"] .highlight .s,
html[data-theme="dark"] .highlight .s1,
html[data-theme="dark"] .highlight .s2,
html[data-theme="dark"] .highlight .se,
html[data-theme="dark"] .highlight .sr { color: #ffb5bb; }
html[data-theme="dark"] .highlight .m,
html[data-theme="dark"] .highlight .mi,
html[data-theme="dark"] .highlight .mf { color: #9ddaf4; }

/* Shared appearance/language controls in the existing Jekyll header. */
.navigation-wrapper { position: relative; }
.site-preferences {
  position: absolute; right: 8.33333%; top: 1.25rem; z-index: 5;
  display: flex; align-items: center; gap: 0.5rem;
}
.appearance-switcher, .language-switcher {
  display: flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 10px;
  border: 1px solid var(--site-border); background: var(--site-subtle);
  text-transform: none; box-sizing: border-box;
}
.language-switcher button {
  min-height: 34px; min-width: 34px; padding: 5px 8px;
  margin: 0; border: 0; border-radius: 7px;
  font: 700 0.84rem/1.2 system-ui, sans-serif;
  color: var(--site-muted); background: transparent; cursor: pointer;
}
.language-switcher button:hover { color: var(--site-text); background: var(--site-sidebar); }
.language-switcher button[aria-pressed="true"] {
  background: var(--site-surface); color: var(--site-text);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.appearance-switcher button {
  display: grid; place-items: center; width: 34px; height: 34px;
  margin: 0; padding: 7px; border: 0; border-radius: 7px;
  color: var(--site-muted); background: transparent; cursor: pointer;
}
.appearance-switcher button:hover { background: var(--site-sidebar); color: var(--site-text); }
.appearance-switcher button[aria-pressed="true"] {
  background: var(--site-surface); color: var(--site-text);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.appearance-switcher svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
@media (max-width: 740px) {
  .site-preferences {
    position: static; margin: 0 8.33333% 0.75rem;
    justify-content: flex-end; flex-wrap: wrap;
  }
}
@media (max-width: 380px) {
  .site-preferences { margin-right: 3%; }
  .appearance-switcher button { width: 30px; height: 30px; padding: 6px; }
  .language-switcher button { min-width: 30px; min-height: 30px; padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .appearance-switcher *, .appearance-switcher *::before, .appearance-switcher *::after,
  .language-switcher *, .language-switcher *::before, .language-switcher *::after { transition: none; }
}

/* Untranslated-content notice: only visible for an explicitly annotated source page. */
.content-language-note {
  box-sizing: border-box; max-width: 960px;
  margin: 0 0 1.25rem; padding: 0.8rem 1rem;
  border: 1px solid var(--site-border); border-left: 3px solid var(--site-focus);
  border-radius: 7px; background: var(--site-subtle); color: var(--site-text);
  font: 0.88rem/1.55 system-ui, sans-serif;
}
.content-language-note[hidden] { display: none !important; }
.content-language-note p { margin: 0; }
body.research-tool-page > .content-language-note { margin: 1rem auto; width: min(960px, calc(100% - 32px)); }
