/* Research Article theme -- layered over theme.css.
   Paper-first: a narrower measure, an author/date meta row, an abstract block,
   and automatically-numbered sections. Only the frame and prose typography
   change; the generated body markup is identical to every other theme. */

:root { --measure: 1100px; }

.article-hero { max-width: 860px; padding: 56px 0 34px; border-bottom: 1px solid var(--line); }
.article-hero .feynman-title { font-size: clamp(40px, 5.2vw, 64px); max-width: 820px; }
.article-hero .feynman-subtitle { margin-top: 20px; }
/* The credit row itself is `.doc-meta` in theme.css -- shared with every theme,
   and already set the way a paper wants it, so `.article-meta` adds nothing. */

.article-layout {
  display: grid; grid-template-columns: 185px minmax(0, 1fr);
  gap: 64px; padding: 48px 0 86px;
}
.article-prose { max-width: 760px; }

/* Abstract: a dense block set off from the narrative, above section 1. */
.abstract {
  margin: 0 0 42px; padding: 22px 26px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.abstract h2 {
  margin: 0 0 10px !important;
  font: 600 11px var(--mono) !important;
  letter-spacing: 0.1em !important; text-transform: uppercase;
}
.abstract p { margin: 0; }
/* Keywords sit inside the abstract, so they tuck in tighter than a hero tag row
   and take the page tone -- the default chip fill is the abstract's own colour. */
.keywords-tags { margin-top: 14px; }
.keywords-tags .doc-tag { background: var(--paper); }

/* Auto-numbered sections. The number is *not* counted here -- the build stamps
   each heading with `data-section-number` ("2", "2.1", "2.1.1") and this only
   prints it, so the heading, an `@sec-` reference in the prose and the sidebar
   contents all show the same string by construction. A CSS counter could not:
   it saw only the headings it had rules for, so a document with subsections had
   the reader looking at "3." while the prose said "Section 5".
   The abstract's h2 is untouched -- the template writes it outside the token
   stream, so it never gets the attribute. */
.article-prose [data-section-number]::before {
  content: attr(data-section-number) " ";
  color: var(--muted); font-family: var(--mono); font-size: 0.7em;
}
.article-prose h2[data-section-number]::before {
  content: attr(data-section-number) ". ";
  font-size: 0.62em;
}

@media (max-width: 820px) {
  .article-layout { display: block; padding-top: 38px; }
  .article-layout .contents, .article-layout .contents.js-only { display: none; }
  .article-hero { padding-top: 40px; }
  .article-prose { max-width: 100%; }
}
@media print {
  .article-hero { padding-top: 20px; }
  .article-layout { display: block; padding-top: 24px; }
}
