/* Minimal, elegant RTL theme for Persian content */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1f2937;
  --muted: #6b7280;
  --primary: #0ea5e9;
  --border: #e5e7eb;
  --card: #f9fafb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --primary: #38bdf8;
    --border: #1f2937;
    --card: #0f172a;
  }
}
html {
  font-size: 16px;
}
body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: 960px;
  line-height: 1.85;
  background: var(--bg);
  color: var(--fg);
  font-family: 
    system-ui, -apple-system, Segoe UI, "Vazirmatn", "IRANSans", Roboto, Helvetica, Arial, "Noto Naskh Arabic", "Tahoma", sans-serif;
}
/* Layout */
.container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
header.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}
header.page-header h1 {
  margin: 0 0 .25rem 0;
  font-size: 1.75rem;
}
header.page-header .subtitle {
  color: var(--muted);
  font-size: .95rem;
}
/* Typography */
h1, h2, h3, h4 {
  line-height: 1.4;
  margin: 2rem 0 0.75rem;
}
h2 {
  font-size: 1.4rem;
  border-right: .25rem solid var(--primary);
  padding-right: .6rem;
}
h3 {
  font-size: 1.15rem;
  color: var(--primary);
}
p, ul, ol {
  margin: .5rem 0 1rem;
}
ul {
  list-style: none;
  padding: 0;
}
ul li {
  position: relative;
  padding-right: 1.2rem;
  margin: .35rem 0;
}
ul li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.9rem;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--primary);
  opacity: .8;
}
blockquote {
  margin: 1rem 0;
  padding: 1rem 1rem 1rem 1rem;
  border-right: 4px solid var(--primary);
  background: color-mix(in oklab, var(--primary) 6%, var(--card));
}
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Vazirmatn Code", monospace;
}
code {
  background: color-mix(in oklab, var(--primary) 8%, var(--card));
  padding: .15rem .4rem;
  border-radius: .35rem;
}
pre {
  overflow-x: auto;
  background: color-mix(in oklab, var(--primary) 6%, var(--card));
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: .75rem;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
/* TOC */
nav.toc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}
nav.toc .toc-title {
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .5rem;
}
/* Footer */
footer.page-footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: .9rem;
}



