/* ---- Figures ---- */
.paper-figure {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.figure-block {
  margin: 1.25rem 0 1.75rem;
}

.figure-caption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4a4a4a;
}

.figure-narrow {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Headline numbers ---- */
.highlight-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 1.5rem auto 0.5rem;
}

.highlight-stat {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.9rem 0.75rem;
  background: #fff;
  text-align: center !important;
}

.highlight-stat .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #2563eb;
  text-align: center !important;
}

.highlight-stat .stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #4a4a4a;
  text-align: center !important;
}

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

/* ---- Pending links ---- */
.link-block-pending {
  opacity: 0.6;
}

.button.is-link-pending {
  opacity: 1;
  pointer-events: none;
  cursor: not-allowed;
}

/* ---- Tables ---- */
.fwltable-card {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.fwltable__caption {
  caption-side: top;
  text-align: left;
  margin-bottom: 0.5rem;
  color: #363636;
}

.fwltable__table th,
.fwltable__table td {
  vertical-align: middle;
  white-space: nowrap;
}

.fwltable__table td:not(:first-child),
.fwltable__table th:not(:first-child) {
  text-align: center !important;
}

.fwltable__table tr.is-ours td {
  background: #eff6ff;
}

.fwltable__divider td {
  padding: 0 !important;
  height: 3px;
  background: #dbdbdb;
}

.fwltable-check {
  color: #15803d;
  font-weight: 700;
}

.fwltable-cross {
  color: #b91c1c;
  font-weight: 700;
}

.fwltable__note {
  font-size: 0.88rem;
  color: #4a4a4a;
}

/* ---- Contribution list ---- */
.contribution-list li {
  margin-bottom: 0.4rem;
}

/* Keep textual content left-aligned across the page */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5,
#main-content h6,
#main-content p,
#main-content li,
#main-content th,
#main-content td,
#main-content .subtitle,
#main-content .title,
#main-content .content,
#main-content .has-text-centered,
#main-content .has-text-justified,
footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6,
footer p,
footer li,
footer th,
footer td,
footer .content,
footer .has-text-centered,
footer .has-text-justified {
  text-align: left !important;
}

/* Keep the top hero title/author area centered */
#main-content .top-hero .column,
#main-content .top-hero .title,
#main-content .top-hero .publication-title,
#main-content .top-hero .publication-authors,
#main-content .top-hero .author-block,
#main-content .top-hero .eql-cntrb,
#main-content .top-hero .publication-links,
#main-content .top-hero .has-text-centered,
#main-content .top-hero p,
#main-content .top-hero span {
  text-align: center !important;
}

/* Keep all h2 centered even when body text stays left-aligned */
#main-content h2,
#main-content h2.title,
#main-content h2.subtitle,
#main-content h2.has-text-centered,
footer h2,
footer h2.title,
footer h2.subtitle {
  text-align: center !important;
}

/* Keep BibTeX section left-aligned */
#main-content #BibTeX h2,
#main-content #BibTeX h2.title,
#main-content #BibTeX h2.subtitle {
  text-align: left !important;
}

/* Center cells of numeric table columns despite the left-align rule above */
#main-content .fwltable__table td:not(:first-child),
#main-content .fwltable__table th:not(:first-child) {
  text-align: center !important;
}

/* ---- Venue badge ---- */
.publication-venue {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- Key-insight cards ---- */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.insight-card {
  border: 1px solid #e5e7eb;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
}

.insight-card h4 {
  margin: 0 0 0.35rem !important;
  font-size: 1rem;
  color: #1e3a8a;
}

/* ---- Real-world comparison viewer ---- */
.comp-scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.comp-viewer {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

.comp-base {
  display: block;
  width: 100%;
  height: auto;
}

.comp-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.comp-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.comp-divider::after {
  content: '\25C0\25B6';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #333;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.comp-label {
  position: absolute;
  top: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  transition: background 0.4s ease;
}

.comp-label-left { left: 10px; }
.comp-label-right { right: 10px; }
.comp-label.benign { background: rgba(0, 0, 0, 0.65); }
.comp-label.attacked { background: rgba(185, 28, 28, 0.85); }
.comp-label.denoised { background: rgba(22, 101, 52, 0.85); }

.comp-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center !important;
}

.comp-legend .is-benign { color: #374151; font-weight: 600; }
.comp-legend .is-attacked { color: #b91c1c; font-weight: 600; }
.comp-legend .is-denoised { color: #166534; font-weight: 600; }

#main-content .comp-legend,
#main-content .comp-hint {
  text-align: center !important;
}

/* Method column that follows a rowspan cell */
#main-content .fwltable__table td.is-method {
  text-align: left !important;
}

/* ---- Responsive video embed ---- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Key-insight waveform diagram ---- */
.wf-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 1rem 0 0.75rem;
  font-size: 0.92rem;
  color: #374151;
}

.wf-swatch {
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.wf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wf-panel {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 0.8rem 0.9rem 0.9rem;
}

.wf-title {
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.35rem;
}

.wf-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
}

.wf-svg {
  display: block;
  width: 100%;
  height: auto;
}

.wf-svg .wf-axis {
  font-size: 12px;
  fill: #6b7280;
}

.wf-svg .wf-note {
  font-size: 13px;
  font-weight: 600;
}

.wf-caption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4a4a4a;
}

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