/* ============================================================
   DFloat11 — NeurIPS 2025 poster (System B, landscape canvas)
   Self-contained: no @import. Fork of the house portrait posters,
   retuned for an A0-landscape sheet (1189 x 841 mm) and a 2-pane
   High-level / Detail layout.
   ============================================================ */

:root {
  --page-bg: #eef1f8;
  --panel-bg: #ffffff;
  --panel-border: #d6ddec;
  --text: #2b3650;
  --muted: #66728a;
  --navy: #283069;
  --blue: #1f5e9d;
  --green: #2ba66f;
  --orange: #e6892a;
  --purple: #6d5cd0;
  --red: #d6485f;
  --gold: #c08a1c;
  --indigo-tint: #eef0fb;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.16;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------- Canvas ------------------------- */
.page-shell {
  width: min(1480px, calc(100vw - 16px));
  aspect-ratio: 1189 / 841; /* A0 landscape */
  display: grid;
  grid-template-rows: minmax(120px, auto) minmax(0, 1fr) minmax(88px, auto);
  gap: 12px;
  padding: 16px 22px 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(214, 221, 236, 0.95),
    0 18px 52px rgba(31, 42, 78, 0.14);
  margin: 10px auto;
}

/* ------------------------- Header ------------------------- */
.poster-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 2.6fr) minmax(190px, 0.85fr);
  gap: 18px;
  align-items: center;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-logos--left {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.header-logos--right {
  justify-content: flex-end;
  gap: 14px;
}

.logo {
  object-fit: contain;
}

.logo--cwru {
  width: 205px;
}

.logo--rice {
  width: 116px;
}

.logo--neurips {
  width: 78px;
}

.logo--poster-qr {
  width: 80px;
  padding: 3px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
}

.poster-qr-callout {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 116px;
  color: #2c356f;
  font-size: 0.5rem;
  line-height: 1.05;
  font-weight: 850;
  text-align: center;
}

.header-title {
  min-width: 0;
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-size: 3.35rem;
  line-height: 0.95;
  font-weight: 880;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.subtitle {
  margin: 7px 0 0;
  color: #455070;
  font-size: 1.02rem;
  line-height: 1.12;
  font-weight: 760;
  text-wrap: balance;
}

.authors {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.12;
  font-weight: 740;
  text-wrap: balance;
}

.authors a {
  color: inherit;
  transition: color 140ms ease;
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.authors a:focus-visible {
  outline: 2px solid rgba(40, 48, 105, 0.34);
  outline-offset: 2px;
  border-radius: 4px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 9px;
}

.detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #ffffff;
  color: #303a63;
  font: inherit;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 880;
  cursor: pointer;
}

.detail-action:hover,
.detail-action:focus-visible {
  border-color: #b6c0db;
  color: var(--navy);
}

.detail-action:focus-visible {
  outline: 2px solid rgba(40, 48, 105, 0.34);
  outline-offset: 2px;
}

.detail-action.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.detail-action__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* --------------------------- Main -------------------------- */
.poster-main {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.poster-view[hidden] {
  display: none !important;
}

.poster-view {
  min-height: 0;
  display: grid;
}

.poster-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.07fr) minmax(0, 0.93fr);
  gap: 11px;
  grid-template-areas:
    "prob prob prob insight insight insight insight method method method kernel kernel"
    "comp comp comp thru    thru    thru    thru    mem    mem    mem    take   take";
}

.detail-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 11px;
  grid-template-areas:
    "math math math math luts luts luts luts twophase twophase twophase twophase"
    "algo algo algo algo abl1 abl1 abl1 abl1 abl2     abl2     abl2     abl2";
}

.panel--prob { grid-area: prob; }
.panel--insight { grid-area: insight; }
.panel--method { grid-area: method; }
.panel--kernel { grid-area: kernel; }
.panel--comp { grid-area: comp; }
.panel--thru { grid-area: thru; }
.panel--mem { grid-area: mem; }
.panel--take { grid-area: take; }
.panel--math { grid-area: math; }
.panel--luts { grid-area: luts; }
.panel--twophase { grid-area: twophase; }
.panel--algo { grid-area: algo; }
.panel--ablation1 { grid-area: abl1; }
.panel--ablation2 { grid-area: abl2; }

/* -------------------------- Panels ------------------------- */
.panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 13px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: var(--panel-bg);
  box-shadow: 0 8px 22px rgba(36, 56, 96, 0.06);
  overflow: hidden;
}

.panel > * {
  min-width: 0;
  min-height: 0;
}

.panel--blue { border-top: 6px solid var(--blue); }
.panel--green { border-top: 6px solid var(--green); }
.panel--orange { border-top: 6px solid var(--orange); }
.panel--purple { border-top: 6px solid var(--purple); }
.panel--red { border-top: 6px solid var(--red); }
.panel--gold { border-top: 6px solid var(--gold); }

.panel h2 {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--indigo-tint);
  color: var(--navy);
  font-size: 1.04rem;
  line-height: 1.04;
  font-weight: 870;
  text-wrap: balance;
}

.panel ul {
  margin: 0;
  padding-left: 1.05rem;
  color: #38445e;
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 520;
}

.panel li + li {
  margin-top: 0.3rem;
}

.panel li strong {
  color: #28344e;
  font-weight: 850;
}

.panel code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: #243a61;
}

/* Figures fill remaining vertical space, captions sit beneath */
.panel figure {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.panel figure img {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.panel figcaption {
  flex: 0 0 auto;
  color: #5a6781;
  font-size: 0.61rem;
  line-height: 1.16;
  font-weight: 620;
}

/* Slim bit-strip figure (BFloat16 layout) */
.figure--strip {
  flex: 0 0 auto;
}

.figure--strip img {
  flex: 0 0 auto;
  height: auto;
  max-height: 52px;
  width: 100%;
  object-fit: contain;
}

/* Callout note */
.note {
  flex: 0 0 auto;
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--indigo-tint);
  color: #4a5670;
  font-size: 0.7rem;
  line-height: 1.18;
  font-weight: 640;
}

.note strong {
  color: var(--navy);
  font-weight: 880;
}

.panel--prob .note {
  margin-top: auto;
}

.note--pointer {
  margin-top: auto;
  background: #efeafc;
  color: #4a3da0;
  text-align: center;
}

.note--pointer strong {
  color: #3a2e8c;
}

.note--quiet {
  background: #eef6f1;
  color: #2f6048;
  font-size: 0.66rem;
}

.note--quiet strong {
  color: #245038;
}

/* Centered KaTeX formula line */
.formula {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f4f6fc;
  color: #1f2a4d;
  font-size: 0.86rem;
  text-align: center;
  overflow: hidden;
}

.formula .katex {
  font-size: 1em;
}

/* Headline metric grid */
.metric-grid {
  flex: 0 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 7px;
}

.metric-grid p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 6px;
  border-radius: 8px;
  background: #f1f5fc;
  text-align: center;
}

.metric-grid strong {
  color: var(--navy);
  font-size: 1.12rem;
  line-height: 1;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
}

.metric-grid span {
  color: #62708a;
  font-size: 0.49rem;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* Result table */
.panel table {
  flex: 0 1 auto;
  width: 100%;
  border-collapse: collapse;
  color: #2c3a55;
  font-variant-numeric: tabular-nums;
}

.panel thead th {
  padding: 4px 6px;
  border-bottom: 2px solid #c7d2e3;
  color: #354463;
  font-size: 0.62rem;
  line-height: 1.05;
  font-weight: 880;
  text-align: left;
}

.panel thead th:last-child {
  text-align: right;
}

.panel tbody th,
.panel tbody td {
  padding: 4px 6px;
  border-bottom: 1px solid #e6ebf3;
  font-size: 0.68rem;
  line-height: 1.06;
  text-align: left;
  font-weight: 620;
}

.panel tbody th {
  font-weight: 820;
  color: #28344e;
}

.panel tbody td:last-child {
  text-align: right;
  font-weight: 820;
}

.panel tbody tr.is-highlighted th,
.panel tbody tr.is-highlighted td {
  background: #e7f4ec;
  color: #1f6b44;
  font-weight: 900;
}

/* Takeaway chips (vertical, narrow column) */
.takeaway-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaway-list li {
  padding: 8px 9px;
  border-radius: 9px;
  background: #fbf2d8;
  color: #6c4f12;
  font-size: 0.74rem;
  line-height: 1.08;
  font-weight: 720;
  text-align: center;
}

.takeaway-list li + li {
  margin-top: 0;
}

.takeaway-list strong {
  color: #523a06;
  font-weight: 920;
}

/* Decision / trade-off strip */
.decision-strip {
  flex: 0 0 auto;
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.decision-strip p {
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f4f6fc;
  color: #2f3d56;
  font-size: 0.62rem;
  line-height: 1.12;
  font-weight: 680;
}

.decision-strip span {
  display: block;
  margin-bottom: 3px;
  color: #6a7790;
  font-size: 0.46rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-strip strong {
  display: block;
  color: var(--navy);
  font-weight: 880;
}

.decision-strip p:first-child {
  background: #fbeceb;
}

.decision-strip p:first-child strong {
  color: #9a3145;
}

.decision-strip p:last-child {
  background: #e9f4ee;
}

.decision-strip p:last-child strong {
  color: #1f6b44;
}

/* -------------------------- Footer ------------------------- */
.poster-footer {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.92fr)) minmax(360px, 1.5fr);
  gap: 11px;
}

.cta-card,
.quickstart {
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 48, 92, 0.06);
}

.cta-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 11px;
}

.cta-card__meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.cta-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf2fb;
  color: #243b63;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
}

.cta-card__chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.cta-card__chip--icon-only {
  gap: 0;
  line-height: 0;
}

.cta-card__chip--icon-only img {
  width: auto;
  height: 1.05rem;
}

.cta-card__url {
  display: block;
  min-width: 0;
  color: #2a456d;
  font-size: 0.74rem;
  line-height: 1.06;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cta-card__qr {
  width: 50px;
  height: 50px;
  padding: 2px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #d3dde9;
  border-radius: 8px;
}

.cta-card--github {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.cta-card--paper {
  background: linear-gradient(180deg, #ffffff 0%, #fff8f4 100%);
}

.cta-card--paper .cta-card__chip {
  background: #fff0e8;
  color: #8a3d1c;
}

.cta-card--pypi {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.cta-card--pypi .cta-card__chip {
  background: #eaf1fb;
  color: #285187;
}

.quickstart {
  display: grid;
  align-content: center;
  gap: 0;
  padding: 6px 12px;
  border-radius: 12px;
  background: #262834;
  color: #f6f6f2;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(12, 21, 32, 0.14);
}

.quickstart__dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.quickstart__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.quickstart__dots span:nth-child(1) { background: #ffd76a; }
.quickstart__dots span:nth-child(2) { background: #7fe2c2; }
.quickstart__dots span:nth-child(3) { background: #75b9ff; }

.quickstart code {
  display: block;
  font-family: var(--mono);
  font-size: 0.5rem;
  line-height: 1.28;
  white-space: pre;
  overflow: hidden;
}

.qs-command { color: #62f58b; }
.qs-token { color: #f2f078; }
.qs-comment { color: #8b94a6; }
.qs-kw { color: #c9a3ff; }
.qs-str { color: #ffb27a; }

/* ---------------------- Small screens ---------------------- */
@media (max-width: 900px) {
  .page-shell {
    width: min(760px, calc(100vw - 12px));
    aspect-ratio: auto;
    grid-template-rows: auto auto auto;
  }

  .poster-header,
  .poster-grid,
  .detail-grid,
  .poster-footer {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .poster-grid,
  .detail-grid {
    grid-template-rows: none;
  }

  .panel {
    grid-area: auto !important;
  }

  .header-logos {
    justify-content: center;
  }

  h1 {
    font-size: 2.2rem;
  }
}
