/* ==========================================================================
   Interactive PI3K pathway figure
   Loaded only on pages that actually render the schematic.
   ========================================================================== */

.pathway {
  margin: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pathway__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: clamp(1.15rem, .9rem + 1vw, 1.9rem) clamp(1.15rem, .9rem + 1vw, 2rem) 0;
}

.pathway__title {
  font-size: var(--step-2);
  margin: 0;
  letter-spacing: -.025em;
}

.pathway__head .eyebrow { margin-bottom: .55rem; }

.pathway__controls {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.pathway__mode {
  padding: .42rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .87rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.pathway__mode:hover { border-color: var(--accent); color: var(--accent); }
/* The dark-mode ink override for accent-filled controls lives in style.css,
   alongside the buttons and filters that share the problem. */
.pathway__mode[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pathway__play {
  width: 34px;
  height: 34px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.pathway__caption {
  margin: 1rem clamp(1.15rem, .9rem + 1vw, 2rem) 0;
  padding: .85rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-sunken);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  min-height: 3.1rem;
}
.pathway__caption strong { color: var(--text); font-weight: 650; }

/* The figure is information-dense: below ~800px it scrolls rather than shrinks
   into illegibility. */
.pathway__stage {
  margin-top: 1.15rem;
  padding: 0 clamp(1.15rem, .9rem + 1vw, 2rem) clamp(1.15rem, .9rem + 1vw, 2rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.pathway__stage svg {
  width: 100%;
  min-width: 760px;
  height: auto;
}

.pathway__stage::-webkit-scrollbar { height: 9px; }
.pathway__stage::-webkit-scrollbar-track { background: var(--bg-sunken); border-radius: 999px; }
.pathway__stage::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.pathway__stage::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.pathway__hint {
  display: none;
  margin: 0 clamp(1.15rem, .9rem + 1vw, 2rem) 1rem;
  font-size: .85rem;
  color: var(--text-faint);
}
@media (max-width: 820px) {
  .pathway__hint { display: block; }
  .pathway__head { align-items: flex-start; flex-direction: column; }
}

/* Legend / key printed under the figure for anyone reading it as a static image */
.pathway__notes {
  border-top: 1px solid var(--line);
  padding: 1.1rem clamp(1.15rem, .9rem + 1vw, 2rem);
  font-size: .89rem;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
}
.pathway__notes a { color: var(--text-muted); }
