/* Shared layout for every paper in the archive */
body { margin: 0; font-family: 'Figtree', system-ui, sans-serif; overflow-x: hidden; background-color: #fff; color: #181824; line-height: 1.6; }

.article-container { margin-top: 90px; padding: 2rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.back-button { display: inline-block; background: linear-gradient(135deg, #0c1220, #0f6e6e); color: white; padding: 0.8rem 1.5rem; border-radius: 25px; text-decoration: none; font-weight: bold; margin-bottom: 2rem; transition: transform 0.3s ease; }
.back-button:hover { transform: translateY(-2px); color: white; }

/* Header */
.article-header { text-align: center; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 2px solid #f0f0f0; }
.article-title { font-size: 2rem; font-weight: 900; color: #0c1220; margin-bottom: 1rem; line-height: 1.2; }
.article-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; color: #666; font-size: 1.05rem; }
.article-author { font-weight: bold; color: #0c1220; }
.article-date { color: #888; }
.article-category { background: linear-gradient(135deg, #0f6e6e, #0c1220); color: white; padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.9rem; font-weight: bold; }
.article-affiliation { color: #666; margin: 0.5rem 0 0.25rem; font-size: 0.95rem; }
.article-contributor { color: #666; margin: 0 0 1rem; font-size: 0.95rem; }
.download-link { display: inline-block; margin-top: 0.75rem; padding: 0.65rem 1.25rem; border: 2px solid #0c1220; color: #0c1220; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 0.95rem; }
.download-link:hover { background: #f0f4f4; }

/* Cover image under the title */
.article-hero { aspect-ratio: 16 / 7; border-radius: 12px; margin: 0 0 2.5rem; background-color: #0c1220; background-image: linear-gradient(180deg, rgba(12, 18, 32, 0.08) 0%, rgba(12, 18, 32, 0.45) 100%), var(--hero-img); background-position: center, var(--hero-pos, center); background-size: cover; background-repeat: no-repeat; }

/* Body */
.article-content { font-size: 1.1rem; line-height: 1.8; }
.article-content h2 { font-size: 1.8rem; color: #0c1220; margin-top: 2.5rem; margin-bottom: 1rem; font-weight: bold; }
.article-content h3 { font-size: 1.3rem; color: #0c1220; margin-top: 1.75rem; margin-bottom: 0.75rem; font-weight: bold; }
.article-content h4 { font-size: 1.1rem; color: #0c1220; margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: bold; font-style: italic; }
.article-content p { margin-bottom: 1.2rem; text-align: justify; }
.article-content ul, .article-content ol { margin: 0 0 1.2rem; padding-left: 2rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content img { max-width: 100%; height: auto; }

.abstract { background: #f8f9fa; padding: 1.5rem; border-radius: 10px; margin-bottom: 2rem; border-left: 4px solid #0f6e6e; }
.abstract h3 { color: #0c1220; margin-top: 0; margin-bottom: 1rem; }
.abstract p:last-child { margin-bottom: 0; }

/* Highlighted results panel */
.results-section { background: #f0f7f7; padding: 1.5rem; border-radius: 10px; margin: 2rem 0; border: 1px solid #0f6e6e; }
.results-section h3 { color: #0c1220; margin-top: 0; margin-bottom: 1rem; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
.result-item { background: white; padding: 1rem; border-radius: 8px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.result-color { font-size: 2rem; margin-bottom: 0.5rem; }
.result-score { font-size: 1.35rem; font-weight: bold; color: #0c1220; }
.result-label { font-size: 0.9rem; color: #666; margin-top: 0.3rem; }

/* Data tables */
.data-table { margin: 1.75rem 0; font-size: 0.98rem; line-height: 1.5; }
.data-table figcaption { font-weight: bold; color: #0c1220; margin-bottom: 0.5rem; }
.data-table figcaption span { display: block; font-weight: normal; font-style: italic; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid #dde3ec; }
.data-table th { background: #f8f9fa; color: #0c1220; border-top: 2px solid #0f6e6e; border-bottom: 2px solid #0f6e6e; }
.data-table th:not(:first-child), .data-table td:not(:first-child) { text-align: right; width: 5.5rem; }
.data-table .table-note { font-size: 0.88rem; color: #666; margin: 0.5rem 0 0; text-align: left; }
.article-content > table, .article-content table.plain-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; line-height: 1.5; }
.article-content > table td, .article-content > table th { padding: 0.5rem 0.65rem; border: 1px solid #dde3ec; vertical-align: top; text-align: left; }
.article-content > table td p { margin: 0 0 0.4rem; text-align: left; }
.article-content > table img { max-width: 120px; }

/* Wide results table */
.data-table--results { font-size: 0.9rem; overflow-x: auto; }
.data-table--results table { min-width: 560px; }
.data-table--results th:not(:first-child), .data-table--results td:not(:first-child) { width: auto; }
.data-table--results th:nth-child(2), .data-table--results td:nth-child(2), .data-table--results th:last-child, .data-table--results td:last-child { text-align: left; }
.data-table--results .row-summary td { font-weight: 600; background: #f8f9fa; }
.data-table--results .row-significant td { font-weight: 700; background: #e6f3f3; }

/* Display equations */
.equation { text-align: center; margin: 1.25rem 0; overflow-x: auto; overflow-y: hidden; padding: 0.5rem 0; }
.equation math { font-size: 1.3rem; }
.article-content p math { font-size: 1.1em; }

/* Works cited / references */
.works-cited { padding-left: 2rem; text-indent: -2rem; margin-bottom: 1.2rem; }
.works-cited p { margin-bottom: 1rem; text-align: left; overflow-wrap: anywhere; }
.references { list-style: none; margin: 0 0 1.2rem; padding: 0; font-size: 1rem; line-height: 1.6; }
.references li { padding-left: 3rem; text-indent: -3rem; margin-bottom: 0.85rem; overflow-wrap: anywhere; }
.references .ref-num { display: inline-block; width: 3rem; text-indent: 0; font-weight: bold; color: #0c1220; }

@media (max-width: 768px) {
  .article-container { padding: 1rem; }
  .article-title { font-size: 1.65rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .article-hero { aspect-ratio: 16 / 10; }
  .article-content p { text-align: left; }
  .results-grid { grid-template-columns: 1fr; }
  .article-content > table { display: block; overflow-x: auto; }
}
