/* ==========================================================================
   Sealed Energy process surface corrections

   Section 1 corrects contrast in the bright register on the seal journey and
   the artifact detail. Every rule closes a failure measured on the rendered
   page with html.se-bright active, using alpha compositing against the real
   stacked background. The measured ratio is quoted against the WCAG AA
   requirement for that text size. Nothing here changes a surface colour or a
   layout; only foreground values move, and only where a measurement failed.

   Two eyebrows sit on gradient surfaces, which an automated checker cannot
   composite. They carry the identical token as the eyebrows that were
   measured at 1.51 and 1.61 to 1, so they are corrected with them.

   Section 2 rebuilds the dock progress ring.

   Loaded last. Selectors carry html body so they win on specificity rather
   than on link order.
   ========================================================================== */

/* ==========================================================================
   1. BRIGHT REGISTER CONTRAST
   ========================================================================== */

/* --------------------------------------------------------------------------
   1a. Terminal header. Measured 3.56 to 1 against 4.5, on every page that
   carries the header in the bright register.
   -------------------------------------------------------------------------- */

/* Scoped to the process shells. The public home header keeps a dark bar in
   the bright register, where the light typography is already correct. */
html.se-bright body .view-seal .terminal-command small,
html.se-bright body .view-seal .terminal-command span em,
html.se-bright body .view-seal .terminal-account-main small,
html.se-bright body .view-seal .terminal-account-main em,
html.se-bright body .view-exchange .terminal-command small,
html.se-bright body .view-exchange .terminal-command span em,
html.se-bright body .view-exchange .terminal-account-main small,
html.se-bright body .view-exchange .terminal-account-main em {
  color: rgba(11, 18, 16, .62) !important;
}

/* --------------------------------------------------------------------------
   1b. Eyebrows. Measured 1.51, 1.61 and 4.45 to 1 against 4.5.
   The same dark teal already carried by the Genesis stage label.
   -------------------------------------------------------------------------- */

html.se-bright body .seal-page-title .eyebrow,
html.se-bright body .seal-page-title .eyebrow .sc-interp,
html.se-bright body .mk-intro-copy .eyebrow,
html.se-bright body .mk-intro-copy .eyebrow .sc-interp,
html.se-bright body .mk-block-head .eyebrow,
html.se-bright body .mk-block-head .eyebrow .sc-interp,
html.se-bright body .market-backing-ticket .eyebrow,
html.se-bright body .market-backing-ticket .eyebrow .sc-interp {
  color: #0f6d72 !important;
}

/* --------------------------------------------------------------------------
   1c. Seal journey secondary copy. Measured 3.56, 4.04, 4.19 to 1.
   -------------------------------------------------------------------------- */

html.se-bright body .evidence-head span .sc-interp,
html.se-bright body .evidence-list .pending code,
html.se-bright body .evidence-list .pending code .sc-interp {
  color: rgba(11, 18, 16, .68) !important;
}

html.se-bright body .evidence-list .pending span small,
html.se-bright body .evidence-list .pending span small .sc-interp {
  color: rgba(11, 18, 16, .62) !important;
}

/* The boundary glyph measured 3.73 to 1 against its own tinted disc. */
html.se-bright body .work-card .origin-boundary > i,
html.se-bright body p.origin-boundary > i {
  color: #0b5158 !important;
}

/* --------------------------------------------------------------------------
   1d. Artifact detail copy. Measured 2.18, 3.46, 3.50 and 4.09 to 1.
   -------------------------------------------------------------------------- */

html.se-bright body .market-detail-copy p,
html.se-bright body .market-detail-copy p .sc-interp {
  color: rgba(11, 18, 16, .74) !important;
}

html.se-bright body .market-detail-copy p.origin-boundary,
html.se-bright body .market-detail-copy p.origin-boundary .sc-interp {
  color: rgba(11, 18, 16, .66) !important;
}

html.se-bright body .mk-page .mk-intro-note,
html.se-bright body .mk-page .mk-intro-note .sc-interp {
  color: rgba(11, 18, 16, .64) !important;
  opacity: 1 !important;
}

html.se-bright body .market-detail-seal span small,
html.se-bright body .market-detail-seal span small .sc-interp {
  color: rgba(11, 18, 16, .7) !important;
}

/* ==========================================================================
   2. DOCK PROGRESS RING

   Two defects. The ring language lived only in app/exchange-trenches.css,
   scoped to .view-exchange. The seal journey neither loads that file nor
   carries that class, so the process dock had flat dots and no ring at all.
   And the loop itself ran zero to 310 degrees at 65 percent, then 310 to 360,
   on an ease curve, so it lurched and then snapped back to zero. A continuous
   ring has to be linear and monotonic.
   ========================================================================== */

@keyframes seal-ring-progress {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

html body .seal-action-dock .dock-progress button,
html body .mobile-action-dock .dock-progress button {
  display: grid !important;
  grid-template-rows: 28px 12px !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 6px !important;
}

html body .seal-action-dock .dock-progress button i,
html body .mobile-action-dock .dock-progress button i {
  position: relative !important;
  width: 28px !important;
  height: 28px !important;
  aspect-ratio: 1 !important;
  flex: none !important;
  border-radius: 50% !important;
  background: conic-gradient(from -90deg, rgba(243, 185, 77, .16), rgba(89, 220, 232, .2), rgba(255, 255, 255, .06)) !important;
  color: transparent !important;
}

html body .seal-action-dock .dock-progress button i::after,
html body .mobile-action-dock .dock-progress button i::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #0a1515;
}

html.se-bright body .seal-action-dock .dock-progress button i,
html.se-bright body .mobile-action-dock .dock-progress button i {
  background: conic-gradient(from -90deg, rgba(243, 185, 77, .34), rgba(15, 109, 114, .34), rgba(11, 18, 16, .1)) !important;
}

html.se-bright body .seal-action-dock .dock-progress button i::after,
html.se-bright body .mobile-action-dock .dock-progress button i::after {
  background: #ffffff;
}

html body .seal-action-dock .dock-progress button.done i,
html body .mobile-action-dock .dock-progress button.done i {
  background: conic-gradient(from -90deg, #f3b94d, #b9d5bc 55%, #59dce8) !important;
}

html body .seal-action-dock .dock-progress button.active i,
html body .mobile-action-dock .dock-progress button.active i {
  background: conic-gradient(from -90deg, #f3b94d 0 28%, #acd6c2 52%, #59dce8 72%, rgba(89, 220, 232, .12) 72% 100%) !important;
  animation: seal-ring-progress 2.6s linear infinite !important;
}

@media (prefers-reduced-motion: reduce) {
  html body .seal-action-dock .dock-progress button.active i,
  html body .mobile-action-dock .dock-progress button.active i {
    animation: none !important;
  }
}
