/* Editor's Desk: hero, 100x pass (2026-09-28). Owned by the Editor's Desk hero section agent.

   The headline's number made physical. All ninety editorials lie on a desk as ninety sheets of paper,
   one pile per year from 2010 to 2026, newest on top, the way paper piles up on a real desk. The ones I
   wrote alone are ink; the ones written with co-authors are white. The first five piles sit over the
   Evidence-Based Spine-Care Journal, the rest over Global Spine Journal. Sweep the pointer across the
   desk and the piles under it fan open and straighten; the sheet under the pointer slides out and the
   reading plate above shows it, with its place in the run of ninety rolling on an odometer.

   Loaded after the page's inline <style>; new class names only, tokens from site.css :root. */

.dkh {
  --travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.dkh__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "words plate" "desk desk";
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: clamp(1.8rem, 3.4vw, 2.8rem);
}
.dkh__words { grid-area: words; align-self: start; }

/* ---------- the reading plate: one sheet lifted off the page, a second sheet behind it ---------- */
.dkh__plate {
  grid-area: plate; align-self: end;
  position: relative; display: flex; flex-direction: column;
  margin: 0 14px 14px 0;
  padding: clamp(1.3rem, 2.3vw, 1.9rem) clamp(1.3rem, 2.5vw, 2.1rem);
  background: #fff; border: 1px solid rgba(10, 13, 18, 0.08); border-radius: 18px;
  box-shadow: 14px 14px 0 -1px #fff, 14px 14px 0 0 rgba(10, 13, 18, 0.09), 0 1px 2px rgba(10, 13, 18, 0.04),
    var(--sx, 0px) calc(18px + var(--sy, 0px)) 44px rgba(10, 13, 18, 0.08);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.3s var(--travel), box-shadow 0.4s var(--travel);
}
.dkh__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1.1rem; }
.dkh__no { margin: 0; display: flex; align-items: baseline; gap: 0.45rem; }
.dkh__num {
  display: inline-flex; overflow: clip; padding-block: 0.06em;
  font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums; color: var(--accent);
}
.dkh__num span { display: inline-block; }
.dkh__of { font-family: var(--label); font-weight: 600; font-size: 0.95rem; color: var(--muted); }
.dkh__meta { margin: 0; font-family: var(--label); font-weight: 600; font-size: 0.92rem; color: var(--accent); }
.dkh__t {
  margin: auto 0 0; padding-top: 1.1rem; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.28rem, 1.85vw, 1.58rem); line-height: 1.28; text-wrap: pretty;
}
.dkh__t.is-long { font-size: clamp(1.08rem, 1.3vw, 1.2rem); line-height: 1.32; }
/* measuring the tallest title must not wait on the site's reduced-motion transitions */
.dkh__plate.is-measuring, .dkh__plate.is-measuring * { transition: none !important; }
/* the title underline draws in under the pointer */
.dkh__t a {
  color: var(--ink); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--travel), color 0.2s;
}
.dkh__t a:hover, .dkh__t a:focus-visible { color: var(--accent); background-size: 100% 1px; }
.dkh__by { margin: 0.5rem 0 0; font-size: 0.98rem; color: var(--muted); }
.dkh__go {
  margin: 0; padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.6rem 1.5rem;
}
.dkh__yr {
  font-family: var(--label); font-weight: 600; font-size: 0.92rem; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.dkh__yr:hover, .dkh__yr:focus-visible { color: var(--ink); }

/* ---------- the desk ---------- */
.dkh__desk {
  --h: 8px; --gap: 3px; --fan: 5px; --cg: 10px; --cols: 17; --tall: 10;
  grid-area: desk; position: relative;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(0.9rem, 2.2vw, 1.8rem) clamp(0.9rem, 1.6vw, 1.25rem);
  background: var(--mist); border-radius: 18px;
}
html:not(.js) .dkh__desk { display: none; }

.dkh__key { position: absolute; z-index: 2; top: clamp(0.7rem, 1.4vw, 1.1rem); left: clamp(0.9rem, 2.2vw, 1.8rem); display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.dkh__key button {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font-family: var(--label); font-weight: 600; font-size: 0.9rem; color: var(--muted);
  transition: color 0.2s;
}
.dkh__key b { font-weight: 700; color: var(--ink); }
.dkh__key button:hover, .dkh__key button:focus-visible, .dkh__key button[aria-pressed="true"] { color: var(--ink); }
.dkh__sw {
  width: 24px; height: 7px; border-radius: 2px; background: #fff; border: 1px solid rgba(10, 13, 18, 0.2);
  transition: translate 0.4s var(--settle);
}
.dkh__sw--solo { background: var(--ink-2); border-color: var(--ink-2); }
.dkh__key button:hover .dkh__sw, .dkh__key button:focus-visible .dkh__sw, .dkh__key button[aria-pressed="true"] .dkh__sw { translate: 4px 0; }

.dkh__piles {
  position: relative; display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--cg);
  height: calc(var(--tall) * (var(--h) + var(--gap) + var(--fan)) + 16px);
  border-bottom: 1px solid var(--line-2);
  touch-action: pan-y; cursor: pointer;
}
.dkh__pile { position: relative; --f: 0; }
/* each sheet: a slightly careless pile at rest (--x, --r from its PubMed id), squared up and fanned
   open when the pointer is over its year (--f from 0 to 1) */
.dkh__sheet {
  position: absolute; left: 4%; right: 4%; bottom: 2px; height: var(--h);
  padding: 0; border: 1px solid rgba(10, 13, 18, 0.18); border-radius: 2px;
  background: #fff; box-shadow: 0 1px 0 rgba(10, 13, 18, 0.05);
  cursor: pointer;
  transform:
    translate(calc(var(--x) * (1 - var(--f))), calc(var(--i) * (var(--h) + var(--gap) + var(--f) * var(--fan)) * -1))
    rotate(calc(var(--r) * (1 - var(--f))));
  transition: transform 0.55s var(--settle), translate 0.45s var(--settle), opacity 0.35s var(--travel),
    background-color 0.25s, border-color 0.25s, box-shadow 0.3s;
}
.dkh__sheet.is-solo { background: var(--ink-2); border-color: var(--ink-2); }
.dkh__sheet.is-on {
  z-index: 1; background: var(--accent); border-color: var(--accent);
  translate: 14% -2px; box-shadow: 0 6px 14px -4px rgba(27, 70, 100, 0.5);
}
.dkh__sheet:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the key pulls one kind of sheet out of every pile, in a wave from 2010 to 2026 */
.dkh__desk[data-lens="solo"] .dkh__sheet:not(.is-solo),
.dkh__desk[data-lens="with"] .dkh__sheet.is-solo { opacity: 0.16; }
.dkh__desk[data-lens="solo"] .dkh__sheet.is-solo,
.dkh__desk[data-lens="with"] .dkh__sheet:not(.is-solo) { translate: 10% 0; transition-delay: calc(var(--k) * 5ms); }

.dkh__years, .dkh__jr { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--cg); }
.dkh__years span {
  padding-top: 0.55rem; text-align: center; white-space: nowrap;
  font-family: var(--label); font-weight: 600; font-size: 0.8rem; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--muted); transition: color 0.25s;
}
.dkh__years span.is-on { color: var(--ink); }
.dkh__jr { margin-top: 0.85rem; }
.dkh__jr span {
  padding-top: 0.45rem; border-top: 1px solid var(--line-2);
  font-family: var(--label); font-weight: 600; font-size: 0.84rem; line-height: 1.25; color: var(--muted);
}

@media (max-width: 960px) {
  .dkh__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "words" "desk" "plate"; }
  .dkh__plate { align-self: start; }
}
@media (max-width: 600px) {
  .dkh__desk { --h: 5px; --gap: 2px; --fan: 4px; --cg: 3px; padding: 0.4rem 0.85rem 0.9rem; }
  .dkh__key { position: static; margin-bottom: 0.2rem; gap: 0 1.1rem; }
  .dkh__key button { font-size: 0.86rem; }
  .dkh__years span { font-size: 0.72rem; }
  .dkh__years span:not(.is-major) { visibility: hidden; }
  .dkh__years span.is-on { color: var(--muted); }
  .dkh__years span.is-major.is-on { color: var(--ink); }
  .dkh__jr span { font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dkh__plate, .dkh__sheet, .dkh__sw, .dkh__t a { transition: none; }
  .dkh__desk[data-lens] .dkh__sheet { transition-delay: 0ms; }
}

/* page pass: "Quoted below" sits beside the year link when the reader below quotes this editorial */
.dkh__quoted { margin-left: auto; color: var(--accent-deep); }
.dkh__quoted[hidden] { display: none; }
.dkh__quoted:hover, .dkh__quoted:focus-visible { color: var(--accent); }
