/* PID-specific additions on top of the shared project-page stylesheet (styles.css). */

.academic-theme .affiliation-logo-ibm {
  height: 40px;
}

@media (max-width: 720px) {
  .academic-theme .affiliation-logo-ibm {
    height: 32px;
  }
}

/* Still images in place of the template's videos. */
.academic-theme .hero-image-shell,
.academic-theme .figure-image-shell {
  overflow: hidden;
  padding: 14px;
  background: #fff;
  border-radius: 14px 14px 0 0;
}

.academic-theme .hero-image-shell img,
.academic-theme .figure-image-shell img,
.academic-theme .speed-image-shell img {
  width: 100%;
  height: auto;
  display: block;
}

.academic-theme .speed-image-shell {
  overflow: hidden;
  padding: 14px;
  background: #fff;
}

.academic-theme .button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.7;
}

.academic-theme .paper-table-image-wrap img.table-narrow {
  width: min(100%, 620px);
  min-width: 480px;
  margin-inline: auto;
}

/* Let the longer PID highlight labels wrap on narrow screens. */
@media (max-width: 720px) {
  .academic-theme .contribution-stat .accent-label {
    white-space: normal;
    text-align: center;
  }
}

/* Latency section: chart next to the key numbers. */
.academic-theme .latency-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.academic-theme .latency-chart {
  margin: 0;
}

.academic-theme .latency-copy > p {
  margin: 0 0 22px;
  color: #4b5b6e;
  font-size: 17px;
  line-height: 1.65;
}

.academic-theme .latency-stats {
  display: grid;
  gap: 12px;
}

.academic-theme .latency-stat {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-left: 4px solid #1f8a6a;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(31, 65, 105, 0.06);
}

.academic-theme .latency-value {
  color: #1f8a6a;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.academic-theme .latency-label {
  color: #5c6c80;
  font-size: 14px;
}

.academic-theme .latency-copy .latency-note {
  margin: 14px 0 0;
  color: #7b8899;
  font-size: 13px;
}

@media (max-width: 900px) {
  .academic-theme .latency-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Tables with few columns are shown narrower so their text matches the wide tables. */
.academic-theme .paper-table-image-wrap img.table-medium {
  width: min(100%, 880px);
  min-width: 640px;
  margin-inline: auto;
}

/* Landscape example slides. */
.academic-theme .speed-image-shell {
  background: #eef1e4;
}

/* Decoding video above the latency chart. */
.academic-theme .decoding-video {
  margin-bottom: 36px;
}

.academic-theme .decoding-video-shell {
  overflow: hidden;
  background: #0b1a30;
  border-radius: 14px 14px 0 0;
}

.academic-theme .decoding-video-shell video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Showcase video in the hero, and the teaser figure moved to Method. */
.academic-theme .hero-showcase .hero-video-shell video {
  display: block;
  height: auto;
}

.academic-theme .teaser-figure {
  margin-bottom: 36px;
}

/* ---------- Figures, charts and tables drawn in the page ---------- */
.academic-theme {
  --pid: #1f8a6a;
  --pid-soft: #e4f4ee;
  --base: #6f8fd6;
  --rex: #e07a66;
  --point: #f0ac1c;
}

/* Method: the same crop with PID's points and boxes. */
.academic-theme .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.academic-theme .step { margin: 0; }
.academic-theme .shot { position: relative; overflow: hidden; border-radius: 10px; background: #1b2433; }
.academic-theme .shot img { width: 100%; height: auto; display: block; }
.academic-theme .shot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.academic-theme .shot .pts circle { fill: var(--point); stroke: #1a1300; stroke-width: 1.2; }
.academic-theme .shot .pts.small circle { r: 2.4; stroke-width: 0.8; }
.academic-theme .shot .bxs rect { fill: rgba(60, 220, 160, 0.14); stroke: #3fe0a6; stroke-width: 2; vector-effect: non-scaling-stroke; }
.academic-theme .shot .ask { position: absolute; left: 10px; top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(16, 35, 63, 0.88); color: #fff; font-size: 14px; font-weight: 600; }
.academic-theme .shot .ask::before { content: "Reference: "; color: #a9c2f5; font-weight: 500; }
.academic-theme .teaser-figure .step figcaption { display: block; padding: 12px 2px 4px; background: none; border: 0; }
.academic-theme .step .no { color: var(--cyan-strong); font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.academic-theme .step h3 { margin: 3px 0 0; color: #172438; font-size: 18px; letter-spacing: -0.01em; }
.academic-theme .step p { margin: 3px 0 0; color: #596a7f; font-size: 14.5px; line-height: 1.5; }

.academic-theme .duo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 36px; }
.academic-theme .panel { padding: 22px 24px 24px; }
.academic-theme .panel > figcaption { display: block; padding: 0; background: none; border: 0; }
.academic-theme .panel h3 { margin: 0; color: var(--cyan-strong); font-size: 13px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.academic-theme .lane { margin-top: 18px; }
.academic-theme .lane + .lane { padding-top: 18px; border-top: 1px dashed #d5deec; }
.academic-theme .lane-name { margin: 0; color: #172438; font-size: 17px; font-weight: 700; }
.academic-theme .lane-name span { margin-left: 8px; color: #68778b; font-size: 14px; font-weight: 400; }
.academic-theme .is-pid .lane-name { color: var(--pid); }
.academic-theme .seq { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.academic-theme .seq i { position: relative; flex: none; width: 16px; height: 2px; background: #b3bfd0; }
.academic-theme .seq i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: #b3bfd0; border-right: 0; }
.academic-theme .seq i.wide { width: 34px; height: 3px; background: var(--pid); }
.academic-theme .seq i.wide::after { top: -2.5px; border-left-color: var(--pid); }
.academic-theme .tok { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 34px; padding: 0 8px; border-radius: 7px; font-size: 15px; font-weight: 600; font-style: italic; }
.academic-theme .tok sub { font-size: 0.7em; font-style: normal; line-height: 0; margin-left: 1px; }
.academic-theme .tok.b { background: var(--pid-soft); border: 1.5px solid var(--pid); color: #14644c; }
.academic-theme .lane:not(.is-pid) .tok.b { background: #fdece8; border-color: var(--rex); color: #a2402c; }
.academic-theme .tok.p { min-width: 34px; border-radius: 999px; background: #fdf1d3; border: 1.5px solid var(--point); color: #7a5300; }
.academic-theme .tok.ghost { min-width: 20px; padding: 0; color: #68778b; font-style: normal; }
.academic-theme .seq .group { display: inline-flex; align-items: center; gap: 6px; }
.academic-theme .seq .stack { display: inline-grid; grid-template-columns: repeat(2, auto); gap: 5px; padding: 7px; border: 1.5px dashed var(--pid); border-radius: 10px; }
.academic-theme .lane-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 12px 0 0; color: #68778b; font-size: 13.5px; }
.academic-theme .mask { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: 20px; }
.academic-theme .mask .grid { display: grid; grid-template-columns: 28px repeat(5, 34px); gap: 4px; align-items: center; }
.academic-theme .mask .grid .h, .academic-theme .mask .grid .r { color: #68778b; font-size: 12.5px; font-weight: 600; text-align: center; }
.academic-theme .mask .grid .h:nth-child(2) { font-size: 11px; }
.academic-theme .mask .grid b, .academic-theme .mask .key b { display: block; height: 34px; border-radius: 5px; background: repeating-linear-gradient(135deg, #e6ebf3 0 4px, #f4f6fa 4px 8px); }
.academic-theme .mask b.img { background: var(--cyan-strong); }
.academic-theme .mask b.own { background: var(--pid); }
.academic-theme .mask .key { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: #4b5b6e; font-size: 14.5px; line-height: 1.4; }
.academic-theme .mask .key li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: center; }
.academic-theme .mask .key b { width: 16px; height: 16px; border-radius: 4px; }

/* Charts. */
.academic-theme .series-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 0 0 6px; padding: 0; list-style: none; color: #4b5b6e; font-size: 14px; }
.academic-theme .series-legend li { display: inline-flex; align-items: center; gap: 7px; }
.academic-theme .series-legend li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.academic-theme .series-legend .s-rex::before { background: var(--rex); }
.academic-theme .series-legend .s-base::before { background: var(--base); }
.academic-theme .series-legend .s-pid::before { background: var(--pid); }
.academic-theme .chart { display: block; width: 100%; height: auto; overflow: visible; }
.academic-theme .chart text { fill: #68778b; font-size: 11.5px; }
.academic-theme .chart .axis { font-size: 12px; }
.academic-theme .chart .faint { font-size: 10.5px; opacity: 0.7; }
.academic-theme .chart .grid { stroke: #e3e9f2; stroke-width: 1; }
.academic-theme .chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.academic-theme .chart .line.s-pid { stroke-width: 3.5; }
.academic-theme .chart .s-rex { stroke: var(--rex); }
.academic-theme .chart .s-base { stroke: var(--base); }
.academic-theme .chart .s-pid { stroke: var(--pid); }
.academic-theme .chart .dot.s-rex, .academic-theme .chart .bar.s-rex, .academic-theme .chart text.s-rex { fill: var(--rex); }
.academic-theme .chart .dot.s-base, .academic-theme .chart .bar.s-base, .academic-theme .chart text.s-base { fill: var(--base); }
.academic-theme .chart .dot.s-pid, .academic-theme .chart .bar.s-pid, .academic-theme .chart text.s-pid { fill: var(--pid); }
.academic-theme .chart .dot { stroke: #fff; stroke-width: 1.5; }
.academic-theme .chart .bar, .academic-theme .chart text.end { stroke: none; }
.academic-theme .chart text.end { font-size: 12.5px; font-weight: 700; }
.academic-theme .chart .val { font-size: 10.5px; }
.academic-theme .chart .val.strong { fill: #14644c; font-weight: 700; }
.academic-theme .minis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 12px; }
.academic-theme .mini { margin: 0; padding: 14px 12px 8px; background: #fff; border: 1px solid #dbe3ef; border-radius: 12px; }
.academic-theme .mini figcaption { display: block; padding: 0; background: none; border: 0; color: #172438; font-size: 14.5px; }
.academic-theme .mini figcaption span { display: block; color: #68778b; font-size: 12px; }

/* Result tables. */
.academic-theme .rt { width: 100%; max-width: 940px; margin: 0 auto; border-collapse: collapse; background: #fff; border-radius: 10px; box-shadow: 0 5px 14px rgba(24, 57, 109, 0.07); font-size: 15px; font-variant-numeric: tabular-nums; }
.academic-theme .rt th, .academic-theme .rt td { padding: 8px 14px; white-space: nowrap; }
.academic-theme .rt td, .academic-theme .rt thead th:not(:first-child) { text-align: right; }
.academic-theme .rt td { color: #3d4d62; }
.academic-theme .rt thead th { color: #68778b; font-size: 13px; font-weight: 600; }
.academic-theme .rt thead tr:first-child th { padding-top: 14px; }
.academic-theme .rt thead tr:last-child th { padding-bottom: 10px; border-bottom: 2px solid #172438; }
.academic-theme .rt thead th.span { color: #172438; font-size: 14px; font-weight: 750; text-align: center; }
.academic-theme .rt thead th:first-child, .academic-theme .rt tbody th { text-align: left; }
.academic-theme .rt tbody th { color: #172438; font-weight: 600; }
.academic-theme .rt tbody tr + tr > * { border-top: 1px solid #edf1f7; }
.academic-theme .rt .grp th { padding-top: 12px; padding-bottom: 6px; color: var(--cyan-strong); background: #f5f8fe; font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.academic-theme .rt td.best { color: #172438; font-weight: 750; }
.academic-theme .rt td.second { text-decoration: underline; text-decoration-color: #94a3b8; text-underline-offset: 3px; }
.academic-theme .rt tr.ours > * { background: var(--pid-soft); }
.academic-theme .rt tr.ours th { color: #14644c; font-weight: 750; box-shadow: inset 4px 0 0 var(--pid); }
.academic-theme .rt tr.ours td { color: #14644c; }

@media (max-width: 900px) {
  .academic-theme .duo { grid-template-columns: 1fr; }
  .academic-theme .steps { grid-template-columns: 1fr; }
  .academic-theme .minis { grid-template-columns: 1fr; }
  .academic-theme .mask { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .academic-theme .latency-chart .native-chart { overflow-x: auto; }
  .academic-theme .latency-chart .chart { min-width: 520px; }
}
