/* ============================================================
   Iowa Particles & Plots Journal Club — style.css
   ============================================================ */

:root {
  --accent: #1b9e77; /* teal  — primary / header    */
  --accent-dim: #e0f5f0; /* light teal — backgrounds    */
  --accent-badge: #e7298a; /* pink  — arXiv badge         */
  --accent-btn: #d95f02; /* orange — CTA button         */
  --accent-sec: #7570b3; /* soft purple — secondary     */
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --radius: 6px;
  --max-width: 860px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Header ─────────────────────────────────────────────── */

header {
  background: var(--accent);
  color: #fff;
  padding: 2.5rem 1.5rem 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.25em 0.65em;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

header h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  opacity: 0.82;
  font-style: italic;
}

/* ── Nav ─────────────────────────────────────────────────── */

nav {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.25rem;
  border-bottom: none;
}

nav a {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius) var(--radius) 0 0;
  transition:
    background 0.15s,
    color 0.15s;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

nav a.active {
  background: var(--bg);
  color: var(--accent);
}

/* ── Main ────────────────────────────────────────────────── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Week header ─────────────────────────────────────────── */

.week-header {
  margin-bottom: 1.5rem;
}

.week-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.week-label {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── Papers table ────────────────────────────────────────── */

.papers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.papers-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  padding: 0.6rem 0.75rem;
}

.papers-table td {
  padding: 0.85rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.papers-table tr:last-child td {
  border-bottom: none;
}

.papers-table tr:hover td {
  background: var(--bg-alt);
}

.papers-table th:nth-child(1),
.papers-table td:nth-child(1) {
  width: 12%;
  min-width: 100px;
}

.papers-table th:nth-child(2),
.papers-table td:nth-child(2) {
  width: 55%;
}

.papers-table th:nth-child(3),
.papers-table td:nth-child(3) {
  width: 33%;
  min-width: 140px;
}

.arxiv-link {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  background: #fce4f1;
  color: var(--accent-badge);
  padding: 0.2em 0.55em;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
}

.arxiv-link:hover {
  background: var(--accent-badge);
  color: #fff;
}

.paper-abstract {
  color: var(--muted);
  font-size: 0.83rem;
  margin-top: 0.3rem;
  line-height: 1.5;
  /* Clamp to 4 lines with a fade */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cite-count {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.inspire-link {
  display: inline-block;
  font-size: 0.82rem;
  background: #fff3e0;
  color: var(--accent-btn);
  padding: 0.2em 0.55em;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}

.inspire-link:hover {
  background: var(--accent-btn);
  color: #fff;
}

.inspire-not-found {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 0.25em 0.6em;
  display: inline-block;
}

.inspire-invalid {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 0.25em 0.6em;
  display: inline-block;
}

.inspire-corrected {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.25em 0.6em;
  display: inline-block;
}

/* ── Interactive row controls (this week only) ───────────── */

th.actions-col,
td.actions-cell {
  width: 8rem;
  vertical-align: top;
  padding-top: 0.6rem;
}

.actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 0.25em 0.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s;
}
.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-btn--vote {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.action-btn--vote:hover:not(:disabled) {
  background: #dbeafe;
}

.action-btn--edit {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.action-btn--edit:hover:not(:disabled) {
  background: #dcfce7;
}

.action-btn--remove {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.action-btn--remove:hover:not(:disabled) {
  background: #fee2e2;
}

.action-btn--save {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.action-btn--save:hover:not(:disabled) {
  background: #dcfce7;
}

.action-btn--cancel {
  background: var(--card);
  border-color: var(--border);
  color: var(--muted);
}
.action-btn--cancel:hover:not(:disabled) {
  background: var(--border);
}

.action-btn--discuss {
  background: #fefce8;
  border-color: #fde68a;
  color: #92400e;
}
.action-btn--discuss:hover:not(:disabled) {
  background: #fef9c3;
}
.action-btn--discuss.active {
  background: #fef08a;
  border-color: #f59e0b;
  color: #78350f;
  font-weight: 600;
}
.action-btn--discuss.active:hover:not(:disabled) {
  background: #fde047;
}

.paper-discussed {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.1em 0.5em;
  border-radius: var(--radius);
  background: #fef08a;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.edit-textarea {
  width: 100%;
  padding: 0.4em 0.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
}
.edit-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.edit-btn-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.edit-btn-row .action-btn {
  width: auto;
}

.paper-title {
  font-weight: 500;
}

.paper-comment {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

/* ── Resources page ─────────────────────────────────────── */

main.prose {
  max-width: 720px;
}

.res-section {
  margin-bottom: 3rem;
}

.res-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-dim);
  margin-bottom: 1rem;
}

.res-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
  color: var(--text);
}

.res-section p {
  margin-bottom: 0.75rem;
  color: var(--text);
}

.res-section a {
  color: var(--accent);
}

.res-section ul,
.category-list {
  margin: 0.4rem 0 0.75rem 1.4rem;
  color: var(--text);
}

.res-section li {
  margin-bottom: 0.3rem;
}

.res-section code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.5rem 0 0.75rem;
}

.res-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  padding: 0.5rem 0.75rem;
}

.res-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.res-table tr:last-child td {
  border-bottom: none;
}

.res-callout {
  margin-top: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent-btn);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #78350f;
  line-height: 1.6;
}

/* ── Empty state ─────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--muted);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.empty-state p:first-child {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ── Submit CTA ──────────────────────────────────────────── */

.submit-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.submit-cta p {
  color: var(--text);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  background: var(--accent-btn);
  color: #fff;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
}

/* ── Archive ─────────────────────────────────────────────── */

.archive-week {
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.archive-week summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent-sec);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.archive-week summary::-webkit-details-marker {
  display: none;
}

.archive-week summary::after {
  content: '›';
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.2s;
}

.archive-week[open] summary::after {
  transform: rotate(90deg);
}

.archive-week summary .week-count {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.5rem;
}

.archive-week-content .papers-table {
  border-top: 1px solid var(--border);
}

/* ── Keyword pills ──────────────────────────────────────── */

.keyword-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.kpill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.18em 0.55em;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5;
}

.kpill--cat {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid #b2dfdb;
}

.kpill--topic {
  background: #ede7f6;
  color: var(--accent-sec);
  border: 1px solid #d1c4e9;
}

/* ── Archive search ──────────────────────────────────────── */

.archive-search-wrap {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#archive-search {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

#archive-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 158, 119, 0.15);
}

/* ── Loading ─────────────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.error {
  padding: 1rem 1.25rem;
  background: #fef2f2;
  border-left: 3px solid #f87171;
  border-radius: var(--radius);
  color: #7f1d1d;
  font-size: 0.9rem;
}

/* ── Stats page ─────────────────────────────────────────── */

.stat-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.stat-kpi {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}

.stat-kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-kpi-value--sm {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 0.1rem;
}

.stat-kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-top: 0.2rem;
  font-weight: 600;
}

.stat-section {
  margin-bottom: 2.5rem;
}

.stat-section h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

.stat-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 14ch 1fr 3.5ch;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.bar-track {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 1.1rem;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bar-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}

@media (max-width: 600px) {
  .bar-row {
    grid-template-columns: 10ch 1fr 3ch;
    gap: 0.5rem;
  }

  .stat-kpi-value {
    font-size: 1.3rem;
  }
}

/* ── BibTeX copy button ──────────────────────────────────── */

.bibtex-btn {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--bg-alt);
  color: var(--muted);
  padding: 0.2em 0.55em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.bibtex-btn:hover {
  background: var(--accent-sec);
  color: #fff;
  border-color: var(--accent-sec);
}

.bibtex-btn.copied {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Week-level BibTeX export button (This Week page) */

.bibtex-week-btn {
  display: block;
  margin: 0.75rem 0 0;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--accent-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.bibtex-week-btn:hover {
  background: var(--accent-sec);
  color: #fff;
  border-color: var(--accent-sec);
}

.bibtex-week-btn.copied {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.bibtex-week-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Meeting info block ──────────────────────────────────── */

.meeting-info {
  background: var(--accent-dim);
  border: 1px solid #b2dfdb;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 0.92rem;
}

.meeting-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.75rem;
  margin-bottom: 0.45rem;
}

.meeting-info-row:last-child {
  margin-bottom: 0;
}

.meeting-tag {
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 5.5rem;
}

.meeting-info a {
  color: var(--accent);
  font-weight: 500;
}

.meeting-info-guides {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #b2dfdb;
}

.meeting-info-guides ul {
  margin: 0.25rem 0 0 1.3rem;
  color: var(--text);
}

.meeting-info-guides li {
  margin-bottom: 0.25rem;
}

/* ── Calendar export button ──────────────────────────────── */

.cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  background: #fff;
  color: var(--accent);
  padding: 0.28em 0.75em;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}

.cal-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Year selector (stats) ───────────────────────────────── */

.stats-year-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stats-year-wrap label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

#year-select {
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

#year-select:focus {
  border-color: var(--accent);
}

/* ── Subfield filter bar (archive) ───────────────────────── */

.subfield-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.subfield-filter-bar:empty {
  display: none;
}

.sf-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.sf-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: #b2dfdb;
}

.sf-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--accent-sec);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ── Submit top button ───────────────────────────────────── */

.submit-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

/* ── Trending section ────────────────────────────────────── */

.trending-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.trending-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.trending-subheading {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.trending-message {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.trending-message--empty {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  color: var(--muted);
}

.trending-message--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 3px solid #f87171;
  color: #7f1d1d;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.trending-category {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trending-cat-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0.1rem;
}

.trending-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-sec);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.trending-rank {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-sec);
  background: #ede7f6;
  border: 1px solid #d1c4e9;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 0.15rem;
}

.trending-card-title {
  font-size: 0.9rem;
}

.trending-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

@media (max-width: 600px) {
  .trending-grid {
    grid-template-columns: 1fr;
  }

  .submit-top {
    justify-content: stretch;
  }

  .submit-top .btn {
    display: block;
    text-align: center;
  }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .papers-table thead {
    display: none;
  }
  .papers-table tr {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .papers-table td {
    display: block;
    padding: 0.2rem 0;
    border: none;
  }

  .submit-cta {
    flex-direction: column;
    text-align: center;
  }
}
