/* =========================================================================
   COMMAND PEEK — SHOW raises a collapsible rail card above the dashboard.
   Driven by js/command-peek.js; see that file for why the open state floats
   instead of expanding inside its grid cell.
   ========================================================================= */

/* The detail block always ships in the DOM so the real, wired card can be
   floated forward. Shut is a CSS state, not an absence. */
.eo-rail-card.is-shut > .eo-rail-hidden{ display:none; }

/* The gap the card leaves behind. Invisible — its only job is to stop the
   column reflowing while the card is out of it. */
.cmd-peek-placeholder{ flex:none; pointer-events:none; }

.cmd-peek-backdrop{
  position:fixed; inset:0;
  z-index:56;   /* above the shell chrome (max 55), below any modal (60+) */
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(2px);
  opacity:0; pointer-events:none;
  transition:opacity 260ms var(--ease);
}
.cmd-peek-backdrop.is-on{ opacity:1; pointer-events:auto; }

/* The raised card. Geometry (left/top/width/height) is written inline by the
   script from measured rects; everything here is the lift itself. */
.eo-rail-card.cmd-peek{
  z-index:57;
  overflow:hidden;
  transition:left 300ms var(--ease-out, cubic-bezier(.22,1,.36,1)),
             top 300ms var(--ease-out, cubic-bezier(.22,1,.36,1)),
             width 300ms var(--ease-out, cubic-bezier(.22,1,.36,1)),
             height 300ms var(--ease-out, cubic-bezier(.22,1,.36,1)),
             box-shadow 300ms var(--ease),
             border-color 300ms var(--ease);
  will-change:left, top, width, height;
}
.eo-rail-card.cmd-peek.is-forward{
  overflow-y:auto;
  border-color:var(--accent);
  box-shadow:0 24px 64px rgba(0,0,0,.55), 0 0 0 1px var(--line-bright) inset;
}
/* Forward beats shut: the whole point of the gesture is the hidden rows. */
.eo-rail-card.cmd-peek.is-forward > .eo-rail-hidden{ display:block; }

/* The revealed block fades up as the box grows, so the detail arrives with the
   card rather than snapping in at full strength on frame one. */
.eo-rail-card.cmd-peek.is-forward > .eo-rail-hidden{
  animation:cmdPeekReveal 320ms var(--ease) both;
}
.eo-rail-card.cmd-peek.is-closing > .eo-rail-hidden{ opacity:0; transition:opacity 140ms var(--ease); }

@keyframes cmdPeekReveal{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:none; }
}

@media (prefers-reduced-motion:reduce){
  .eo-rail-card.cmd-peek,
  .cmd-peek-backdrop{ transition-duration:1ms; }
  .eo-rail-card.cmd-peek.is-forward > .eo-rail-hidden{ animation-duration:1ms; }
}

/* =========================================================================
   RAISED AUTO-SUGGESTION — the hero's Auto-Suggestion button lifts this
   sprint's text forward instead of leaving the dashboard for its page.
   Built by CommandPeek.raise(), so there is no grid cell behind it and no
   placeholder; it grows out of the button and is removed on the way down.

   Sized to the words, and wide on purpose. The page's reading type is set for
   a full-width sheet with a picture rail beside it; in a narrow card that
   leading turns into scroll for no gain, so the type is stepped down, every
   trailing margin trimmed, and the card allowed out to 1080px (see MAX_POP_W)
   — width is what keeps the text from becoming a tall column. The card is
   measured after these rules apply, which is what keeps a two-line suggestion
   a two-line card.
   ========================================================================= */
.eo-rail-card.cmd-peek-pop{ padding:18px 22px; display:block; }
.eo-as-peek .eo-as-peek-body{
  padding:0; font-size:15px; line-height:1.62; cursor:default; border-radius:0;
}
.eo-as-peek .eo-as-peek-body:hover{ background:none; }
.eo-as-peek .eo-as-peek-body p{ margin:0 0 .7em; }
.eo-as-peek .eo-as-peek-body h1,
.eo-as-peek .eo-as-peek-body h2,
.eo-as-peek .eo-as-peek-body h3{ margin:14px 0 6px; }
.eo-as-peek .eo-as-peek-body blockquote{ margin:.8em 0; padding-left:14px; }
.eo-as-peek .eo-as-peek-body hr{ margin:1em 0; }
.eo-as-peek .eo-as-peek-body > :last-child{ margin-bottom:0; }
