.resource-page .resource {
  max-width: 66rem;
}

.resource .shift-log-intro {
  max-width: 62ch;
  color: var(--muted);
}

.resource .shift-log-downloads {
  margin-block: 1.1rem 1.8rem;
}

.resource .shift-log-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.resource .shift-log-example,
.resource .shift-log-balance {
  margin: 0;
  min-width: 0;
  padding: clamp(.85rem, 3vw, 1.35rem);
  border-radius: var(--radius);
}

.resource .shift-log-example,
.resource .shift-log-print {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.resource .shift-log-example {
  border-top: 4px solid var(--accent);
}

.resource .shift-log-sample,
.resource .shift-log-paper-table {
  table-layout: fixed;
  margin-block-start: 1rem;
}

.resource :is(.shift-log-sample, .shift-log-paper-table) :is(th, td) {
  overflow-wrap: anywhere;
  padding: .48rem;
  font-size: .9rem;
  text-align: start;
  vertical-align: top;
}

.resource :is(.shift-log-sample, .shift-log-paper-table) thead th {
  background-color: var(--tint);
}

.resource .shift-log-sample td span {
  display: inline-block;
}

.resource .shift-log-sample :is(th, td):last-child {
  font-weight: 800;
}

.resource .shift-log-balance {
  background: var(--ledger);
  color: var(--ledger-text);
  border: 1px solid var(--ledger);
}

.resource .shift-log-balance dl {
  margin-block-end: 0;
}

.resource .shift-log-balance dt {
  font-size: .9rem;
}

.resource .shift-log-balance dd {
  margin: .1rem 0 .7rem;
  color: var(--ledger-numerals);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.resource .shift-log-balance dd:last-child {
  margin-block-end: 0;
}

.resource .shift-log-balance dd small {
  color: var(--ledger-text);
}

.resource .shift-log-instructions {
  max-width: 48rem;
}

.resource .shift-log-instructions li + li {
  margin-block-start: .45rem;
}

.resource .shift-log-fields > div {
  padding-block: .55rem;
  border-block-end: 1px solid var(--line);
}

.resource .shift-log-fields dt {
  font-weight: 800;
}

.resource .shift-log-fields dd {
  margin: .15rem 0 0;
}

.resource .shift-log-fields code {
  overflow-wrap: anywhere;
}

.resource .shift-log-print {
  padding: clamp(.9rem, 3vw, 1.4rem);
  border-radius: var(--radius);
}

.resource .shift-log-print-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: .75rem;
}

.resource .shift-log-print-heading p {
  margin-block-start: .5rem;
}

.resource .shift-log-period {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-block-start: 1rem;
}

.resource .shift-log-period span {
  flex: 1 1 10rem;
  border-bottom: 1px solid var(--line-strong);
  min-block-size: 2.65rem;
  font-size: .85rem;
}

.resource .shift-log-paper-table :is(th, td) {
  border: 1px solid var(--line-strong);
}

.resource .shift-log-paper-table tbody tr {
  height: 2.1rem;
}

.resource .shift-log-paper-table tr > :first-child {
  width: 13%;
}

.resource .shift-log-paper-table tr > :last-child {
  width: 21%;
}

.resource .shift-log-print-url {
  font-size: .85rem;
  overflow-wrap: anywhere;
}

@media (max-width: 47rem) {
  .resource .shift-log-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 25rem) {
  .resource :is(.shift-log-example, .shift-log-print) {
    padding-inline: .65rem;
  }

  .resource :is(.shift-log-sample, .shift-log-paper-table) :is(th, td) {
    padding-inline: .25rem;
    font-size: .85rem;
  }

  .resource :is(.shift-log-sample, .shift-log-paper-table) thead th {
    padding-inline: .15rem;
  }

  .resource .shift-log-sample thead th:nth-last-child(-n+2) {
    width: 27.5%;
  }

  .resource .shift-log-paper-table tr > :first-child {
    width: 20%;
  }

  .resource .shift-log-paper-table tr > :last-child {
    width: 26%;
  }
}

@media print {
  @page { margin: 12mm; }

  .resource-page,
  .resource-page .resource {
    background: #fff;
    color: #111;
  }

  .resource-page :is(.skip-link, .site-header, .site-footer),
  .resource-page .resource > :not(.shift-log-print),
  .resource .shift-log-print :is(button, noscript) {
    display: none !important;
  }

  .resource-page .resource,
  .resource .shift-log-print {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .resource .shift-log-print {
    border: 0;
    color: #111;
    break-inside: avoid;
  }

  .resource .shift-log-period {
    flex-wrap: nowrap;
  }

  .resource .shift-log-paper-table :is(th, td),
  .resource .shift-log-period span {
    border-color: #555;
  }

  .resource .shift-log-paper-table thead th {
    background: #fff;
  }

  .resource .shift-log-paper-table tbody tr {
    height: 11mm;
  }
}
