/* =================================================================
   UCCS ICLR 2026 poster — 1900 × 900 mm (ICLR max landscape)
   Design tokens inherited from docs/assets/css/style.css:
     off-white #FAFAF7 · navy #0A2F5C · teal #2C8C99 · amber #E3A32B
   Units: "1 px in this CSS == 1 design mm" (content box is 1900x900px).
   ================================================================= */

:root {
  --bg:         #FAFAF7;
  --panel:      #FFFFFF;
  --panel-soft: #F5F5F0;
  --border:     #E4E4DE;
  --text:       #1A1A1A;
  --muted:      #555555;

  --navy:       #0A2F5C;
  --navy-soft:  #1E4C82;
  --navy-bg:    #EAF0F7;

  --teal:       #2C8C99;
  --teal-soft:  #E1F1F3;
  --teal-hi:    #1E6872;

  --amber:      #E3A32B;
  --amber-soft: #FCF1D8;

  --good:       #2F8F4F;

  --font-sans:  'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: 'Charter', 'Iowan Old Style', Georgia, serif;

  --shadow-sm:  0 1px 2px rgba(10, 47, 92, 0.06);
  --shadow-md:  0 4px 12px rgba(10, 47, 92, 0.08);
}

@page { size: 1900mm 900mm; margin: 0; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ---------------- Canvas ---------------- */

.poster {
  width: 1900px;
  height: 900px;
  padding: 22px 28px 16px 28px;
  display: grid;
  grid-template-rows: 82px 1fr 80px;
  row-gap: 16px;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 800px 400px at 8% 0%, rgba(44, 140, 153, 0.045) 0%, transparent 60%),
    radial-gradient(ellipse 900px 300px at 100% 100%, rgba(227, 163, 43, 0.035) 0%, transparent 65%);
}

/* ---------------- Top banner ---------------- */

.banner {
  display: grid;
  grid-template-columns: 260px 1fr 200px;
  align-items: center;
  gap: 22px;
  padding: 4px 4px 12px 4px;
  border-bottom: 2px solid var(--navy);
  position: relative;
}

.banner::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1px;
  background: var(--teal);
  opacity: 0.6;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}
.banner-left img.logo-mbzuai {
  height: 50px;
  width: auto;
  object-fit: contain;
}
.banner-left img.logo-kaust {
  height: 62px;
  width: auto;
  object-fit: contain;
}

.banner-title {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}

.banner-title h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 800;
  color: var(--navy);
}
.banner-title h1 .accent {
  color: var(--teal);
  font-style: italic;
  font-weight: 800;
}

.banner-title .authors {
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}
.banner-title .authors sup {
  color: var(--teal);
  font-weight: 700;
  font-size: 11px;
}
.banner-title .affil {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}
.banner-title .affil sup { color: var(--teal); font-weight: 700; }
.banner-title .affil .note { font-style: italic; }

.banner-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.iclr-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: #fff;
  line-height: 1;
}
.iclr-pill .ic {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--navy);
}
.iclr-pill .yr {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--teal);
}

/* ---------------- Body grid ---------------- */

.body-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 16px;
  min-height: 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* Middle column: single panel must fill the full column height */
.col.col-mid { justify-content: stretch; }
.col.col-mid > .panel { flex: 1 1 auto; }

/* Right column: explicit panel heights so Main Results + Ablations don't get
   crushed by content-sized flex children. Remaining space goes to gallery. */
.col.col-right > .panel.result:nth-of-type(1) { flex: 0 0 316px; }
.col.col-right > .panel.result:nth-of-type(2) { flex: 0 0 142px; }
.col.col-right > .panel.gallery-panel        { flex: 1 1 auto; }

/* ---------------- Panel ---------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.panel.feature { border-top: 3px solid var(--teal); }
.panel.method  { border-top: 3px solid var(--navy); }
.panel.result  { border-top: 3px solid var(--teal); }
.panel.limit   { border-left: 3px solid var(--amber); border-top: 0; }

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 12px 4px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #FBFAF5 100%);
  flex-shrink: 0;
}
.panel-head .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.06em;
  padding-top: 1px;
}
.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.panel-head h2 em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}

.panel-body {
  padding: 7px 12px 8px 12px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}
.panel-body p { margin: 0; }
.panel-body b, .panel-body strong { color: var(--navy); }
.panel-body em { color: var(--teal); font-style: normal; font-weight: 600; }
.panel-body ul { margin: 0; padding-left: 14px; }
.panel-body ul li { margin-bottom: 2px; }
.panel-body ul.tight li { margin-bottom: 1px; }

/* ---------------- Pictures ---------------- */

.fig {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}
.fig img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: #fff;
}
.fig figcaption,
.caption {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.28;
  font-style: italic;
}

.fig {
  min-height: 0;
}
.fig img {
  max-height: 100%;
}

/* ---------------- Motivation strip (4-panel pLDDT) ---------------- */

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.strip-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 4px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.strip-card.ok { border-color: var(--teal); }
.strip-card.bad { border-color: var(--amber); }
.strip-card img {
  width: 100%;
  height: 62px;
  object-fit: contain;
  display: block;
}
.strip-card .tag {
  margin-top: 1px;
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.15;
}
.strip-card .tag b { font-size: 9.5px; }
.strip-card.ok .tag b { color: var(--teal); }
.strip-card.bad .tag b { color: var(--amber); }

/* ---------------- Metric tiles (R(x)) ---------------- */

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.metric-tile {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
}
.metric-tile .sym {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.metric-tile .desc {
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--text);
  line-height: 1.25;
}

.formula {
  font-family: var(--font-serif);
  font-size: 11px;
  background: var(--navy-bg);
  border-left: 3px solid var(--navy);
  border-radius: 3px;
  padding: 4px 8px;
  color: var(--navy);
  line-height: 1.35;
}
.formula .op { font-family: var(--font-sans); font-weight: 600; }
.formula.teal { background: var(--teal-soft); border-left-color: var(--teal); color: var(--teal-hi); }

.axis-note {
  display: inline-block;
  font-size: 10.5px;
  color: var(--teal);
  font-weight: 600;
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* ---------------- Baseline matrix (Why not penalize?) ---------------- */

.baseline-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.baseline-matrix th,
.baseline-matrix td {
  padding: 2.5px 7px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.baseline-matrix th {
  background: var(--panel-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.baseline-matrix td.lbl {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}
.baseline-matrix tr:last-child td { border-bottom: 0; }
.baseline-matrix tr.ours td {
  background: var(--teal-soft);
  color: var(--teal-hi);
  font-weight: 700;
}
.baseline-matrix .up { color: var(--teal); font-weight: 700; }
.baseline-matrix .dn { color: var(--amber); font-weight: 700; }
.baseline-matrix .eq { color: var(--muted); }
.baseline-matrix .good { color: var(--good); font-weight: 700; }
.baseline-matrix .bad  { color: var(--amber); font-weight: 700; }

/* ---------------- Method column (big diagram + 3 step cards) ---------------- */

.method-fig {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.method-fig img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  max-height: 360px;
}
/* When method panel spans the whole middle column, give diagram maximum room */
.method-full .method-fig img { max-height: 340px; }

.step-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 2px;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--navy);
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step .badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  padding: 1px 6px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: 0.04em;
}
.step .title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 1px;
}
.step .desc {
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--text);
}
.step .eq-mini {
  font-family: var(--font-serif);
  font-size: 10px;
  background: var(--navy-bg);
  color: var(--navy);
  padding: 3px 4px;
  border-radius: 2px;
  text-align: center;
}

.method-note {
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 10px;
  color: var(--teal-hi);
  line-height: 1.32;
}

/* ---------------- Results right column ---------------- */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.kpi {
  background: #fff;
  border: 1.5px solid var(--teal);
  border-radius: 5px;
  padding: 3px 4px 2px 4px;
  text-align: center;
}
.kpi .v {
  font-size: 16px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  font-family: var(--font-sans);
}
.kpi .k {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  color: var(--navy);
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: uppercase;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.result-table th,
.result-table td {
  padding: 1.5px 5px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.result-table th {
  background: var(--panel-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.result-table td.lbl {
  text-align: left;
  font-weight: 500;
}
.result-table tr.ours td {
  background: var(--teal-soft);
  color: var(--teal-hi);
  font-weight: 700;
  border-bottom: 1.5px solid var(--teal);
  border-top: 1.5px solid var(--teal);
}
.result-table .check { color: var(--good); font-weight: 700; }
.result-table .xmark { color: var(--amber); font-weight: 700; }

.scatter-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  flex: 1 1 auto;
}
.scatter-row img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 108px;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.scatter-legend {
  list-style: none;
  margin: 0;
  padding: 3px 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 8px;
  row-gap: 2px;
  font-size: 8.5px;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex: 0 0 auto;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.scatter-legend li {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.scatter-legend li b { color: var(--teal-hi); font-weight: 700; }
.scatter-legend .mk {
  display: inline-block;
  flex-shrink: 0;
}
.scatter-legend .mk.square {
  width: 8px; height: 8px;
  border: 1px solid rgba(0,0,0,.45);
}
.scatter-legend .mk.circle {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.45);
}
.scatter-legend .mk.diamond {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  border: 1px solid rgba(0,0,0,.45);
  margin: 0 1px;
}
.scatter-legend .mk.triangle {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom-width: 8px;
  border-bottom-style: solid;
}
.scatter-legend .mk.uccs     { background: #5BC3D4; }
.scatter-legend .mk.original { background: #CF4D5A; }
.scatter-legend .mk.temp     { background: #DB78AD; }
.scatter-legend .mk.topp     { background: #BDBD47; }
.scatter-legend .mk.entropy  { background: #3B7BB5; }
.scatter-legend .mk.neuron   { border-bottom-color: #E88A2D; }
.scatter-legend .mk.probe    { border-bottom-color: #9A5F4F; }

.ablation-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ablation-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px;
}
.ablation-card img {
  width: 100%;
  height: 62px;
  object-fit: contain;
  display: block;
}
.ablation-card .lbl {
  font-size: 10px;
  color: var(--navy);
  font-weight: 700;
  text-align: center;
  margin-top: 3px;
  line-height: 1.25;
}

/* ---------------- Limits block ---------------- */

.limit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.limit-list li {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 9.5px;
  line-height: 1.3;
  color: #5c420b;
}
.limit-list li b { color: var(--navy); }

/* ---------------- Bottom strip ---------------- */

.bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 8px 6px 0 6px;
  border-top: 1px solid var(--border);
}

.venue-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 14px;
  text-transform: uppercase;
}
.venue-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.bottom-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tagline {
  font-size: 12.5px;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.35;
}
.tagline b { color: var(--navy); font-weight: 800; }
.tagline em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}
.bottom-limits {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.bottom-limits b { color: #8a6013; }

.qr-strip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.qr-item img {
  width: 56px;
  height: 56px;
  display: block;
  background: #fff;
  border-radius: 3px;
  padding: 2px;
}
.qr-item .lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------------- Utility chips ---------------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy-bg);
  color: var(--navy);
  letter-spacing: 0.03em;
}
.chip.teal  { background: var(--teal-soft);  color: var(--teal-hi); }
.chip.amber { background: var(--amber-soft); color: #8a6013; }

/* ---------------- Gallery (many small UCCS thumbnails) ---------------- */

.gallery-panel .panel-body {
  gap: 4px;
  padding: 5px 10px 6px 10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
}
.thumb {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.thumb.esm { border-top: 2px solid var(--teal); }
.thumb.gpt { border-top: 2px solid var(--navy-soft); }
.thumb img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: contain;
  display: block;
}
.thumb figcaption {
  flex: 0 0 auto;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-note {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.3;
  margin: 0;
  flex: 0 0 auto;
}
.gallery-note b { color: var(--navy); }
.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  vertical-align: middle;
}
.swatch.esm { background: var(--teal); }
.swatch.gpt { background: var(--navy-soft); }

/* Decoupling panel — two violin plots with matched heights */
.decouple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.decouple-grid .fig {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
.decouple-grid .fig img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}
.decouple-grid .fig figcaption {
  text-align: center;
}

/* ---------------- Small text helpers ---------------- */

.muted { color: var(--muted); }
.small { font-size: 10.5px; }
.smaller { font-size: 10px; }
.sup-teal sup { color: var(--teal); font-weight: 700; }

/* Keep figure captions concise on tight rows */
.panel-body .panel-note {
  font-size: 10.5px;
  color: var(--muted);
  font-style: italic;
}
