.paper-section {
  padding: 84px 24px;
  scroll-margin-top: 24px;
}
.paper-section.tinted {
  background: #f7f9fc;
}
.paper-section h2 {
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.paper-section h3 {
  font-size: 23px;
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 16px;
}
.paper-section h4 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 10px;
}
.paper-section p {
  line-height: 1.8;
  margin-bottom: 18px;
}
.paper-section .section-intro {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}
.paper-section .section-intro p {
  font-size: 17px;
}
.paper-section .section-intro .eyebrow,
.paper-section .eyebrow {
  font-size: 11px;
}
.paper-section .small-note,
.paper-section figcaption {
  font-size: 12px;
  color: #647083;
  line-height: 1.75;
}
.paper-section figcaption {
  margin-top: 16px;
}
.paper-section .small-label {
  display: block;
  margin-bottom: 12px;
}
.definition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 35px;
}
.method-graphic {
  border: 1px solid #dbe1e9;
  border-radius: 16px;
  padding: 28px;
  background: white;
}
.agent-banner {
  background: #283541;
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 14px;
  font-weight: 650;
}
.agent-banner span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
}
.answer-flow {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
  margin: 25px 0;
}
.flow-node {
  background: #f9fafb;
  padding: 20px;
  border: 1px solid #dce2e7;
  border-radius: 8px;
}
.flow-node h3 {
  font-size: 18px;
}
.flow-node p {
  font-size: 13px;
  margin: 12px 0 0;
}
.flow-node code {
  font-size: 15px;
  background: transparent;
  color: #344453;
}
.forward-node {
  border-left: 4px solid #a06b55;
}
.inverse-node {
  border-left: 4px solid #52768b;
}
.inverse-node ol {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.flow-connector {
  text-align: center;
  font-size: 24px;
  color: #8c6553;
}
.rendered-node {
  text-align: center;
  height: 100%;
}
.rendered-node img {
  height: 195px;
  width: 100%;
  object-fit: contain;
}
.boundary-note {
  font-size: 12px;
  color: #647083;
  padding: 15px 4px 0;
}
.agreement-node {
  background: #f1f5ee;
  border: 1px solid #ccd8c4;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}
.agreement-node span {
  display: block;
  margin: 8px 0;
  font-family: ui-monospace, monospace;
  font-size: 14px;
}
.agreement-node p {
  font-size: 13px;
  margin: 0;
}
.subsection-title {
  margin-top: 45px;
}
.section-lead {
  max-width: 850px;
}
.campaign-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 28px 0 10px;
}
.campaign-flow li {
  background: white;
  border: 1px solid #dbe1e9;
  border-top: 3px solid #52768b;
  padding: 20px;
  border-radius: 7px;
}
.step-index {
  display: block;
  font-size: 23px;
  font-weight: 700;
  color: #52768b;
  margin-bottom: 14px;
}
.campaign-flow p {
  font-size: 13px;
  margin: 0;
}
.loop-return {
  text-align: center;
  color: #657851;
  font-size: 13px;
}
.paper-details {
  border-top: 1px solid #d9e0e8;
  border-bottom: 1px solid #d9e0e8;
  margin: 25px 0;
  padding: 0 18px;
  background: #fff;
}
.paper-details summary {
  cursor: pointer;
  padding: 19px 0;
  font-weight: 600;
  color: #28455e;
}
.paper-details[open] {
  padding-bottom: 15px;
}
.paper-details + .paper-details {
  margin-top: -26px;
}
.example-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 35px;
}
.example-tabs button {
  border: 1px solid #cbd6e4;
  background: white;
  color: #334155;
  border-radius: 24px;
  padding: 12px 23px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.example-tabs button[aria-selected="true"] {
  background: #2855c5;
  border-color: #2855c5;
  color: white;
}
.program-example > h3 {
  text-align: center;
}
.instance-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 25px 0;
}
.instance-strip figure {
  padding: 16px;
  background: white;
  border: 1px solid #dce2e9;
  border-radius: 10px;
  text-align: center;
}
.instance-strip img {
  height: 200px;
  width: 100%;
  object-fit: contain;
}
.program-example blockquote {
  border-left: 3px solid #c7d2e0;
  margin: 25px 0;
  padding: 12px 22px;
  background: white;
}
.program-example blockquote p {
  font-size: 14px;
  margin: 0;
}
.program-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.program-columns > div {
  min-width: 0;
}
.program-columns p {
  font-size: 14px;
  min-height: 76px;
}
.program-columns pre {
  border-radius: 8px;
  background: #f1f3f6;
  color: #283544;
  font:
    12px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  max-height: 390px;
  overflow: auto;
  padding: 20px;
  tab-size: 4;
  margin: 18px 0;
  border-top: 3px solid #a06b55;
}
.inverse-code pre {
  border-top-color: #52768b;
}
.program-columns a {
  font-size: 13px;
}
.program-example {
  margin-bottom: 30px;
}
.stress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.stress-grid > div {
  border: 1px solid #dce2e9;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
}
.stress-grid img {
  width: 100%;
  height: 195px;
  object-fit: contain;
}
.stress-grid h3 {
  font-size: 16px;
  margin-top: 15px;
}
.stress-grid p {
  font-size: 14px;
}
.status-match,
.status-mismatch {
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 5px;
  background: #edf4ee;
  color: #376046;
}
.status-mismatch {
  background: #faf0eb;
  color: #995436;
}
.finding {
  padding: 25px;
  background: #f4f7fb;
  border-radius: 10px;
  margin-top: 30px;
}
.finding p {
  margin: 12px 0 0;
}
.results-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-bottom: 50px;
  font-size: 14px;
}
.result-study {
  margin-top: 65px;
  padding-top: 30px;
  border-top: 1px solid #d9e0e8;
  scroll-margin-top: 25px;
}
.result-study > h3 {
  font-size: 27px;
}
.result-study > p {
  max-width: 900px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 28px 0;
}
.stat-row > div {
  border-left: 3px solid #bfcde0;
  padding: 8px 18px;
}
.stat-row strong {
  display: block;
  font-size: 30px;
  color: #2855c5;
  line-height: 1.4;
}
.stat-row span {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 7px;
}
.paper-table {
  overflow-x: auto;
  margin: 26px 0;
  max-width: 100%;
  background: white;
  border-radius: 8px;
}
.paper-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.paper-table caption {
  text-align: left;
  padding: 15px 14px;
  font-weight: 600;
  color: #344453;
  white-space: normal;
}
.paper-table th,
.paper-table td {
  text-align: right;
  padding: 12px 14px;
  border-bottom: 1px solid #e4e8ee;
}
.paper-table th:first-child {
  text-align: left;
}
.paper-table thead th {
  font-size: 11px;
  font-weight: 600;
  background: #edf2f7;
  color: #526376;
}
.paper-table tbody th {
  font-weight: 500;
}
.paper-table tbody tr:last-child {
  background: #f5f7fa;
}
.training-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 30px 0;
}
.training-flow > div {
  border: 1px solid #d4dce7;
  border-radius: 10px;
  padding: 23px;
  background: white;
}
.training-flow strong {
  display: block;
  font-size: 18px;
}
.training-flow p {
  font-size: 13px;
  margin: 12px 0 0;
}
.training-flow > span {
  color: #7085a1;
  font-size: 25px;
}
:where(
  .paper-section button,
  .paper-section a,
  .paper-section summary,
  .paper-section pre,
  .paper-table
):focus-visible {
  outline: 3px solid #91b1ff;
  outline-offset: 4px;
}
@media (max-width: 900px) {
  .answer-flow {
    gap: 12px;
  }
  .flow-node {
    padding: 15px;
  }
  .campaign-flow {
    grid-template-columns: 1fr 1fr;
  }
  .training-flow {
    gap: 10px;
  }
  .training-flow > div {
    padding: 15px;
  }
}
@media (max-width: 700px) {
  .paper-section {
    padding: 55px 20px;
  }
  .paper-section h2 {
    font-size: 27px;
  }
  .paper-section .section-intro p {
    font-size: 15px;
  }
  .definition-grid,
  .answer-flow,
  .program-columns,
  .stress-grid,
  .stat-row,
  .training-flow {
    grid-template-columns: 1fr;
  }
  .definition-grid {
    gap: 15px;
  }
  .method-graphic {
    padding: 16px;
  }
  .rendered-node img {
    height: 210px;
  }
  .agreement-node span {
    font-size: 10px;
  }
  .campaign-flow {
    grid-template-columns: 1fr;
  }
  .instance-strip {
    gap: 8px;
  }
  .instance-strip figure {
    padding: 6px;
  }
  .instance-strip img {
    height: 110px;
  }
  .instance-strip figcaption {
    font-size: 10px;
  }
  .program-columns p {
    min-height: 0;
  }
  .example-tabs button {
    padding: 10px 13px;
    font-size: 12px;
  }
  .training-flow > span {
    text-align: center;
    transform: rotate(90deg);
  }
  .stat-row {
    gap: 15px;
  }
  .paper-section .paper-details {
    padding-left: 12px;
    padding-right: 12px;
  }
  .paper-table table {
    font-size: 12px;
  }
  .paper-table th,
  .paper-table td {
    padding: 10px;
  }
  .site-nav {
    align-items: flex-start;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    max-width: 230px;
  }
}
.program-columns pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.table-scroll-hint {
  display: none;
}
@media (max-width: 700px) {
  .paper-section .table-scroll-hint {
    display: block;
    color: #647083;
    font-size: 11px;
    margin: 20px 0 -17px;
  }
  .paper-table tbody th {
    position: sticky;
    left: 0;
    background: white;
    box-shadow: 1px 0 #e4e8ee;
  }
  .paper-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #edf2f7;
  }
}
