/* The blog: what its pages need beyond app.css. The list of posts follows the rest of the site.
   A paper keeps its own typesetting. Every rule for it starts with article.paper, so the site's rules
   for headings, tables and figures do not reach inside it, and its own names do not leak out. */

/* The way back to the list, on the line of the tab. */
.trail { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.trail a { font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.trail a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* The list of posts. */
.head h1 { font-size: clamp(34px, 4.7vw, 64px); letter-spacing: -0.025em; }
.head h1 .a { color: var(--gold-ink); }
.posts { list-style: none; margin: clamp(26px, 3.6vw, 52px) 0 0; padding: 0; border-bottom: 1px solid rgba(23, 20, 15, .3); }
.posts li { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px clamp(18px, 4vw, 64px); align-items: start; padding: 22px 0 28px; border-top: 1px solid rgba(23, 20, 15, .3); }
.posts h2 { font-size: clamp(27px, 3.3vw, 46px); line-height: 1.06; letter-spacing: -0.022em; text-wrap: balance; }
.posts h2 a { text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.posts time { display: block; font-size: 14.5px; font-weight: 700; color: var(--gold-ink); }
.posts p { margin: 6px 0 14px; font-size: 16.5px; line-height: 1.55; color: var(--body); }
.posts .more { font-weight: 700; text-decoration: none; }
.posts .more:hover { text-decoration: underline; text-underline-offset: 5px; }

/* A paper, set the way a printed one is: no boxes, the theorem's name run in before its statement.
   The article is a column of reading width inside its card. */
article.paper {
  --bg: var(--paper); --body: #2f2b24; --rule: #8f887a; --gold-deep: #85651b; --gold-soft: #f4ead2;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  max-width: 700px; margin: 0 auto; padding-top: clamp(20px, 3vw, 44px); background: none;
  font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink);
}
article.paper h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 4.6vw, 50px); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 14px; text-wrap: balance; }
article.paper .dek { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.35; color: var(--body); margin: 0 0 10px; }
article.paper .byline { font-family: var(--serif); color: var(--muted); font-size: 18px; margin: 0 0 44px; }
article.paper p, article.paper li { font-family: var(--serif); font-size: 20.5px; line-height: 1.58; color: var(--body); font-variant-numeric: lining-nums; }
article.paper p { margin: 0 0 20px; }
article.paper b { font-weight: 600; color: var(--ink); }
article.paper .abstract { margin: 0 32px 8px; font-size: 19px; line-height: 1.55; }
article.paper h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(25px, 2.8vw, 29px); line-height: 1.2; letter-spacing: normal; margin: 52px 0 16px; }
article.paper h2 .n { display: inline; font-variant-numeric: lining-nums; margin-right: 16px; }
article.paper h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; letter-spacing: normal; margin: 32px 0 10px; }
article.paper a { color: var(--gold-deep); text-underline-offset: 3px; }
article.paper ul { margin: 0 0 20px; padding-left: 24px; }
article.paper li { margin-bottom: 8px; }
article.paper dl { display: block; margin: 0 0 20px; font-family: var(--serif); font-size: 20.5px; line-height: 1.58; color: var(--body); }
article.paper dt { font-weight: 600; color: var(--ink); }
article.paper dd { margin: 0 0 8px 24px; }
article.paper img { display: inline; }

article.paper .thm { margin: 22px 0; }
article.paper .thm p { font-style: italic; color: var(--ink); margin-bottom: 12px; }
article.paper .thm b, article.paper .thm .by { font-style: normal; }
article.paper .thm .katex { font-style: normal; }
article.paper .qed { float: right; margin-left: 12px; }
article.paper .katex { font-size: 1em; }
article.paper .katex-display { margin: 20px 0 24px; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }

article.paper figure { margin: 36px 0; }
article.paper figure .scroll { overflow-x: auto; margin: 0; }
article.paper figure svg { display: block; width: 100%; min-width: 620px; height: auto; }
article.paper figcaption { font-family: var(--serif); color: var(--body); font-size: 18px; line-height: 1.45; margin: 12px 0 0; text-align: center; }

/* Drawing styles shared by the figures. */
article.paper .g-edge { stroke: var(--rule); stroke-width: 1.3; fill: none; }
article.paper .g-edge.crit { stroke: var(--gold); stroke-width: 2.4; }
article.paper .g-node { fill: var(--bg); stroke: var(--ink); stroke-width: 1.3; }
article.paper .g-node.crit { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 2; }
article.paper .g-node.hub { fill: var(--gold); stroke: #a37c26; }
article.paper .g-name { font-family: var(--serif); font-style: italic; font-size: 25px; fill: var(--ink); text-anchor: middle; }
article.paper .g-bar + .g-name { font-size: 21px; }
article.paper .g-dur { font-family: var(--mono); font-size: 16px; fill: var(--muted); text-anchor: middle; }
article.paper .g-text { font-family: var(--sans); font-size: 15px; fill: var(--muted); }
article.paper .g-text.strong { fill: var(--ink); font-weight: 500; }
article.paper .g-bar { fill: var(--bg); stroke: var(--rule); stroke-width: 1; }
article.paper .g-bar.crit { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 1.4; }
article.paper .g-axis { stroke: var(--rule); stroke-width: 1; }
article.paper .g-mark { stroke: var(--ink); stroke-width: 1.2; }
article.paper .g-mark.dash { stroke: var(--muted); stroke-dasharray: 4 4; }

/* Tables carry three rules, as in print: above the head, below it, and at the foot.
   The first two lines undo what the site gives its own tables: a smaller size, a rule under every
   row, narrow number columns and cells that do not wrap. */
article.paper table { font-size: inherit; line-height: inherit; }
article.paper th, article.paper td { width: auto; white-space: normal; border-bottom: 0; }
article.paper td { font-weight: 400; }
article.paper .table-scroll { overflow-x: auto; margin: 26px 0; }
article.paper table.data { border-collapse: collapse; width: 100%; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
article.paper table.data th, article.paper table.data td { font-family: var(--serif); font-size: 19px; line-height: 1.4; font-variant-numeric: lining-nums; text-align: left; padding: 5px 20px 5px 0; vertical-align: top; color: var(--body); }
article.paper table.data th { font-weight: 400; font-style: italic; border-bottom: 1px solid var(--ink); padding-top: 7px; padding-bottom: 7px; }
article.paper table.data tbody tr:first-child td { padding-top: 9px; }
article.paper table.data tbody tr:last-child td { padding-bottom: 9px; }
article.paper table.data td.n, article.paper table.data th.n { text-align: right; padding-right: 0; padding-left: 20px; }
article.paper table.data td.k { font-style: italic; width: 34px; }

article.paper .refs { margin: 0; padding-left: 0; list-style: none; counter-reset: ref; }
article.paper .refs li { counter-increment: ref; position: relative; padding-left: 44px; font-size: 18.5px; line-height: 1.5; margin-bottom: 8px; }
article.paper .refs li::before { content: "[" counter(ref) "]"; position: absolute; left: 0; }
article.paper .back { margin-top: 48px; }

@media (max-width: 900px) {
  .posts li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  article.paper .abstract { margin-left: 0; margin-right: 0; }
}
@media (max-width: 520px) {
  article.paper { font-size: 16px; }
  article.paper p, article.paper li { font-size: 19px; }
  article.paper .refs li { font-size: 17.5px; }
  article.paper .abstract { font-size: 18px; }
  article.paper h2 { margin-top: 46px; }
  article.paper table.data th, article.paper table.data td { font-size: 17.5px; padding-right: 14px; }
}
