/* ------------------------------------------------------------------
   SOfA project page — paper-style tables and small layout helpers.
   Loaded after index.css so it can override the Nerfies/Bulma base.
   Palette is sampled from the SOfA logo:
     green #349028 · red #cd3719 · navy #001f42
   ------------------------------------------------------------------ */

:root {
  --sofa-green: #349028;
  --sofa-red: #cd3719;
  --sofa-navy: #001f42;
  --sofa-orange: #e07b1e;
  --sofa-hl: #fffdd9;          /* xcolor yellow!15 over white */
  --sofa-rule: #1a1a1a;
}

/* --- generic ------------------------------------------------------ */

.sofa-mark {
  vertical-align: -0.18em;
  margin-right: 0.15em;
}

.tag-soon {
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  font-size: 0.8rem;
  padding: 0.15em 0.55em;
  font-weight: 600;
  white-space: nowrap;
}

.venue-line {
  color: #555;
  font-weight: 600;
}

/* Buttons that point at something not released yet. */
.button.is-dark[disabled],
.button.is-dark.is-soon {
  background-color: #7a7a7a;
  border-color: #7a7a7a;
  color: #fff;
  opacity: 1;
  cursor: default;
  box-shadow: none;
}

/* --- section furniture ------------------------------------------- */

.sofa-section-rule {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}

.title.is-3 {
  margin-bottom: 1.25rem;
}

.caption {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #363636;
  margin-top: 0.9rem;
}

.caption strong {
  color: var(--sofa-navy);
}

.subcaption {
  font-size: 0.9rem;
  color: #4a4a4a;
  margin-top: 0.6rem;
  text-align: center;
}

.table-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sofa-navy);
  margin-bottom: 0.55rem;
  text-align: center;
}

/* --- paper tables (booktabs look) -------------------------------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.25rem;
}

table.paper-table {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #1a1a1a;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

table.paper-table th,
table.paper-table td {
  padding: 0.3em 0.8em;
  border: none;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

/* The name column is opted in explicitly with .al rather than by :first-child, because
   tab:ablation (CJS/SJE) and tab:ablation_slot (Slots) spec their first column as `c`
   in LaTeX — those must stay centered like every other numeric column. */
table.paper-table td.al,
table.paper-table th.al { text-align: left; }

table.paper-table thead th {
  font-weight: 700;
  color: var(--sofa-navy);
}

/* \toprule */
table.paper-table thead tr:first-child th {
  border-top: 1.4px solid var(--sofa-rule);
}

/* \midrule under the header block */
table.paper-table thead tr:last-child th {
  border-bottom: 0.9px solid var(--sofa-rule);
}

/* \bottomrule */
table.paper-table tbody tr:last-child td {
  border-bottom: 1.4px solid var(--sofa-rule);
}

/* \cmidrule(lr){i-j} — partial rule spanning a column group */
table.paper-table th.cmid {
  border-bottom: 0.8px solid var(--sofa-rule);
}

/* a \multirow{2} header cell sits in row 1 but must close the header block */
table.paper-table thead th[rowspan] {
  border-bottom: 0.9px solid var(--sofa-rule);
}

/* an explicit \midrule between body blocks */
table.paper-table tr.rule td,
table.paper-table tr.rule th {
  border-top: 0.9px solid var(--sofa-rule);
}

/* group label rows: "Sensor-Specific Representation:" etc. */
table.paper-table tr.group td {
  text-align: left;
  font-weight: 700;
  font-style: italic;
  color: var(--sofa-navy);
  padding-top: 0.45em;
  padding-bottom: 0.3em;
}

/* our rows — LaTeX \rowcolor{yellow!15} */
table.paper-table tr.ours td {
  background-color: var(--sofa-hl);
}

table.paper-table tr.ours td:first-child {
  font-weight: 700;
}

table.paper-table tr.ours.group td {
  color: var(--sofa-navy);
}

/* best / second-best marking, as in the paper */
table.paper-table .best {
  font-weight: 700;
}

table.paper-table .second {
  text-decoration: underline;
  text-underline-offset: 2px;
}

table.paper-table .pub {
  color: #5a5a5a;
  font-size: 0.94em;
}

table.paper-table sup {
  font-size: 0.72em;
}

/* narrow screens: shrink rather than clip */
@media screen and (max-width: 768px) {
  table.paper-table {
    font-size: 0.76rem;
  }
  table.paper-table th,
  table.paper-table td {
    padding: 0.26em 0.5em;
  }
}

/* --- highlight callouts ------------------------------------------ */

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 1.75rem 0;
}

.kpi {
  flex: 1 1 190px;
  max-width: 250px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  padding: 1rem 0.9rem;
  text-align: center;
  background: #fcfcfc;
}

.kpi .kpi-num {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--sofa-red);
}

.kpi .kpi-label {
  font-size: 0.82rem;
  color: #4a4a4a;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* --- figures ------------------------------------------------------ */

.fig img {
  width: 100%;
  height: auto;
}

.fig-narrow img {
  max-width: 88%;
  height: auto;
}

/* --- bibtex ------------------------------------------------------- */

#BibTeX pre {
  background: #f6f7f9;
  border-radius: 8px;
  font-size: 0.85rem;
  overflow-x: auto;
}
