/* ===========================
   Project Page Styles (from the MedGRPO page)
   =========================== */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --dark: #1e293b;
  --gray: #64748b;
  --light-gray: #f8fafc;
  --white: #ffffff;
  --yellow: #d97706;
  --green: #059669;
  --purple: #7c3aed;
  --border: #e2e8f0;
  --text: #334155;
  --heading: #0f172a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container.narrow {
  max-width: 800px;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, #0c1220 0%, #162544 40%, #1a365d 70%, #0f172a 100%);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(139,92,246,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.conference-badge {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 1.4rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(59,130,246,0.3);
}

.paper-title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  color: white;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.01em;
}

.authors {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
  line-height: 2;
}

.authors span,
.authors a {
  white-space: nowrap;
}

.authors a {
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.3);
  transition: border-color 0.2s;
}

.authors a:hover {
  border-bottom-color: #e2e8f0;
}

.affiliations {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

/* ---- Buttons ---- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.3rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-dark {
  background: rgba(255,255,255,0.1);
  color: white;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.btn-dark:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }

.btn-yellow {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.btn-yellow:hover { background: #fde68a; }

.btn-green {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.btn-green:hover { background: #6ee7b7; }

.btn-teal {
  background: #ccfbf1;
  color: #134e4a;
  border-color: #5eead4;
}
.btn-teal:hover { background: #5eead4; }

.btn-purple {
  background: #ede9fe;
  color: #4c1d95;
  border-color: #c4b5fd;
}
.btn-purple:hover { background: #c4b5fd; }

/* ---- Teaser ---- */
.teaser {
  padding: 0;
  background: var(--light-gray);
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.teaser .container {
  max-width: 960px;
}

.teaser img {
  width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  transform: none;
}

/* ---- Sections ---- */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--light-gray);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--heading);
  text-align: center;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* ---- Abstract ---- */
.abstract-text {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 1rem;
  text-align: justify;
}

/* ---- Method Cards ---- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.method-card {
  background: white;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.method-icon {
  font-size: 1.8rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.method-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.method-card p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ---- Pipeline figure ---- */
.pipeline-figure img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* ---- Stats Grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

/* ---- Task Tags ---- */
.tasks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.task-tag {
  background: white;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.task-tag:hover {
  background: var(--blue);
  color: white;
}

/* ---- Placeholder boxes ---- */
.teaser-placeholder,
.pipeline-placeholder,
.results-placeholder {
  background: white;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--gray);
}

.teaser-placeholder i,
.pipeline-placeholder i,
.results-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.3;
}

.teaser-placeholder p,
.pipeline-placeholder p,
.results-placeholder p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.teaser-placeholder span,
.pipeline-placeholder span,
.results-placeholder span {
  font-size: 0.85rem;
  font-family: 'Source Code Pro', monospace;
  opacity: 0.6;
}

/* ---- Qualitative Results ---- */
.qual-item {
  margin-bottom: 3.5rem;
}

.qual-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.qual-desc {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.qual-img {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

/* ---- Results Table ---- */
.results-table-wrap {
  overflow-x: auto;
  margin-top: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  background: white;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.results-table th,
.results-table td {
  padding: 0.65rem 0.85rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

/* Single header row */
.results-table thead th {
  background: #0f172a;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.8rem 0.85rem;
  border-bottom: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.results-table thead th:first-child {
  text-align: left;
  padding-left: 1.2rem;
  text-transform: none;
  color: #e2e8f0;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.results-table .model-name {
  text-align: left;
  font-size: 0.82rem;
  white-space: nowrap;
  padding-left: 1.2rem;
  min-width: 240px;
  color: var(--heading);
  background: white;
}

.results-table tbody tr {
  transition: background 0.12s;
}

.results-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.results-table tbody tr:hover td {
  background: #eef2ff !important;
}

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

.results-table .section-divider td {
  border-top: 2px solid #e2e8f0;
}

.results-table .section-header td {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 0.8rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-top: 2px solid #cbd5e1;
}

.results-table .ours-row td.model-name {
  color: var(--blue);
}

.results-table .rank1 {
  background: #fef2f2 !important;
  color: #b91c1c;
  font-weight: 700;
}

.results-table .rank2 {
  background: #fffbeb !important;
  color: #b45309;
  font-weight: 500;
}

/* ---- Innovation Cards (inline in Key Innovations) ---- */
.innovation-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.innovation-card + .innovation-card {
  margin-top: 1.5rem;
}

/* ---- Citation ---- */
.citation-box {
  position: relative;
  background: #0f172a;
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.citation-box pre {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #334155;
  color: #cbd5e1;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #475569;
}

.copy-btn.copied {
  background: #059669;
  color: white;
}

/* ---- Footer ---- */
.footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.footer a {
  color: #93c5fd;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .paper-title { font-size: 1.5rem; }
  .section { padding: 3rem 0; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .paper-title { font-size: 1.3rem; }
  .method-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Additions for the evidence-aligned page (2026-11-23) ---- */
:root { --blue: #1f6fb5; --blue-dark: #185a94; --orange: #d9822b; }
.conference-badge { background: linear-gradient(135deg, #1f6fb5, #0e9384); box-shadow: 0 2px 12px rgba(31,111,181,0.3); }
.project-name { font-size: 3.1rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 0.6rem;
  background: linear-gradient(120deg, #7cc0ff, #5ee0c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.paper-title { text-wrap: balance; }
.prev-work { position: absolute; top: 1.1rem; right: 1.4rem; z-index: 2; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 0.85rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: #e2e8f0; text-decoration: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(4px); transition: background 0.2s, border-color 0.2s; }
.prev-work:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); color: #fff; }
.prev-work i { font-size: 0.72rem; opacity: 0.8; }
@media (max-width: 768px) { .prev-work { top: 0.7rem; right: 0.8rem; padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 500;
  color: #cbd5e1; background: transparent; border-color: rgba(255,255,255,0.16); backdrop-filter: none; }
  .prev-work i { font-size: 0.6rem; } }
@media (max-width: 768px) { .paper-title br { display: none; } }
@media (max-width: 480px) { .project-name { font-size: 2.3rem; } }
.aff-logo { height: 30px; vertical-align: middle; margin-left: 8px; border-radius: 4px; }
.corr { font-size: 0.8rem; margin-top: 0.35rem; color: #94a3b8; }
.btn.soon { opacity: 0.55; cursor: default; }
.btn.soon em { font-style: normal; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.teaser { padding: 2.5rem 0 0; background: white; }
.teaser img { box-shadow: 0 4px 24px rgba(0,0,0,0.08); border: 1px solid var(--border); background: white; }
.fig-caption { font-size: 0.88rem; color: var(--gray); line-height: 1.6; margin: 0.9rem auto 0; max-width: 900px; }
.gap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.gap-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem 1.5rem; display: flex; flex-direction: column; }
.gap-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.4rem; }
.gap-card h3 { font-size: 1.02rem; color: var(--heading); line-height: 1.4; margin-bottom: 0.7rem; }
.gap-card ul { padding-left: 1.1rem; font-size: 0.88rem; color: var(--text); line-height: 1.6; margin-bottom: 1rem; }
.gap-card li { margin-bottom: 0.35rem; }
.gap-fix { margin-top: auto; background: #eef5fb; border-left: 3px solid var(--blue); border-radius: 6px; padding: 0.7rem 0.85rem; font-size: 0.86rem; line-height: 1.55; }
.gap-fix i { color: var(--blue); margin-right: 0.2rem; }
code { font-family: 'Source Code Pro', monospace; font-size: 0.88em; background: #f1f5f9; padding: 0.05rem 0.3rem; border-radius: 4px; }
.pipeline-figure img { background: white; border: 1px solid var(--border); box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; margin-top: 3rem; }
.two-col p { font-size: 0.95rem; line-height: 1.75; margin-bottom: 1.2rem; }
.sub-title { font-size: 1.05rem; color: var(--heading); margin-bottom: 0.4rem; }
.small-fig { width: 100%; border-radius: 10px; background: white; border: 1px solid var(--border); padding: 0.6rem; }
.results-tiles .stat-number { font-size: 1.6rem; }
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.results-tiles { grid-template-columns: repeat(4, 1fr); }
.container.wide { max-width: 1340px; }
.results-table { font-size: 0.78rem; }
.results-table th, .results-table td { padding: 0.5rem 0.42rem; }
.results-table thead th { padding: 0.6rem 0.42rem; font-size: 0.7rem; text-transform: none; }
.results-table .model-name { min-width: 150px; padding-left: 0.9rem; }
.results-table .section-header td { text-align: left; text-transform: none; letter-spacing: 0; font-size: 0.78rem; padding-left: 0.9rem; }
.results-table thead tr.group th { background: #0f172a; color: #e2e8f0; text-transform: none; font-size: 0.8rem; border-bottom: 1px solid #334155; }
.results-table thead th sub { text-transform: none; }
.results-table td.indent1 { padding-left: 2.2rem; }
.results-table td.indent2 { padding-left: 3.2rem; }
.results-table .ours-row td.model-name { color: var(--blue); font-weight: 600; }
.results-table td.best { font-weight: 700; color: var(--heading); }
.results-table tbody tr td.gain { background: #dcf3e3 !important; }
.table-note { font-size: 0.82rem; color: var(--gray); margin-top: 0.9rem; line-height: 1.6; }
.gain-key { background: #dcf3e3; padding: 0 0.35rem; border-radius: 3px; }
.results-table tbody tr td.loss { background: #fbe0e0 !important; }
.loss-key { background: #fbe0e0; padding: 0 0.35rem; border-radius: 3px; }
.qual-item .fig-caption { text-align: left; }
.qual-img { max-width: 1040px; }
.qual-item .fig-caption, .qual-item .qual-title { max-width: 1040px; margin-left: auto; margin-right: auto; }
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .results-tiles .stat-number { font-size: 1.25rem; }
  .stats-grid, .results-tiles { grid-template-columns: 1fr 1fr; }
  .abstract-text { text-align: left; }
}
