/* Contextual reflection for tool and workflow cards; no idle animation. */
:root {
  --sog-card-reflection: color-mix(in srgb,var(--gold) 78%,#e4eeee);
  --sog-card-edge: color-mix(in srgb,var(--gold) 34%,var(--hairline,#383838));
  --sog-card-shadow: 0 5px 14px rgb(0 0 0 / .12);
}
html[data-theme="light"] {
  --sog-card-reflection: color-mix(in srgb,var(--gold) 85%,#284b53);
  --sog-card-shadow: 0 4px 12px rgb(23 64 78 / .05);
}
:is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card) {
  position:relative; isolation:isolate;
  transition:border-color 180ms var(--sog-ease,ease),background-color 180ms var(--sog-ease,ease),box-shadow 180ms var(--sog-ease,ease);
}
#plugin-grid .plugin-card,
#plugin-grid .plugin-card:is(:hover,:focus-within) {
  transform:none; box-shadow:var(--sog-card-shadow);
}
:is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card):hover { border-color:var(--sog-card-edge); }
/* Keyboard focus remains a stable, clearly visible outline, independent of light. */
:is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card):focus-visible,
#plugin-grid .plugin-card:has(:focus-visible) {
  outline:2px solid var(--gold); outline-offset:3px;
}
#view-agent .agent-workflow-card h3 { padding-right:18px; }
#view-agent .sog-card-arrow {
  position:absolute; top:14px; right:12px; width:14px; height:14px;
  color:var(--text-3,#969f9c); pointer-events:none;
  transition:translate 180ms var(--sog-ease,ease),color 180ms;
}
@supports (mask-composite: exclude) {
  :is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card)::after {
    content:""; position:absolute; inset:0; z-index:3; padding:1px; border-radius:inherit;
    background:radial-gradient(170px circle at var(--sog-card-x,50%) var(--sog-card-y,0px),var(--sog-card-reflection),transparent 80%);
    mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite:exclude;
    opacity:0; pointer-events:none; transition:opacity 200ms var(--sog-ease,ease);
  }
  @media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
    :is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card)[data-sog-card-lit]:hover::after { opacity:.72; }
  }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  #view-agent .agent-workflow-card:hover .sog-card-arrow { translate:2px 0; color:var(--gold); }
}
@media (prefers-reduced-motion:reduce) {
  :is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card),
  :is(#plugin-grid .plugin-card,#view-agent .agent-workflow-card)::after,
  #view-agent .sog-card-arrow { transition:none; }
}
