/* Shared styles for the Adarna Papers pages (papers/*.html and papers.html).
   Loaded after articles.css. Generated from PAPER_CSS in scripts/build-papers.py; keep the two in sync. */
/* ─── Research papers ────────────────────────────────── */
/* Masthead: a journal-style rule, the paper's number, then the title */
.paper-hero-body { padding-top: 36px; }
.paper-mast {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-bottom: 2px solid #1d1d1f; padding-bottom: 10px; margin: 0 0 28px;
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #1d1d1f;
}
.paper-mast em { font-style: normal; font-weight: 500; color: #86868b; }
.paper-num {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 96px; font-weight: 700; line-height: 0.9; letter-spacing: -4px; color: #d2d2d7; margin: 0 0 18px;
}
.paper-kicker {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px; font-weight: 500; color: #86868b; letter-spacing: 0.02em; margin: 0 0 14px;
}
.paper-title { font-size: 34px; letter-spacing: -0.6px; line-height: 1.16; }
.paper-byline {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px; color: #1d1d1f; margin: 18px 0 0;
}
.paper-byline span { color: #6e6e73; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.paper-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px; border-radius: 980px; border: 1px solid #0071E3;
  background: #0071E3; color: #fff; cursor: pointer;
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px; font-weight: 500; text-decoration: none; transition: background 0.2s ease;
}
.paper-btn:hover { background: #0064CC; }
.paper-btn svg { width: 15px; height: 15px; fill: currentColor; }
.paper-btn-outline { background: transparent; color: #0071E3; }
.paper-btn-outline:hover { background: rgba(0,113,227,0.06); }
.paper-btn:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.paper-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin: 32px 0 0; padding: 20px 0 4px; border-top: 1px solid #e0e0e5;
}
.paper-facts dt { font-size: 12px; color: #86868b; margin: 0 0 4px; }
.paper-facts dd { font-size: 14px; color: #1d1d1f; margin: 0; line-height: 1.4; }

/* The content column is exactly as wide as the top card */
.paper-content { max-width: 860px; width: calc(100% - 24px); padding: 40px 0 64px; }
.paper-content h2, .paper-content h3, .paper-content h4, .paper-refs li, .paper-figure, .paper-table { scroll-margin-top: 104px; }
.paper-content h4 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px; font-weight: 600; color: #1d1d1f; margin: 32px 0 10px;
}
.paper-abstract { background: #F4F5F5; border-radius: 22px; padding: 32px 36px 12px; margin: 0 0 20px; }
.paper-abstract h2 { margin-top: 0 !important; font-size: 22px !important; }
.paper-abstract p { font-size: 16px !important; line-height: 1.65 !important; margin-bottom: 16px !important; }
.paper-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.paper-keywords li {
  font-size: 13px; color: #1d1d1f; background: #F4F5F5; border-radius: 980px; padding: 6px 12px; margin: 0 !important;
}
.paper-toc { border-top: 1px solid #e0e0e5; border-bottom: 1px solid #e0e0e5; padding: 20px 0; margin: 0 0 8px; }
.paper-toc p { font-size: 13px !important; color: #86868b !important; margin: 0 0 10px !important; }
.paper-toc ol { list-style: none; padding: 0; margin: 0 !important; columns: 2; column-gap: 32px; }
.paper-toc ol li { padding: 0 !important; margin: 0 0 6px !important; font-size: 15px !important; line-height: 1.5 !important; }
.paper-toc ol li::before { content: none !important; }
.paper-toc a { color: #1d1d1f; text-decoration: none; }
.paper-toc a:hover { color: #0071E3; }

.paper-content a { color: #0071E3; text-decoration: none; }
.paper-content a:hover { text-decoration: underline; }
a.cite { font-variant-numeric: tabular-nums; }
.paper-list { margin: 0 0 24px; padding-left: 22px; }
.paper-list li {
  font-size: 17px; line-height: 1.7; color: #1d1d1f; margin: 0 0 8px; padding: 0 !important;
}
ol.paper-list li::before { content: none !important; }
ol.paper-list { list-style: decimal; }

.paper-figure { margin: 40px 0; }
.paper-figure img { display: block; width: 100%; height: auto; border-radius: 18px; background: #fff; border: 1px solid #ececf0; }
.paper-figure figcaption, .paper-table figcaption {
  font-size: 14px; line-height: 1.55; color: #6e6e73; margin: 12px 4px 0;
}
.paper-figure figcaption b, .paper-table figcaption b { color: #1d1d1f; font-weight: 600; }
.paper-table { margin: 40px 0; }
.paper-table figcaption { margin: 0 4px 12px; }
.paper-table-scroll { overflow-x: auto; border-radius: 18px; background: #F4F5F5; -webkit-overflow-scrolling: touch; }
.paper-table-scroll:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.paper-table table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; color: #1d1d1f; }
.paper-table--wide table { min-width: 820px; }
.paper-table th {
  text-align: left; font-weight: 600; padding: 14px 12px 10px; border-bottom: 1px solid #d9d9de; vertical-align: bottom;
}
.paper-table td { padding: 10px 12px; border-bottom: 1px solid #e6e6ea; vertical-align: top; }
.paper-table tbody tr:last-child td { border-bottom: 0; }
.paper-table th:first-child, .paper-table td:first-child { padding-left: 18px; }
.paper-table th:last-child, .paper-table td:last-child { padding-right: 18px; }

.paper-refs { list-style: none; padding: 0 !important; margin: 0 0 24px !important; }
.paper-refs li {
  position: relative; font-size: 14px !important; line-height: 1.55 !important; color: #424245 !important;
  padding-left: 46px !important; margin: 0 0 10px !important; overflow-wrap: anywhere;
}
.paper-refs li::before { content: none !important; }
.paper-refs .ref-n { position: absolute; left: 0; top: 0; color: #86868b; font-variant-numeric: tabular-nums; }
.paper-refs li:target { background: #fff8d6; border-radius: 8px; }

.paper-copied { color: #1d1d1f; font-size: 13px; align-self: center; opacity: 0; transition: opacity 0.2s ease; }
.paper-copied.is-on { opacity: 1; }

@media (max-width: 768px) {
  .paper-num { font-size: 72px; letter-spacing: -3px; }
  .paper-mast { font-size: 12px; }
  .paper-title { font-size: 28px; }
  .paper-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-abstract { padding: 24px 22px 6px; border-radius: 18px; }
  .paper-toc ol { columns: 1; }
  .paper-content { width: calc(100% - 64px); padding-left: 0; padding-right: 0; }
  .paper-table table { min-width: 600px; }
}
@media (max-width: 480px) {
  .paper-num { font-size: 60px; }
  .paper-mast { flex-direction: column; gap: 2px; align-items: flex-start; }
  .paper-title { font-size: 24px; letter-spacing: -0.4px; }
  .paper-list li { font-size: 16px; }
  .paper-content { width: calc(100% - 48px); padding-left: 0; padding-right: 0; }
}
