.record-toolbar, .record-sheet {
  max-width: 690px;
  margin-inline: auto;
}

.record-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .65rem 1rem;
  padding-block: .5rem 1rem;
  color: var(--muted);
  font-size: .85rem;
}

.print-record { margin: 0; cursor: pointer; font-family: inherit; }
.print-record[hidden] { display: none; }
.print-record:focus-visible { outline: 3px solid #315b97; outline-offset: 3px; }

.record-sheet {
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.record-heading {
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--navy);
}

.record-heading h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); }
.record-fields { display: grid; gap: .65rem 1rem; margin-top: .8rem; }

.record-field {
  min-height: 3.2rem;
  border-bottom: 1px solid var(--line);
  font-size: .85rem;
  font-weight: 700;
}

.record-notes { margin-top: 1.2rem; }
.record-notes h2 { font-size: 1rem; }
.record-notes p { margin-top: .2rem; color: var(--muted); font-size: .8rem; }
.record-lines span { display: block; min-height: 1.7rem; border-bottom: 1px solid var(--line); }
.record-help p { margin-top: .65rem; color: var(--muted); }

@media (min-width: 560px), print {
  .record-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-wide { grid-column: 1 / -1; }
}

@page { margin: 14mm; }

@media print {
  body { color: #000; background: #fff; font: 11pt/1.4 Arial, sans-serif; }
  .site-header, .site-footer, .skip-link, .record-page > .story-back,
  .record-toolbar, .record-page .story-related { display: none !important; }
  .record-page, .record-sheet { width: 100%; max-width: none; margin: 0; padding: 0; }
  .record-sheet { border: 0; border-radius: 0; }
  .record-heading, .record-field, .record-lines span { border-color: #777; }
  .record-heading h1, .record-heading .eyebrow, .record-notes h2, .record-notes p { color: #000; }
  .record-heading h1 { font-size: 24pt; }
  .record-fields { gap: 2mm 7mm; }
  .record-field { min-height: 15mm; }
  .record-notes { margin-top: 6mm; }
  .record-lines span { min-height: 8mm; }
}

.character-index {
  width: 100%;
  margin-top: .8rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .75rem;
}

.character-index caption {
  margin-bottom: .5rem;
  color: var(--muted);
  text-align: left;
}

.character-index th, .character-index td {
  padding: .35rem .25rem;
  border: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.character-index th { background: var(--ice); color: var(--navy); }
.character-index td { height: 2.65rem; }

@media print {
  .character-index { font-size: 10pt; }
  .character-index caption, .character-index th { color: #000; }
  .character-index th, .character-index td { border-color: #777; }
  .character-index td { height: 12mm; }
  .character-index tr { break-inside: avoid; }
}
