/* Expanded DPPT paper-summary sections. */

.paper-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65em;
  justify-content: center;
  margin: 1.6em auto 0;
}

.paper-nav a {
  border: 1px solid #cbd6e2;
  border-radius: 4px;
  color: #1f5d99;
  font-size: 0.88em;
  padding: 0.3em 0.75em;
  text-decoration: none;
}

.paper-nav a:hover {
  background: #edf4fb;
}

.project-summary {
  color: #344050;
  font-size: 1em;
  line-height: 1.65;
  margin: 1.4em auto 0;
  max-width: 920px;
  text-align: left;
}

.project-summary p {
  margin: 0;
}

.project-summary .summary-kicker {
  color: #607080;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.45em;
  text-transform: uppercase;
}

.paper-section {
  padding: 3em 0;
}

.paper-section.alt {
  background: #f7f9fb;
}

.paper-section .section-kicker {
  color: #607080;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.55em;
  text-transform: uppercase;
}

.paper-section h2,
.paper-section h3 {
  color: #183b63;
}

.paper-lead {
  color: #344050;
  font-size: 1.08em;
  line-height: 1.75;
  margin-left: auto;
  margin-right: auto;
  max-width: 920px;
}

.takeaway-grid {
  display: grid;
  gap: 1em;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.6em;
  text-align: left;
}

.takeaway {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 1.1em;
}

.takeaway h3 {
  font-size: 1.05em;
  margin-bottom: 0.4em;
}

.paper-two-column {
  align-items: start;
  display: grid;
  gap: 2em;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  text-align: left;
}

.technical-note {
  background: #f1f5f9;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  color: #2c3742;
  font-size: 0.95em;
  line-height: 1.7;
  margin-top: 1em;
  padding: 1em 1.15em;
}

.replay-equations {
  display: grid;
  gap: 0.85em;
  margin: 1.4em auto;
  max-width: 820px;
  text-align: left;
}

.replay-equation {
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 6px;
  padding: 0.95em 1.1em;
}

.replay-equation strong {
  color: #183b63;
  display: block;
  font-size: 0.92em;
  margin-bottom: 0.35em;
}

.replay-equation .math-display {
  color: #24313f;
  display: block;
  font-size: 1.04em;
  line-height: 1.5;
  overflow-x: auto;
}

.replay-equation mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.1em;
}

.method-figure img,
.paper-image img {
  display: block;
  height: auto;
  max-width: 100%;
}

.method-copy {
  line-height: 1.75;
  margin: 0 auto;
  max-width: 920px;
  text-align: left;
}

.method-steps {
  display: grid;
  gap: 1em;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.5em auto;
  max-width: 980px;
  text-align: left;
}

.method-step {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 1.05em;
}

.method-step h3 {
  font-size: 1.05em;
  margin-bottom: 0.4em;
}

.method-figure {
  margin: 1.5em auto 0;
}

.algorithm-intuition {
  background: #f8fafc;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  margin: 1.6em auto 0;
  max-width: 920px;
  overflow: hidden;
  text-align: left;
}

.algorithm-header {
  align-items: center;
  background: #e5edf6;
  border-bottom: 1px solid #cfdae7;
  display: flex;
  gap: 1em;
  justify-content: space-between;
  padding: 0.72em 1em;
}

.algorithm-title {
  color: #183b63;
  font-size: 0.98em;
  font-weight: 700;
  letter-spacing: 0;
}

.algorithm-tag {
  color: #607080;
  font-size: 0.84em;
  font-weight: 600;
}

.algorithm-body {
  padding: 1em 1.1em 1.1em;
}

.algorithm-body p {
  color: #4d5965;
  font-size: 0.95em;
  line-height: 1.65;
  margin: 0 0 0.9em;
}

.algorithm-code {
  background: #f3f6fa;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  color: #1f2937;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.58;
  margin: 0;
  overflow-x: auto;
  padding: 1em 1.1em;
  white-space: normal;
}

.algorithm-code code {
  display: block;
  min-width: 40em;
}

.code-line {
  display: block;
  white-space: pre;
}

.code-section {
  color: #607080;
  display: block;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0.25em 0 0.35em;
}

.code-comment {
  color: #6b7280;
  font-style: italic;
}

.code-keyword {
  color: #5b3cc4;
  font-weight: 700;
}

.code-function {
  color: #1d6fa5;
}

.code-operator {
  color: #334155;
  font-weight: 700;
}

.result-block {
  margin-top: 2.2em;
}

.result-block h3 {
  font-size: 1.35em;
  margin-bottom: 0.45em;
}

.result-summary {
  color: #344050;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}

.results-at-a-glance,
.result-task-grid,
.comparison-grid {
  display: grid;
  gap: 1em;
  margin: 1.5em auto 0;
  max-width: 1100px;
  text-align: left;
}

.results-at-a-glance {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-task-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comparison-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-glance-card,
.result-task-card,
.comparison-card {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 1em;
}

.result-glance-card h3,
.result-task-card h4,
.comparison-card h4 {
  color: #183b63;
  font-size: 1em;
  margin-bottom: 0.4em;
}

.result-glance-card p,
.result-task-card p,
.comparison-card p,
.reading-guide {
  color: #53616f;
  font-size: 0.93em;
  line-height: 1.65;
}

.reading-guide {
  background: #f7f9fb;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  margin: 1em auto 0;
  max-width: 980px;
  padding: 0.85em 1em;
  text-align: left;
}

.method-legend {
  background: #f1f5f9;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  color: #465463;
  margin: 1.5em auto 0;
  max-width: 1040px;
  padding: 0.9em 1.1em;
  text-align: left;
}

.method-legend p {
  font-size: 0.9em;
  line-height: 1.65;
  margin: 0;
}

.method-legend p + p {
  margin-top: 0.35em;
}

.method-legend strong {
  color: #183b63;
}

.benchmark-figure,
.hybrid-gradient-figure {
  margin: 0;
}

.performance-visuals {
  display: grid;
  gap: 1em;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.3em auto 0;
  max-width: 1060px;
}

.performance-panel {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
  text-align: left;
}

.performance-panel figcaption {
  background: #edf3f8;
  border-bottom: 1px solid #dce4ec;
  color: #183b63;
  font-size: 0.88em;
  font-weight: 700;
  padding: 0.55em 0.75em;
}

.performance-panel img {
  display: block;
  height: auto;
  width: 100%;
}

.performance-plot img {
  background: #ffffff;
}

.benchmark-caption {
  color: #4d5965;
  font-size: 0.92em;
  line-height: 1.65;
  margin: 1em auto 0;
  max-width: 1000px;
  text-align: left;
}

.benchmark-caption strong {
  color: #344050;
}

.figure-note {
  color: #657382;
  font-size: 0.82em;
  line-height: 1.5;
  margin: 0.45em auto 0;
  max-width: 1000px;
  text-align: left;
}

.benchmark-takeaway {
  background: #f1f5f9;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  color: #344050;
  font-size: 0.93em;
  line-height: 1.65;
  margin: 1em auto 0;
  max-width: 1000px;
  padding: 0.85em 1em;
  text-align: left;
}

.figure-scroll {
  margin-top: 1.2em;
  overflow-x: auto;
  padding-bottom: 0.25em;
}

.paper-composite {
  margin: 1.2em auto 0;
  text-align: center;
}

.paper-composite img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: var(--figure-max-width, 980px);
  width: 100%;
}

.paper-grid {
  display: grid;
  gap: 0.16em;
  margin-left: auto;
  margin-right: auto;
  width: max-content;
}

.paper-grid.grid-4 {
  grid-template-columns: repeat(4, 240px);
}

.paper-grid.grid-5 {
  grid-template-columns: repeat(5, 170px);
}

.paper-grid.grid-6 {
  grid-template-columns: repeat(6, 134px);
}

.paper-grid .grid-label {
  color: #344050;
  font-size: 0.68em;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.22em 0.12em;
  text-align: center;
}

.paper-grid .row-label {
  align-self: stretch;
  background: #eef3f8;
  border: 1px solid #d6e0ea;
  border-radius: 4px;
  color: #304052;
  display: flex;
  flex-direction: column;
  font-size: 0.78em;
  font-weight: 700;
  justify-content: center;
  line-height: 1.25;
  min-height: 3em;
  padding: 0.35em;
}

.paper-grid .tile {
  background: #ffffff;
  border: 1px solid #e2e8ef;
  border-radius: 2px;
  line-height: 0;
  overflow: hidden;
  position: relative;
}

.paper-grid .tile img {
  display: block;
  height: auto;
  width: 100%;
}

.paper-grid .metric-badge,
.paper-grid .oom-badge {
  border-radius: 2px;
  bottom: 0.28em;
  color: #ffffff;
  font-size: 0.56em;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.18em 0.32em;
  position: absolute;
  right: 0.28em;
}

.paper-grid .metric-badge {
  background: rgba(0, 0, 0, 0.62);
}

.paper-grid .oom-badge {
  background: rgba(180, 20, 20, 0.86);
  bottom: auto;
  font-size: 0.78em;
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
}

.paper-section .figure-caption {
  color: #4d5965;
  font-size: 0.95em;
  line-height: 1.65;
  margin: 0.85em auto 0;
  max-width: 980px;
  text-align: left;
}

.paper-section .metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  justify-content: center;
  margin: 1em 0;
}

.paper-section .metric-card {
  border: 1px solid #dce4ec;
  border-radius: 6px;
  min-width: 14em;
  padding: 0.75em 1em;
}

.paper-section .metric-card strong {
  color: #183b63;
  display: block;
  font-size: 1.2em;
}

.experiment-card-grid {
  display: grid;
  gap: 1em;
  margin: 1.5em auto 0;
  max-width: 1100px;
  text-align: left;
}

.experiment-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experiment-card {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 1em;
}

.experiment-card h4 {
  color: #183b63;
  font-size: 1em;
  margin-bottom: 0.4em;
}

.experiment-card p {
  color: #53616f;
  font-size: 0.93em;
  line-height: 1.65;
}

.hybrid-equations {
  display: grid;
  gap: 1em;
  margin: 1.5em auto 0;
  max-width: 980px;
}

.hybrid-equation {
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  color: #24313f;
  overflow-x: auto;
  padding: 1em 1.15em;
  text-align: center;
}

.hybrid-equation mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.1em;
}

.hybrid-definition {
  background: #f1f5f9;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  color: #2c3742;
  font-size: 0.95em;
  line-height: 1.7;
  margin: 1em auto 0;
  max-width: 980px;
  padding: 1em 1.15em;
  text-align: left;
}

.hybrid-benchmark-panels {
  display: grid;
  gap: 1em;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.3em auto 0;
  max-width: 1060px;
}

.hybrid-benchmark-panel {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
  text-align: left;
}

.hybrid-benchmark-panel figcaption {
  background: #edf3f8;
  border-bottom: 1px solid #dce4ec;
  color: #183b63;
  font-size: 0.88em;
  font-weight: 700;
  padding: 0.55em 0.75em;
}

.hybrid-benchmark-panel img {
  display: block;
  height: auto;
  width: 100%;
}

.hybrid-benchmark-intro,
.hybrid-gradient-intro,
.hybrid-clarification {
  color: #53616f;
  font-size: 0.93em;
  line-height: 1.65;
  margin: 1em auto 0;
  max-width: 1000px;
  text-align: left;
}

.hybrid-gradient-scroll {
  margin: 1.2em auto 0;
  max-width: 1100px;
  overflow-x: auto;
  padding: 0 0 0.4em;
}

.hybrid-gradient-scroll:focus-visible {
  outline: 2px solid #2d6da3;
  outline-offset: 3px;
}

.hybrid-gradient-grid {
  display: grid;
  gap: 0.35em;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 940px;
}

.hybrid-gradient-header {
  align-self: end;
  color: #183b63;
  font-size: 0.88em;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.25em 0.2em 0.45em;
  text-align: center;
}

.hybrid-gradient-header span {
  color: #53616f;
  font-size: 0.88em;
  font-weight: 600;
}

.hybrid-gradient-cell {
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 3px;
  margin: 0;
  overflow: hidden;
}

.hybrid-gradient-cell img {
  display: block;
  height: auto;
  width: 100%;
}

.hybrid-scene-cell > span {
  background: #edf3f8;
  border-top: 1px solid #dce4ec;
  color: #183b63;
  display: block;
  font-size: 0.82em;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.45em 0.55em;
  text-align: left;
}

.hybrid-scene-cell small {
  color: #617080;
  display: block;
  font-size: 0.86em;
  font-weight: 500;
}

.hybrid-clarification {
  margin-top: 0.35em;
}

.implementation-note {
  background: #f1f5f9;
  border-left: 4px solid #2d6da3;
  border-radius: 4px;
  color: #2c3742;
  font-size: 0.95em;
  line-height: 1.7;
  margin: 2em auto 0;
  max-width: 980px;
  padding: 1em 1.15em;
  text-align: left;
}

.implementation-note code {
  background: #ffffff;
  border: 1px solid #dce4ec;
  border-radius: 4px;
  color: #24313f;
  font-size: 0.92em;
  padding: 0.08em 0.3em;
}

.supplemental-note {
  color: #53616f;
  font-size: 0.93em;
  line-height: 1.65;
  margin: 0 auto 1.3em;
  max-width: 920px;
}

.acknowledgements-box {
  color: #344050;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 900px;
  text-align: left;
}

.bottom-unified,
#footer.bottom-unified {
  background: #f6f6f6;
}

#citation.bottom-unified,
#acknowledgements.bottom-unified {
  background-color: #f6f6f6;
}

#footer.bottom-unified {
  color: #6b7280;
}

#footer.bottom-unified a {
  color: #53616f;
}

#footer.bottom-unified a:active,
#footer.bottom-unified a:hover {
  color: #183b63;
}

.abstract-details {
  margin: 1.2em auto 0;
  max-width: 980px;
  text-align: left;
}

.abstract-details summary {
  border: 1px solid #dce4ec;
  border-radius: 8px;
  color: #183b63;
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
  padding: 0.85em 1em;
}

.abstract-details[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.abstract-details .abstract-box {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

@media screen and (max-width: 980px) {
  .paper-two-column,
  .method-steps,
  .takeaway-grid,
  .results-at-a-glance,
  .result-task-grid,
  .comparison-grid,
  .performance-visuals,
  .experiment-card-grid,
  .hybrid-benchmark-panels {
    grid-template-columns: 1fr;
  }

  .paper-section {
    padding: 2.2em 0;
  }
}

@media screen and (max-width: 736px) {
  .paper-grid.grid-4 {
    grid-template-columns: repeat(4, 220px);
  }

  .paper-grid.grid-5 {
    grid-template-columns: repeat(5, 150px);
  }

  .paper-grid.grid-6 {
    grid-template-columns: repeat(6, 120px);
  }

  .paper-section h2 {
    font-size: 1.45em;
  }
}
