/* ── Article prose ───────────────────────────────────────────── */
.article-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #1e293b;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5 {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 1.75em 0 0.6em;
}

.article-content h1 { font-size: 1.875rem; margin-top: 0.25em; }
.article-content h2 { font-size: 1.375rem; }
.article-content h3 { font-size: 1.125rem; }
.article-content h4 { font-size: 1rem; }

.article-content h1 a,
.article-content h2 a,
.article-content h3 a,
.article-content h4 a { color: inherit; text-decoration: none; }

.article-content p {
  margin: 0.9em 0 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.5em;
  margin: 0.6em 0;
}

.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content ul ul { list-style-type: circle; }
.article-content ul ul ul { list-style-type: square; }

.article-content li { line-height: 1.75; }
.article-content li ul,
.article-content li ol { margin-left: 0.25em; }

/* ── Links ──────────────────────────────────────────────────── */
.article-content a {
  color: #4f46e5;
  text-decoration: underline;
  text-decoration-color: #c7d2fe;
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.article-content a:hover {
  color: #4338ca;
  text-decoration-color: #4338ca;
}

/* ── Code ───────────────────────────────────────────────────── */
.article-content pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1em 1.25em;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.25em 0;
}

.article-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
}

.article-content p code,
.article-content li code,
.article-content td code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
}

/* ── Blockquote ─────────────────────────────────────────────── */
.article-content blockquote {
  border-left: 3px solid #c7d2fe;
  margin: 1.25em 0;
  padding: 0.25em 1.25em;
  color: #475569;
}

.article-content blockquote p { color: inherit; }

.article-content blockquote cite {
  font-size: 0.875rem;
  color: #94a3b8;
}

.article-content blockquote cite::before { content: '\2014\00A0'; }

/* ── Images ─────────────────────────────────────────────────── */
.article-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: block;
  margin: 1.5em 0;
}

/* ── Tables ─────────────────────────────────────────────────── */
.article-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25em 0;
  font-size: 0.9rem;
}

.article-content table tr { border-bottom: 1px solid #e2e8f0; }
.article-content table tr:nth-child(even) { background: #f8fafc; }

.article-content table th,
.article-content table td {
  padding: 0.5em 0.875em;
  text-align: left;
}

.article-content table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}

/* ── HR ─────────────────────────────────────────────────────── */
.article-content hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

/* ── TOC ────────────────────────────────────────────────────── */
.article-content .toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.875em 1.25em 0.875em 1.5em;
  display: inline-block;
  min-width: 200px;
  margin: 1em 0 1.5em;
  font-size: 0.9rem;
}

.article-content .toc ul { list-style-type: none; padding-left: 0.75em; margin: 0; }
.article-content .toc > ul { padding-left: 0; }
.article-content .toc li { line-height: 1.9; }
.article-content .toc a { color: #475569; text-decoration: none; }
.article-content .toc a:hover { color: #4f46e5; }

/* ── Admonitions ────────────────────────────────────────────── */
.article-content div.admonition {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin: 1.25em 0;
  padding: 0.625em 1.25em;
}

.article-content p.admonition-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0 0 0.25em;
}

.article-content div.note,
.article-content div.important { background: #f0fdf4; border-color: #bbf7d0; }
.article-content div.note p.admonition-title,
.article-content div.important p.admonition-title { color: #15803d; }

.article-content div.warning,
.article-content div.caution,
.article-content div.attention { background: #fffbeb; border-color: #fde68a; }
.article-content div.warning p.admonition-title,
.article-content div.caution p.admonition-title,
.article-content div.attention p.admonition-title { color: #b45309; }

.article-content div.danger,
.article-content div.error { background: #fff1f2; border-color: #fecdd3; }
.article-content div.danger p.admonition-title,
.article-content div.error p.admonition-title { color: #be123c; }

.article-content div.hint,
.article-content div.tip { background: #eff6ff; border-color: #bfdbfe; }
.article-content div.hint p.admonition-title,
.article-content div.tip p.admonition-title { color: #1d4ed8; }

/* ── Pygments code highlight ────────────────────────────────── */

pre { line-height: 125%; }
td.linenos .normal { color: #666666; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #666666; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f0f0f0; }
.highlight .c { color: #60A0B0; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #F00 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666 } /* Operator */
.highlight .ch { color: #60A0B0; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #60A0B0; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #60A0B0; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #60A0B0; font-style: italic } /* Comment.Single */
.highlight .cs { color: #60A0B0; background-color: #FFF0F0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #F00 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888 } /* Generic.Output */
.highlight .gp { color: #C65D09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #04D } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #40A070 } /* Literal.Number */
.highlight .s { color: #4070A0 } /* Literal.String */
.highlight .na { color: #4070A0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0E84B5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60ADD5 } /* Name.Constant */
.highlight .nd { color: #555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #D55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287E } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0E84B5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #BB60D5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #BBB } /* Text.Whitespace */
.highlight .mb { color: #40A070 } /* Literal.Number.Bin */
.highlight .mf { color: #40A070 } /* Literal.Number.Float */
.highlight .mh { color: #40A070 } /* Literal.Number.Hex */
.highlight .mi { color: #40A070 } /* Literal.Number.Integer */
.highlight .mo { color: #40A070 } /* Literal.Number.Oct */
.highlight .sa { color: #4070A0 } /* Literal.String.Affix */
.highlight .sb { color: #4070A0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070A0 } /* Literal.String.Char */
.highlight .dl { color: #4070A0 } /* Literal.String.Delimiter */
.highlight .sd { color: #4070A0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070A0 } /* Literal.String.Double */
.highlight .se { color: #4070A0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070A0 } /* Literal.String.Heredoc */
.highlight .si { color: #70A0D0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #C65D09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070A0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06287E } /* Name.Function.Magic */
.highlight .vc { color: #BB60D5 } /* Name.Variable.Class */
.highlight .vg { color: #BB60D5 } /* Name.Variable.Global */
.highlight .vi { color: #BB60D5 } /* Name.Variable.Instance */
.highlight .vm { color: #BB60D5 } /* Name.Variable.Magic */
.highlight .il { color: #40A070 } /* Literal.Number.Integer.Long */