/* the learning gallery: a work grown to its whole self on a white wall, its label beside it */
.learn {
  position: fixed;
  inset: 0;
  z-index: 10;
}
.learn[hidden] { display: none; }
.learn-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(248, 247, 244, 0.96);
  opacity: 0;
}
.learn-frame {
  position: absolute;
  overflow: hidden;
  transform-origin: 0 0;
}
.learn-art {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}
.learn-art img {
  position: absolute;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.learn-art .whole {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  box-shadow: 0 2px 4px rgba(29, 28, 25, 0.06), 0 24px 60px rgba(29, 28, 25, 0.18);
}

/* the label: a sheet of paper, the title large, the facts in a quiet table */
.learn-card {
  position: absolute;
  top: 24px;
  width: 380px;
  max-height: calc(100% - 48px);
  overflow: auto;
  overscroll-behavior: none;
  padding: 34px 36px 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
  border-radius: 1px;
  opacity: 0;
}
.learn-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px;
  line-height: 0;
  color: var(--faint);
}
.learn-close:hover { color: var(--ink); background: transparent; }
.learn-kicker {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.learn-card h2 {
  margin: 0 28px 10px 0;
  font-weight: 400;
  font-family: var(--serif);
  font-size: 31px;
  font-style: italic;
  line-height: 1.18;
  text-wrap: balance;
}
.learn-byline {
  margin: 0 0 24px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.learn-card dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 18px;
  margin: 0 0 22px;
  padding-top: 4px;
  border-top: 1px solid var(--ink);
  font-size: 12px;
}
.learn-card dl:empty { display: none; }
.learn-card dt, .learn-card dd { padding: 9px 0 8px; border-bottom: 1px solid var(--rule); }
.learn-card dt { color: var(--muted); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 11px; }
.learn-card dd { margin: 0; color: var(--ink); }
.learn-text { margin: 0 0 22px; font-size: 14px; line-height: 1.7; color: #2c2a26; }
.learn-text:empty { display: none; }
.learn-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.learn-links:empty { display: none; }
.learn-links a { color: var(--muted); text-decoration: none; }
.learn-links a::after { content: " ↗"; font-size: 9px; }
.learn-links a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .learn-card {
    top: auto !important;
    left: 12px !important;
    right: 12px;
    bottom: 12px;
    height: 40vh;
    width: auto;
    max-height: 44vh;
    padding: 24px 24px 20px;
  }
  .learn-card h2 { font-size: 25px; }
  .learn-kicker { margin-bottom: 10px; }
  .learn-byline { margin-bottom: 16px; }
}
.learn-hole { position: fixed; background: var(--wall, #f8f7f4); opacity: 0; pointer-events: none; }

/* the wall behind a work is the wall: nothing of the mosaic through it */
.learn-backdrop { background: var(--wall, #f8f7f4); }
.learn-close { border: 0; outline: 0; background: transparent; }
.learn-close:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* phones: the work above, its label a sheet along the foot of the screen, edge to edge */
@media (max-width: 760px) {
  .learn-card {
    left: 0 !important; right: 0; bottom: 0; width: auto;
    height: 40vh; max-height: none;
    padding: 26px 24px calc(22px + env(safe-area-inset-bottom));
    background: var(--paper); box-shadow: 0 -1px 0 var(--rule); border-radius: 0;
  }
  .learn-kicker { display: none; }
  .learn-card h2 { margin: 0 44px 8px 0; font-size: 28px; line-height: 1.1; }
  .learn-byline { margin: 0 0 22px; font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
  .learn-card dl { grid-template-columns: 78px 1fr; gap: 0 14px; margin-bottom: 20px; padding-top: 0; border-top: 1px solid var(--rule); font-size: 14px; }
  .learn-card dt, .learn-card dd { padding: 11px 0 10px; }
  .learn-card dt { padding-top: 13px; font-size: 10px; }
  .learn-text { font-size: 15px; line-height: 1.65; }
  .learn-close { top: 16px; right: 12px; padding: 10px; }
}
/* (a touch screen has no keyboard focus to show: the × stays a bare ×) */
@media (hover: none) { .learn-close:focus-visible, .learn-close:focus { outline: 0; } }
@media (max-width: 760px) {
  .learn-card dl { column-gap: 0; }
  .learn-card dd { padding-left: 14px; }
}
.learn.shield > :not(.learn-backdrop) { visibility: hidden; }
