/* Atlas — one place's timeline (static/js/explore/timeline.js, static/js/explore/timeline/*).

   Cut paper, like the rest of the Atlas (static/explore/tokens.css): the
   line is a cream sheet; each era a torn band of its own colour (--era-h,
   from periods.json); the periods inside it paler slips of the same
   colour; a moment a dot in the colour of what it is about (--layer-h,
   data-layer); what is chosen wears the place's colour (--place-h). Every
   colour is a token from tokens.css — the derived --*-fill / -on / -ink /
   -mark / -soft / -wash pass contrast in both themes — and the hues
   arrive inline from the data, so nothing here names a colour of its own.

   Positions on the line are fractions of the stretch in view (--p, --w),
   set by line.js; a phone stands the line up (.is-vertical). */

/* ── what an event gives a learner (static/js/timeline/learn.js: the line to
   hear, the words, the pieces that tell it) and the working-set readout
   (static/js/timeline/debug.js). Moved here from static/style.css when the
   old all-places timeline went; the panel re-inks them further down. ── */
.tl2-say { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.tl2-say-play { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.tl2-say-play:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tl2-say-text { margin: 0; font-size: 17px; font-weight: 600; }
.tl2-say-en { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.tl2-words { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tl2-word { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tl2-word-say { display: grid; gap: 1px; padding: 6px 10px; border: 0; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tl2-word-say:hover { background: var(--accent-soft); }
.tl2-word-gloss { font-size: 12px; color: var(--muted); }
.tl2-word-dict { display: inline-flex; align-items: center; padding: 0 8px; border-left: 1px solid var(--border); color: var(--accent); }
.tl2-word-say:focus-visible, .tl2-word-dict:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tl2-keep { margin-top: 2px; }
.tl2-pieces { list-style: none; margin: 4px 0; padding: 0; }
.tl2-piece {
  display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 40px; padding: 8px 4px; border: 0;
  border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left;
  text-decoration: none; cursor: pointer;
}
.tl2-piece { align-items: center; color: var(--accent); }
.tl2-piece:hover { background: var(--accent-soft); }
.tl2-piece:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tl2-piece-title { flex: 1 1 auto; min-width: 0; }
.tl2-piece-meta { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.tl2-debug { position: sticky; bottom: 0; margin: 10px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--panel); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tlx { max-width: 1180px; margin: 0 auto; padding: 4px 0 56px; color: var(--x-navy); background: none; }
.tlx :where(h1, h2, h3, h4, p) { overflow-wrap: anywhere; }

/* ── the head: back to the place, change place, the place's name ── */
.tlx-head { margin: 0 0 18px; }
.tlx-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 14px; }
.tlx-back, .tlx-change {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px 0 11px; border-radius: 999px;
  color: var(--x-navy); text-decoration: none; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--x-line);
}
.tlx-change { padding: 0 15px 0 12px; }
.tlx-back:hover, .tlx-change:hover { box-shadow: inset 0 0 0 1.5px var(--x-navy); }
.tlx-back:focus-visible, .tlx-change:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 2px; }
.tlx-title {
  margin: 6px 0 0; font-family: var(--serif); font-size: clamp(32px, 4.6vw, 50px); font-weight: 600; line-height: 1.04;
  letter-spacing: -0.012em; color: var(--x-navy); outline: none;
}
/* a short band of the place's colour under its name, as if cut with scissors */
.tlx-title::after {
  content: ""; display: block; width: 74px; height: 6px; margin-top: 12px; border-radius: 1px 3px 2px 1px;
  background: var(--place-mark); transform: rotate(-0.6deg);
}
.tlx-native { margin-left: 16px; font-size: 0.48em; font-style: italic; font-weight: 400; color: var(--place-ink); letter-spacing: 0; }
.tlx-sub { margin: 8px 0 0; color: var(--x-ink-2); font-size: 14.5px; }

/* ── the bar: zoom out, the trail, Line / List ── */
.tlx-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.tlx-out {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 15px 0 11px;
  border: 0; border-radius: 999px; background: var(--x-navy); color: var(--x-paper-2);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.tlx-out:hover:not(:disabled) { background: var(--x-red); color: var(--x-on); }
.tlx-out:disabled { background: transparent; color: var(--x-ink-2); box-shadow: inset 0 0 0 1.5px var(--x-line); cursor: default; opacity: 0.55; }
.tlx-out:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 2px; }
.tlx-trail {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto;
  scrollbar-width: none; white-space: nowrap; padding: 2px;
}
.tlx-trail::-webkit-scrollbar { display: none; }
.tlx-crumb {
  flex: none; display: inline-flex; align-items: center; min-height: 34px; max-width: 260px; padding: 0 11px; border-radius: 999px;
  color: var(--x-navy); font-size: 13.5px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis;
}
a.tlx-crumb:hover { box-shadow: inset 0 0 0 1.5px var(--x-line); }
.tlx-crumb[style*="--era-h"] { background: var(--era-wash); color: var(--era-ink); }
.tlx-crumb.is-here { background: var(--x-navy); color: var(--x-paper-2); }
.tlx-crumb.is-here[style*="--era-h"] { background: var(--era-fill); color: var(--era-on); }
.tlx-crumb:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 1px; }
.tlx-sep { flex: none; color: var(--x-ink-2); padding: 0 1px; }
.tlx-modes { flex: none; display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--x-line); }
.tlx-mode {
  min-height: 34px; min-width: 52px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--x-ink-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tlx-mode[aria-pressed="true"] { background: var(--x-navy); color: var(--x-paper-2); }
.tlx-mode:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 1px; }

/* ── the line: a sheet of paper ── */
.tlx-line-box { position: relative; }
.tlx-line-box.is-behind { display: none; }
.tlx-line {
  position: relative; padding: 14px 16px 8px; border-radius: var(--x-radius); overflow-x: clip;
  background: var(--x-paper-2) var(--x-grain); box-shadow: var(--x-shadow);
  user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.tlx-line:focus-visible { outline: 2.5px solid var(--place-mark); outline-offset: 3px; }
.tlx-line.is-dragging { cursor: grabbing; }
.tlx-body { position: relative; display: grid; gap: 5px; }
.tlx-eras, .tlx-periods, .tlx-procs, .tlx-track, .tlx-axis, .tlx-lens { position: relative; }

/* the strip: every era of the place, the stretch in view outlined */
.tlx-strip { position: relative; height: 24px; margin: 0 0 12px; }
.tlx-strip.is-whole { display: none; }
.tlx-strip-era {
  position: absolute; top: 3px; bottom: 3px; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); min-width: 3px;
  padding: 0 6px; border: 0; border-left: 2px solid var(--x-paper-2); border-radius: 2px; background: var(--era-soft); color: var(--x-navy);
  font: inherit; font-size: 10.5px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.tlx-strip-era.is-in { background: var(--era-fill); color: var(--era-on); }
.tlx-strip-era:hover { filter: brightness(1.06); }
.tlx-strip-era:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 1px; }
.tlx-strip-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.tlx-strip-win {
  position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); min-width: 6px;
  border-radius: 4px; box-shadow: 0 0 0 2.5px var(--x-navy), 0 0 0 5px var(--x-paper-2); pointer-events: none;
}

/* the eras: wide torn bands, each in its own colour */
.tlx-eras { height: 54px; }
.tlx-band {
  position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); min-width: 4px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; padding: 7px 10px 0;
  border: 0; background: none; color: var(--era-on); font: inherit; text-align: left; cursor: pointer; overflow: hidden;
}
.tlx-band::before {
  content: ""; position: absolute; inset: 0 1px; z-index: 0; background: var(--era-fill);
  -webkit-mask: var(--x-tear-b) left bottom / 240px 12px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 11px) no-repeat;
  mask: var(--x-tear-b) left bottom / 240px 12px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 11px) no-repeat;
}
.tlx-band > * { position: relative; z-index: 1; }
.tlx-band-name { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlx-band-date { display: block; font-size: 11.5px; font-weight: 500; opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tlx-band:hover::before { filter: brightness(1.07) saturate(1.05); }
.tlx-band:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: -1px; border-radius: 3px; }
.tlx-band.is-cut-start::before { left: 0; }
.tlx-band.is-cut-end::before { right: 0; }

/* the periods inside: slips of the era's colour, the chosen one in full */
.tlx-periods { height: calc(var(--rows, 1) * 29px); }
.tlx-band.is-l1, .tlx-band.is-l2 {
  top: calc(var(--row, 0) * 29px); bottom: auto; height: 25px; padding: 0 9px; justify-content: center;
  color: var(--x-navy);
}
.tlx-band.is-l1::before, .tlx-band.is-l2::before { -webkit-mask: none; mask: none; border-radius: 3px; background: var(--era-soft); }
.tlx-band.is-l2::before { background: var(--era-wash); box-shadow: inset 0 0 0 1.5px var(--era-mark); }
.tlx-band.is-l1 .tlx-band-name, .tlx-band.is-l2 .tlx-band-name { font-size: 12px; font-weight: 600; }
.tlx-band.is-current { color: var(--era-on); }
.tlx-band.is-current::before { background: var(--era-fill); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.tlx-band.is-l0.is-current::before { box-shadow: none; filter: saturate(1.15); }

/* changes over time: thin threads in their layer's colour */
.tlx-procs { height: calc(var(--rows, 1) * 21px); }
.tlx-proc {
  position: absolute; top: calc(var(--row) * 21px); height: 17px; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%);
  min-width: 8px; padding: 0 8px; border: 0; border-radius: 9px; background: var(--layer-wash);
  box-shadow: inset 0 0 0 1.5px var(--layer-mark); color: var(--layer-ink);
  font: inherit; font-size: 10.5px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.tlx-proc:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 1px; }

/* the moments: dots on the line, names on three rows above it */
.tlx-track { height: 112px; }
.tlx-track::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 13px; height: 2px; border-radius: 1px; background: var(--x-line); z-index: 0;
}
.tlx-mark {
  position: absolute; left: calc(var(--p) * 100%); bottom: 14px; z-index: 1; width: 0; height: 0; padding: 0; border: 0;
  background: none; color: var(--x-navy); font: inherit; pointer-events: none;
}
.tlx-dot {
  position: absolute; left: -8px; bottom: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--x-paper-2); border: 3.5px solid var(--layer-mark); pointer-events: auto; cursor: pointer;
}
.tlx-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }   /* a bigger target than it looks */
.tlx-mark.is-seen .tlx-dot { background: var(--layer-mark); }
.tlx-mark.is-draft .tlx-dot { border-style: dashed; }
.tlx-stem {
  display: none; position: absolute; left: -1px; bottom: 7px; width: 2px; height: calc(var(--row) * 24px + 15px);
  background: var(--layer-mark); opacity: 0.5;
}
.tlx-mark.has-label .tlx-stem { display: block; }
.tlx-mark-label {
  display: none; position: absolute; left: -7px; bottom: calc(21px + var(--row) * 24px); max-width: 210px;
  padding: 2px 8px 2px 9px; border-radius: 2px 4px 4px 2px; background: var(--x-paper-2);
  box-shadow: inset 3px 0 0 var(--layer-mark), 0 1px 3px rgba(40, 30, 10, 0.12);
  font-size: 12.5px; font-weight: 600; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: auto; cursor: pointer;
}
.tlx-mark.has-label .tlx-mark-label { display: block; }
.tlx-mark:hover { z-index: 3; }
.tlx-mark:hover .tlx-mark-label { background: var(--layer-wash); color: var(--layer-ink); }
.tlx-mark:hover .tlx-dot { transform: scale(1.15); }
.tlx-mark:focus-visible { outline: none; z-index: 3; }
.tlx-mark:focus-visible .tlx-dot { outline: 2.5px solid var(--x-navy); outline-offset: 2px; }
.tlx-mark:focus-visible .tlx-mark-label { text-decoration: underline; text-decoration-thickness: 2px; }
.tlx-mark.is-flip .tlx-mark-label, .tlx-cluster.is-flip .tlx-pile-label {
  left: auto; right: -7px; padding: 2px 9px 2px 8px; border-radius: 4px 2px 2px 4px;
  box-shadow: inset -3px 0 0 var(--layer-mark), 0 1px 3px rgba(40, 30, 10, 0.12);
}
.tlx-mark.is-selected { z-index: 4; }
.tlx-mark.is-selected .tlx-dot {
  border-color: var(--place-mark); background: var(--place-mark);
  box-shadow: 0 0 0 3px var(--x-paper-2), 0 0 0 5.5px var(--place-mark);
}
.tlx-mark.is-selected .tlx-stem { background: var(--place-mark); opacity: 1; }
.tlx-mark.is-selected .tlx-mark-label { background: var(--place-fill); color: var(--place-on); box-shadow: 0 2px 6px rgba(40, 30, 10, 0.2); }

/* a crowd of moments is a pile of beads, one per moment (up to four), in
   their layers' colours, with how many there are on top */
.tlx-cluster {
  position: absolute; left: calc(var(--p) * 100%); bottom: 14px; z-index: 2; width: 0; height: 0; padding: 0; border: 0;
  background: none; font: inherit; color: var(--x-navy); pointer-events: none;
}
.tlx-pile {
  position: absolute; left: -8px; bottom: -8px; display: flex; flex-direction: column; align-items: center;
  width: 16px; pointer-events: auto; cursor: zoom-in;
}
.tlx-pile::after { content: ""; position: absolute; inset: -8px -6px; }   /* a thumb-sized target */
.tlx-bead {
  flex: none; width: 15px; height: 15px; margin-top: -4px; border-radius: 50%;
  background: var(--layer-mark); box-shadow: 0 0 0 2px var(--x-paper-2);
}
.tlx-bead:first-child { margin-top: 0; }
/* a pile with a moment to start with in it says its name, above the pile */
.tlx-cluster .tlx-stem {
  display: none; position: absolute; left: -1px; bottom: calc(var(--beads, 1) * 11px + 2px); width: 2px;
  height: calc(21px + var(--row, 0) * 24px - var(--beads, 1) * 11px - 2px); background: var(--x-ink-2); opacity: 0.45;
}
.tlx-cluster.has-label .tlx-stem { display: block; }
.tlx-pile-label {
  display: none; position: absolute; left: -7px; bottom: calc(21px + var(--row, 0) * 24px); max-width: 210px;
  padding: 2px 8px 2px 9px; border-radius: 2px 4px 4px 2px; background: var(--x-paper-2);
  box-shadow: inset 3px 0 0 var(--x-ink-2), 0 1px 3px rgba(40, 30, 10, 0.12);
  font-size: 12.5px; font-weight: 600; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: auto; cursor: pointer;
}
.tlx-cluster.has-label .tlx-pile-label { display: block; }
.tlx-cluster.is-flip .tlx-pile-label { box-shadow: inset -3px 0 0 var(--x-ink-2), 0 1px 3px rgba(40, 30, 10, 0.12); }
.tlx-pile-label:hover { background: var(--place-wash); }
.tlx-cluster.is-selected .tlx-pile-label { background: var(--place-fill); color: var(--place-on); }
.tlx-cluster-n {
  position: absolute; left: 0; bottom: calc(var(--beads, 1) * 11px + 3px); transform: translateX(-50%);
  min-width: 20px; padding: 0 5px; border-radius: 8px; background: var(--x-navy); color: var(--x-paper-2);
  font-size: 10.5px; font-weight: 700; line-height: 15px; text-align: center; font-variant-numeric: tabular-nums;
  pointer-events: auto; cursor: zoom-in;
}
.tlx-cluster:hover { z-index: 3; }
.tlx-cluster:hover .tlx-cluster-n { background: var(--x-red); color: var(--x-on); }
.tlx-cluster:focus-visible { outline: none; z-index: 3; }
.tlx-cluster:focus-visible .tlx-pile { outline: 2.5px solid var(--x-navy); outline-offset: 3px; border-radius: 9px; }

/* the eras view, from the histograms: how full each stretch is */
.tlx-density {
  position: absolute; bottom: 15px; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); min-width: 3px;
  height: calc(6px + var(--h) * 74px); padding: 0; border: 0; border-left: 1px solid var(--x-paper-2);
  border-radius: 2px 2px 0 0; background: var(--era-mark); opacity: 0.72; cursor: zoom-in;
}
.tlx-density:hover { opacity: 1; }
.tlx-density:focus-visible { opacity: 1; outline: 2.5px solid var(--x-navy); outline-offset: 1px; }

/* Earlier and Later: only on a phone, where the line stands up */
.tlx-step { display: none; }

/* the lens: an open moment fanned out into what is inside it */
.tlx-lens { margin: -4px 0 4px; padding-top: 28px; }
.tlx-lens-span {
  position: absolute; top: 0; left: calc(var(--p) * 100%); width: max(5px, calc(var(--w) * 100%)); height: 6px;
  margin-left: -2px; border-radius: 3px; background: var(--place-mark);
}
.tlx-lens-fan { position: absolute; top: 6px; left: 0; width: 100%; height: 22px; overflow: visible; }
.tlx-lens-fan polygon { fill: var(--place-wash); stroke: var(--place-mark); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tlx-lens-items {
  position: relative; display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; padding: 8px;
  border-radius: var(--x-radius); background: var(--place-wash); box-shadow: inset 0 0 0 1.5px var(--place-mark);
}
.tlx-lens-item {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px 0 7px;
  border: 0; border-radius: 999px; background: var(--x-paper-2); color: var(--x-navy); box-shadow: var(--x-shadow);
  font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.tlx-lens-item:hover { box-shadow: var(--x-shadow-lift); }
.tlx-lens-item:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 2px; }
.tlx-lens-item.is-self { background: var(--place-fill); color: var(--place-on); }
.tlx-lens-item.is-self .tlx-lens-date { color: inherit; opacity: 0.85; }
.tlx-lens-glyph { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--era-mark); }
.tlx-lens-item.is-self .tlx-lens-glyph { background: var(--place-on); }
.tlx-lens-item.is-process .tlx-lens-glyph { border-radius: 3px; }
.tlx-lens-item.is-person .tlx-lens-glyph {
  width: 24px; height: 24px; display: grid; place-items: center; background: var(--place-fill); color: var(--place-on);
  font-size: 10px; font-weight: 700;
}
.tlx-lens-item.is-place .tlx-lens-glyph { background: var(--place2-mark); box-shadow: 0 0 0 2px var(--x-paper-2); }
.tlx-lens-date { color: var(--x-ink-2); font-variant-numeric: tabular-nums; }
.tlx-lens-title { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* the years; a break where nothing happened for a long time */
.tlx-axis { height: 28px; border-top: 1.5px solid var(--x-line); }
.tlx-tick { position: absolute; top: 0; left: calc(var(--p) * 100%); width: 1px; height: 5px; background: var(--x-line); }
.tlx-tick.is-major { width: 1.5px; height: 8px; background: var(--x-ink-2); }
.tlx-tick-label {
  position: absolute; top: 10px; left: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--x-ink-2);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tlx-break {
  position: absolute; top: -8px; height: 15px; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); min-width: 12px;
  background: linear-gradient(var(--x-paper-2) 0 0) center / 100% 5px no-repeat;
}
/* the two slanted strokes of a break in the axis */
.tlx-break::before, .tlx-break::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: var(--x-ink-2); transform: skewX(-24deg);
}
.tlx-break::before { left: calc(50% - 4px); }
.tlx-break::after { left: calc(50% + 2px); }
.tlx-brush {
  position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 100%); width: calc(var(--w) * 100%); z-index: 5;
  background: color-mix(in srgb, var(--place-mark) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--place-mark); pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .tlx-line:not(.is-vertical) .tlx-axis { cursor: col-resize; }
  .tlx-line:not(.is-vertical) .tlx-track { cursor: grab; }
}

/* ── a phone: the line stands up, the eras a ribbon down its left ── */
.tlx-line.is-vertical { padding: 10px 10px 12px 6px; overflow: clip; }
.tlx-line.is-vertical .tlx-strip { margin: 0 0 10px 4px; }
.tlx-line.is-vertical .tlx-step:not([hidden]) {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 4px); min-height: 40px; margin: 0 0 8px 4px;
  border: 0; border-radius: 999px; background: var(--x-paper); color: var(--x-navy); box-shadow: inset 0 0 0 1.5px var(--x-line);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tlx-line.is-vertical .tlx-step[data-dir="on"]:not([hidden]) { margin: 8px 0 0 4px; }
.tlx-line.is-vertical .tlx-step[data-dir="back"] .icon { transform: rotate(180deg); }
.tlx-line.is-vertical .tlx-step:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 2px; }
.tlx-line.is-vertical .tlx-body {
  grid-template-columns: 50px 32px auto minmax(0, 1fr); grid-template-rows: 58vh; gap: 0 5px;
}
.tlx.is-open .tlx-line.is-vertical .tlx-body { grid-template-rows: 42vh; }
.tlx-line.is-vertical .tlx-axis { grid-column: 1; grid-row: 1; height: auto; border-top: 0; border-right: 1.5px solid var(--x-line); }
.tlx-line.is-vertical .tlx-eras { grid-column: 2; grid-row: 1; height: auto; }
.tlx-line.is-vertical .tlx-periods { grid-column: 3; grid-row: 1; height: auto; width: calc(var(--rows, 0) * 19px); }
.tlx-line.is-vertical .tlx-track { grid-column: 4; grid-row: 1; height: auto; }
.tlx-line.is-vertical .tlx-procs, .tlx-line.is-vertical .tlx-lens, .tlx-line.is-vertical .tlx-brush { display: none; }
.tlx-line.is-vertical .tlx-band {
  top: calc(var(--p) * 100%); height: calc(var(--w) * 100%); left: 0; right: 0; bottom: auto; width: auto; min-height: 4px;
  padding: 9px 0 0; writing-mode: vertical-rl; align-items: center;
}
.tlx-line.is-vertical .tlx-band::before {
  inset: 1px 0;
  -webkit-mask: var(--x-tear-r) right top / 8px 160px repeat-y, linear-gradient(#000 0 0) left top / calc(100% - 7px) 100% no-repeat;
  mask: var(--x-tear-r) right top / 8px 160px repeat-y, linear-gradient(#000 0 0) left top / calc(100% - 7px) 100% no-repeat;
}
.tlx-line.is-vertical .tlx-band-date { display: none; }
.tlx-line.is-vertical .tlx-band-name { font-size: 12px; padding-right: 6px; }
.tlx-line.is-vertical .tlx-band.is-l1, .tlx-line.is-vertical .tlx-band.is-l2 {
  left: calc(var(--row, 0) * 19px); right: auto; width: 16px; height: calc(var(--w) * 100%); padding: 6px 0 0;
}
.tlx-line.is-vertical .tlx-band.is-l1::before, .tlx-line.is-vertical .tlx-band.is-l2::before { inset: 1px 0; -webkit-mask: none; mask: none; }
.tlx-line.is-vertical .tlx-band.is-l1 .tlx-band-name, .tlx-line.is-vertical .tlx-band.is-l2 .tlx-band-name { font-size: 10.5px; padding: 0; }
.tlx-line.is-vertical .tlx-track::after { left: 12px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
.tlx-line.is-vertical .tlx-mark { left: 13px; top: calc(var(--p) * 100%); bottom: auto; }
.tlx-line.is-vertical .tlx-dot { left: -8px; top: -8px; bottom: auto; }
.tlx-line.is-vertical .tlx-stem { display: none; }
.tlx-line.is-vertical .tlx-mark-label {
  left: 15px; top: -14px; bottom: auto; max-width: calc(100vw - 218px); padding: 0 9px; line-height: 28px; font-size: 13px;
}
.tlx-line.is-vertical .tlx-cluster { left: 13px; top: calc(var(--p) * 100%); bottom: auto; }
.tlx-line.is-vertical .tlx-pile { left: -8px; top: -8px; bottom: auto; flex-direction: row; width: auto; }
.tlx-line.is-vertical .tlx-bead { margin-top: 0; margin-left: -4px; }
.tlx-line.is-vertical .tlx-bead:first-child { margin-left: 0; }
.tlx-line.is-vertical .tlx-cluster-n { left: calc(var(--beads, 1) * 11px + 2px); bottom: auto; top: -8px; transform: none; }
.tlx-line.is-vertical .tlx-cluster .tlx-stem { display: none; }
.tlx-line.is-vertical .tlx-pile-label {
  left: calc(var(--beads, 1) * 11px + 6px); top: -14px; bottom: auto; max-width: calc(100vw - 226px - var(--beads, 1) * 11px);
  padding: 0 9px; line-height: 28px; font-size: 13px;
}
.tlx-line.is-vertical .tlx-cluster.is-more .tlx-pile-label {
  left: calc(var(--beads, 1) * 11px + 32px); max-width: calc(100vw - 252px - var(--beads, 1) * 11px);
}
.tlx-line.is-vertical .tlx-density {
  left: 4px; bottom: auto; top: calc(var(--p) * 100%); height: calc(var(--w) * 100%); width: calc(14px + var(--h) * 70%);
  min-height: 3px; border-left: 0; border-top: 1px solid var(--x-paper-2); border-radius: 0 2px 2px 0;
}
.tlx-line.is-vertical .tlx-tick { top: calc(var(--p) * 100%); left: auto; right: 0; width: 5px; height: 1px; }
.tlx-line.is-vertical .tlx-tick.is-major { width: 8px; height: 1.5px; }
.tlx-line.is-vertical .tlx-tick-label { top: 0; left: auto; right: 11px; transform: translateY(-50%); font-size: 10.5px; }
.tlx-line.is-vertical .tlx-break {
  top: calc(var(--p) * 100%); height: calc(var(--w) * 100%); left: auto; right: -8px; width: 15px; min-height: 12px;
  background: linear-gradient(var(--x-paper-2) 0 0) center / 5px 100% no-repeat;
}
.tlx-line.is-vertical .tlx-break::before, .tlx-line.is-vertical .tlx-break::after {
  left: 0; right: 0; top: auto; bottom: auto; width: auto; height: 2px; transform: skewY(-24deg);
}
.tlx-line.is-vertical .tlx-break::before { top: calc(50% - 4px); }
.tlx-line.is-vertical .tlx-break::after { top: calc(50% + 2px); }

/* ── the list: a window onto every moment in view ── */
.tlx-list {
  height: min(62vh, 560px); overflow: auto; border-radius: var(--x-radius);
  background: var(--x-paper-2) var(--x-grain); box-shadow: var(--x-shadow);
}
.tlx-list-space { position: relative; }
.tlx-list-rows { list-style: none; margin: 0; padding: 0; position: absolute; top: 0; left: 0; right: 0; }
.tlx-row { height: 60px; border-bottom: 1px solid var(--x-line); }
.tlx-row-btn {
  display: grid; grid-template-columns: 12px 116px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  width: 100%; height: 100%; padding: 6px 16px; border: 0; background: none; color: var(--x-navy); font: inherit; text-align: left; cursor: pointer;
}
.tlx-row-btn:hover, .tlx-row.is-selected .tlx-row-btn { background: var(--place-wash); }
.tlx-row-btn:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: -3px; }
.tlx-row-dot { grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: var(--layer-mark); }
.tlx-row-date { grid-row: 1 / 3; font-size: 12.5px; font-weight: 600; color: var(--x-ink-2); font-variant-numeric: tabular-nums; }
.tlx-row-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlx-row-blurb { grid-column: 3; font-size: 12.5px; color: var(--x-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── the panel: a time or a moment, and what is inside it ── */
.tlx-panel {
  margin: 20px 0 0; padding: 0 0 22px; border-radius: var(--x-radius); overflow: hidden;
  background: var(--x-paper-2) var(--x-grain); box-shadow: var(--x-shadow);
}
.tlx-ph { position: relative; padding: 18px 24px 18px; background: var(--era-wash); }
.tlx-ph::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 12px; background: var(--era-mark);
  -webkit-mask: var(--x-tear-b) left top / 240px 12px repeat-x; mask: var(--x-tear-b) left top / 240px 12px repeat-x;
}
.tlx-panel[data-kind="overview"] .tlx-ph { background: var(--place-wash); }
.tlx-panel[data-kind="overview"] .tlx-ph::after { background: var(--place-mark); }
.tlx-ph-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tlx-kind {
  display: inline-flex; align-items: center; gap: 7px; margin: 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--x-red);
}
.tlx-kind-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--layer-mark); }
.tlx-kind[data-layer=""] .tlx-kind-dot { background: var(--era-mark); }
.tlx-close {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--x-ink-2); cursor: pointer;
}
.tlx-close:hover { background: var(--x-paper-2); color: var(--x-navy); }
.tlx-close:focus-visible { outline: 2.5px solid var(--x-red); }
.tlx-ph-date { margin: 10px 0 0; font-size: 15px; font-weight: 700; color: var(--era-ink); font-variant-numeric: tabular-nums; }
.tlx-ph-title {
  margin: 2px 0 0; font-family: var(--serif); font-size: clamp(25px, 3.1vw, 34px); font-weight: 600; line-height: 1.12;
  color: var(--x-navy); outline: none;
}
.tlx-ph-title:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 3px; border-radius: 3px; }
.tlx-ph-native { margin: 4px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--era-ink); }
.tlx-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tlx-badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tlx-badge.is-quiet { box-shadow: inset 0 0 0 1px var(--x-line); color: var(--x-ink-2); }
.tlx-badge.is-draft { box-shadow: inset 0 0 0 1.5px var(--x-red); color: var(--x-red); }

.tlx-panel > .tlx-text, .tlx-panel > .tlx-sub, .tlx-panel > .tlx-h3, .tlx-panel > .tlx-pcards,
.tlx-panel > .tlx-moments, .tlx-panel > .tlx-chips, .tlx-panel > .tlx-note { margin-left: 24px; margin-right: 24px; }
.tlx-text { margin: 14px 0; font-size: 16px; line-height: 1.65; max-width: 68ch; }
.tlx-text.is-lead { font-size: 17px; }
.tlx-note { margin: 12px 0 0; font-size: 13.5px; color: var(--x-ink-2); }
.tlx-h3 { margin: 22px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-ink-2); }
.tlx-pbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 4px 30px; padding: 4px 24px 0; align-items: start; }
/* a wide screen reads the moment on the left and what is inside it on the right */
@media (min-width: 721px) {
  .tlx-pbody.is-event { grid-template-areas: "lead inside" "rest inside"; }
  .tlx-pbody.is-event > .tlx-lead { grid-area: lead; }
  .tlx-pbody.is-event > .tlx-rest { grid-area: rest; }
  .tlx-pbody.is-event > .tlx-inside { grid-area: inside; }
}
.tlx-pmain, .tlx-lead, .tlx-rest { min-width: 0; }
.tlx-panel .tl2-say { background: var(--era-wash); border-radius: var(--x-radius); }
.tlx-panel .tl2-say-play { background: var(--x-navy); color: var(--x-paper-2); }
.tlx-why { margin: 6px 0 0; }
.tlx-why .tlx-text { margin-top: 4px; }

/* "Inside this …": the items one level deeper, in colour */
.tlx-inside {
  margin: 16px 0 0; padding: 16px 16px 8px; border-radius: var(--x-radius);
  background: var(--place-wash); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--place-mark) 45%, transparent);
}
.tlx-inside-h { margin: 0 0 12px; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--x-navy); }
.tlx-group { margin: 0 0 14px; }
.tlx-group-h { margin: 0 0 7px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-ink-2); }

.tlx-moments { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tlx-moment {
  display: grid; grid-template-columns: 10px minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 1px 9px;
  min-height: 42px; padding: 8px 9px; border-radius: 4px; color: var(--x-navy); text-decoration: none; font: inherit; text-align: left;
}
.tlx-moment:hover { background: color-mix(in srgb, var(--x-paper-2) 70%, transparent); box-shadow: var(--x-shadow); }
.tlx-moment:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: -2px; }
.tlx-moment-dot { align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--layer-mark); }
.tlx-moment.is-process .tlx-moment-dot { border-radius: 2px; }
.tlx-moment-date { font-size: 12px; font-weight: 600; color: var(--x-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlx-moment-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.tlx-moment-note { grid-column: 2 / -1; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--x-red); }
.tlx-moments.is-around .tlx-moment { grid-template-columns: 10px minmax(0, 1fr); }
.tlx-moments.is-around .tlx-moment-date { grid-column: 2; }
.tlx-moments.is-around .tlx-moment-title { grid-column: 2; }
.tlx-moments.is-around .tlx-moment-dot { grid-row: 1 / 3; }

.tlx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.tlx-chip {
  display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 4px 14px 4px 4px; border: 0; border-radius: 999px;
  background: var(--x-paper-2); color: var(--x-navy); box-shadow: var(--x-shadow);
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer;
}
.tlx-chip:hover { box-shadow: var(--x-shadow-lift); }
.tlx-chip:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 2px; }
.tlx-chip.is-plain { cursor: default; background: transparent; box-shadow: inset 0 0 0 1.5px var(--x-line); }
.tlx-chip.is-process { padding-left: 14px; }
.tlx-chip-main { display: grid; gap: 1px; }
.tlx-chip-note { font-size: 11.5px; font-weight: 500; color: var(--x-ink-2); }
.tlx-chip[aria-expanded="true"] { background: var(--place-fill); color: var(--place-on); }
.tlx-chip[aria-expanded="true"] .tlx-chip-note { color: inherit; opacity: 0.85; }
.tlx-chip[aria-expanded="true"] .tlx-face { background: var(--x-paper-2); color: var(--x-navy); }
.tlx-face {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--place-fill); color: var(--place-on); font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
}
.tlx-chip.is-plain .tlx-face { background: var(--place-soft); color: var(--x-navy); }
.tlx-pin { flex: none; width: 14px; height: 14px; margin-left: 10px; border-radius: 50%; background: var(--place-mark); box-shadow: 0 0 0 2.5px var(--x-paper-2); }
.tlx-chip.is-plain .tlx-pin { background: var(--x-ink-2); }
.tlx-swatch { flex: none; width: 30px; height: 30px; margin-left: 2px; border-radius: 50% 40% 50% 45%; background: var(--theme-fill); }
.tlx-person {
  margin: 10px 0 0; padding: 12px 14px; border-radius: var(--x-radius); background: var(--x-paper-2); box-shadow: var(--x-shadow);
}
.tlx-person-name { margin: 0; }
.tlx-person .tlx-text { font-size: 14.5px; margin: 6px 0; }

/* period cards: a torn strip of the era's colour on cream */
.tlx-pcards { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tlx-pcard {
  position: relative; display: grid; align-content: start; gap: 3px; min-height: 104px; padding: 48px 14px 13px;
  border-radius: var(--x-radius); overflow: hidden; background: var(--x-paper-2) var(--x-grain); box-shadow: var(--x-shadow);
  color: var(--x-navy); text-decoration: none;
}
.tlx-pcard:hover { box-shadow: var(--x-shadow-lift); }
.tlx-pcard:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 2px; }
.tlx-pcard-paper {
  position: absolute; left: 0; right: 0; top: 0; height: 38px; background: var(--era-fill);
  -webkit-mask: var(--x-tear-b) left bottom / 240px 12px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 11px) no-repeat;
  mask: var(--x-tear-b) left bottom / 240px 12px repeat-x, linear-gradient(#000 0 0) left top / 100% calc(100% - 11px) no-repeat;
}
.tlx-pcard-date {
  position: absolute; top: 9px; left: 14px; right: 14px; color: var(--era-on); font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.tlx-pcard-title { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; }
.tlx-pcard-n { font-size: 12.5px; color: var(--x-ink-2); }
.tlx-pcards.is-small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 0; }
.tlx-pcards.is-small .tlx-pcard { min-height: 84px; padding: 38px 11px 10px; }
.tlx-pcards.is-small .tlx-pcard-paper { height: 30px; }
.tlx-pcards.is-small .tlx-pcard-date { top: 6px; left: 11px; font-size: 11px; }
.tlx-pcards.is-small .tlx-pcard-title { font-size: 15px; }

/* why it happened, what followed */
.tlx-cc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 0; }
.tlx-cc-col { padding: 2px 16px 8px; border-radius: var(--x-radius); background: var(--era-wash); }
.tlx-cc-col.is-after { background: var(--place-wash); }
.tlx-cc .tlx-h3 { margin-top: 12px; }
.tlx-points { list-style: none; margin: 4px 0; padding: 0; }
.tlx-points li { position: relative; margin: 7px 0; padding-left: 14px; line-height: 1.5; font-size: 14.5px; }
.tlx-points li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 1px; background: var(--era-mark); transform: rotate(45deg); }
.tlx-cc-col.is-after .tlx-points li::before { background: var(--place-mark); }
.tlx-when { font-variant-numeric: tabular-nums; }
.tlx-cite { font-size: 11px; vertical-align: super; color: var(--x-red); text-decoration: none; }
.tlx-held { color: var(--x-ink-2); font-size: 13px; }
.tlx-read { margin: 4px 0 0; }
.tlx-deep { margin-top: 18px; }
.tlx-known { margin: 4px 0; font-size: 13.5px; }
.tlx-sources { margin: 4px 0; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
.tlx-sources a { color: var(--x-navy); overflow-wrap: anywhere; }
.tlx-src-pub, .tlx-src-for { color: var(--x-ink-2); }

/* links in the prose: underlined in the colour of where they lead */
.tlx-xl {
  padding: 0; border: 0; background: none; color: var(--x-navy); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--era-mark);
}
.tlx-xl:hover { color: var(--era-ink); }
.tlx-xl.is-person { text-decoration-color: var(--place-mark); text-decoration-style: dotted; }
.tlx-xl.is-place { text-decoration-color: var(--place2-mark); }
.tlx-xl.is-topic { text-decoration-color: var(--theme-mark); }
.tlx-xl:focus-visible { outline: 2.5px solid var(--x-navy); outline-offset: 2px; border-radius: 2px; }

/* the widgets that explain a moment, after its lead (or where its text names them) */
.tlx-widgets { display: grid; gap: 16px; margin: 18px 0 0; }
.tlx-widgets > .xw, .tlx-lead > .xw, .tlx-why > .xw { margin: 0; }
.tlx-lead > .xw, .tlx-why > .xw { margin: 14px 0; }

/* "Still there today": a tinted sheet, a glyph a line — see, do, eat */
.tlx-today {
  margin: 20px 0 0; padding: 14px 16px 6px; border-radius: var(--x-radius);
  background: var(--place-wash) var(--x-grain); box-shadow: inset 4px 0 0 var(--place-mark);
}
.tlx-today-h {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--x-navy);
}
.tlx-today-h::before { content: ""; width: 26px; height: 5px; border-radius: 1px 3px 2px 1px; background: var(--x-red); transform: rotate(-2deg); }
.tlx-today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tlx-today-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0 10px; }
.tlx-today-row + .tlx-today-row { border-top: 1px dashed var(--x-line); }
.tlx-today-glyph {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--place-fill); color: var(--place-on); transform: rotate(-4deg);
}
.tlx-today-row.is-do .tlx-today-glyph { background: var(--place2-fill); color: var(--place2-on); transform: rotate(3deg); }
.tlx-today-row.is-eat .tlx-today-glyph { background: var(--era-fill); color: var(--era-on); }
.tlx-today-body { display: grid; gap: 2px; min-width: 0; }
.tlx-today-what { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--place-ink); }
.tlx-today-text { font-size: 15px; line-height: 1.55; }

/* the pages that link here, at the end of a moment, a change, a person */
.tlx-rest > .xl-mentioned, .tlx-pmain > .xl-mentioned { margin: 18px 0 0; }
.tlx-person .xl-mentioned { margin: 8px 0 0; padding: 8px 10px; font-size: 13.5px; }
.tlx-panel .xl { font-weight: 600; }

/* a period's way to the ones beside it, and to all its moments */
.tlx-pnav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 6px; }
.tlx-pnav-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 48%; padding: 0 14px; border-radius: 999px;
  color: var(--x-navy); font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--x-line);
}
.tlx-pnav-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlx-pnav-btn:hover { box-shadow: inset 0 0 0 1.5px var(--x-navy); }
.tlx-pnav-btn:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 2px; }
.tlx-more {
  margin: 8px 0 0; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--x-navy); color: var(--x-paper-2);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.tlx-more:hover { background: var(--x-red); color: var(--x-on); }
.tlx-more:focus-visible { outline: 2.5px solid var(--x-red); outline-offset: 2px; }
.tlx-panel .empty-note { color: var(--x-ink-2); }

/* ── a phone ── */
@media (max-width: 720px) {
  .tlx { padding: 0 0 36px; }
  .tlx-title { font-size: 34px; }
  .tlx-bar { flex-wrap: wrap; gap: 8px; }
  .tlx-trail { order: 3; flex-basis: 100%; margin: 0 -2px; }
  .tlx-modes { margin-left: auto; }
  .tlx-ph { padding: 16px 16px 16px; }
  .tlx-pbody, .tlx-pbody.is-event { grid-template-columns: minmax(0, 1fr); padding: 2px 16px 0; }
  .tlx-panel > .tlx-text, .tlx-panel > .tlx-sub, .tlx-panel > .tlx-h3, .tlx-panel > .tlx-pcards,
  .tlx-panel > .tlx-moments, .tlx-panel > .tlx-chips, .tlx-panel > .tlx-note { margin-left: 16px; margin-right: 16px; }
  .tlx-pcards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tlx-row-btn { grid-template-columns: 12px 84px minmax(0, 1fr); column-gap: 10px; padding: 6px 12px; }
  .tlx-text { font-size: 16px; }
  .tlx-today { padding: 12px 12px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .tlx-today-glyph, .tlx-today-h::before { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .tlx-dot { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
  .tlx-chip, .tlx-pcard, .tlx-lens-item { transition: box-shadow 0.15s ease; }
  .tlx-lens-items { animation: tlx-lens-in 0.22s ease; }
  @keyframes tlx-lens-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
