/* Subtle, readable speaker attribution for all RLA Extended Response sources. */
.er-speaker-highlight {
  display: inline;
  padding: 0.04em 0.22em 0.07em;
  border: 1px solid #557b72;
  border-radius: 0.28em;
  background: #293b38;
  color: #dce9e5;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #789d93;
  text-decoration-thickness: .5px;
  text-underline-offset: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.er-speaker-label {
  white-space: nowrap;
}

body[data-theme="dark"] .er-speaker-highlight {
  background: #293b38;
  border-color: #557b72;
  color: #dce9e5;
  text-decoration-color: #789d93;
}

body[data-theme="light"] .er-speaker-highlight {
  background: #edf4f1;
  border-color: #c0d4cc;
  color: #36584f;
  text-decoration-color: #86a99f;
}


/* Extended Response layout: separate viewpoints and make paragraph numbers easy to scan. */
.er-passage-heading {
  margin: 1.15rem 0 .55rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--border-color, rgba(130, 160, 153, .28));
  font-size: 1.02rem;
  line-height: 1.4;
  font-weight: 750;
}

.er-source-heading,
.er-speaker-section {
  margin: 1.25rem 0 .7rem;
  padding: .85rem 1rem;
  border-left: 3px solid #72978c;
  border-radius: 0 .55rem .55rem 0;
  background: rgba(114, 151, 140, .09);
}

.er-source-heading h3,
.er-speaker-section h3 {
  margin: .15rem 0 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 750;
}

.er-source-kicker {
  display: block;
  color: #8ab4a7;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.er-source-context {
  margin: .35rem 0 0;
  color: var(--muted-text, #aab9b5);
  font-size: .84rem;
  line-height: 1.45;
}

.er-passage-paragraph {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  margin: .65rem 0;
}

.er-passage-paragraph > p {
  min-width: 0;
  margin: 0;
  line-height: 1.72;
}

.er-paragraph-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-height: 1.5rem;
  border-radius: .4rem;
  background: rgba(114, 151, 140, .13);
  color: var(--muted-text, #aab9b5);
  font-size: .76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .er-source-heading,
  .er-speaker-section {
    padding: .7rem .8rem;
    margin-top: 1rem;
  }
  .er-passage-paragraph {
    grid-template-columns: 1.4rem minmax(0, 1fr);
    gap: .4rem;
  }
  .er-paragraph-number {
    width: 1.3rem;
    min-height: 1.3rem;
  }
}


/* Scenario and speaker transitions in RLA Extended Response. */
.er-scenario-heading {
  margin: 0 0 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(114, 151, 140, .28);
  border-radius: .7rem;
  background: rgba(114, 151, 140, .08);
}

.er-scenario-heading h3 {
  margin: .2rem 0 .25rem;
  color: var(--text, inherit);
  font-size: 1.08rem;
  line-height: 1.4;
  font-weight: 780;
}

.er-scenario-heading .er-source-context {
  margin-top: .35rem;
}

.er-source-heading {
  margin-top: 1.3rem;
  margin-bottom: .7rem;
  scroll-margin-top: 1rem;
}

.er-speaker-section {
  margin-top: 1rem;
  margin-bottom: .6rem;
}

.er-passage-heading {
  margin-top: 1.1rem;
}

body[data-theme="light"] .er-scenario-heading {
  background: rgba(114, 151, 140, .06);
  border-color: rgba(80, 120, 108, .22);
}

@media (max-width: 520px) {
  .er-scenario-heading {
    padding: .8rem .85rem;
    margin-bottom: .9rem;
  }
  .er-scenario-heading h3 {
    font-size: 1rem;
  }
}
