/* Editor's Desk, in his words: sixteen years laid out as time. One row a year, 2010 to 2026. The
   seven quoted years hold a sentence; every year shows its editorials as marks, the quoted one in
   film blue. A white plate travels down the years with the reader (the reading line, or the
   pointer), and the sentence it lands on lights word by word, one sentence at a time. */
.wd {
  --wd-dim: #767D86;              /* 3.8:1 on mist: still readable at rest, clearly not lit */
  --wd-mark: rgba(10, 13, 18, 0.2);
  --wd-mark-on: rgba(10, 13, 18, 0.55);
  --wd-travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --wd-settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.wd__time { position: relative; margin-top: clamp(2.2rem, 4vw, 3.4rem); }
.wd__rows { position: relative; list-style: none; margin: 0; padding: 0; }

/* the plate: the sheet of the old reader, now travelling through the years */
.wd__plate {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  background: #fff; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.04), 0 18px 48px rgba(10, 13, 18, 0.08);
  opacity: 0; pointer-events: none; will-change: transform;
  transition: transform 0.6s var(--wd-settle), height 0.6s var(--wd-settle), width 0.6s var(--wd-settle), opacity 0.5s ease;
}
.wd.is-live .wd__plate { opacity: 1; }
.wd__plate.is-snap { transition: opacity 0.5s ease; }

/* a row a year */
.wd__row {
  position: relative; display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 17.5rem; column-gap: clamp(1.5rem, 3vw, 3rem);
  padding: 0.55rem clamp(1.2rem, 2.4vw, 2.2rem);
  scroll-margin-top: calc(var(--nav-h) + 16vh);
}
.wd__row--q { padding-block: clamp(1.5rem, 2.6vw, 2.2rem); }
.wd__when { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.wd__yr { font-family: var(--label); font-weight: 600; font-size: 0.92rem; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.45s var(--wd-travel); }
.wd__row--gap { padding-block: 0.5rem; }
.wd__row--gap .wd__when { flex-direction: row; align-items: center; gap: 0.8rem; }
.wd__row--q .wd__yr { font-weight: 700; font-size: clamp(1.9rem, 2.8vw, 2.5rem); letter-spacing: -0.01em; }
.wd__row.is-on .wd__yr { color: var(--accent); }

/* one mark per editorial that year; the one this sentence comes from is film blue */
.wd__marks {
  position: relative; display: flex; gap: 3px; height: 11px; width: calc(var(--n, 1) * 7px - 3px);
  background: repeating-linear-gradient(90deg, var(--wd-mark) 0 4px, transparent 4px 7px);
}
.wd__marks:not(.has-i)[data-k]::after { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--k) * 7px); width: 4px; border-radius: 1px; background: var(--accent); }
.wd__marks.has-i { background: none; }
.wd__marks i { flex: 0 0 4px; height: 100%; border-radius: 1px; background: var(--wd-mark); transform-origin: 50% 100%; transition: background-color 0.35s ease, transform 0.45s var(--wd-settle); }
.wd__marks i.is-q { background: var(--accent); }
.wd__row.is-on .wd__marks i { background: var(--wd-mark-on); transform: scaleY(1.27); transition-delay: calc(var(--i, 0) * 26ms); }
.wd__row.is-on .wd__marks i.is-q { background: var(--accent); }

/* the sentence */
.wd__q { grid-column: 2; margin: 0; }
.wd__q p { margin: 0; max-width: 34em; font-family: var(--display); font-weight: 500; font-size: clamp(1.22rem, 1.75vw, 1.62rem); line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.wd.is-read .wd__q p { color: var(--wd-dim); transition: color 0.5s ease; }
.wd.is-read .wd__row.is-on .wd__q p { color: var(--ink); }
.wd__w { transition: color 0.45s var(--wd-travel); }
.wd.is-read .wd__row.is-on .wd__w { transition-delay: calc(var(--d, 0) * 1ms); }

/* its source, always readable; the plate adds the arrow and the copy link */
.wd__src { grid-column: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding-top: 0.3rem; }
.wd__t {
  font-family: var(--display); font-weight: 600; font-size: 1.03rem; line-height: 1.3; color: var(--ink-2); text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px; transition: background-size 0.4s var(--wd-travel), color 0.2s;
}
.wd__t:hover, .wd__t:focus-visible { color: var(--accent); background-size: 100% 1px; }
.wd__arr { display: inline-block; margin-left: 0.3rem; color: var(--accent); opacity: 0; transform: translateX(-5px); transition: opacity 0.35s var(--wd-travel), transform 0.45s var(--wd-settle); }
.wd__row.is-on .wd__arr, html:not(.js) .wd__arr { opacity: 1; transform: none; }
.wd__t:hover .wd__arr { transform: translateX(4px); }
.wd__nw { white-space: nowrap; }
.wd__m, .wd__by { font-family: var(--label); font-weight: 500; font-size: 0.9rem; line-height: 1.35; color: var(--muted); }
.wd__share {
  margin-top: 0.55rem; padding: 0.15rem 0; border: 0; background: none; cursor: pointer;
  font-family: var(--label); font-weight: 600; font-size: 0.9rem; color: var(--accent);
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.35s var(--wd-travel) 0.08s, transform 0.5s var(--wd-settle) 0.08s, color 0.2s;
}
.wd__row.is-on .wd__share, .wd__share:focus-visible { opacity: 1; transform: none; }
.wd__share:hover { color: var(--accent-deep); }
.wd__share.is-done { color: var(--ink); }
.wd:not(.is-live) .wd__share { display: none; }

/* a year without a quoted sentence: its count arrives with the plate */
.wd__cnt { grid-column: 2; justify-self: start; align-self: center; margin: 0; font-family: var(--label); font-weight: 600; font-size: 0.9rem; line-height: 1.2; color: var(--muted); opacity: 0; transform: translateX(-6px); transition: opacity 0.35s var(--wd-travel), transform 0.5s var(--wd-settle); }
.wd__row.is-on .wd__cnt, html:not(.js) .wd__cnt { opacity: 1; transform: none; }
.wd__cnt button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--accent); }
.wd__go { display: inline-block; margin-left: 0.25rem; transition: transform 0.35s var(--wd-settle); }
.wd__cnt button:hover .wd__go { transform: translateY(3px); }

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

@media (max-width: 1100px) {
  .wd__row { grid-template-columns: 7rem minmax(0, 1fr); }
  .wd__src { grid-column: 2; margin-top: 1rem; padding-top: 0; }
}
@media (max-width: 720px) {
  .wd__time { margin-inline: calc(var(--gutter) * -0.5); }
  .wd__row { grid-template-columns: minmax(0, 1fr); padding-inline: calc(var(--gutter) * 0.5 + 0.6rem); }
  .wd__row--gap { display: flex; align-items: center; gap: 1rem; padding-block: 0.6rem; }
  .wd__when { flex-direction: row; align-items: center; gap: 0.85rem; }
  .wd__row--q .wd__when { margin-bottom: 0.9rem; }
  .wd__row--gap { padding-block: 0.5rem; }
.wd__row--gap .wd__when { flex-direction: row; align-items: center; gap: 0.8rem; }
.wd__row--q .wd__yr { font-size: 1.7rem; }
  .wd__q, .wd__src { grid-column: 1; }
  .wd__q p { font-size: 1.22rem; }
  .wd__src { margin-top: 0.9rem; }
  .wd__cnt { align-self: center; }
}
