/* Typography */
.publication-title, .publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors a {
  color: rgb(148, 167, 207);
  font-size: 22px;
}

.publication-authors a:hover {
  text-decoration: underline;
  color: rgb(15, 76, 130);
}

.author-block {
  display: inline-block;
}

.link-block a {
  margin-bottom: 15px;
}

/* Chapter headings */
h2 {
  font-family: 'Caveat', cursive;
  color: rgba(254, 190, 152, 0.85);
  text-align: center;
  font-size: 72px;
  margin-bottom: 0.2em;
}

/* Abstract box */
.abstract-box {
  border: 3px solid #333;
  padding: 18px 22px;
  border-radius: 18px;
  text-align: justify;
}

/* Highlight spans */
.highlight-qk  { color: #C5172E; font-weight: bold; }
.highlight-ov  { color: #118B50; font-weight: bold; }
.highlight-mlp { color: #1B56FD; font-weight: bold; }

/* Custom underline */
.custom-underline {
  text-decoration: underline;
  text-decoration-color: rgba(148, 167, 207, 0.5);
  text-decoration-thickness: 2px;
  text-decoration-skip-ink: none;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #fdf6ec 0%, #f0f4ff 100%);
}

/* Teaser section */
.teaser {
  font-family: 'Google Sans', sans-serif;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser .hero-body figure {
  position: relative;
}

.teaser .hero-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

/* Result figure grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.results-grid figure img {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
}

.results-grid figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

/* BibTeX */
pre code {
  font-size: 0.82rem;
  background: #f5f5f5;
  display: block;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Footer */
.footer a {
  color: rgb(148, 167, 207);
}

.footer a:hover {
  text-decoration: underline;
  color: rgb(15, 76, 130);
}

/* Badge / venue tag */
.venue-tag {
  display: inline-block;
  background: linear-gradient(90deg, #C5172E, #1B56FD);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 4px 18px;
  border-radius: 20px;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* Key result highlight */
.key-result-box {
  background: linear-gradient(135deg, #fff5f5 0%, #f0f7ff 100%);
  border-left: 5px solid #C5172E;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 1.05rem;
}

/* Component color pills */
.pill {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 3px;
}

.pill-qk  { background: #fde8ea; color: #C5172E; }
.pill-ov  { background: #e6f5ec; color: #118B50; }
.pill-mlp { background: #e8edff; color: #1B56FD; }

/* Scrollbar */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgb(148, 167, 207); border-radius: 10px; border: 3px solid rgb(248, 202, 202); }
::-webkit-scrollbar-thumb:hover { background: rgb(15, 76, 130); }

/* Pulse animation for section separators */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #C5172E, #1B56FD);
  border-radius: 2px;
  margin: 0 auto 32px auto;
}

/* Method overview caption */
.method-caption {
  font-size: 0.88rem;
  color: #444;
  text-align: left;
  margin-top: 10px;
  line-height: 1.6;
}

/* ---- Component accordion ---- */
.component-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.component-detail {
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}

.component-detail[open] {
  box-shadow: 0 6px 28px rgba(0,0,0,0.11);
}

.component-detail summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}

.component-detail summary::-webkit-details-marker { display: none; }

/* component icon badge */
.component-detail summary .comp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* chevron */
.component-detail summary::after {
  content: '›';
  margin-left: auto;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.25s ease;
  opacity: 0.45;
  flex-shrink: 0;
}
.component-detail[open] summary::after {
  transform: rotate(90deg);
  opacity: 0.8;
}

/* QK — red */
.component-detail-qk {
  border-color: rgba(197, 23, 46, 0.25);
}
.component-detail-qk summary {
  background: linear-gradient(90deg, rgba(197,23,46,0.07) 0%, #fff 100%);
  border-left: 5px solid #C5172E;
}
.component-detail-qk summary:hover {
  background: linear-gradient(90deg, rgba(197,23,46,0.13) 0%, #fff 100%);
}
.component-detail-qk .comp-icon {
  background: rgba(197,23,46,0.12);
  color: #C5172E;
}
.component-detail-qk .comp-label { color: #C5172E; }

/* OV — green */
.component-detail-ov {
  border-color: rgba(17, 139, 80, 0.25);
}
.component-detail-ov summary {
  background: linear-gradient(90deg, rgba(17,139,80,0.07) 0%, #fff 100%);
  border-left: 5px solid #118B50;
}
.component-detail-ov summary:hover {
  background: linear-gradient(90deg, rgba(17,139,80,0.13) 0%, #fff 100%);
}
.component-detail-ov .comp-icon {
  background: rgba(17,139,80,0.12);
  color: #118B50;
}
.component-detail-ov .comp-label { color: #118B50; }

/* MLP — blue */
.component-detail-mlp {
  border-color: rgba(27, 86, 253, 0.25);
}
.component-detail-mlp summary {
  background: linear-gradient(90deg, rgba(27,86,253,0.07) 0%, #fff 100%);
  border-left: 5px solid #1B56FD;
}
.component-detail-mlp summary:hover {
  background: linear-gradient(90deg, rgba(27,86,253,0.13) 0%, #fff 100%);
}
.component-detail-mlp .comp-icon {
  background: rgba(27,86,253,0.12);
  color: #1B56FD;
}
.component-detail-mlp .comp-label { color: #1B56FD; }

/* Quantization — purple */
.component-detail-app-quant {
  border-color: rgba(124, 58, 237, 0.25);
}
.component-detail-app-quant summary {
  background: linear-gradient(90deg, rgba(124,58,237,0.07) 0%, #fff 100%);
  border-left: 5px solid #7C3AED;
}
.component-detail-app-quant summary:hover {
  background: linear-gradient(90deg, rgba(124,58,237,0.13) 0%, #fff 100%);
}
.component-detail-app-quant .comp-icon {
  background: rgba(124,58,237,0.12);
  color: #7C3AED;
}
.comp-label-app { color: #1a1a1a; }

/* TPS comparison — orange */
.component-detail-app-tps {
  border-color: rgba(234, 88, 12, 0.25);
}
.component-detail-app-tps summary {
  background: linear-gradient(90deg, rgba(234,88,12,0.07) 0%, #fff 100%);
  border-left: 5px solid #EA580C;
}
.component-detail-app-tps summary:hover {
  background: linear-gradient(90deg, rgba(234,88,12,0.13) 0%, #fff 100%);
}
.component-detail-app-tps .comp-icon {
  background: rgba(234,88,12,0.12);
  color: #EA580C;
}

/* Fine-tuning — teal */
.component-detail-app-ft {
  border-color: rgba(13, 148, 136, 0.25);
}
.component-detail-app-ft summary {
  background: linear-gradient(90deg, rgba(13,148,136,0.07) 0%, #fff 100%);
  border-left: 5px solid #0D9488;
}
.component-detail-app-ft summary:hover {
  background: linear-gradient(90deg, rgba(13,148,136,0.13) 0%, #fff 100%);
}
.component-detail-app-ft .comp-icon {
  background: rgba(13,148,136,0.12);
  color: #0D9488;
}

/* delta text */
.delta {
  font-size: 0.82rem;
  color: #888;
  font-weight: 400;
}

/* body */
.component-detail-body {
  padding: 20px 26px 24px 26px;
  font-size: 0.96rem;
  line-height: 1.75;
  border-top: 1px solid rgba(0,0,0,0.07);
  background: #fafafa;
}

.component-detail-body p {
  margin-bottom: 12px;
}

/* math block */
.math-block {
  overflow-x: auto;
  margin: 12px 0 16px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  text-align: center;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.04);
}

/* ---- Open Questions ---- */
.oq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.oq-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e8e8e8;
  padding: 24px 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}

.oq-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

.oq-card:nth-child(1) { border-left: 5px solid #C5172E; }
.oq-card:nth-child(2) { border-left: 5px solid #1B56FD; }
.oq-card:nth-child(3) { border-left: 5px solid #7C3AED; }

.oq-number {
  font-family: 'Caveat', cursive;
  font-size: 3.2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  margin-top: -4px;
}

.oq-card:nth-child(1) .oq-number { color: rgba(197,23,46,0.25); }
.oq-card:nth-child(2) .oq-number { color: rgba(27,86,253,0.25); }
.oq-card:nth-child(3) .oq-number { color: rgba(124,58,237,0.25); }

.oq-body {
  flex: 1;
}

.oq-title {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.oq-card:nth-child(1) .oq-title { color: #C5172E; }
.oq-card:nth-child(2) .oq-title { color: #1B56FD; }
.oq-card:nth-child(3) .oq-title { color: #7C3AED; }

.oq-body p { margin-bottom: 0; }

@media (max-width: 768px) {
  .oq-card { flex-direction: column; gap: 8px; }
  .oq-number { width: auto; font-size: 2.2rem; }
}

/* ---- Local objective side-by-side tables ---- */
.local-obj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 4px;
}

.sum-row td {
  font-style: italic;
  color: #555;
  border-top: 1px dashed #bbb !important;
}

@media (max-width: 768px) {
  .local-obj-grid { grid-template-columns: 1fr; }
}

/* ---- Runtime highlight box ---- */
.runtime-highlight-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fffbf0 0%, #f0f7ff 100%);
  border: 2px solid #f0b429;
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 16px;
  box-shadow: 0 3px 14px rgba(240, 180, 41, 0.15);
  font-size: 1.02rem;
  line-height: 1.7;
}

.runtime-highlight-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1.2;
}

/* ---- Results tables ---- */
.results-table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
}

.results-table {
  font-size: 0.88rem;
  border-collapse: collapse;
}

.results-table thead th {
  background: #f0f4ff;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 2px solid #c5c5c5;
}

.results-table tbody td {
  vertical-align: middle;
}

/* model name cell */
.model-cell {
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle !important;
}

.arch-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 0 5px;
  margin-top: 2px;
}

/* method name cells */
.method-ours {
  font-weight: 700;
  color: #C5172E;
  white-space: nowrap;
}

.method-baseline {
  color: #555;
  white-space: nowrap;
}

.method-original {
  color: #444;
  font-style: italic;
  white-space: nowrap;
}

/* original-model row */
.original-row td {
  background: #fafafa;
  border-top: 2px solid #ccc !important;
}

/* best result in a column */
.best-result {
  font-weight: 700;
}

/* highlight star result */
.highlight-cell {
  background: rgba(197, 23, 46, 0.08);
  color: #C5172E;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h2 { font-size: 48px; }
  .results-grid { grid-template-columns: 1fr; }
  .results-table { font-size: 0.75rem; }
}
