/* Poems page: the poem on a sheet of cream paper, notes about it on sticky notes below. Loads after site.css. */

.poem-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.poem-jump a {
  color: var(--ink); background: var(--jot); font-weight: 800; text-decoration: none;
  padding: 8px 16px; border-radius: 999px; box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.3);
}

.poem { max-width: 40em; margin: 0 0 72px; scroll-margin-top: 16px; }

.sheet {
  position: relative;
  padding: 34px 16px 24px;
  border-radius: 4px;
  color: var(--ink);
  background: var(--chalk);
  box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.3);
}
.sheet::before {
  /* tape */
  content: "";
  position: absolute; top: -12px; left: 50%;
  width: 96px; height: 26px;
  background: rgba(255, 225, 77, 0.8);
  transform: translateX(-50%) rotate(-2deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.poem-title { margin: 0; font-family: "Permanent Marker", cursive; font-weight: 400; font-size: 30px; line-height: 1.1; }
.poem-by { margin: 6px 0 24px; font-weight: 700; color: var(--ink-soft); }

.sheet .stanza { margin: 0 0 22px; font-size: 16.5px; line-height: 1.5; font-weight: 500; }
/* A line too long for the screen wraps with its second half indented, as in a printed book. */
.verse { display: block; position: relative; padding-left: 1.4em; text-indent: -1.4em; margin-left: 20px; }
.verse[data-n]::before {
  content: attr(data-n);
  position: absolute; left: -22px; top: 0.35em; text-indent: 0;
  font-size: 11px; font-weight: 700; line-height: 1.5; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.gloss {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  text-indent: 0;
  text-decoration: underline dotted 2px; text-decoration-color: #c2410c; text-underline-offset: 4px;
  -webkit-tap-highlight-color: transparent;
}
.gloss[aria-expanded="true"] { background: var(--jot); border-radius: 3px; text-decoration-color: transparent; box-shadow: 0 0 0 3px var(--jot); }

.gloss-note {
  display: block;
  margin: 8px 0 12px 20px; padding: 10px 14px;
  font-size: 15px; line-height: 1.45; font-weight: 500;
  background: var(--jot); border-radius: 4px;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.18);
  animation: gloss-in 220ms var(--spring) both;
}
.gloss-note strong { display: block; font-family: "Permanent Marker", cursive; font-weight: 400; font-size: 17px; }
@keyframes gloss-in { from { opacity: 0; transform: translateY(-6px) rotate(-1deg); } to { opacity: 1; transform: none; } }

.sheet-tip { margin: 0 0 0 20px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.poem-after { margin: 18px 0 0; padding-top: 16px; border-top: 2px dashed rgba(28, 20, 64, 0.25); font-size: 16px; }
.poem-after strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }

.poem-kicker { margin: 30px 0 0; font-size: 21px; font-weight: 700; line-height: 1.3; text-wrap: balance; }

.poem-facts { margin: 22px 0 0; display: grid; gap: 12px; }
.poem-facts div { padding-left: 14px; border-left: 4px solid var(--jot); }
.poem-facts dt { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--chalk-dim); }
.poem-facts dd { margin: 0; font-weight: 600; }

.poem-note {
  margin: 26px 0 0; padding: 18px 20px 16px;
  color: var(--ink); background: var(--nc, var(--c4));
  border-radius: 6px; box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.3);
}
.poem-note h3 { margin: 0 0 8px; font-family: "Permanent Marker", cursive; font-weight: 400; font-size: 22px; line-height: 1.15; }
.poem-note p { margin: 0 0 10px; }
.poem-note p:last-child { margin-bottom: 0; }

.poem-source { margin: 24px 0 0; font-size: 14px; font-weight: 600; color: var(--chalk-dim); }

@media (min-width: 761px) {
  .sheet { padding: 40px 36px 28px; transform: rotate(-0.4deg); }
  .poem-note:nth-of-type(odd) { transform: rotate(0.4deg); }
  .poem-note:nth-of-type(even) { transform: rotate(-0.4deg); }
}

@media (prefers-reduced-motion: reduce) { .gloss-note { animation: none; } }
