.header-inner { justify-content: center; }
.site-footer { justify-content: flex-end; }

.authors a {
  color: #344969;
  text-decoration: underline;
  text-decoration-color: #c1ccd9;
  text-underline-offset: .18em;
}
.authors .first-author { color: var(--accent); font-weight: 700; text-decoration-color: #8fabc9; }
.authors a:hover, .authors a:focus-visible { color: var(--accent-hover); text-decoration-color: currentColor; }

.ravec-opening { padding-top: clamp(1.65rem, 3.3vw, 2.85rem); }
.ravec-opening h2 { margin-bottom: .55em; }
.opening-result {
  padding: .25rem 0 .25rem 1rem;
  border-left: 3px solid #708cbd;
}
.opening-result strong { color: #213f7a; font-weight: 650; }

.affiliations { max-width: 58rem; margin-top: .75rem; }
.section-nav { justify-content: center; }
.section > .reading h3 { margin: 0 0 .42rem; }
.section > .reading + .reading { margin-top: 1.7rem; }
.example-section > .reading { margin-bottom: 1.5rem; }

.evidence-example {
  --view-color: #284ba1;
  --b-score: 4.1%;
  --c-score: 88.6%;
  margin: 0;
}

.evidence-sheet {
  overflow: hidden;
  padding: clamp(1.15rem, 3.3vw, 2.35rem);
  border: 1px solid #dbe1ea;
  border-radius: 1rem;
  background: linear-gradient(115deg, #f9fafc, #f1f4fa);
}

.evidence-head, .evidence-plates {
  display: grid;
  align-items: center;
}

.evidence-head {
  grid-template-columns: 1fr auto;
  gap: .75rem 1.2rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid #d5dce7;
}

.evidence-head h3 {
  margin: 0;
  color: #253245;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -.035em;
}

.evidence-switch {
  display: inline-flex;
  justify-self: start;
  min-width: 0;
  margin: 0;
  padding: .18rem;
  border: 1px solid #c5cedb;
  border-radius: 3rem;
  background: #fff;
}

.evidence-switch input, .evidence-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  white-space: nowrap;
  overflow: hidden;
}

.evidence-switch label {
  padding: .45rem .9rem;
  border-radius: 3rem;
  color: #444e5a;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.25;
}

.evidence-switch input:checked + label {
  background: var(--view-color);
  color: #fff;
}

.evidence-switch input:focus-visible + label {
  outline: 3px solid #101827;
  outline-offset: 3px;
}

.evidence-plates {
  grid-template-columns: 1.16fr 1fr;
  gap: clamp(1.6rem, 5.6vw, 4.7rem);
  padding-top: 1.3rem;
}

.evidence-question { min-width: 0; }

.evidence-question > p {
  max-width: 35ch;
  margin: 0 0 1rem;
  color: #202e42;
  font-family: Georgia, Cambria, serif;
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  line-height: 1.25;
}

.evidence-data {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  color: #1a293e;
  text-align: center;
  font-family: Georgia, Cambria, serif;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}

.evidence-data td, .evidence-data th {
  height: 1.85em;
  padding: .2em .07em;
  border: 1px solid #ccd5e1;
}

.evidence-data th {
  width: 11%;
  background: #e5ebf4;
}

.evidence-data .evidence-cell {
  position: relative;
  border-right: 2px solid #5877bd;
  border-left: 2px solid #5877bd;
  background: #edf2ff;
}

.evidence-data tr:first-child .evidence-cell { border-top: 2px solid #5877bd; }
.evidence-data tr:last-child .evidence-cell { border-bottom: 2px solid #5877bd; }

.evidence-answers {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .6rem;
  padding: 0;
  margin: .65rem 0 0;
  list-style: none;
  color: #4b5666;
  font-size: .79rem;
  font-variant-numeric: tabular-nums;
}

.evidence-answers b { color: #202e42; }

.teacher-plot h3 {
  margin: 0;
  color: #202e42;
  font-size: 1.08rem;
  font-weight: 670;
}

.teacher-plot p {
  margin: .16rem 0 1.1rem;
  color: #546075;
  font-size: .83rem;
}

.token-score {
  display: grid;
  grid-template-columns: .85rem minmax(0, 1fr) 3.4em;
  align-items: center;
  gap: .6rem;
  margin-top: .8rem;
}

.token-score b, .score-value {
  color: #263348;
  font-size: 1.04rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.score-value { text-align: end; }

.score-track {
  display: block;
  height: .75rem;
  border-radius: 3px;
  background: #dce3ed;
  overflow: hidden;
}

.score-track::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--view-color);
}

.score-track.bar-b::before { width: var(--b-score); }
.score-track.bar-c::before { width: var(--c-score); }

.evidence-example .as-pixelated { display: none; }

.evidence-example:has(#view-pixelated:checked) {
  --view-color: #975222;
  --b-score: 83.8%;
  --c-score: 3.7%;
}

.evidence-example:has(#view-pixelated:checked) .as-original { display: none; }
.evidence-example:has(#view-pixelated:checked) .as-pixelated { display: inline; }

.evidence-example:has(#view-pixelated:checked) .evidence-cell {
  border-color: #b87945;
  background-color: #b8c0c7;
  background-image: conic-gradient(#b0b8be 25%, #d5dade 0 50%, #bcc4ca 0 75%, #cbd1d5 0);
  background-size: 17px 16px;
}

.evidence-example:has(#view-pixelated:checked) tr:last-child .evidence-cell { background-position: 7px 3px; }

.evidence-example figcaption {
  max-width: 76ch;
  margin: .85rem auto 0;
  text-align: center;
}

.paper-illustration, .paper-table-figure {
  width: 100%;
  margin: clamp(2rem, 4.5vw, 3.5rem) auto;
}
.paper-illustration:last-child, .paper-table-figure:last-child { margin-bottom: 0; }
.paper-illustration { max-width: 62rem; }
#paper-figure-2, #paper-figure-3, #paper-figure-4 { max-width: 42rem; }
.algorithm-illustration { max-width: 49rem; }
.paper-illustration figcaption {
  max-width: 52rem;
  margin: .9rem auto 0;
  text-align: left;
  overflow-wrap: break-word;
}
.paper-number {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
/* The paper facsimiles include their captions. Keep the equivalent table data
   available to screen readers and searchable in the page. */
.paper-table-figure > figcaption, .table-transcript {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
  padding: 0;
}
.paper-table-figure { max-width: 49rem; }
#paper-table-3 { max-width: 44rem; }
#motivation .reading { display: flow-root; max-width: 54rem; }
#paper-table-1 {
  float: right;
  width: 41%;
  margin: .15rem 0 .5rem clamp(1.4rem, 3.3vw, 2.4rem);
}
.figure-dialog:has(img[src*="assets/table-"]) figcaption { display: none; }

@media (max-width: 45rem) {
  #motivation .reading { display: flex; flex-direction: column; }
  #paper-table-1 { order: 1; float: none; width: min(100%, 23rem); margin: 1.4rem auto 0; }
  .figure-dialog:has(img[src*="assets/table-"]) figure { overflow-x: auto; }
  .figure-dialog img[src*="assets/table-"] { width: 47rem; max-width: none; max-height: none; }
  .figure-dialog img[src*="assets/table-01"] { width: 28rem; }
}

@media (max-width: 43rem) {
  .evidence-plates { grid-template-columns: 1fr; gap: 1.2rem; }
  .teacher-plot { padding-top: 1.1rem; border-top: 1px solid #d5dce7; }
  .teacher-plot p { margin-bottom: .8rem; }
  .evidence-answers { justify-content: flex-start; gap: .2rem .8rem; }
}

@media (max-width: 30rem) {
  .evidence-head { grid-template-columns: 1fr; }
  .header-inner { justify-content: center; }
  .section-nav { justify-content: center; flex-wrap: wrap; gap: 0 .65rem; }
  .section-nav a { min-height: 2.25rem; }
}
