/* Ephor — the product modules section: a tab per module, and the module's
   story told in ONE FRAME (owner, 2026-10-08: "go with the alternate
   modules"). The tab, the three steps and the way through sit on the start
   side; the frame where the steps happen sits beside them: the question asked,
   the sources read, the brief back. It replaced a storyboard that ran down the
   page — the scattered pills left the section mostly white space.

   module-play.js plays the steps once when the frame comes into view and
   stays on the brief; nothing in the frame is positioned absolutely, so the
   brief's place is held from the start and nothing jumps when it lands. */

.context { inline-size: var(--shell); margin-inline: auto; padding: var(--section-pad) var(--inset); }
.context-tabs-menu { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.context-tab {
  display: flex; gap: var(--s-3); align-items: center; padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: transparent;
  font-size: var(--fs-body); color: var(--navy); transition: background 0.2s, color 0.2s;
}
/* each tab names its product and wears its device — the belt for Orion */
.context-tab small { font-size: var(--fs-caption); color: var(--grey); }
.context-tab[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.context-tab[aria-selected="true"] small { color: var(--sky); }
.context-disc { display: grid; place-items: center; flex: none; inline-size: 2rem; block-size: 2rem; border-radius: var(--r-pill); color: var(--white); }
.context-disc svg { inline-size: 1rem; block-size: 1rem; }
.context-disc.navy { background: var(--navy); }
.context-disc.teal { background: var(--teal); }
.context-disc.blue { background: var(--blue); }

/* ---- the story: the start side ---- */
.mx {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-16); align-items: center;
}
.mx-story { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-6); }
.mx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); inline-size: 100%; }
.mx-steps button {
  position: relative; display: flex; gap: var(--s-4); align-items: flex-start; inline-size: 100%;
  padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-md); background: transparent;
  color: var(--slate); text-align: start; transition: background 0.3s ease;
}
.mx-steps button:hover { background: var(--haze); }
/* the line on the start side: grey, filling navy while its step plays */
.mx-steps button::before, .mx-steps button::after {
  content: ""; position: absolute; inset-inline-start: 0; inset-block: var(--s-3);
  inline-size: 2px; border-radius: var(--r-pill); background: var(--line-soft);
}
.mx-steps button::after { background: var(--navy); transform-origin: top; transform: scaleY(0); }
.mx-steps button[aria-current="step"]::after { transform: scaleY(1); }
.mx[data-playing] .mx-steps button[aria-current="step"]::after { animation: mx-fill var(--step-ms, 3200ms) linear; }
@keyframes mx-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mx-num {
  flex: none; display: grid; place-items: center; inline-size: 2rem; block-size: 2rem;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-caption); font-weight: 600; color: var(--grey);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.mx-step-text { display: grid; gap: var(--s-1); }
.mx-step-text b {
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--grey); transition: color 0.3s ease;
}
.mx-step-text span { font-size: var(--fs-body); line-height: var(--lh-body); }
.mx-steps button[aria-current="step"] .mx-num { background: var(--navy); border-color: var(--navy); color: var(--white); }
.mx-steps button[aria-current="step"] .mx-step-text b { color: var(--teal); }
.mx-steps button[aria-current="step"] .mx-step-text span { color: var(--carbon); }

/* ---- the frame: the question asked, the sources read, the brief back ---- */
.mx-frame {
  display: grid; gap: var(--s-5); padding: var(--s-6);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--panel-ice); box-shadow: var(--shadow-card);
}
.mx-ask {
  display: flex; align-items: center; gap: var(--s-3); margin: 0;
  padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  background: var(--navy); color: var(--white); font-size: var(--fs-body); font-weight: 500;
  box-shadow: var(--shadow-float);
}
.mx-sources { display: grid; gap: var(--s-3); }
.mx-sources-head {
  display: flex; justify-content: space-between; margin: 0;
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--grey);
}
.mx-count b { font-weight: 600; color: var(--carbon); font-variant-numeric: tabular-nums; }
.mx-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
/* one source; the 110ms stagger matches TICK_MS in module-play.js */
.mx-grid li {
  display: flex; align-items: center; gap: var(--s-2); min-inline-size: 0;
  padding: var(--s-2); border-radius: var(--r-pill);
  border: 1px dashed #aeb3b5; background: transparent;
  font-size: var(--fs-small); color: var(--slate);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}
.mx-grid li > span:nth-child(2) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-grid .context-disc { inline-size: 1.75rem; block-size: 1.75rem; }
.mx-grid .context-disc svg { inline-size: 0.875rem; block-size: 0.875rem; }
.mx-tick {
  flex: none; display: grid; place-items: center; color: var(--teal); opacity: 0; scale: 0.6;
  transition: opacity 0.3s ease, scale 0.3s ease; transition-delay: calc(var(--i, 0) * 110ms + 150ms);
}
/* step 1: scattered, each source in its own tool (a dashed outline);
   from step 2: read, solid and ticked one after another */
.mx-frame:not([data-stage="1"]) .mx-grid li { border-style: solid; border-color: var(--line-soft); background: #fff; box-shadow: var(--shadow-soft); }
.mx-frame:not([data-stage="1"]) .mx-tick { opacity: 1; scale: 1; }
/* the brief's place is held from the start, so nothing jumps when it lands */
.mx-out { display: grid; }
.mx-out > * { grid-area: 1 / 1; }
/* .mx-out raises it over .orbit-brief's 34rem, which comes later in this file */
.mx-out .mx-brief { inline-size: 100%; transition: opacity 0.5s ease, translate 0.5s ease; }
.mx-skeleton {
  display: grid; align-content: start; gap: var(--s-3); padding: var(--s-5);
  border: 1px dashed #c3c9cc; border-radius: var(--r-card); transition: opacity 0.4s ease;
}
.mx-skeleton i { display: block; block-size: 0.75rem; border-radius: var(--r-pill); background: #dfe5e8; }
.mx-skeleton i:nth-child(1) { inline-size: 40%; }
.mx-skeleton i:nth-child(2) { inline-size: 90%; }
.mx-skeleton i:nth-child(3) { inline-size: 70%; }
.mx-frame:not([data-stage="3"]) .mx-brief { opacity: 0; translate: 0 0.75rem; }
.mx-frame[data-stage="3"] .mx-skeleton { opacity: 0; }

/* the brief, and the desk it lands on */
.orbit-brief {
  inline-size: min(34rem, 100%); padding: var(--s-5);
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
}
.orbit-brief-head { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--slate); }
.orbit-brief-head b { color: var(--carbon); font-weight: 500; }
.orbit-brief-head .tag {
  margin-inline-start: auto; padding: var(--s-0) var(--s-2); border-radius: var(--r-sm);
  background: var(--ice); color: var(--teal); font-size: var(--fs-micro);
}
.orbit-brief-did { margin: var(--s-4) 0 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.orbit-brief-buried {
  margin-block-start: var(--s-3); padding: var(--s-3) var(--s-3); border-radius: var(--r-sm);
  background: var(--warm); font-size: var(--fs-small); line-height: var(--lh-body); color: var(--carbon);
}
.orbit-brief-buried b { font-weight: 500; color: var(--warm-text); }
.orbit-assign {
  display: flex; align-items: center; gap: var(--s-2);
  margin-block-start: var(--s-4); padding-block-start: var(--s-4);
  border-block-start: 1px solid var(--line-soft);
}
.orbit-avatar {
  display: grid; place-items: center; flex: none; inline-size: 2rem; block-size: 2rem;
  border-radius: var(--r-pill); background: var(--navy); color: var(--white);
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: normal;
}
.orbit-assign-who { font-size: var(--fs-small); font-weight: 500; }
.orbit-assign-state {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-caption); color: var(--grey);
}
.orbit-assign-state i { inline-size: 0.4rem; block-size: 0.4rem; border-radius: 50%; background: var(--green); }

/* the way through to the product, under the steps */
.module-discover {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-6); border-radius: var(--r-pill);
  border: 1px solid var(--line-soft); background: transparent;
  color: var(--navy); font-size: var(--fs-body); font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
}
.module-discover:hover { background: var(--ice); border-color: transparent; translate: 0 -1px; }
.module-discover svg { transition: translate 0.2s ease; }
.module-discover:hover svg { translate: 3px 0; }

/* The Orion mark: three amber belt stars on a DIAGONAL, middle largest,
   ascending toward the trailing edge; never mirrors (docs/brand-mark.md —
   geometry restated in this surface's primitives). One class for the whole
   page: the header's Orion link, the module tab, the question bar and the
   brief all draw this; only the footer's smaller copy (closing.css) has its own. */
.belt { direction: ltr; display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; flex: none; }
.belt i { grid-area: 1 / 1; border-radius: 50%; background: var(--belt); inline-size: 4.5px; block-size: 4.5px; box-shadow: 0 0 6px var(--belt); }
.belt i:nth-child(1) { translate: -6px 6px; }
.belt i:nth-child(2) { inline-size: 6.5px; block-size: 6.5px; box-shadow: 0 0 9px var(--belt); }
.belt i:nth-child(3) { translate: 6px -6px; }

/* The belt breathes wherever it is drawn, the way it does on the Orion page
   (site/css/acts.css): opacity 0.5 → 1 → 0.5, ease-in-out, forever, each star
   on its own period (2.6s · 2s · 3.1s) so the three never beat in unison. The
   hero hunter's three stars are the same mark and take the same pulse. Held
   still, three ambers are punctuation. */
@keyframes belt-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.belt i, .hunter .belt-stars circle { animation: belt-pulse 2.6s ease-in-out infinite; }
.belt i:nth-child(2), .hunter .belt-stars circle:nth-child(2) { animation-duration: 2s; }
.belt i:nth-child(3), .hunter .belt-stars circle:nth-child(3) { animation-duration: 3.1s; }
@media (prefers-reduced-motion: reduce) {
  .belt i, .hunter .belt-stars circle { animation: none; }
}

/* narrower: the sources two across; then the frame under the steps; on a
   phone the sources become one checklist, so no name is cut short */
@media (max-width: 1199px) {
  .mx { gap: var(--s-10); }
  .mx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .mx { grid-template-columns: minmax(0, 1fr); }
  .mx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .mx-frame { padding: var(--s-3); gap: var(--s-4); }
  .mx-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .mx-grid li { padding-block: var(--s-1); }
  .mx-brief { padding: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) {
  .mx-grid li, .mx-tick, .mx-brief, .mx-skeleton { transition: none; }
  .mx[data-playing] .mx-steps button[aria-current="step"]::after { animation: none; }
}
