/* About page: the double-entry ledger and its neighbours. Adds to site.css, restates nothing. */

/* Opening: note sheet beside the bench print; the call link sits at the sheet's foot. */
.ab-open { align-items: stretch; }
.ab-open > .sheet { display: flex; flex-direction: column; gap: .75rem; }
.ab-open > .sheet > * { margin-top: 0; }
.ab-open > .sheet .link { margin-top: auto; align-self: flex-start; }
.ab-open .mount__print { margin-inline-start: 0; }
.ab-open img { aspect-ratio: 4 / 5; max-height: 62vh; object-fit: cover; }
@media (min-width: 60rem) {
  .ab-open img { aspect-ratio: 5 / 6; max-height: 60vh; }
}

/* The owner's working notes: unrotated text on a solid sheet, a short rule at each note's left. */
.notes { margin-top: .75rem; }
.notes p {
  margin: 0 0 .75em;
  padding-left: .875rem;
  border-left: var(--rule-w) solid var(--build);
  break-inside: avoid;
}
.notes p:nth-child(1), .notes p:nth-child(4) { border-left-color: var(--keep); }
.notes p:last-child { margin-bottom: 0; }
@media (min-width: 60rem) {
  .notes { columns: 2; column-gap: 2.5rem; }
}

/* THE BOOKS: one wide sheet across the whole grid. Lane | kept | built, one decision per line. */
.books { margin-top: 1.25rem; padding: 0; }
.books table, .books thead, .books tbody, .books tfoot { display: block; width: 100%; }
.books tr { display: grid; grid-template-columns: var(--lane) minmax(0, 1fr); }
.books th, .books td { margin: 0; text-align: left; font-weight: 400; }
.books tbody tr:hover { background: var(--back); }

.books__lane {
  grid-row: 1 / span 2;
  padding: var(--pad) .5rem var(--pad) var(--pad);
  font-size: var(--fs-small);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.books td {
  position: relative;
  min-width: 0;
  padding: var(--pad) var(--pad) calc(var(--pad) + var(--rule-w));
}
.books td::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--rule-w);
  background: var(--keep);
}
.books td.books__b::after { background: var(--build); }
.books td p { margin: 0; }
.books__item {
  display: block;
  margin-bottom: .25rem;
  font-family: var(--hand);
  font-size: 1.4rem;
  line-height: 1.25;
  text-transform: lowercase;
  color: var(--keep);
}
.books__b .books__item { color: var(--build); }
.books__tag { display: inline-block; margin-bottom: .5rem; }

/* Header row: on a phone the real header stays for readers, each cell carries its own tag. */
.books thead {
  position: absolute;
  width: .0625rem;
  height: .0625rem;
  overflow: hidden;
  clip-path: inset(50%);
}

/* The total line: where a ledger would add up, one handwritten sentence and a double rule. */
.books tfoot td { grid-column: 2 / -1; padding-bottom: var(--pad); border-top: .375rem double var(--ink); }
.books tfoot td::after { content: none; }
.books tfoot .books__lane { grid-row: auto; border-top: .375rem double var(--ink); }
.books__sum p { font-size: var(--fs-h2); line-height: 1.3; }

@media (min-width: 48rem) {
  .books thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .books tr { grid-template-columns: var(--lane) minmax(0, 1fr) minmax(0, 1fr); }
  .books__lane { grid-row: auto; }
  .books thead th { padding: var(--pad) var(--pad) 0; }
  .books thead .books__lane { padding: 0; }
  .books__tag { display: none; }
  .books__item { font-size: 1.5rem; }
}

/* Rule clicks across in four steps, kept first, then built. Still for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .books tr.reveal td::after {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .32s steps(4, end);
  }
  .js .books tr.reveal.is-seen td::after { transform: none; }
  .js .books tr.reveal.is-seen td.books__b::after { transition-delay: .32s; }
}

/* What we refuse: three notes on backing stock, term left and reason right. */
.refuse { display: grid; gap: 1rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.refuse li {
  display: grid;
  gap: .5rem 2rem;
  padding: var(--pad);
  background: var(--back);
  box-shadow: .25rem .375rem .75rem var(--shade);
}
.refuse h3 { font-size: var(--fs-h3); }
@media (min-width: 60rem) {
  .refuse li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
}

/* The bay: the print keeps clear of the note beside it. */
.ab-place .mount__print { margin-inline-start: 0; }

/* Hand-off: two onward links on backing stock. */
.go { display: grid; gap: 1rem; margin-top: .75rem; }
.go > div { padding: var(--pad); background: var(--back); box-shadow: .25rem .375rem .75rem var(--shade); }
.go p { margin-top: .25rem; }
@media (min-width: 48rem) {
  .go { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
}
