@charset "utf-8";
/* The Living Research Loop — animated exhibit at the top of the Research page.
   Builds on the tokens in mystic.css; every selector is namespaced .rl-*. */
.rl {
  --rl-ink: var(--myst-ink, #09090b);
  --rl-gold: var(--myst-gold, #d4ae69);
  --rl-brass: var(--myst-brass, #b99355);
  --rl-parch: var(--myst-parchment, #ede2c7);
  --rl-moon: var(--myst-moonlight, #f1eee5);
  --rl-dim: var(--myst-dim, rgba(241, 238, 229, 0.76));
  --rl-line: var(--myst-border, rgba(212, 174, 105, 0.28));
  --rl-hair: rgba(212, 174, 105, 0.16);
  --rl-panel: rgba(26, 23, 24, 0.82);
  --rl-panel-soft: rgba(34, 30, 31, 0.72);
  /* mask colours: muted, readable on a black scan */
  --rl-teal: #74ada6;
  --rl-teal-fill: rgba(116, 173, 166, 0.34);
  --rl-emerald: #7fbf98;
  --rl-emerald-fill: rgba(84, 160, 118, 0.42);
  --rl-emerald-deep: var(--myst-emerald, #274b3b);
  --rl-amber: #e0a458;
  --rl-contest: #c8706b;
  --rl-oxblood: var(--myst-oxblood, #551d20);
  --rl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  margin: 0.5rem 0 0;
}

/* the research article below already pads for the navbar; tighten it under the exhibit */
.rl + .rs {
  padding-top: 4.5rem;
}

/* ---------------------------------------------------------------- canvas */
.rl-canvas {
  position: relative;
  isolation: isolate;
  padding: 1.25rem 1.5rem 1.1rem;
  border: 1px solid var(--rl-line);
  border-radius: 2px;
  color: var(--rl-moon);
  background:
    radial-gradient(ellipse 55% 45% at 28% 42%, rgba(212, 174, 105, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 92% 100%, rgba(39, 75, 59, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 0%, rgba(85, 29, 32, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #141113 0%, var(--rl-ink) 100%);
  box-shadow:
    inset 0 1px 0 rgba(241, 238, 229, 0.05),
    0 30px 70px -30px rgba(0, 0, 0, 0.85);
}

/* delicate astronomical linework in the corners */
.rl-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' fill='none' stroke='%23d4ae69' stroke-opacity='.16'%3E%3Ccircle cx='0' cy='0' r='120'/%3E%3Ccircle cx='0' cy='0' r='180' stroke-dasharray='2 6'/%3E%3Cpath d='M0 0L240 90M0 0L150 230'/%3E%3Ccircle cx='240' cy='90' r='2' fill='%23d4ae69' fill-opacity='.35'/%3E%3Ccircle cx='150' cy='230' r='1.5' fill='%23d4ae69' fill-opacity='.35'/%3E%3C/svg%3E") left top / 260px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' fill='none' stroke='%23d4ae69' stroke-opacity='.14'%3E%3Ccircle cx='260' cy='260' r='140'/%3E%3Ccircle cx='260' cy='260' r='200' stroke-dasharray='1 7'/%3E%3Cpath d='M260 260L40 170M260 260L120 30'/%3E%3C/svg%3E") right bottom / 260px no-repeat;
}

.rl-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- rail */
.rl-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  margin: 0 0 1.9rem;
}

.rl-rail-line {
  position: absolute;
  left: 16.666%;
  right: 16.666%;
  top: 11px;
  height: 1px;
  background: var(--rl-hair);
}

.rl-rail-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--rl-brass), var(--rl-gold));
  transform-origin: left center;
  transform: scaleX(var(--rl-rail, 0));
  transition: transform 1.2s var(--rl-ease);
}

/* the narrow light that travels with the fill */
.rl-rail-fill::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2px;
  width: 26px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(ellipse at right, rgba(255, 233, 186, 0.95), rgba(212, 174, 105, 0) 70%);
}

.rl-phase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.25rem 0.2rem;
  border: 0;
  background: none;
  color: var(--rl-dim);
  text-align: center;
}

.rl-phase-dot {
  position: relative;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid var(--rl-line);
  background: var(--rl-ink);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.rl-phase-dot::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(212, 174, 105, 0.25);
  transition: background 0.5s ease, transform 0.5s ease;
}

.rl-phase-txt {
  font-family: var(--myst-font-label);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.4s ease;
}

.rl-phase-num {
  color: var(--rl-brass);
  margin-right: 0.15rem;
}

.rl-phase-hint {
  font-family: var(--myst-font-body);
  font-style: italic;
  font-size: 0.8rem;
  color: rgba(241, 238, 229, 0.5);
}

.rl-phase:hover .rl-phase-txt,
.rl-phase.is-active .rl-phase-txt {
  color: var(--rl-gold);
}

.rl-phase:hover .rl-phase-dot {
  border-color: var(--rl-gold);
}

.rl-phase.is-done .rl-phase-dot,
.rl-phase.is-active .rl-phase-dot {
  border-color: var(--rl-gold);
}

.rl-phase.is-done .rl-phase-dot::before,
.rl-phase.is-active .rl-phase-dot::before {
  background: var(--rl-gold);
}

.rl-phase.is-active .rl-phase-dot {
  box-shadow: 0 0 0 4px rgba(212, 174, 105, 0.1), 0 0 18px rgba(212, 174, 105, 0.45);
}

/* animated halo on the active phase */
.rl-phase.is-active .rl-phase-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(212, 174, 105, 0.55);
  animation: rl-halo 2.4s ease-out infinite;
}

@keyframes rl-halo {
  0% { transform: scale(0.75); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* LEARN receives the returning feedback token */
.rl-phase-recv {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--rl-emerald);
  box-shadow: 0 0 14px rgba(127, 191, 152, 0.45);
}

/* ---------------------------------------------------------------- stage */
.rl-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.rl-viewer {
  margin: 0;
  min-width: 0;
}

/* the scan: one square, image + overlay share the same box */
.rl-scan {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: #050506;
  border: 1px solid var(--rl-hair);
  overflow: hidden;
}

/* gold corner ticks, workstation-style */
.rl-scan::before,
.rl-scan::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  pointer-events: none;
  border-color: var(--rl-gold);
  border-style: solid;
  opacity: 0.75;
}

.rl-scan::before {
  left: 6px;
  top: 6px;
  border-width: 1px 0 0 1px;
}

.rl-scan::after {
  right: 6px;
  bottom: 6px;
  border-width: 0 1px 1px 0;
}

.rl-scan-img,
.rl-scan-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rl-scan-img {
  display: block;
  object-fit: cover;
  filter: contrast(1.04);
}

.rl-scan-svg {
  overflow: visible;
}

.rl-meta {
  position: absolute;
  z-index: 2;
  font-family: var(--myst-font-utility);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 226, 199, 0.55);
  pointer-events: none;
}

.rl-meta-tl { left: 30px; top: 10px;
}

.rl-meta-tr { right: 12px; top: 10px; color: rgba(212, 174, 105, 0.7);
}

.rl-meta-r { left: 10px; top: 50%; transform: translateY(-50%);
}

.rl-meta-l { right: 10px; top: 50%; transform: translateY(-50%);
}

.rl-pill {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--rl-line);
  border-radius: 2px;
  background: rgba(9, 9, 11, 0.72);
  font-family: var(--myst-font-utility);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--rl-parch);
  pointer-events: none;
}

.rl-pill i {
  color: var(--rl-gold);
}

/* ---------------------------------------------------------------- overlays (SVG) */
.rl-m {
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.rl-m-initial {
  fill: var(--rl-teal-fill);
  stroke: var(--rl-teal);
  stroke-width: 1.6px;
}

.rl-m-reviewed {
  fill: var(--rl-emerald-fill);
  stroke: var(--rl-emerald);
  stroke-width: 1.8px;
}

.rl-m-proposed,
.rl-cmp-proposed .rl-m-cmpr {
  fill: url(#rl-hatch);
  stroke: #e2be7a;
  stroke-width: 1.6px;
  stroke-dasharray: 4 3;
}

.rl-m-cmpr {
  fill: var(--rl-emerald-fill);
  stroke: var(--rl-emerald);
  stroke-width: 1.8px;
}

.rl-m-proposed {
  animation: rl-march 1.4s linear infinite;
}

@keyframes rl-march {
  to { stroke-dashoffset: -14; }
}

/* the small region resolves from a dashed proposal into a stable contour */
.rl-ov-reviewed .rl-m-new {
  stroke-dasharray: 4 3;
  transition: stroke-dasharray 1.2s ease 0.4s;
}

.rl-ov-reviewed.is-on .rl-m-new {
  stroke-dasharray: 60 0;
}

.rl-unc-ring {
  fill: none;
  stroke: var(--rl-amber);
  stroke-width: 1.2px;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

.rl-ov-uncertain.is-on .rl-unc-glow {
  animation: rl-breathe 1.6s ease-in-out 2;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes rl-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.18); }
}

.rl-flag-ring {
  fill: none;
  stroke: var(--rl-contest);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.rl-cross {
  fill: none;
  stroke: rgba(212, 174, 105, 0.55);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.rl-scribble {
  fill: none;
  stroke: var(--rl-gold);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 3px rgba(212, 174, 105, 0.55));
  transition: stroke-dashoffset 0s linear 0.6s, opacity 0.5s ease;
}

.rl-ov-annotation.is-on .rl-scribble {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.6s linear, opacity 0.5s ease;
}

/* once later phases take over, the annotation stays as a quiet trace */
.rl-canvas:not([data-step="1"]):not([data-step="2"]):not([data-step="3"]) .rl-scribble {
  opacity: 0.45;
}

.rl-cursor-halo {
  fill: rgba(212, 174, 105, 0.16);
  stroke: rgba(212, 174, 105, 0.6);
  stroke-width: 1px;
}

.rl-cursor-dot {
  fill: #f3d9a2;
}

.rl-grow-c {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.04);
  transition: transform 0s linear 0.6s;
}

.rl-grow-c.is-on {
  transform: scale(1);
  transition: transform 1.8s var(--rl-ease);
}

.rl-tag {
  font-family: var(--myst-font-utility);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: rgba(237, 226, 199, 0.8);
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 3px;
}

.rl-tag-r2 {
  fill: #f0c58a;
}

/* comparison layer */
.rl-cmp {
  display: none;
}

.rl-comparing .rl-cmp {
  display: inline;
}

.rl-comparing .rl-ov-mask {
  opacity: 0 !important;
}

.rl-cmp-ring {
  fill: none;
  stroke: rgba(226, 190, 122, 0.7);
  stroke-width: 1px;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}

.rl-cmp-line {
  stroke: var(--rl-gold);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.rl-cmp-lab {
  font-family: var(--myst-font-utility);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--rl-parch);
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.8);
  stroke-width: 3px;
}



.rl-cmp-handle circle {
  fill: var(--rl-ink);
  stroke: var(--rl-gold);
  stroke-width: 1.2px;
}

.rl-cmp-handle path {
  fill: none;
  stroke: var(--rl-gold);
  stroke-width: 1.4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- workspace */
.rl-ws {
  display: grid;
  min-width: 0;
}

.rl-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.6s var(--rl-ease), visibility 0s linear 0.5s;
}

.rl-panel.is-current {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.6s ease 0.15s, transform 0.7s var(--rl-ease) 0.15s, visibility 0s;
}

.rl-ph {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rl-hair);
}

.rl-ph-k {
  margin: 0 0 0.2rem;
  font-family: var(--myst-font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rl-gold);
}

.rl-ph-title {
  margin: 0 0 0.3rem;
  font-family: var(--myst-font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--rl-moon);
}

.rl-ph-q {
  margin: 0;
  font-family: var(--myst-font-body);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--rl-dim);
}

.rl-card {
  position: relative;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rl-hair);
  border-left: 2px solid var(--rl-line);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--rl-panel-soft), var(--rl-panel));
  box-shadow: inset 0 1px 0 rgba(241, 238, 229, 0.04);
}

.rl-card-k {
  margin: 0 0 0.25rem;
  font-family: var(--myst-font-utility);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rl-brass);
}

.rl-card-k i {
  margin-right: 0.25rem;
  color: var(--rl-gold);
}

.rl-card-t {
  margin: 0;
  font-family: var(--myst-font-body);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--rl-parch);
}

.rl-node {
  border-left-color: var(--rl-teal);
}

.rl-canvas[data-step="2"] .rl-node {
  box-shadow: inset 0 1px 0 rgba(241, 238, 229, 0.04), 0 0 0 1px rgba(116, 173, 166, 0.35), 0 0 24px -6px rgba(116, 173, 166, 0.5);
}

.rl-glyph {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.3rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 0.05em;
}

.rl-card-warn {
  border-left-color: var(--rl-amber);
}

.rl-card-warn .rl-card-k,
.rl-card-warn .rl-card-k i {
  color: var(--rl-amber);
}

.rl-card-contest {
  border-left-color: var(--rl-contest);
  background: linear-gradient(180deg, rgba(85, 29, 32, 0.38), rgba(26, 23, 24, 0.85));
}

.rl-card-contest .rl-card-k,
.rl-card-contest .rl-card-k i {
  color: #dd9a94;
}

.rl-quote {
  margin: 0;
  font-family: var(--myst-font-display);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.25;
  color: var(--rl-moon);
}

/* swap groups: alternatives occupy one grid cell, so text changes do not reflow */
.rl-swap {
  display: grid;
}

.rl-swap > [data-from] {
  grid-area: 1 / 1;
}

/* ---- agents */
.rl-agents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.rl-agent {
  position: relative;
  min-width: 0;
}

/* pulse wire from each agent down to the synthesis card */
.rl-agent::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.75rem;
  width: 1px;
  height: 0.75rem;
  background: linear-gradient(180deg, var(--rl-gold), rgba(212, 174, 105, 0));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.rl-canvas[data-step="7"] .rl-agent::after,
.rl-canvas[data-step="8"] .rl-agent::after {
  opacity: 1;
  animation: rl-wire 1.2s ease-in-out infinite;
}

@keyframes rl-wire {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.rl-agent-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.65rem;
  border: 1px solid var(--rl-hair);
  border-radius: 2px;
  background: rgba(9, 9, 11, 0.55);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.4s ease, background 0.3s ease;
}

.rl-agent-btn:hover {
  border-color: var(--rl-gold);
  background: rgba(212, 174, 105, 0.06);
}

.rl-agent.is-on .rl-agent-btn {
  animation: rl-agent-lit 1.6s ease-out 1;
}

@keyframes rl-agent-lit {
  0% { box-shadow: 0 0 0 1px rgba(212, 174, 105, 0.7), 0 0 28px -4px rgba(212, 174, 105, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(212, 174, 105, 0); }
}

.rl-agent-id {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--rl-gold);
  font-family: var(--myst-font-label);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rl-gold);
}

.rl-agent-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.rl-agent-name {
  font-family: var(--myst-font-utility);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rl-brass);
}

.rl-agent-out {
  font-family: var(--myst-font-body);
  font-size: 0.84rem;
  line-height: 1.38;
  color: var(--rl-parch);
}

/* ---- synthesis */
.rl-synth {
  border-left-color: var(--rl-gold);
}

.rl-synth-1 {
  margin: 0 0 0.15rem;
  font-family: var(--myst-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rl-moon);
}

.rl-synth-2 {
  margin: 0;
  font-family: var(--myst-font-body);
  font-size: 0.88rem;
  color: #e9c98d;
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}

.rl-synth.is-on .rl-synth-2 {
  opacity: 1;
}

.rl-note {
  margin: 0.4rem 0 0;
  font-family: var(--myst-font-body);
  font-style: italic;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(241, 238, 229, 0.62);
}





/* ---- improve */
.rl-rev {
  border-left-color: var(--rl-emerald);
}

.rl-rev-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0.15rem 0 0;
}

.rl-chip {
  padding: 0.18rem 0.5rem;
  border: 1px solid;
  border-radius: 2px;
  font-family: var(--myst-font-utility);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

.rl-chip-init {
  color: var(--rl-teal);
  border-color: rgba(116, 173, 166, 0.5);
  background: rgba(116, 173, 166, 0.08);
}

.rl-chip-rev {
  color: var(--rl-emerald);
  border-color: rgba(127, 191, 152, 0.55);
  background: rgba(39, 75, 59, 0.45);
}

.rl-arrow {
  color: var(--rl-gold);
}

.rl-memory {
  border: 1px solid rgba(212, 174, 105, 0.5);
  border-left: 2px solid var(--rl-gold);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(212, 174, 105, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(39, 75, 59, 0.42), rgba(20, 24, 21, 0.92));
}

.rl-memory.is-on {
  animation: rl-glow-in 2s ease-out 1;
}

@keyframes rl-glow-in {
  0% { box-shadow: 0 0 0 1px rgba(212, 174, 105, 0.8), 0 0 36px -2px rgba(212, 174, 105, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(212, 174, 105, 0), 0 0 22px -10px rgba(212, 174, 105, 0.35); }
}

.rl-memory .rl-card-k {
  font-family: var(--myst-font-label);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--rl-gold);
}

.rl-mem-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.8rem;
  margin: 0.4rem 0 0;
}

.rl-mem-list dt {
  font-family: var(--myst-font-utility);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rl-brass);
  padding-top: 0.15rem;
}

.rl-mem-list dd {
  margin: 0;
  font-family: var(--myst-font-body);
  font-size: 0.86rem;
  color: var(--rl-parch);
}

.rl-loopmsg {
  margin: 0.1rem 0 0;
  font-family: var(--myst-font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--rl-gold);
}

.rl-closing {
  margin: 0.2rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rl-hair);
  font-family: var(--myst-font-display);
  font-size: 1.28rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  color: var(--rl-moon);
}

/* ---------------------------------------------------------------- gated elements */
.rl-canvas [data-from] {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.rl-canvas [data-from].is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0s;
}

/* the mask-growth clip circle must stay renderable; its scale is the animation */
.rl-canvas .rl-grow-c {
  opacity: 1;
}

.rl-instant,
.rl-instant *,
.rl-instant *::before,
.rl-instant *::after {
  transition: none !important;
}

.rl-frozen,
.rl-frozen *,
.rl-frozen *::before,
.rl-frozen *::after {
  animation-play-state: paused !important;
}

/* ---------------------------------------------------------------- links layer */
.rl-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.rl-link,
.rl-pulse,
.rl-loop {
  fill: none;
  stroke-linecap: round;
}

.rl-link {
  stroke: rgba(212, 174, 105, 0.55);
  stroke-width: 1px;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
}

.rl-link.is-on {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s var(--rl-ease), opacity 0.5s ease, visibility 0s;
}

.rl-stacked .rl-link,
.rl-stacked .rl-pulse {
  display: none;
}

.rl-link-amber { stroke: rgba(224, 164, 88, 0.6);
}

.rl-link-contest { stroke: rgba(200, 112, 107, 0.75); stroke-dasharray: 100 100;
}

.rl-link-verified { stroke: rgba(127, 191, 152, 0.65);
}

.rl-pulse {
  stroke: #ffe3a8;
  stroke-width: 2.4px;
  stroke-dasharray: 5 95;
  stroke-dashoffset: 5;
  filter: drop-shadow(0 0 4px rgba(212, 174, 105, 0.9));
}

.rl-pulse.is-on {
  animation: rl-travel 1.5s var(--rl-ease) 0.5s 2 both;
}

.rl-pulse-amber {
  stroke: #f2c483;
}

@keyframes rl-travel {
  from { stroke-dashoffset: 5; }
  to { stroke-dashoffset: -95; }
}

.rl-loop {
  stroke: rgba(212, 174, 105, 0.6);
  stroke-width: 1px;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
}

.rl-loop.is-on {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.6s cubic-bezier(0.45, 0, 0.25, 1), opacity 0.5s ease, visibility 0s;
}

.rl-token-halo {
  fill: rgba(212, 174, 105, 0.22);
}

.rl-token-core {
  fill: #ffe3a8;
  filter: drop-shadow(0 0 5px rgba(255, 227, 168, 0.95));
}

.rl-status-text {
  margin: 0;
  min-height: 2.6em;
  font-family: var(--myst-font-body);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--rl-parch);
}

.rl-status-text.is-closing {
  font-family: var(--myst-font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rl-gold);
}

.rl-mem-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.45rem;
  border: 1px solid var(--rl-line);
  transform: rotate(45deg);
}

.rl-mem-dot.is-lit {
  border-color: var(--rl-gold);
  background: var(--rl-gold);
  box-shadow: 0 0 10px rgba(212, 174, 105, 0.7);
}

.rl-ctl-play {
  border-color: rgba(212, 174, 105, 0.6);
}

/* focus rings for every control */
.rl-canvas button:focus-visible {
  outline: 2px solid var(--rl-gold);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1199.98px) {
  .rl-phase-hint { display: none; }
}

@media (max-width: 991.98px) {
  .rl-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }

  .rl-ws {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 575.98px) {
  .rl-canvas {
    padding: 1rem 0.85rem 0.9rem;
  }

  .rl-rail {
    margin-bottom: 1.5rem;
  }

  .rl-phase-txt {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .rl-phase-num {
    display: block;
    margin: 0;
  }

  .rl-meta-tl,
  .rl-meta-tr {
    font-size: 0.55rem;
  }

  /* the clinician cards carry this on small screens; the pill would cover the skull */
  .rl-pill {
    display: none;
  }

  .rl-agents {
    grid-template-columns: minmax(0, 1fr);
  }

  .rl-agent::after {
    display: none;
  }

  .rl-ph-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 359.98px) {
  .rl-meta-tl,
  .rl-meta-tr {
    display: none;
  }
}

/* ---------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .rl-canvas *,
  .rl-canvas *::before,
  .rl-canvas *::after {
    animation: none !important;
    transition: none !important;
  }

  .rl-cursor,
  .rl-token,
  .rl-pulse,
  .rl-fx {
    display: none;
  }
}

/* ---------------------------------------------------------------- playful feedback */

/* warm lantern that follows the mouse inside the canvas */
.rl-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--rl-px, 50%) var(--rl-py, 50%), rgba(212, 174, 105, 0.1), transparent 70%);
  transition: opacity 0.5s ease;
}

.rl-hover .rl-glow {
  opacity: 1;
}

.rl-scan {
  cursor: crosshair;
}

.rl-fx {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.rl-ripple {
  position: absolute;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 1px solid rgba(212, 174, 105, 0.75);
  box-shadow: 0 0 18px rgba(212, 174, 105, 0.35), inset 0 0 12px rgba(212, 174, 105, 0.2);
  transform: scale(0.05);
  opacity: 0;
  animation: rl-ripple 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.rl-ripple-scan {
  border-color: rgba(127, 191, 152, 0.85);
  box-shadow: 0 0 20px rgba(127, 191, 152, 0.4), inset 0 0 14px rgba(127, 191, 152, 0.25);
}

@keyframes rl-ripple {
  0% { transform: scale(0.05); opacity: 0.95; }
  100% { transform: scale(1); opacity: 0; }
}

.rl-review-line {
  margin: 0.4rem 0 0;
  font-family: var(--myst-font-utility);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--rl-parch);
}

.rl-agent-btn {
  cursor: default;
}
