/* The free block library. It reads as the practice's drawing register: one row per block, with the sheet
   itself (photo, plotted drawing, title strip) reused from the home page for each block. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lib-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px) var(--gutter) 0;
}
.lib-head h1 {
  max-width: 22ch;
  margin: 10px 0 14px;
  font-size: var(--step-3);
  line-height: 1;
  font-weight: 720;
  font-variation-settings: "wdth" 122;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lib-head .lead { color: var(--graphite); max-width: 62ch; }

/* breadcrumb: the drawing's path in the register */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); }
.crumbs li { color: var(--lead); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--rule-strong); }
.crumbs a { color: var(--lead); }
.crumbs a:hover { color: var(--graphite); }

/* categories: sheet tabs along the register */
.lib-cats ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--graphite);
}
.lib-cats li { margin-bottom: -1px; }
.lib-cats a, .lib-cats li[aria-current] {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 14px 8px;
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--graphite);
  font-weight: 550;
  font-size: var(--step--1);
  text-decoration: none;
}
.lib-cats a:hover { background: var(--sheet); border-color: var(--rule); }
.lib-cats li[aria-current] { background: var(--sheet); border-color: var(--graphite); border-bottom: 1px solid var(--sheet); }
.lib-cats .count { color: var(--lead); font-weight: 400; font-variant-numeric: tabular-nums; }

.lib-body { display: grid; gap: clamp(40px, 6vw, 64px); padding-top: clamp(28px, 4vw, 44px); }
.lib-sheet { padding-top: clamp(20px, 3vw, 32px); }
.lib-detail { padding-top: clamp(40px, 6vw, 72px); }

.lib-section h2 { margin-bottom: 16px; font-size: var(--step-2); font-variation-settings: "wdth" 112; }
.lib-section h2 a { color: inherit; text-decoration: none; }
.lib-section h2 a:hover { text-decoration: underline; }
.lib-note { color: var(--lead); margin-bottom: 12px; max-width: 60ch; }
.lib-more { margin-top: 10px; font-size: var(--step--1); }
.lib-credit { margin-top: 12px; color: var(--lead); font-size: var(--step--1); max-width: 70ch; }
.demo-photo .lib-credit { margin-top: 0; }
.lib-demo .photo-pin { background: var(--sheet); }

/* the register: the same columns in every table, so the sections line up down the page */
.lib-register { table-layout: fixed; }
.lib-register caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lib-register th:nth-child(1) { width: 86px; }
.lib-register th:nth-child(3) { width: 32%; }
.lib-register th:nth-child(4) { width: 76px; text-align: right; }
.lib-register td { vertical-align: middle; }
.lib-register .reg-thumb { width: 76px; padding: 6px 0 6px 10px; }
.lib-register .reg-thumb img { width: 64px; height: 64px; object-fit: contain; background: var(--sheet); }
.lib-register .reg-item a { font-weight: 620; font-variation-settings: "wdth" 100; color: var(--graphite); text-decoration: none; }
.lib-register .reg-item a:hover { color: var(--blue-ink); text-decoration: underline; }
.lib-register .reg-block { display: block; margin-top: 2px; color: var(--lead); font-weight: 400; font-variation-settings: "wdth" 86; overflow-wrap: anywhere; }
.lib-register .reg-size { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lib-register .reg-get { text-align: right; }
.lib-register td:first-child { font-weight: 400; }
.text-link { font-weight: 600; }

@media (max-width: 620px) {
  .lib-register thead { display: none; }
  .lib-register tr { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "thumb item get" "thumb size get"; border-top: 1px solid var(--rule); }
  .lib-register tbody tr:first-child { border-top: 0; }
  .lib-register td { border-top: 0; padding: 4px 10px; }
  .lib-register .reg-thumb { grid-area: thumb; padding: 8px 0 8px 8px; }
  .lib-register .reg-item { grid-area: item; padding-top: 10px; display: block; }  /* site.css hides column 2 on phones */
  .lib-register .reg-size { grid-area: size; padding-bottom: 10px; color: var(--lead); white-space: normal; }
  .lib-register .reg-get { grid-area: get; align-self: center; }
}

/* software guides */
.lib-software { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.lib-software li[aria-current] { color: var(--lead); }
.lib-steps .step-list { margin-top: 4px; }

.lib-cta { padding-bottom: clamp(48px, 7vw, 88px); }
