body {
  font-family: 'Noto Sans', sans-serif;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a,
.link-block > .button {
  margin-top: 5px;
  margin-bottom: 5px;
}

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

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

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

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

.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}

/* ─── SaT hero ─── */

.sat-hero .hero-body {
  padding-top: 2rem;
  padding-bottom: 2.4rem;
}

.sat-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}

.sat-logo {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
}

.sat-hero-banner {
  width: min(100%, 1180px);
  margin: 1.45rem auto 0;
  padding: 0.85rem;
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(16, 24, 32, 0.10);
}

.sat-hero-banner img {
  display: block;
  width: 100%;
  border-radius: 6px;
}

.sat-hero-caption {
  margin: 0.75rem 0 0;
  color: #455467;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

/* ─── Section divider ─── */
.section-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, hsl(204, 86%, 53%), transparent);
  border: none;
  margin: 0;
}

/* ─── Challenge / failure-mode list items ─── */
.challenge-item {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s ease;
}

.challenge-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.challenge-item strong {
  color: #1a3a5c;
}

/* ─── Method boxes ─── */
.method-box {
  background: linear-gradient(135deg, #f0f4f8, #e8edf2);
  border-left: 4px solid hsl(204, 86%, 53%);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.method-box .title {
  color: #1a3a5c;
}

/* ─── Insight box ─── */
.insight-box {
  background: linear-gradient(135deg, #eef6ff, #e3f0ff);
  border: 1px solid #b3d4fc;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.insight-box p.has-text-weight-semibold {
  color: #1a56db;
}

/* ─── Problem / fix figure pairs (panels from the poster) ─── */
.panel-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.panel-pair figure {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.panel-pair img {
  width: 100%;
  height: auto;
  margin-top: auto;
  padding-top: 0.75rem;
}

.panel-label {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #333;
}

.panel-label.is-problem {
  background: #fdeeee;
}

.panel-label.is-problem > strong:first-child {
  color: #b42121;
}

.panel-label.is-fix {
  background: #eaf6ee;
}

.panel-label.is-fix > strong:first-child {
  color: #0b7a36;
}

.panel-note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

@media screen and (max-width: 768px) {
  .panel-pair {
    grid-template-columns: 1fr;
  }
}

/* ─── Architecture / figure containers ─── */
.arch-diagram-container {
  background: #fafbfc;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.arch-diagram-container img {
  width: 100%;
  border-radius: 8px;
}

.result-figure {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

.result-figure img {
  width: 100%;
  display: block;
}

.result-figure .caption {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  line-height: 1.45;
}

/* ─── Tables ─── */
.model-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.model-table-wrapper table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.model-table-wrapper table thead th {
  background: #1a3a5c;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
}

.model-table-wrapper table tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #eee;
}

.model-table-wrapper table tbody tr:hover {
  background: #f0f7ff;
}

/* ─── Equation highlight ─── */
.equation-highlight {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  text-align: center;
  font-size: 1.05rem;
  overflow-x: auto;
}

/* ─── BibTeX ─── */
#BibTeX pre {
  background: #1a2332;
  color: #e6edf3;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ─── Interactive alpha demo (reuses ReViT rebase styles) ─── */
.rebase-interactive {
  margin: 2rem 0 2.25rem;
}

.rebase-header {
  max-width: 820px;
  margin-bottom: 1rem;
}

.rebase-header .title {
  margin-bottom: 0.4rem;
  color: #172a3a;
}

.rebase-kicker {
  margin-bottom: 0.35rem;
  color: #b44a2b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rebase-control-bar {
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  padding: 0.7rem;
  background: #f7f9fb;
  border: 1px solid #dce4ec;
  border-radius: 8px;
}

.rebase-angle-buttons {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  background: #e8eef4;
  border-radius: 8px;
}

.rebase-angle {
  min-width: 64px;
  height: 34px;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #233746;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.rebase-angle:hover,
.rebase-angle:focus-visible {
  background: #d7e2eb;
  outline: none;
}

.rebase-angle.is-active {
  background: #1d405d;
  color: #fff;
}

.rebase-slider-label {
  color: #425466;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.rebase-slider {
  width: 100%;
  accent-color: #d95d39;
}

#alpha-output {
  min-width: 52px;
  color: #172a3a;
  font-weight: 800;
  text-align: right;
}

/* ─── Loss equation card ─── */
.loss-eq-card {
  margin: 0.5rem 0 1rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border: 1px solid #dce4ec;
  border-radius: 10px;
  overflow-x: auto;
  text-align: center;
}

/* ─── Alpha mix bar ─── */
.alpha-summary {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 10px;
}

.alpha-mix-row {
  display: flex;
  width: 100%;
  height: 38px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eef4;
}

.alpha-mix-segment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.85rem;
  background: #1d405d;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  transition: flex-basis 180ms ease;
  overflow: hidden;
}

.alpha-mix-segment-anchor {
  background: #d95d39;
}

.alpha-mix-label {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.alpha-mix-value {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.alpha-explainer {
  margin: 0.85rem 0 0;
  color: #31475a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alpha-explainer strong {
  color: #172a3a;
}

/* ─── Multi-step branching + dispatch demo ─── */
.sat-dispatch {
  margin: 2rem 0 2.25rem;
}

.sat-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0;
  padding: 0.85rem;
  background: #f7f9fb;
  border: 1px solid #dce4ec;
  border-radius: 8px;
}

.sat-slider-row {
  display: grid;
  gap: 0.35rem;
}

.sat-slider-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #425466;
  font-size: 0.9rem;
  font-weight: 700;
}

.sat-slider-row label output {
  color: #172a3a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sat-slider-row input[type=range] {
  width: 100%;
  accent-color: #1d405d;
}

.sat-toggle-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #e9eff3;
  border-radius: 8px;
}

.sat-mode-btn {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #233746;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.sat-mode-btn:hover {
  background: #d7e2eb;
}

.sat-mode-btn.is-active {
  background: #1d405d;
  color: #fff;
}

.sat-mode-title {
  font-weight: 800;
  font-size: 0.92rem;
}

.sat-mode-sub {
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.85;
}

.sat-step-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.sat-step-row button {
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 6px;
  background: #1d405d;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 160ms ease, transform 80ms ease;
}

.sat-step-row button:hover {
  background: #163349;
}

.sat-step-row button:active {
  transform: translateY(1px);
}

.sat-step-row button:disabled {
  background: #b4bfca;
  cursor: not-allowed;
}

.sat-step-row button#dsp-play {
  background: #d95d39;
  min-width: 110px;
}

.sat-step-row button#dsp-play:hover {
  background: #b94922;
}

.sat-step-row button#dsp-reset {
  background: #fff;
  color: #1d405d;
  border: 1px solid #b4bfca;
}

.sat-step-row button#dsp-reset:hover {
  background: #f2f6fa;
}

.sat-step-row output {
  margin-left: auto;
  color: #172a3a;
  font-weight: 800;
  font-size: 0.9rem;
}

.sat-canvas {
  padding: 0.5rem 0.75rem 1rem;
  background:
    radial-gradient(1200px 360px at 50% -10%, #eef4fb 0%, #fbfcfe 60%);
  border: 1px solid #dce4ec;
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: visible;
}

.sat-canvas svg {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
  max-height: 540px;
}

.sat-canvas svg text {
  user-select: none;
  -webkit-user-select: none;
}

.sat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.85rem;
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  color: #31475a;
  font-size: 0.85rem;
  font-weight: 600;
}

.sat-legend .dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.sat-legend .dot-student {
  background: #cfe1f3;
  border: 1.5px solid #4f86b9;
  border-radius: 3px;
}

.sat-legend .dot-solver {
  background: #fbe3cf;
  border: 1.5px solid #c97744;
  border-radius: 50%;
}

.sat-legend .dot-active {
  background: #fbe3cf;
  border: 2px solid #d95d39;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(217, 93, 57, 0.20);
}

.sat-legend .dot-done {
  background: #fbe3cf;
  border: 1.5px solid #c97744;
  border-radius: 50%;
  opacity: 0.45;
}

.sat-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.sat-stats > div {
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #dce4ec;
  border-radius: 8px;
}

.sat-stats span {
  display: block;
  margin-bottom: 0.3rem;
  color: #607385;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sat-stats strong {
  display: block;
  color: #172a3a;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

/* ─── Gradient training flow demo ─── */
.sat-gradient {
  margin: 2rem 0 2.25rem;
}

.sat-gradient .sat-canvas {
  min-height: 280px;
}

.sat-grad-toggle-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #e9eff3;
  border-radius: 8px;
}

.sat-grad-btn {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #233746;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.sat-grad-btn:hover {
  background: #d7e2eb;
}

.sat-grad-btn.is-active {
  background: #1d405d;
  color: #fff;
}

.sat-grad-title {
  font-weight: 800;
  font-size: 0.92rem;
}

.sat-grad-sub {
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Gradient-specific legend dots */
.sat-legend .dot-loss {
  width: 16px;
  height: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
  background: #2e9e5a;
  border-radius: 2px;
}

.sat-legend .dot-grad {
  width: 16px;
  height: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
  background: #3a7bd5;
  border-radius: 2px;
}

.sat-legend .dot-detach {
  width: 16px;
  height: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
  background: #3a7bd5;
  border-radius: 2px;
  border-top: 2px dashed #3a7bd5;
  background: none;
}

/* Weight badge in stats */
.sat-grad-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.sat-grad-weight-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: #e8f5ee;
  border: 1px solid #8ccda8;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a6b3a;
  font-variant-numeric: tabular-nums;
}

/* ─── Responsive ─── */
@media screen and (max-width: 900px) {
  .sat-title-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .rebase-control-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .rebase-angle-buttons {
    justify-content: space-between;
  }

  #alpha-output {
    text-align: left;
  }

  .sat-controls {
    grid-template-columns: 1fr;
  }

  .sat-toggle-group {
    grid-template-columns: 1fr;
  }

  .sat-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 520px) {
  .sat-hero .hero-body {
    padding-top: 1.4rem;
  }

  .sat-hero-banner {
    padding: 0.55rem;
  }

  .sat-title-row .publication-title {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .sat-logo {
    width: 60px;
    height: 60px;
  }

  .alpha-mix-row {
    height: auto;
    flex-direction: column;
  }

  .alpha-mix-segment {
    height: 34px;
  }
}

/* Loss-term chips show symbols, so undo the uppercase of the stat labels. */
.sat-stats .sat-grad-weights span {
  text-transform: none;
}

/* Result tables: keep "mean ± std" on one line; the wrapper scrolls if needed. */
.model-table-wrapper.numeric table thead th,
.model-table-wrapper.numeric table tbody td {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  white-space: nowrap;
}

/* ─── Rollout gallery and code block ─── */
.rollout-figure {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.sat-code {
  background: #1a2332;
  color: #e6edf3;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.85rem;
  overflow-x: auto;
}
