/* Editor's Desk: next (the closing band). Owned by the "next" section agent, desk-100x, 2026-09-28.
   "The research behind the opinions", drawn: every one of my papers as one thin line, in order, year
   by year, with the editorials in film blue. The grey run from 1992 carries the blue from 2010 on.
   A white lightbox plate glides along the lines as a loupe: the lines under it spread apart so any
   single paper can be picked, and the readout above names it and links into it.
   Scoped under .dnext-*; the shared .next / .next h2 / .next__actions rules stay. */

.dnext {
  --dn-travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --dn-settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.dnext .next__inner { display: block; }

/* ---------- the lead and the readout ---------- */
.dnext-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}
.dnext-lead { display: grid; gap: 1.1rem; align-content: end; }
.dnext-lead .next__actions { margin-top: 0.35rem; align-items: center; gap: 0.6rem 1.4rem; }
.dnext-say { margin: 0; max-width: 40ch; font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.dnext-say a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(46, 93, 126, 0.35); text-underline-offset: 3px; transition: text-decoration-color 0.25s; }
.dnext-say a:hover, .dnext-say a:focus-visible { text-decoration-color: currentColor; }

.dnext-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-block: 0.6rem;
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.dnext-more svg { transition: translate 0.3s var(--dn-travel); }
.dnext-more:hover, .dnext-more:focus-visible { color: var(--accent); }
.dnext-more:hover svg, .dnext-more:focus-visible svg { translate: 3px 0; }

.dnext-read { display: grid; gap: 0.55rem; min-height: 11.5rem; align-content: end; }
.dnext-yr { margin: 0; display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.dnext-yr b {
  font-family: var(--label);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.dnext-yr span { font-family: var(--label); font-weight: 600; font-size: 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dnext-yr .is-blue { color: var(--accent); }

.dnext-pick { display: grid; gap: 0.3rem; max-width: 36rem; text-decoration: none; color: var(--ink); }
.dnext-pick__t {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.3;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  transition: color 0.2s;
}
.dnext-pick__t::after { content: '\2009\2192'; display: inline-block; color: var(--accent); transition: translate 0.35s var(--dn-settle); }
.dnext-pick:hover .dnext-pick__t, .dnext-pick:focus-visible .dnext-pick__t { color: var(--accent); }
.dnext-pick:hover .dnext-pick__t::after, .dnext-pick:focus-visible .dnext-pick__t::after { translate: 4px 0; }
.dnext-pick__m { font-family: var(--label); font-weight: 500; font-size: 0.92rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dnext-year {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.dnext-year svg { transition: translate 0.3s var(--dn-travel); }
.dnext-year:hover, .dnext-year:focus-visible { color: var(--accent); }
.dnext-year:hover svg, .dnext-year:focus-visible svg { translate: 3px 0; }

/* the readout's parts cross-fade in with a slight rise and blur-to-sharp, staggered */
@keyframes dnext-in { from { opacity: 0; translate: 0 6px; filter: blur(4px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
.dnext-read.is-swap > * { animation: dnext-in 0.42s var(--dn-travel) backwards; }
.dnext-read.is-swap > :nth-child(2) { animation-delay: 30ms; }
.dnext-read.is-swap > :nth-child(3) { animation-delay: 60ms; }

/* ---------- the strip: one line per paper, a loupe that glides along it ---------- */
.dnext-strip {
  position: relative;
  margin-top: clamp(2rem, 4vw, 3rem);
  touch-action: pan-y;
  cursor: pointer;
  outline: none;
  border-radius: 18px;
  -webkit-tap-highlight-color: transparent;
}
.dnext-strip canvas { position: relative; display: block; width: 100%; }
.dnext-strip:focus-visible { box-shadow: 0 0 0 2px var(--mist), 0 0 0 4px var(--accent); }
.dnext-lens {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05), 0 10px 28px rgba(10, 13, 18, 0.08);
  opacity: 0;
  transition: opacity 0.5s var(--dn-travel);
  will-change: transform;
  pointer-events: none;
}
.dnext-strip.is-ready .dnext-lens { opacity: 1; }

@media (max-width: 960px) {
  .dnext-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .dnext-read { min-height: 0; }
  /* the readout sits above the lines here, so it keeps one height while a finger scrubs */
  .dnext-pick__t { min-height: 3.9em; }
}
@media (max-width: 600px) {
  .dnext-pick__t { font-size: 1.08rem; }
  .dnext-say { font-size: 0.98rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dnext-read.is-swap > * { animation: none; }
  .dnext *, .dnext-more svg { transition: none !important; }
}
