/* Syntax highlighting — scoped to data-theme + .post-content so colors
   always win over any competing rule in main.css or mdtable.css. */

/* ── Shared layout reset ────────────────────────────────────── */
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 0;
  background: transparent;
}

/* ── Light theme ────────────────────────────────────────────── */
html[data-theme="light"] .post-content .hljs            { color: #24292e; }
html[data-theme="light"] .post-content .hljs-keyword,
html[data-theme="light"] .post-content .hljs-template-tag,
html[data-theme="light"] .post-content .hljs-type,
html[data-theme="light"] .post-content .hljs-variable.language_  { color: #d73a49; }
html[data-theme="light"] .post-content .hljs-title,
html[data-theme="light"] .post-content .hljs-title.class_,
html[data-theme="light"] .post-content .hljs-title.class_.inherited__,
html[data-theme="light"] .post-content .hljs-title.function_     { color: #6f42c1; }
html[data-theme="light"] .post-content .hljs-attr,
html[data-theme="light"] .post-content .hljs-attribute,
html[data-theme="light"] .post-content .hljs-literal,
html[data-theme="light"] .post-content .hljs-number,
html[data-theme="light"] .post-content .hljs-operator,
html[data-theme="light"] .post-content .hljs-variable            { color: #005cc5; }
html[data-theme="light"] .post-content .hljs-string,
html[data-theme="light"] .post-content .hljs-regexp              { color: #032f62; }
html[data-theme="light"] .post-content .hljs-built_in,
html[data-theme="light"] .post-content .hljs-symbol              { color: #e36209; }
html[data-theme="light"] .post-content .hljs-comment,
html[data-theme="light"] .post-content .hljs-code,
html[data-theme="light"] .post-content .hljs-formula             { color: #6a737d; font-style: italic; }
html[data-theme="light"] .post-content .hljs-tag,
html[data-theme="light"] .post-content .hljs-name,
html[data-theme="light"] .post-content .hljs-selector-tag        { color: #22863a; }
html[data-theme="light"] .post-content .hljs-section             { color: #005cc5; font-weight: 700; }
html[data-theme="light"] .post-content .hljs-emphasis            { font-style: italic; }
html[data-theme="light"] .post-content .hljs-strong              { font-weight: 700; }
html[data-theme="light"] .post-content .hljs-addition            { color: #22863a; background: #f0fff4; }
html[data-theme="light"] .post-content .hljs-deletion            { color: #b31d28; background: #ffeef0; }

/* ── Dark theme ─────────────────────────────────────────────── */
html[data-theme="dark"] .post-content .hljs            { color: #c9d1d9; }
html[data-theme="dark"] .post-content .hljs-keyword,
html[data-theme="dark"] .post-content .hljs-template-tag,
html[data-theme="dark"] .post-content .hljs-type,
html[data-theme="dark"] .post-content .hljs-variable.language_   { color: #ff7b72; }
html[data-theme="dark"] .post-content .hljs-title,
html[data-theme="dark"] .post-content .hljs-title.class_,
html[data-theme="dark"] .post-content .hljs-title.class_.inherited__,
html[data-theme="dark"] .post-content .hljs-title.function_      { color: #d2a8ff; }
html[data-theme="dark"] .post-content .hljs-attr,
html[data-theme="dark"] .post-content .hljs-attribute,
html[data-theme="dark"] .post-content .hljs-literal,
html[data-theme="dark"] .post-content .hljs-number,
html[data-theme="dark"] .post-content .hljs-operator,
html[data-theme="dark"] .post-content .hljs-variable             { color: #79c0ff; }
html[data-theme="dark"] .post-content .hljs-string,
html[data-theme="dark"] .post-content .hljs-regexp               { color: #a5d6ff; }
html[data-theme="dark"] .post-content .hljs-built_in,
html[data-theme="dark"] .post-content .hljs-symbol               { color: #ffa657; }
html[data-theme="dark"] .post-content .hljs-comment,
html[data-theme="dark"] .post-content .hljs-code,
html[data-theme="dark"] .post-content .hljs-formula              { color: #8b949e; font-style: italic; }
html[data-theme="dark"] .post-content .hljs-tag,
html[data-theme="dark"] .post-content .hljs-name,
html[data-theme="dark"] .post-content .hljs-selector-tag         { color: #7ee787; }
html[data-theme="dark"] .post-content .hljs-section              { color: #1f6feb; font-weight: 700; }
html[data-theme="dark"] .post-content .hljs-emphasis             { font-style: italic; }
html[data-theme="dark"] .post-content .hljs-strong               { font-weight: 700; }
html[data-theme="dark"] .post-content .hljs-addition             { color: #aff5b4; background: #033a16; }
html[data-theme="dark"] .post-content .hljs-deletion             { color: #ffdcd7; background: #67060c; }
