.scoring-page {
  --content-width: 81rem;
  --header-height: 5.875rem;
}

.score-back {
  gap: .6rem;
  min-height: 2.75rem;
  padding-inline: 1.5rem;
}

.score-back > span {
  font-size: 1.15em;
  line-height: 1;
}

.score-page {
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(0, 1.92166fr);
  align-items: start;
  gap: 1.75rem;
  width: min(var(--content-width), calc(100% - 3rem));
  margin-inline: auto;
  padding-block: 1.9375rem 3rem;
}

.score-panel,
.score-reference {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e9f6;
  border-radius: 1.375rem;
  box-shadow: 0 3px 0 #eaf0fb;
}

.score-panel {
  padding: 1.875rem 1.6875rem 3.4375rem;
}

.score-panel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.score-panel label {
  display: block;
  margin-block-end: .375rem;
  color: #15254a;
  font-weight: 700;
  line-height: 1.5;
}

.participant-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 2.25rem;
  margin-block-end: .375rem;
}

.participant-label label { margin: 0; }

.delete-participant {
  min-height: 2.25rem;
  padding: .25rem .625rem;
  border-color: #edc6c8;
  color: var(--warning);
  background: var(--surface);
  font-size: .875rem;
}

.delete-participant:hover:not(:disabled) { background: #fff1f1; }

.score-panel input,
.score-panel select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  padding: .625rem 1rem;
  color: #15254a;
  background: #f8faff;
  border: 1px solid #d6e1f3;
  border-radius: .625rem;
}

.score-panel input::placeholder {
  color: #596e97;
}

.score-panel input:focus,
.score-panel select:focus {
  outline: 2px solid transparent;
  outline-offset: 1px;
  border-color: #5876e2;
  box-shadow: 0 0 0 2px #dfe8ff;
  background: #fff;
}

.score-panel select:disabled,
.score-panel input:read-only {
  opacity: .65;
}

.score-search,
.score-select {
  position: relative;
}

.score-search input {
  min-height: 3.375rem;
  padding-inline: 2.5rem;
}

.score-search::before,
.score-search::after,
.score-chevron {
  position: absolute;
  pointer-events: none;
}

.score-search::before {
  content: "";
  inset-inline-start: 1rem;
  inset-block-start: calc(50% - .44rem);
  width: .7rem;
  height: .7rem;
  border: .1rem solid #61759c;
  border-radius: 50%;
}

.score-search::after {
  content: "";
  inset-inline-start: 1.66rem;
  inset-block-start: calc(50% + .14rem);
  width: .36rem;
  height: .1rem;
  border-radius: 1rem;
  background: #61759c;
  transform: rotate(45deg);
}

.score-select select {
  appearance: none;
  padding-inline-end: 2.5rem;
}

.score-chevron {
  inset-inline-end: 1.2rem;
  inset-block-start: 50%;
  width: .5rem;
  height: .5rem;
  border-inline-end: .105rem solid #61759c;
  border-block-end: .105rem solid #61759c;
  transform: translateY(-75%) rotate(45deg);
}

.score-search input[aria-expanded="true"] + .score-chevron {
  transform: translateY(-25%) rotate(225deg);
}

.participant-options {
  max-height: 10.5rem;
  overflow: auto;
  margin: .625rem 0 0;
  padding: .375rem;
  list-style: none;
  background: #fff;
  border: 1px solid #dce6f8;
  border-radius: .6875rem;
}

.participant-options li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 2.625rem;
  padding: .5rem .75rem;
  border-radius: .4375rem;
  color: #15254a;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.participant-options li:hover,
.participant-options [aria-selected="true"] {
  color: #2349bd;
  background: #edf2ff;
}

.participant-options li[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: .45rem;
  height: .75rem;
  margin-inline-end: .2rem;
  border-inline-end: .12rem solid #2f55d4;
  border-block-end: .12rem solid #2f55d4;
  transform: rotate(45deg);
}

.participant-options li.new-participant-option {
  color: #2f55d4;
}

.participant-options li.new-participant-option::after {
  content: "";
  flex: none;
  width: .85rem;
  height: .85rem;
  margin-inline-end: .1rem;
  background:
    linear-gradient(#2f55d4, #2f55d4) center / 100% .095rem no-repeat,
    linear-gradient(#2f55d4, #2f55d4) center / .095rem 100% no-repeat;
  border: 0;
  transform: none;
}

.participant-hint,
.form-message {
  margin: 0;
  font-size: .875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.participant-hint {
  color: #53699b;
}

.form-message {
  color: #226949;
}

.participant-hint:not(:empty),
.form-message:not(:empty) {
  margin-block-start: .625rem;
}

.form-message[data-error="true"] {
  color: #a62d31;
}

.score-panel > .form-message {
  margin-block-start: 0;
  color: #40567d;
}

.score-panel > .form-message[data-error="true"] {
  color: #a62d31;
}

.score-panel > .form-message:not([hidden]) ~ form:not([hidden]) {
  margin-block-start: .8rem;
}

#login-form > .button {
  margin-block-start: 1.25rem;
}

.score-activity-field,
.score-fields {
  margin-block-start: 1.25rem;
}

.score-fields {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem;
}

.score-fields .button {
  min-height: 3.25rem;
}

.score-value-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .125rem .5rem;
  margin-block-end: .375rem;
}

.score-value-label label {
  margin: 0;
}

.score-limit {
  color: #53699b;
  font-size: .875rem;
  white-space: nowrap;
}

.score-reference {
  padding: 1.5rem 1.4375rem;
}

.score-reference-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}

.score-reference h2 {
  display: flex;
  align-items: center;
  gap: .6875rem;
  margin: 0;
  color: #15254a;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.4;
}

.score-reference-limit {
  margin: 0;
  color: #53699b;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-reference-icon {
  position: relative;
  flex: 0 0 1.875rem;
  height: 1.875rem;
  background: #ecf2ff;
  border-radius: .5625rem;
}

.score-reference-icon::before,
.score-reference-icon::after {
  content: "";
  position: absolute;
}

.score-reference-icon::before {
  inset: .43rem .58rem;
  border: .105rem solid #2f55d4;
  border-radius: .09rem;
}

.score-reference-icon::after {
  inset: .69rem auto auto .77rem;
  width: .34rem;
  height: .09rem;
  background: #2f55d4;
  box-shadow: 0 .2rem #2f55d4, 0 .4rem #2f55d4;
}

.score-rubric {
  width: 100%;
  margin: 1rem 0 0;
  overflow: hidden;
  border: 1px solid #e2e9f6;
  border-radius: .75rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.score-rubric-step {
  width: 34%;
}

.score-rubric-points {
  width: 4.25rem;
}

.score-rubric th,
.score-rubric td {
  padding: .775rem .875rem;
  border-block-end: 1px solid #e2e9f6;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.score-rubric thead th {
  color: #40567d;
  background: #f1f5ff;
  font-size: .875rem;
  font-weight: 700;
}

.score-rubric tbody th,
.score-rubric tbody td {
  font-size: .9375rem;
  line-height: 1.5;
}

.score-rubric tbody th {
  color: #15254a;
  font-weight: 600;
}

.score-rubric tbody td {
  color: #40567d;
}

.score-rubric tr > :nth-child(2) {
  text-align: center;
}

.score-rubric tbody tr > :nth-child(2) {
  color: #2f55d4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-rubric tbody tr:last-child > * {
  border-block-end: 0;
}

.score-rubric-note {
  margin: 0;
  margin-block-start: .75rem;
  padding: .625rem .875rem;
  color: #40567d;
  background: #f7f9fd;
  border-radius: .625rem;
  font-size: .875rem;
  line-height: 1.45;
  white-space: pre-line;
}

@media (max-width: 54rem) {
  .score-page {
    grid-template-columns: minmax(0, 1fr);
    max-width: 44rem;
  }

  .score-panel {
    padding-block-end: 2rem;
  }
}

@media (max-width: 36rem) {
  .score-back {
    gap: .35rem;
    padding-inline: .65rem;
  }

  .score-page {
    width: calc(100% - 2rem);
    gap: 1rem;
    padding-block-start: 1.25rem;
  }

  .score-panel,
  .score-reference {
    padding: 1rem;
    border-radius: 1rem;
  }

  .score-fields {
    gap: .75rem;
  }

  .score-rubric-points {
    width: 3rem;
  }

  .score-rubric th,
  .score-rubric td {
    padding: .625rem .5rem;
  }
}
