/* Speaking page, topics: a ledger of topics on the left (a white plate glides to the one you pick,
   each row carries its own small histogram of the years), and a white tile on the right with the
   field of squares (one per talk), the year axis, and the titles for the picked year. */
.tf {
  --tf-travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --tf-settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.tf-grid {
  display: grid; grid-template-columns: minmax(0, 25.5rem) minmax(0, 1fr); gap: clamp(1.5rem, 3.6vw, 3.25rem);
  align-items: start; margin-top: clamp(2rem, 4vw, 3rem);
}
.tf-side { position: sticky; top: calc(var(--nav-h) + 1.5rem); min-width: 0; }

/* ---------- ledger ---------- */
.tf-ledger { position: relative; isolation: isolate; display: grid; gap: 2px; }
.tf-plate {
  position: absolute; left: 0; top: 0; z-index: -1; width: 0; height: 0; border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow-1);
  transition: transform 0.5s var(--tf-settle), width 0.5s var(--tf-settle), height 0.5s var(--tf-settle);
}
.tf-ledger.is-still .tf-plate { transition: none; }
.tf-row {
  display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) 76px; align-items: center; gap: 0 0.9rem;
  width: 100%; min-height: 58px; padding: 0.55rem 0.95rem; border: 0; border-radius: 14px; background: none;
  font: inherit; text-align: left; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s var(--tf-travel), transform 0.35s var(--tf-settle);
}
.tf-row:hover:not([aria-pressed="true"]), .tf-row.is-peek { background: rgba(255, 255, 255, 0.55); }
.tf-row:active { transform: scale(0.985); }
.tf-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tf-n {
  font-family: var(--label); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; color: var(--ink); transition: color 0.3s var(--tf-travel);
}
.tf-name { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.2; color: var(--ink-2); }
.tf-row[aria-pressed="true"] .tf-n, .tf-row.is-peek .tf-n { color: var(--accent); }
.tf-row[aria-pressed="true"] .tf-name { color: var(--ink); }
.tf-spark { display: block; width: 76px; height: 20px; }
.tf-spark rect { fill: var(--line-2); transition: fill 0.35s var(--tf-travel); }
.tf-row[aria-pressed="true"] .tf-spark rect, .tf-row.is-peek .tf-spark rect { fill: var(--accent); }
.tf-sep { display: block; height: 1px; margin: 0.45rem 0.95rem; background: var(--line-2); }
.tf-row--none .tf-name { font-family: var(--sans); font-weight: 500; font-size: 0.98rem; color: var(--muted); }
.tf-row--none[aria-pressed="true"] .tf-name { color: var(--ink); }

.tf-note { margin-top: 1.5rem; padding-inline: 0.95rem; max-width: 40ch; font-size: 0.9rem; line-height: 1.55; color: var(--muted); }
.tf-words { margin-top: 0.7rem; padding-inline: 0.95rem; max-width: 40ch; font-size: 0.9rem; line-height: 1.6; color: var(--muted); }
.tf-w {
  padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer;
  text-decoration: underline dotted var(--line-2); text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  border-radius: 3px; transition: text-decoration-color 0.25s var(--tf-travel), background-color 0.25s var(--tf-travel);
}
.tf-w:hover, .tf-w.is-peek { text-decoration-color: var(--accent); }
.tf-w[aria-pressed="true"] { text-decoration: underline solid var(--accent); text-decoration-thickness: 2px; background: var(--accent-tint); }
.tf-w:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tf-wn { font-family: var(--label); font-weight: 600; font-size: 0.82rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- stage ---------- */
.tf-stage {
  min-width: 0; padding: clamp(1rem, 2.2vw, 1.9rem); border-radius: 18px; background: var(--paper);
  box-shadow: var(--shadow-1);
}
.tf-cap { font-family: var(--label); font-weight: 500; font-size: 0.93rem; line-height: 1.4; color: var(--muted); }
.tf-cap span { display: inline-block; color: var(--accent); font-weight: 600; }
.tf-field { position: relative; margin-top: 1rem; }
.tf-canvas {
  display: block; width: 100%; height: 300px; cursor: pointer; touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 8px;
}
.tf-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tf-tip {
  position: absolute; left: 0; top: 0; z-index: 2; display: grid; gap: 0.2rem; width: max-content; max-width: 300px;
  padding: 0.6rem 0.8rem 0.65rem; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-2);
  pointer-events: none; opacity: 0; transform: translateY(4px); filter: blur(3px);
  transition: opacity 0.22s var(--tf-travel), transform 0.3s var(--tf-travel), filter 0.3s var(--tf-travel);
}
.tf-tip.is-on { opacity: 1; transform: none; filter: none; }
.tf-tip__m { font-family: var(--label); font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.tf-tip__t { font-size: 0.9rem; line-height: 1.4; color: var(--ink); }

.tf-axis { position: relative; height: 1.5rem; margin-top: 0.45rem; border-top: 1px solid var(--line); }
.tf-ax {
  position: absolute; top: 0.35rem; left: 0; transform: translateX(-50%);
  font-family: var(--label); font-weight: 500; font-size: 0.8rem; line-height: 1; color: var(--muted);
  font-variant-numeric: tabular-nums; transition: opacity 0.25s var(--tf-travel);
}
.tf-ax.is-first { transform: none; }
.tf-ax.is-last { left: auto; right: 0; transform: none; }
.tf-ax.is-hid { opacity: 0; }
.tf-ax--now { font-weight: 700; color: var(--accent); transition: transform 0.46s var(--tf-settle); }
.tf-axis.is-still .tf-ax--now { transition: none; }

.tf-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.9rem;
  margin-top: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}
.tf-year { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 2.8vw, 2.3rem); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.tf-of { font-family: var(--label); font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.tf-of span { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.tf-listwrap { overflow: hidden; transition: height 0.45s var(--tf-settle); }
.tf-list { list-style: none; margin: 0; padding: 0.35rem 0 0; }
.tf-item {
  padding: 0.7rem 0.7rem 0.75rem; margin-inline: -0.7rem; border-radius: 12px;
  transition: background-color 0.25s var(--tf-travel);
  animation: tf-in 0.5s var(--tf-travel) both; animation-delay: calc(var(--i, 0) * 32ms);
}
.tf-item.is-quick { animation-duration: 0.34s; animation-delay: calc(var(--i, 0) * 18ms); }
.tf-item + .tf-item { box-shadow: inset 0 1px 0 var(--line); }
.tf-item.is-hot, .tf-item.is-hot + .tf-item { box-shadow: none; }
.tf-item.is-hot { background: var(--mist); }
.tf-t { font-size: 1rem; line-height: 1.45; color: var(--ink); }
.tf-hit { background: linear-gradient(transparent 58%, var(--accent-glow) 58%); border-radius: 2px; }
.tf-untitled { color: var(--muted); font-style: italic; }
.tf-m { margin-top: 0.2rem; font-family: var(--label); font-weight: 500; font-size: 0.84rem; color: var(--muted); }
.tf-empty { padding: 1rem 0; color: var(--muted); font-size: 0.95rem; }
.tf-more {
  margin-top: 0.7rem; padding: 0.35rem 0; border: 0; background: none; cursor: pointer;
  font-family: var(--label); font-weight: 600; font-size: 0.95rem; color: var(--accent);
  text-decoration: underline; text-decoration-color: var(--lightbox-deep); text-underline-offset: 4px; text-decoration-thickness: 2px;
  transition: text-decoration-color 0.3s var(--tf-travel);
}
.tf-more:hover { text-decoration-color: var(--accent); }
.tf-more[hidden] { display: none; }

.tf-cap span.is-in, .tf-words.is-in { animation: tf-in 0.45s var(--tf-travel) both; }
@keyframes tf-in { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }

@media (max-width: 1000px) {
  .tf-grid { grid-template-columns: minmax(0, 1fr); }
  /* on one column the field follows the ledger straight away; the method note closes the section */
  .tf-grid { gap: 0; }
  .tf-side { display: contents; }
  .tf-ledger { order: 1; }
  .tf-stage { order: 2; margin-top: 1.5rem; }
  .tf-note { order: 3; }
  .tf-words { order: 4; }
  .tf-note, .tf-words { max-width: 62ch; }
}
@media (max-width: 640px) {
  .tf-ledger { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px; }
  .tf-row { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.3rem; min-height: 0; padding: 0.7rem 0.75rem; }
  .tf-n { font-size: 1.6rem; }
  .tf-name { font-size: 0.98rem; }
  .tf-spark { width: 100%; height: 16px; margin-top: 0.15rem; }
  .tf-sep { display: none; }
  .tf-row--none { grid-column: 1 / -1; }
  .tf-note, .tf-words { padding-inline: 0.75rem; }
  .tf-stage { padding: 1rem 0.9rem 1.1rem; }
  .tf-t { font-size: 0.97rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tf *, .tf *::before, .tf *::after { transition: none !important; animation: none !important; }
}

/* page pass: a talk's city takes the reader back up to it on the map */
.tf-place {
  padding: 0; border: 0; font: inherit; color: inherit; cursor: pointer;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color 0.25s, background-size 0.35s cubic-bezier(0.28, 0.11, 0.32, 1);
}
.tf-place:hover, .tf-place:focus-visible { color: var(--accent); background-size: 100% 2px; }
.tf-ask { display: inline-flex; margin-top: 1.1rem; font-size: 0.95rem; }
.tf-ask[hidden] { display: none; }
