/* typography.css - the prose contract */
html {
  font-size: var(--fs);
}

body {
  font-family: var(--font-body);
  line-height: var(--lh);
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
a:hover {
  text-decoration-thickness: 2px;
}

.muted,
.dim,
.top-dim {
  color: var(--muted);
}

.title,
.body h1,
.body h2,
.body h3,
.body h4,
.body h5,
.body h6,
.panel-title,
.sec-title,
.pick-title {
  font-family: var(--font-ui);
  line-height: var(--lh-tight);
  margin: 0;
}

.title {
  font-size: var(--h1);
  letter-spacing: -0.01em;
}

.body {
  font-size: 1rem;
}

.meta-line,
.panel-sub,
.pick-sub,
.pick-summary,
.parents-title,
.child-links-title,
.empty-note,
.footer,
.top-meta {
  font-family: var(--font-ui);
}

.meta-line {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Markdown inside .body */
.body p {
  margin: 0 0 var(--s2) 0;
}
.body br {
  line-height: 0;
}

.body em {
  font-style: italic;
}
.body strong {
  font-weight: 700;
}

.body h1 {
  font-size: var(--h1);
  margin: var(--s4) 0 var(--s2) 0;
}
.body h2 {
  font-size: var(--h2);
  margin: var(--s4) 0 var(--s2) 0;
}
.body h3 {
  font-size: var(--h3);
  margin: var(--s3) 0 var(--s1) 0;
}
.body h4 {
  font-size: var(--h4);
  margin: var(--s3) 0 var(--s1) 0;
}
.body h5,
.body h6 {
  font-size: 1rem;
  margin: var(--s2) 0 var(--s1) 0;
}

.body ul,
.body ol {
  margin: 0 0 var(--s2) 0;
  padding-left: 1.25em;
  font-size: 1rem; /* list size = paragraph size */
}

.body li {
  margin: 0 0 var(--s-1) 0;
}

.body hr {
  border: 0;
  border-top: var(--rule-w) solid var(--rule);
  margin: var(--s4) 0;
}

.body blockquote {
  margin: 0 0 var(--s2) 0;
  padding: var(--s1) var(--s2);
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

.body code {
  font-family: var(--font-mono);
  font-size: var(--code-fs);
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: var(--r1);
}

.body pre,
.pre,
.df-pre {
  font-family: var(--font-mono);
  font-size: var(--code-fs);
  background: var(--code-bg);
  padding: var(--pre-pad);
  border-radius: var(--r1);
  overflow-x: auto;
}

.body pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.body img {
  max-width: 100%;
  height: auto;
  margin: var(--s2) 0;
}

.body table {
  width: 100%;
  margin: var(--s2) 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.body th,
.body td {
  padding: 10px 10px;
  border-bottom: var(--rule-w) solid var(--rule);
  vertical-align: top;
}

.body thead th {
  border-bottom: 2px solid var(--rule);
}

/* Optional/common raw HTML cases */
.body figure {
  margin: var(--s2) 0;
}
.body figcaption {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: var(--s0);
}

.alias-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.child-title-link.is-scroll-lit {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
