/* Work navigation, horse guides and score awards. */
.work-toc {
  margin-block: 0.75rem;
}

.work-toc ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border: 1px solid #f8d4e6;
  border-radius: 10px;
  background: #fff0f7;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-underline-offset: 0.15em;
}

.work-toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.work-overview [id]:target {
  scroll-margin-top: 0.75rem;
}

.work-facts dt {
  font-weight: 700;
}

.work-facts dd {
  margin: 0 0 0.65rem;
}

.work-facts dd:last-child {
  margin-bottom: 0;
}

.work-facts time {
  white-space: nowrap;
}

.work-steps {
  padding-inline-start: 1.5rem;
}

.work-steps li + li {
  margin-top: 0.4rem;
}

.work-subsection {
  margin-block-start: 1.25rem;
}

.work-subsection h3 {
  margin-block: 0 0.4rem;
}

.work-subsection-link {
  display: inline-block;
}

.character-table.info-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  overflow-wrap: break-word;
}

.character-table.info-table th,
.character-table.info-table td {
  width: auto;
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.character-table.info-table thead th:first-child {
  width: 55%;
}

.character-table.horse-identification-table thead th:first-child {
  width: 42%;
}

.character-table.info-table tbody th,
.character-table.info-table tbody td {
  border-bottom: 1px solid #f7e3ed;
  font-size: 0.92rem;
  line-height: 1.5;
}

.character-table.info-table tbody td {
  font-weight: 400;
  word-break: normal;
}

.info-table tbody th {
  color: inherit;
  background: transparent;
}

.info-table tbody tr:nth-child(even) {
  background: #fffafc;
}

.character-profiles .character-table {
  min-width: 0;
}

.work-character-search {
  margin-block: 0.75rem;
}

.character-profiles .character-mobile-list-head,
.character-profiles .character-card-summary--with-value {
  grid-template-columns: minmax(0, 1fr) 5rem;
}

.character-profiles .character-detail-item:first-child {
  grid-column: 1 / -1;
  grid-template-columns: max-content minmax(0, 1fr);
}

@media (max-width: 1050px) {
  .character-profiles .character-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 850px) {
  .character-profiles .character-detail-item:first-child {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .character-table.info-table th,
  .character-table.info-table td {
    padding-inline: 0.45rem;
  }

  .character-table.horse-identification-table thead th:first-child {
    width: 9.5rem;
  }
}
