/* ═══════════════════════════════════════════════════════════════
   The Footnote† — GIANNIS TRADE TIMELINE · CLASSIC (2D) layer
   Additions over timeline.css. A traditional left-to-right axis:
   one PICK pin per episode, min-gap spacing so dense months don't
   collide, zig-zag two-row captions, and a click-through panel whose
   "day's slate" reveals the day's other trades.
   ═══════════════════════════════════════════════════════════════ */

/* the masthead can wrap to one tidy row of meta on the right */
.mh-legend { gap: 9px; }

.modeswitch {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; border: 1px solid var(--card-rule-2);
  background: rgba(20,18,13,0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.modeswitch a {
  font-family: var(--fn-mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--card-muted); text-decoration: none; padding: 7px 12px; transition: color .14s, background .14s;
}
.modeswitch a + a { border-left: 1px solid var(--card-rule-2); }
.modeswitch a.on { color: var(--pin-ink); background: var(--gold); }
.modeswitch a:not(.on):hover { color: var(--gold); }

/* ───────── axis furniture ─────────────────────────────────── */
.axis { height: 2px; background: linear-gradient(to right, transparent, var(--axis-line) 2%, var(--axis-line) 98%, transparent); }

/* a date's dot on the axis + the connector down to its caption */
.ep-dot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px 2px var(--gold-glow);
  transform: translate(-50%, -50%); z-index: 3; cursor: pointer;
  transition: transform .14s;
}
.ep-dot:hover, .ep-dot.sel { transform: translate(-50%, -50%) scale(1.4); }
.ep-tick {
  position: absolute; width: 1px; transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(212,167,62,0.4), rgba(212,167,62,0.08));
  z-index: 1; pointer-events: none;
}

/* ───────── episode caption (zig-zag two rows below axis) ──── */
.ep-cap {
  position: absolute; transform: translateX(-50%); width: 186px;
  text-align: center; z-index: 4; cursor: pointer; transition: opacity .2s;
}
.ep-cap .c-date {
  font-family: var(--fn-mono); font-weight: 500; font-size: 17px; letter-spacing: 1.5px;
  color: var(--gold); text-transform: uppercase; white-space: nowrap; line-height: 1;
}
.ep-cap .c-date .yr { font-size: 12px; opacity: .55; margin-left: 1px; }
.ep-cap .c-ep {
  font-family: var(--fn-serif-text); font-style: italic; font-size: 14px; line-height: 1.24;
  color: var(--card-muted); margin-top: 5px; text-wrap: pretty;
}
.ep-cap .c-count {
  font-family: var(--fn-mono); font-size: 9.5px; letter-spacing: 1.4px;
  color: var(--gold-deep); text-transform: uppercase; margin-top: 5px;
}
.ep-cap:hover .c-date { color: #f6d77a; }
.ep-cap:hover .c-ep { color: var(--card-ink); }
.ep-cap.sel .c-date { color: #f6d77a; }
.ep-cap.sel .c-ep { color: var(--card-ink); }

/* dim non-selected episodes once one is chosen */
.canvas.has-selection .ep-cap:not(.sel) { opacity: .35; }
.canvas.has-selection .pin:not(.in-cluster) { opacity: .28; }

/* hero pins: bright (each is a pick) but reserve the big flare for the SELECTED one */
.pin.is-hero .pin-head {
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}
.pin.is-hero.is-active .pin-head {
  box-shadow: 0 0 0 3px rgba(232,181,60,0.28), 0 0 40px 3px var(--gold-glow), 0 16px 32px rgba(0,0,0,0.55);
}

/* ───────── the day's slate in the panel ───────────────────── */
#pBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.p-slate { border-top: 1px solid var(--card-rule); padding-top: 16px; margin-bottom: 20px; }
.p-slate-h {
  font-family: var(--fn-mono); font-size: 11px; letter-spacing: 1.8px;
  color: var(--card-muted); text-transform: uppercase; margin-bottom: 10px;
}
.slate-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: baseline;
  padding: 9px 8px; cursor: pointer; border: 1px solid transparent; border-left: 2px solid var(--card-rule-2);
  transition: background .14s, border-color .14s;
}
.slate-item + .slate-item { margin-top: 4px; }
.slate-item:hover { background: rgba(232,181,60,0.06); border-left-color: var(--gold-deep); }
.slate-item.on { background: rgba(232,181,60,0.1); border-left-color: var(--gold); }
.slate-team { font-family: var(--fn-mono); font-size: 13px; letter-spacing: 1px; color: var(--gold); }
.slate-head { font-family: var(--fn-serif-text); font-size: 15px; line-height: 1.25; color: var(--card-ink); text-wrap: pretty; }
.slate-item .pickflag {
  display: inline-block; font-family: var(--fn-mono); font-size: 8.5px; letter-spacing: 1.2px;
  color: var(--pin-ink); background: var(--gold); padding: 1px 5px; text-transform: uppercase; margin-left: 6px;
  transform: translateY(-2px);
}

/* ───────── date steppers (prev / next episode) ───────────── */
.dnav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 24;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 64px;
  background: rgba(20,18,13,0.62); border: 1px solid var(--card-rule-2);
  color: var(--gold); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .34s cubic-bezier(.3,.7,.2,1), opacity .2s, color .14s, border-color .14s, background .14s;
}
.dnav svg { width: 22px; height: 22px; }
.dnav-prev { left: 16px; border-radius: 0 14px 14px 0; }
.dnav-next { right: 16px; border-radius: 14px 0 0 14px; }
.dnav:hover { color: #f6d77a; border-color: var(--gold-deep); background: rgba(20,18,13,0.82); }
.dnav.disabled { opacity: .2; pointer-events: none; }
body.panel-shift .dnav-next { transform: translate(-460px, -50%); }

/* ───────── footer hint ────────────────────────────────────── */
.foot-hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 8;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--fn-mono); font-size: 11px; letter-spacing: 0.8px; color: #6b6354;
  pointer-events: none;
}
.foot-hint b { color: var(--mustard); font-weight: 500; }

/* ───────── the league sideshow — comedic "joke" pins ──────────
   A cool slate species, deliberately NOT the gold trade pins. Rides
   above (or just below) the axis with an italic aside. Non-interactive. */
.jokepin { --ev: #7fb0c9; --ev-deep: #3f6173; --ev-glow: rgba(127,176,201,0.42);
  position: absolute; top: 0; pointer-events: none; z-index: 7; }
.jp-stem {
  position: absolute; left: 0; width: 1px; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(127,176,201,0.04), var(--ev) 92%);
}
.jp-node {
  position: absolute; left: 0; width: 11px; height: 11px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: radial-gradient(120% 120% at 34% 26%, #d6ecf4, var(--ev) 56%, var(--ev-deep));
  border: 1px solid #d6ecf4; box-shadow: 0 0 14px 2px var(--ev-glow);
}
.jp-cap { position: absolute; left: 0; transform: translateX(-50%); width: 172px; text-align: center; }
.jp-tag {
  display: inline-block; font-family: var(--fn-mono); font-size: 8px; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--ev); border: 1px solid rgba(127,176,201,0.30);
  padding: 1px 6px 0; margin-bottom: 7px; line-height: 1.5;
}
.jp-date { font-family: var(--fn-mono); font-size: 9.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ev); margin-bottom: 5px; }
.jp-text { font-family: var(--fn-serif-text); font-style: italic; font-size: 13.5px;
  line-height: 1.34; color: #cfdbe1; text-wrap: pretty; }

/* legend chip for the slate species */
.lg-pin.slate { border-color: #d6ecf4 !important;
  background: radial-gradient(120% 120% at 34% 26%, #d6ecf4, #7fb0c9 58%, #3f6173) !important;
  box-shadow: 0 0 14px 1px rgba(127,176,201,0.42) !important; }

/* ───────── Year bookends — big quiet numerals at either end ──── */
.year-mark {
  position: absolute; font-family: var(--fn-serif-display); font-weight: 700;
  color: rgba(212,167,62,0.11); line-height: 0.8; letter-spacing: -4px;
  pointer-events: none; user-select: none; transform: translate(-50%, -50%);
  font-size: 196px; white-space: nowrap; z-index: 0;
}

@media (max-width: 760px) {
  .jp-cap { width: 150px; }
  .jp-text { font-size: 12px; }
  .jp-tag { font-size: 7.5px; }
  .year-mark { font-size: 116px; letter-spacing: -2px; }
  /* tuck act labels into the very top so the slate captions clear them */
  .phase-label { top: 10px; font-size: 9px; letter-spacing: 1.6px; transform: translateX(12px); }
}

@media (max-width: 760px) {
  .panel { width: 100vw; }
  body.panel-shift .dnav-next { transform: translateY(-50%); }
  .masthead { padding: 52px 18px 14px; }
  .mh-title { font-size: 30px; }
  .mh-dek { display: none; }
  /* the on-canvas footer hint collides with captions on small screens */
  .foot-hint { display: none; }
  /* tighter captions to fit the narrower mobile column */
  .ep-cap .c-date { font-size: 14px; letter-spacing: 1px; }
  .ep-cap .c-ep { font-size: 12px; margin-top: 4px; }
  .ep-cap .c-count { font-size: 8.5px; margin-top: 4px; }
  /* keep the mode switch reachable — float it top-center, drop the legend rows */
  .mh-legend { display: block; }
  .mh-legend .lg-row { display: none; }
  .modeswitch {
    position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 40;
    background: rgba(20,18,13,0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
}
