/* picomath.org — restored 2026. Typographic shell only; page content is unchanged. */

:root {
  --bg:        #ffffff;
  --surface:   #f7f8fa;
  --border:    #e3e6ea;
  --text:      #1c1f24;
  --muted:     #5c6673;
  --link:      #2f5fd0;
  --link-hover:#1a3f9c;
  --accent:    #6d5bd0;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #10131a;
    --surface:   #171b24;
    --border:    #272d3a;
    --text:      #dfe3ea;
    --muted:     #98a2b3;
    --link:      #8ab0ff;
    --link-hover:#b3cbff;
    --accent:    #a594f9;
  }
}
:root[data-theme="dark"] {
  --bg:#10131a; --surface:#171b24; --border:#272d3a;
  --text:#dfe3ea; --muted:#98a2b3; --link:#8ab0ff; --link-hover:#b3cbff; --accent:#a594f9;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  padding: 0 16px;
}

h1, h2, h3, p, ul, pre, table, hr { max-width: 46rem; margin-left: auto; margin-right: auto; }

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 2.5rem auto 0.4rem;
  font-weight: 650;
}
h1 a { color: var(--text); text-decoration: none; }
h1 a:hover { color: var(--link); }

h2 {
  font-size: 1.25rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin: 2.4rem auto 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
h2 a { color: var(--accent); text-decoration: none; }
h2 a:hover { text-decoration: underline; }

h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin: 1.4rem auto 0.8rem;
}

p { margin: 0.9rem auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

em { color: var(--muted); }
strong { font-weight: 640; }

tt, code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

ul { padding-left: 1.3rem; margin: 0.9rem auto; }
li { margin: 0.3rem 0; }

/* Language + function index lists read as a reference index, not prose */
h2 + p + ul li,
ul li a[href$="index.html"] { font-variant-numeric: tabular-nums; }

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.5;
}
pre tt, pre code { background: none; border: none; padding: 0; }

/* Pygments-highlighted source blocks */
.highlight {
  max-width: 46rem;
  margin: 1.2rem auto 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.highlight pre {
  background: none;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 1rem 1.1rem;
  max-width: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .highlight pre { color: var(--text); }
  :root:not([data-theme="light"]) .highlight .c,
  :root:not([data-theme="light"]) .highlight .c1,
  :root:not([data-theme="light"]) .highlight .cm,
  :root:not([data-theme="light"]) .highlight .cp { color: #7f8ea3; font-style: italic; }
  :root:not([data-theme="light"]) .highlight .k,
  :root:not([data-theme="light"]) .highlight .kd,
  :root:not([data-theme="light"]) .highlight .kn,
  :root:not([data-theme="light"]) .highlight .kt { color: #c792ea; }
  :root:not([data-theme="light"]) .highlight .nf,
  :root:not([data-theme="light"]) .highlight .nb { color: #82aaff; }
  :root:not([data-theme="light"]) .highlight .s,
  :root:not([data-theme="light"]) .highlight .s1,
  :root:not([data-theme="light"]) .highlight .s2 { color: #c3e88d; }
  :root:not([data-theme="light"]) .highlight .mf,
  :root:not([data-theme="light"]) .highlight .mi,
  :root:not([data-theme="light"]) .highlight .m  { color: #f78c6c; }
  :root:not([data-theme="light"]) .highlight .o,
  :root:not([data-theme="light"]) .highlight .p  { color: #a7b2c4; }
}

.site-footer {
  max-width: 46rem;
  margin: 3.5rem auto 3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--link); }

@media (max-width: 600px) {
  body { font-size: 15px; padding: 0 16px; }
  h1 { font-size: 1.55rem; margin-top: 1.8rem; }
  h2 { font-size: 1.12rem; }
  .highlight pre { padding: 0.8rem; font-size: 0.8rem; }
}
